diff --git a/src/api/request.js b/src/api/request.js index 729807d..15a1bfa 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -28,7 +28,7 @@ instance.interceptors.request.use( config.headers.Authorization = `${tokentype} ${token}`; return config; }, - function (err) { + function (err) { return Promise.reject(err); } ); @@ -37,8 +37,8 @@ instance.interceptors.request.use( instance.interceptors.response.use( (res) => { // console.log(res); - if (res.data.code == -1) { - Message.error(res.data.message); + if (res.data.code < 0) { + Message.error({ showClose: true, message: res.data.message }); } return res.data; }, diff --git a/src/components/doctorCheck/ButtonList.vue b/src/components/doctorCheck/ButtonList.vue index b1afd12..9cb6e03 100644 --- a/src/components/doctorCheck/ButtonList.vue +++ b/src/components/doctorCheck/ButtonList.vue @@ -10,10 +10,12 @@ 增加人员
- 编辑人员 + 编辑人员
- 删除人员 + 删除人员
上一人 @@ -27,25 +29,32 @@
-->
- 修改结果 + 修改结果
- 删除结果 + 删除结果
- 放弃明细项目检查 + 放弃明细项目检查
- 删除明细项目 + 删除明细项目
- 取消审核 + 取消审核
- 历次结果 + 历次结果
- 体检报告 + 体检报告
总检 @@ -146,7 +155,7 @@ export default { SumItems, SumHistory }, - props: ["optGrant", "addSummary", "btnMakeDiagnosis", "save", "audit", "unAudit"], + props: ["optGrant", "addSummary", "btnMakeDiagnosis", "save", "audit", "unAudit", "doctorBtnDisabled"], data() { return { @@ -526,14 +535,16 @@ export default { ], }; - postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.doctorCheck.prBase.id}`) - .then((res) => { - if (res.code > -1) { - toOutShell.ReportTable = res.data; - console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); - return this.$peisAPI.printPre(JSON.stringify(toOutShell)); - } - }) + // postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.doctorCheck.prBase.id}`) + // .then((res) => { + // if (res.code > -1) { + // toOutShell.ReportTable = res.data; + // console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); + // return this.$peisAPI.printPre(JSON.stringify(toOutShell)); + // } + // }) + toOutShell.BusinessCode = this.doctorCheck.prBase.id + this.$peisAPI.printPre(JSON.stringify(toOutShell)) .then(res => { if (res) { let lres = JSON.parse(res) @@ -598,10 +609,8 @@ export default { }, }; - \ No newline at end of file +} \ No newline at end of file diff --git a/src/components/doctorCheck/CheckPicture.vue b/src/components/doctorCheck/CheckPicture.vue index ac57efd..1007022 100644 --- a/src/components/doctorCheck/CheckPicture.vue +++ b/src/components/doctorCheck/CheckPicture.vue @@ -1,69 +1,36 @@ @@ -108,7 +59,7 @@ import moment from "moment"; import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; -import { getPagePriv,checkPagePriv, deepCopy, arrayExistObj } from "../../utlis/proFunc"; +import { getPagePriv, checkPagePriv, deepCopy, arrayExistObj } from "../../utlis/proFunc"; import CheckPictureUpload from "./CheckPictureUpload.vue"; @@ -116,13 +67,14 @@ export default { components: { CheckPictureUpload, }, + props: ["doctorBtnDisabled"], data() { return { - sysConfig:{}, // - pagePriv:{ - routeUrlorPageName:'doctorCheck', //当前页面归属路由或归属页面权限名称 - privs:[] // 页面权限 - }, + sysConfig: {}, // + pagePriv: { + routeUrlorPageName: 'doctorCheck', //当前页面归属路由或归属页面权限名称 + privs: [] // 页面权限 + }, checkPictures: [ { id: "1", @@ -150,7 +102,7 @@ export default { created() { //获取用户当前页面的权限 let userPriv = window.sessionStorage.getItem('userPriv') - if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) + if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) }, //挂载完成 @@ -208,30 +160,30 @@ export default { }, // 生成 图片预览列表 - previewSrcList(oriList,curImag){ + previewSrcList(oriList, curImag) { let srcList = [] let image = curImag.pictureFilename.indexOf('http') > -1 - ? curImag.pictureFilename - : this.sysConfig.apiUrl + curImag.pictureFilename; + ? curImag.pictureFilename + : this.sysConfig.apiUrl + curImag.pictureFilename; srcList.push(image) - let lfind = arrayExistObj(oriList,'id',curImag.id) - if(lfind > -1){ + let lfind = arrayExistObj(oriList, 'id', curImag.id) + if (lfind > -1) { for (let i = lfind + 1; i < oriList.length; i++) { let e = oriList[i]; image = e.pictureFilename.indexOf('http') > -1 - ? e.pictureFilename - : this.sysConfig.apiUrl + e.pictureFilename; + ? e.pictureFilename + : this.sysConfig.apiUrl + e.pictureFilename; srcList.push(image) } for (let index = 0; index < lfind; index++) { let e = oriList[index]; image = e.pictureFilename.indexOf('http') > -1 - ? e.pictureFilename - : this.sysConfig.apiUrl + e.pictureFilename; + ? e.pictureFilename + : this.sysConfig.apiUrl + e.pictureFilename; srcList.push(image) } } - return srcList + return srcList }, btnGetPic() { @@ -387,7 +339,8 @@ export default { margin: 2px 2px 0; height: 26px; min-width: 40px; - padding: 5px 5px; /*原始 默认值 10px 10px */ + padding: 5px 5px; + /*原始 默认值 10px 10px */ } /* 强制出现滚动条 */ diff --git a/src/components/doctorCheck/CheckSumSug.vue b/src/components/doctorCheck/CheckSumSug.vue index 72ab4a1..6357534 100644 --- a/src/components/doctorCheck/CheckSumSug.vue +++ b/src/components/doctorCheck/CheckSumSug.vue @@ -10,19 +10,19 @@
小结
- 生成小结 + 生成小结
- 新增小结 + 新增小结
- 保存结果 + 保存结果
- 审核 + 审核
- 排队 + 排队
@@ -30,12 +30,12 @@ @@ -53,7 +53,7 @@
新增建议 + :disabled="doctorBtnDisabled('addSuggestion')">新增建议
@@ -61,12 +61,12 @@ @@ -82,7 +82,7 @@ import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getPagePriv, checkPagePriv, deepCopy } from "../../utlis/proFunc"; export default { components: {}, - props: ["registerCheckId", "isCheckPicture", "optGrant", "addSummary", "btnMakeDiagnosis", "save", "audit", "unAudit", "btnLineUp"], + props: ["registerCheckId", "isCheckPicture", "optGrant", "addSummary", "btnMakeDiagnosis", "save", "audit", "unAudit", "btnLineUp","doctorBtnDisabled"], data() { return { pagePriv: { diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 72a58e6..ef92848 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -405,7 +405,7 @@ export default { } if (isPreview) { - // + /* //this.multipleSelection.forEach((item,index) =>{ postapi( `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}` @@ -430,20 +430,32 @@ export default { console.log('打印指引单', err) this.$message.warning({ showClose: true, message: err }); }); - // }); + */ + toOutShell.BusinessCode = this.multipleSelection[0].id + this.$peisAPI.printPre(JSON.stringify(toOutShell)) + .then(res => { + if (JSON.parse(res).code < 0) { + this.$message.warning({ showClose: true, message: JSON.parse(res).message }); + } + }) + .catch((err) => { + console.log('打印指引单', err) + this.$message.warning({ showClose: true, message: `${err}` }); + }); + } else { this.elProgress.display = true; this.elProgress.percentage = 0; - let resPrintData, resPeisAPI, resPrintTimes; for (let i = 0; i < this.multipleSelection.length; i++) { - try { + try { + /* resPrintData = await postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[i].id}`) if (resPrintData.code == -1) continue toOutShell.ReportTable = resPrintData.data resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell)); - console.log('壳返回结果',resPeisAPI) + console.log('壳返回结果', resPeisAPI) if (JSON.parse(resPeisAPI).code < 0) continue resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [this.multipleSelection[i].id]); if (resPrintTimes.code == -1) continue @@ -455,15 +467,33 @@ export default { this.tableData[lfind].guidePrintTimes = 1; } } + */ + let patientregisterId = this.multipleSelection[i].id + toOutShell.BusinessCode = patientregisterId + let resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell)); + if (JSON.parse(resPeisAPI).code < 0) continue + let resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [patientregisterId]); + if (resPrintTimes.code == -1) continue + lfind = arrayExistObj(this.tableData, "id", patientregisterId); + if (lfind > -1) { + if (this.tableData[lfind].guidePrintTimes) { + this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1; + } else { + this.tableData[lfind].guidePrintTimes = 1; + } + } + } catch (error) { - console.log('打印指引单', `${error}`) - this.$message.warning({ showClose: true, message: error }); + console.log('打印指引单', error) + this.$message.warning({ showClose: true, message: `${error}` }); } this.elProgress.percentage = Math.floor( ((i + 1) * 100) / this.multipleSelection.length ); } + + this.elProgress.display = false; } }, @@ -501,20 +531,20 @@ export default { //双击事件 if (this.DbClick == 1) { //第一次点击的节点和第二次点击的节点id相同 - this.rowClickRetrieve(row) + this.rowClickRetrieve(row) return; } setTimeout(() => { //300ms内没有第二次点击,执行单击事件 - if(this.oneClick == 1 && this.DbClick == 0) this.rowClickRetrieve(row) + if (this.oneClick == 1 && this.DbClick == 0) this.rowClickRetrieve(row) }, 300) - + }, rowClickRetrieve(row) { this.oneClick = 0; this.DbClick = 0; - + // 按住了shift键 if (this.window.shift) { //清除所有选择 @@ -576,7 +606,7 @@ export default { }, // 双击 - rowDblclick(row){ + rowDblclick(row) { this.rowClick(row) this.btnEdit() }, @@ -1063,6 +1093,7 @@ export default { this.$message.info("此功能,需要在壳客户端才可运行!"); return; } + let token = window.sessionStorage.getItem("token"); let user = window.sessionStorage.getItem("user"); let toOutShell = { @@ -1073,11 +1104,11 @@ export default { { Name: "printer", Value: user }, { Name: "hisLog", Value: "pic/hisLog.jpg" }, ], + BusinessCode:prId }; if (isPreview) { - //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 - //this.multipleSelection.forEach((item,index) =>{ + /* postapi( `/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}` ) @@ -1094,8 +1125,20 @@ export default { .catch((err) => { this.$message.warning(err); }); - // }); + */ + this.$peisAPI.printPre(JSON.stringify(toOutShell)) + .then(res => { + if (JSON.parse(res).code < 0) { + this.$message.warning({ showClose: true, message: JSON.parse(res).message }); + } + }) + .catch((err) => { + console.log('打印检验条码错误', err) + this.$message.warning({ showClose: true, message: `${err}` }); + }); + } else { + /* postapi( `/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}` ) @@ -1127,6 +1170,27 @@ export default { .catch((err) => { this.$message.warning(err); }); + */ + this.$peisAPI.print(JSON.stringify(toOutShell)) + .then(res => { + if (JSON.parse(res).code < 0) { + this.$message.warning({ showClose: true, message: JSON.parse(res).message }); + }else{ + return postapi("/api/app/lisrequest/updatelisrequestisprint", { + operateType: 1, + patientRegisterId: prId, + }); + } + }) + .then(res => { + if(res && res.code < 0){ + this.$message.error({ showClose: true, message: `${res.message}` }); + } + }) + .catch((err) => { + console.log('打印检验条码错误', err) + this.$message.error({ showClose: true, message: `${err}` }); + }); } }, @@ -1146,11 +1210,11 @@ export default { { Name: "printer", Value: user }, { Name: "hisLog", Value: "pic/hisLog.jpg" }, ], + BusinessCode:prId }; if (isPreview) { - //http://140.143.162.39:9529/api/app/printreport/getpacsnoreport?PatientRegisterId=3a0c990e-5756-2dc0-19d5-69a617fe4048 - //this.multipleSelection.forEach((item,index) =>{ + /* postapi( `/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}` ) @@ -1167,8 +1231,19 @@ export default { .catch((err) => { this.$message.warning(err); }); - // }); + */ + this.$peisAPI.printPre(JSON.stringify(toOutShell)) + .then(res => { + if (JSON.parse(res).code < 0) { + this.$message.warning({ showClose: true, message: JSON.parse(res).message }); + } + }) + .catch((err) => { + console.log('打印pacs条码错误', err) + this.$message.warning({ showClose: true, message: `${err}` }); + }); } else { + /* postapi( `/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}` ) @@ -1199,6 +1274,27 @@ export default { .catch((err) => { this.$message.warning(err); }); + */ + this.$peisAPI.print(JSON.stringify(toOutShell)) + .then(res => { + if (JSON.parse(res).code < 0) { + this.$message.warning({ showClose: true, message: JSON.parse(res).message }); + }else{ + return postapi("/api/app/lisrequest/updatelisrequestisprint", { + operateType: 1, + patientRegisterId: prId, + }); + } + }) + .then(res => { + if(res && res.code < 0){ + this.$message.error({ showClose: true, message: `${res.message}` }); + } + }) + .catch((err) => { + console.log('打印pacs条码错误', err) + this.$message.error({ showClose: true, message: `${err}` }); + }); } }, diff --git a/src/components/report/BtnReport.vue b/src/components/report/BtnReport.vue index 3133365..299d48b 100644 --- a/src/components/report/BtnReport.vue +++ b/src/components/report/BtnReport.vue @@ -18,7 +18,7 @@ import moment from "moment"; import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; -import { arrayExistObj, parseID } from "../../utlis/proFunc"; +import { arrayExistObj, deepCopy,parseID } from "../../utlis/proFunc"; //import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue"; export default { diff --git a/src/components/report/PatientRegisterQueryNobtn.vue b/src/components/report/PatientRegisterQueryNobtn.vue index d67efe3..9f24cc6 100644 --- a/src/components/report/PatientRegisterQueryNobtn.vue +++ b/src/components/report/PatientRegisterQueryNobtn.vue @@ -4,8 +4,10 @@
体检单位: - - + +
@@ -28,11 +30,12 @@ 检查状态: - +
-
+
条码号: @@ -49,18 +52,17 @@
审核: - - - + + + -
+
上传: - - + +
@@ -70,13 +72,13 @@ -
-
+ + - - + + @@ -93,7 +95,7 @@ export default { data() { return { dialogVisible: false, - + }; }, @@ -103,7 +105,7 @@ export default { mounted() { }, computed: { - ...mapState(["window", "dict", "patientRegister", "customerOrg","report"]), + ...mapState(["window", "dict", "patientRegister", "customerOrg", "report"]), }, methods: { @@ -138,7 +140,7 @@ export default { }, //选择单位体检次数是,更新起止日期 - changeMedicalTimes(v){ + changeMedicalTimes(v) { this.patientRegister.query.customerOrgRegister = v; this.patientRegister.query.dateRange = [ v.beginTime, @@ -151,25 +153,31 @@ export default { +} diff --git a/src/components/sumDoctorCheck/ButtonList.vue b/src/components/sumDoctorCheck/ButtonList.vue index 212982d..e7600e0 100644 --- a/src/components/sumDoctorCheck/ButtonList.vue +++ b/src/components/sumDoctorCheck/ButtonList.vue @@ -132,7 +132,7 @@ export default { //' 请选择体检人员' if (!patientRegister.id) return ret // '人员已锁定,不可执行此操作' - if (!patientRegister.isLock) return ret + if (patientRegister.isLock && patientRegister.isLock == 'Y') return ret switch (btnFlagName) { case 'addSuggtion': @@ -308,17 +308,26 @@ export default { }; - postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) - .then((res) => { - if (res.code != -1) { - toOutShell.ReportTable = res.data; - console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); - return this.$peisAPI.printPre(JSON.stringify(toOutShell)); + // postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) + // .then((res) => { + // if (res.code != -1) { + // toOutShell.ReportTable = res.data; + // console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); + // return this.$peisAPI.printPre(JSON.stringify(toOutShell)); + // } + // }) + toOutShell.BusinessCode = this.dataTransOpts.tableS.patient_register.id + this.$peisAPI.printPre(JSON.stringify(toOutShell)) + .then(res => { + if (res) { + let lres = JSON.parse(res) + if (lres.code < 0) this.$message.error({ showClose: true, message: lres.message }) } }) .catch(err => { this.$message.warning(err); }); + }, diff --git a/src/components/sumDoctorCheck/SumSug.vue b/src/components/sumDoctorCheck/SumSug.vue index 325fffc..0d23214 100644 --- a/src/components/sumDoctorCheck/SumSug.vue +++ b/src/components/sumDoctorCheck/SumSug.vue @@ -446,7 +446,7 @@ export default { //' 请选择体检人员' if (!patientRegister.id) return ret // '人员已锁定,不可执行此操作' - if (!patientRegister.isLock) return ret + if (patientRegister.isLock && patientRegister.isLock == 'Y') return ret if (patientRegister.completeFlag && patientRegister.completeFlag != '3') ret = false @@ -770,7 +770,11 @@ export default { ::v-deep .el-table__empty-text { line-height: 22px; } - +::v-deep .el-tag { + color: black; + padding: 0 5px; + font-size: 14px; +} ::v-deep .el-table__empty-block { min-height: 22px; } diff --git a/src/views/charge/charge.vue b/src/views/charge/charge.vue index e63d587..2c192dd 100644 --- a/src/views/charge/charge.vue +++ b/src/views/charge/charge.vue @@ -1009,9 +1009,11 @@ export default { { Name: 'printer', Value: user }, { Name: 'hisLog', Value: 'pic/hisLog.jpg' }, ], + BusinessCode:chargeId, }; if (isPreview) { + /* postapi(`/api/app/printreport/getchargereport?ChargeId=${chargeId}`) .then((res) => { if (res.code != -1) { @@ -1029,7 +1031,19 @@ export default { .catch(err => { this.$message.warning(err); }); + */ + this.$peisAPI.printPre(JSON.stringify(toOutShell)) + .then(res => { + if (JSON.parse(res).code < 0) { + this.$message.warning({ showClose: true, message: JSON.parse(res).message }); + } + }) + .catch((err) => { + console.log('打印发票错误', err) + this.$message.warning({ showClose: true, message: `${err}` }); + }); } else { + /* postapi(`/api/app/printreport/getchargereport?ChargeId=${chargeId}`) .then((res) => { if (res.code != -1) { @@ -1047,7 +1061,17 @@ export default { .catch(err => { this.$message.warning(err); }); - + */ + this.$peisAPI.print(JSON.stringify(toOutShell)) + .then(res => { + if (JSON.parse(res).code < 0) { + this.$message.warning({ showClose: true, message: JSON.parse(res).message }); + } + }) + .catch((err) => { + console.log('打印发票错误', err) + this.$message.warning({ showClose: true, message: `${err}` }); + }); } }, diff --git a/src/views/doctorCheck/doctorCheck.vue b/src/views/doctorCheck/doctorCheck.vue index 56aa044..9455e14 100644 --- a/src/views/doctorCheck/doctorCheck.vue +++ b/src/views/doctorCheck/doctorCheck.vue @@ -38,12 +38,12 @@
- +
+ :audit="audit" :unAudit="unAudit" :btnLineUp="btnLineUp" :doctorBtnDisabled="doctorBtnDisabled" />
@@ -53,7 +53,7 @@
+ :audit="audit" :unAudit="unAudit" :doctorBtnDisabled="doctorBtnDisabled" />
@@ -269,6 +269,63 @@ export default { return ret }, + // 按钮可用 + doctorBtnDisabled(btnFlagName) { + let patientRegister = this.dataTransOpts.tableS.patient_register + let RegisterCheckEdit = this.doctorCheck.RegisterCheckEdit + let ret = true + + //' 请选择体检人员' + if (!patientRegister.id) return ret + + + if (btnFlagName == 'btnCheckHistory' || btnFlagName == 'btnReport') return false + + // '人员已锁定,不可执行此操作' + if (patientRegister.isLock && patientRegister.isLock == 'Y') return ret + if (patientRegister.completeFlag && patientRegister.completeFlag == '3') return ret + + if (btnFlagName == 'editPr' || btnFlagName == 'delPr') return false + + + // 未选检查项目 + if (!RegisterCheckEdit.id) return ret + switch (btnFlagName) { + case 'btnEdit': // 修改结果 + case 'btnDel': // 删除结果 + if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag == '1') ret = false + break; + case 'refuseItem': // 放弃检查项目 + case 'delItem': // 删除检查项目 + case 'delItem': // 删除检查项目 + case 'btnMakeDiagnosis': // 生成小结 + case 'save': // 保存结果 + case 'addSummary': // 新增小结 + case 'delSum': // 删除小结 + case 'addSuggestion': // 新增建议 + case 'delSug': // 删除建议 + case 'btnGetPic': // 采图(图片采集) + case 'btnExpPic': // 导图(图片上传) + case 'btnSavePic': // 图片保存 + case 'btnDelImage': // 图片删除 + if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag == '0') ret = false + break; + case 'audit': + if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag != '0' && RegisterCheckEdit.isAudit && RegisterCheckEdit.isAudit != 'Y') ret = false + break; + case 'unAudit': + if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag != '0' && RegisterCheckEdit.isAudit && RegisterCheckEdit.isAudit != 'N') ret = false + break; + case 'btnCheckHistory': + case 'btnReport': + default: + ret = false + break; + } + // console.log('sumBtnDisabled btnFlagName, patientRegister,ret', btnFlagName, patientRegister, ret) + return ret + }, + // 生成小结 btnMakeDiagnosis() { let ret = this.optGrant('makeDiagnosis')