diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index d95823d..16d27b8 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -628,9 +628,9 @@ export default { reject(err) }); } else { - this.$peisAPI.printPre(JSON.stringify(toOutShell)) + this.$peisAPI.print(JSON.stringify(toOutShell)) .then(res => { - if (JSON.parse(res).code < 0) { + if (JSON.parse(res).code > -1) { return postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [row.id]); } else { reject(JSON.parse(res).message) @@ -665,7 +665,7 @@ export default { return this.lisPrint(row,"0002",false) }) .then(res => { - return this.pacsPrint(row,"0003",false) + return this.pacsPrint(row,"0004",false) }) .then(res => { resolve(res) @@ -1363,7 +1363,7 @@ export default { lisPrint(row, ReportCode, isPreview) { return new Promise((resolve, reject) => { if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!"); - if (row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!") + if (!row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!") @@ -1382,27 +1382,28 @@ export default { ], BusinessCode: row.id }; - - + console.log('this.$peisAPI.toOutShell',toOutShell) if (isPreview) { this.$peisAPI.printPre(JSON.stringify(toOutShell)) .then(res => { - // console.log('this.$peisAPI.printPre', res) - if (JSON.parse(res).code > -1) { - resolve(JSON.parse(res)) + console.log('this.$peisAPI.printPre', res) + let lres = JSON.parse(res) + if (lres.code > -1) { + resolve(lres) } else { - reject(JSON.parse(res).message); + reject(lres.message); } }) .catch((err) => { reject(err); }); } else { - - this.$peisAPI.print(JSON.stringify(toOutShell)) + this.$peisAPI.print('this.$peisAPI.print', JSON.stringify(toOutShell)) .then(res => { - if (JSON.parse(res).code < 0) { - reject(JSON.parse(res).message); + console.log('this.$peisAPI.print', res) + let lres = JSON.parse(res) + if (lres.code < 0) { + reject(lres.message); } else { return postapi("/api/app/lisrequest/updatelisrequestisprint", { operateType: 1, @@ -1428,7 +1429,7 @@ export default { pacsPrint(row, ReportCode, isPreview) { return new Promise((resolve, reject) => { if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!"); - if (row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!") + if (!row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!") let token = window.sessionStorage.getItem("token"); let user = window.sessionStorage.getItem("user"); @@ -1445,14 +1446,16 @@ export default { ], BusinessCode: row.id }; - // console.log('this.$peisAPI.print', toOutShell) + console.log('this.$peisAPI.print', toOutShell) if (isPreview) { this.$peisAPI.printPre(JSON.stringify(toOutShell)) .then(res => { - if (JSON.parse(res).code > -1) { - resolve(res) + console.log('this.$peisAPI.printPre', res) + let lres = JSON.parse(res) + if (lres.code > -1) { + resolve(lres) } else { - reject(JSON.parse(res).message); + reject(lres.message); } }) .catch((err) => { @@ -1461,10 +1464,12 @@ export default { } else { this.$peisAPI.print(JSON.stringify(toOutShell)) .then(res => { - if (JSON.parse(res).code > -1) { - resolve(res) + console.log('this.$peisAPI.print', res) + let lres = JSON.parse(res) + if (lres.code > -1) { + resolve(lres) } else { - reject(JSON.parse(res).message); + reject(lres.message); } }) .catch((err) => {