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() {
return {
libraryAssociationIdInvisible:'ZK',
rolePlay :false ,
jiy:[],
heid: true,
addId : '',
@ -280,9 +281,10 @@
add: '/hy/processMaterialsDelivery/add',
edit: '/hy/processMaterialsDelivery/edit',
queryById: '/hy/processMaterialsDelivery/queryById',
descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //
wasteMaterialsUrl: '/suppliesstronger/processSuppliesStronger/descriptionName', //
descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //
wasteMaterialsUrl: '/wastematerials/processWasteMaterials/wasteMaterialsName', //
merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews',
wasteMaterialsList: '/wastematerials/processWasteMaterials/merchandiseNewsName', //
puwwlist: "/unitwaste/processUnitWasteWarehouseCode/queryById",
unitWasteWarehouseList: "/unitwaste/processUnitWasteWarehouseCode/queryById", //
processMaterialsDeliveryList: {
@ -383,7 +385,13 @@
// console.log(record)
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){
// 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 === '' ){
// console.log("materialNumber")
@ -394,7 +402,7 @@
name: item.merchandiseName,
unit: item.materialsUnit,
supplierName: item.supplierName,
price: item.price,
price: item.materialPrice,
residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber,
}
}
@ -473,7 +481,6 @@
descriptionId:value,
}
this.bigIdMerchandiseNews = [];
this.bigIdMerchandiseNewsList = [];
let qc = [];
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
// async onSelect(record) {
@ -813,57 +883,56 @@
// });
//
// },
fetchData(value){ //
console.log("this.data==============>",this.data)
let params={}
params.id= sessionStorage.getItem('PUWWC_Id')
getAction(this.url.unitWasteWarehouseList,params).then((res)=>{
console.log(res)
if(res.success){
fetchData(value) { //
// console.log("this.data==============>",this.data) //id
let params = {}
params.id = sessionStorage.getItem('PUWWC_Id')//id
getAction(this.url.unitWasteWarehouseList, params).then((res) => {
// console.log(res)
if (res.success) {
//
let par = {
delFlag: 0,
accountingAttributes: value,
sysOrgCode: this.data.sysOrgCode
}
getAction(this.url.wasteMaterialsUrl,par).then((res)=>{
if(res.success){
if(this.processMaterialsDeliveryListTable.columns[0].options.length > 0){
this.processMaterialsDeliveryListTable.columns[0].options = [];
getAction(this.url.wasteMaterialsUrl, par).then((res) => {
console.log(res)
if (res.success) {
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({
title : item.descriptionName,
value : item.descriptionId,
title: item.descriptionName,
value: item.descriptionId
})
})
}
});
}else{
})
this.rolePlay = true;
} else {
//
let par = {
delFlag: 0,
accountingAttributes: value,
accountingAttributes: value
}
getAction(this.url.descriptionRake,par).then((res)=>{
if(res.success){
if(this.processMaterialsDeliveryListTable.columns[0].options.length > 0){
this.processMaterialsDeliveryListTable.columns[0].options = [];
getAction(this.url.descriptionRake, par).then((res) => {
if (res.success) {
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({
title : item.descriptionName,
value : item.descriptionId,
title: item.descriptionName,
value: item.descriptionId
})
})
}
});
})
this.rolePlay = false;
}
});
})
},

Loading…
Cancel
Save