diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index fa95971..862a2ee 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -54,9 +54,9 @@ [SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS]: '/lab/reportOnCredentialsApproval', // 证书报告, [SCHEDULE.BUSINESS_SUBPACKAGE_APPLY]: '/subpackage/itemApply', // 分包项目申请, [SCHEDULE.BUSINESS_SUBPACKAGE_CHECK]: '/subpackage/itemCheck', // 分包项目验收, - // [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, + [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, [SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE]: '/subpackage/qualificationApprove', // 分包方资格资格审批, - // [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, + [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, [SCHEDULE.BUSINESS_FIELDTEST_APPROVE]: '/fieldTest/approve', // 现场检测审批, [SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE]: '/contractManagement/list', // 合同审批, } diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index fa95971..862a2ee 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -54,9 +54,9 @@ [SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS]: '/lab/reportOnCredentialsApproval', // 证书报告, [SCHEDULE.BUSINESS_SUBPACKAGE_APPLY]: '/subpackage/itemApply', // 分包项目申请, [SCHEDULE.BUSINESS_SUBPACKAGE_CHECK]: '/subpackage/itemCheck', // 分包项目验收, - // [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, + [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, [SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE]: '/subpackage/qualificationApprove', // 分包方资格资格审批, - // [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, + [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, [SCHEDULE.BUSINESS_FIELDTEST_APPROVE]: '/fieldTest/approve', // 现场检测审批, [SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE]: '/contractManagement/list', // 合同审批, } diff --git a/src/views/business/schedule/certPrint/certDetail.vue b/src/views/business/schedule/certPrint/certDetail.vue index 2efaf19..b3d2493 100644 --- a/src/views/business/schedule/certPrint/certDetail.vue +++ b/src/views/business/schedule/certPrint/certDetail.vue @@ -5,6 +5,7 @@ import dayjs from 'dayjs' import type { ICertification } from './cert-interface' import filePreviewDialog from './components/filePreviewDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import { printJSON, printPdf } from '@/utils/printUtils' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' @@ -16,6 +17,7 @@ import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval' import { getDictByCode } from '@/api/system/dict' import type { dictType } from '@/global' +import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' const loading = ref(false) // 表单加载状态 const infoId = ref('') // 证书id @@ -31,7 +33,7 @@ const pageType = ref('detail') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const filePreviewDialogRef = ref() // 预览弹窗ref -const approvalDialog = ref() // 审批对话ref +const approvalDialogPart = ref() // 审批对话ref // 从路由中获取页面类型参数 const $route = useRoute() @@ -161,6 +163,8 @@ const getInfo = (id: string | number) => { certificatePrintDetail({ id }).then((res) => { dataForm.value = res.data + printStatus.value = res.data.printStatus // 打印状态 + printFileName.value = res.data.printFileName // 打印文件名 dataForm.value.createTime = res.data.createTime.split('T')[0] }) } @@ -225,39 +229,12 @@ close() // 返回上一页 } // 审批 -const handleApprove = (val: string, title = '') => { - if (val === '取消') { - const params = { - processInstanceId: processId.value!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - cancelApproval(params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - close() - }) - }) +const handleDistribute = (status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', taskId.value) } - else if (val === '同意') { - approvalDialog.value.initDialog('agree', taskId.value) - } - else if (val === '驳回') { - approvalDialog.value.initDialog('reject', taskId.value) - } - else if (val === '拒绝') { - approvalDialog.value.initDialog('refuse', taskId.value) + else { + approvalDialogPart.value.initDialog('refuse', taskId, infoId.value) } } const approvalRecordData = ref([]) // 审批流程数据 @@ -278,8 +255,8 @@ onMounted(() => { infoId.value = $route.query.id as string - printStatus.value = $route.query.printStatus as string// 打印状态 - printFileName.value = $route.query.printFileName as string// 打印文件名 + // printStatus.value = $route.query.printStatus as string// 打印状态 + // printFileName.value = $route.query.printFileName as string// 打印文件名 approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称 taskId.value = $route.query.taskId as string // 流程id decisionItem.value = $route.query.decisionItem as string // 流程id @@ -296,18 +273,24 @@ diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index fa95971..862a2ee 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -54,9 +54,9 @@ [SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS]: '/lab/reportOnCredentialsApproval', // 证书报告, [SCHEDULE.BUSINESS_SUBPACKAGE_APPLY]: '/subpackage/itemApply', // 分包项目申请, [SCHEDULE.BUSINESS_SUBPACKAGE_CHECK]: '/subpackage/itemCheck', // 分包项目验收, - // [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, + [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, [SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE]: '/subpackage/qualificationApprove', // 分包方资格资格审批, - // [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, + [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, [SCHEDULE.BUSINESS_FIELDTEST_APPROVE]: '/fieldTest/approve', // 现场检测审批, [SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE]: '/contractManagement/list', // 合同审批, } diff --git a/src/views/business/schedule/certPrint/certDetail.vue b/src/views/business/schedule/certPrint/certDetail.vue index 2efaf19..b3d2493 100644 --- a/src/views/business/schedule/certPrint/certDetail.vue +++ b/src/views/business/schedule/certPrint/certDetail.vue @@ -5,6 +5,7 @@ import dayjs from 'dayjs' import type { ICertification } from './cert-interface' import filePreviewDialog from './components/filePreviewDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import { printJSON, printPdf } from '@/utils/printUtils' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' @@ -16,6 +17,7 @@ import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval' import { getDictByCode } from '@/api/system/dict' import type { dictType } from '@/global' +import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' const loading = ref(false) // 表单加载状态 const infoId = ref('') // 证书id @@ -31,7 +33,7 @@ const pageType = ref('detail') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const filePreviewDialogRef = ref() // 预览弹窗ref -const approvalDialog = ref() // 审批对话ref +const approvalDialogPart = ref() // 审批对话ref // 从路由中获取页面类型参数 const $route = useRoute() @@ -161,6 +163,8 @@ const getInfo = (id: string | number) => { certificatePrintDetail({ id }).then((res) => { dataForm.value = res.data + printStatus.value = res.data.printStatus // 打印状态 + printFileName.value = res.data.printFileName // 打印文件名 dataForm.value.createTime = res.data.createTime.split('T')[0] }) } @@ -225,39 +229,12 @@ close() // 返回上一页 } // 审批 -const handleApprove = (val: string, title = '') => { - if (val === '取消') { - const params = { - processInstanceId: processId.value!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - cancelApproval(params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - close() - }) - }) +const handleDistribute = (status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', taskId.value) } - else if (val === '同意') { - approvalDialog.value.initDialog('agree', taskId.value) - } - else if (val === '驳回') { - approvalDialog.value.initDialog('reject', taskId.value) - } - else if (val === '拒绝') { - approvalDialog.value.initDialog('refuse', taskId.value) + else { + approvalDialogPart.value.initDialog('refuse', taskId, infoId.value) } } const approvalRecordData = ref([]) // 审批流程数据 @@ -278,8 +255,8 @@ onMounted(() => { infoId.value = $route.query.id as string - printStatus.value = $route.query.printStatus as string// 打印状态 - printFileName.value = $route.query.printFileName as string// 打印文件名 + // printStatus.value = $route.query.printStatus as string// 打印状态 + // printFileName.value = $route.query.printFileName as string// 打印文件名 approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称 taskId.value = $route.query.taskId as string // 流程id decisionItem.value = $route.query.decisionItem as string // 流程id @@ -296,18 +273,24 @@ diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index e52f540..43ba781 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -456,7 +456,7 @@ 同意 - + 拒绝 diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index fa95971..862a2ee 100644 --- a/src/utils/scheduleDict.ts +++ b/src/utils/scheduleDict.ts @@ -54,9 +54,9 @@ [SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS]: '/lab/reportOnCredentialsApproval', // 证书报告, [SCHEDULE.BUSINESS_SUBPACKAGE_APPLY]: '/subpackage/itemApply', // 分包项目申请, [SCHEDULE.BUSINESS_SUBPACKAGE_CHECK]: '/subpackage/itemCheck', // 分包项目验收, - // [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, + [SCHEDULE.BUSINESS_SUBPACKAGE_RECORD]: '/subpackage/archives', // 分包方档案, [SCHEDULE.BUSINESS_SUBPACKAGE_APPROVE]: '/subpackage/qualificationApprove', // 分包方资格资格审批, - // [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, + [SCHEDULE.BUSINESS_SUBPACKAGE_MANAGE]: '/subpackage/certificate', // 分包方证书管理, [SCHEDULE.BUSINESS_FIELDTEST_APPROVE]: '/fieldTest/approve', // 现场检测审批, [SCHEDULE.BUSINESS_FINANCE_CONTRACT_APPROVE]: '/contractManagement/list', // 合同审批, } diff --git a/src/views/business/schedule/certPrint/certDetail.vue b/src/views/business/schedule/certPrint/certDetail.vue index 2efaf19..b3d2493 100644 --- a/src/views/business/schedule/certPrint/certDetail.vue +++ b/src/views/business/schedule/certPrint/certDetail.vue @@ -5,6 +5,7 @@ import dayjs from 'dayjs' import type { ICertification } from './cert-interface' import filePreviewDialog from './components/filePreviewDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import { printJSON, printPdf } from '@/utils/printUtils' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' @@ -16,6 +17,7 @@ import { cancelApproval, fetchApproval, submitApproval } from '@/api/approval' import { getDictByCode } from '@/api/system/dict' import type { dictType } from '@/global' +import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' const loading = ref(false) // 表单加载状态 const infoId = ref('') // 证书id @@ -31,7 +33,7 @@ const pageType = ref('detail') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const filePreviewDialogRef = ref() // 预览弹窗ref -const approvalDialog = ref() // 审批对话ref +const approvalDialogPart = ref() // 审批对话ref // 从路由中获取页面类型参数 const $route = useRoute() @@ -161,6 +163,8 @@ const getInfo = (id: string | number) => { certificatePrintDetail({ id }).then((res) => { dataForm.value = res.data + printStatus.value = res.data.printStatus // 打印状态 + printFileName.value = res.data.printFileName // 打印文件名 dataForm.value.createTime = res.data.createTime.split('T')[0] }) } @@ -225,39 +229,12 @@ close() // 返回上一页 } // 审批 -const handleApprove = (val: string, title = '') => { - if (val === '取消') { - const params = { - processInstanceId: processId.value!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - cancelApproval(params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - close() - }) - }) +const handleDistribute = (status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', taskId.value) } - else if (val === '同意') { - approvalDialog.value.initDialog('agree', taskId.value) - } - else if (val === '驳回') { - approvalDialog.value.initDialog('reject', taskId.value) - } - else if (val === '拒绝') { - approvalDialog.value.initDialog('refuse', taskId.value) + else { + approvalDialogPart.value.initDialog('refuse', taskId, infoId.value) } } const approvalRecordData = ref([]) // 审批流程数据 @@ -278,8 +255,8 @@ onMounted(() => { infoId.value = $route.query.id as string - printStatus.value = $route.query.printStatus as string// 打印状态 - printFileName.value = $route.query.printFileName as string// 打印文件名 + // printStatus.value = $route.query.printStatus as string// 打印状态 + // printFileName.value = $route.query.printFileName as string// 打印文件名 approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称 taskId.value = $route.query.taskId as string // 流程id decisionItem.value = $route.query.decisionItem as string // 流程id @@ -296,18 +273,24 @@ diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index e52f540..43ba781 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -456,7 +456,7 @@ 同意 - + 拒绝 diff --git a/src/views/workbench/approve/useChangePage.ts b/src/views/workbench/approve/useChangePage.ts index a04d0d0..bc3d46b 100644 --- a/src/views/workbench/approve/useChangePage.ts +++ b/src/views/workbench/approve/useChangePage.ts @@ -237,6 +237,17 @@ } else if (url === '/schedule/certPrintList') { // 证书打印 - + $router.push({ + path: '/schedule/certPrintDetail', + query: { + approvalStatusName, // 审批状态名称 + printFileName: row.printFileName, + printStatus: row.printStatus, // 证书打印状态 + processId: row.processId, // 流程实例 + decisionItem: `${row.decisionItem}`, // 控制同意、驳回、拒绝按钮 + taskId: row.taskId, // 任务id,用于同意、驳回、拒绝审批 + id: row.businessId, // 业务主键id + }, + }) } }