From 3267c9dd4f7421debefd588177343e74a7a003be Mon Sep 17 00:00:00 2001
From: Niext <85552560@qq.com>
Date: Thu, 30 May 2024 21:14:37 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD=E9=80=80?=
=?UTF-8?q?=E8=B4=A7=E7=94=B3=E8=AF=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../scan/winScanPackAndLocation.vue | 46 +++---
src/pages/purchaseReturn/job/returnDetail.vue | 148 ++++++++++--------
2 files changed, 110 insertions(+), 84 deletions(-)
diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue
index 8996b173..6c6b5275 100644
--- a/src/mycomponents/scan/winScanPackAndLocation.vue
+++ b/src/mycomponents/scan/winScanPackAndLocation.vue
@@ -88,7 +88,7 @@
type: Boolean,
default: false
},
- //不提示库存
+ //不提示库存错误
noShowBalanceMessage: {
type: Boolean,
default: false
@@ -102,6 +102,10 @@
type: String,
default: "HPQ,HMQ"
},
+ queryBalance: {
+ type: Boolean,
+ default: true
+ }
},
data() {
return {
@@ -246,23 +250,27 @@
checkPackage(result) {
if (result.label != null) {
this.scanResult = result;
- // uni.showLoading({
- // title: '查询中...',
- // mask: true
- // })
- getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
- res => {
- uni.hideLoading();
- if (res.success) {
- this.managementPrecision = res.managementPrecision
- this.afterQueryBalance(res.data.list);
- } else {
- this.showErrorMessage(res.message, res => {
- this.packGetFocus();
- })
- }
- // uni.hideLoading();
- });
+ if (this.queryBalance == true) {
+ // uni.showLoading({
+ // title: '查询中...',
+ // mask: true
+ // })
+ getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
+ res => {
+ uni.hideLoading();
+ if (res.success) {
+ this.managementPrecision = res.managementPrecision
+ this.afterQueryBalance(res.data.list);
+ } else {
+ this.showErrorMessage(res.message, res => {
+ this.packGetFocus();
+ })
+ }
+ // uni.hideLoading();
+ });
+ } else {
+ this.packCallBack(null);
+ }
}
},
@@ -448,4 +456,4 @@
height: auto;
max-height: 300rpx;
}
-
\ No newline at end of file
+
diff --git a/src/pages/purchaseReturn/job/returnDetail.vue b/src/pages/purchaseReturn/job/returnDetail.vue
index f982cf88..501f1126 100644
--- a/src/pages/purchaseReturn/job/returnDetail.vue
+++ b/src/pages/purchaseReturn/job/returnDetail.vue
@@ -35,7 +35,7 @@
-
+
@@ -225,6 +225,7 @@
getScanResult(result) {
try {
+ debugger;
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
@@ -240,77 +241,94 @@
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode
})
- let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
+ // let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
//不存在提示
if (itemDetail == undefined) {
this.showErrorMessage("箱码【" + packingNumber + "】
批次【" + batch + "】
库位【" + result
- .fromLocationCode + "】
状态【" + balanceStatus + "】
未找到记录")
+ .fromLocationCode + "】
未找到明细")
return;
} else {
- itemDetail = detail.subList.find(r => {
- return r.packingNumber == packingNumber &&
- r.batch == batch &&
- r.fromLocationCode == result.fromLocationCode &&
- r.inventoryStatus == result.balance.inventoryStatus
- })
- //箱码、批次、库位、状态不一致
- if (itemDetail == undefined) {
- itemDetail = detail.subList.find(r => {
- return r.packingNumber == packingNumber &&
- r.batch == batch &&
- r.fromLocationCode == result.fromLocationCode
- })
- if (itemDetail.scaned) {
- this.showErrorMessage("箱码【" + packingNumber + "】
批次【" + batch + "】
库位【" + result
- .fromLocationCode + "】
状态【" + balanceStatus + "】
已经扫描")
- return;
- }
-
- let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
- if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
- this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
- ']不一致,是否继续退货?', res => {
- if (res) {
- itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.balance.qty);
- itemDetail.toInventoryStatus = result.balance.inventoryStatus;
- itemDetail.inventoryStatus =result.balance.inventoryStatus;
- itemDetail.balance = result.balance;
- itemDetail.balance.balanceQty = result.balance.qty;
- itemDetail.balance.packQty = result.package.packQty
- itemDetail.balance.packUnit = result.package.packUnit
- this.calcHandleQty();
- } else {
- this.scanPopupGetFocus();
- }
- });
- } else {
- this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
- itemStatus +
- ']不一致,不允许转移!', res => {
- this.scanPopupGetFocus();
- });
- }
-
-
+ if (itemDetail.scaned) {
+ this.showErrorMessage("箱码【" + packingNumber + "】
批次【" + batch + "】
库位【" + result
+ .fromLocationCode + "】已经扫描")
+ return;
} else {
- // 箱码、批次、库位、状态一致
- if (itemDetail.scaned) {
- this.showErrorMessage("箱码【" + packingNumber + "】
批次【" + batch + "】
库位【" + result
- .fromLocationCode + "】
状态【" + balanceStatus + "】
已经扫描")
- return;
- } else {
- itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.balance.qty);
- itemDetail.toInventoryStatus = result.balance.inventoryStatus;
- itemDetail.inventoryStatus =result.balance.inventoryStatus;
- itemDetail.balance = result.balance;
- itemDetail.balance.balanceQty = Number(result.balance.qty);
- itemDetail.balance.packQty = Number(result.package.packQty)
- itemDetail.balance.packUnit = result.package.packUnit
- this.calcHandleQty();
- }
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.label.qty);
+
+ itemDetail.toInventoryStatus = itemDetail.inventoryStatus;
+
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = Number(result.balance.qty);
+ // itemDetail.balance.packQty = Number(result.package.packQty)
+ // itemDetail.balance.packUnit = result.package.packUnit
+ // itemDetail.toInventoryStatus = result.balance.inventoryStatus;
+ // itemDetail.inventoryStatus =result.balance.inventoryStatus;
+ // itemDetail.toInventoryStatus = result.balance.inventoryStatus;
+ // itemDetail.inventoryStatus =result.balance.inventoryStatus;
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = Number(result.balance.qty);
+ // itemDetail.balance.packQty = Number(result.package.packQty)
+ // itemDetail.balance.packUnit = result.package.packUnit
+ this.calcHandleQty();
}
+
+
+ // if (itemDetail == undefined) {
+ // itemDetail = detail.subList.find(r => {
+ // return r.packingNumber == packingNumber &&
+ // r.batch == batch &&
+ // r.fromLocationCode == result.fromLocationCode
+ // })
+ // if (itemDetail.scaned) {
+ // this.showErrorMessage("箱码【" + packingNumber + "】
批次【" + batch + "】
库位【" + result
+ // .fromLocationCode + "】
状态【" + balanceStatus + "】
已经扫描")
+ // return;
+ // }
+
+ // let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
+ // if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
+ // this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
+ // ']不一致,是否继续退货?', res => {
+ // if (res) {
+ // itemDetail.scaned = true;
+ // itemDetail.handleQty = Number(result.balance.qty);
+ // itemDetail.toInventoryStatus = result.balance.inventoryStatus;
+ // itemDetail.inventoryStatus =result.balance.inventoryStatus;
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = result.balance.qty;
+ // itemDetail.balance.packQty = result.package.packQty
+ // itemDetail.balance.packUnit = result.package.packUnit
+ // this.calcHandleQty();
+ // } else {
+ // this.scanPopupGetFocus();
+ // }
+ // });
+ // } else {
+ // this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
+ // itemStatus +
+ // ']不一致,不允许转移!', res => {
+ // this.scanPopupGetFocus();
+ // });
+ // }
+ // } else {
+ // // 箱码、批次、库位、状态一致
+ // if (itemDetail.scaned) {
+ // this.showErrorMessage("箱码【" + packingNumber + "】
批次【" + batch + "】
库位【" + result
+ // .fromLocationCode + "】
状态【" + balanceStatus + "】
已经扫描")
+ // return;
+ // } else {
+ // itemDetail.scaned = true;
+ // itemDetail.handleQty = Number(result.balance.qty);
+ // itemDetail.toInventoryStatus = result.balance.inventoryStatus;
+ // itemDetail.inventoryStatus =result.balance.inventoryStatus;
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = Number(result.balance.qty);
+ // itemDetail.balance.packQty = Number(result.package.packQty)
+ // itemDetail.balance.packUnit = result.package.packUnit
+ // this.calcHandleQty();
+ // }
+ // }
}