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

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

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