Commit edf2ad6f authored by 何远江's avatar 何远江

完工入库添加样品数量字段

parent 3f139983
......@@ -33,7 +33,7 @@
v-model="wxparams"
:focus="isFocus"
placeholder="请扫描产品包装条码/外箱码"
@confirm="handleConfirm"
@confirm="handleConfirm"
></uni-easyinput>
</view>
<view class="total">
......@@ -151,26 +151,26 @@ export default {
if (!this.goodsList.length) return;
let params = [];
// this.list.forEach((ele) => {
// item.push({
// AUFNR: ele.workorderNo,
// PLNR: ele.qrcode,
// MATNR: ele.sapItemCode,
// WERKS: this.vuex_user_factory,
// LGORT: this.LGORT,
// PACKNR: ele.qrcode,
// ZSIZE: ele.standardSize,
// ZINSTNUM: ele.clientCmd,
// BRGEW: ele.grossWeight,
// NTGEW: ele.netWeight,
// GEWEI: ele.unitOfMeasure,
// INSNAM: ele.checkBy,
// TOMNG: ele.totalQuantity,
// ZMNGO: ele.quantity,
// ZMNGL: ele.lossNum,
// NLPLA: ele.NLPLA,
// });
// });
// this.list.forEach((ele) => {
// item.push({
// AUFNR: ele.workorderNo,
// PLNR: ele.qrcode,
// MATNR: ele.sapItemCode,
// WERKS: this.vuex_user_factory,
// LGORT: this.LGORT,
// PACKNR: ele.qrcode,
// ZSIZE: ele.standardSize,
// ZINSTNUM: ele.clientCmd,
// BRGEW: ele.grossWeight,
// NTGEW: ele.netWeight,
// GEWEI: ele.unitOfMeasure,
// INSNAM: ele.checkBy,
// TOMNG: ele.totalQuantity,
// ZMNGO: ele.quantity,
// ZMNGL: ele.lossNum,
// NLPLA: ele.NLPLA,
// });
// });
const items = this.list.reduce(
(pre, cur) => {
pre.item.push({
......@@ -189,9 +189,11 @@ export default {
TOMNG: cur.totalQuantity,
ZMNGO: cur.quantity,
ZMNGL: cur.lossNum,
ZSAMNUM: cur.sampleNum,
NLPLA: cur.NLPLA,
ZCODE: cur.blQrcode
ZCODE: cur.blQrcode,
});
// 装箱信息
if (pre.zcode.findIndex((v) => v.ZCODE == cur.blQrcode) == -1) {
pre.zcode.push({
ZCODE: cur.blQrcode,
......@@ -294,7 +296,6 @@ export default {
return self.findIndex((t) => t.qrcode === item.qrcode) === index;
});
this.goodsList = this.goodsList.concat(result);
console.log(this.goodsList, "-goodsList");
this.reset();
} else {
this.reset();
......
......@@ -9,6 +9,7 @@
<view class="item">入库仓位:{{ item.NLPLA }}</view>
<view class="item">入库数量:{{ filterQuantity() }}</view>
<view class="item">loss数量:{{ filterLoss() }}</view>
<view class="item">样品数量:{{ filterSampleNum() }}</view>
</view>
<u-button size="mini" type="primary" plain @click="deleGonds(idx)">
<u-icon name="trash" size="28"></u-icon>
......@@ -34,6 +35,7 @@
<view class="items">尺码:{{ ele.standardSize }}</view>
<view class="items">数量:{{ ele.quantity }}</view>
<view class="items">loss数量:{{ ele.lossNum }}</view>
<view class="items">样品数量:{{ ele.sampleNum }}</view>
</view>
</view>
</view>
......@@ -87,6 +89,9 @@ export default {
},
filterLoss() {
return this.list.filter(v => v.qrcode == this.item.qrcode).reduce((acc, cur) => acc + cur.lossNum, 0)
},
filterSampleNum() {
return this.list.filter(v => v.qrcode == this.item.qrcode).reduce((acc, cur) => acc + cur.sampleNum, 0)
}
}
};
......
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