Browse Source

模具台账字段补充

master
ljlong_2630 9 months ago
parent
commit
d81f679afc
  1. 74
      src/views/eam/mold/moldAccounts/moldAccounts.data.ts

74
src/views/eam/mold/moldAccounts/moldAccounts.data.ts

@ -1,6 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { selectAllFactoryArea } from '@/api/system/dept'
const factoryList = await selectAllFactoryArea()
// 表单校验
export const MoldAccountsRules = reactive({
// number: [required],
@ -15,11 +16,11 @@ export const MoldAccountsRules = reactive({
export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号唯一标识',
label: '模具编号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
isForm: true,
},
{
label: '名称',
@ -33,7 +34,7 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom'
},
{
label: '设备类型',
label: '模具类型',
field: 'type',
sort: 'custom',
isSearch: true,
@ -42,9 +43,40 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '所属厂区编号',
label: '所属厂区',
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: '采购时间',
@ -100,10 +132,38 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '价格',
label: '购买价格',
field: 'purchasePrice',
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: '创建时间',
field: 'createTime',

Loading…
Cancel
Save