|
@ -3,10 +3,10 @@ import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const ItemRules = reactive({ |
|
|
export const ItemRules = reactive({ |
|
|
name: [ |
|
|
name: [ |
|
|
{ required: true, message: '请输入备件名称', trigger: 'blur' }, |
|
|
{ required: true, message: '请输入备件名称', trigger: 'blur' }, |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
@ -27,7 +27,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
table: { |
|
|
table: { |
|
|
width:110, |
|
|
width: 110, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -44,7 +44,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
isTable: true, |
|
|
isTable: true, |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width:110, |
|
|
width: 110, |
|
|
}, |
|
|
}, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
type: 'Select', |
|
|
type: 'Select', |
|
@ -64,13 +64,21 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
label: '科目', |
|
|
label: '科目', |
|
|
field: 'subject', |
|
|
field: 'subject', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
|
|
|
dictType: DICT_TYPE.ITEM_SUBJECT, |
|
|
|
|
|
dictClass: 'string', |
|
|
|
|
|
isSearch: false, |
|
|
|
|
|
isTable: true, |
|
|
|
|
|
tableForm: { |
|
|
|
|
|
type: 'Select' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
label: '科目代码', |
|
|
|
|
|
field: 'subjectCode', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isTable: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
label: '科目代码', |
|
|
|
|
|
field: 'subjectCode', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isTable: true, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
label: '单位', |
|
|
label: '单位', |
|
|
field: 'uom', |
|
|
field: 'uom', |
|
@ -83,18 +91,18 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
type: 'Select' |
|
|
type: 'Select' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '类别', |
|
|
label: '类别', |
|
|
field: 'category', |
|
|
field: 'category', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
dictType: DICT_TYPE.ITEM_CATEGORY, |
|
|
dictType: DICT_TYPE.ITEM_CATEGORY, |
|
|
dictClass: 'string', |
|
|
dictClass: 'string', |
|
|
isSearch: false, |
|
|
isSearch: false, |
|
|
isTable: true, |
|
|
isTable: true, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
type: 'Select' |
|
|
type: 'Select' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '备件分类', |
|
|
label: '备件分类', |
|
|
field: 'classification', |
|
|
field: 'classification', |
|
@ -129,7 +137,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'reprocurement', |
|
|
field: 'reprocurement', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width:110, |
|
|
width: 110, |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
form: { |
|
|
component: 'InputNumber', |
|
|
component: 'InputNumber', |
|
@ -141,7 +149,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'safetyStock', |
|
|
field: 'safetyStock', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width:110, |
|
|
width: 110, |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
form: { |
|
|
component: 'InputNumber', |
|
|
component: 'InputNumber', |
|
@ -153,15 +161,15 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'cost', |
|
|
field: 'cost', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width:110, |
|
|
width: 110, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '采购员', |
|
|
label: '采购员', |
|
|
field: 'purchaser', |
|
|
field: 'purchaser', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width:100, |
|
|
width: 100, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -194,31 +202,31 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '是否框架协议', |
|
|
label: '是否框架协议', |
|
|
field: 'isFramework', |
|
|
field: 'isFramework', |
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
dictClass: 'string', |
|
|
dictClass: 'string', |
|
|
isSearch: false, |
|
|
isSearch: false, |
|
|
isTable: true, |
|
|
isTable: true, |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
|
width: 140 |
|
|
width: 140 |
|
|
}, |
|
|
}, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
type: 'Select', |
|
|
type: 'Select', |
|
|
|
|
|
inactiveValue: 'FALSE', |
|
|
|
|
|
disabled: true |
|
|
|
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Switch', |
|
|
|
|
|
value: 'TRUE', |
|
|
|
|
|
componentProps: { |
|
|
inactiveValue: 'FALSE', |
|
|
inactiveValue: 'FALSE', |
|
|
disabled: true |
|
|
activeValue: 'TRUE' |
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Switch', |
|
|
|
|
|
value: 'TRUE', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
inactiveValue: 'FALSE', |
|
|
|
|
|
activeValue: 'TRUE' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
} |
|
|
|
|
|
}, |
|
|
// {
|
|
|
// {
|
|
|
// label: '是否可用',
|
|
|
// label: '是否可用',
|
|
|
// field: 'available',
|
|
|
// field: 'available',
|
|
@ -244,16 +252,16 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
// },
|
|
|
// },
|
|
|
{ |
|
|
{ |
|
|
label: '创建时间', |
|
|
label: '创建时间', |
|
|
field: 'createTime', |
|
|
field: 'createTime', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
formatter: dateFormatter, |
|
|
formatter: dateFormatter, |
|
|
isForm: false, |
|
|
isForm: false, |
|
|
table: { |
|
|
table: { |
|
|
width: 170 |
|
|
width: 170 |
|
|
}, |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '描述', |
|
|
label: '描述', |
|
|
field: 'describes', |
|
|
field: 'describes', |
|
|