Browse Source

fix(srmPart): 更新产品基本信息表单字段为只读状态

- 将产品编码、NPC货号、产品分类、计量单位字段设置为disabled状态
- 将产品名称、产品规格字段设置为disabled状态
- 将采购员、sourcing专员、属性模板字段设置为disabled状态
- 备注字段也设置为disabled状态
- 更新状态字段显示文本,将启用/停用改为在用/禁用
- 修正供应商模块中的货币汇率字段类型从数字输入改为普通输入
- 隐藏供应商共享模块中的Share标签页
- 更新产品审批列表中的状态列标签为是否在用
master
qiankanghui 4 weeks ago
parent
commit
6c09342ae2
  1. 32
      src/views/modules/srmPart/com_part_BasicInfo.vue
  2. 120
      src/views/modules/srmPart/com_part_Suppliers.vue
  3. 51
      src/views/modules/srmPart/partApprovalList.vue
  4. 72
      src/views/modules/srmPart/partInfoList.vue
  5. 12
      src/views/modules/srmSupplier/supplierShare.vue
  6. 130
      src/views/modules/supplier/purHeaderList.vue

32
src/views/modules/srmPart/com_part_BasicInfo.vue

@ -16,22 +16,22 @@
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="产品编码" prop="partNo">
<el-input v-model="currentpart.partNo" ></el-input>
<el-input v-model="currentpart.partNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="NPC货号" prop="npc">
<el-input v-model="currentpart.npc"></el-input>
<el-input v-model="currentpart.npc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品分类" prop="category">
<el-input v-model="currentpart.category"></el-input>
<el-input v-model="currentpart.category" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="计量单位" prop="unit">
<el-input v-model="currentpart.unit"></el-input>
<el-input v-model="currentpart.unit" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
@ -39,12 +39,12 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产品名称" prop="partDesc">
<el-input v-model="currentpart.partDesc"></el-input>
<el-input v-model="currentpart.partDesc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品规格" prop="partSpec">
<el-input v-model="currentpart.partSpec"></el-input>
<el-input v-model="currentpart.partSpec" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
@ -54,25 +54,22 @@
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="采购员" prop="buyerName">
<el-input v-model="currentpart.buyerName"></el-input>
<el-input v-model="currentpart.buyerName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="sourcing专员" prop="sourcingName">
<el-input v-model="currentpart.sourcingName"></el-input>
<el-input v-model="currentpart.sourcingName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="属性模板" prop="codeNo">
<el-input v-model="currentpart.codeNo"></el-input>
<el-input v-model="currentpart.codeNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态">
<el-select v-model="currentpart.status" placeholder="请选择" style="width: 100%">
<el-option label="启用" value="N"></el-option>
<el-option label="停用" value="Y"></el-option>
</el-select>
<el-form-item label="是否在用">
<el-input v-model="statusText" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
@ -84,6 +81,7 @@
<el-form-item label="备注">
<el-input
v-model="currentpart.remark"
disabled
type="textarea"
:rows="2"
resize="none"
@ -131,8 +129,8 @@ export default {
computed: {
//
statusText() {
return this.currentpart.status === 'N' ? '启用' :
this.currentpart.status === 'Y' ? '停用' : ''
return this.currentpart.status === 'Y' ? '在用' :
this.currentpart.status === 'N' ? '禁用' : ''
}
},
methods: {
@ -229,4 +227,4 @@ export default {
.part-form {
width: 100%;
}
</style>
</style>

120
src/views/modules/srmPart/com_part_Suppliers.vue

@ -4,13 +4,13 @@
<el-form-item label="供应商编码">
<el-input v-model="searchData.supplierCode" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="searchTable()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
:height=searchData.height
@ -46,7 +46,7 @@
</template>
</el-table-column>
</el-table>
<el-dialog title="part Suppliers" :close-on-click-modal="false" v-drag :visible.sync="contractModelFlag" width="600px">
<el-dialog title="Part Suppliers" :close-on-click-modal="false" v-drag :visible.sync="contractModelFlag" width="600px">
<div class="dialog-content">
<el-form label-position="top" style="margin-top: -5px;">
<el-row :gutter="20">
@ -61,7 +61,7 @@
<el-input v-model="partSuppliersData.supplierName" disabled ></el-input>
</el-form-item>
</el-col> -->
<el-col :span="6">
<el-form-item :label="'含税价格'" >
<el-input v-model="partSuppliersData.priceWithTax" type="number" ></el-input>
@ -71,7 +71,7 @@
<el-form-item label="是否为主供应商">
<el-select v-model="partSuppliersData.isMainSupplier" placeholder="请选择" >
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -80,22 +80,22 @@
<el-input v-model="partSuppliersData.deliveryTime" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'二级供应商编码'" >
<el-input v-model="partSuppliersData.secondarySupplierCode" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'二级供应商名称'" >
<el-input v-model="partSuppliersData.secondarySupplierName" ></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item :label="'二级供应商编码'" >-->
<!-- <el-input v-model="partSuppliersData.secondarySupplierCode" ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item :label="'二级供应商名称'" >-->
<!-- <el-input v-model="partSuppliersData.secondarySupplierName" ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-form-item :label="'备注'">
<el-input type="textarea" :rows="3" v-model="partSuppliersData.remark" style=""></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
@ -242,42 +242,42 @@ export default {
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 811001,
serialNumber: '811001Table5SecondarySupplierCode',
tableId: '811001Table5',
tableName: '供应商合同',
columnProp: 'secondarySupplierCode',
headerAlign: 'center',
align: 'left',
columnLabel: '二级供应商编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 811001,
serialNumber: '811001Table5SecondarySupplierName',
tableId: '811001Table5',
tableName: '供应商合同',
columnProp: 'secondarySupplierName',
headerAlign: 'center',
align: 'left',
columnLabel: '二级供应商名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
// {
// userId: this.$store.state.user.name,
// functionId: 811001,
// serialNumber: '811001Table5SecondarySupplierCode',
// tableId: '811001Table5',
// tableName: '',
// columnProp: 'secondarySupplierCode',
// headerAlign: 'center',
// align: 'left',
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 150
// },
// {
// userId: this.$store.state.user.name,
// functionId: 811001,
// serialNumber: '811001Table5SecondarySupplierName',
// tableId: '811001Table5',
// tableName: '',
// columnProp: 'secondarySupplierName',
// headerAlign: 'center',
// align: 'left',
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 150
// },
{
userId: this.$store.state.user.name,
functionId: 811001,
@ -327,7 +327,7 @@ export default {
getBaseData (val) {
if (this.tagNo === 520) {
this.partSuppliersData.supplierCode = val.supplier_no
}
},
//
@ -355,7 +355,7 @@ export default {
site:this.$store.state.user.site,
partNo:this.searchData.partNo,
supplierCode:'',
supplierName:'',
supplierName:'',
priceWithTax:'',
deliveryTime:'',
secondarySupplierCode:'',
@ -364,18 +364,18 @@ export default {
isMainSupplier:'',
createBy:this.$store.state.user.name,
}
this.contractModelFlag=true;
},
submitData(){
if(this.partSuppliersData.supplierCode==''||this.partSuppliersData.supplierCode==null){
this.$message.warning('未输入supplierCode!')
return false
}
createPartSupplierRelation( this.partSuppliersData).then(({data})=>{
if (data && data.code === 0){
@ -390,7 +390,7 @@ export default {
})
},
editModel(row){
this.partSuppliersData=JSON.parse(JSON.stringify(row));
this.contractModelFlag=true;
@ -442,4 +442,4 @@ export default {
}
</style>
</style>

51
src/views/modules/srmPart/partApprovalList.vue

@ -74,7 +74,11 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">{{
item.columnProp === 'status'
? (scope.row.status === 'Y' ? '在用' : scope.row.status === 'N' ? '禁用' : scope.row.status)
: scope.row[item.columnProp]
}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 100px"/></span>
</template>
@ -89,7 +93,7 @@
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'COMPLETED' || scope.row.flowStatus === 'TERMINATED'" @click="handleRestart(scope.row)">重新审批</el-link>
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'RUNNING'" @click="openApproveDialog(scope.row)">审批</el-link>
</template>
</el-table-column>
</el-table>
@ -157,7 +161,7 @@
</el-col>
</el-row> -->
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="6">
<el-form-item label="是否特殊放行">
<el-select v-model="approveData.specialRelease" style="width: 100%">
<el-option label="否" value="N"></el-option>
@ -397,7 +401,7 @@ export default {
columnProp: 'status',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnLabel: '是否在用',
columnWidth: '80',
columnHidden: false,
columnImage: false,
@ -498,7 +502,7 @@ export default {
// }
],
exportName: '产品信息' + this.dayjs().format('YYYYMMDDHHmmss')
}
},
/* 组件 */
@ -520,7 +524,7 @@ export default {
this.height = (window.innerHeight - 280) / 2
})
},
methods: {
getBaseList (val, type) {
@ -539,9 +543,9 @@ export default {
// if (this.tagNo === 1100) {
// this.searchData.partNo = val.part_no
// }
},
getMainData () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
@ -563,11 +567,11 @@ export default {
this.dataListLoading = false
})
},
tabClick (tab, event) {
this.refreshCurrentTabTable()
},
//
sizeChangeHandle (val) {
this.pageSize = val
@ -580,12 +584,12 @@ export default {
this.pageIndex = val
this.getMainData()
},
changeData (row) {
this.currentRow = JSON.parse(JSON.stringify(row))
this.refreshCurrentTabTable()
},
refreshCurrentTabTable () {
if (this.currentRow === '' || this.currentRow === null) {
this.currentRow = {site: '', partNo: ''}
@ -606,7 +610,7 @@ export default {
this.refreshAttachments()
}
},
async exportExcel () {
this.searchData.limit = -1
this.searchData.page = 1
@ -621,7 +625,7 @@ export default {
dropColumns: []
})
},
refreshBasicInfo () {
let inData = {
site: this.currentRow.site,
@ -631,7 +635,7 @@ export default {
}
this.$refs.basicInfo.init(inData)
},
refreshSpecParams () {
let inData = {
site: this.currentRow.site,
@ -642,7 +646,7 @@ export default {
}
this.$refs.specParams.init(inData)
},
refreshSuppliers () {
let inData = {
site: this.currentRow.site,
@ -651,7 +655,7 @@ export default {
}
this.$refs.suppliers.init(inData)
},
refreshApproval () {
let inData = {
site: this.currentRow.site,
@ -661,7 +665,7 @@ export default {
}
this.$refs.approval.init(inData)
},
refreshAttachments () {
let inData = {
orderRef1: this.currentRow.site,
@ -671,8 +675,8 @@ export default {
}
this.$refs.attachments.init(inData)
},
//
openApproveDialog(row) {
this.approveData = {
@ -682,8 +686,9 @@ export default {
flowCode: row.flowCode,
flowVersion: row.flowVersion,
nodeCode: row.nodeCode,
specialRelease: 'N',
comment: ''
}
this.approveDialogVisible = true
},
@ -737,7 +742,7 @@ export default {
})
}).catch(() => {})
}
}
}
@ -860,4 +865,4 @@ export default {
height: 28px;
}
}
</style>
</style>

72
src/views/modules/srmPart/partInfoList.vue

@ -42,7 +42,11 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">{{
item.columnProp === 'status'
? (scope.row.status === 'Y' ? '在用' : scope.row.status === 'N' ? '禁用' : scope.row.status)
: scope.row[item.columnProp]
}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 100px"/></span>
</template>
@ -137,7 +141,7 @@
<el-form-item label="产品规格" prop="partSpec">
<el-input v-model="currentpart.partSpec"></el-input>
</el-form-item>
</el-col>
</el-col>
</el-row>
</div>
@ -162,10 +166,10 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态">
<el-form-item label="是否在用">
<el-select v-model="currentpart.status" placeholder="请选择" >
<el-option label="启用" value="N"></el-option>
<el-option label="停用" value="Y"></el-option>
<el-option label="在用" value="Y"></el-option>
<el-option label="禁用" value="N"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -466,7 +470,7 @@ export default {
columnProp: 'status',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnLabel: '是否在用',
columnWidth: '80',
columnHidden: false,
columnImage: false,
@ -579,7 +583,7 @@ export default {
sourcingName: '',
category: '',
unit: '',
status: 'N',
status: 'Y',
codeNo: '',
createBy: '',
remark: '',
@ -598,8 +602,8 @@ export default {
partSpec: [
{ required: true, message: ' ', trigger: 'blur' }
]
}
}
},
@ -622,7 +626,7 @@ export default {
this.height = (window.innerHeight - 280) / 2
})
},
methods: {
getBaseList (val, type) {
@ -645,7 +649,7 @@ export default {
if (val === 528) {
strVal = this.currentpart.sourcingName
}
if (val === 527) {
strVal = this.currentpart.codeNo
}
@ -672,12 +676,12 @@ export default {
if (this.tagNo === 528) {
this.currentpart.sourcingName = val.UserName
}
if (this.tagNo === 527) {
this.currentpart.codeNo = val.code_no
}
},
getMainData () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
@ -689,16 +693,16 @@ export default {
if (item.flowNodeInstanceData) {
item.departmentName = item.flowNodeInstanceData.departmentName;
item.assigneeName = item.flowNodeInstanceData.assigneeName;
} else {
item.departmentName = '';
item.assigneeName = '';
}
return item;
});
// this.mainDataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
@ -715,11 +719,11 @@ export default {
this.dataListLoading = false
})
},
tabClick (tab, event) {
this.refreshCurrentTabTable()
},
//
sizeChangeHandle (val) {
this.pageSize = val
@ -732,12 +736,12 @@ export default {
this.pageIndex = val
this.getMainData()
},
changeData (row) {
this.currentRow = JSON.parse(JSON.stringify(row))
this.refreshCurrentTabTable()
},
refreshCurrentTabTable () {
if (this.currentRow === '' || this.currentRow === null) {
this.currentRow = {site: '', partNo: ''}
@ -758,7 +762,7 @@ export default {
this.refreshAttachments()
}
},
async exportExcel () {
this.searchData.limit = -1
this.searchData.page = 1
@ -773,7 +777,7 @@ export default {
dropColumns: []
})
},
refreshBasicInfo () {
let inData = {
site: this.currentRow.site,
@ -783,7 +787,7 @@ export default {
}
this.$refs.basicInfo.init(inData)
},
refreshSpecParams () {
let inData = {
site: this.currentRow.site,
@ -794,7 +798,7 @@ export default {
}
this.$refs.specParams.init(inData)
},
refreshSuppliers () {
let inData = {
site: this.currentRow.site,
@ -803,7 +807,7 @@ export default {
}
this.$refs.suppliers.init(inData)
},
refreshApproval () {
let inData = {
site: this.currentRow.site,
@ -813,18 +817,18 @@ export default {
}
this.$refs.approval.init(inData)
},
refreshAttachments () {
let inData = {
orderRef1: this.currentRow.site,
orderRef2: this.currentRow.partNo,
orderRef3: this.currentRow.partDesc,
orderReftype: 'part',
orderReftype: 'part',
height: Number(this.height) - 20
}
this.$refs.attachments.init(inData)
},
//
addPart() {
this.isAdd = true
@ -837,7 +841,7 @@ export default {
sourcingName: '',
category: '',
unit: '',
status: 'N',
status: 'Y',
codeNo: '',
createBy: this.$store.state.user.name,
remark: '',
@ -845,7 +849,7 @@ export default {
}
this.partDialogVisible = true
},
//
editPart(row) {
if (!row) {
@ -856,7 +860,7 @@ export default {
this.currentpart = {...row}
this.partDialogVisible = true
},
//
savePart() {
this.$refs.partForm.validate((valid) => {
@ -909,7 +913,7 @@ export default {
// flowVersion: row.flowNodeInstanceData.flowVersion,
// nodeCode: row.flowNodeInstanceData.nodeCode,
// comment: ''
// }
// this.approveDialogVisible = true
// },
@ -963,7 +967,7 @@ export default {
// })
// }).catch(() => {})
// }
}
}
@ -1086,4 +1090,4 @@ export default {
height: 28px;
}
}
</style>
</style>

12
src/views/modules/srmSupplier/supplierShare.vue

@ -83,9 +83,9 @@
<el-tab-pane label="Approved Vendor List" name="vendorList" style="">
<vendorList ref="vendorList"></vendorList>
</el-tab-pane>
<el-tab-pane label="Share" name="share" style="">
<!-- <el-tab-pane label="Share" name="share" style="">
<share ref="share"></share>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -127,7 +127,7 @@ export default {
tagNo:'',
mainDataList:[],
dataListLoading: false,
activeName: 'share',
activeName: 'vendorList',
columnArray1: [
{
userId: this.$store.state.user.name,
@ -244,9 +244,9 @@ export default {
if(this.currentRow===''||this.currentRow===null){
this.currentRow={site:'',supplierNo:''}
}
if(this.activeName==='share'){
this.refreshShareTable();
}
// if(this.activeName==='share'){
// this.refreshShareTable();
// }
if(this.activeName==='vendorList'){
this.refreshVendorListTable();
}

130
src/views/modules/supplier/purHeaderList.vue

@ -55,11 +55,11 @@
<el-table-column prop="faxNo" label="传真" min-width="120" header-align="center" align="center" show-overflow-tooltip />
<el-table-column prop="contact" label="联系人" min-width="100" header-align="center" align="center" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" min-width="180" header-align="center" align="left" show-overflow-tooltip />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top:5px"
@size-change="sizeChangeHandle"
@ -72,15 +72,15 @@
<!-- 子表物料明细列表 - 始终显示表头 -->
<div class="sub-title">
物料明细列表
物料明细列表
<el-button type="primary" class="customer-bun-min" @click="openMaterialDialog()" style="margin-left: 10px;">新增物料</el-button>
</div>
<el-table
:data="materialList"
:height="subTableHeight"
border
v-loading="materialLoading"
<el-table
:data="materialList"
:height="subTableHeight"
border
v-loading="materialLoading"
style="width:100%">
<el-table-column fixed="right" label="操作" header-align="center" align="center" width="160">
<template slot-scope="scope">
@ -122,7 +122,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="供应商名称" :required="true">
<el-input v-model="form.supplierName"/>
<el-input v-model="form.supplierName" readonly/>
</el-form-item>
</el-col>
</el-row>
@ -141,7 +141,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="货币汇率">
<el-input-number v-model="form.currencyRate" :precision="4" :step="0.1" style="width:100%" />
<el-input v-model="form.currencyRate" style="width:100%" />
</el-form-item>
</el-col>
<el-col :span="6">
@ -204,7 +204,7 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
@ -222,7 +222,7 @@
<el-input v-model="form.contact" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
@ -273,7 +273,7 @@
<el-input v-model="materialForm.umid" placeholder="计量单位" disabled/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="询价数量">
<el-input-number v-model="materialForm.qty" :min="0" :precision="0" style="width:100%" />
@ -295,11 +295,11 @@
</el-dialog>
<el-dialog
:title="dialogTitle"
:visible.sync="uploadDialogVisible"
width="800px"
:close-on-click-modal="false"
<el-dialog
:title="dialogTitle"
:visible.sync="uploadDialogVisible"
width="800px"
:close-on-click-modal="false"
append-to-body
@close="handleClose">
<div class="customer-css">
@ -355,12 +355,12 @@
</div>
<!-- File Upload Dialog -->
<el-dialog
title="UpLoad"
:visible.sync="ossVisible"
v-drag
width="400px"
append-to-body
<el-dialog
title="UpLoad"
:visible.sync="ossVisible"
v-drag
width="400px"
append-to-body
:close-on-click-modal="false"
@close="handleUploadClose">
<el-form ref="form" class="rq" label-width="80px" label-position="top">
@ -368,10 +368,10 @@
<slot></slot>
<el-col :span="24">
<el-form-item label=" " class="auto">
<el-upload
drag
<el-upload
drag
:file-list="fileList2"
action="#"
action="#"
ref="upload"
:on-remove="onRemoveFile"
:on-change="onChangeFile"
@ -505,7 +505,7 @@ export default {
dialogVisible: false,
dialogTitle: '新增询价单',
editMode: false,
form: {
form: {
id: '',
taxRate: '',
paymentTerm: '',
@ -642,15 +642,15 @@ export default {
return
}
//
const params = {
const params = {
site: this.$store.state.user.site,
supplierNo: val.trim()
}
this.searchSupplierInfo()
},
searchSupplierInfo() {
const params = {
const params = {
site: this.$store.state.user.site,
supplierNo: this.form.supplierId
}
@ -682,7 +682,7 @@ export default {
limit: this.pageSize,
page: this.pageIndex
}
searchPurHeaderList(params).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
@ -721,12 +721,12 @@ export default {
this.currentInquiry = row
this.loadMaterialList(row.orderNo)
},
//
getTaxList() {
this.taxLoading = true
searchTaxList({
site: this.$store.state.user.site
searchTaxList({
site: this.$store.state.user.site
}).then(({data}) => {
if (data.code === 0) {
this.taxList = data.rows || []
@ -743,8 +743,8 @@ export default {
//
getCurrencyList() {
this.currencyLoading = true
searchCurrencyList({
site: this.$store.state.user.site
searchCurrencyList({
site: this.$store.state.user.site
}).then(({data}) => {
if (data.code === 0) {
this.currencyList = data.rows || []
@ -762,8 +762,8 @@ export default {
//
getPamentList() {
this.pamentLoading = true
searchPaymentList({
site: this.$store.state.user.site
searchPaymentList({
site: this.$store.state.user.site
}).then(({data}) => {
if (data.code === 0) {
this.paymentList = data.rows || []
@ -781,8 +781,8 @@ export default {
//
getDeliveryList() {
this.deliveryLoading = true
searchDeliveryList({
site: this.$store.state.user.site
searchDeliveryList({
site: this.$store.state.user.site
}).then(({data}) => {
if (data.code === 0) {
this.deliveryList = data.rows || []
@ -797,7 +797,7 @@ export default {
})
},
//
loadMaterialList(orderNo) {
@ -831,7 +831,7 @@ export default {
supplierId: '',
supplierName: '',
orderDate: today,
wantReplyDate: today,
wantReplyDate: '',
userName: this.$store.state.user.name,
buyer: '',
paymentTerm: '',
@ -910,8 +910,8 @@ export default {
},
updateQuoDetail(row) {
this.$confirm('确定提交询价单: ' + row.orderNo + ' ?', '提示', { type: 'warning' }).then(() => {
updatePurDetailStatus({
orderNo: row.orderNo,
updatePurDetailStatus({
orderNo: row.orderNo,
site: row.site,
status : "待报价",
submitFlag : "Y"
@ -942,7 +942,7 @@ export default {
})
}).catch(() => {})
},
//
openMaterialDialog(row) {
if (!this.currentInquiry) {
@ -973,14 +973,14 @@ export default {
if (!val || val.trim() === '') {
return
}
// getPartInfo
this.getPartInfo()
},
getPartInfo(){
getPartInfo(){
//
const params = {
const params = {
site: this.$store.state.user.site,
partNo: this.materialForm.partNo
}
@ -992,7 +992,7 @@ export default {
this.materialForm.partDesc = data.data.partDesc || this.materialForm.partDesc
this.materialForm.spec = data.data.partSpec || this.materialForm.spec
this.materialForm.umid = data.data.unit || this.materialForm.umid
// this.$message.success('')
} else {
this.$message.warning('未找到该物料信息,请手动填写')
@ -1001,7 +1001,7 @@ export default {
this.$message.error('获取物料信息失败')
})
},
saveMaterial() {
if (!this.materialForm.partNo) {
@ -1056,7 +1056,7 @@ export default {
})
}).catch(() => {})
},
openUploadDialog(row) {
if (!row) {
this.$message.warning('请先选择一个物料')
@ -1068,10 +1068,10 @@ export default {
orderRef1: this.$store.state.user.site,
orderRef2: row.orderNo,
orderRef3: row.partNo,
orderReftype: 'purQuotationDetail'
orderReftype: 'purQuotationDetail'
}
}
}
this.uploadDialogVisible = true
this.searchTable()
},
@ -1126,21 +1126,21 @@ export default {
this.$message.error('请选择文件');
return;
}
this.stagedFileRemark = this.ossForm.remark || '';
this.uploadLoading = true;
//
const stagedFiles = [];
for (let i = 0; i < this.fileList2.length; i++) {
stagedFiles.push(this.fileList2[i].raw);
}
//
this.ossVisible = false;
this.fileList2 = [];
this.ossForm.remark = '';
//
const formData = new FormData();
for (let i = 0; i < stagedFiles.length; i++) {
@ -1152,7 +1152,7 @@ export default {
formData.append('createdBy', this.$store.state.user.name);
formData.append('fileRemark', this.stagedFileRemark || '');
formData.append('orderReftype', this.searchParams.orderReftype || 'purQuotationDetail');
ossUploadNoSaveOSSForYJY(formData)
.then(({ data }) => {
if (data && data.code === 0) {
@ -1161,12 +1161,12 @@ export default {
for (let i = 0; i < data.rows.length; i++) {
this.fileList.push(data.rows[i]);
}
//
this.stagedFiles = [];
this.stagedFileRemark = '';
this.uploadLoading = false;
this.$message.success('上传成功');
this.$emit('upload-success', data.rows);
} else {
@ -1188,7 +1188,7 @@ export default {
let txt = ['txt'];
let pdf = ['pdf'];
let type = '';
if (image.includes(row.fileType.toLowerCase())) {
type = 'image/' + row.fileType;
downLoadObjectFile(row).then(({ data }) => {
@ -1331,4 +1331,4 @@ export default {
height: auto;
line-height: 1.5;
}
</style>
</style>
Loading…
Cancel
Save