From a7b15461d3dc6d07c18e065fa3a6acd234c2d7c8 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期二, 09 十二月 2025 19:51:55 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu

---
 项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js |  340 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 169 insertions(+), 171 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 cf21535..3682205 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,4 +1,3 @@
-
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 import http from '@/api/http.js'
 import { h, createVNode, render, reactive, ref } from 'vue';
@@ -44,159 +43,159 @@
           this.$emit('openPalletDialog', targetRow.inboundOrderNo);
         }
       },
-     {
-                name: '鎾ら攢缁勭洏',
-                type: 'primary',
-                value: '鎾ら攢缁勭洏',
-                onClick: function () {
-                    console.log('鎾ら攢缁勭洏鎸夐挳琚偣鍑�');
-                    const mountNode = document.createElement('div');
-                    document.body.appendChild(mountNode);
+      {
+        name: '鎾ら攢缁勭洏',
+        type: 'primary',
+        value: '鎾ら攢缁勭洏',
+        onClick: function () {
+          console.log('鎾ら攢缁勭洏鎸夐挳琚偣鍑�');
+          const mountNode = document.createElement('div');
+          document.body.appendChild(mountNode);
 
-                    // 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
-                    const formData = reactive({
-                        palletCode: '', // 鎵樼洏鍙疯緭鍏ユ
-                        barcode:''
-                    });
+          // 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
+          const formData = reactive({
+            palletCode: '', // 鎵樼洏鍙疯緭鍏ユ
+            barcode: ''
+          });
 
-                    // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
-                    const submitForm = async () => {
-                        const formRef = vnode.component.refs.cancelPalletForm;
-                        try {
-                            // 鎵ц琛ㄥ崟鏍¢獙锛堟墭鐩樺彿蹇呭~锛�
-                            await formRef.validate();
-                        } catch (err) {
-                            ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鎵樼洏鍙�');
-                            return;
-                        }
+          // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
+          const submitForm = async () => {
+            const formRef = vnode.component.refs.cancelPalletForm;
+            try {
+              // 鎵ц琛ㄥ崟鏍¢獙锛堟墭鐩樺彿蹇呭~锛�
+              await formRef.validate();
+            } catch (err) {
+              ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鎵樼洏鍙�');
+              return;
+            }
 
-                        // 鍙戣捣鎾ら攢缁勭洏璇锋眰
-                        try {
-                            //console.log('鍙戣捣鎾ら攢缁勭洏璇锋眰锛屾墭鐩樺彿锛�', formData.palletCode.trim());
-                            const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode='+formData.palletCode.trim()+'&barcode='+formData.barcode.trim());
-                              
+            // 鍙戣捣鎾ら攢缁勭洏璇锋眰
+            try {
+              //console.log('鍙戣捣鎾ら攢缁勭洏璇锋眰锛屾墭鐩樺彿锛�', 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) {
-                                ElMessage.success(response.message);
-                                console.log(response.message)
-                                this.refresh(); // 鎴愬姛鍚庡埛鏂板垪琛�
-                                // 鍏抽棴瀵硅瘽妗�
-                                render(null, mountNode);
-                                document.body.removeChild(mountNode);
-                            } else {
-                                console.log('鎾ら攢缁勭洏澶辫触锛屽悗绔彁绀猴細', message);
-                                ElMessage.error(message || data?.message || '鎾ら攢缁勭洏澶辫触');
-                                selectPalletCodeInput(); // 閫変腑杈撳叆妗嗘柟渚块噸鏂拌緭鍏�
-                            }
-                        } catch (error) {
-                            console.error('鎾ら攢缁勭洏璇锋眰寮傚父锛�', error);
-                            ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
-                            selectPalletCodeInput();
-                        }
-                    };
 
-                    // 閫変腑杈撳叆妗嗘枃鏈紙鏂逛究閲嶆柊杈撳叆锛�
-                    const selectPalletCodeInput = () => {
-                        setTimeout(() => {
-                            const inputRef = vnode.component.refs.palletCodeInput;
-                            if (inputRef) {
-                                const targetInput = inputRef.$el?.querySelector('input') || inputRef;
-                                targetInput?.focus();
-                                targetInput?.select();
-                            }
-                        }, 100);
-                    };
+              const { status, message, data } = response;
+              if (status) {
+                ElMessage.success(response.message);
+                console.log(response.message)
+                this.refresh(); // 鎴愬姛鍚庡埛鏂板垪琛�
+                // 鍏抽棴瀵硅瘽妗�
+                render(null, mountNode);
+                document.body.removeChild(mountNode);
+              } else {
+                console.log('鎾ら攢缁勭洏澶辫触锛屽悗绔彁绀猴細', message);
+                ElMessage.error(message || data?.message || '鎾ら攢缁勭洏澶辫触');
+                selectPalletCodeInput(); // 閫変腑杈撳叆妗嗘柟渚块噸鏂拌緭鍏�
+              }
+            } catch (error) {
+              console.error('鎾ら攢缁勭洏璇锋眰寮傚父锛�', error);
+              ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
+              selectPalletCodeInput();
+            }
+          };
 
-                    // 鍒涘缓瀵硅瘽妗哣Node
-                    const vnode = createVNode(ElDialog, {
-                        title: '鎾ら攢缁勭洏',
-                        width: '400px',
-                        modelValue: true,
-                        appendToBody: true,
-                        onOpened: () => {
-                            // 瀵硅瘽妗嗘墦寮�鍚庤嚜鍔ㄨ仛鐒﹁緭鍏ユ
-                            setTimeout(() => {
-                                const inputRef = vnode.component.refs.palletCodeInput;
-                                inputRef?.focus();
-                            }, 100);
-                        },
-                        'onUpdate:modelValue': (isVisible) => {
-                            if (!isVisible) {
-                                render(null, mountNode);
-                                document.body.removeChild(mountNode);
-                            }
-                        }
-                    }, {
-                        default: () => h(ElForm, {
-                            model: formData,
-                            rules: {
-                                palletCode: [
-                                    { required: true, message: '璇疯緭鍏ユ墭鐩樺彿', trigger: ['blur', 'enter'] },
-                                    { min: 1, max: 50, message: '鎵樼洏鍙烽暱搴︿笉鑳借秴杩�50涓瓧绗�', trigger: ['blur', 'input'] }
-                                ]
-                            },
-                            ref: 'cancelPalletForm'
-                        }, [
-                            // 鎵樼洏鍙疯緭鍏ラ」
-                            h(ElFormItem, { label: '鎵樼洏鍙�', prop: 'palletCode', required: true }, [
-                                h(ElInput, {
-                                    type: 'text',
-                                    modelValue: formData.palletCode,
-                                    'onUpdate:modelValue': (val) => {
-                                        formData.palletCode = val;
-                                    },
-                                    ref: 'palletCodeInput',
-                                    placeholder: '鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ墭鐩樺彿',
-                                    maxLength: 50,
-                                    // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
-                                    onKeydown: (e) => {
-                                        if (e.key === 'Enter') {
-                                            e.preventDefault();
-                                            submitForm();
-                                        }
-                                    }
-                                })
-                            ]),
-                            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, {
-                                    type: 'text',
-                                    onClick: () => {
-                                        render(null, mountNode);
-                                        document.body.removeChild(mountNode);
-                                        ElMessage.info('鍙栨秷鎾ら攢缁勭洏');
-                                    }
-                                }, '鍙栨秷'),
-                                h(ElButton, {
-                                    type: 'primary',
-                                    onClick: submitForm.bind(this) // 缁戝畾this涓婁笅鏂�
-                                }, '纭鎾ら攢')
-                            ])
-                        ])
-                    });
+          // 閫変腑杈撳叆妗嗘枃鏈紙鏂逛究閲嶆柊杈撳叆锛�
+          const selectPalletCodeInput = () => {
+            setTimeout(() => {
+              const inputRef = vnode.component.refs.palletCodeInput;
+              if (inputRef) {
+                const targetInput = inputRef.$el?.querySelector('input') || inputRef;
+                targetInput?.focus();
+                targetInput?.select();
+              }
+            }, 100);
+          };
 
