|
|
@ -9,16 +9,18 @@ import * as ItemApi from '@/api/eam/basic/item' |
|
|
|
import { validateHanset, validateNum, validateNum100 } from '@/utils/validator' |
|
|
|
import * as UserApi from '@/api/system/user' |
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
import { |
|
|
|
DeviceMaintenanceMain, |
|
|
|
} from '../devicemaintenancejob/deviceMaintenanceMain.data' |
|
|
|
import { DeviceMaintenanceMain } from '../devicemaintenancejob/deviceMaintenanceMain.data' |
|
|
|
const userStore = useUserStore() |
|
|
|
const userListAll = await UserApi.getSimpleUserList() |
|
|
|
const factoryList = await selectAllFactoryArea() |
|
|
|
const factoryListSelf = factoryList.filter(item => item.id == userStore.userSelfInfo.dept.parentId) |
|
|
|
const factoryListSelf = factoryList.filter( |
|
|
|
(item) => item.id == userStore.userSelfInfo.dept.parentId |
|
|
|
) |
|
|
|
const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({}) |
|
|
|
const deviceListAll = await DeviceAccountsApi.getDeviceAccountsAllNoPage({}) |
|
|
|
const deviceListByFactory = deviceListAll.filter(item => item.factoryAreaNumber == userStore.userSelfInfo.deptId) |
|
|
|
const deviceListByFactory = deviceListAll.filter( |
|
|
|
(item) => item.factoryAreaNumber == userStore.userSelfInfo.deptId |
|
|
|
) |
|
|
|
// const deviceListByFactoryAndStatus = deviceListByFactory.filter(item => item.status == '0')
|
|
|
|
const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) |
|
|
|
const dutyUserList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '' }) |
|
|
@ -26,41 +28,34 @@ const repairList = await DeviceMaintenanceMainApi.getDeviceMainTempList('DEVICE' |
|
|
|
// 表单校验
|
|
|
|
export const DeviceInspectionMainRules = reactive({ |
|
|
|
number: [required], |
|
|
|
deviceNumber: [ |
|
|
|
required, |
|
|
|
], |
|
|
|
factoryAreaNumber: [ |
|
|
|
required, |
|
|
|
], |
|
|
|
describes: [ |
|
|
|
{ max: 200, message: '不得超过200个字符', trigger: 'blur' }, |
|
|
|
], |
|
|
|
maintenancePhone: [ |
|
|
|
{ validator: validateHanset, message: '输入电话格式不正确', trigger: 'blur' } |
|
|
|
], |
|
|
|
deviceNumber: [required], |
|
|
|
factoryAreaNumber: [required], |
|
|
|
describes: [{ max: 200, message: '不得超过200个字符', trigger: 'blur' }], |
|
|
|
maintenancePhone: [{ validator: validateHanset, message: '输入电话格式不正确', trigger: 'blur' }], |
|
|
|
status: [required], |
|
|
|
type: [required], |
|
|
|
faultType: [required], |
|
|
|
faultType: [required] |
|
|
|
}) |
|
|
|
|
|
|
|
export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
export const DeviceInspectionMain = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '检修编号', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
fixed: 'left', |
|
|
|
fixed: 'left' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isForm: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '维修工单号', |
|
|
|
field: 'maintenanceNumber', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
// formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
|
|
|
@ -74,7 +69,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'describes', |
|
|
|
valueField: 'number' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
// form: {
|
|
|
@ -96,17 +91,20 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
searchAllSchemas: DeviceMaintenanceMain.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: DeviceMaintenanceMainApi.getDeviceMaintenanceMainPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'type', |
|
|
|
value: 'DEVICE', |
|
|
|
message: '请选择设备模具编号!', |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'result', |
|
|
|
value: 'TEMPORARILY', |
|
|
|
message: '请选择设备模具编号!', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -117,7 +115,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
isDetail: false, |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
api: () => factoryList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
@ -131,7 +129,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
@ -144,8 +142,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: "请选择设备" |
|
|
|
}, |
|
|
|
placeholder: '请选择设备' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -154,7 +152,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
api: () => deviceList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
@ -169,7 +167,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'number' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
@ -180,8 +178,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'number' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
}, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -192,7 +190,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
isDetail: false, |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
api: () => userListAll, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
@ -207,7 +205,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
@ -220,9 +218,9 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: "请选择检修人" |
|
|
|
}, |
|
|
|
}, |
|
|
|
placeholder: '请选择检修人' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '厂区', |
|
|
@ -247,15 +245,15 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'maintenancePhone', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
width: '150' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '状态', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: true, |
|
|
|
dictType: DICT_TYPE.WEI_XIU_ORDER_STATUS, |
|
|
@ -264,17 +262,17 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
disabled: true, |
|
|
|
placeholder: "请选择状态" |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: '请选择状态' |
|
|
|
}, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '类型', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, |
|
|
@ -283,17 +281,17 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
disabled: true, |
|
|
|
placeholder: "请选择设备" |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: '请选择设备' |
|
|
|
}, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '故障类型', |
|
|
|
field: 'faultType', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
// isSearch: false,
|
|
|
|
dictType: DICT_TYPE.FAULT_TYPE, |
|
|
@ -303,17 +301,17 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
// disabled: true,
|
|
|
|
placeholder: "请选择故障类型" |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: '请选择故障类型' |
|
|
|
}, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工单来源类型', |
|
|
|
field: 'sourceType', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
dictType: DICT_TYPE.ORDER_SOURCE_TYPE, |
|
|
|
dictClass: 'string', |
|
|
@ -322,23 +320,9 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
disabled: true, |
|
|
|
placeholder: "请选择工单来源类型" |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: '180', |
|
|
|
}, |
|
|
|
detail: { |
|
|
|
width: 180, |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
placeholder: '请选择工单来源类型' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '描述', |
|
|
@ -346,14 +330,14 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: '230', |
|
|
|
width: '230' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Input', |
|
|
|
componentProps: { |
|
|
|
type: 'textarea', |
|
|
|
type: 'textarea' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '验证人', |
|
|
@ -363,7 +347,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
api: () => userList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
@ -378,7 +362,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
@ -391,8 +375,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: "请选择维修人" |
|
|
|
}, |
|
|
|
placeholder: '请选择维修人' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -411,8 +395,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: '230', |
|
|
|
}, |
|
|
|
width: '230' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '完成时间', |
|
|
@ -421,12 +405,12 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
formatter: dateFormatter, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: '180', |
|
|
|
width: '180' |
|
|
|
}, |
|
|
|
detail: { |
|
|
|
width: 180, |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建者', |
|
|
@ -458,36 +442,30 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
isDetail: false |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
|
]) |
|
|
|
) |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const DeviceInspectionDetailRules = reactive({ |
|
|
|
chargePeoples: [ |
|
|
|
required, |
|
|
|
], |
|
|
|
chargePeoples: [required], |
|
|
|
peoples: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
{ validator: validateNum100, message: '预估人数不得超出100', trigger: 'blur' }, |
|
|
|
{ validator: validateNum100, message: '预估人数不得超出100', trigger: 'blur' } |
|
|
|
], |
|
|
|
estimatedMinutes: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' } |
|
|
|
], |
|
|
|
number: [required], |
|
|
|
status: [required], |
|
|
|
actualMinutes: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
], |
|
|
|
actualMinutes: [required, { validator: validateNum, message: '请输入正整数', trigger: 'blur' }], |
|
|
|
maintenance: [required], |
|
|
|
uncompleted: [ |
|
|
|
{ required: true, message: '该项为必填项', trigger: 'blur' } |
|
|
|
], |
|
|
|
uncompleted: [{ required: true, message: '该项为必填项', trigger: 'blur' }] |
|
|
|
}) |
|
|
|
|
|
|
|
export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
export const DeviceInspectionDetail = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '检修编号', |
|
|
|
field: 'number', |
|
|
@ -497,7 +475,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isForm: false, |
|
|
|
isTableForm: false, |
|
|
|
isTableForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '检修内容', |
|
|
@ -509,14 +487,14 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
componentProps: { |
|
|
|
type: 'textarea' |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '责任人', |
|
|
|
field: 'chargePeoples', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
@ -528,19 +506,19 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
filterable: true |
|
|
|
}, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue) => { |
|
|
|
let cellValueList = [] |
|
|
|
if (cellValue.includes(',')) { |
|
|
|
cellValueList = cellValue?.split(','); |
|
|
|
cellValueList = cellValue?.split(',') |
|
|
|
} else { |
|
|
|
cellValueList = [cellValue] |
|
|
|
} |
|
|
|
return userListAll |
|
|
|
.filter(item => cellValueList.includes(item.id.toString())) |
|
|
|
.map(item => item.nickname) |
|
|
|
.join(','); |
|
|
|
.filter((item) => cellValueList.includes(item.id.toString())) |
|
|
|
.map((item) => item.nickname) |
|
|
|
.join(',') |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
@ -552,9 +530,9 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: "请选择责任人", |
|
|
|
multiple: true, |
|
|
|
}, |
|
|
|
placeholder: '请选择责任人', |
|
|
|
multiple: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -562,29 +540,29 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'estimatedMinutes', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
|
form: { |
|
|
|
component: 'Input', |
|
|
|
}, |
|
|
|
component: 'Input' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '预估人数', |
|
|
|
field: 'peoples', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
component: 'InputNumber' |
|
|
|
}, |
|
|
|
isTable: true, |
|
|
|
tableForm: { |
|
|
|
type: 'InputNumber', |
|
|
|
}, |
|
|
|
type: 'InputNumber' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
@ -592,13 +570,13 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'actualMinutes', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
|
form: { |
|
|
|
component: 'Input', |
|
|
|
}, |
|
|
|
component: 'Input' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工程师确认', |
|
|
@ -606,18 +584,18 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Input', |
|
|
|
}, |
|
|
|
component: 'Input' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否完成', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
@ -626,15 +604,15 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
disabled: false, |
|
|
|
disabled: false |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
componentProps: { |
|
|
|
disabled: false, |
|
|
|
disabled: false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
@ -643,7 +621,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
@ -657,7 +635,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
tableForm: { |
|
|
|
type: 'FormDateTime', |
|
|
|
valueFormat: 'x' |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '未完成原因', |
|
|
@ -668,7 +646,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
type: 'textarea', |
|
|
|
disabled: true, |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -676,8 +654,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '备件', |
|
|
|
field: 'itemNumbers1', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
table: {}, |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', |
|
|
@ -690,12 +667,14 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
console.log('value', value) |
|
|
|
// tableData.value.itemNumbers1 = value.map(item => item.itemNumber)
|
|
|
|
}, |
|
|
|
searchCondition: [{ |
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'number', |
|
|
|
value: 'deviceNumber', |
|
|
|
message: '请选择设备模具编号!', |
|
|
|
isMainValue: true |
|
|
|
}] |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
@ -707,27 +686,28 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'number', |
|
|
|
value: 'deviceNumber', |
|
|
|
message: '请选择设备模具编号!', |
|
|
|
isMainValue: true |
|
|
|
}] |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备件1', |
|
|
|
field: 'itemNumbers', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
table: {}, |
|
|
|
isForm: false, |
|
|
|
isDetail: false, |
|
|
|
isTable: false, |
|
|
|
isSearch: false, |
|
|
|
isTableForm: false, |
|
|
|
isTableForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
@ -738,39 +718,32 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isDetail: false, |
|
|
|
isTableForm: false, |
|
|
|
isTableForm: false |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
|
]) |
|
|
|
) |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const DeviceInspectionAddDetailRules = reactive({ |
|
|
|
chargePeoples: [ |
|
|
|
required, |
|
|
|
], |
|
|
|
chargePeoples: [required], |
|
|
|
peoples: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
{ validator: validateNum100, message: '预估人数不得超出100', trigger: 'blur' }, |
|
|
|
{ validator: validateNum100, message: '预估人数不得超出100', trigger: 'blur' } |
|
|
|
], |
|
|
|
estimatedMinutes: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' } |
|
|
|
], |
|
|
|
number: [required], |
|
|
|
status: [required], |
|
|
|
actualMinutes: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
], |
|
|
|
actualMinutes: [required, { validator: validateNum, message: '请输入正整数', trigger: 'blur' }], |
|
|
|
maintenance: [required], |
|
|
|
uncompleted: [ |
|
|
|
{ required: true, message: '该项为必填项', trigger: 'blur' } |
|
|
|
], |
|
|
|
uncompleted: [{ required: true, message: '该项为必填项', trigger: 'blur' }] |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
export const DeviceInspectionAddDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
export const DeviceInspectionAddDetail = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '检修内容', |
|
|
|
field: 'name', |
|
|
@ -781,14 +754,14 @@ export const DeviceInspectionAddDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
componentProps: { |
|
|
|
type: 'textarea' |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '责任人', |
|
|
|
field: 'chargePeoples', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
@ -800,14 +773,14 @@ export const DeviceInspectionAddDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
filterable: true |
|
|
|
}, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue) => { |
|
|
|
const cellValueList = cellValue?.split(','); |
|
|
|
const cellValueList = cellValue?.split(',') |
|
|
|
return userListAll |
|
|
|
.filter(item => cellValueList.includes(item.id.toString())) |
|
|
|
.map(item => item.nickname) |
|
|
|
.join(','); |
|
|
|
.filter((item) => cellValueList.includes(item.id.toString())) |
|
|
|
.map((item) => item.nickname) |
|
|
|
.join(',') |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
@ -819,9 +792,9 @@ export const DeviceInspectionAddDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: "请选择责任人", |
|
|
|
multiple: true, |
|
|
|
}, |
|
|
|
placeholder: '请选择责任人', |
|
|
|
multiple: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -829,29 +802,29 @@ export const DeviceInspectionAddDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'estimatedMinutes', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
|
form: { |
|
|
|
component: 'Input', |
|
|
|
}, |
|
|
|
component: 'Input' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '预估人数', |
|
|
|
field: 'peoples', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
width: '150' |
|
|
|
}, |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
component: 'InputNumber' |
|
|
|
}, |
|
|
|
isTable: true, |
|
|
|
tableForm: { |
|
|
|
type: 'InputNumber', |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
])) |
|
|
|
type: 'InputNumber' |
|
|
|
} |
|
|
|
} |
|
|
|
]) |
|
|
|
) |
|
|
|