From 664df90a747e5a97b4e1131a5f958ded3176250c Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期四, 25 十二月 2025 11:23:35 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue | 62 ++++---------------------------
1 files changed, 8 insertions(+), 54 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
index 39cbe94..d401f8b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
@@ -266,7 +266,6 @@
this.resetData();
this.$nextTick(() => {
setTimeout(() => {
- this.fetchStockStatistics(); // 鍔犺浇缁熻鏁版嵁
this.fetchUnpalletMaterialDetails();
}, 300);
});
@@ -286,18 +285,12 @@
this.palletForm = { palletCode: '', barcode: '' };
this.backData = [];
this.$refs.palletForm?.reset();
- this.fetchStockStatistics(); // 鍗曟嵁鍙峰彉浜嗭紝鍒锋柊缁熻
this.fetchUnpalletMaterialDetails();
}
}
},
mounted() {
-
document.addEventListener('keypress', this.handleKeyPress);
-
- setTimeout(() => {
- this.focusLocationSelect();
- }, 300);
},
beforeDestroy() {
document.removeEventListener('keypress', this.handleKeyPress);
@@ -306,9 +299,10 @@
methods: {
open() {
this.show = true;
+ this.orderNo = "";
+ this.resetData();
this.initLocationTypes();
this.initwarehouseTypes();
- this.fetchStockStatistics();
this.fetchUnpalletMaterialDetails();
},
validateLocationType(rule, value, callback) {
@@ -324,7 +318,7 @@
// 鏍规嵁鏉$爜鍒楄〃鑾峰彇璇︾粏鏁版嵁
async fetchUnpalletMaterialDetails() {
try {
- const response = await http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo=' + this.docNo, {});
+ const response = await http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo=' + this.orderNo, {});
if (response.status && Array.isArray(response.data)) {
this.unpalletMaterials = response.data;
this.unpalletBarcodes = response.data.map(item => item.barcode || '');
@@ -361,9 +355,9 @@
}
},
- async fetchStockStatistics() {
+ async fetchStockStatistics(orderNo) {
// 鍗曟嵁鍙蜂负绌烘椂涓嶆煡璇�
- if (!this.docNo) {
+ if (!orderNo) {
this.sumError = '鍗曟嵁鍙蜂负绌猴紝鏃犳硶缁熻';
return;
}
@@ -371,7 +365,7 @@
this.sumLoading = true;
this.sumError = '';
try {
- const response = await http.post('/api/InboundOrder/UnPalletQuantity?orderNo=' + this.docNo, {});
+ const response = await http.post('/api/InboundOrder/UnPalletQuantity?orderNo=' + orderNo, {});
if (response.data) {
this.totalStockSum = response.data.stockSumQuantity || 0;
this.totalStockCount = response.data.stockCount || 0;
@@ -440,7 +434,6 @@
},
// 閲嶇疆鎵�鏈夋暟鎹�
resetData() {
- console.log('閲嶇疆寮规鏁版嵁');
this.trayBarcode = '';
this.barcode = '';
this.materials = [];
@@ -644,7 +637,6 @@
this.error = '';
this.loading = true;
- console.log(currentBarcode);
try {
// 璋冪敤API鏌ヨ鐗╂枡淇℃伅
const materialData = await this.fetchMaterialData(currentBarcode);
@@ -663,8 +655,8 @@
});
});
this.orderNo = materialData[0].orderNo;
-
- this.fetchStockStatistics();
+ await this.fetchStockStatistics(materialData[0].orderNo);
+ await this.fetchUnpalletMaterialDetails();
// 娓呯┖鐗╂枡杈撳叆妗嗗苟淇濇寔鑱氱劍
this.barcode = '';
this.scanCode = ''; // 娓呯┖鎵爜缂撳瓨
@@ -772,44 +764,6 @@
}, 100);
this.lastKeyTime = currentTime;
- },
-
- // 鍒犻櫎鐗╂枡
- removeMaterial(index) {
- this.$confirm('纭畾瑕佸垹闄よ繖鏉$墿鏂欒褰曞悧?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- this.materials.splice(index, 1);
- this.$message({
- type: 'success',
- message: '鍒犻櫎鎴愬姛!'
- });
- this.fetchStockStatistics();
-
- }).catch(() => {
- // 鍙栨秷鍒犻櫎
- });
- },
-
- // 娓呯┖鎵�鏈夌墿鏂�
- clearAllMaterials() {
- if (this.materials.length === 0) return;
-
- this.$confirm('纭畾瑕佹竻绌烘墍鏈夌墿鏂欒褰曞悧?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- this.materials = [];
- this.$message({
- type: 'success',
- message: '宸叉竻绌烘墍鏈夎褰�!'
- });
- }).catch(() => {
- // 鍙栨秷娓呯┖
- });
},
// 鏍煎紡鍖栨椂闂�
--
Gitblit v1.9.3