76 lines
2.9 KiB
Vue
76 lines
2.9 KiB
Vue
|
|
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||
|
|
|
||
|
|
export const STATUS_DICT = 'xslmes_rack_train_count_setting_status';
|
||
|
|
|
||
|
|
export const columns: BasicColumn[] = [
|
||
|
|
{ title: '示方编号', align: 'center', dataIndex: 'specCode', width: 180, ellipsis: true },
|
||
|
|
{ title: '机台名称', align: 'center', dataIndex: 'machineName', width: 160, ellipsis: true },
|
||
|
|
{ title: '设定车数', align: 'center', dataIndex: 'setTrainCount', width: 100 },
|
||
|
|
{
|
||
|
|
title: '状态',
|
||
|
|
align: 'center',
|
||
|
|
dataIndex: 'status',
|
||
|
|
width: 100,
|
||
|
|
customRender: ({ text }) => {
|
||
|
|
if (text === '1' || text === 1) return '已设定';
|
||
|
|
if (text === '0' || text === 0) return '未设定';
|
||
|
|
return '-';
|
||
|
|
},
|
||
|
|
},
|
||
|
|
{ title: '修改人', align: 'center', dataIndex: 'updateBy', width: 110 },
|
||
|
|
{ title: '修改时间', align: 'center', dataIndex: 'updateTime', width: 165 },
|
||
|
|
{ title: '创建人', align: 'center', dataIndex: 'createBy', width: 110 },
|
||
|
|
{ title: '创建时间', align: 'center', dataIndex: 'createTime', width: 165 },
|
||
|
|
];
|
||
|
|
|
||
|
|
export const searchFormSchema: FormSchema[] = [
|
||
|
|
{ label: '示方编号', field: 'specCode', component: 'JInput', colProps: { span: 6 } },
|
||
|
|
{
|
||
|
|
label: '机台名称',
|
||
|
|
field: 'machineId',
|
||
|
|
component: 'JDictSelectTag',
|
||
|
|
componentProps: {
|
||
|
|
dictCode: 'mes_xsl_equipment_ledger,equipment_name,id',
|
||
|
|
placeholder: '请选择机台',
|
||
|
|
},
|
||
|
|
colProps: { span: 6 },
|
||
|
|
},
|
||
|
|
{
|
||
|
|
label: '状态',
|
||
|
|
field: 'status',
|
||
|
|
component: 'JDictSelectTag',
|
||
|
|
componentProps: { dictCode: STATUS_DICT, placeholder: '全部' },
|
||
|
|
colProps: { span: 6 },
|
||
|
|
},
|
||
|
|
{ label: '关键字', field: 'keyword', component: 'Input', colProps: { span: 6 }, componentProps: { placeholder: '示方编号/机台名称' } },
|
||
|
|
];
|
||
|
|
|
||
|
|
export const formSchema: FormSchema[] = [
|
||
|
|
{ label: '', field: 'id', component: 'Input', show: false },
|
||
|
|
{ label: '', field: 'mixingSpecId', component: 'Input', show: false },
|
||
|
|
{ label: '示方编号', field: 'specCode', component: 'Input', componentProps: { disabled: true } },
|
||
|
|
{ label: '机台名称', field: 'machineName', component: 'Input', componentProps: { disabled: true } },
|
||
|
|
{
|
||
|
|
label: '设定车数',
|
||
|
|
field: 'setTrainCount',
|
||
|
|
component: 'InputNumber',
|
||
|
|
required: true,
|
||
|
|
componentProps: {
|
||
|
|
min: 0,
|
||
|
|
precision: 0,
|
||
|
|
style: { width: '100%' },
|
||
|
|
placeholder: '请输入设定车数',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
{
|
||
|
|
label: '状态',
|
||
|
|
field: 'status',
|
||
|
|
component: 'JDictSelectTag',
|
||
|
|
componentProps: { dictCode: STATUS_DICT, disabled: true },
|
||
|
|
},
|
||
|
|
{ label: '修改人', field: 'updateBy', component: 'Input', componentProps: { disabled: true } },
|
||
|
|
{ label: '修改时间', field: 'updateTime', component: 'Input', componentProps: { disabled: true } },
|
||
|
|
{ label: '创建人', field: 'createBy', component: 'Input', componentProps: { disabled: true } },
|
||
|
|
{ label: '创建时间', field: 'createTime', component: 'Input', componentProps: { disabled: true } },
|
||
|
|
];
|