From 1963e40fab4e4c8b3597a1853ce5a03264d7897f Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期六, 13 十二月 2025 17:43:51 +0800
Subject: [PATCH] 1

---
 项目代码/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js |   47 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 37 insertions(+), 10 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
index 0ec3d7d..ca0f429 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
@@ -40,7 +40,7 @@
 
           const targetRow = selectedRows[0];
      
-          this.$emit('openPalletDialog', targetRow.inboundOrderNo);
+          this.$emit('openPalletDialog', targetRow.orderNo);
         }
       },
       {
@@ -54,7 +54,8 @@
 
                     // 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
                     const formData = reactive({
-                        palletCode: '' // 鎵樼洏鍙疯緭鍏ユ
+                        palletCode: '', // 鎵樼洏鍙疯緭鍏ユ
+                        barcode:''
                     });
 
                     // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
@@ -71,9 +72,8 @@
                         // 鍙戣捣鎾ら攢缁勭洏璇锋眰
                         try {
                             //console.log('鍙戣捣鎾ら攢缁勭洏璇锋眰锛屾墭鐩樺彿锛�', formData.palletCode.trim());
-                            const response = await http.post('/api/InboundOrder/CancelPalletGroup', {
-                                palletCode: formData.palletCode.trim()
-                            });
+                            const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode='+formData.palletCode.trim()+'&barcode='+formData.barcode.trim());
+                              
 
                             const { status, message, data } = response;
                             if (status) {
@@ -156,6 +156,23 @@
                                     }
                                 })
                             ]),
+                            h(ElFormItem,{label: '鏉$爜', prop: 'barcode'},[
+                              h(ElInput, {
+                                type: 'text',
+                                modelValue: formData.barcode,
+                                'onUpdate:modelValue': (val) => {
+                                    formData.barcode = val;
+                                },
+                                placeholder: '鍙�夛紝鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ潯鐮�',
+                                maxLength: 50,
+                                onKeydown: (e) => {
+                                    if (e.key === 'Enter') {
+                                        e.preventDefault();
+                                        submitForm();
+                                    }
+                                  }
+                              })
+                            ]),
                             // 搴曢儴鎸夐挳鍖�
                             h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [
                                 h(ElButton, {
@@ -195,8 +212,8 @@
 
     // 鏀堕泦鎵�鏈夐�変腑鍗曟嵁鐨勭紪鍙凤紙杩囨护鏃犲崟鎹彿鐨勫紓甯歌锛�
     const inboundOrderNos = selectedRows
-      .filter(row => row.inboundOrderNo)
-      .map(row => row.inboundOrderNo);
+      .filter(row => row.orderNo)
+      .map(row => row.orderNo);
 
     // 鏍¢獙2锛氭槸鍚︽湁鏈夋晥鍗曟嵁鍙�
     if (inboundOrderNos.length === 0) {
@@ -236,6 +253,7 @@
     const mountNode = document.createElement('div');
     document.body.appendChild(mountNode);
 
+    const boxCodeReg = /^[A-Z]\d{9}$/;
     // 鍝嶅簲寮忚〃鍗曟暟鎹細鏂欑鐮侊紙蹇呭~锛屾壂鐮佹灙/鎵嬪姩杈撳叆锛�
     const formData = reactive({ 
       boxCode: '',
@@ -270,15 +288,23 @@
     // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫锛堜緵鍥炶溅瑙﹀彂鍜屾寜閽偣鍑诲叡鐢級
     const submitForm = async () => {
       const formRef = vnode.component.refs.batchInForm;
+
+      if (!boxCodeReg.test(formData.boxCode.trim())) {
+        ElMessage.warning('鏂欑鐮佹牸寮忛敊璇�');
+        selectBoxCodeInput();
+        return;
+      }
+      
       try {
         // 鎵ц琛ㄥ崟鏍¢獙锛堟枡绠辩爜蹇呭~锛�
         await formRef.validate();
       } catch (err) {
-        ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鏂欑鐮�');
+        const errorMsg = err?.[0]?.message || '璇疯緭鍏ユ湁鏁堢殑鏂欑鐮�';
+        ElMessage.warning(errorMsg);
+        selectBoxCodeInput();
         return;
       }
 
-      
       http.post('/api/InboundOrder/EmptyMaterielGroup', {
         palletCode: formData.boxCode.trim(),
         warehouseCode:formData.warehouseCode
@@ -334,7 +360,8 @@
         model: formData,
         rules: {
           boxCode: [
-            { required: true, message: '璇疯緭鍏ユ枡绠辩爜', trigger: ['blur', 'enter'] }
+            { required: true, message: '璇疯緭鍏ユ枡绠辩爜', trigger: ['blur', 'change'] },
+            { pattern: boxCodeReg, message: '鏂欑鐮佹牸寮忛敊璇�', trigger: ['blur', 'change'] }
           ],
           warehouseCode:[
             { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }

--
Gitblit v1.9.3