From 6f0ffcf4a6e75ac3a76c6cfd75e02de3a17d46e3 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 31 三月 2026 10:05:32 +0800
Subject: [PATCH] 同库区移库

---
 项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue |   96 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 71 insertions(+), 25 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 13c29f0..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,18 +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-input type="text" v-model="this.form.remark"></el-input>
+        <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>
@@ -28,41 +58,57 @@
   },
   data() {
     return {
-      form: {
-        remark: ''
-      },
-      palletCode: '',
-      show: false
+      num: 1,
+      show: false,
+      locationTypes: [],
+      locationType: "",
+      // 鏂板鎻愪氦鐘舵�佹爣璇�
+      isSubmitting: false
     }
   },
   methods: {
-    open(palletCode) {
+    open() {
       this.show = true
-      this.palletCode = palletCode
+      this.getData();
     },
     submit() {
+      // 1. 楠岃瘉蹇呭~椤�
+      if (!this.locationType) {
+        this.$message.warning('璇烽�夋嫨鍑哄簱鍖哄煙');
+        return;
+      }
+      
+      // 2. 璁剧疆鎻愪氦鐘舵�佷负true锛岀鐢ㄦ寜閽�
+      this.isSubmitting = true;
+      
       this.$emit('parentCall', ($vue) => {
-        console.log(this.form.remark, this.palletCode)
-        if (
-          !this.palletCode ||
-          this.palletCode == ''
-        ) {
-          this.$message.error('鍙傛暟閿欒')
-          return
-        }
-        this.http.post(`/api/Task/OutBoundTaskAsync?palletCode=${this.palletCode}&remark=${this.form.remark}`, {}, '鏁版嵁澶勭悊涓�...')
+        this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}&locationType=${this.locationType}`, {}, '鏁版嵁澶勭悊涓�...')
           .then((x) => {
             if (!x.status) {
               this.$message.error(x.message)
             } else {
-              console.log(x);
               this.show = false
-              this.$Message.success(this.palletCode + '鍑哄簱鎴愬姛')
+              this.$Message.success(x.message)
               $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