Browse Source

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

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

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

@ -11,7 +11,14 @@
</view>
</view>
</view>
<view class="" style="font-size: 35rpx;margin-top: 10rpx;">
采购订单 : {{poNumber}}
</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"
style="padding-bottom:150px">
@ -96,6 +103,7 @@
recommendErpLocationCode: '',
currentLabel: null,
reScanItem: null, //
poNumber: ""
};
},
props: {
@ -108,7 +116,7 @@
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
} else if (e.index === 1) {
window.location.reload();
}
},
@ -149,6 +157,9 @@
})
this.itemList.splice(itemIndex, 1)
}
if (this.itemList == 0) {
this.poNumber = ""
}
},
getScanResult(result) {
@ -158,6 +169,17 @@
let itemInfo = that.itemList.find(r => {
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);
console.log('采购上架', params);
if (itemInfo == undefined) {
@ -441,7 +463,7 @@
let item = {
number: "",
worker: localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN,
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
jobNumber: "",
details: []
}
@ -455,17 +477,18 @@
item.details.push(r);
})
})
console.log("采购订单" + this.poNumber)
let params = JSON.stringify(item);
purchasePutaway(params)
.then(res => {
that.showCommitSuccess();
that.clearInfo();
uni.hideLoading();
})
.catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
// purchasePutaway(params)
// .then(res => {
// that.showCommitSuccess();
// that.clearInfo();
// uni.hideLoading();
// })
// .catch(err => {
// that.showMessage(err.message);
// uni.hideLoading();
// });
},
cancel() {

Loading…
Cancel
Save