From c17d401cd7aa87f9c1adc25733a74da6a8a210e7 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期四, 19 三月 2026 17:00:13 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue | 77 +++++++++++++++++++++++++++++++++-----
1 files changed, 66 insertions(+), 11 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
index 49b205f..2ce2088 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
@@ -214,6 +214,19 @@
<el-table-column prop="createDate" label="鎷i�夋椂闂�" width="160" />
<el-table-column prop="originalBarcode" label="鍘熺墿鏂欑爜" width="160" />
<el-table-column prop="newBarcode" label="鏂扮墿鏂欑爜" width="160" />
+ <el-table-column label="鎿嶄綔" width="100" align="center">
+ <template #default="scope">
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-refresh-left"
+ @click="handleReversePicking(scope.row)"
+ :disabled="reverseLoading"
+ >
+ 鎾ら攢
+ </el-button>
+ </template>
+ </el-table-column>
</el-table>
<div class="table-footer">
@@ -376,7 +389,8 @@
loadingInstance: null,
// 闊抽瀹炰緥锛堢紦瀛橈紝閬垮厤閲嶅鍒涘缓锛�
successAudio: null,
- errorAudio: null
+ errorAudio: null,
+ reverseLoading: false
}
},
computed: {
@@ -412,7 +426,6 @@
}
},
- // ============== 鏂板锛氭牴鎹墭鐩樺彿鑾峰彇璁㈠崟鍙凤紙鏍稿績鍔熻兘锛� ==============
async getOrderNoByPallet(palletCode) {
if (!palletCode) {
this.$message.warning('鎵樼洏鍙蜂笉鑳戒负绌�');
@@ -457,7 +470,7 @@
this.hideFullScreenLoading();
}
},
- // ============== 鏂板缁撴潫 ==============
+
// 鎾斁鎴愬姛闊抽
playSuccessAudio() {
@@ -485,14 +498,7 @@
initPage() {
// 浠庤矾鐢卞弬鏁拌幏鍙栬鍗曞彿
this.orderNo = this.$route.query.orderNo || ''
- // ============== 寰皟锛氭敞閲婂己鍒惰繑鍥為�昏緫锛屽吋瀹规墭鐩樺彿鏌ヨ鍗曞彿 ==============
- // if (!this.orderNo) {
- // this.$message.error('璁㈠崟鍙蜂笉鑳戒负绌�')
- // this.$router.back()
- // return
- // }
- // ============== 寰皟缁撴潫 ==============
-
+
// 鍔犺浇璁㈠崟淇℃伅
this.loadOrderInfo()
@@ -694,6 +700,55 @@
});
},
+ async handleReversePicking(row) {
+ // 1. 浜屾纭
+ try {
+ await this.$confirm(
+ '纭畾瑕佹挙閿�杩欐潯鎷i�夎褰曞悧锛熸挙閿�鍚庡簱瀛樺皢鎭㈠锛屽嚭搴撳崟鐘舵�佷篃浼氬悓姝ユ洿鏂�',
+ '鎾ら攢纭',
+ {
+ type: 'warning',
+ confirmButtonText: '纭鎾ら攢',
+ cancelButtonText: '鍙栨秷',
+ closeOnClickModal: false
+ }
+ );
+
+ // 2. 鎵ц鎾ら攢
+ this.reverseLoading = true;
+ this.showFullScreenLoading();
+
+ // 3. 璋冪敤鎾ら攢鎺ュ彛锛堥�傞厤浣犲悗绔殑鎾ら攢鎺ュ彛鍦板潃锛�
+ const response = await this.http.post('/api/Outbound/ReversePickingWithBarcode', {
+ Barcode: row.originalBarcode || row.newBarcode, // 浼樺厛鍙栧師鏉$爜锛屾棤鍒欏彇鏂版潯鐮�
+ OrderNo: this.orderNo,
+ PalletCode: row.palletCode || this.scanForm.palletCode,
+ Operator: this.getUserName(),
+ OrderType: this.orderInfo?.orderType || 0 // 璁㈠崟绫诲瀷锛屾棤鍒欎紶0
+ });
+
+ // 4. 澶勭悊缁撴灉
+ if (response.status) {
+ this.$message.success('鎾ら攢鎷i�夋垚鍔�');
+ this.playSuccessAudio(); // 鎾斁鎴愬姛闊抽
+ // 鍒锋柊鏁版嵁鍒楄〃
+ await this.loadPalletData(false);
+ } else {
+ this.$message.error(response.message || '鎾ら攢鎷i�夊け璐�');
+ this.playErrorAudio();
+ }
+ } catch (error) {
+ // 鍙栨秷纭涓嶆姤閿�
+ if (error !== 'cancel') {
+ this.$message.error('鎾ら攢鎷i�夊け璐ワ細' + (error.message || '缃戠粶寮傚父'));
+ this.playErrorAudio();
+ }
+ } finally {
+ this.reverseLoading = false;
+ this.hideFullScreenLoading();
+ }
+ },
+
handleMaterialScan() {
if (!this.scanForm.palletCode) {
this.$message.warning('璇峰厛鎵弿鎵樼洏鐮�')
--
Gitblit v1.9.3