|
|
|
@ -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;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
LoadDoinfo(data){
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$store.getters.data().WMSINDO_parent_head.$refs.modelBody.$refs.tab_dolist.columns.forEach((x)=>{
|
|
|
|
|
},
|
|
|
|
|
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'){
|
|
|
|
|
|
|
|
|
|
x.bind.data=row.AreaCodeList.filter(y => {
|
|
|
|
|
let result=y.key.indexOf(row["STOREHOUSE"])==0;
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if(needinsert) {
|
|
|
|
|
x.bind.data.push(y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
x.bind.data=newdata;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}, 500)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
loadAreacode(data){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//data.forEach((x)=>{
|
|
|
|
|
// if(data && data.length>0){
|
|
|
|
|
// var _rec=data[0];
|
|
|
|
|
|
|
|
|
|
// this.$store.getters.data().WMSINDO_parent_head.dicKeys.forEach((y)=>{
|
|
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
loadTableAfter_workdetail(data, callBack) {
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
@ -1176,7 +1139,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
remoteLoad() {
|
|
|
|
|
|
|
|
|
|
alert('loaded');
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|