72 lines
2.2 KiB
Vue
72 lines
2.2 KiB
Vue
|
|
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: '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: '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: 'createBy',
|
||
|
|
component: 'Input',
|
||
|
|
componentProps: { readonly: true },
|
||
|
|
ifShow: ({ values }) => !!values?.id,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
label: '创建日期',
|
||
|
|
field: 'createTime',
|
||
|
|
component: 'Input',
|
||
|
|
componentProps: { readonly: true },
|
||
|
|
ifShow: ({ values }) => !!values?.id,
|
||
|
|
},
|
||
|
|
];
|