diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js
index 88b1a63c3..be8653094 100644
--- a/fe/PDA/api/index.js
+++ b/fe/PDA/api/index.js
@@ -1190,6 +1190,15 @@ export const purchasePutaway = (params) => request(
method: "post"
});
+//采购上架 ,通过采购订单号获取详细
+
+export const getPurchasePutawayAsyncDetail = (poNumber) => promise(
+ devUrl + "/api/pda/store/purchase-receipt/get-packing-by-purchase-recepit-note?poNumber="+poNumber, { //
+ data: {},
+ method: "post"
+ });
+
+
//半成品上架
export const semiPutaway = (params) => request(
devUrl + "/api/pda/note/put-away/by-semi", { //
diff --git a/fe/PDA/mycomponents/common/comList.vue b/fe/PDA/mycomponents/common/comList.vue
new file mode 100644
index 000000000..720a79de5
--- /dev/null
+++ b/fe/PDA/mycomponents/common/comList.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+ 采购订单: {{poNumber}}
+
+
+
+ ({{index+1}})箱码 : {{item}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fe/PDA/pages/putaway/purchasePutaway.vue b/fe/PDA/pages/putaway/purchasePutaway.vue
index 49a3893e0..079c3e0b2 100644
--- a/fe/PDA/pages/putaway/purchasePutaway.vue
+++ b/fe/PDA/pages/putaway/purchasePutaway.vue
@@ -11,10 +11,18 @@
-
- 采购订单 : {{poNumber}}
+
+
+ 采购订单 : {{poNumber}}
+
+
+ 查看箱码
+
+
-
+
@@ -54,6 +62,7 @@
+
@@ -66,6 +75,7 @@
getBalancesByFilterAsync,
getPurchaseDetailAsync,
purchasePutaway,
+ getPurchasePutawayAsyncDetail
} from '@/api/index.js';
import {
@@ -80,6 +90,7 @@
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
+ import comList from '@/mycomponents/common/comList.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import comCollapseItem from '@/mycomponents/common/comCollapseItem.vue'
@@ -93,7 +104,8 @@
winScanByPack,
comBalance,
winCollapseLocation,
- comCollapseItem
+ comCollapseItem,
+ comList
},
data() {
return {
@@ -103,7 +115,8 @@
recommendErpLocationCode: '',
currentLabel: null,
reScanItem: null, //重复的箱码
- poNumber: ""
+ poNumber: "",
+ showPopList: []
};
},
props: {
@@ -159,6 +172,7 @@
}
if (this.itemList == 0) {
this.poNumber = ""
+ this.showPopList = []
}
},
@@ -166,49 +180,26 @@
let that = this;
that.currentLabel = result.data;
let code = result.data.packingCode;
- let itemInfo = that.itemList.find(r => {
+
+ let itemInfo = this.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) {
- that.getBalance();
+ this.getBalance();
} else {
let data = itemInfo.labelList.find(r => {
return r.packingCode == code
})
if (data == undefined) {
- that.getBalance();
+ this.getBalance();
} else {
this.reScanItem = itemInfo;
this.showRescanMessage('箱码【' + code + '】已经存在,是否要重新扫描?');
- // showConfirmMsg('箱码【' + code + '】已经存在,是否要重新扫描?', confirm => {
- // if (confirm) {
- // itemInfo.labelList.forEach((r, i) => {
- // if (r.packingCode == code) {
- // itemInfo.labelList.splice(i, 1);
- // return;
- // }
- // });
- // that.getBalance();
- // } else {
- // this.scanPopupGetFocus();
- // }
- // });
}
}
+
},
+
//重新扫描
afterRescan(val) {
let that = this;
@@ -265,14 +256,50 @@
let locationErpCode = purchaseDetail.recommendErpCode;
if (this.itemList.length == 0) {
this.recommendErpLocationCode = locationErpCode;
- this.createItem(balanceItem, purchaseDetail);
+ this.checkData(balanceItem, purchaseDetail)
} else {
if (this.recommendErpLocationCode != locationErpCode) {
this.showScanMessage('当前零件的ERP储位是【' + locationErpCode + '】与【' + this
.recommendErpLocationCode +
'】不是同一ERP储位,请重新扫描');
} else {
- this.createItem(balanceItem, purchaseDetail);
+ this.checkData(balanceItem, purchaseDetail)
+ }
+ }
+ },
+ checkData(balanceItem, purchaseDetail) {
+ var that = this;
+ var poNumber = purchaseDetail.poNumber;
+ var packingCode = purchaseDetail.packingCode
+ if (that.poNumber == "" && that.showPopList.length == 0) {
+ uni.showLoading({
+ title: "获取采购订单箱码...",
+ mask: true
+ });
+ getPurchasePutawayAsyncDetail(poNumber).then(res => {
+ uni.hideLoading()
+ if (res.length > 0) {
+ that.poNumber = poNumber
+ that.showPopList = res;
+ that.createItem(balanceItem, purchaseDetail);
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ that.poNumber = "";
+ that.showPopList = [];
+ that.showMessage(err.message);
+ })
+
+ } else {
+ let item = that.showPopList.find(r => {
+ return r == packingCode
+ })
+ if (item == undefined) {
+ //提示不在采购订单中
+ that.showMessage("扫描的箱码[" + packingCode + "]不在当前采购订单[" + this.poNumber + "]中");
+ return
+ } else {
+ that.createItem(balanceItem, purchaseDetail);
}
}
},
@@ -445,6 +472,10 @@
this.location = null;
},
+ showPopListPopup() {
+ this.$refs.comList.openPopup(this.showPopList, this.poNumber);
+ },
+
submit() {
let that = this;
if (that.itemList.length === 0) {
@@ -477,18 +508,17 @@
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() {
@@ -505,6 +535,8 @@
that.itemList = [];
that.location = null;
that.recommendErpLocationCode = '';
+ that.poNumber = "";
+ that.showPopList = [];
},
clearPackCode() {