Files
qhmes/jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialSubstitute/MesXslMixerMaterialSubstitute.data.ts

103 lines
3.9 KiB
Vue
Raw Normal View History

import { BasicColumn, FormSchema } from '/@/components/Table';
export const columns: BasicColumn[] = [
{ title: '编号', align: 'center', dataIndex: 'serialNo', width: 80 },
{ title: '密炼物料编码', align: 'center', dataIndex: 'mixerMaterialCode', width: 130 },
{ title: '密炼物料名称', align: 'center', dataIndex: 'mixerMaterialName', width: 160 },
{ title: '替代密炼物料编码', align: 'center', dataIndex: 'substituteMaterialCode', width: 140 },
{ title: '替代密炼物料名称', align: 'center', dataIndex: 'substituteMaterialName', width: 160 },
{ title: '创建人', align: 'center', dataIndex: 'createBy', width: 100, defaultHidden: true },
{ title: '创建时间', align: 'center', dataIndex: 'createTime', width: 165 },
{ title: '修改人', align: 'center', dataIndex: 'updateBy', width: 100, defaultHidden: true },
];
export const searchFormSchema: FormSchema[] = [
{
label: '密炼物料',
field: 'mixerMaterialId',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'mes_mixer_material,material_name,id',
placeholder: '请选择密炼物料',
},
colProps: { span: 6 },
},
{ label: '密炼物料编码', field: 'mixerMaterialCode', component: 'JInput', colProps: { span: 6 } },
{ label: '密炼物料名称', field: 'mixerMaterialName', component: 'JInput', colProps: { span: 6 } },
{
label: '替代密炼物料',
field: 'substituteMaterialId',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'mes_mixer_material,material_name,id',
placeholder: '请选择替代密炼物料',
},
colProps: { span: 6 },
},
{ label: '替代物料编码', field: 'substituteMaterialCode', component: 'JInput', colProps: { span: 6 } },
{ label: '替代物料名称', field: 'substituteMaterialName', component: 'JInput', colProps: { span: 6 } },
];
export const formSchema: FormSchema[] = [
{ label: '', field: 'id', component: 'Input', show: false },
{
label: '编号',
field: 'serialNo',
component: 'InputNumber',
componentProps: { disabled: true, placeholder: '保存后自动生成', style: { width: '100%' } },
ifShow: ({ values }) => !!values.serialNo,
},
{
label: '密炼物料',
field: 'mixerMaterialName',
component: 'Input',
slot: 'mixerMaterialPicker',
dynamicRules: () => [{ required: true, message: '请选择密炼物料' }],
},
{ label: '', field: 'mixerMaterialId', component: 'Input', show: false },
{
label: '密炼物料编码',
field: 'mixerMaterialCode',
component: 'Input',
componentProps: { disabled: true, placeholder: '选择密炼物料后自动带出' },
},
{
label: '替代密炼物料',
field: 'substituteMaterialName',
component: 'Input',
slot: 'substituteMaterialPicker',
dynamicRules: () => [{ required: true, message: '请选择替代密炼物料' }],
},
{ label: '', field: 'substituteMaterialId', component: 'Input', show: false },
{
label: '替代密炼物料编码',
field: 'substituteMaterialCode',
component: 'Input',
componentProps: { disabled: true, placeholder: '选择替代密炼物料后自动带出' },
},
];
export const superQuerySchema = {
serialNo: { title: '编号', order: 0, view: 'number' },
mixerMaterialId: {
title: '密炼物料',
order: 1,
view: 'sel_search',
dictTable: 'mes_mixer_material',
dictCode: 'id',
dictText: 'material_name',
},
mixerMaterialCode: { title: '密炼物料编码', order: 2, view: 'text' },
mixerMaterialName: { title: '密炼物料名称', order: 3, view: 'text' },
substituteMaterialId: {
title: '替代密炼物料',
order: 4,
view: 'sel_search',
dictTable: 'mes_mixer_material',
dictCode: 'id',
dictText: 'material_name',
},
substituteMaterialCode: { title: '替代密炼物料编码', order: 5, view: 'text' },
substituteMaterialName: { title: '替代密炼物料名称', order: 6, view: 'text' },
};