From ab04fa4f28385976fbffde3e98ace01767f6dfca Mon Sep 17 00:00:00 2001
From: niexiting <85552560@qq.com>
Date: Tue, 19 Dec 2023 10:54:11 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E6=A0=BC=E9=80=80?=
=?UTF-8?q?=E6=96=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/productionReturn/job/returnDetail.vue | 130 ++++++++++++--------
static/config.json | 2 +-
2 files changed, 78 insertions(+), 54 deletions(-)
diff --git a/pages/productionReturn/job/returnDetail.vue b/pages/productionReturn/job/returnDetail.vue
index 31c07865..ac488a07 100644
--- a/pages/productionReturn/job/returnDetail.vue
+++ b/pages/productionReturn/job/returnDetail.vue
@@ -9,6 +9,7 @@
+
@@ -23,7 +24,6 @@
-
@@ -81,13 +82,15 @@
import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
-
+ import winScanPack from '@/mycomponents/scan/winScanPack.vue'
+
export default {
name: 'receipt_detail',
components: {
winScanButton,
requiredLocation,
- winScanPackAndLocation,
+ // winScanPackAndLocation,
+ winScanPack,
comDetailCard,
detailInfoPopup,
comMessage,
@@ -228,25 +231,28 @@
},
openScanPopup() {
- let fromlocationCode = '';
- let fromlocationList = [];
- for (var i = 0; i < this.detailSource.length; i++) {
- let item = this.detailSource[i];
- item.subList.forEach(l => {
- //重复的库位不往里面插入
- var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
- if (location.length == 0) {
- fromlocationList.push(l.fromLocationCode);
- }
- //来源库位赋默认值
- if (fromlocationCode == '') {
- if (!l.scaned) {
- fromlocationCode = l.fromLocationCode;
- }
- }
- })
- }
- this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
+ this.$refs.scanPopup.openScanPopup();
+ // let fromlocationCode = '';
+ // let fromlocationList = [];
+ // for (var i = 0; i < this.detailSource.length; i++) {
+ // let item = this.detailSource[i];
+ // item.subList.forEach(l => {
+ // //重复的库位不往里面插入
+ // var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
+ // if (location.length == 0) {
+ // fromlocationList.push(l.fromLocationCode);
+ // }
+ // //来源库位赋默认值
+ // if (fromlocationCode == '') {
+ // if (!l.scaned) {
+ // fromlocationCode = l.fromLocationCode;
+ // }
+ // }
+ // })
+ // }
+ // this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
+
+
},
@@ -270,32 +276,40 @@
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else {
- let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
- let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
- if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
- this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
- ']不一致,是否继续上架?', res => {
- if (res) {
- itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.balance.qty)
- itemDetail.balance = result.balance;
- itemDetail.balance.balanceQty = result.balance.qty;
- itemDetail.balance.stdPackQty = result.package.stdPackQty
- itemDetail.balance.stdPackUnit = result.package.stdPackUnit
- this.calcHandleQty();
- } else {
- this.scanPopupGetFocus();
- }
- });
- } else {
- itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.balance.qty)
- itemDetail.balance = result.balance;
- itemDetail.balance.balanceQty = result.balance.qty;
- itemDetail.balance.stdPackQty = result.package.stdPackQty
- itemDetail.balance.stdPackUnit = result.package.stdPackUnit
- this.calcHandleQty();
- }
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.package.qty)
+ itemDetail.stdPackQty = result.package.stdPackQty
+ itemDetail.stdPackUnit = result.package.stdPackUnit
+ this.calcHandleQty();
+
+
+ //合格退料时不能查库存余额,因为生产退料时新生成的批次是000000 --nxt
+ // let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
+ // let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
+ // if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
+ // this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
+ // ']不一致,是否继续上架?', res => {
+ // if (res) {
+ // itemDetail.scaned = true;
+ // itemDetail.handleQty = Number(result.balance.qty)
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = result.balance.qty;
+ // itemDetail.balance.stdPackQty = result.package.stdPackQty
+ // itemDetail.balance.stdPackUnit = result.package.stdPackUnit
+ // this.calcHandleQty();
+ // } else {
+ // this.scanPopupGetFocus();
+ // }
+ // });
+ // } else {
+ // itemDetail.scaned = true;
+ // itemDetail.handleQty = Number(result.balance.qty)
+ // itemDetail.balance = result.balance;
+ // itemDetail.balance.balanceQty = result.balance.qty;
+ // itemDetail.balance.stdPackQty = result.package.stdPackQty
+ // itemDetail.balance.stdPackUnit = result.package.stdPackUnit
+ // this.calcHandleQty();
+ // }
}
}
}
@@ -346,7 +360,7 @@
}
},
- submitJob() {
+ submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@@ -397,7 +411,7 @@
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch;
-
+
detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
@@ -451,14 +465,24 @@
this.$refs.scanPopup.closeScanPopup();
},
+ // scanPopupGetFocus() {
+ // this.$refs.scanPopup.getFocus();
+ // },
+
+ // scanPopupLoseFocus() {
+ // this.$refs.scanPopup.loseFocus();
+ // },
+
scanPopupGetFocus() {
- this.$refs.scanPopup.packGetFocus();
+ this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus() {
- this.$refs.scanPopup.packLoseFocus();
+ this.$refs.scanPopup.losefocus();
},
+
+
showQuestionMessage(message, callback) {
setTimeout(r => {
this.scanPopupLoseFocus();
diff --git a/static/config.json b/static/config.json
index faa8486d..66093d32 100644
--- a/static/config.json
+++ b/static/config.json
@@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
- "value": "http://192.168.0.159:12080/admin-api",
+ "value": "http://192.168.0.230:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chenfang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",