From 1dd2eaa7f869bbe79d971088821e56a5758a9ccc Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Wed, 8 May 2024 11:39:46 +0800 Subject: [PATCH] djseo --- .../doctorCheck/RegisterCheckList.vue | 27 +-- .../patientRegister/PatientRegisterEdit.vue | 164 +++++++++++++----- src/utlis/proFunc.js | 4 +- 3 files changed, 136 insertions(+), 59 deletions(-) diff --git a/src/components/doctorCheck/RegisterCheckList.vue b/src/components/doctorCheck/RegisterCheckList.vue index 1a1fea0..0c6bf29 100644 --- a/src/components/doctorCheck/RegisterCheckList.vue +++ b/src/components/doctorCheck/RegisterCheckList.vue @@ -67,11 +67,7 @@ export default { components: {}, data() { return { - activeNames:['0','1','2','3'], - registerCheckList0:[], - registerCheckList1:[], - registerCheckList2:[], - registerCheckList3:[], + activeNames:['0','1','2','3'], }; }, @@ -87,7 +83,21 @@ export default { tableHeight() { return this.window.pageHeight < 600 ? 400 : this.window.pageHeight - 200 - } + }, + + registerCheckList0(){ + return this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '0'}) + }, + registerCheckList1(){ + return this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '1'}) + }, + registerCheckList2(){ + return this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '2'}) + }, + registerCheckList3(){ + return this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '3'}) + }, + }, methods: { @@ -173,10 +183,7 @@ export default { handleRegisterCheckList(registerCheckList){ this.doctorCheck.RegisterCheckList = listOrderBy(registerCheckList, [{ colName: 'checkTypeFlag', sortType: 'A' }, { colName: 'itemTypeDisplayOrder', sortType: 'A' }, { colName: 'asbitemDisplayOrder', sortType: 'A' }]) - this.registerCheckList0 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '0'}) - this.registerCheckList1 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '1'}) - this.registerCheckList2 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '2'}) - this.registerCheckList3 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '3'}) + } }, diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index ad04205..9811fde 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -316,58 +316,58 @@ - + - - - - + + + + - + - + - + - + - + - + - + - + - + @@ -426,11 +426,13 @@
保存
+
检验单申请
+
- 条码打印 + 条码打印
条码补打 @@ -528,7 +530,8 @@ - +
0) { customerOrgId = v[v.length - 1] this.form.customerOrgParentId = v[0] } else { customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次) - let pids = getTreePids(this.patientRegister.customerOrgTreeAll,"treeChildren","parentId","id",customerOrgId) - if(Array.isArray(pids) && pids.length > 0){ - if(pids.length == 1){ + let pids = getTreePids(this.patientRegister.customerOrgTreeAll, "treeChildren", "parentId", "id", customerOrgId) + if (Array.isArray(pids) && pids.length > 0) { + if (pids.length == 1) { this.form.customerOrgParentId = customerOrgId - }else{ + } else { this.form.customerOrgParentId = pids[1] - } - } + } + } } this.preCustomerOrgId = customerOrgId // let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId) let customerOrgParentId = this.form.customerOrgParentId - + if (customerOrgParentId) { if (customerOrgParentId == this.dict.personOrgId) { @@ -1060,7 +1063,7 @@ export default { } else { this.changeCustomerOrgGroupId() } - + } }, @@ -1457,7 +1460,7 @@ export default { // // console.log(`/api/patientregister/createreturninfo`, body); postapi(`/api/PatientRegister/CreatePatientRegister`, body) .then(res => { - if (res.code == 1) { + if (res.code > -1) { objCopy(res.data, this.form) this.dataTransOpts.tableS.patient_register = deepCopy(res.data) @@ -1477,6 +1480,23 @@ export default { //一般读身份证照片时,会出现这种情况 if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo); + + // 新增保存时,提示是否打条码 + if (!body.id) { + this.$confirm("是否打印 检验 与 Pacs 条码?", "提示", { + confirmButtonText: "是", + cancelButtonText: "否", + type: "warning", + }) + .then(() => { + this.labelPrint(false) + }) + .catch((err) => { + // if (err == "cancel") { + // this.$message.info({ showClose: true, message: "已取消操作" }); + // } + }); + } } } ); @@ -1738,8 +1758,8 @@ export default { */ }, - //条码打印 - lisPrint(ReportCode, isPreview) { + //条码打印(lis + pacs) + labelPrint(isPreview) { if (!this.form.id) { this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" }); return; @@ -1748,11 +1768,10 @@ export default { this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" }) return } - let token = window.sessionStorage.getItem('token'); let user = window.sessionStorage.getItem('user'); let toOutShell = { - ReportCode, token, + token, // ReportCode, IsMoreLabel: 'Y', isBuildImage: 'N', IsUploadPdf: 'N', @@ -1762,6 +1781,18 @@ export default { { Name: 'hisLog', Value: 'pic/hisLog.jpg' }, ], }; + + // lis条码打印 + this.lisPrint('0003', isPreview, toOutShell) + + // pacs条码打印 + this.pacsPrint('0004', isPreview, toOutShell) + + }, + + // lis条码打印 + lisPrint(ReportCode, isPreview, toOutShell) { + toOutShell.ReportCode = ReportCode // console.log('this.$peisAPI.print', toOutShell) if (isPreview) { this.$peisAPI.printPre(JSON.stringify(toOutShell)) @@ -1799,6 +1830,45 @@ export default { } }, + //pacs条码打印 + pacsPrint(ReportCode, isPreview, toOutShell) { + toOutShell.ReportCode = ReportCode + if (isPreview) { + 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 { + + 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}` }); + }); + } + }, + //补打条码 reLisRequest() { if (this.form.id.length < 1) { diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js index b7b4601..d2ba449 100644 --- a/src/utlis/proFunc.js +++ b/src/utlis/proFunc.js @@ -350,7 +350,7 @@ function listOrderBy(arr, keyObjs) { for (let i = 0; i < arrCount; i++) { for (let j = 0; j < arrCount - 1; j++) { for (let k = 0; k < lKeyObjs.length; k++) { - sortType = lKeyObjs[k]['sortType'] || 'A' + sortType = (lKeyObjs[k]['sortType'] || 'A').toUpperCase() if (sortType == 'A'){ if (arr[j][lKeyObjs[k]['colName']] > arr[j + 1][lKeyObjs[k]['colName']]) { temp = deepCopy(arr[j]) @@ -378,7 +378,7 @@ function listOrderBy(arr, keyObjs) { } } } catch (error) { - console.log(`listOrderBy ${error}`); + console.log(`listOrderBy error: ${error}`); } return arr; }