diff --git a/src/components/patientRegister/LisRequest.vue b/src/components/patientRegister/LisRequest.vue index 2a8f53a..f198cf2 100644 --- a/src/components/patientRegister/LisRequest.vue +++ b/src/components/patientRegister/LisRequest.vue @@ -200,6 +200,11 @@ export default { ], }; + if(!this.$peisAPI) { + this.$message.info("此功能,需要在壳客户端才可运行!") + return + } + if (isPreview) { //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 //this.multipleSelection.forEach((item,index) =>{ @@ -212,8 +217,8 @@ export default { console.log( "JSON.stringify(toOutShell)", JSON.stringify(toOutShell) - ); - return this.$peisAPI.printPre(JSON.stringify(toOutShell)); + ); + return this.$peisAPI.printPre(JSON.stringify(toOutShell)); } }) .catch((err) => { @@ -231,11 +236,12 @@ export default { "JSON.stringify(toOutShell)", JSON.stringify(toOutShell) ); + return this.$peisAPI.print(JSON.stringify(toOutShell)); } }) .then((res) => { - if (res.toLowerCase() == "success") { + if (res.code != -1) { //更新打印状态 /api/app/lisrequest/updatelisrequestisprint // { // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index f8b7a4f..200499e 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -843,12 +843,15 @@ export default { //读取身份证信息 peopleIcCard() { + if(!this.$peisAPI) { + this.$message.info("此功能,需要在壳客户端才可运行!") + return + } this.$peisAPI.peopleIcCard().then(res => { - //console.log('peopleIcCard',res) + //console.log('peopleIcCard',res) let lres = JSON.parse(res) - if (lres.code && lres.code.toLowerCase() == 'success') { - this.projPriv.idNos = lres - let idNos = parsIcCardtoLocal(this.projPriv.idNos, this.dict.sex, this.dict.nation) + if (lres.code >= 0) { + let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation) this.form.patientName = idNos.Name this.form.birthDate = idNos.birthDate this.form.sexId = idNos.sexId @@ -1191,13 +1194,13 @@ export default { }, //拍照(已废弃) - openCamera() { - if (!this.form.id) { - alert("请先保存人员信息"); - return; - } - this.patientRegister.cameraVisble = true; - }, + // openCamera() { + // if (!this.form.id) { + // alert("请先保存人员信息"); + // return; + // } + // this.patientRegister.cameraVisble = true; + // }, //拍照(调壳程序) photoGrah() { @@ -1205,6 +1208,10 @@ export default { alert("请先保存人员信息"); return; } + if(!this.$peisAPI) { + this.$message.info("此功能,需要在壳客户端才可运行!") + return + } this.$peisAPI.photoGrah() .then(res => { console.log(res) @@ -1250,6 +1257,10 @@ export default { this.$message.info("人员信息尚未保存,不可执行此操作!"); return; } + if(!this.$peisAPI) { + this.$message.info("此功能,需要在壳客户端才可运行!") + return + } let token = localStorage.getItem('token'); let user = localStorage.getItem('user'); @@ -1271,8 +1282,8 @@ export default { .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)); + console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); + return this.$peisAPI.printPre(JSON.stringify(toOutShell)); } }) .catch(err => { @@ -1285,12 +1296,12 @@ export default { .then((res) => { if (res.code != -1) { toOutShell.ReportTable = res.data; - console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); + console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); return this.$peisAPI.print(JSON.stringify(toOutShell)); } }) .then(res => { - if (res.toLowerCase() == 'success') { + if (res.code != -1) { //更新打印次数 return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id]) } @@ -1363,6 +1374,10 @@ export default { this.$message.info("人员信息尚未保存,不可执行此操作!"); return; } + if(!this.$peisAPI) { + this.$message.info("此功能,需要在壳客户端才可运行!") + return + } let token = localStorage.getItem('token'); let user = localStorage.getItem('user'); @@ -1401,7 +1416,7 @@ export default { } }) .then(res => { - if (res.toLowerCase() == 'success') { + if (res.code != -1) { //更新打印状态 /api/app/lisrequest/updatelisrequestisprint // { // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index e31a14d..4f36254 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -650,8 +650,8 @@ export default { return this.$peisAPI.print(JSON.stringify(toOutShell)); } }) - .then((res) => { - if (res.toLowerCase() == "success") { + .then((res) => { + if (JSON.parse(res).code >= 0) { //更新打印次数 return postapi( "api/app/patientregister/updatepatientregisterguideprinttimesmany", @@ -1420,8 +1420,8 @@ export default { } }) .then((res) => { - console.log("res", res); - if (res && res.toLowerCase() == "success") { + //console.log("res", res); + if (JSON.parse(res).code >= 0) { //更新打印状态 /api/app/lisrequest/updatelisrequestisprint // { // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) @@ -1493,7 +1493,7 @@ export default { } }) .then((res) => { - if (res.toLowerCase() == "success") { + if (JSON.parse(res).code >= 0) { //更新打印状态 /api/app/lisrequest/updatelisrequestisprint // { // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) diff --git a/src/components/patientRegister/PatientRegisterRefuseList.vue b/src/components/patientRegister/PatientRegisterRefuseList.vue index 021053a..792b2fb 100644 --- a/src/components/patientRegister/PatientRegisterRefuseList.vue +++ b/src/components/patientRegister/PatientRegisterRefuseList.vue @@ -1,261 +1,263 @@