From 6cc2d85787171281c269f4a6c3290b4a0762bcb6 Mon Sep 17 00:00:00 2001
From: YangYuGang <1378265336@qq.com>
Date: 星期三, 05 三月 2025 16:21:43 +0800
Subject: [PATCH] 生产工具

---
 src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts |   91 +++++++++++++++++++++++++++------------------
 1 files changed, 55 insertions(+), 36 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 ea64a9b..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-22 23:40:02
+ * @LastEditTime: 2024-07-31 08:26:33
  */
 
 import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -21,21 +21,37 @@
     fixed: undefined,
   };
 
+  /**
+   * @description: 涓�浜涜嚜瀹氫箟鏂规硶
+   * @return {*}
+   */
   const methods = {
     /**
      * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
      * @return {*}
      */
-    CreateAction: () => {
+    CreateAction: (type: string) => {
       return {
         action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�)
       };
     },
     /**
-     * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽�
+     * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽�
      * @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) => {
-        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