From 434dd0f2acb06b4a859fec7d9846152a6ab95619 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Sun, 21 Apr 2024 17:07:59 +0800 Subject: [PATCH] report --- .../doctorCheck/RegisterCheckList.vue | 6 +- src/components/report/BtnReport.vue | 385 ++---------------- .../report/PatientRegisterListNobtn.vue | 64 +-- .../report/PatientRegisterQueryNobtn.vue | 5 +- src/components/report/RegisterCheckStatus.vue | 24 +- .../sumDoctorCheck/SumAsbItemStatus.vue | 17 +- src/views/report/report.vue | 48 +-- 7 files changed, 120 insertions(+), 429 deletions(-) diff --git a/src/components/doctorCheck/RegisterCheckList.vue b/src/components/doctorCheck/RegisterCheckList.vue index e4f8b7d..81388f7 100644 --- a/src/components/doctorCheck/RegisterCheckList.vue +++ b/src/components/doctorCheck/RegisterCheckList.vue @@ -39,7 +39,9 @@ export default { created() {}, //挂载完成 - mounted() {}, + mounted() { + this.registerCheckList(this.dataTransOpts.tableS.patient_register.id) + }, computed:{ ...mapState(['window','dataTransOpts','dict','doctorCheck']), @@ -118,7 +120,7 @@ export default { watch: { //体检人员未切换时 也可以强制刷新数据 "dataTransOpts.refresh.register_check.M":{ - immediate:true, + // immediate:true, handler(newVal, oldVal) { console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`); this.registerCheckList(this.dataTransOpts.tableS.patient_register.id) diff --git a/src/components/report/BtnReport.vue b/src/components/report/BtnReport.vue index 088d3b3..3133365 100644 --- a/src/components/report/BtnReport.vue +++ b/src/components/report/BtnReport.vue @@ -10,7 +10,7 @@ 打印报告
- 领用报告 + 领用报告
@@ -36,254 +36,81 @@ export default { //挂载完成 mounted() { - + this.dataTransOpts.tableS.patient_register.id = '' + this.getPatientRegister(this.dataTransOpts.tableS.patient_register.patientRegisterNo) }, computed: { - ...mapState(["dict", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]), + ...mapState(["dict", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]), }, methods: { btnQuery() { let body = {}, customerOrgs = []; - // { - // "customerOrgs": [ - // { - // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - // "customerOrgGroupId": [ - // "3fa85f64-5717-4562-b3fc-2c963f66afa6" - // ], - // "dateType": "string", - // "startDate": "string", - // "endDate": "string" - // } - // ], - // "patientRegisterNo": "string", - // "patientNo": "string", - // "patientName": "string", - // "phone": "string", - // "completeFlag": "string", - // "isAudit": "string", - // "isReportPrint": "string", - // "medicalTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - // "personnelTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" - // } + if (this.report.dataCusOrgOCX.length > 0) { this.report.dataCusOrgOCX.forEach(e => { let rd = { startDate: moment(e.startDate).format('yyyy-MM-DD'), endDate: moment(e.endDate).format('yyyy-MM-DD'), - dateType: e.dateType == 'summaryDate' ? '3':(e.dateType == 'medicalStartDate' ? '2':'1') + dateType: e.dateType == 'summaryDate' ? '3' : (e.dateType == 'medicalStartDate' ? '2' : '1') } if (e.customerOrgId) { rd.customerOrgId = e.customerOrgId - if(e.customerOrgId == this.dict.personOrgId){ + if (e.customerOrgId == this.dict.personOrgId) { rd.customerOrgRegisterId = null rd.customerOrgGroupId = [] - }else{ + } else { rd.customerOrgRegisterId = e.customerOrgRegister.id rd.customerOrgGroupId = e.customerOrgGroupIds - } + } } customerOrgs.push(rd) }) } body.customerOrgs = customerOrgs - if(this.patientRegister.query.patientRegisterNo) body.patientRegisterNo = this.patientRegister.query.patientRegisterNo - if(this.patientRegister.query.patientNo) body.patientNo = this.patientRegister.query.patientNo - if(this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName - if(this.patientRegister.query.idCardNo) body.idCardNo = this.patientRegister.query.idCardNo - if(this.patientRegister.query.phone) body.phone = this.patientRegister.query.phone - if(this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag - if(this.patientRegister.query.isAudit) body.isAudit = this.patientRegister.query.isAudit - if(this.patientRegister.query.reportPrintTimes >= 0) body.isReportPrint = this.patientRegister.query.reportPrintTimes - if(this.patientRegister.query.isUpload) body.isUpload = this.patientRegister.query.isUpload + if (this.patientRegister.query.patientRegisterNo) body.patientRegisterNo = this.patientRegister.query.patientRegisterNo + if (this.patientRegister.query.patientNo) body.patientNo = this.patientRegister.query.patientNo + if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName + if (this.patientRegister.query.idCardNo) body.idCardNo = this.patientRegister.query.idCardNo + if (this.patientRegister.query.phone) body.phone = this.patientRegister.query.phone + if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag + if (this.patientRegister.query.isAudit) body.isAudit = this.patientRegister.query.isAudit + if (this.patientRegister.query.reportPrintTimes >= 0) body.isReportPrint = this.patientRegister.query.reportPrintTimes + if (this.patientRegister.query.isUpload) body.isUpload = this.patientRegister.query.isUpload //console.log('/api/app/peisreport/getpatientregisterreport',body) - postapi('/api/app/peisreport/getpatientregisterreport',body).then(res =>{ - if(res.code != -1){ + postapi('/api/app/peisreport/getpatientregisterreport', body).then(res => { + if (res.code != -1) { this.patientRegister.prList = res.data } }) }, - //to医生诊台 - toDoctorCheck() { - this.$router.push({ path: "/doctorCheck" }); - }, - - //操作判断 - optGrant(optType) { - let ret = '' - if (!this.dataTransOpts.tableS.patient_register.id) return '请选择体检人员' - if (this.dataTransOpts.tableS.patient_register.isLock == 'Y') return '人员已锁定,不可执行此操作' - if (optType == 'save') { - //if (!this.dataTransOpts.tableS.patient_register.summaryDoctor) return "请选择总检医生" - if (this.dataTransOpts.tableS.patient_register.completeFlag == '3') return "该人员已总检,不可再执行此操作,如需操作请点【修改】" - if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!' - } - if (optType == 'edit') { - if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,无需执行此操作" - if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!' - } - if (optType == 'del') { - if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,无需执行此操作" - if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!' - } - if (optType == 'audit') { - if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该检查项目尚未保存,不可执行此操作" - if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return "该人员检查已审核,无需再执行此操作" - } - if (optType == 'unAudit') { - if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,不可执行此操作" - if (this.dataTransOpts.tableS.patient_register.isAudit == 'N') return "该人员检查尚未审核,无需执行此操作" - } - if (optType == 'report') { - if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员检查尚未总检,不可执行此操作" - if (this.dataTransOpts.tableS.patient_register.isAudit == 'N') return "该人员检查尚未审核,不可执行此操作" - } - return ret - }, - - //保存数据 - save() { - let ret = this.optGrant('save') - if (ret) { - alert(ret) + //领用体检报告 + btnGetReport() { + if (!this.dataTransOpts.tableS.patient_register.id) { + this.$message.warning("请先选择记录!") return } - //更新总检 - this.updateSumDoctorCheck(); - - //更新综述 - this.saveSummary(); - - //更新建议 - this.saveSuggestion(); - }, - - //修改结果 - edit() { - let ret = this.optGrant('edit') - if (ret) { - alert(ret) - return - } this.dataTransOpts.tableS.patient_register.completeFlag = '2' }, - //取消结果 - del() { - 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}` }); - }); - }, - - //审核 - audit() { - let ret = this.optGrant('audit') - if (ret) { - alert(ret) - return - } - let body = { - patientRegisterId: this.dataTransOpts.tableS.patient_register.id, - //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6", - //auditDate: "string" 不传时,取当前时间 - isAudit: 'Y' - } - - console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body) - postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body) - .then((res) => { - console.log("audit", res.data); - if (res.code != -1) { - this.dataTransOpts.tableS.patient_register.isAudit = 'Y'; - this.$message({ type: "success", message: `总检审核成功` }); - } - }) - .catch((err) => { - this.$message({ type: "error", message: `总检审核失败,原因:${err}` }); - }); - }, - - //取消审核 - unAudit() { - let ret = this.optGrant('unAudit') - if (ret) { - alert(ret) - return - } - - let body = { - patientRegisterId: this.dataTransOpts.tableS.patient_register.id, - //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6", - //auditDate: "string" 不传时,取当前时间 - isAudit: 'N' - } - console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body) - postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body) - .then((res) => { - console.log("unAudit", res.data); - if (res.code != -1) { - this.dataTransOpts.tableS.patient_register.isAudit = 'N'; - this.$message({ type: "success", message: `取消总检审核成功` }); - } - }) - .catch((err) => { - this.$message({ type: "error", message: `取消总检审核失败,原因:${err}` }); - }); - }, //体检报告 async btnReport(isPreview) { - // let ret = this.optGrant('report') - // if (ret) { - // alert(ret) - // return - // } - if(!this.patientRegister.patientRegisterId){ + if (!this.dataTransOpts.tableS.patient_register.id) { this.$message.warning("请先选择记录!") return } - if(!this.$peisAPI) { + if (!this.$peisAPI) { this.$message.info("此功能,需要在壳客户端才可运行!") - return + return } ///3a0c990e-5756-2dc0-19d5-69a617fe4048 @@ -306,10 +133,10 @@ export default { let res = await postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.patientRegister.patientRegisterId}`) toOutShell.ReportTable = res.data - if(isPreview){ + if (isPreview) { this.$peisAPI.printPre(JSON.stringify(toOutShell)); - }else{ - this.$peisAPI.print(JSON.stringify(toOutShell)).then(res =>{ + } else { + this.$peisAPI.print(JSON.stringify(toOutShell)).then(res => { if (res.code != -1) { //更新打印次数 return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.patientRegister.patientRegisterId]) @@ -320,157 +147,31 @@ export default { } catch (error) { this.$message.warning(error); } - - }, - //增加建议 - addSuggtion() { - let id = String(new Date().getTime()) - let pojo = { - id, - patientRegisterId: this.dataTransOpts.tableS.patient_register.id, - details: [ - { - sumSuggestionHeaderId: id, - suggestionContent: '', - } - ] - } - this.sumDoctorCheck.suggestionList.push(pojo); }, - //复查 - reCheck() { - console.log("parseID('123456198007240000')", parseID('123456198007240000')) - let ret = this.optGrant('reCheck') - if (ret) { - alert(ret) - return - } - - }, - - //干预措施 - intervene() { - let ret = this.optGrant('intervene') - if (ret) { - alert(ret) - return - } - }, - - //更新总检 - updateSumDoctorCheck() { - let body = { - patientRegisterId: this.dataTransOpts.tableS.patient_register.id, - //summaryDoctor:this.dataTransOpts.tableS.patient_register.summaryDoctor, - //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate, - completeFlag: '3' - } - console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body) - postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body) + //按条码号查个人数据 + getPatientRegister(patientRegisterNo) { + if (!patientRegisterNo) return + postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', { patientRegisterNo }) .then((res) => { - console.log("updateSumDoctorCheck", res.data); - if (res.code != -1) { - this.dataTransOpts.tableS.patient_register.completeFlag = '3'; - this.$message({ type: "success", message: `总检保存成功!` }); + if (res.code > -1) { + this.dataTransOpts.tableS.patient_register = deepCopy(res.data) } }) - .catch((err) => { - this.$message({ type: "error", message: `总检保存失败,原因:${err}` }); - }); - }, - - //更新综述 - saveSummary() { - let body = [] - this.sumDoctorCheck.summaryList.forEach(item => { - delete item.id; - delete item.summaryFlag; - delete item.displayOrder; - - item.details.forEach(e => { - delete e.sumSummaryHeaderId; - delete e.displayOrder; - }) - body.push(item) - }); - console.log(`/api/app/sumsummaryheader/createsumsummary`, body) - if (body.length < 1) return - postapi(`/api/app/sumsummaryheader/createsumsummary`, body) - .then((res) => { - console.log("saveSummary", res.data); - if (res.code != -1) { - //this.dataTransOpts.tableS.patient_register.completeFlag = '1'; - } - }) - .catch((err) => { - this.$message({ type: "error", message: `综述保存失败,原因:${err}` }); - }); - - }, - - - //更新建议 - saveSuggestion() { - let body = [] - this.sumDoctorCheck.suggestionList.forEach(item => { - delete item.id; - delete item.suggestionFlag; - delete item.displayOrder; - - item.details.forEach(e => { - delete e.sumSuggestionHeaderId; - delete e.displayOrder; - }) - body.push(item) - }); - console.log(`/api/app/sumsuggestionheader/createsumsuggestion`, body) - if (body.length < 1) return - postapi(`/api/app/sumsuggestionheader/createsumsuggestion`, body) - .then((res) => { - console.log("saveSuggestion", res.data); - if (res.code != -1) { - //this.dataTransOpts.tableS.patient_register.completeFlag = '1'; - } - }) - .catch((err) => { - this.$message({ type: "error", message: `建议保存失败,原因:${err}` }); - }); - - }, - - addSummary() { - if (!this.dataTransOpts.tableS.patient_register.id) { - alert("请选择检查项目") - return - } - this.doctorCheck.checkSummaryList.push({ - registerCheckId: this.dataTransOpts.tableS.patient_register.id, - summary: '', - summaryFlag: 'N', - }) - this.doctorCheck.checkSuggestionList.push({ - registerCheckId: this.dataTransOpts.tableS.patient_register.id, - suggestion: '', - }) - }, }, //监听事件() watch: { - //1级单位值改变,分组改变 - "patientRegister.query.CustomerOrgParentId"(newVal, oldVal) { - console.log( - "watch patientRegister.query.CustomerOrgParentId newVal:", - newVal, - " oldVal:", - oldVal - ); - if (newVal != oldVal && newVal !== this.dict.personOrgId) { - this.getCustomerOrgGroup(newVal); + // 强制刷新人员登记信息 + "dataTransOpts.refresh.patient_register.S": { + // immediate:true, + handler(newVal, oldVal) { + console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.patientRegisterNo}`); + this.getPatientRegister(this.dataTransOpts.tableS.patient_register.patientRegisterNo) + // this.dataTransOpts.refresh.register_check.M++ } }, }, diff --git a/src/components/report/PatientRegisterListNobtn.vue b/src/components/report/PatientRegisterListNobtn.vue index 67ad8b3..f8823c8 100644 --- a/src/components/report/PatientRegisterListNobtn.vue +++ b/src/components/report/PatientRegisterListNobtn.vue @@ -1,8 +1,9 @@