From ca3e4977395bc02c5d147dffdff7381333fdfbca Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期四, 09 四月 2026 14:39:37 +0800
Subject: [PATCH] 空箱跨区域移库
---
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue | 76 +++++++++++++++++++++++++++++++++-----
1 files changed, 66 insertions(+), 10 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
index 4e388a9..e368a58 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
@@ -1,21 +1,48 @@
<template>
- <vol-box v-model="show" title="绌烘墭鍑哄簱" :width="800" :height="600">
+ <vol-box v-model="show" title="绌烘墭鍑哄簱" :width="800" :height="1200">
<template #content>
<el-form ref="form" :model="form" label-width="90px">
- <el-form-item label="鍑哄簱鏁伴噺:">
- <el-select v-model="num" placeholder="璇烽�夋嫨鍑哄簱鏁伴噺">
- <el-option v-for="item in 6" :key="item" :label="item.toString()" :value="item">
+ <el-form-item label="鍑哄簱鍖哄煙:">
+ <el-select v-model="locationType" placeholder="璇烽�夋嫨鍑哄簱鍖哄煙">
+ <el-option
+ v-for="item in locationTypes"
+ :key="item.locationType"
+ :label="item.locationTypeDesc.toString()"
+ :value="item.locationType">
</el-option>
</el-select>
+ </el-form-item>
+ </el-form>
+ <el-form ref="form" :model="form" label-width="90px">
+ <el-form-item label="鍑哄簱鏁伴噺:">
+ <el-input-number
+ v-model="num"
+ :min="1"
+ :max="999"
+ :controls="true"
+ placeholder="璇烽�夋嫨鍑哄簱鏁伴噺"
+ style="width: 100%;">
+ </el-input-number>
</el-form-item>
</el-form>
</template>
<template #footer>
<div>
- <el-button type="danger" size="small" plain @click="submit">
+ <!-- 娣诲姞loading鐘舵�佸拰disabled灞炴�� -->
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ @click="submit"
+ :loading="isSubmitting"
+ :disabled="isSubmitting">
<i class="el-icon-check">纭</i>
</el-button>
- <el-button size="small" type="primary" plain @click="() => { this.show = false }">
+ <el-button
+ size="small"
+ type="primary"
+ plain
+ @click="() => { this.show = false }">
<i class="el-icon-close">鍏抽棴</i>
</el-button>
</div>
@@ -32,16 +59,30 @@
data() {
return {
num: 1,
- show: false
+ show: false,
+ locationTypes: [],
+ locationType: "",
+ // 鏂板鎻愪氦鐘舵�佹爣璇�
+ isSubmitting: false
}
},
methods: {
open() {
this.show = true
+ this.getData();
},
submit() {
+ // 1. 楠岃瘉蹇呭~椤�
+ if (!this.locationType) {
+ this.$message.warning('璇烽�夋嫨鍑哄簱鍖哄煙');
+ return;
+ }
+
+ // 2. 璁剧疆鎻愪氦鐘舵�佷负true锛岀鐢ㄦ寜閽�
+ this.isSubmitting = true;
+
this.$emit('parentCall', ($vue) => {
- this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}`, {}, '鏁版嵁澶勭悊涓�...')
+ this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}&locationType=${this.locationType}`, {}, '鏁版嵁澶勭悊涓�...')
.then((x) => {
if (!x.status) {
this.$message.error(x.message)
@@ -51,8 +92,23 @@
$vue.refresh();
}
})
+ .catch((error) => {
+ // 鎹曡幏璇锋眰寮傚父锛屾彁绀虹敤鎴�
+ this.$message.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
+ console.error('鎻愪氦澶辫触:', error);
+ })
+ .finally(() => {
+ // 3. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触锛夊悗閲嶇疆鎻愪氦鐘舵��
+ this.isSubmitting = false;
+ });
})
- }
+ },
+ getData() {
+ this.http.post("api/LocationInfo/GetLocationTypes", null, "鏌ヨ涓�")
+ .then((x) => {
+ this.locationTypes = x.data;
+ })
+ },
}
}
-</script>
+</script>
\ No newline at end of file
--
Gitblit v1.9.3