From 11e38f79ca16698b45a29af6b1585ae91366f6e9 Mon Sep 17 00:00:00 2001
From: pengjun <158915633@qq.com>
Date: Thu, 16 May 2024 23:47:49 +0800
Subject: [PATCH] dj seo
---
src/components/patientRegister/LisRequest.vue | 83 +++++++------------
.../patientRegister/PatientRegisterEdit.vue | 6 +-
2 files changed, 34 insertions(+), 55 deletions(-)
diff --git a/src/components/patientRegister/LisRequest.vue b/src/components/patientRegister/LisRequest.vue
index 31d82d4..16b8f55 100644
--- a/src/components/patientRegister/LisRequest.vue
+++ b/src/components/patientRegister/LisRequest.vue
@@ -28,7 +28,7 @@
确定
- 条码打印
+ 条码打印
关闭
@@ -188,79 +188,54 @@ export default {
},
//条码打印
- lisPrint(ReportCode, isPreview) {
+ lisPrint(ReportCode) {
+
+ if (!this.$peisAPI) {
+ this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" });
+ return;
+ }
+
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
- isBuildImage:'N',
- IsUploadPdf:'N',
token,
+ IsMoreLabel: 'Y',
+ isBuildImage: 'N',
+ IsUploadPdf: 'N',
+ preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
+ BusinessCode: this.id
};
- if(!this.$peisAPI) {
- this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!"})
- return
- }
-
- 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=${this.id}`
- )
- .then((res) => {
- if (res.code != -1) {
- toOutShell.ReportTable = { lisRequest: res.data };
- console.log(
- "JSON.stringify(toOutShell)",
- JSON.stringify(toOutShell)
- );
- return this.$peisAPI.printPre(JSON.stringify(toOutShell));
- }
- })
- .catch((err) => {
- this.$message.warning({ showClose: true, message: err});
- });
- // });
- } else {
- postapi(
- `/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.id}`
- )
- .then((res) => {
- if (res.code != -1) {
- toOutShell.ReportTable = { lisRequest: res.data };
- console.log(
- "JSON.stringify(toOutShell)",
- JSON.stringify(toOutShell)
- );
-
- return this.$peisAPI.print(JSON.stringify(toOutShell));
- }
- })
- .then((res) => {
- if (res.code != -1) {
- //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
- // {
- // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
- // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
- // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
- // }
+ console.log('this.$peisAPI.print', toOutShell)
+
+ 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: this.id,
});
}
})
+ .then(res => {
+ if (res && res.code < 0) {
+ this.$message.error({ showClose: true, message: `${res.message}` });
+ }
+ })
.catch((err) => {
- this.$message.warning({ showClose: true, message: err});
+ // console.log('打印检验条码错误', err)
+ this.$message.error({ showClose: true, message: `${err}` });
});
- }
+
},
+
},
//监听事件
diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue
index a11386b..69bd383 100644
--- a/src/components/patientRegister/PatientRegisterEdit.vue
+++ b/src/components/patientRegister/PatientRegisterEdit.vue
@@ -1884,10 +1884,14 @@ export default {
//补打条码
reLisRequest() {
- if (this.form.id.length < 1) {
+ if (!this.form.id) {
this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
return;
}
+ if(this.form.completeFlag == '0'){
+ this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
+ return;
+ }
this.brushTimes++;
this.patientRegister.lisRequestVisble = true;
},