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/QMS_INS_ITEM.ts |  130 ++++++++++++++++++++++++++++++-------------
 1 files changed, 90 insertions(+), 40 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_ITEM.ts b/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_ITEM.ts
index 1efbb48..903354d 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_ITEM.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_ITEM.ts
@@ -4,20 +4,17 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-07-02 19:43:08
+ * @LastEditTime: 2024-07-04 11:22:58
  */
 
 import { Ref, h, unref } from 'vue';
 import { DeleteEntity, GetEnum, getEntity } from '/@/api/tigerapi/system';
 import { ActionItem, BasicColumn, FormSchema, useTable } from '/@/components/Table';
 import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is';
-import { buildUUID } from '/@/utils/uuid';
-import { useUserStore } from '/@/store/modules/user';
-import { formatToDateTime } from '/@/utils/dateUtil';
 import { Tag } from 'ant-design-vue';
 import { useLocale } from '/@/locales/useLocale';
 import { useDrawer } from '/@/components/Drawer';
-import { EditOperation, Search } from '../data';
+import { EditOperation, Search, custDel } from '../data';
 
 const { getLocale } = useLocale();
 function _default() {
@@ -40,9 +37,19 @@
         if (item['ID'] == d.ID)
           return {
             ...item,
+            INS_CODE: d.INS_CODE,
+            INS_NAME: d.INS_NAME,
             STD_CODE: d.STD_CODE,
-            STD_NAME: d.STD_NAME,
-            STD_TYPE: d.STD_TYPE,
+            CTGY_CODE: d.CTGY_CODE,
+            IS_NECESSARY: d.IS_NECESSARY,
+            IS_JUDGE: d.IS_JUDGE,
+            INS_TOOL: d.INS_TOOL,
+            QNTV_UNIT: d.QNTV_UNIT,
+            QNTV_TIMES: d.QNTV_TIMES,
+            QNTV_DEVIATION: d.QNTV_DEVIATION,
+            QNTV_UPPER: d.QNTV_UPPER,
+            QNTV_LOWER: d.QNTV_LOWER,
+            QLTV_LIST: d.QLTV_LIST,
             REMARK: d.REMARK,
           };
         return item;
@@ -53,7 +60,7 @@
      * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
      * @return {*}
      */
-    CreateAction: (fnName: string) => {
+    CreateAction: (type: string) => {
       return {
         action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�)
       };
@@ -64,7 +71,7 @@
      */
     ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
       if (!isNullOrUnDef(data[1])) {
-        data[1].popConfirm.confirm = Del.bind(null, args, params);
+        data[1].popConfirm.confirm = custDel.bind(null, args, params);
       }
       return data;
     },
@@ -180,7 +187,7 @@
             submitFunc: () => Search('QMS_INS_ITEM', data, args[0]), //鑷畾涔夋煡璇㈡彁浜ゆ寜閽殑鏂规硶锛岃Е鍙戞煡璇㈡彁浜や簨浠�
           },
           useSearchForm: true,
-          showTableSetting: true,
+          showTableSetting: false,
           bordered: true,
           canResize: true,
           showIndexColumn: false,
@@ -215,8 +222,14 @@
       }
       return data;
     },
-    OthersValues: (val: string, id: string) => {
-      return { TECH_STD: val };
+    /**
+     * @description: 涓�浜涘叾浠栫殑瀛楁鍊硷紝涓�鑸槸澧炲垹鏀规槸甯﹀叆鐨勫叧閿瓧娈靛��
+     * @param {string} val
+     * @param {string} id
+     * @return {*}
+     */    
+    KeyFieldValues: (val: string, id: string) => {
+      return { STD_CODE: val };
     },
     /**
      * @description: 鑾峰彇鏍囬淇℃伅
@@ -232,33 +245,12 @@
         },
       };
     },
+    GetUseForm: () => {
+      return {};
+    },
   };
-
-  /**
-   * @description: 鑷畾涔夊垹闄ゆ柟娉�
-   * @param {Fn} args
-   * @param {*} params
-   * @return {*}
-   */
-  function Del(args: Fn[], params: {}) {
-    if (!isNullOrEmpty(params['data'])) {
-      var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']);
-      params['data'].value = _data;
-      args[6]({
-        dataSource: [],
-      });
-      args[6]({
-        dataSource: params['data'],
-      });
-      args[1]();
-    } else {
-      DeleteEntity(params['record'], params['entityName']).then((action) => {
-        if (action.IsSuccessed) {
-          args[1]();
-        }
-      });
-    }
-  }
+  
+  /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport */
 
   const baseColumns = {
     QMS_INS_ITEM: [
@@ -296,8 +288,12 @@
         },
       },
       {
-        title: '妫�楠屾爣鍑嗙紪鐮�',
+        title: '鎶�鏈姹�',
         dataIndex: 'TECH_STD',
+      },
+      {
+        title: '妫�楠屾爣鍑嗙紪鐮�',
+        dataIndex: 'STD_CODE',
       },
       {
         title: '鏄惁蹇呮',
@@ -419,7 +415,7 @@
       },
       {
         label: '妫�楠屾爣鍑�',
-        field: 'TECH_STD',
+        field: 'STD_CODE',
         component: 'ApiSelect',
         colProps: {
           span: 24,
@@ -452,6 +448,60 @@
         },
       },
       {
+        label: '鏄惁蹇呮',
+        field: 'IS_NECESSARY',
+        component: 'Select',
+        required: true,
+        colProps: {
+          span: 24,
+        },
+        componentProps: {
+          options: [
+            {
+              label: '鏄�',
+              value: 'Y',
+              key: 'Y',
+            },
+            {
+              label: '鍚�',
+              value: 'N',
+              key: 'N',
+            },
+          ],
+        },
+      },
+      {
+        label: '鏄惁鍒ゅ畾缁撴灉',
+        field: 'IS_JUDGE',
+        component: 'Select',
+        required: true,
+        colProps: {
+          span: 24,
+        },
+        componentProps: {
+          options: [
+            {
+              label: '鏄�',
+              value: 'Y',
+              key: 'Y',
+            },
+            {
+              label: '鍚�',
+              value: 'N',
+              key: 'N',
+            },
+          ],
+        },
+      },
+      {
+        label: '鎶�鏈姹�',
+        field: 'TECH_STD',
+        component: 'Input',
+        colProps: {
+          span: 24,
+        },
+      },
+      {
         label: '澶囨敞',
         field: 'REMARK',
         component: 'Input',

--
Gitblit v1.9.3