From 8639f19c82f6e263654db44286256bb8d028d2c2 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期日, 30 十一月 2025 10:10:40 +0800
Subject: [PATCH] 1
---
项目代码/WIDESEA_WMSClient/src/views/outbound/PickingConfirm.vue | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 167 insertions(+), 12 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/PickingConfirm.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/PickingConfirm.vue"
index 96cbf3e..2fc26e1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/PickingConfirm.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/PickingConfirm.vue"
@@ -28,7 +28,7 @@
<el-button type="success" @click="confirmPicking">纭鎷i��</el-button>
<!-- <el-button type="warning" @click="openSplitDialog">鎷嗗寘</el-button>
<el-button type="info" @click="openRevertSplitDialog">鎾ら攢鎷嗗寘</el-button> -->
-
+ <el-button type="info" @click="handleEmptyPallet">鍙栫┖绠�</el-button>
<el-button type="primary" @click="openBatchReturnDialog">鍥炲簱</el-button>
<!-- <el-button type="danger" @click="handleDirectOutbound">鐩存帴鍑哄簱</el-button> -->
@@ -250,6 +250,49 @@
</div>
</div>
</div>
+
+ <!-- 鍙栬蛋绌虹-->
+ <div v-if="showEmptyPalletDialog" class="custom-dialog-overlay">
+ <div class="custom-dialog-wrapper">
+ <div class="custom-dialog">
+ <div class="custom-dialog-header">
+ <h3>鍙栬蛋绌虹</h3>
+ <el-button
+ type="text"
+ @click="closeEmptyPalletDialog"
+ class="close-button">
+ 脳
+ </el-button>
+ </div>
+ <div class="custom-dialog-body">
+ <el-form
+ :model="emptypalletOutForm"
+ :rules="emptypalletOutFormRules"
+ ref="emptypalletOutFormRef"
+ label-width="100px">
+ <el-form-item label="璁㈠崟缂栧彿">
+ <el-input v-model="emptypalletOutForm.orderNo" disabled></el-input>
+ </el-form-item>
+ <el-form-item label="鎵樼洏缂栧彿" prop="palletCode">
+ <el-input
+ v-model="emptypalletOutForm.palletCode"
+ placeholder="鎵弿鎵樼洏鐮�"
+ @keyup.enter.native="onEmptyPalletScan"
+ @change="onEmptyPalletScan"
+ clearable>
+ </el-input>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="custom-dialog-footer">
+ <el-button @click="closeEmptyPalletDialog">鍙栨秷</el-button>
+ <el-button type="primary" @click="handleEmptyPalletConfirm" :loading="emptypalletOutLoading">纭鍙栬蛋绌虹</el-button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
<!-- 鐩存帴鍑哄簱寮圭獥 -->
<div v-if="showDirectOutDialog" class="custom-dialog-overlay">
<div class="custom-dialog-wrapper">
@@ -290,7 +333,7 @@
</div>
</div>
</div>
- </div>
+
<print-view ref="childs" @parentcall="parentcall"></print-view>
</template>
@@ -431,6 +474,20 @@
{ required: true, validator: validateDirectOutPalletCode, trigger: 'blur' }
]
},
+
+ showEmptyPalletDialog: false, // 鍙栬蛋绌虹寮圭獥鏄剧ず鐘舵��
+ emptypalletOutLoading: false, // 鍙栬蛋绌虹鍔犺浇鐘舵��
+ emptypalletOutForm: {
+ orderNo: '',
+ palletCode: ''
+ },
+ emptypalletOutFormRules: {
+ palletCode: [
+ { required: true, validator: validateDirectOutPalletCode, trigger: 'blur' }
+ ]
+ },
+
+
returnForm: {
orderNo: '',
palletCode: '',
@@ -598,7 +655,7 @@
});
if (res.status) {
- this.$message.success('鍥炲簱鎴愬姛');
+ this.$message.success(res.message);
this.showBatchReturnDialog = false;
this.loadData();
} else {
@@ -708,6 +765,109 @@
handleDirectOutbound() {
this.openDirectOutDialog();
},
+
+ // 鎵撳紑鍙栬蛋绌虹寮圭獥
+ openEmptyPalletDialog() {
+ console.log('鎵撳紑鍙栬蛋绌虹寮圭獥');
+ this.showEmptyPalletDialog = true;
+
+ // 閲嶇疆琛ㄥ崟
+ this.resetEmptyPalletForm();
+
+ // 璁剧疆璁㈠崟淇℃伅
+ this.emptypalletOutForm.orderNo = this.scanData.orderNo;
+
+ // 娓呴櫎琛ㄥ崟楠岃瘉
+ this.$nextTick(() => {
+ if (this.$refs.emptyPalletFormRef) {
+ this.$refs.emptyPalletFormRef.clearValidate();
+ }
+ });
+ },
+
+ // 鍏抽棴鍙栬蛋绌虹寮圭獥
+ closeEmptyPalletDialog() {
+ this.showEmptyPalletDialog = false;
+ this.resetEmptyPalletForm();
+
+ // 娓呴櫎琛ㄥ崟楠岃瘉
+ if (this.$refs.emptyPalletFormRef) {
+ this.$refs.emptyPalletFormRef.clearValidate();
+ }
+ },
+
+ // 鍙栬蛋绌虹鎵樼洏鐮佹壂鐮�
+ onEmptyPalletScan() {
+ if (!this.emptypalletOutForm.palletCode) return;
+
+ this.emptypalletOutForm.palletCode = this.emptypalletOutForm.palletCode.replace(/\n/g, '').trim();
+
+ // 娓呴櫎楠岃瘉鐘舵��
+ if (this.$refs.emptyPalletFormRef) {
+ this.$refs.emptyPalletFormRef.clearValidate(['palletCode']);
+ }
+ },
+
+ // 鍙栬蛋绌虹纭
+ async handleEmptyPalletConfirm() {
+ // 琛ㄥ崟楠岃瘉
+ if (this.$refs.emptyPalletFormRef) {
+ this.$refs.emptyPalletFormRef.validate((valid) => {
+ if (valid) {
+ this.submitEmptyPallet();
+ } else {
+ this.$message.warning('璇锋壂鎻忔墭鐩樼爜');
+ return false;
+ }
+ });
+ } else {
+ // 濡傛灉娌℃湁琛ㄥ崟寮曠敤锛屼娇鐢ㄥ師鏈夌殑楠岃瘉
+ if (!this.emptypalletOutForm.palletCode) {
+ this.$message.warning('璇锋壂鎻忔墭鐩樼爜');
+ return;
+ }
+
+ this.submitEmptyPallet();
+ }
+ },
+
+ // 鎻愪氦鍙栬蛋绌虹璇锋眰
+ async submitEmptyPallet() {
+ this.emptypalletOutLoading = true;
+
+ try {
+ const res = await this.http.post('/api/OutboundPicking/remove-empty-pallet', {
+ orderNo: this.emptypalletOutForm.orderNo,
+ palletCode: this.emptypalletOutForm.palletCode
+ });
+ debugger;
+ if (res.status) {
+ this.$message.success('鍙栬蛋绌虹鎴愬姛');
+ this.showEmptyPalletDialog = false;
+ this.loadData();
+ } else {
+ this.$message.error(res.message || '鍙栬蛋绌虹澶辫触');
+ }
+ } catch (error) {
+ this.$message.error('鍙栬蛋绌虹澶辫触');
+ } finally {
+ this.emptypalletOutLoading = false;
+ }
+ },
+
+ // 閲嶇疆鍙栬蛋绌虹琛ㄥ崟
+ resetEmptyPalletForm() {
+ this.emptypalletOutForm.palletCode = '';
+ },
+
+ // 淇敼鍘熸湁鐨勫彇璧扮┖绠辨寜閽偣鍑讳簨浠�
+ handleEmptyPallet() {
+ this.openEmptyPalletDialog();
+ },
+
+
+
+
async loadData() {
if (!this.scanData.orderNo || !this.scanData.palletCode) {
return;
@@ -775,21 +935,16 @@
if (res.status) {
successCount++;
+ this.$message.success(`鎴愬姛鍙栨秷`);
} else {
errorCount++;
- console.error(`鍙栨秷鎷i�夊け璐�: ${row.Barcode}`, res.message);
+ this.$message.warning(`鍙栨秷鎷i�夊け璐�: ${row.currentBarcode} - ${res.message}`);
}
} catch (error) {
errorCount++;
- console.error(`鍙栨秷鎷i�夊け璐�: ${row.Barcode}`, error);
+ this.$message.warning(`鍙栨秷鎷i�夊け璐�: ${row.currentBarcode} - ${error.message}` );
}
- }
-
- if (errorCount === 0) {
- this.$message.success(`鎴愬姛鍙栨秷 ${successCount} 椤筦);
- } else {
- this.$message.warning(`鎴愬姛鍙栨秷 ${successCount} 椤癸紝澶辫触 ${errorCount} 椤筦);
- }
+ }
this.loadData();
this.selectedPickedRows = [];
--
Gitblit v1.9.3