Ben Lin
2024-06-15 530096340198888eb1808f39c0c75a6f1f6d1132
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { unref } from 'vue';
import { FormSchema } from '/@/components/Table';
import { useI18n } from '/@/hooks/web/useI18n';
import { useLocale } from '/@/locales/useLocale';
import { GetEnum } from '/@/api/tigerapi/system';
 
const { t } = useI18n();
const { getLocale } = useLocale();
 
export const formSchema: FormSchema[] = [
  {
    field: 'ROT_CODE',
    label: '工艺路线编码',
    required: true,
    component: 'Input',
    colProps: { span: 24 },
  },
  {
    field: 'ID',
    label: 'ID',
    component: 'Input',
    show: false,
  },
  {
    field: 'ROT_NAME',
    label: '工艺路线名称',
    required: true,
    component: 'Input',
    colProps: { span: 24 },
  },
  {
    field: 'ROT_TYPE',
    label: t('工艺路线类型'),
    component: 'ApiSelect',
    colProps: { span: 24 },
    componentProps: {
      api: GetEnum,
      params: { name: 'MES_ROUTE+ROT_TYPEs' },
      resultField: 'Data',
      labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
      valueField: 'Value',
      // onChange: (e, v) => {
      //   alert(e)
      //   console.log('ApiSelect====>:', e, v);
      // },
    },
  },
  {
    field: 'ROT_VER',
    label: '工艺路线版本',
    // required: true,
    component: 'Input',
    colProps: { span: 24 },
  },
  {
    field: 'IS_ACTIVE',
    label: '是否启用(Y/N)',
    required: true,
    component: 'Select',
    colProps: { span: 24 },
    componentProps: {
      options: [
        {
          label: '是',
          value: 'Y',
          key: 'Y',
        },
        {
          label: '否',
          value: 'N',
          key: 'N',
        },
      ],
    },
  },
  {
    field: 'REMARK',
    label: '备注',
    // required: true,
    component: 'Input',
    colProps: { span: 24 },
  },
];