Browse Source

调拨流程显示数据

dev
caoyizhong 2 years ago
parent
commit
84a8e1d8c4
  1. 73
      src/views/activiti/form/ProcessMaterialsAllotForm.vue

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

@ -202,6 +202,14 @@
placeholder: '请输入${title}',
defaultValue: ''
},
{
title: '库存数量',
key: 'number',
type: FormTypes.inputNumber,
width: '200px',
placeholder: '请输入${title}',
defaultValue: ''
},
{
title: '调拨目标',
key: 'allotTarget',
@ -259,8 +267,9 @@
add: '/hy/processMaterialsAllot/add',
edit: '/hy/processMaterialsAllot/edit',
queryById: '/hy/processMaterialsAllot/queryById',
descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //
merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews',
descriptionRake: '/wastematerials/processWasteMaterials/wasteMaterialsName', //
merchandiseNewsList: '/wastematerials/processWasteMaterials/merchandiseNewsName',
unitWasteNameUrl: '/unitwaste/processUnitWasteWarehouseCode/unitWasteName',
processMaterialsAllotList: {
list: '/hy/processMaterialsAllot/queryProcessMaterialsAllotListByMainId'
}
@ -354,10 +363,10 @@
if (item.merchandiseNewsId === record.row.equipment) {
materialName = {
name: item.merchandiseName,
unit: item.materialsUnit,
unit: item.unit,
supplierName: item.supplierName,
price: item.price,
residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber,
number : item.number === undefined ? 0 : item.number,
}
}
})
@ -371,51 +380,46 @@
'materialUnit': materialName.unit,
'supplier': materialName.supplierName,
'materialPrice': materialName.price,
'actualSendNumber': materialName.residueNumber,
'materialAmount': materialName.price * materialName.residueNumber,
'number': materialName.number,
'materialAmount': 0,
},
},
]
console.log("",values);
// console.log("",values);
this.$refs.processMaterialsAllotList.setValues(values);
}
//
if(record.row.pleaseSendNumber !== '' && record.row.pleaseSendNumber !== undefined){
// console.log("",record.row)
if(record.row.allotNumber !== '' && record.row.allotNumber !== undefined){
let res = record.row;
let materialName = {}
this.bigIdMerchandiseNewsList.forEach(item => {
if (item.merchandiseNewsId === record.row.equipment) {
materialName = {
residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber,
number : item.number === undefined ? 0 : item.number,
}
}
})
// console.log("materialName.residueNumber",materialName.residueNumber)
if(parseInt( res.pleaseSendNumber) > parseInt( materialName.residueNumber )){
if(parseInt( res.allotNumber) > parseInt( materialName.number )){
// console.log("")
this.$message.warn("输入请发数不能大于库存数")
res.pleaseSendNumber = materialName.residueNumber;
res.actualSendNumber = materialName.residueNumber;
}else{
// console.log("")
res.actualSendNumber = res.pleaseSendNumber;
this.$message.warn("输入调拨数量不能大于库存数量")
res.allotNumber = materialName.number;
}
let value = [
{
rowKey: res.id,
values: {
// 'equipment': res.equipment,
'equipment': res.equipment,
// 'materialGroup': res.materialGroup,
// 'materialName': res.materialName,
// 'materialUnit': res.materialUnit,
// 'supplier': res.supplier,
// 'materialPrice': res.materialPrice,
'actualSendNumber': res.actualSendNumber,
'pleaseSendNumber': res.pleaseSendNumber,
'materialAmount': res.materialPrice * res.actualSendNumber,
// 'materialName': res.name,
// 'materialUnit': res.unit,
// 'supplier': res.supplierName,
// 'materialPrice': res.price,
// 'number': res.number,
'allotNumber': res.allotNumber,
'materialAmount': res.materialPrice * parseInt( res.allotNumber),
},
},
]
@ -509,6 +513,25 @@
})
}
});
getAction(this.url.unitWasteNameUrl,null).then((res)=>{
if(res.success){
if(this.processMaterialsAllotListTable.columns[7].options.length > 0){
this.processMaterialsAllotListTable.columns[7].options = [];
}
res.result.forEach( item => {
this.processMaterialsAllotListTable.columns[7].options.push({
title : item.departName,
value : item.libraryAssociationIdInvisible,
})
})
}
});
},

Loading…
Cancel
Save