From bfc11f87e2b64420c9917c0b9881b3e327d6f796 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期二, 04 十一月 2025 22:19:59 +0800
Subject: [PATCH] 优化调拨出入库

---
 新建文件夹/WMS/src/extension/outbound/outboundOrder.js |   70 +++++++++++++++++++++++++++-------
 1 files changed, 55 insertions(+), 15 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js"
index da89607..06741ff 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/extension/outbound/outboundOrder.js"
@@ -2,7 +2,7 @@
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 import gridBody from './extend/outOrderDetail.vue'
 import http from '../../api/http';
-import { el } from 'element-plus/es/locales.mjs';
+import { el, fa, sw } from 'element-plus/es/locales.mjs';
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
@@ -40,6 +40,14 @@
           });
         }
       }
+      // this.detailOptions.buttons.unshift({//杩欓噷鍙互浣跨敤push娣诲姞鏈�鍚庝竴涓綅缃�
+      //   name: '鑷畾涔夋寜閽�', //鎸夐挳鍚嶇О
+      //   icon: 'el-icon-document', //鎸夐挳鍥炬爣:缁勪欢绀轰緥->鍥炬爣
+      //   //primary銆乻uccess銆亀arning銆乪rror銆乮nfo銆乼ext銆乨anger
+      //   type: 'primary',
+      //   plain: true,
+      //   onClick: () => { }
+      // })
     },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗
@@ -85,22 +93,54 @@
         })
       })
       this.detailOptions.buttons.forEach((btn) => {
-        if (btn.name != '娣诲姞琛�') {
-          btn.hidden = true;
-          //鎴栬�呰缃彧璇�
-          //btn.readonly=true;
+        if (row.out_type == "20" && row.warehouse_no != "001") {
+          btn.hidden = btn.name != '娣诲姞琛�' && btn.name != '鑷畾涔夋寜閽�'
+        } else {
+          btn.hidden = true
         }
+        // if (row.out_type != "20") {
+        //   btn.hidden = true
+        // } else {
+        //   btn.hidden = btn.name != '娣诲姞琛�'
+        // }
+        // if (btn.name != '娣诲姞琛�') {
+        //   btn.hidden = btn.name != '娣诲姞琛�';
+        //   //鎴栬�呰缃彧璇�
+        //   //btn.readonly=true;
+        // }
       });
-      if (row.out_type == "20") {
-        this.detail.columns.forEach((x) => {
-          if (x.field == "order_Outqty") {
-            x.title = "鐩樼偣鏁伴噺",
-              x.edit = true
-          }
-        })
-      } else {
-
-      }
+      this.detail.columns.forEach((x) => {
+        switch (x.field) {
+          case "creater":
+            x.hidden = (row.out_type != "20" && row.out_type != "215");
+            break;
+          case "locationCode":
+            if (row.warehouse_no != "001" && row.out_type == "20") {
+              x.hidden = false
+            } else {
+              x.hidden = true
+            }
+          case "exp_date":
+            x.hidden = row.out_type == "215" || row.out_type == "20" && row.warehouse_no === "001";
+            // x.title = (row.out_type == "20") ? "璐т綅鍙�" : "鏁堟湡";
+            x.edit = row.out_type == "20"
+            break;
+          case "order_qty":
+            x.title = row.out_type == "20" ? "搴撳瓨鏁伴噺" : "璁㈠崟鏁伴噺";
+            x.readonly = row.out_type != "20";
+            break;
+          case "order_Outqty":
+            x.title = row.out_type == "20" ? "鐩樼偣鏁伴噺" : "瀹屾垚鏁伴噺";
+            x.readonly = row.out_type != "20";
+            break;
+          case "goods_no":
+            x.readonly = row.out_type != "20";
+            break;
+          case "batch_num":
+            x.readonly = row.out_type != "20";
+            break;
+        }
+      })
     }
   }
 };

--
Gitblit v1.9.3