|
|
|
@ -377,6 +377,7 @@
|
|
|
|
|
} |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
// console.log("this.disabled",this.disabled); |
|
|
|
|
return this.disabled |
|
|
|
|
}, |
|
|
|
|
showFlowSubmitButton() { |
|
|
|
@ -406,14 +407,15 @@
|
|
|
|
|
methods: { |
|
|
|
|
async onSelect(record) { |
|
|
|
|
// console.log(record) |
|
|
|
|
// console.log("keykey",record.column.key) |
|
|
|
|
let isDB = true |
|
|
|
|
if (record.row.materialGroup !== '' && record.row.materialGroup !== undefined) { |
|
|
|
|
if (!!record.row.materialGroup) { |
|
|
|
|
if (this.issh){ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (record.row.id !== '' && record.row.id !== undefined && this.materialGroupId !== record.row.materialGroup) { |
|
|
|
|
// console.log("执行materialGroup") |
|
|
|
|
this.fetchMerchandiseNews(record.row.materialGroup, 1) |
|
|
|
|
if (!!record.row.id && this.materialGroupId !== record.row.materialGroup && record.column.key !== "allotNumber" ) { |
|
|
|
|
// console.log("record.row.materialGroup") |
|
|
|
|
await this.fetchMerchandiseNews(record.row.materialGroup, 1) |
|
|
|
|
let value = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
@ -438,7 +440,7 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.allotNumber === '' && isDB) { |
|
|
|
|
if ( !!record.row.materialGroup && record.row.equipment !== '' && record.row.allotNumber === '' && isDB) { |
|
|
|
|
// console.log("执行materialNumber") |
|
|
|
|
let materialName = {} |
|
|
|
|
this.bigIdMerchandiseNewsList.forEach(item => { |
|
|
|
@ -452,23 +454,25 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
let values = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': record.row.equipment, |
|
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
'materialName': materialName.name, |
|
|
|
|
'materialUnit': materialName.unit, |
|
|
|
|
'supplierId': materialName.supplierName, |
|
|
|
|
'materialPrice': materialName.price, |
|
|
|
|
// 'number': materialName.number, |
|
|
|
|
'materialAmount': 0 |
|
|
|
|
if(Object.keys(materialName).length > 0){ |
|
|
|
|
let values = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': record.row.equipment, |
|
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
'materialName': materialName.name, |
|
|
|
|
'materialUnit': materialName.unit, |
|
|
|
|
'supplierId': materialName.supplierName, |
|
|
|
|
'materialPrice': materialName.price, |
|
|
|
|
// 'number': materialName.number, |
|
|
|
|
'materialAmount': 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
// console.log("",values); |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(values) |
|
|
|
|
] |
|
|
|
|
// console.log("",values); |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(values) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 根据请发数量计算 |
|
|
|
@ -646,7 +650,8 @@
|
|
|
|
|
this.getAction("/hy/processMaterialsAllot/getOne",param).then(res => { |
|
|
|
|
// console.log("res>>>>>>>>>>>>>>>>>>>>>",res) |
|
|
|
|
if (res.success) { |
|
|
|
|
if (res.result){ |
|
|
|
|
// if (res.result){ |
|
|
|
|
// console.log(this.heid,"this.heid"); |
|
|
|
|
this.heid = false |
|
|
|
|
getAction(this.url.unitWasteNameUrl, null).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
@ -661,7 +666,7 @@
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.getAssignees(r) |
|
|
|
@ -678,6 +683,7 @@
|
|
|
|
|
formData.tableName = r.tableName |
|
|
|
|
this.data = formData |
|
|
|
|
console.log('表单回显数据', this.data) |
|
|
|
|
this.libraryInvisible = this.data.beAllotDepartment; |
|
|
|
|
this.editAfter() |
|
|
|
|
this.btndisabled = false |
|
|
|
|
} else { |
|
|
|
|