Browse Source

print

master
pengjun 1 year ago
parent
commit
daf81a13bc
  1. 49
      src/components/patientRegister/PatientRegisterList.vue

49
src/components/patientRegister/PatientRegisterList.vue

@ -628,9 +628,9 @@ export default {
reject(err) reject(err)
}); });
} else { } else {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => { .then(res => {
if (JSON.parse(res).code < 0) {
if (JSON.parse(res).code > -1) {
return postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [row.id]); return postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [row.id]);
} else { } else {
reject(JSON.parse(res).message) reject(JSON.parse(res).message)
@ -665,7 +665,7 @@ export default {
return this.lisPrint(row,"0002",false) return this.lisPrint(row,"0002",false)
}) })
.then(res => { .then(res => {
return this.pacsPrint(row,"0003",false)
return this.pacsPrint(row,"0004",false)
}) })
.then(res => { .then(res => {
resolve(res) resolve(res)
@ -1363,7 +1363,7 @@ export default {
lisPrint(row, ReportCode, isPreview) { lisPrint(row, ReportCode, isPreview) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!this.$peisAPI) 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 BusinessCode: row.id
}; };
console.log('this.$peisAPI.toOutShell',toOutShell)
if (isPreview) { if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell)) this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => { .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 { } else {
reject(JSON.parse(res).message);
reject(lres.message);
} }
}) })
.catch((err) => { .catch((err) => {
reject(err); reject(err);
}); });
} else { } else {
this.$peisAPI.print(JSON.stringify(toOutShell))
this.$peisAPI.print('this.$peisAPI.print', JSON.stringify(toOutShell))
.then(res => { .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 { } else {
return postapi("/api/app/lisrequest/updatelisrequestisprint", { return postapi("/api/app/lisrequest/updatelisrequestisprint", {
operateType: 1, operateType: 1,
@ -1428,7 +1429,7 @@ export default {
pacsPrint(row, ReportCode, isPreview) { pacsPrint(row, ReportCode, isPreview) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!this.$peisAPI) 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 token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user"); let user = window.sessionStorage.getItem("user");
@ -1445,14 +1446,16 @@ export default {
], ],
BusinessCode: row.id BusinessCode: row.id
}; };
// console.log('this.$peisAPI.print', toOutShell)
console.log('this.$peisAPI.print', toOutShell)
if (isPreview) { if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell)) this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => { .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 { } else {
reject(JSON.parse(res).message);
reject(lres.message);
} }
}) })
.catch((err) => { .catch((err) => {
@ -1461,10 +1464,12 @@ export default {
} else { } else {
this.$peisAPI.print(JSON.stringify(toOutShell)) this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => { .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 { } else {
reject(JSON.parse(res).message);
reject(lres.message);
} }
}) })
.catch((err) => { .catch((err) => {

Loading…
Cancel
Save