| | |
| | | import { BasicColumn, FormSchema } from '/@/components/Table'; |
| | | import { h, unref } from 'vue'; |
| | | import { Switch } from 'ant-design-vue'; |
| | | import { Switch, Tag, Tooltip } from 'ant-design-vue'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { RouteTypeStatus, setRouteStatus } from '/@/api/tigerapi/mes/router'; |
| | | import { setRouteStatus } from '/@/api/tigerapi/mes/router'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { useLocale } from '/@/locales/useLocale'; |
| | | import { GetEnum } from '/@/api/tigerapi/system'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { getLocale } = useLocale(); |
| | |
| | | }); |
| | | }, |
| | | editDynamicDisabled: true, |
| | | }, |
| | | { |
| | | title: '工艺类型', |
| | | dataIndex: 'ROT_TYPE', |
| | | width: 100, |
| | | sorter: true, |
| | | resizable: true, |
| | | customRender: ({ record }) => { |
| | | let text = ''; |
| | | let color = ''; |
| | | switch (record.ROT_TYPE) { |
| | | case 0: |
| | | text = '正常'; |
| | | color = 'green'; |
| | | break; |
| | | case 1: |
| | | text = '返工'; |
| | | color = 'red'; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text)); |
| | | }, |
| | | }, |
| | | { |
| | | title: '创建时间', |
| | |
| | | component: 'ApiSelect', |
| | | colProps: { span: 24 }, |
| | | componentProps: { |
| | | api: RouteTypeStatus, |
| | | api: GetEnum, |
| | | params: { name: 'MES_ROUTE+ROT_TYPEs' }, |
| | | resultField: 'Data', |
| | | labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name', |
| | | valueField: 'Value', |