From 5d3661fd40aa5fe0f669edb18b1c2aed458fb4e8 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期二, 11 六月 2024 14:03:58 +0800
Subject: [PATCH] 低代码更新,工单更新

---
 src/views/tigerprojects/system/lowcode/normal/basDefectGrp.ts |   95 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 88 insertions(+), 7 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/normal/basDefectGrp.ts b/src/views/tigerprojects/system/lowcode/normal/basDefectGrp.ts
index b612a93..d139d9e 100644
--- a/src/views/tigerprojects/system/lowcode/normal/basDefectGrp.ts
+++ b/src/views/tigerprojects/system/lowcode/normal/basDefectGrp.ts
@@ -1,16 +1,49 @@
 import { ActionItem, BasicColumn } from '/@/components/Table';
 import { useMessage } from '/@/hooks/web/useMessage';
+import { useI18n } from '/@/hooks/web/useI18n';
+import { getFormSchema } from '/@/views/components/data';
+import { ref } from 'vue';
 
-const { notification } = useMessage();
+const { t } = useI18n();
+const { notification, createErrorModal } = useMessage();
 /* 鑷畾涔夋寜閽柟娉� */
-export function DftGrpRelease(fn: Fn, params: {}) {
+export function DftGrpRelease(args: Fn[], params: {}) {
   console.log('鐐瑰嚮浜嗕笅鍙戞寜閽�');
-  notification.success({
-    message: '鐐瑰嚮浜嗕笅鍙戞寜閽�',
-    description: `${params.entityName}`,
-    duration: 3,
+  // notification.success({
+  //   message: '鐐瑰嚮浜嗕笅鍙戞寜閽�',
+  //   description: `${params.entityName}`,
+  //   duration: 3,
+  // });
+  // reload();
+  // if (params.STATUS == 2) {
+  //   createErrorModal({
+  //     title: t('璀﹀憡'),
+  //     content: t('宸ュ崟宸茬粡涓嬪彂锛屼笉鑳藉啀涓嬪彂锛�'),
+  //     getContainer: () => document.body,
+  //   });
+  //   return;
+  // }
+  params.dtlSlots.value = [
+    {
+      name: 'forminfo',
+      slots: ['add', 'set'],
+      preIcons: { add: 'search|svg', set: 'config|svg' }, //濡傛灉鏄涓〃鍗曪紝澧炲姞澶氫釜鎻掓Ы銆俿lots鏄脊鍑烘鎸夐挳鐨勬彃妲斤紝preIcons鏄彃妲藉搴旂殑鎸夐挳鍥炬爣
+      title: '涓嬪彂閰嶇疆',
+    },
+  ];
+
+  args[2](true, {
+    isUpdate: true, //鏄惁鏇存柊鎿嶄綔
+    ctype: params.cType.value, //鏄摢涓〉闈�
+    title: '宸ュ崟涓嬪彂', //鏍囬
+    width: '900px', //寮瑰嚭妗嗗搴�
+    formEl: params.useFormData.value,
+    formElName: ['forminfo'], //琛ㄥ崟鎻掓Ы鍚嶇О
+    RowKeys: { add: 'ROUTE_CODE', set: 'ROUTE_CODE' }, //鎻掓Ы鐨勫脊鍑烘閫夋嫨鐨刢ode
+    fnName: { BIZ_MES_WO: 'SaveWoBatch' }, //淇濆瓨鏂规硶鍚�
+    initFnName: {}, //鍒濆鍖栨柟娉曞悕
+    values: params.record, //琛ㄥ崟璁板綍
   });
-  fn();
 }
 
 export const dftGrpactionColumn: BasicColumn = {
@@ -20,3 +53,51 @@
   slots: { customRender: 'action' },
   fixed: undefined,
 };
+
+export const dftGrpActionItem: ActionItem[] = [
+  {
+    icon: 'release|svg',
+    tooltip: '涓嬪彂',
+    onClick: () => {},
+  },
+];
+
+export function dftGrpGetSelectSuccess(d, u) {
+  return {
+    ITEM_CODE: d.values['val'],
+  };
+}
+
+export function dftGrpOpenSelectItem(openItemModal: Fn) {
+  openItemModal(true, {
+    title: '鐗╂枡鍒楄〃',
+    schemas: [
+      {
+        field: 'ITEM_CODE',
+        component: 'Input',
+        label: '鐗╂枡缂栫爜',
+        colProps: {
+          span: 12,
+        },
+      },
+    ],
+    ItemColumns: [
+      {
+        title: t('鐗╂枡缂栫爜'),
+        dataIndex: 'ITEM_CODE',
+        resizable: true,
+        sorter: true,
+        width: 200,
+      },
+      {
+        title: t('鐗╂枡鍚嶇О'),
+        dataIndex: 'ITEM_NAME',
+        resizable: true,
+        sorter: true,
+        width: 180,
+      },
+    ],
+    tableName: 'BAS_ITEM',
+    rowKey: 'ITEM_CODE',
+  });
+}

--
Gitblit v1.9.3