From 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 09 七月 2025 22:55:27 +0800
Subject: [PATCH] 增加质检出入库逻辑

---
 项目代码/WMS/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js |   51 +++++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 24 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
index 557aeab..5926cb2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
@@ -96,16 +96,16 @@
         // }
         if (!x.hasOwnProperty('batchNo')) {
           req = false;
-          return this.$error("鏌滃彿涓嶈兘涓虹┖");
+          return this.$error("鎵瑰彿涓嶈兘涓虹┖");
         }
       })
-      // if (formData.detailData.length > 3) return this.$error("鍏ュ簱鍗曟槑缁嗕笉鑳借秴杩�3涓�");
+      if (formData.detailData.length > 1) return this.$error("鍏ュ簱鍗曟槑缁嗕笉鑳借秴杩�1涓�");
       return req;
     },
     updateBefore(formData) {
       //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
       // this.$error(formData.detailData.length)
-      // if (formData.detailData.length > 3) return this.$error("鍏ュ簱鍗曟槑缁嗕笉鑳借秴杩�3涓�");
+      if (formData.detailData.length > 1) return this.$error("鍏ュ簱鍗曟槑缁嗕笉鑳借秴杩�1涓�");
       return true;
     },
     rowClick({ row, column, event }) {
@@ -119,30 +119,33 @@
       //(3)this.editFormFields.瀛楁='xxx';
       //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
       //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
+
       if (this.currentAction == 'Add') {
-        let locationCodes = this.getOption("locationCode");
-        locationCodes.bind.data.splice(0);
-        this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then(
-          source => {
-            if (!source.status) return this.$error(source.message);
-            for (let i = 0; i < source.data.length; i++) {
-              locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] });
+        this.editFormOptions.forEach(x => {
+          x.forEach(option => {
+            if (option.field == 'orderNo' || option.field == 'orderType') {
+              option.readonly = false
             }
-            this.refresh();
           })
-          this.editFormOptions.forEach(x => {
-            x.forEach(option => {
-              if (option.field == 'orderNo' || option.field == 'orderType') {
-                option.readonly = false
-              }
-            })
-          })
+        })
         this.detailOptions.columns.forEach(x => {
           if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') {
             x.readonly = false
           }
         });
-      } else {
+        
+      let locationCodes = this.getOption("locationCode");
+      locationCodes.bind.data.splice(0);
+      this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then(
+        source => {
+          if (!source.status) return this.$error(source.message);
+          for (let i = 0; i < source.data.length; i++) {
+            locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] });
+          }
+          this.refresh();
+        })
+      }
+      else {
         this.editFormOptions.forEach(x => {
           x.forEach(option => {
             if (option.field == 'orderNo' || option.field == 'orderType') {
@@ -150,11 +153,11 @@
             }
           })
         })
-        // this.detailOptions.columns.forEach(x => {
-        //   if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') {
-        //     x.readonly = true// row.orderStatus > 0
-        //   }
-        // });
+        this.detailOptions.columns.forEach(x => {
+          if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') {
+            x.readonly = true// row.orderStatus > 0
+          }
+        });
       }
       // if (row.orderStatus != '0') {
       // this.detailOptions.columns.forEach(x => {

--
Gitblit v1.9.3