diff --git a/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO.js b/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO.js index 8f1b94f5..c1da4fce 100644 --- a/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO.js +++ b/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO.js @@ -227,7 +227,7 @@ let extension = { this.$refs.modelBody.$refs.table_feerate.load(); this.$refs.modelBody.$refs.table_opstatus.load(); this.$refs.modelBody.getLogicData(); - + } diff --git a/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO_Edit.vue b/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO_Edit.vue index 8a3b9903..10611e38 100644 --- a/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO_Edit.vue +++ b/Vol.Vue/src/extension/wms/VW_OP_WMS_IN_DO_Edit.vue @@ -562,36 +562,14 @@ export default { this.$store.getters.data().WMSINDO_parent_head.$refs.modelBody.$refs.tab_dolist.columns.forEach((x)=>{ if(x.field=='AREACODE'){ - // x.bind.data=[]; - // row.AreaCodeList.forEach((a)=>{ - // // if(a.key.indexOf(row["STOREHOUSE"])==0){ - // // x.bind.data.push(a); - // // } - // x.bind.data.filter(y => { - // let result=y.key.indexOf(row["STOREHOUSE"])==0; - // if(!result) y.hidden; - // //return result; - // }); - // }); - - // x.bind.data=row.AreaCodeList.filter(y => { - // let result=y.key.indexOf(row["STOREHOUSE"])==0; - // //if(!result) y.hidden; - // return result; - // }); + x.bind.data=row.AreaCodeList.filter(y => { let result=y.key.indexOf(row["STOREHOUSE"])==0; //if(!result) y.hidden; return result; }); this.$store.getters.data().WMSINDO_parent_head.CurrAreaCode.forEach((y) => { - // x.bind.data.some(function(v){ - // if(v.key == y.key) { - // return true; - // }else{ - // x.bind.data.push(y); - // } - // }); + let needinsert=true; x.bind.data.some((c)=>{ @@ -874,6 +852,7 @@ export default { }, mounted(){ this.getLogicData(); + }, methods: { @@ -976,13 +955,13 @@ export default { loadTableAfter_inplanlist(data, callBack) { this.insertbaselist(data); + return true; }, loadTableAfter_dolist(data, callBack) { this.insertbaselist(data); - - this.loadAreacode(data); - + this.LoadDoinfo(data); + this.FilterAreacode(data); return true; }, loadTableAfterfile(data, callBack) { @@ -1050,69 +1029,53 @@ export default { }); } - data.forEach((x)=>{ - - var userInfo=this.$store.getters.getUserInfo() - x.curruser=userInfo.userId; - - - }); + }, - this.$store.getters.data().WMSINDO_parent_head.$refs.modelBody.$refs.tab_dolist.columns.forEach((x)=>{ - if(x.field=='AREACODE'){ - - x.bind.data=row.AreaCodeList.filter(y => { - let result=y.key.indexOf(row["STOREHOUSE"])==0; + LoadDoinfo(data){ - return result; - }); - this.$store.getters.data().WMSINDO_parent_head.CurrAreaCode.forEach((y) => { - - let needinsert=true; - x.bind.data.some((c)=>{ - if(c.key==y.key){ - needinsert=false; - return true; - } - }); - if(needinsert) { - x.bind.data.push(y); + data.forEach((x)=>{ + var userInfo=this.$store.getters.getUserInfo() + x.curruser=userInfo.userId; + this.$store.getters.data().WMSINDO_parent_head.dicKeys.forEach((y)=>{ + if(y.dicNo=="areacode"){ + x.AreaCodeList = y.data; } - - }); - - - } - }); + }) + }); - }, - loadAreacode(data){ - - - //data.forEach((x)=>{ - // if(data && data.length>0){ - // var _rec=data[0]; - - // this.$store.getters.data().WMSINDO_parent_head.dicKeys.forEach((y)=>{ + FilterAreacode(data){ + // console.log(data); + if(!data) return; + var _storehouse=data[0].STOREHOUSE; + setTimeout(() => { + this.$refs.tab_dolist.columns.forEach((x)=>{ + if(x.field=='AREACODE'){ + + var newdata=[]; + x.bind.data.forEach(y => { + // console.log(y); + // console.log(y.key); + // console.log(_storehouse); + // console.log(y.key.indexOf(_storehouse)); + if(y.key.indexOf(_storehouse)==0){ + newdata.push(y); + // console.log(newdata) + } + }); + x.bind.data=newdata; - // if(y.dicNo=="areacode"){ - // x.AreaCodeList = y.data; - // x.AreaCodeList.filter(z => { - // let result=z.key.indexOf(_rec.STOREHOUSE)==0; - // //if(!result) y.hidden; - // return result; - // }); - // } - // }) - // } + + } + }); + }, 500) - //}); - + }, + loadTableAfter_workdetail(data, callBack) { return true; @@ -1176,7 +1139,7 @@ export default { }, remoteLoad() { - + alert('loaded'); },