多组织仓位

This commit is contained in:
2026-06-01 17:24:20 +08:00
parent e8b07fcece
commit da62f10df1
16 changed files with 797 additions and 503 deletions

View File

@@ -419,17 +419,17 @@ export default {
}
let dataForm = {};
let details = [];
console.log(this.dataList);
console.log(this.dataList,);
details = this.dataList.map((it) => {
return {
qty: it.qty,
supplierId: it.supplierId,
materialNumber: it.materialNumber,
serialNumbers: it.xlhList, //序列号集
erpDetailId: it.erpDetailId
erpDetailId: it.erpDetailId,
twoSerialNumbers:it.twoSerialNumbers ? it.twoSerialNumbers.filter(Boolean):[]
};
});
console.log('提交数据1', this.dataList, dataForm);
if (this.sjfsType == '按产品上架') {
this.boxs[0].details = details;
}
@@ -441,7 +441,7 @@ export default {
subStockCode: this.subStockCode,
boxs: this.boxs
};
console.log('dataForm', dataForm);
console.log('提交数据===dataForm===', dataForm);
// 节流
if (this.requestStatus) {
return false;
@@ -480,6 +480,7 @@ export default {
this.dataList.forEach((it) => {
it.qty = 0;
it.xlhList = [];
it.twoSerialNumbers=[]
});
this.qktkshow = false;
this.focusInput = '';
@@ -783,10 +784,6 @@ export default {
}
this.focusInput = '';
console.log('序列號', this.xlhVal);
this.$api
.get('/SysConfig/GetMaterial', {
serialNumber: this.xlhVal,
@@ -844,13 +841,16 @@ export default {
});
return;
}
this.dataList = this.$util.scanAndAllocate(this.dataList, res.data.materialNumber, res.data.serialNumber);
//18LC-628W3Y CTN00094835
console.log('走到了这里')
this.dataList = this.$util.scanAndAllocate(this.dataList, res.data.materialNumber, res.data.serialNumber,res.data.twoSerialNumber);
// 缓存序列号
this.xlhstrList.push(res.data.serialNumber);
//缓存2件装序列号
if(res.data.isTwo==2) {
this.twoData.push(res.data.twoSerialNumber)
}
//保留当前输入的数据
this.dqboxXlh = res.data.serialNumber;
this.xlhVal = res.data.serialNumber;
@@ -874,6 +874,7 @@ export default {
list.forEach((it) => {
it.qty = 0;
it.xlhList = [];
it.twoSerialNumbers=[]
});
}
console.log('根据序列号的时候明细数据结构', list);
@@ -895,8 +896,8 @@ export default {
let objArray = [];
objArray = list;
let newObjArray = objArray.map((obj) => {
obj.zQty = JSON.parse(JSON.stringify(obj.qty)); // 修改 name 属性,这里是在姓名后加上 ' Smith'
obj.qty = 0; // 添加 age 属性,这里设定年龄为 30
obj.zQty = JSON.parse(JSON.stringify(obj.qty));
obj.qty = 0;
return obj;
});
return objArray;
@@ -919,15 +920,6 @@ export default {
this.heights.body = this.heights.body - 36;
this.heights = this.$util.setlistHeight('.sh_gdInfo', '.footbts');
}, 200);
// if(this.cwNum && this.cwselectList.length && !this.subStockCode){
// this.cwselectList.forEach((item)=>{
// if(item.name === this.cwNum) {
// this.subStockCode = item.code
// console.log(this.subStockCode,'=走到这里来了=')
// }
// })
// }
this.$forceUpdate();
},
// 获取仓位下拉数据
@@ -942,14 +934,6 @@ export default {
.then((res) => {
if (res.status == 200) {
this.cwselectList = res.data;
//&& this.cwselectList.length == 1
// if (this.cwselectList && this.cwselectList.length == 1) {
// this.cwNum = this.cwselectList[0].name;
// this.cwchange(this.cwselectList[0]);
// this.$refs.wselect1.optionsShow = false;
// this.$refs.wselect1.isShow = false;
// }
}
});
},