|
@ -3,23 +3,13 @@ import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const ItemRules = reactive({ |
|
|
export const ItemRules = reactive({ |
|
|
name: [ |
|
|
number: [ |
|
|
{ required: true, message: '请输入备件名称', trigger: 'blur' }, |
|
|
{ required: true, message: '请输入备件编号', trigger: 'blur' }, |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
uom: [ |
|
|
uom: [ |
|
|
{ required: true, message: '请选择备件单位', trigger: 'blur' }, |
|
|
|
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
maxInventory: [ |
|
|
|
|
|
{ required: true, message: '请输入最高库存', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
minInventory: [ |
|
|
|
|
|
{ required: true, message: '请输入最高库存', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
classification: [ |
|
|
|
|
|
{ required: true, message: '请输入ABC分类', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
export const ItemSearchTable = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const ItemSearchTable = useCrudSchemas(reactive<CrudSchema[]>([ |
|
@ -49,7 +39,7 @@ export const ItemSearchTable = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
])) |
|
|
])) |
|
|
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
{ |
|
|
{ |
|
|
label: '零件编码', |
|
|
label: '备件编码', |
|
|
field: 'number', |
|
|
field: 'number', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
@ -59,7 +49,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '零件名称', |
|
|
label: '备件名称', |
|
|
field: 'name', |
|
|
field: 'name', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
@ -175,10 +165,21 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
label: '价格', |
|
|
label: '价格', |
|
|
field: 'price', |
|
|
field: 'price', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: false, |
|
|
|
|
|
table: { |
|
|
table: { |
|
|
width: 110 |
|
|
width: 150 |
|
|
}, |
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'InputNumber', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
min: 1, |
|
|
|
|
|
precision: 6 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
tableForm: { |
|
|
|
|
|
type: 'InputNumber', |
|
|
|
|
|
min: 1, |
|
|
|
|
|
precision: 6 |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '描述', |
|
|
label: '描述', |
|
|