From 460d4e6dd6e34d77d39395aff8399b125a8ad3e0 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Thu, 16 May 2024 23:17:02 +0800 Subject: [PATCH] report --- src/components/report/BtnReport.vue | 2 +- src/components/sumDoctorCheck/ButtonList.vue | 101 ++++++++++--------- 2 files changed, 54 insertions(+), 49 deletions(-) diff --git a/src/components/report/BtnReport.vue b/src/components/report/BtnReport.vue index 98b1de8..27638f8 100644 --- a/src/components/report/BtnReport.vue +++ b/src/components/report/BtnReport.vue @@ -126,7 +126,7 @@ export default { if (JSON.parse(res).code < 0) { this.$message.warning({ showClose: true, message: JSON.parse(res).message }); } else { - return postapi('/api/app/patientregister/updatepatientregisterreportprinttimesmany', [this.patientRegister.patientRegisterId]); + return postapi('/api/app/patientregister/updatepatientregisterreportprinttimesmany', [this.dataTransOpts.tableS.patient_register.id]); } }) .then(res => { diff --git a/src/components/sumDoctorCheck/ButtonList.vue b/src/components/sumDoctorCheck/ButtonList.vue index 166f597..04f839e 100644 --- a/src/components/sumDoctorCheck/ButtonList.vue +++ b/src/components/sumDoctorCheck/ButtonList.vue @@ -126,7 +126,7 @@ export default { toDoctorCheck() { // this.doctorCheck.prBase = Object.assign({},this.dataTransOpts.tableS.patient_register) // this.patientRegister.photo = this.doctorCheck.prBase.photo - this.$router.push({ path: "/doctorCheck", query: { patient_register: this.dataTransOpts.tableS.patient_register} }); + this.$router.push({ path: "/doctorCheck", query: { patient_register: this.dataTransOpts.tableS.patient_register } }); }, // 按钮可用 @@ -153,9 +153,9 @@ export default { case 'reCheck': if (patientRegister.completeFlag && patientRegister.completeFlag == '3' && patientRegister.isAudit && patientRegister.isAudit == 'Y') ret = false break; - case 'report': + case 'report': ret = false - break; + break; case 'intervene': if (patientRegister.completeFlag && patientRegister.completeFlag == '3') ret = false break; @@ -200,49 +200,53 @@ export default { }, //取消总检 - btnDel() { - // let body = { - // patientRegisterId: this.dataTransOpts.tableS.patient_register.id, - // //summaryDoctor: this.dataTransOpts.tableS.patient_register.summaryDoctor, - // //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate, - // completeFlag: '2' - // } - // console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body) - // postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body) - // .then((res) => { - // console.log("del", res.data); - // if (res.code != -1) { - // this.dataTransOpts.tableS.patient_register.completeFlag = '2'; - // console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) - // return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) - // } - // }) - // .then((res) => { - // console.log("deletesumsuggestionmany", res.data); - // if (res.code != -1) { - // console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) - // return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) - // } - // }) - // .then((res) => { - // console.log("deletesumsuggestionmany", res.data); - // if (res.code != -1) { - // this.$message({ type: "success", message: `取消总检成功!` }); - // } - // }) - // .catch((err) => { - // this.$message({ type: "error", message: `取消总检失败,原因:${err}` }); - // }); + async btnDel() { + let tips = false // 已打印删除提示 + if (this.dataTransOpts.tableS.patient_register.reportPrintTimes > 0) { + let sysParmId = "summary_check_cancel_alreay_print_is_prompt" + let sysParam = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId }) + if (sysParam.data.toUpperCase() == 'Y') tips = true + } + let body = { patientRegisterId: this.dataTransOpts.tableS.patient_register.id } - postapi(`/api/app/patientregister/CancelSumCheck`, body) - .then((res) => { - if (res.code > -1) { - this.dataTransOpts.tableS.patient_register.completeFlag = '2'; - // this.dataTransOpts.refresh.patient_register.S++ - } + + if (tips) { + this.$confirm("已打印过报告, 是否继续取消总检?", "提示", { + confirmButtonText: "是", + cancelButtonText: "否", + type: "warning", }) + .then(() => { + return postapi(`/api/app/patientregister/CancelSumCheck`, body) + }) + .then((res) => { + if (res.code > -1) { + this.dataTransOpts.tableS.patient_register.completeFlag = '2'; + } + }) + .catch((err) => { + if (err != "cancel") { + this.$message.info({ showClose: true, message: err }); + } + }); + + } else { + postapi(`/api/app/patientregister/CancelSumCheck`, body) + .then((res) => { + if (res.code > -1) { + this.dataTransOpts.tableS.patient_register.completeFlag = '2'; + } + }) + } + + + + + + + }, //审核 @@ -265,7 +269,7 @@ export default { } }) .catch((err) => { - this.$message.error({ showClose: true, message: `总检审核失败,原因:${err}` }); + this.$message.error({ showClose: true, message: `总检审核失败,原因:${err}` }); }); }, @@ -307,8 +311,8 @@ export default { let user = window.sessionStorage.getItem('user'); let toOutShell = { ReportCode, token, - isBuildImage:'N', - IsUploadPdf:'N', + isBuildImage: 'N', + IsUploadPdf: 'N', preViewCanPrint: 'Y', Parameters: [ { Name: 'printer', Value: user }, @@ -322,11 +326,11 @@ export default { }; // 总检审核后才能打印 - if(this.dataTransOpts.tableS.patient_register.completeFlag != '3') toOutShell.preViewCanPrint = 'N' + if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') toOutShell.preViewCanPrint = 'N' if (toOutShell.preViewCanPrint == 'Y' && this.dataTransOpts.tableS.patient_register.isAudit == 'N') { let sysParmId = "medical_report_print_after_summary_check_is_audit" let sysParam = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId }) - if(sysParam.data.toUpperCase() == 'Y') toOutShell.preViewCanPrint = 'N' + if (sysParam.data.toUpperCase() == 'Y') toOutShell.preViewCanPrint = 'N' } // postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) @@ -477,4 +481,5 @@ export default { margin-top: 10px; margin-left: 10px; text-align: center; -} \ No newline at end of file +} + \ No newline at end of file