Browse Source

修改出库流程显示数据

dev
caoyizhong 2 years ago
parent
commit
9a0387f7fd
  1. 139
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

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

@ -122,6 +122,7 @@
data() { data() {
return { return {
libraryAssociationIdInvisible:'ZK', libraryAssociationIdInvisible:'ZK',
rolePlay :false ,
jiy:[], jiy:[],
heid: true, heid: true,
addId : '', addId : '',
@ -280,9 +281,10 @@
add: '/hy/processMaterialsDelivery/add', add: '/hy/processMaterialsDelivery/add',
edit: '/hy/processMaterialsDelivery/edit', edit: '/hy/processMaterialsDelivery/edit',
queryById: '/hy/processMaterialsDelivery/queryById', queryById: '/hy/processMaterialsDelivery/queryById',
descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', // descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //
wasteMaterialsUrl: '/suppliesstronger/processSuppliesStronger/descriptionName', // wasteMaterialsUrl: '/wastematerials/processWasteMaterials/wasteMaterialsName', //
merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews', merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews',
wasteMaterialsList: '/wastematerials/processWasteMaterials/merchandiseNewsName', //
puwwlist: "/unitwaste/processUnitWasteWarehouseCode/queryById", puwwlist: "/unitwaste/processUnitWasteWarehouseCode/queryById",
unitWasteWarehouseList: "/unitwaste/processUnitWasteWarehouseCode/queryById", // unitWasteWarehouseList: "/unitwaste/processUnitWasteWarehouseCode/queryById", //
processMaterialsDeliveryList: { processMaterialsDeliveryList: {
@ -383,7 +385,13 @@
// console.log(record) // console.log(record)
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){ if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){
// console.log("materialGroup") // console.log("materialGroup")
this.fetchMerchandiseNews(record.row.materialGroup,1); if(this.rolePlay ){
await this.fetchMerchandiseNewsZW(record.row.materialGroup, 1);
}else{
await this.fetchMerchandiseNews(record.row.materialGroup, 1);
}
} }
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.actualSendNumber === '' ){ if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.actualSendNumber === '' ){
// console.log("materialNumber") // console.log("materialNumber")
@ -394,7 +402,7 @@
name: item.merchandiseName, name: item.merchandiseName,
unit: item.materialsUnit, unit: item.materialsUnit,
supplierName: item.supplierName, supplierName: item.supplierName,
price: item.price, price: item.materialPrice,
residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber, residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber,
} }
} }
@ -473,7 +481,6 @@
descriptionId:value, descriptionId:value,
} }
this.bigIdMerchandiseNews = [];
this.bigIdMerchandiseNewsList = []; this.bigIdMerchandiseNewsList = [];
let qc = []; let qc = [];
let numberList = []; let numberList = [];
@ -527,6 +534,69 @@
}); });
},
fetchMerchandiseNewsZW(value){ //
//
return new Promise((resolve, reject) => {
//
let par = {
delFlag: 0,
descriptionId:value,
}
this.bigIdMerchandiseNewsList = [];
let qc = [];
let numberList = [];
if(this.processMaterialsDeliveryListTable.columns[1].options.length > 0){
this.processMaterialsDeliveryListTable.columns[1].options = [];
}
this.$refs.processMaterialsDeliveryList.getValues((a,b,c)=>{
// console.log(a,b,c)
b.forEach(item =>{
if(item.equipment !== '' && item.equipment !== undefined && item.equipment !== null){
numberList.push(item.materialNumber);
}
});
});
getAction(this.url.wasteMaterialsList,par).then((res)=>{
if(res.success){
// console.log(res.result);
let newList = res.result;
// console.log("12312312:"+numberList.length);
if(numberList.length > 0){
newList.forEach( item => {
qc.push({
title : item.materialsNumber,
value : item.merchandiseNewsId,
disabled : false
})
})
numberList.forEach( num => {
qc.forEach( i => {
if(num === i.value){
// console.log(num,i.value);
i.disabled = true;
}
});
})
this.processMaterialsDeliveryListTable.columns[1].options = qc;
}else{
newList.forEach( item => {
this.processMaterialsDeliveryListTable.columns[1].options.push({
title : item.materialsNumber,
value : item.merchandiseNewsId,
disabled : false
})
})
}
// console.log(this.processUdgetPlanMaterialTable.columns[1].options);
resolve(this.bigIdMerchandiseNewsList = res.result );
// return
}
});
});
}, },
//table //table
// async onSelect(record) { // async onSelect(record) {
@ -813,57 +883,56 @@
// }); // });
// //
// }, // },
fetchData(value){ // fetchData(value) { //
console.log("this.data==============>",this.data) // console.log("this.data==============>",this.data) //id
let params={} let params = {}
params.id= sessionStorage.getItem('PUWWC_Id') params.id = sessionStorage.getItem('PUWWC_Id')//id
getAction(this.url.unitWasteWarehouseList,params).then((res)=>{ getAction(this.url.unitWasteWarehouseList, params).then((res) => {
console.log(res) // console.log(res)
if(res.success){ if (res.success) {
// //
let par = { let par = {
delFlag: 0, delFlag: 0,
accountingAttributes: value, accountingAttributes: value,
sysOrgCode: this.data.sysOrgCode sysOrgCode: this.data.sysOrgCode
} }
getAction(this.url.wasteMaterialsUrl,par).then((res)=>{ getAction(this.url.wasteMaterialsUrl, par).then((res) => {
if(res.success){ console.log(res)
if(this.processMaterialsDeliveryListTable.columns[0].options.length > 0){ if (res.success) {
this.processMaterialsDeliveryListTable.columns[0].options = []; if (this.processMaterialsDeliveryListTable.columns[0].options.length > 0) {
this.processMaterialsDeliveryListTable.columns[0].options = []
} }
res.result.forEach( item => { res.result.forEach(item => {
this.processMaterialsDeliveryListTable.columns[0].options.push({ this.processMaterialsDeliveryListTable.columns[0].options.push({
title : item.descriptionName, title: item.descriptionName,
value : item.descriptionId, value: item.descriptionId
}) })
}) })
} }
}); })
this.rolePlay = true;
}else{ } else {
// //
let par = { let par = {
delFlag: 0, delFlag: 0,
accountingAttributes: value, accountingAttributes: value
} }
getAction(this.url.descriptionRake,par).then((res)=>{ getAction(this.url.descriptionRake, par).then((res) => {
if(res.success){ if (res.success) {
if(this.processMaterialsDeliveryListTable.columns[0].options.length > 0){ if (this.processMaterialsDeliveryListTable.columns[0].options.length > 0) {
this.processMaterialsDeliveryListTable.columns[0].options = []; this.processMaterialsDeliveryListTable.columns[0].options = []
} }
res.result.forEach( item => { res.result.forEach(item => {
this.processMaterialsDeliveryListTable.columns[0].options.push({ this.processMaterialsDeliveryListTable.columns[0].options.push({
title : item.descriptionName, title: item.descriptionName,
value : item.descriptionId, value: item.descriptionId
}) })
}) })
} }
}); })
this.rolePlay = false;
} }
}); })
}, },

Loading…
Cancel
Save