diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index aac9133..c45a2bf 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -229,26 +229,43 @@ export default { methods: { ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), - // 打印指引单 - async guidePrint(){ + // 打印指引单(isPreview) + async guidePrint(isPreview){ let token = localStorage.getItem('token'); let user = localStorage.getItem('user'); let toOutShell = ''; - let msg =''; + let lfind = -1; + - //http://140.143.162.39:9529/api/app/print-report/patient-register-guide-report/3a0c7f6e-3ff1-fef6-c568-6f541aabe87a - getapi(`/api/app/print-report/patient-register-guide-report/${msg}`) - .then((res) => { - if (res.code != -1) { - res.data; + if(this.multipleSelection.length < 1){ + this.$message.info("请勾选要打印指引单的人员记录!"); + return; + } - return this.$electronAPI.printPre('web 传入参数'); - } - }) - .then(res => { - msg = res; + this.multipleSelection.forEach((item,index) =>{ + getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`) + .then((res) => { + if (res.code != -1) { + res.data; + return this.$electronAPI.printPre('web 传入参数'); + } + }) + .then(res => { + if(res.toLowerCase() == 'success'){ + //更新打印次数 + return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany',[item.id]) + } + }) + .then(res =>{ + if (res.code != -1) { + // + } + }); }); + + + console.log(msg);