From dc63cd71100864be7486b2a4e947017e0880880e Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期二, 17 十二月 2024 22:39:37 +0800
Subject: [PATCH] 一些更新

---
 src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts |   89 +++++++++++++++++++++++++++-----------------
 1 files changed, 54 insertions(+), 35 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts
index 8e041f5..4c14775 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts
@@ -4,7 +4,7 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-06-27 20:40:25
+ * @LastEditTime: 2024-07-31 08:26:33
  */
 
 import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -21,12 +21,16 @@
     fixed: undefined,
   };
 
+  /**
+   * @description: 涓�浜涜嚜瀹氫箟鏂规硶
+   * @return {*}
+   */
   const methods = {
     /**
      * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
      * @return {*}
      */
-    CreateAction: (fnName: string) => {
+    CreateAction: (type: string) => {
       return {
         action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�)
       };
@@ -36,6 +40,18 @@
      * @return {*}
      */
     ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
+      data.map((x) => {
+        if (
+          (x.name == 'Delete' || x.name == 'Edit') &&
+          (params['record']['VAR_CODE'] == 'PV-WorkOrder-Plan' ||
+            params['record']['VAR_CODE'] == 'PV-CUSTOMER' ||
+            params['record']['VAR_CODE'] == 'PV-ITEM' || 
+            params['record']['VAR_CODE'] == 'PV-SN')
+        ) {
+          x.disabled = true;
+          x.tooltip = '鍒犻櫎';
+        }
+      });
       return data;
     },
     /**
@@ -49,40 +65,43 @@
         VAR_VALUE: d.values['val'],
       };
     },
-    OpenSelectItem:(openItemModal: Fn, ...args) => {
-        openItemModal(true, {
-          title: '杩囩▼鍙橀噺鍒楄〃',
-          schemas: [
-            {
-              field: 'VAR_CODE',
-              component: 'Input',
-              label: '杩囩▼鍙橀噺缂栫爜',
-              colProps: {
-                span: 12,
-              },
+    OpenSelectItem: (openItemModal: Fn, ...args) => {
+      openItemModal(true, {
+        title: '杩囩▼鍙橀噺鍒楄〃',
+        schemas: [
+          {
+            field: 'VAR_CODE',
+            component: 'Input',
+            label: '杩囩▼鍙橀噺缂栫爜',
+            colProps: {
+              span: 12,
             },
-          ],
-          ItemColumns: [
-            {
-              title: t('杩囩▼鍙橀噺缂栫爜'),
-              dataIndex: 'VAR_CODE',
-              resizable: true,
-              sorter: true,
-              width: 200,
-            },
-            {
-              title: t('杩囩▼鍙橀噺鍚嶇О'),
-              dataIndex: 'VAR_NAME',
-              resizable: true,
-              sorter: true,
-              width: 180,
-            },
-          ],
-          tableName: 'BAS_LABEL_PV',
-          rowKey: 'VAR_CODE',
-          searchInfo: {TABLE_NAME: 'BAS_LABEL_PV'}
-        });
-      }
+          },
+        ],
+        ItemColumns: [
+          {
+            title: t('杩囩▼鍙橀噺缂栫爜'),
+            dataIndex: 'VAR_CODE',
+            resizable: true,
+            sorter: true,
+            width: 200,
+          },
+          {
+            title: t('杩囩▼鍙橀噺鍚嶇О'),
+            dataIndex: 'VAR_NAME',
+            resizable: true,
+            sorter: true,
+            width: 180,
+          },
+        ],
+        tableName: 'BAS_LABEL_PV',
+        rowKey: 'VAR_CODE',
+        searchInfo: { TABLE_NAME: 'BAS_LABEL_PV' },
+      });
+    },
+    GetUseForm: () => {
+      return {};
+    },
   };
 
   return [methods, ActionColumn];

--
Gitblit v1.9.3