From 4f39dcc195f28fa275fc2d065fbf1bf6a46c21b7 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 17 六月 2025 00:41:18 +0800
Subject: [PATCH] 优化出入库逻辑

---
 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
index 122b98c..419d8ea 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
@@ -38,6 +38,20 @@
         //妗嗘灦鍒濆鍖栭厤缃悗
         //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
         //this.detailOptions.columns.forEach(column=>{ });
+        this.detailOptions.columns.forEach(x => {
+
+        if (x.field == 'materielCode') {
+          x.onChange = (val, option) => {
+            // this.$error(val.materielCode)
+            this.http.post("/api/MaterielInfo/GetMaterielInfo?materielCode=" + val.materielCode, {}, true).then(
+              source => {
+                if (!source.status) return this.$error(source.message);
+                val.materielName = source.data.materielName;
+                this.refresh();
+              })
+            }
+          }
+      })
       },
       searchBefore(param) {
         //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
@@ -50,6 +64,21 @@
       },
       addBefore(formData) {
         //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
+        let req = true;
+      formData.detailData.forEach(x => {
+        if (!x.hasOwnProperty('materielCode')) {
+          req = false;
+          return this.$error("鐗╂枡缂栧彿涓嶈兘涓虹┖")
+        }
+        if (!x.hasOwnProperty('batchNo')) {
+          req = false;
+          return this.$error("鎵规鍙蜂笉鑳戒负绌�")
+        }
+        if (!x.hasOwnProperty('orderQuantity')) {
+          req = false;
+          return this.$error("鍗曟嵁鏁伴噺涓嶈兘涓虹┖")
+        }
+      })
         return true;
       },
       updateBefore(formData) {

--
Gitblit v1.9.3