多组织仓位
This commit is contained in:
@@ -312,7 +312,7 @@ export default {
|
||||
remarkIndex: null, //修改的是那个明细的备注
|
||||
itremake: '', // 明细盘亏备注
|
||||
choseBoxId: '', // 当前箱的箱id
|
||||
subStockCode: null, // 当前箱的仓位code
|
||||
// subStockCode: null, // 当前箱的仓位code
|
||||
subStockCode: '', //仓位code
|
||||
old_SubStockCode: '', //老仓位code,由箱号携带出来
|
||||
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
||||
@@ -407,13 +407,11 @@ export default {
|
||||
},
|
||||
//仓库change事件
|
||||
ckchange(e) {
|
||||
console.log(1232323);
|
||||
this.xhDisabled = !e.name;
|
||||
this.focusInput = '';
|
||||
this.warehouseName = e.name;
|
||||
this.warehouseCode = e.code;
|
||||
this.orgCode = e.erpOrgCode;
|
||||
|
||||
setTimeout(() => {
|
||||
this.focusInput = 'box';
|
||||
}, 300);
|
||||
@@ -521,7 +519,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
let formData = [];
|
||||
|
||||
|
||||
this.dataList.forEach((it) => {
|
||||
formData.push({
|
||||
boxId: this.choseBoxId,
|
||||
@@ -534,15 +532,17 @@ export default {
|
||||
remark: it.remark,
|
||||
stockCode: this.warehouseCode,
|
||||
BoxBillNo: this.xhNo,
|
||||
old_SubStockCode: it.old_SubStockCode ? it.old_SubStockCode : this.subStockCode
|
||||
old_SubStockCode: it.old_SubStockCode ? it.old_SubStockCode : this.subStockCode,
|
||||
twoSerialNumbers:it.twoSerialNumbers ? it.twoSerialNumbers.filter(Boolean):[]
|
||||
});
|
||||
});
|
||||
console.log('提交數據', formData);
|
||||
|
||||
|
||||
// 节流
|
||||
if (this.requestStatus) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.requestStatus = true;
|
||||
this.qrpdshow = false;
|
||||
this.$api.post('/TakeStock/Save', formData).then((res) => {
|
||||
@@ -715,6 +715,11 @@ export default {
|
||||
this.dataList[findindx].itxlhList.push(res.data.serialNumber);
|
||||
// 缓存当前扫描数据
|
||||
this.xlhStrlist.push(res.data.serialNumber);
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2) {
|
||||
this.dataList[findindx].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
}
|
||||
uni.showToast({
|
||||
title: '获取成功',
|
||||
icon: 'none',
|
||||
@@ -753,7 +758,8 @@ export default {
|
||||
old_SubStockCode: res.data.subStockCode,
|
||||
pdNum: this.xlhOrggType == 'ggxh' ? 0 : this.xlhOrggType == 'xlh' ? 1 : 0,
|
||||
serialNumbers: [],
|
||||
itxlhList: []
|
||||
itxlhList: [],
|
||||
twoSerialNumbers:[],
|
||||
});
|
||||
if (this.xlhOrggType == 'xlh') {
|
||||
this.xlhGgxNum = 1;
|
||||
@@ -762,6 +768,7 @@ export default {
|
||||
this.xlhStrlist.push(res.data.serialNumber);
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2) {
|
||||
this.dataList[this.dataList.length - 1].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
}
|
||||
}
|
||||
@@ -837,16 +844,8 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
//没有仓位就不添加明细数据
|
||||
// if(!if()res.data.subStockCode) {
|
||||
// return
|
||||
// }if()
|
||||
//明细数据
|
||||
// if(!res.data.subStockCode) {
|
||||
// retrun
|
||||
// }
|
||||
|
||||
this.dataList = [];
|
||||
|
||||
res.data.details.forEach((obj) => {
|
||||
if (obj.qty > 0 && res.data.subStockCode) {
|
||||
this.dataList.push({
|
||||
@@ -857,7 +856,9 @@ export default {
|
||||
subStockCode: res.data.subStockCode,
|
||||
remark: '',
|
||||
erpSubStockCode: null,
|
||||
old_SubStockCode: res.data.subStockCode
|
||||
old_SubStockCode: res.data.subStockCode,
|
||||
twoSerialNumbers:res.data.twoSerialNumbers ? res.data.twoSerialNumbers: []
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user