From c9f779c19d920efcca14fd17bbcca8254f92790d Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期四, 22 八月 2024 10:22:40 +0800
Subject: [PATCH] 绑定工艺更新

---
 src/views/tigerprojects/mes/prod/biz_mes_wo/biz_mes_wo.data.ts |   82 ++++++++++++++++++++--------------------
 1 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/src/views/tigerprojects/mes/prod/biz_mes_wo/biz_mes_wo.data.ts b/src/views/tigerprojects/mes/prod/biz_mes_wo/biz_mes_wo.data.ts
index 12b9e0f..f4bb103 100644
--- a/src/views/tigerprojects/mes/prod/biz_mes_wo/biz_mes_wo.data.ts
+++ b/src/views/tigerprojects/mes/prod/biz_mes_wo/biz_mes_wo.data.ts
@@ -1,5 +1,4 @@
 import { BasicColumn, FormSchema } from '/@/components/Table';
-import { optionsListApi, optionsListApiType } from '/@/api/tigerapi/mes/smt/tool';
 import { h, unref } from 'vue';
 import { Tag, Tooltip } from 'ant-design-vue';
 import { useLocale } from '/@/locales/useLocale';
@@ -35,13 +34,37 @@
       let text = '';
       let color = '';
       switch (record.ORDER_TYPE) {
-        case 'Normal':
-          text = '姝e父';
+        case 0:
+          text = '璁″垝';
+          color = '#8a8a8a';
+          break;
+        case 1:
+          text = '鏍囧噯';
           color = 'green';
           break;
-        case 'Rework':
+        case 2:
           text = '杩斿伐';
           color = 'red';
+          break;
+        case 3:
+          text = '鍦ㄥ簱鏀瑰埗';
+          color = 'blue';
+          break;
+        case 5:
+          text = '濮斿';
+          color = 'yellow';
+          break;
+        case 6:
+          text = '鐮斿彂';
+          color = 'orange';
+          break;
+        case 7:
+          text = '棰勬祴';
+          color = '#078737';
+          break;
+        case 8:
+          text = '鎷嗗嵏';
+          color = '#e1822c';
           break;
         default:
           break;
@@ -263,20 +286,16 @@
   {
     field: 'ORDER_TYPE',
     label: '宸ュ崟绫诲瀷',
-    component: 'Select',
+    component: 'ApiSelect',
     colProps: { span: 8 },
     defaultValue: '',
     componentProps: {
-      options: [
-        {
-          label: '姝e父',
-          value: 'Normal',
-        },
-        {
-          label: '杩斿伐',
-          value: 'Rework',
-        },
-      ],
+      api: GetEnum,
+      params: { name: 'BIZ_MES_WO+ORDER_TYPEs' },
+      resultField: 'Data',
+      labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
+      valueField: 'Value',
+      placeholder: '璇烽�夋嫨宸ュ崟绫诲瀷',
     },
   },
   {
@@ -329,20 +348,15 @@
   {
     field: 'ORDER_TYPE',
     label: '宸ュ崟绫诲瀷',
-    component: 'Select',
+    component: 'ApiSelect',
     colProps: { span: 24 },
-    defaultValue: 'Normal',
+    defaultValue: 1,
     componentProps: {
-      options: [
-        {
-          label: '姝e父',
-          value: 'Normal',
-        },
-        {
-          label: '杩斿伐',
-          value: 'Rework',
-        },
-      ],
+      api: GetEnum,
+      params: { name: 'BIZ_MES_WO+ORDER_TYPEs' },
+      resultField: 'Data',
+      labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
+      valueField: 'Value',
     },
   },
   {
@@ -408,20 +422,6 @@
     component: 'Input',
     colProps: { span: 24 },
   },
-  // {
-  //   field: 'FACTORY',
-  //   label: '宸ュ巶',
-  //   required: true,
-  //   component: 'ApiSelect',
-  //   colProps: { span: 12 },
-  //   componentProps: {
-  //     api: getEntity,
-  //     params: { entityName: 'MES_FACTORY', sqlcmd: ' 1=1 ' },
-  //     resultField: 'Data.Items',
-  //     labelField: 'FTY_NAME',
-  //     valueField: 'FTY_CODE',
-  //   },
-  // },
   {
     field: 'PLAN_LINE',
     label: '璁″垝绾夸綋',

--
Gitblit v1.9.3