|
@ -1,6 +1,7 @@ |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
|
import { selectAllFactoryArea } from '@/api/system/dept' |
|
|
|
|
|
const factoryList = await selectAllFactoryArea() |
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const MoldAccountsRules = reactive({ |
|
|
export const MoldAccountsRules = reactive({ |
|
|
// number: [required],
|
|
|
// number: [required],
|
|
@ -15,11 +16,11 @@ export const MoldAccountsRules = reactive({ |
|
|
|
|
|
|
|
|
export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
{ |
|
|
{ |
|
|
label: '编号唯一标识', |
|
|
label: '模具编号', |
|
|
field: 'number', |
|
|
field: 'number', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
isForm: false, |
|
|
isForm: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '名称', |
|
|
label: '名称', |
|
@ -33,7 +34,7 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
sort: 'custom' |
|
|
sort: 'custom' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '设备类型', |
|
|
label: '模具类型', |
|
|
field: 'type', |
|
|
field: 'type', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
@ -42,9 +43,40 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '所属厂区编号', |
|
|
label: '所属厂区', |
|
|
field: 'factoryAreaNumber', |
|
|
field: 'factoryAreaNumber', |
|
|
sort: 'custom' |
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: false, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
|
|
|
api: () => factoryList, |
|
|
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
|
|
return factoryList.find((account) => account.id == cellValue)?.name |
|
|
|
|
|
}, |
|
|
|
|
|
search: { |
|
|
|
|
|
show: true, |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
api: () => factoryList, |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
optionsAlias: { |
|
|
|
|
|
labelField: 'name', |
|
|
|
|
|
valueField: 'id' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
api: () => factoryList, |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
disabled: false, |
|
|
|
|
|
optionsAlias: { |
|
|
|
|
|
labelField: 'name', |
|
|
|
|
|
valueField: 'id' |
|
|
|
|
|
}, |
|
|
|
|
|
placeholder: "请选择设备" |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '采购时间', |
|
|
label: '采购时间', |
|
@ -100,10 +132,38 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '价格', |
|
|
label: '购买价格', |
|
|
field: 'purchasePrice', |
|
|
field: 'purchasePrice', |
|
|
sort: 'custom' |
|
|
sort: 'custom' |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '是否客户资产', |
|
|
|
|
|
field: 'isClientAssets', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
}, |
|
|
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
|
|
dictClass: 'string', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '生产次数', |
|
|
|
|
|
field: 'frequency', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'InputNumber', |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '节拍', |
|
|
|
|
|
field: 'beat', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isForm: true, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Input', |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '创建时间', |
|
|
label: '创建时间', |
|
|
field: 'createTime', |
|
|
field: 'createTime', |
|
|