Browse Source

修改采购上架只能上架同一个采购订单

dev_pda
李俊城 2 years ago
parent
commit
7bc799a181
  1. 43
      fe/PDA/pages/putaway/purchasePutaway.vue

43
fe/PDA/pages/putaway/purchasePutaway.vue

@ -11,7 +11,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="" style="font-size: 35rpx;margin-top: 10rpx;">
采购订单 : {{poNumber}}
</view> </view>
<view class="" style="background-color: black; width: 100%; margin-top:10rpx; height: 1rpx;">
</view>
</view>
<scroll-view scroll-y="true" class="scroll-Y" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" <scroll-view scroll-y="true" class="scroll-Y" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
style="padding-bottom:150px"> style="padding-bottom:150px">
@ -96,6 +103,7 @@
recommendErpLocationCode: '', recommendErpLocationCode: '',
currentLabel: null, currentLabel: null,
reScanItem: null, // reScanItem: null, //
poNumber: ""
}; };
}, },
props: { props: {
@ -149,6 +157,9 @@
}) })
this.itemList.splice(itemIndex, 1) this.itemList.splice(itemIndex, 1)
} }
if (this.itemList == 0) {
this.poNumber = ""
}
}, },
getScanResult(result) { getScanResult(result) {
@ -158,6 +169,17 @@
let itemInfo = that.itemList.find(r => { let itemInfo = that.itemList.find(r => {
return r.itemCode == result.data.itemCode return r.itemCode == result.data.itemCode
}) })
console.log("采购订单" + this.poNumber)
if (this.poNumber == "") {
this.poNumber = that.currentLabel.poNumber
} else {
if (this.poNumber != that.currentLabel.poNumber) {
this.showMessage("当前采购订单是号[" + this.poNumber + "]与扫描的箱码["+code+"]对应的采购订单号[" + that.currentLabel.poNumber + "]不一致")
return;
}
}
let params = JSON.stringify(that.currentLabel); let params = JSON.stringify(that.currentLabel);
console.log('采购上架', params); console.log('采购上架', params);
if (itemInfo == undefined) { if (itemInfo == undefined) {
@ -455,17 +477,18 @@
item.details.push(r); item.details.push(r);
}) })
}) })
console.log("采购订单" + this.poNumber)
let params = JSON.stringify(item); let params = JSON.stringify(item);
purchasePutaway(params) // purchasePutaway(params)
.then(res => { // .then(res => {
that.showCommitSuccess(); // that.showCommitSuccess();
that.clearInfo(); // that.clearInfo();
uni.hideLoading(); // uni.hideLoading();
}) // })
.catch(err => { // .catch(err => {
that.showMessage(err.message); // that.showMessage(err.message);
uni.hideLoading(); // uni.hideLoading();
}); // });
}, },
cancel() { cancel() {

Loading…
Cancel
Save