diff --git a/src/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 9775e03..4d994b1 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -257,8 +257,8 @@ }, }, { - path: 'cert/detail/:id?', - name: 'certPrintDetail', + path: 'certPrintDetail', + name: 'CertPrintDetail', component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), meta: { title: '证书详情', diff --git a/src/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 9775e03..4d994b1 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -257,8 +257,8 @@ }, }, { - path: 'cert/detail/:id?', - name: 'certPrintDetail', + path: 'certPrintDetail', + name: 'CertPrintDetail', component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), meta: { title: '证书详情', diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 862a2ee..fa95971 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/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 9775e03..4d994b1 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -257,8 +257,8 @@ }, }, { - path: 'cert/detail/:id?', - name: 'certPrintDetail', + path: 'certPrintDetail', + name: 'CertPrintDetail', component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), meta: { title: '证书详情', diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 862a2ee..fa95971 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/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index caeeae4..bff6216 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -52,6 +52,8 @@ reason?: string // 操作原因 sampleId?: string // 样品id status?: string // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5) + processId?: string // 流程实例id + decisionItem?: string | number // 控制同意、驳回、拒绝按钮 } // 证书详情副本 @@ -96,6 +98,8 @@ // 证书详情 export interface ICertification { + originalRecordCode: string // 原始记录编号 + measureCategory: string// '检校类别' certificationId: string // 证书id certificationReportCode: string // 证书编号 certificationReportName: string // 证书名称 @@ -125,7 +129,7 @@ approvalSignName: string // 认可标志专用章 certificateReportFile: string // 证书报告附件 originalRecordId: string // 原始记录id - originalRecordCode: string // 原始记录编号 + originalRecordName: string // 原始记录名称 roomNumber: string // 检校地点 temperature: string // 温度 humidity: string // 相对湿度 @@ -136,7 +140,7 @@ delivererTel: string // 联系方式 planDeliverTime: string // 预计送达时间 requireOverTime: string // 预计检完时间 - mesureContent: string // 检定项目 + measureContent: string // 检定项目 remark: string // 备注 measureType?: string // 校验类别专业 certificateReportCode?: string // 证书编号 diff --git a/src/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 9775e03..4d994b1 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -257,8 +257,8 @@ }, }, { - path: 'cert/detail/:id?', - name: 'certPrintDetail', + path: 'certPrintDetail', + name: 'CertPrintDetail', component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), meta: { title: '证书详情', diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 862a2ee..fa95971 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/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index caeeae4..bff6216 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -52,6 +52,8 @@ reason?: string // 操作原因 sampleId?: string // 样品id status?: string // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5) + processId?: string // 流程实例id + decisionItem?: string | number // 控制同意、驳回、拒绝按钮 } // 证书详情副本 @@ -96,6 +98,8 @@ // 证书详情 export interface ICertification { + originalRecordCode: string // 原始记录编号 + measureCategory: string// '检校类别' certificationId: string // 证书id certificationReportCode: string // 证书编号 certificationReportName: string // 证书名称 @@ -125,7 +129,7 @@ approvalSignName: string // 认可标志专用章 certificateReportFile: string // 证书报告附件 originalRecordId: string // 原始记录id - originalRecordCode: string // 原始记录编号 + originalRecordName: string // 原始记录名称 roomNumber: string // 检校地点 temperature: string // 温度 humidity: string // 相对湿度 @@ -136,7 +140,7 @@ delivererTel: string // 联系方式 planDeliverTime: string // 预计送达时间 requireOverTime: string // 预计检完时间 - mesureContent: string // 检定项目 + measureContent: string // 检定项目 remark: string // 备注 measureType?: string // 校验类别专业 certificateReportCode?: string // 证书编号 diff --git a/src/views/business/schedule/certPrint/certDetail.vue b/src/views/business/schedule/certPrint/certDetail.vue index 62a3193..2efaf19 100644 --- a/src/views/business/schedule/certPrint/certDetail.vue +++ b/src/views/business/schedule/certPrint/certDetail.vue @@ -1,25 +1,38 @@ @@ -203,6 +296,18 @@ diff --git a/src/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 9775e03..4d994b1 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -257,8 +257,8 @@ }, }, { - path: 'cert/detail/:id?', - name: 'certPrintDetail', + path: 'certPrintDetail', + name: 'CertPrintDetail', component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), meta: { title: '证书详情', diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 862a2ee..fa95971 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/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index caeeae4..bff6216 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -52,6 +52,8 @@ reason?: string // 操作原因 sampleId?: string // 样品id status?: string // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5) + processId?: string // 流程实例id + decisionItem?: string | number // 控制同意、驳回、拒绝按钮 } // 证书详情副本 @@ -96,6 +98,8 @@ // 证书详情 export interface ICertification { + originalRecordCode: string // 原始记录编号 + measureCategory: string// '检校类别' certificationId: string // 证书id certificationReportCode: string // 证书编号 certificationReportName: string // 证书名称 @@ -125,7 +129,7 @@ approvalSignName: string // 认可标志专用章 certificateReportFile: string // 证书报告附件 originalRecordId: string // 原始记录id - originalRecordCode: string // 原始记录编号 + originalRecordName: string // 原始记录名称 roomNumber: string // 检校地点 temperature: string // 温度 humidity: string // 相对湿度 @@ -136,7 +140,7 @@ delivererTel: string // 联系方式 planDeliverTime: string // 预计送达时间 requireOverTime: string // 预计检完时间 - mesureContent: string // 检定项目 + measureContent: string // 检定项目 remark: string // 备注 measureType?: string // 校验类别专业 certificateReportCode?: string // 证书编号 diff --git a/src/views/business/schedule/certPrint/certDetail.vue b/src/views/business/schedule/certPrint/certDetail.vue index 62a3193..2efaf19 100644 --- a/src/views/business/schedule/certPrint/certDetail.vue +++ b/src/views/business/schedule/certPrint/certDetail.vue @@ -1,25 +1,38 @@ @@ -203,6 +296,18 @@ diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index 94b64d9..e52f540 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -105,7 +105,7 @@ { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, { text: '委托书编号', value: 'orderNo', width: '160', align: 'center' }, { text: '检校类别', value: 'measureTypeName', width: '120', align: 'center' }, - { text: '检定人员', value: 'measurePersonId', align: 'center' }, + { text: '检定人员', value: 'measurePersonName', align: 'center' }, { text: '证书类型', value: 'certificateTypeName', align: 'center' }, // { text: '打印状态', value: 'printNum', align: 'center', width: '85px', filter: (row: ICerPrintList) => { var cnum = ['未打印', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']; return row.printNum == 0 ? '未打印' : `${cnum[parseInt(row.printNum as string)]}次打印` } }, { text: '打印状态', value: 'printStatusName', align: 'center', width: '85' }, @@ -185,7 +185,19 @@ } // 点击详情 const handleDetail = (row: ICerPrintList) => { - $router.push(`/schedule/cert/detail/${row.certificationId}?pageType=detail&printStatus=${row.printStatus}&id=${row.id}&printFileName=${row.printFileName}`) + $router.push({ + // path: `/schedule/cert/detail/${row.certificationId}?pageType=detail&printStatus=${row.printStatus}&id=${row.id}&printFileName=${row.printFileName}`, + path: '/schedule/certPrintDetail', + query: { + approvalStatusName: row.approvalStatusName, // 审批状态名称 + printFileName: row.printFileName, + printStatus: row.printStatus, // 证书打印状态 + processId: row.processId, // 流程实例 + decisionItem: `${row.decisionItem}`, // 控制同意、驳回、拒绝按钮 + taskId: row.taskId, // 任务id,用于同意、驳回、拒绝审批 + id: row.id, + }, + }) } // 审批 @@ -279,25 +291,25 @@ // proxy.$refs.pdf.print() // download(url, row.printFileName as string) }) - const loading = ElLoading.service({ - lock: true, - background: 'rgba(255, 255, 255, 0.8)', - }) - getPdfStream(row.printFileName as string).then((res) => { - const blob = new Blob([res.data], { type: 'application/pdf' }) - var date = (new Date()).getTime() - var ifr = document.createElement('iframe') - // ifr.style.frameborder = 'no' - ifr.style.display = 'none' - ifr.style.pageBreakBefore = 'always' - ifr.setAttribute('id', `printPdf${date}`) - ifr.setAttribute('name', `printPdf${date}`) - ifr.src = window.URL.createObjectURL(blob) - document.body.appendChild(ifr) - doPrint(`printPdf${date}`) - window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 - loading.close() - }) + // const loading = ElLoading.service({ + // lock: true, + // background: 'rgba(255, 255, 255, 0.8)', + // }) + // getPdfStream(row.printFileName as string).then((res) => { + // const blob = new Blob([res.data], { type: 'application/pdf' }) + // var date = (new Date()).getTime() + // var ifr = document.createElement('iframe') + // // ifr.style.frameborder = 'no' + // ifr.style.display = 'none' + // ifr.style.pageBreakBefore = 'always' + // ifr.setAttribute('id', `printPdf${date}`) + // ifr.setAttribute('name', `printPdf${date}`) + // ifr.src = window.URL.createObjectURL(blob) + // document.body.appendChild(ifr) + // doPrint(`printPdf${date}`) + // window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 + // loading.close() + // }) }) } else { @@ -313,51 +325,21 @@ ).then(() => { submitApproval({ id: row.id, formId: listQuery.value.formId }).then((res) => { console.log(res) - if (res === 200) { - ElMessageBox.confirm( - '已经发送申请!', - '确认操作', - { - type: 'success', - }, - ) + if (res.code === 200) { + // ElMessageBox.confirm( + // '已经发送申请!', + // '确认操作', + // { + // type: 'success', + // }, + // ) + ElMessage.success('申请已发送') + fetchData(true) } }) }) } } -// var printObj = ref({ -// // asyncUrl : 'http://111.198.10.15:21408/test/测试_1680242558223_1681889965885.pdf', -// // asyncUrl(reslove) { -// // getPhotoUrl(row.printFileName as string).then((res) => { -// // const url = res.data -// // console.log(url) - -// // pdfUrl.value = res.data -// // console.log(pdfUrl.value) -// // reslove('http://111.198.10.15:21408/test/测试_1680242558223_1681889965885.pdf') -// // // printPdf(res.data) - -// // // pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdf.worker.js' -// // // proxy.$refs.pdf.print() -// // // download(url, row.printFileName as string) -// // }) -// // }, -// // id: 'printBox', // 这里的id就是上面我们的打印区域id,实现指哪打哪 -// // popTitle: '配置页眉标题', // 打印配置页上方的标题 -// // extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割 -// // preview: false, // 是否启动预览模式,默认是false -// // previewTitle: '预览的标题', // 打印预览的标题 -// // previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印 -// // zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高 -// // previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback -// // previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback -// // beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback -// // openCallback() { console.log('执行打印了!') }, // 调用打印时的callback -// // closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消) -// // clickMounted() { console.log('点击v-print绑定的按钮了!') }, - -// }) // 打印列表 function printList() { // 打印列 @@ -446,7 +428,6 @@ 打印 --> - + 打印 diff --git a/src/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 9775e03..4d994b1 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -257,8 +257,8 @@ }, }, { - path: 'cert/detail/:id?', - name: 'certPrintDetail', + path: 'certPrintDetail', + name: 'CertPrintDetail', component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), meta: { title: '证书详情', diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 862a2ee..fa95971 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/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index caeeae4..bff6216 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -52,6 +52,8 @@ reason?: string // 操作原因 sampleId?: string // 样品id status?: string // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5) + processId?: string // 流程实例id + decisionItem?: string | number // 控制同意、驳回、拒绝按钮 } // 证书详情副本 @@ -96,6 +98,8 @@ // 证书详情 export interface ICertification { + originalRecordCode: string // 原始记录编号 + measureCategory: string// '检校类别' certificationId: string // 证书id certificationReportCode: string // 证书编号 certificationReportName: string // 证书名称 @@ -125,7 +129,7 @@ approvalSignName: string // 认可标志专用章 certificateReportFile: string // 证书报告附件 originalRecordId: string // 原始记录id - originalRecordCode: string // 原始记录编号 + originalRecordName: string // 原始记录名称 roomNumber: string // 检校地点 temperature: string // 温度 humidity: string // 相对湿度 @@ -136,7 +140,7 @@ delivererTel: string // 联系方式 planDeliverTime: string // 预计送达时间 requireOverTime: string // 预计检完时间 - mesureContent: string // 检定项目 + measureContent: string // 检定项目 remark: string // 备注 measureType?: string // 校验类别专业 certificateReportCode?: string // 证书编号 diff --git a/src/views/business/schedule/certPrint/certDetail.vue b/src/views/business/schedule/certPrint/certDetail.vue index 62a3193..2efaf19 100644 --- a/src/views/business/schedule/certPrint/certDetail.vue +++ b/src/views/business/schedule/certPrint/certDetail.vue @@ -1,25 +1,38 @@ @@ -203,6 +296,18 @@ diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index 94b64d9..e52f540 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -105,7 +105,7 @@ { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, { text: '委托书编号', value: 'orderNo', width: '160', align: 'center' }, { text: '检校类别', value: 'measureTypeName', width: '120', align: 'center' }, - { text: '检定人员', value: 'measurePersonId', align: 'center' }, + { text: '检定人员', value: 'measurePersonName', align: 'center' }, { text: '证书类型', value: 'certificateTypeName', align: 'center' }, // { text: '打印状态', value: 'printNum', align: 'center', width: '85px', filter: (row: ICerPrintList) => { var cnum = ['未打印', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']; return row.printNum == 0 ? '未打印' : `${cnum[parseInt(row.printNum as string)]}次打印` } }, { text: '打印状态', value: 'printStatusName', align: 'center', width: '85' }, @@ -185,7 +185,19 @@ } // 点击详情 const handleDetail = (row: ICerPrintList) => { - $router.push(`/schedule/cert/detail/${row.certificationId}?pageType=detail&printStatus=${row.printStatus}&id=${row.id}&printFileName=${row.printFileName}`) + $router.push({ + // path: `/schedule/cert/detail/${row.certificationId}?pageType=detail&printStatus=${row.printStatus}&id=${row.id}&printFileName=${row.printFileName}`, + path: '/schedule/certPrintDetail', + query: { + approvalStatusName: row.approvalStatusName, // 审批状态名称 + printFileName: row.printFileName, + printStatus: row.printStatus, // 证书打印状态 + processId: row.processId, // 流程实例 + decisionItem: `${row.decisionItem}`, // 控制同意、驳回、拒绝按钮 + taskId: row.taskId, // 任务id,用于同意、驳回、拒绝审批 + id: row.id, + }, + }) } // 审批 @@ -279,25 +291,25 @@ // proxy.$refs.pdf.print() // download(url, row.printFileName as string) }) - const loading = ElLoading.service({ - lock: true, - background: 'rgba(255, 255, 255, 0.8)', - }) - getPdfStream(row.printFileName as string).then((res) => { - const blob = new Blob([res.data], { type: 'application/pdf' }) - var date = (new Date()).getTime() - var ifr = document.createElement('iframe') - // ifr.style.frameborder = 'no' - ifr.style.display = 'none' - ifr.style.pageBreakBefore = 'always' - ifr.setAttribute('id', `printPdf${date}`) - ifr.setAttribute('name', `printPdf${date}`) - ifr.src = window.URL.createObjectURL(blob) - document.body.appendChild(ifr) - doPrint(`printPdf${date}`) - window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 - loading.close() - }) + // const loading = ElLoading.service({ + // lock: true, + // background: 'rgba(255, 255, 255, 0.8)', + // }) + // getPdfStream(row.printFileName as string).then((res) => { + // const blob = new Blob([res.data], { type: 'application/pdf' }) + // var date = (new Date()).getTime() + // var ifr = document.createElement('iframe') + // // ifr.style.frameborder = 'no' + // ifr.style.display = 'none' + // ifr.style.pageBreakBefore = 'always' + // ifr.setAttribute('id', `printPdf${date}`) + // ifr.setAttribute('name', `printPdf${date}`) + // ifr.src = window.URL.createObjectURL(blob) + // document.body.appendChild(ifr) + // doPrint(`printPdf${date}`) + // window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 + // loading.close() + // }) }) } else { @@ -313,51 +325,21 @@ ).then(() => { submitApproval({ id: row.id, formId: listQuery.value.formId }).then((res) => { console.log(res) - if (res === 200) { - ElMessageBox.confirm( - '已经发送申请!', - '确认操作', - { - type: 'success', - }, - ) + if (res.code === 200) { + // ElMessageBox.confirm( + // '已经发送申请!', + // '确认操作', + // { + // type: 'success', + // }, + // ) + ElMessage.success('申请已发送') + fetchData(true) } }) }) } } -// var printObj = ref({ -// // asyncUrl : 'http://111.198.10.15:21408/test/测试_1680242558223_1681889965885.pdf', -// // asyncUrl(reslove) { -// // getPhotoUrl(row.printFileName as string).then((res) => { -// // const url = res.data -// // console.log(url) - -// // pdfUrl.value = res.data -// // console.log(pdfUrl.value) -// // reslove('http://111.198.10.15:21408/test/测试_1680242558223_1681889965885.pdf') -// // // printPdf(res.data) - -// // // pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdf.worker.js' -// // // proxy.$refs.pdf.print() -// // // download(url, row.printFileName as string) -// // }) -// // }, -// // id: 'printBox', // 这里的id就是上面我们的打印区域id,实现指哪打哪 -// // popTitle: '配置页眉标题', // 打印配置页上方的标题 -// // extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割 -// // preview: false, // 是否启动预览模式,默认是false -// // previewTitle: '预览的标题', // 打印预览的标题 -// // previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印 -// // zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高 -// // previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback -// // previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback -// // beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback -// // openCallback() { console.log('执行打印了!') }, // 调用打印时的callback -// // closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消) -// // clickMounted() { console.log('点击v-print绑定的按钮了!') }, - -// }) // 打印列表 function printList() { // 打印列 @@ -446,7 +428,6 @@ 打印 --> - + 打印 diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue index 17c8b15..229ddf1 100644 --- a/src/views/business/schedule/components/terminateDialog.vue +++ b/src/views/business/schedule/components/terminateDialog.vue @@ -36,6 +36,7 @@ // dataFormRef.value!.clearValidate() formData.value.orderId = row.orderId formData.value.sampleId = row.sampleId + formData.value.reason = '' dialogVisible.value = true } // 提交表单 @@ -49,7 +50,7 @@ // { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }, // ).then(() => { btnLoading.value = true - interchangeListTerminate(formData.value).then((res) => { + interchangeListTerminate([formData.value]).then((res) => { ElMessage.success('操作成功') btnLoading.value = false dialogVisible.value = false diff --git a/src/api/business/schedule/interchangeList.ts b/src/api/business/schedule/interchangeList.ts index 68eb8a8..be53180 100644 --- a/src/api/business/schedule/interchangeList.ts +++ b/src/api/business/schedule/interchangeList.ts @@ -24,7 +24,7 @@ } // 更改状态-回退、收入、归还、无需检测 按钮 -export function interchangeStatusChange(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeStatusChange(data: any) { return request({ url: '/device/dispatch/status/change', method: 'post', @@ -42,7 +42,7 @@ } // 根据样品id终止、完成 -export function interchangeListTerminate(data: { orderId: string | number; reason: string; sampleId: string | number; status: string }) { +export function interchangeListTerminate(data: any) { return request({ url: '/device/dispatch/terminate', method: 'post', diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 9775e03..4d994b1 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -257,8 +257,8 @@ }, }, { - path: 'cert/detail/:id?', - name: 'certPrintDetail', + path: 'certPrintDetail', + name: 'CertPrintDetail', component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), meta: { title: '证书详情', diff --git a/src/utils/scheduleDict.ts b/src/utils/scheduleDict.ts index 862a2ee..fa95971 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/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index caeeae4..bff6216 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -52,6 +52,8 @@ reason?: string // 操作原因 sampleId?: string // 样品id status?: string // 状态变更(无需检测状态7,收入状态2,归还6,回退状态2.5.1,终止5) + processId?: string // 流程实例id + decisionItem?: string | number // 控制同意、驳回、拒绝按钮 } // 证书详情副本 @@ -96,6 +98,8 @@ // 证书详情 export interface ICertification { + originalRecordCode: string // 原始记录编号 + measureCategory: string// '检校类别' certificationId: string // 证书id certificationReportCode: string // 证书编号 certificationReportName: string // 证书名称 @@ -125,7 +129,7 @@ approvalSignName: string // 认可标志专用章 certificateReportFile: string // 证书报告附件 originalRecordId: string // 原始记录id - originalRecordCode: string // 原始记录编号 + originalRecordName: string // 原始记录名称 roomNumber: string // 检校地点 temperature: string // 温度 humidity: string // 相对湿度 @@ -136,7 +140,7 @@ delivererTel: string // 联系方式 planDeliverTime: string // 预计送达时间 requireOverTime: string // 预计检完时间 - mesureContent: string // 检定项目 + measureContent: string // 检定项目 remark: string // 备注 measureType?: string // 校验类别专业 certificateReportCode?: string // 证书编号 diff --git a/src/views/business/schedule/certPrint/certDetail.vue b/src/views/business/schedule/certPrint/certDetail.vue index 62a3193..2efaf19 100644 --- a/src/views/business/schedule/certPrint/certDetail.vue +++ b/src/views/business/schedule/certPrint/certDetail.vue @@ -1,25 +1,38 @@ @@ -203,6 +296,18 @@ diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index 94b64d9..e52f540 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -105,7 +105,7 @@ { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, { text: '委托书编号', value: 'orderNo', width: '160', align: 'center' }, { text: '检校类别', value: 'measureTypeName', width: '120', align: 'center' }, - { text: '检定人员', value: 'measurePersonId', align: 'center' }, + { text: '检定人员', value: 'measurePersonName', align: 'center' }, { text: '证书类型', value: 'certificateTypeName', align: 'center' }, // { text: '打印状态', value: 'printNum', align: 'center', width: '85px', filter: (row: ICerPrintList) => { var cnum = ['未打印', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']; return row.printNum == 0 ? '未打印' : `${cnum[parseInt(row.printNum as string)]}次打印` } }, { text: '打印状态', value: 'printStatusName', align: 'center', width: '85' }, @@ -185,7 +185,19 @@ } // 点击详情 const handleDetail = (row: ICerPrintList) => { - $router.push(`/schedule/cert/detail/${row.certificationId}?pageType=detail&printStatus=${row.printStatus}&id=${row.id}&printFileName=${row.printFileName}`) + $router.push({ + // path: `/schedule/cert/detail/${row.certificationId}?pageType=detail&printStatus=${row.printStatus}&id=${row.id}&printFileName=${row.printFileName}`, + path: '/schedule/certPrintDetail', + query: { + approvalStatusName: row.approvalStatusName, // 审批状态名称 + printFileName: row.printFileName, + printStatus: row.printStatus, // 证书打印状态 + processId: row.processId, // 流程实例 + decisionItem: `${row.decisionItem}`, // 控制同意、驳回、拒绝按钮 + taskId: row.taskId, // 任务id,用于同意、驳回、拒绝审批 + id: row.id, + }, + }) } // 审批 @@ -279,25 +291,25 @@ // proxy.$refs.pdf.print() // download(url, row.printFileName as string) }) - const loading = ElLoading.service({ - lock: true, - background: 'rgba(255, 255, 255, 0.8)', - }) - getPdfStream(row.printFileName as string).then((res) => { - const blob = new Blob([res.data], { type: 'application/pdf' }) - var date = (new Date()).getTime() - var ifr = document.createElement('iframe') - // ifr.style.frameborder = 'no' - ifr.style.display = 'none' - ifr.style.pageBreakBefore = 'always' - ifr.setAttribute('id', `printPdf${date}`) - ifr.setAttribute('name', `printPdf${date}`) - ifr.src = window.URL.createObjectURL(blob) - document.body.appendChild(ifr) - doPrint(`printPdf${date}`) - window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 - loading.close() - }) + // const loading = ElLoading.service({ + // lock: true, + // background: 'rgba(255, 255, 255, 0.8)', + // }) + // getPdfStream(row.printFileName as string).then((res) => { + // const blob = new Blob([res.data], { type: 'application/pdf' }) + // var date = (new Date()).getTime() + // var ifr = document.createElement('iframe') + // // ifr.style.frameborder = 'no' + // ifr.style.display = 'none' + // ifr.style.pageBreakBefore = 'always' + // ifr.setAttribute('id', `printPdf${date}`) + // ifr.setAttribute('name', `printPdf${date}`) + // ifr.src = window.URL.createObjectURL(blob) + // document.body.appendChild(ifr) + // doPrint(`printPdf${date}`) + // window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 + // loading.close() + // }) }) } else { @@ -313,51 +325,21 @@ ).then(() => { submitApproval({ id: row.id, formId: listQuery.value.formId }).then((res) => { console.log(res) - if (res === 200) { - ElMessageBox.confirm( - '已经发送申请!', - '确认操作', - { - type: 'success', - }, - ) + if (res.code === 200) { + // ElMessageBox.confirm( + // '已经发送申请!', + // '确认操作', + // { + // type: 'success', + // }, + // ) + ElMessage.success('申请已发送') + fetchData(true) } }) }) } } -// var printObj = ref({ -// // asyncUrl : 'http://111.198.10.15:21408/test/测试_1680242558223_1681889965885.pdf', -// // asyncUrl(reslove) { -// // getPhotoUrl(row.printFileName as string).then((res) => { -// // const url = res.data -// // console.log(url) - -// // pdfUrl.value = res.data -// // console.log(pdfUrl.value) -// // reslove('http://111.198.10.15:21408/test/测试_1680242558223_1681889965885.pdf') -// // // printPdf(res.data) - -// // // pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdf.worker.js' -// // // proxy.$refs.pdf.print() -// // // download(url, row.printFileName as string) -// // }) -// // }, -// // id: 'printBox', // 这里的id就是上面我们的打印区域id,实现指哪打哪 -// // popTitle: '配置页眉标题', // 打印配置页上方的标题 -// // extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割 -// // preview: false, // 是否启动预览模式,默认是false -// // previewTitle: '预览的标题', // 打印预览的标题 -// // previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印 -// // zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高 -// // previewBeforeOpenCallback() { console.log('正在加载预览窗口!') }, // 预览窗口打开之前的callback -// // previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback -// // beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback -// // openCallback() { console.log('执行打印了!') }, // 调用打印时的callback -// // closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消) -// // clickMounted() { console.log('点击v-print绑定的按钮了!') }, - -// }) // 打印列表 function printList() { // 打印列 @@ -446,7 +428,6 @@ 打印 --> - + 打印 diff --git a/src/views/business/schedule/components/terminateDialog.vue b/src/views/business/schedule/components/terminateDialog.vue index 17c8b15..229ddf1 100644 --- a/src/views/business/schedule/components/terminateDialog.vue +++ b/src/views/business/schedule/components/terminateDialog.vue @@ -36,6 +36,7 @@ // dataFormRef.value!.clearValidate() formData.value.orderId = row.orderId formData.value.sampleId = row.sampleId + formData.value.reason = '' dialogVisible.value = true } // 提交表单 @@ -49,7 +50,7 @@ // { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }, // ).then(() => { btnLoading.value = true - interchangeListTerminate(formData.value).then((res) => { + interchangeListTerminate([formData.value]).then((res) => { ElMessage.success('操作成功') btnLoading.value = false dialogVisible.value = false diff --git a/src/views/business/schedule/interchange/interchangeList.vue b/src/views/business/schedule/interchange/interchangeList.vue index 13f6364..a5b5403 100644 --- a/src/views/business/schedule/interchange/interchangeList.vue +++ b/src/views/business/schedule/interchange/interchangeList.vue @@ -21,6 +21,7 @@ import type { IMenu } from '@/components/buttonBox/buttonBox' import buttonBox from '@/components/buttonBox/buttonBox.vue' import { tagBinding } from '@/api/reader' +import { Settings } from '@/global' const { proxy } = getCurrentInstance() as any const $router = useRouter() const menu = ref([]) // 右上角菜单 @@ -252,7 +253,22 @@ } // 操作 -const handleEdit = (row: IinterchangeList, type: string, title: string) => { +const handleEdit = (row: any, type: string, title: string) => { + console.log(row) + let params = [] as any + if (Array.isArray(row)) { + params = row.map((item: any) => { + return { + orderId: item.orderId, + reason: '', + sampleId: item.sampleId, + } + }) + } + else { + params = row + } + ElMessageBox.confirm( `确认${title}吗?`, '提示', @@ -264,7 +280,10 @@ ) .then(() => { if (type === 'take') { // 收入 - interchangeStatusChange({ orderId: row.orderId, reason: '', sampleId: row.sampleId, status: '2' }).then((res) => { + params.forEach((item: any) => { + item.status = '2' + }) + interchangeStatusChange(params).then((res) => { if (res.code === 200) { ElMessage.success(`已${title}`) fetchData(true) @@ -272,7 +291,10 @@ }) } else if (type === 'delete') { // 无需检测 - interchangeStatusChange({ orderId: row.orderId, reason: '', sampleId: row.sampleId, status: '7' }).then((res) => { + params.forEach((item: any) => { + item.status = '7' + }) + interchangeStatusChange(params).then((res) => { if (res.code === 200) { ElMessage.success('操作成功') fetchData(true) @@ -280,7 +302,10 @@ }) } else if (type === 'complete') { // 完成 - interchangeListTerminate({ orderId: row.orderId, reason: '', sampleId: row.sampleId, status: '5' }).then((res) => { + params.forEach((item: any) => { + item.status = '5' + }) + interchangeListTerminate(params).then((res) => { if (res.code === 200) { ElMessage.success(`已${title}`) fetchData(true) @@ -288,17 +313,26 @@ }) } else if (type === 'back') { // 回退 - let status = '' + // const status = '' if (currentMenu.value === '已收入') { - status = '1' + params.forEach((item: any) => { + item.status = '1' + }) + // status = '1' } if (currentMenu.value === '待归还') { - status = '2' + // status = '2' + params.forEach((item: any) => { + item.status = '2' + }) } if (currentMenu.value === '已归还') { - status = '5' + // status = '5' + params.forEach((item: any) => { + item.status = '5' + }) } - interchangeStatusChange({ orderId: row.orderId, reason: '', sampleId: row.sampleId, status }).then((res) => { + interchangeStatusChange(params).then((res) => { if (res.code === 200) { ElMessage.success(`已${title}`) fetchData(true) @@ -306,7 +340,10 @@ }) } else if (type === 'return') { // 归还 - interchangeStatusChange({ orderId: row.orderId, reason: '', sampleId: row.sampleId, status: '6' }).then((res) => { + params.forEach((item: any) => { + item.status = '6' + }) + interchangeStatusChange(params).then((res) => { if (res.code === 200) { ElMessage.success(`已${title}`) fetchData(true) @@ -515,7 +552,7 @@