|
|
@ -198,11 +198,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({ |
|
|
|
hide: !userStore?.userSelfInfo?.posts?.some((item) => { |
|
|
|
return item.code == 'worker' |
|
|
|
}) |
|
|
|
}), // 新增 |
|
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
@ -248,8 +244,7 @@ const butttondata = (row) => { |
|
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
defaultButtons.acceptOrderBtn({ |
|
|
|
hide: !( |
|
|
|
row.status == 'PENDING' && |
|
|
|
userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') |
|
|
|
row.status == 'PENDING' |
|
|
|
) |
|
|
|
}), // 接单 |
|
|
|
defaultButtons.turnOrderBtn({ |
|
|
@ -260,16 +255,14 @@ const butttondata = (row) => { |
|
|
|
}), // 维修 |
|
|
|
defaultButtons.verifyOrderBtn({ |
|
|
|
hide: !( |
|
|
|
row.status == 'COMPLETED' && |
|
|
|
userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer') |
|
|
|
row.status == 'COMPLETED' |
|
|
|
) |
|
|
|
}), // 验证 |
|
|
|
defaultButtons.finishOrderBtn({ |
|
|
|
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) |
|
|
|
}), // 完成 |
|
|
|
defaultButtons.pictureBtn({ |
|
|
|
hide: !(row.filePathList != null && row.filePathList.length > 0 && |
|
|
|
userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker')) |
|
|
|
hide: !(row.filePathList != null && row.filePathList.length > 0) |
|
|
|
}) // 预览报修图片 |
|
|
|
] |
|
|
|
} |
|
|
@ -302,6 +295,9 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'repair') { |
|
|
|
openDetail(row, '代码', row.number) |
|
|
|
} else if (val == 'turnOrder') { |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'turnType' |
|
|
|
}).show = true |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'type' |
|
|
|
}).componentProps.options = deviceMoldTypeList |
|
|
|