From e83bd2f6a38957c0d47c9e0a6c6b2ca45836e114 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期六, 08 十一月 2025 10:13:43 +0800
Subject: [PATCH] 提交

---
 项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js |   95 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 93 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
index edf53dd..fb1ded8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
@@ -1,8 +1,8 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 import http from '@/api/http.js'
-import { defineAsyncComponent } from "vue";
-import { ElMessage } from 'element-plus'; // 寮曞叆ElMessage锛岃В鍐虫彁绀烘棤鍙嶅簲
+import { h,createVNode, render,reactive  } from 'vue';
+import { ElDialog , ElForm, ElFormItem, ElInput, ElButton, ElMessage } from 'element-plus'; // 寮曞叆ElMessage锛岃В鍐虫彁绀烘棤鍙嶅簲
 
 let extension = {
     components: {
@@ -46,6 +46,97 @@
           this.$emit('openPalletDialog', targetRow.inboundOrderNo);
         }
       },
+     {
+  name: '绌烘墭鐩樺叆搴�',
+  type: 'primary',
+  value: '绌烘墭鐩樺叆搴�',
+  onClick: function () {
+    const mountNode = document.createElement('div');
+    document.body.appendChild(mountNode);
+
+    // 鍝嶅簲寮忚〃鍗曟暟鎹細鏂欑鐮佹敼涓哄彲閫夊~锛堝垵濮嬬┖瀛楃涓诧級
+    const formData = reactive({ 
+      boxCode: '' // 鏂欑鐮侊紙string绫诲瀷锛屽彲绌猴級
+    });
+
+    const vnode = createVNode(ElDialog, {
+      title: '绌烘墭鐩樺叆搴�',
+      width: '400px',
+      modelValue: true,
+      appendToBody: true,
+      'onUpdate:modelValue': (isVisible) => {
+        if (!isVisible) {
+          render(null, mountNode);
+          document.body.removeChild(mountNode);
+        }
+      }
+    }, {
+      default: () => h(ElForm, {
+        model: formData,
+        rules: {
+          // 鏂欑鐮佹牎楠岋細浠呬繚鐣欏瓧绗︿覆绫诲瀷锛岀Щ闄ゅ繀濉姹傦紙绌哄�煎彲閫氳繃锛�
+          boxCode: [
+            { type: 'string', message: '鏂欑鐮佸繀椤讳负瀛楃涓�', trigger: 'blur' }
+          ]
+        },
+        ref: 'batchInForm'
+      }, [
+        // 鏂欑鐮佽緭鍏ラ」锛堝彲閫夊~锛�
+        h(ElFormItem, { label: '鏂欑鐮�', prop: 'boxCode' }, [
+          h(ElInput, {
+            type: 'text',
+            placeholder: '鍙�夎緭鍏ユ枡绠辩爜锛屼笉濉垯榛樿鍏ュ簱', // 鎻愮ず鍙┖瑙勫垯
+            modelValue: formData.boxCode,
+            'onUpdate:modelValue': (val) => {
+              formData.boxCode = val;
+            }
+          })
+        ]),
+        // 搴曢儴鎸夐挳鍖猴紙淇濇寔涓嶅彉锛�
+        h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [
+          h(ElButton, {
+            type: 'text',
+            onClick: () => {
+              render(null, mountNode);
+              document.body.removeChild(mountNode);
+              ElMessage.info('鍙栨秷鍏ュ簱浠诲姟');
+            }
+          }, '鍙栨秷'),
+          h(ElButton, {
+            type: 'primary',
+            onClick: async () => {
+              const formRef = vnode.component.refs.batchInForm;
+              try {
+                await formRef.validate(); // 绌哄�煎彲閫氳繃鏍¢獙
+              } catch (err) {
+                return;
+              }
+
+              // 鍏ュ簱鎺ュ彛鎻愪氦锛氭枡绠辩爜涓虹┖鏃朵紶閫掔┖瀛楃涓诧紝鍚庣闇�鏀寔璇ュ瓧娈靛彲閫�
+              http.post('/api/wmsTask/BatchInboundTask', {
+                boxCode: formData.boxCode // 鍙┖锛氱敤鎴疯緭鍏ユ垨绌哄瓧绗︿覆
+              }).then(({ data, status, message }) => {
+                if (status) {
+                  ElMessage.success(`鍏ュ簱鎴愬姛${formData.boxCode ? '锛屾枡绠辩爜锛�' + formData.boxCode : ''}`);
+                  this.refresh();
+                  render(null, mountNode);
+                  document.body.removeChild(mountNode);
+                } else {
+                  ElMessage.error(message || data?.message || '鍏ュ簱澶辫触');
+                }
+              }).catch(() => {
+                ElMessage.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
+              });
+            }
+          }, '纭畾')
+        ])
+      ])
+    });
+
+    vnode.appContext = this.$.appContext;
+    render(vnode, mountNode);
+  }
+}
     ], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
     methods: {
        //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�

--
Gitblit v1.9.3