From e0a1c1f6925a70f377abc855659b527e18454e95 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期五, 12 十二月 2025 13:56:13 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 111 insertions(+), 1 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 290038c..61170fd 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"
@@ -103,6 +103,32 @@
<el-alert :title="error" type="error" show-icon closable @close="error = ''" />
</div>
+ <!-- 鏈粍鐩樺垪琛� -->
+ <div class="unpallet-section compact">
+ <el-card shadow="hover" class="compact-card unpallet-card">
+ <div slot="header" class="compact-header">
+ <span><i class="el-icon-tickets"></i> 鏈粍鐩樻潯鐮�</span>
+ <span class="list-actions">
+ <el-tag type="primary" size="small">鏈粍鐩� {{ totalStockCount }}</el-tag>
+ </span>
+ </div>
+
+
+ <div class="table-container">
+ <el-table :data="unpalletMaterials" stripe style="width: 100%" height="100%" size="small" v-loading="unpalletBarcodesLoading">
+ <el-table-column type="index" label="搴忓彿" width="60" align="center"></el-table-column>
+ <el-table-column prop="barcode" label="鏉$爜" min-width="140" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" min-width="150" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="batchNo" label="鎵规" min-width="150" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="orderQuantity" label="鏁伴噺" min-width="130" align="right"></el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅" width="80" align="center"></el-table-column>
+ <el-table-column prop="supplyCode" label="渚涘簲鍟�" min-width="130" show-overflow-tooltip></el-table-column>
+ </el-table>
+ </div>
+ </el-card>
+
+ </div>
+
<!-- 鐗╂枡鍒楄〃 - 鍥哄畾楂樺害甯︽粴鍔ㄦ潯 -->
<div class="material-list compact">
<el-card shadow="hover" class="compact-card">
@@ -110,7 +136,6 @@
<span><i class="el-icon-tickets"></i> 缁勭洏鏁版嵁</span>
<span class="list-actions">
<el-tag type="primary" size="small">鍏� {{ materials.length }} 鏉�</el-tag>
- <el-tag type="primary" size="small">鏈粍鐩� {{ totalStockCount }}</el-tag>
<el-tag type="primary" size="small">鏈叆搴撴暟閲� {{ totalStockSum }}{{ uniqueUnit }}</el-tag>
<el-tag v-if="trayBarcode" type="success" size="small">鎵樼洏: {{ trayBarcode }}</el-tag>
<el-tag v-if="form.warehouseType" type="info" size="small">浠撳簱: {{ currentWarehouseName }}</el-tag>
@@ -177,6 +202,10 @@
error: '',
debugMode: false,
currentFocus: 'warehouse',
+
+ unpalletBarcodes:[],
+ unpalletBarcodesLoading: false,
+ unpalletMaterials: [], // 鏈粍鐩樿缁嗘暟鎹垪琛�
// 鎵爜鏋浉鍏冲彉閲�
scanCode: '',
@@ -257,6 +286,7 @@
this.initwarehouseTypes(); // 鍒濆鍖栦粨搴�
this.initLocationTypes(); // 鍒濆鍖栦粨搴撳尯鍩�
this.fetchStockStatistics(); // 鍔犺浇缁熻鏁版嵁
+ this.fetchUnpalletMaterialDetails();
}, 300);
});
}
@@ -276,6 +306,7 @@
this.backData = [];
this.$refs.palletForm?.reset();
this.fetchStockStatistics(); // 鍗曟嵁鍙峰彉浜嗭紝鍒锋柊缁熻
+ this.fetchUnpalletMaterialDetails();
}
}
},
@@ -316,6 +347,43 @@
callback(new Error('璇烽�夋嫨浠撳簱鍖哄煙'));
} else {
callback();
+ }
+ },
+
+ // 鏍规嵁鏉$爜鍒楄〃鑾峰彇璇︾粏鏁版嵁
+ async fetchUnpalletMaterialDetails() {
+ try {
+ // 灏濊瘯璋冪敤鎺ュ彛鑾峰彇璇︾粏鏁版嵁
+ // 娉ㄦ剰锛氬鏋滆繖涓帴鍙d笉瀛樺湪锛屽彲浠ユ敞閲婃帀鎴栨牴鎹疄闄匒PI璋冩暣
+ const response = await http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo='+this.docNo, {
+
+ });
+
+ console.log('鏈粍鐩樻暟鎹�:', response.data);
+
+
+ if (response.status && Array.isArray(response.data)) {
+ this.unpalletMaterials = response.data;
+ this.unpalletBarcodes = response.data.map(item => item.barcode || '');
+ this.totalStockCount = response.data.length;
+ } else {
+ // 濡傛灉鎺ュ彛杩斿洖鏍煎紡涓嶅悓锛屽皾璇曞叾浠栨柟寮�
+ // 濡傛灉鎺ュ彛涓嶅瓨鍦紝杩欓噷浼氳繘鍏atch锛岃缃负绌烘暟缁�
+ this.unpalletMaterials = [];
+ }
+ } catch (err) {
+ console.warn('鑾峰彇鏈粍鐩樿缁嗘暟鎹帴鍙e彲鑳戒笉瀛樺湪锛屼娇鐢ㄦ潯鐮佸垪琛ㄦ樉绀猴細', err);
+ // 濡傛灉鎺ュ彛涓嶅瓨鍦紝灏嗘潯鐮佸垪琛ㄨ浆鎹负绠�鍗曠殑鏄剧ず鏍煎紡
+ // 鎴栬�呬繚鎸佷负绌猴紝璁╃敤鎴风煡閬撻渶瑕侀�夋嫨浠撳簱鍜屽尯鍩熸潵鏌ョ湅璇︾粏鏁版嵁
+ this.unpalletMaterials = this.unpalletBarcodes.map(barcode => ({
+ barcode: barcode,
+ materielCode: '-',
+ batchNo: '-',
+ stockQuantity: '-',
+ unit: '-',
+ supplyCode: '-',
+ warehouseType: '-'
+ }));
}
},
/**
@@ -399,6 +467,7 @@
console.log('浠撳簱鍖哄煙楠岃瘉閫氳繃:', value);
// 鍖哄煙閫夋嫨鍚庯紝鑷姩鑱氱劍鍒版墭鐩樿緭鍏ユ
this.focusLocationSelect();
+ // 鍒锋柊鏈粍鐩樻暟鎹紙鏍规嵁閫夋嫨鐨勪粨搴撳拰鍖哄煙杩囨护锛�
}
});
}, 100);
@@ -555,6 +624,8 @@
this.trayBarcode = '';
this.barcode = '';
this.materials = [];
+ this.unpalletBarcodes = [];
+ this.unpalletMaterials = [];
this.loading = false;
this.error = '';
this.scanCode = '';
@@ -814,6 +885,13 @@
});
});
+ const removeIndex = this.unpalletMaterials.findIndex(item => item.barcode === currentBarcode);
+ if (removeIndex > -1) {
+ this.unpalletMaterials.splice(removeIndex, 1); // 鍒犻櫎鏈粍鐩樺搴旀暟鎹�
+ this.unpalletBarcodes = this.unpalletMaterials.map(item => item.barcode || ''); // 鏇存柊鏉$爜鏁扮粍
+ this.totalStockCount = Math.max(0, this.totalStockCount - 1);
+ }
+
this.$message({
message: `鎴愬姛娣诲姞鏉$爜: ${currentBarcode}`,
type: 'success',
@@ -1297,5 +1375,37 @@
border: 1px solid #DCDFE6;
border-radius: 4px;
}
+
+ .unpallet-section.compact {
+ margin-bottom: 8px;
+ flex-shrink: 0;
+}
+
+.unpallet-card {
+ flex-shrink: 0;
+}
+
+.unpallet-barcode-list {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+ padding: 8px 0;
+ max-height: 180px;
+ overflow-y: auto;
+}
+
+.unpallet-barcode-list>>>.el-tag {
+ cursor: pointer;
+ max-width: calc(33.333% - 4px);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+@media (max-width: 768px) {
+ .unpallet-barcode-list>>>.el-tag {
+ max-width: calc(50% - 4px);
+ }
+}
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3