-                    vnode.appContext = this.$.appContext;
-                    render(vnode, mountNode);
-                }
+          // 鍒涘缓瀵硅瘽妗哣Node
+          const vnode = createVNode(ElDialog, {
+            title: '鎾ら攢缁勭洏',
+            width: '400px',
+            modelValue: true,
+            appendToBody: true,
+            onOpened: () => {
+              // 瀵硅瘽妗嗘墦寮�鍚庤嚜鍔ㄨ仛鐒﹁緭鍏ユ
+              setTimeout(() => {
+                const inputRef = vnode.component.refs.palletCodeInput;
+                inputRef?.focus();
+              }, 100);
             },
+            'onUpdate:modelValue': (isVisible) => {
+              if (!isVisible) {
+                render(null, mountNode);
+                document.body.removeChild(mountNode);
+              }
+            }
+          }, {
+            default: () => h(ElForm, {
+              model: formData,
+              rules: {
+                palletCode: [
+                  { required: true, message: '璇疯緭鍏ユ墭鐩樺彿', trigger: ['blur', 'enter'] },
+                  { min: 1, max: 50, message: '鎵樼洏鍙烽暱搴︿笉鑳借秴杩�50涓瓧绗�', trigger: ['blur', 'input'] }
+                ]
+              },
+              ref: 'cancelPalletForm'
+            }, [
+              // 鎵樼洏鍙疯緭鍏ラ」
+              h(ElFormItem, { label: '鎵樼洏鍙�', prop: 'palletCode', required: true }, [
+                h(ElInput, {
+                  type: 'text',
+                  modelValue: formData.palletCode,
+                  'onUpdate:modelValue': (val) => {
+                    formData.palletCode = val;
+                  },
+                  ref: 'palletCodeInput',
+                  placeholder: '鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ墭鐩樺彿',
+                  maxLength: 50,
+                  // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
+                  onKeydown: (e) => {
+                    if (e.key === 'Enter') {
+                      e.preventDefault();
+                      submitForm();
+                    }
+                  }
+                })
+              ]),
+              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, {
+                  type: 'text',
+                  onClick: () => {
+                    render(null, mountNode);
+                    document.body.removeChild(mountNode);
+                    ElMessage.info('鍙栨秷鎾ら攢缁勭洏');
+                  }
+                }, '鍙栨秷'),
+                h(ElButton, {
+                  type: 'primary',
+                  onClick: submitForm.bind(this) // 缁戝畾this涓婁笅鏂�
+                }, '纭鎾ら攢')
+              ])
+            ])
+          });
+
+          vnode.appContext = this.$.appContext;
+          render(vnode, mountNode);
+        }
+      },
       {
         name: '鍒嗘壒鍏ュ簱',
         type: 'primary',
@@ -427,30 +426,30 @@
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {
       this.columns.forEach(column => {
-      if (column.field === 'orderStatistics') {
-        column.formatter = (row) => {
-          // 鏍¢獙details鏄惁瀛樺湪涓旀湁鏁版嵁
-          if (row.details && row.details.length > 0) {
-            //鎸塵aterielCode鍒嗙粍缁熻orderQuantity鎬诲拰
-            const materielSumMap = row.details.reduce((acc, item) => {
-              const materielCode = item.materielCode || '鏈煡鐗╂枡';
-              const quantity = Number(item.orderQuantity) || 0;
-              acc[materielCode] = (acc[materielCode] || 0) + quantity;
-              return acc;
-            }, {});
+        if (column.field === 'orderStatistics') {
+          column.formatter = (row) => {
+            // 鏍¢獙details鏄惁瀛樺湪涓旀湁鏁版嵁
+            if (row.details && row.details.length > 0) {
+              //鎸塵aterielCode鍒嗙粍缁熻orderQuantity鎬诲拰
+              const materielSumMap = row.details.reduce((acc, item) => {
+                const materielCode = item.materielCode || '鏈煡鐗╂枡';
+                const quantity = Number(item.orderQuantity) || 0;
+                acc[materielCode] = (acc[materielCode] || 0) + quantity;
+                return acc;
+              }, {});
 
-            //姣忎釜鐗╂枡椤圭敓鎴愮嫭绔媎iv锛岃法琛屾樉绀�
-            const displayItems = Object.entries(materielSumMap).map(([code, total]) => {
-              return `<div style="line-height: 1.5; white-space: normal;">${code}锛�${total}涓�</div>`;
-            });
-            const displayContent = displayItems.join('');
-            return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`;
-          } else {
-            return '<span style="color: #F56C6C">鏃犲叆搴撴槑缁�</span>';
-          }
-        };
-      }
-    });
+              //姣忎釜鐗╂枡椤圭敓鎴愮嫭绔媎iv锛岃法琛屾樉绀�
+              const displayItems = Object.entries(materielSumMap).map(([code, total]) => {
+                return `<div style="line-height: 1.5; white-space: normal;">${code}锛�${total}涓�</div>`;
+              });
+              const displayContent = displayItems.join('');
+              return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`;
+            } else {
+              return '<span style="color: #F56C6C">鏃犲叆搴撴槑缁�</span>';
+            }
+          };
+        }
+      });
     },
     onInited() {
 
@@ -473,7 +472,6 @@
       return true;
     },
     searchAfter(result) {
-      //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
       return true;
     },
     addBefore(formData) {
@@ -498,4 +496,4 @@
     }
   }
 };
-export default extension;
+export default extension;
\ No newline at end of file

--
Gitblit v1.9.3