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

bug 修改

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