Files
qhmes/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.data.ts

82 lines
2.6 KiB
Vue
Raw Normal View History

2026-06-02 15:29:16 +08:00
import { BasicColumn, FormSchema } from '/@/components/Table';
export const columns: BasicColumn[] = [
{ title: '编号', align: 'center', dataIndex: 'reasonCode', width: 100 },
{ title: '类型', align: 'center', dataIndex: 'lockType_dictText', width: 100 },
{ title: '条码类型', align: 'center', dataIndex: 'barcodeType_dictText', width: 100 },
{ title: '原因', align: 'center', dataIndex: 'reasonDesc', width: 220, ellipsis: true },
2026-06-02 15:29:16 +08:00
{ title: '创建人', align: 'center', dataIndex: 'createBy', width: 100 },
{
title: '创建日期',
align: 'center',
dataIndex: 'createTime',
width: 165,
customRender: ({ text }) => (!text ? '' : String(text).length > 19 ? String(text).substring(0, 19) : text),
},
];
export const searchFormSchema: FormSchema[] = [
{ label: '编号', field: 'reasonCode', component: 'Input', colProps: { span: 6 } },
{ label: '原因', field: 'reasonDesc', component: 'Input', colProps: { span: 6 } },
2026-06-02 15:29:16 +08:00
{
label: '类型',
field: 'lockType',
component: 'JDictSelectTag',
componentProps: { dictCode: 'xslmes_rubber_small_lock_type', placeholder: '请选择类型' },
colProps: { span: 6 },
},
{
label: '条码类型',
field: 'barcodeType',
component: 'JDictSelectTag',
componentProps: { dictCode: 'xslmes_rubber_small_lock_barcode_type', placeholder: '请选择条码类型' },
colProps: { span: 6 },
},
];
export const formSchema: FormSchema[] = [
{ label: '', field: 'id', component: 'Input', show: false },
{
label: '编号',
field: 'reasonCode',
component: 'Input',
componentProps: { readonly: true, placeholder: '保存时从001起自动生成' },
},
{
label: '类型',
field: 'lockType',
component: 'JDictSelectTag',
required: true,
componentProps: { dictCode: 'xslmes_rubber_small_lock_type', placeholder: '请选择类型' },
},
{
label: '条码类型',
field: 'barcodeType',
component: 'JDictSelectTag',
required: true,
componentProps: { dictCode: 'xslmes_rubber_small_lock_barcode_type', placeholder: '请选择条码类型' },
},
{
label: '原因',
field: 'reasonDesc',
component: 'InputTextArea',
required: true,
colProps: { span: 24 },
componentProps: { rows: 3, maxlength: 500, showCount: true, placeholder: '请输入原因' },
},
2026-06-02 15:29:16 +08:00
{
label: '创建人',
field: 'createBy',
component: 'Input',
componentProps: { readonly: true },
ifShow: ({ values }) => !!values?.id,
},
{
label: '创建日期',
field: 'createTime',
component: 'Input',
componentProps: { readonly: true },
ifShow: ({ values }) => !!values?.id,
},
];