Commit 03ce9a00 authored by 何远江's avatar 何远江

bug 修改

parent 2c8d2b61
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
wxparams: "", wxparams: "",
goodsList: [], goodsList: [],
orderItem: {}, orderItem: {},
catchPLs: [],
resFlag: false, resFlag: false,
}; };
}, },
...@@ -193,6 +194,8 @@ export default { ...@@ -193,6 +194,8 @@ export default {
}; };
this.$u.api.sapApi.sapBlpl(params, 300).then((res) => { this.$u.api.sapApi.sapBlpl(params, 300).then((res) => {
if (res && res.MSG[0].TYPE === "S") { if (res && res.MSG[0].TYPE === "S") {
// 缓存PL
this.catchPLs.push(plnr);
// 循环BLPL合并相同的物料号和size // 循环BLPL合并相同的物料号和size
res.BLPL.forEach((ele) => { res.BLPL.forEach((ele) => {
ele.TOMNG = ele.PACMG; ele.TOMNG = ele.PACMG;
...@@ -242,6 +245,9 @@ export default { ...@@ -242,6 +245,9 @@ export default {
handleInputNlpla(e) {}, handleInputNlpla(e) {},
handleInputPlnr(e) { handleInputPlnr(e) {
this.isFocus = false; this.isFocus = false;
if (this.catchPLs.includes(e)) {
return this.$u.toast("请勿重复扫描该条码!");
}
e && this.getPlnr(e); e && this.getPlnr(e);
}, },
}, },
......
...@@ -105,6 +105,7 @@ export default { ...@@ -105,6 +105,7 @@ export default {
if (option && option.order) { if (option && option.order) {
const arr = [...JSON.parse(option.order)]; const arr = [...JSON.parse(option.order)];
console.log(arr, "------"); console.log(arr, "------");
// 有SIZE行就取ZINSNUM+ZLOSSC,没有SIZE行的就是取交货单行的LFIMG
arr.forEach((ele) => { arr.forEach((ele) => {
if (ele.ZSIZE.length) { if (ele.ZSIZE.length) {
this.goodsList.push( this.goodsList.push(
...@@ -118,11 +119,13 @@ export default { ...@@ -118,11 +119,13 @@ export default {
...item, ...item,
MATNR: ele.MATNR, MATNR: ele.MATNR,
MAKTX: ele.MAKTX, MAKTX: ele.MAKTX,
sumNum: ZINSNUM+ZLOSSC
}; };
}) })
); );
} else { } else {
ele.ZSIZE = ""; ele.ZSIZE = "";
ele.sumNum = ele.LFIMG;
// ele.ZINSNUM = ele.LFIMG; // ele.ZINSNUM = ele.LFIMG;
this.goodsList.push(ele); this.goodsList.push(ele);
this.$u.toast(`物料编号:${ele.MATNR}--没有尺码信息`); this.$u.toast(`物料编号:${ele.MATNR}--没有尺码信息`);
...@@ -147,7 +150,7 @@ export default { ...@@ -147,7 +150,7 @@ export default {
} }
const flag = this.goodsList.every((ele) => { const flag = this.goodsList.every((ele) => {
return ( return (
ele.LFIMG == ele?.ZPLDT?.reduce((acc, cur) => acc + cur.PACMG, 0) ele.sumNum == ele?.ZPLDT?.reduce((acc, cur) => acc + cur.PACMG, 0)
); );
}); });
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="item">物料编号:{{ item.MATNR }}</view> <view class="item">物料编号:{{ item.MATNR }}</view>
<view class="item">物料描述:{{ item.MAKTX }}</view> <view class="item">物料描述:{{ item.MAKTX }}</view>
<view class="item">尺码:{{ item.ZSIZE }}</view> <view class="item">尺码:{{ item.ZSIZE }}</view>
<view class="item">数量:{{ handleNum() }}/{{ item.LFIMG }}</view> <view class="item">数量:{{ handleNum() }}/{{ item.sumNum }}</view>
</view> </view>
<view class="right"> <view class="right">
<!-- <checkbox-group class="checkedBox"> <!-- <checkbox-group class="checkedBox">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment