|
|
@ -4,6 +4,7 @@ import { selecUserByType } from '@/api/system/dept' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { ItemSearchTable } from '../../basic/item/item.data' |
|
|
|
import * as ItemApi from '@/api/eam/basic/item' |
|
|
|
import { validateNum } from '@/utils/validator' |
|
|
|
const factoryList = await selectAllFactoryArea() |
|
|
|
const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }) |
|
|
|
const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: undefined }) |
|
|
@ -282,9 +283,18 @@ export const MoldMaintainOrderDetailRules = reactive({ |
|
|
|
concurrencyStamp: [required], |
|
|
|
name: [required], |
|
|
|
number: [required], |
|
|
|
peoples: [required], |
|
|
|
estimatedMinutes: [required], |
|
|
|
actualMinutes: [required], |
|
|
|
peoples: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
], |
|
|
|
estimatedMinutes: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
], |
|
|
|
actualMinutes: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
], |
|
|
|
chargePeoples: [required], |
|
|
|
completionTime: [required], |
|
|
|
engineer: [required], |
|
|
@ -355,9 +365,9 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
initOptions: userList, |
|
|
|
multiple:true, |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
multiple: true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
@ -366,7 +376,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
api: () => dutyUserList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
|
|
|
|
return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') |
|
|
|
return userList.filter(item => cellValue?.includes(item.id)).map(cur => cur.name).join(',') |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
@ -405,7 +415,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
disabled: false, |
|
|
|
} |
|
|
|
}, |
|
|
|
},{ |
|
|
|
}, { |
|
|
|
label: '完成时间', |
|
|
|
field: 'completionTime', |
|
|
|
sort: 'custom', |
|
|
@ -436,7 +446,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'Input', |
|
|
|
componentProps: { |
|
|
|
type:'textarea' |
|
|
|
type: 'textarea' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -459,12 +469,12 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', |
|
|
|
searchField: 'itemNumbers1', |
|
|
|
searchTitle: '备件', |
|
|
|
multiple:true, |
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, |
|
|
|
searchPage: ItemApi.getItemList, |
|
|
|
tableSelectionChange: (value) => { |
|
|
@ -485,7 +495,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchListPlaceholder: '请选择备件', // 输入框占位文本
|
|
|
|
searchField: 'itemNumbers1', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
multiple:true, |
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
@ -504,9 +514,9 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
isTable:false, |
|
|
|
isForm: false, |
|
|
|
isDetail: false, |
|
|
|
isTable: false, |
|
|
|
isSearch: false, |
|
|
|
isTableForm: false, |
|
|
|
}, |
|
|
@ -520,7 +530,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'Input', |
|
|
|
componentProps: { |
|
|
|
type:'TextArea' |
|
|
|
type: 'TextArea' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|