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 |  154 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 145 insertions(+), 9 deletions(-)

diff --git a/src/views/components/bizMesWo.ts b/src/views/components/bizMesWo.ts
index 540f450..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,7 +42,128 @@
 
 export const woCfgformSchema: FormSchema[] = [
   {
-    field: 'field1',
+    field: 'ORDER_NO',
+    component: 'Input',
+    label: '宸ュ崟鍙�',
+    colProps: {
+      span: 8,
+    },
+    componentProps: {
+      placeholder: '璇疯緭鍏ュ伐鍗曞彿',
+      onChange: (e: any) => {
+        console.log(e);
+      },
+    },
+    dynamicDisabled: true,
+  },
+  {
+    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: '璁″垝鏁伴噺',
+    colProps: {
+      span: 8,
+    },
+    dynamicDisabled: true,
+  },
+];
+
+export const prodCfgformSchema: FormSchema[] = [
+  {
+    field: 'ITEM_CODE',
+    component: 'Input',
+    label: '鐗╂枡缂栫爜',
+    required: true,
+    colProps: {
+      span: 8,
+    },
+    componentProps: {
+      placeholder: '璇疯緭鍏ョ墿鏂欑紪鐮�',
+      onChange: (e: any) => {
+        console.log(e);
+      },
+    },
+    dynamicDisabled: true,
+  },
+  {
+    field: 'ITEM_TYPE',
+    component: 'Input',
+    label: '鐗╂枡绫诲瀷',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'field6',
+    component: 'DatePicker',
+    label: '瀛楁3',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    label: '宸ヨ壓璺嚎',
+    field: 'ROUTE_CODE',
+    component: 'Input',
+    required: true,
+    colProps: {
+      span: 12,
+    },
+  },
+  {
+    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,
+    },
+  },
+  {
+    field: 'field8',
+    component: 'Input',
+    label: '瀛楁5',
+    colProps: {
+      span: 10,
+    },
+  },
+];
+
+export const xxCfgformSchema: FormSchema[] = [
+  {
+    field: 'field10',
     component: 'Input',
     label: '瀛楁1',
     colProps: {
@@ -54,7 +177,7 @@
     },
   },
   {
-    field: 'field2',
+    field: 'ROUTE_CODE',
     component: 'Input',
     label: '瀛楁2',
     colProps: {
@@ -62,7 +185,17 @@
     },
   },
   {
-    field: 'field3',
+    field: 'add',
+    component: 'Input',
+    label: '1',
+    colSlot: 'add',
+    defaultValue: 'MES_ROUTE',
+    colProps: {
+      span: 1,
+    },
+  },
+  {
+    field: 'field12',
     component: 'DatePicker',
     label: '瀛楁3',
     colProps: {
@@ -129,7 +262,7 @@
   {
     field: 'fieldsc',
     component: 'Upload',
-    label: '涓婁紶鎵撳嵃妯℃澘',
+    label: '鎵撳嵃妯℃澘',
     colProps: {
       span: 10,
     },
@@ -148,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: [
           {
@@ -185,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