|
|
@@ -470,40 +470,35 @@
|
|
|
/> -->
|
|
|
|
|
|
<!-- 报告审核人选择对话框 -->
|
|
|
- <AuditUserDialog
|
|
|
- v-if="isShowReportAuditDialog"
|
|
|
+ <Dialog
|
|
|
v-model="isShowReportAuditDialog"
|
|
|
- :apiFn="getPipeRecheckUserList"
|
|
|
+ width="400"
|
|
|
title="请选择审核人"
|
|
|
- selectedAlertText="已选择审核人"
|
|
|
- width="700px"
|
|
|
- :columns="[
|
|
|
- {
|
|
|
- type: 'selection',
|
|
|
- fieldProps: {
|
|
|
- reserveSelection: true
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '姓名',
|
|
|
- prop: 'nickname',
|
|
|
- search: {
|
|
|
- type: 'input',
|
|
|
- span: 12,
|
|
|
- prop: 'nickName'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '部门',
|
|
|
- prop: 'deptName',
|
|
|
- search: {
|
|
|
- type: 'input',
|
|
|
- span: 12
|
|
|
- }
|
|
|
- }
|
|
|
- ]"
|
|
|
- @confirm="handleReportAuditSelectConfirm"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="reportAuditUser"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ placeholder="请选择审核人"
|
|
|
+ :remote-method="searchReportAuditUser"
|
|
|
+ :loading="reportAuditUserLoading"
|
|
|
+ clearable
|
|
|
+ value-key="id"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in reportAuditUserOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="handleReportAuditSelectConfirm">确 定</el-button>
|
|
|
+ <el-button @click="isShowReportAuditDialog = false">取 消</el-button>
|
|
|
+ </template>
|
|
|
+ </Dialog>
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 检验结果录入-葡萄城模板 -->
|
|
|
@@ -1526,7 +1521,7 @@ const isCanCancelFlow = computed(() => {
|
|
|
].includes(props.selectedItem.taskStatus)
|
|
|
if (!isAuditOrApprove) return false
|
|
|
if (!props.selectedItem.summaryId) return false
|
|
|
- return !checkerIsLoginUser.value
|
|
|
+ return props.taskOrderItem?.mainCheckerUser?.id === userStore?.user?.id
|
|
|
})
|
|
|
|
|
|
// 撤销流程
|
|
|
@@ -1545,6 +1540,9 @@ const handleCancelFlow = async () => {
|
|
|
if (result) {
|
|
|
ElMessage.success('流程已撤销')
|
|
|
handleRefresh()
|
|
|
+ } else {
|
|
|
+ ElMessage.error('流程已撤销')
|
|
|
+ emit('refresh')
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('撤销流程失败:', error)
|
|
|
@@ -1830,7 +1828,7 @@ const handleSubmitAudit = async () => {
|
|
|
// 确定审核人:使用当前用户,否则使用默认审核人
|
|
|
// const approveId = userStore.user.id
|
|
|
const approveId = 'b5369aeb73954430eef53a9c8b7586ee'
|
|
|
-
|
|
|
+
|
|
|
ElMessageBox.confirm('确定提交审核吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -1856,6 +1854,7 @@ const handleSubmitAudit = async () => {
|
|
|
}).catch(() => {
|
|
|
console.log('用户取消提交审核')
|
|
|
})
|
|
|
+ // isShowReportAuditDialog.value = true
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1969,12 +1968,33 @@ const checkOtherReportsFinished = (): { canSubmit: boolean; message?: string } =
|
|
|
return { canSubmit: true }
|
|
|
}
|
|
|
|
|
|
+// 报告审核人选择对话框 - 远程搜索选项
|
|
|
+const reportAuditUser = ref<Recordable | null>(null)
|
|
|
+const reportAuditUserOptions = ref<Recordable[]>([])
|
|
|
+const reportAuditUserLoading = ref(false)
|
|
|
+
|
|
|
+// 远程搜索报告审核人
|
|
|
+const searchReportAuditUser = async (query: string) => {
|
|
|
+ reportAuditUserLoading.value = true
|
|
|
+ try {
|
|
|
+ const params: any = { pageNo: 1, pageSize: 50, name: query || '' }
|
|
|
+ const res = await getPipeReviewUserList(params)
|
|
|
+ reportAuditUserOptions.value = res || []
|
|
|
+ } finally {
|
|
|
+ reportAuditUserLoading.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 报告审核人选择确认
|
|
|
-const handleReportAuditSelectConfirm = async (res: any) => {
|
|
|
- const approveId = res[0]
|
|
|
+const handleReportAuditSelectConfirm = async () => {
|
|
|
+ if (!reportAuditUser.value?.code) {
|
|
|
+ ElMessage.warning('请选择审核人')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const approveCode = reportAuditUser.value.code
|
|
|
const submitResult = await PipeTaskOrderApi.submitReportAudit({
|
|
|
id: templateParams.value?.id,
|
|
|
- approveId
|
|
|
+ auditor: approveCode
|
|
|
})
|
|
|
if (submitResult) {
|
|
|
// 这里可以做页面刷新
|
|
|
@@ -2269,6 +2289,11 @@ const getPipeRecheckUserList = async (params) => {
|
|
|
return await PipeTaskOrderApi.getPipeRecheckUserList(params)
|
|
|
}
|
|
|
|
|
|
+const getPipeReviewUserList = async (params) => {
|
|
|
+ params.reportId = props.selectedItem.id
|
|
|
+ return await PipeTaskOrderApi.getPipeReviewUserList(params)
|
|
|
+}
|
|
|
+
|
|
|
const showAssociationOperationManual = ref(false)
|
|
|
const handleShowAssociationOperationManual = () => {
|
|
|
showAssociationOperationManual.value = true
|