Browse Source

修改调拨数据回显问题

dev
caoyizhong 2 years ago
parent
commit
0ef126e456
  1. 52
      src/views/activiti/form/ProcessMaterialsAllotForm.vue
  2. 2
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

52
src/views/activiti/form/ProcessMaterialsAllotForm.vue

@ -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 {

2
src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

@ -445,7 +445,7 @@
let isMA = true
if (!!record.row.materialGroup && !!record.row.materialGroup ) {
// console.log("materialGroup111")
if (!!record.row.id && record.row.materialGroup !== this.materialGroupId && !record.row.equipment) {
if (!!record.row.id && record.row.materialGroup !== this.materialGroupId && record.column.key !== "allotNumber") {
// console.log("materialGroup222")
if (this.rolePlay) {
// console.log("")

Loading…
Cancel
Save