|
|
@ -11,6 +11,7 @@ const userListAll = await UserApi.getSimpleUserList() |
|
|
|
const userStore = useUserStore() |
|
|
|
const factoryList = await selectAllFactoryArea() |
|
|
|
const moldList = await MoldAccountsApi.getMoldAccountsNoPage({}) |
|
|
|
const moldAllList = await MoldAccountsApi.getMoldAccountsAllNoPage({}) |
|
|
|
const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }) |
|
|
|
const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: null }) |
|
|
|
const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD') |
|
|
@ -50,105 +51,118 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isForm: false, |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
|
isDetail: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '类型', |
|
|
|
field: 'type', |
|
|
|
label: '厂区', |
|
|
|
field: 'factoryAreaNumber', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
api: () => factoryList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label |
|
|
|
return factoryList.find((account) => account.id == cellValue)?.name |
|
|
|
}, |
|
|
|
isSearch: true, |
|
|
|
search: { |
|
|
|
show: true, |
|
|
|
component: 'Select', |
|
|
|
api: () => factoryList, |
|
|
|
componentProps: { |
|
|
|
options: deviceTypeList, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'label', |
|
|
|
valueField: 'value' |
|
|
|
}, |
|
|
|
}, |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
api: () => factoryList, |
|
|
|
componentProps: { |
|
|
|
options: deviceTypeList, |
|
|
|
disabled: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'label', |
|
|
|
valueField: 'value' |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
placeholder: "请选择设备" |
|
|
|
} |
|
|
|
placeholder: "请先选择设备" |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '厂区', |
|
|
|
field: 'factoryAreaNumberMO', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
isDetail: true, |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '设备模具编号', |
|
|
|
field: 'deviceNumber', |
|
|
|
label: '类型', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
api: () => moldList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
return moldList.find((account) => account.number == cellValue)?.name |
|
|
|
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
search: { |
|
|
|
show: true, |
|
|
|
component: 'Input', |
|
|
|
// api: () => moldList,
|
|
|
|
// componentProps: {
|
|
|
|
// optionsAlias: {
|
|
|
|
// labelField: 'name',
|
|
|
|
// valueField: 'number'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
options: deviceTypeList, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'label', |
|
|
|
valueField: 'value' |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
api: () => moldList, |
|
|
|
componentProps: { |
|
|
|
options: deviceTypeList, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'number' |
|
|
|
labelField: 'label', |
|
|
|
valueField: 'value' |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
placeholder: "请选择设备" |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '厂区编号', |
|
|
|
field: 'factoryAreaNumber', |
|
|
|
label: '设备模具', |
|
|
|
field: 'deviceNumber', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
api: () => factoryList, |
|
|
|
isSearch: false, |
|
|
|
api: () => moldAllList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
return factoryList.find((account) => account.id == cellValue)?.name |
|
|
|
return moldAllList.find((account) => account.number == cellValue)?.name |
|
|
|
}, |
|
|
|
search: { |
|
|
|
show: true, |
|
|
|
component: 'Select', |
|
|
|
api: () => factoryList, |
|
|
|
api: () => moldAllList, |
|
|
|
componentProps: { |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
valueField: 'number' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
api: () => factoryList, |
|
|
|
api: () => moldList, |
|
|
|
componentProps: { |
|
|
|
disabled: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
valueField: 'number' |
|
|
|
}, |
|
|
|
placeholder: "请先选择设备" |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
@ -159,7 +173,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
api: () => userListAll, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
return userListAll.find((account) => account.id == cellValue)?.nickname |
|
|
@ -185,7 +199,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isSearch: true, |
|
|
|
dictType: DICT_TYPE.MAINTENANCE_SHIFT, |
|
|
|
dictClass: 'number', |
|
|
|
form: { |
|
|
@ -199,7 +213,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isSearch: true, |
|
|
|
dictType: DICT_TYPE.FAULT_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
form: { |
|
|
@ -332,7 +346,7 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchCondition: [{ |
|
|
|
key: 'number', |
|
|
|
value: 'deviceNumber', |
|
|
|
message: '请选择设备模具编号!', |
|
|
|
message: '请选择设备模具!', |
|
|
|
isMainValue: true |
|
|
|
}] |
|
|
|
}, |
|
|
@ -349,7 +363,7 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchCondition: [{ |
|
|
|
key: 'number', |
|
|
|
value: 'deviceNumber', |
|
|
|
message: '请选择设备模具编号!', |
|
|
|
message: '请选择设备模具!', |
|
|
|
isMainValue: true |
|
|
|
}] |
|
|
|
} |
|
|
|