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