From 2060cb1aec383655dc0e8ee7ecf31e044b4e52a3 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期日, 09 六月 2024 01:19:48 +0800
Subject: [PATCH] 工单管理更新

---
 src/views/components/bizMesWo.ts |  121 ++++++++++++++++++++++++++-------------
 1 files changed, 80 insertions(+), 41 deletions(-)

diff --git a/src/views/components/bizMesWo.ts b/src/views/components/bizMesWo.ts
index bd54428..222e258 100644
--- a/src/views/components/bizMesWo.ts
+++ b/src/views/components/bizMesWo.ts
@@ -1,12 +1,14 @@
 import { FunctionType } from '/@/api/tigerapi/model/systemModel';
-import { SaveEntity, getEntity } from '/@/api/tigerapi/system';
+import { GetEnum, SaveEntity, getEntity } from '/@/api/tigerapi/system';
 import { FormSchema } from '/@/components/Table';
 import { useUserStore } from '/@/store/modules/user';
 import { useI18n } from '/@/hooks/web/useI18n';
 import { uploadApi } from '/@/api/sys/upload';
-import { notification } from 'ant-design-vue';
+import { useLocale } from '/@/locales/useLocale';
+import { unref } from 'vue';
 
 const { t } = useI18n();
+const { getLocale } = useLocale();
 
 export const getFns: Record<string, FunctionType> = {
   handleSubmit: async (e, ...args) => {
@@ -40,57 +42,74 @@
 
 export const woCfgformSchema: FormSchema[] = [
   {
-    field: 'field1',
+    field: 'ORDER_NO',
     component: 'Input',
-    label: '瀛楁1',
+    label: '宸ュ崟鍙�',
     colProps: {
       span: 8,
     },
     componentProps: {
-      placeholder: '鑷畾涔塸laceholder',
+      placeholder: '璇疯緭鍏ュ伐鍗曞彿',
       onChange: (e: any) => {
         console.log(e);
       },
     },
+    dynamicDisabled: true,
   },
   {
-    field: 'field2',
+    field: 'ORDER_TYPE',
+    component: 'Select',
+    label: '宸ュ崟绫诲瀷',
+    colProps: {
+      span: 8,
+    },
+    defaultValue: 'Normal',
+    componentProps: {
+      options: [
+        {
+          label: '姝e父',
+          value: 'Normal',
+        },
+        {
+          label: '杩斿伐',
+          value: 'Rework',
+        },
+      ],
+    },
+    dynamicDisabled: true,
+  },
+  {
+    field: 'PLAN_QTY',
     component: 'Input',
-    label: '瀛楁2',
+    label: '璁″垝鏁伴噺',
     colProps: {
       span: 8,
     },
-  },
-  {
-    field: 'field3',
-    component: 'DatePicker',
-    label: '瀛楁3',
-    colProps: {
-      span: 8,
-    },
+    dynamicDisabled: true,
   },
 ];
 
 export const prodCfgformSchema: FormSchema[] = [
   {
-    field: 'field4',
+    field: 'ITEM_CODE',
     component: 'Input',
-    label: '瀛楁1',
+    label: '鐗╂枡缂栫爜',
     required: true,
     colProps: {
       span: 8,
     },
     componentProps: {
-      placeholder: '鑷畾涔塸laceholder',
+      placeholder: '璇疯緭鍏ョ墿鏂欑紪鐮�',
       onChange: (e: any) => {
         console.log(e);
       },
     },
+    dynamicDisabled: true,
   },
   {
-    field: 'field5',
+    field: 'ITEM_TYPE',
     component: 'Input',
-    label: '瀛楁2',
+    label: '鐗╂枡绫诲瀷',
     colProps: {
       span: 8,
     },
@@ -104,17 +123,32 @@
     },
   },
   {
-    field: 'field7',
+    label: '宸ヨ壓璺嚎',
+    field: 'ROUTE_CODE',
     component: 'Input',
-    label: '瀛楁4',
+    required: true,
     colProps: {
-      span: 8,
+      span: 12,
     },
-    componentProps: {
-      placeholder: '鑷畾涔塸laceholder',
-      onChange: (e: any) => {
-        console.log(e);
-      },
+  },
+  {
+    field: 'addRot',
+    component: 'Input',
+    label: '1',
+    colSlot: 'addRot',
+    defaultValue: 'MES_ROUTE',
+    colProps: {
+      span: 1,
+    },
+  },
+  {
+    field: 'setRot',
+    component: 'Input',
+    label: '1',
+    colSlot: 'setRot',
+    defaultValue: 'MES_ROUTE',
+    colProps: {
+      span: 1,
     },
   },
   {
@@ -122,15 +156,7 @@
     component: 'Input',
     label: '瀛楁5',
     colProps: {
-      span: 8,
-    },
-  },
-  {
-    field: 'field9',
-    component: 'DatePicker',
-    label: '瀛楁6',
-    colProps: {
-      span: 8,
+      span: 10,
     },
   },
 ];
@@ -151,11 +177,21 @@
     },
   },
   {
-    field: 'field11',
+    field: 'ROUTE_CODE',
     component: 'Input',
     label: '瀛楁2',
     colProps: {
       span: 8,
+    },
+  },
+  {
+    field: 'add',
+    component: 'Input',
+    label: '1',
+    colSlot: 'add',
+    defaultValue: 'MES_ROUTE',
+    colProps: {
+      span: 1,
     },
   },
   {
@@ -245,10 +281,12 @@
   };
 }
 
-export function woCustFn(openItemModal: Fn, slotName: string, others: Fn[], ...args) {
+/* 鑷畾涔夋ā鎬佹鎵撳紑鏂规硶 */
+export function woCustFn(openModal: Fn, slotName: string, others: Fn[], ...args) {
   switch (slotName) {
     case 'add':
-      openItemModal(true, {
+    case 'addRot':
+      openModal(true, {
         title: '宸ヨ壓璺嚎鍒楄〃',
         schemas: [
           {
@@ -282,12 +320,13 @@
       });
       break;
     case 'set':
+    case 'setRot':
       //   notification.success({
       //     message: '鐐瑰嚮浜嗚缃寜閽�',
       //     description: `OK`,
       //     duration: 3,
       //   });
-      others[0](true, { rotId: args[0][0], slotName: 'set' });
+      others[0](true, { rotId: args[0][0], slotName: slotName });
       break;
     default:
       () => {};

--
Gitblit v1.9.3