From 4ef7ce6a14187fb8d0af2c789deb9a38c4e92365 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Tue, 31 Oct 2023 18:23:01 +0800 Subject: [PATCH] dj --- .../patientRegister/PatientRegisterEdit.vue | 30 +++++++---- .../patientRegister/PatientRegisterItem.vue | 33 ++++++------ .../patientRegister/PatientRegisterList.vue | 4 +- .../patientRegister/customerOrgTreeAll.vue | 31 ++++++----- .../patientRegister/patientRegisterQuery.vue | 4 ++ src/store/index.js | 2 +- src/views/fee-settings/SysParmSet.vue | 52 +++++++------------ 7 files changed, 83 insertions(+), 73 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 35b44fc..2657225 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -623,7 +623,7 @@ import { mapState, mapActions } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import mm from "../../utlis/mm"; -import { objCopy, setNull, dddw,checkIDCode, parseID, birthdayToAge,ageToBirthday, deepCopy, arrayFilter, parsIcCardtoLocal, photoParse, savePeoplePhoto, arrayExistObj } from "../../utlis/proFunc"; +import { objCopy, setNull, dddw,checkIDCode, parseID, birthdayToAge,ageToBirthday, deepCopy, arrayFilter, arrayReduce,parsIcCardtoLocal, photoParse, savePeoplePhoto, arrayExistObj } from "../../utlis/proFunc"; import Camera from "./Camera.vue"; import PatientRegisterItem from "./PatientRegisterItem.vue"; import LisRequest from "./LisRequest.vue"; @@ -957,11 +957,16 @@ export default { //添加或更新已选组合项目 this.addGroupPackageAsb(res.data, typeFlag,groupPackageId); + + arrayReduce(this.dict.asbItem, [...this.patientRegister.patientRegisterAbs], "id=asbitemId"); + arrayReduce(this.dict.asbItemQuick, [...this.patientRegister.patientRegisterAbs], "id=asbitemId"); + //console.log('delBody', delBody,delBody['registerAsbitemIds'].length); if (delBody['registerAsbitemIds'].length > 0) { return postapi(`/api/app/registerasbitem/deletemany`, delBody) - } else { - this.onSubmit(msg); + } else { + typeFlag == 'group' ? this.patientRegister.customerOrgGroupChange++ : this.patientRegister.medicalPackageChange++; + if (this.form.id) this.btnSubmit('form', false); } } }) @@ -969,7 +974,9 @@ export default { //console.log('res', res); if (res && res.code != -1) { //添加新套餐的组合项目 - this.onSubmit(msg); + typeFlag == 'group' ? this.patientRegister.customerOrgGroupChange++ : this.patientRegister.medicalPackageChange++; + if (this.form.id) this.btnSubmit('form', false); + } }); }, @@ -1081,16 +1088,19 @@ export default { } }, - //分组改变时触发 + // //分组改变时触发 changeCustomerOrgGroupId() { - this.patientRegister.customerOrgGroupChange++; - if (this.form.id) this.btnSubmit('form', false); + // this.patientRegister.customerOrgGroupChange++; + // if (this.form.id) this.btnSubmit('form', false); + this.getGroupPackageAsb('group',this.form.customerOrgGroupId) + }, - //套餐改变时触发 + // //套餐改变时触发 changeMedicalPackageId() { - this.patientRegister.medicalPackageChange++; - if (this.form.id) this.btnSubmit('form', false); + // this.patientRegister.medicalPackageChange++; + // if (this.form.id) this.btnSubmit('form', false); + this.getGroupPackageAsb('package',this.form.medicalPackageId) }, //根据姓名,身份证号 查询档案信息,用于判断人员多次体检 diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index c642190..e199357 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -529,6 +529,7 @@ export default { lfind = arrayExistObj(this.dict.asbItemQuick, 'id', asbItemChoosed[i].id) if (lfind > -1) this.dict.asbItemQuick.splice(lfind, 1) + this.quickAsb = deepCopy(this.dict.asbItemQuick) } @@ -961,22 +962,24 @@ export default { watch: { //分组改变,查出当前分组下对应的组合项目 - // "patientRegister.customerOrgGroupChange"(newVal, oldVal) { - // console.log("watch patientRegister.customerOrgGroupChange newVal:", newVal, " oldVal:", oldVal); - // if (newVal != oldVal && newVal > 0) { - // //this.getCustomerOrgGroupAsb(this.patientRegisterForm.customerOrgGroupId); - // this.getGroupPackageAsb('group', this.patientRegisterForm.customerOrgGroupId); - // } - // }, + "patientRegister.customerOrgGroupChange"(newVal, oldVal) { + console.log("watch patientRegister.customerOrgGroupChange newVal:", newVal, " oldVal:", oldVal); + if (newVal != oldVal && newVal > 0) { + //this.getCustomerOrgGroupAsb(this.patientRegisterForm.customerOrgGroupId); + //this.getGroupPackageAsb('group', this.patientRegisterForm.customerOrgGroupId); + this.onSubmit('更换分组') + } + }, - // //套餐改变,查出当前套餐下对应的组合项目 - // "patientRegister.medicalPackageChange"(newVal, oldVal) { - // console.log("watch patientRegister.medicalPackageChange newVal:", newVal, " oldVal:", oldVal); - // if (newVal != oldVal && newVal > 0) { - // //this.getMedicalPackageAsb(this.patientRegisterForm.medicalPackageId); - // this.getGroupPackageAsb('medical', this.patientRegisterForm.medicalPackageId); - // } - // }, + //套餐改变,查出当前套餐下对应的组合项目 + "patientRegister.medicalPackageChange"(newVal, oldVal) { + console.log("watch patientRegister.medicalPackageChange newVal:", newVal, " oldVal:", oldVal); + if (newVal != oldVal && newVal > 0) { + //this.getMedicalPackageAsb(this.patientRegisterForm.medicalPackageId); + //this.getGroupPackageAsb('medical', this.patientRegisterForm.medicalPackageId); + this.onSubmit('更换套餐') + } + }, //体检信息保存,触发已选组合项目保存 "patientRegister.saveTimes"(newVal, oldVal) { diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 5b81c9e..f385e28 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -916,7 +916,9 @@ export default { // body.customerOrgId = this.patientRegister.query.customerOrgId; // } if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId; - if(this.patientRegister.query.customerOrgId && this.patientRegister.query.customerOrgId != this.dict.personOrgId){ + if(this.patientRegister.query.customerOrgId + && this.patientRegister.query.customerOrgId != this.dict.personOrgId + && this.patientRegister.query.customerOrgRegister.id){ body.customerOrgRegisterId = this.patientRegister.query.customerOrgRegister.id } diff --git a/src/components/patientRegister/customerOrgTreeAll.vue b/src/components/patientRegister/customerOrgTreeAll.vue index 2202ced..15f3be7 100644 --- a/src/components/patientRegister/customerOrgTreeAll.vue +++ b/src/components/patientRegister/customerOrgTreeAll.vue @@ -45,18 +45,18 @@ export default { }, //获取体检单位父级ID api/app/customer-org/parent/[CustomerOrgld - getCustomerOrgParentId(customerOrgld) { - if (customerOrgld == this.dict.personOrgId) { - this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId; - return; - } - getapi(`/api/app/customer-org/parent/${customerOrgld}`).then((res) => { - // console.log("res.data", res.data); - if (res.code == 1) { - this.patientRegister.query.CustomerOrgParentId = res.data; - } - }); - }, + // getCustomerOrgParentId(customerOrgld) { + // if (customerOrgld == this.dict.personOrgId) { + // this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId; + // return; + // } + // getapi(`/api/app/customer-org/parent/${customerOrgld}`).then((res) => { + // // console.log("res.data", res.data); + // if (res.code == 1) { + // this.patientRegister.query.CustomerOrgParentId = res.data; + // } + // }); + // }, //树过滤 filterNode(value, data) { @@ -68,8 +68,11 @@ export default { //点击树节点 treeclick(data) { this.patientRegister.query.customerOrgId = data.id; - this.getCustomerOrgParentId(data.id); - this.patientRegister.query.times++; //用于触发查询条件 + + //获取体检单位父级ID + // this.getCustomerOrgParentId(data.id); + + // this.patientRegister.query.times++; //用于触发查询条件 }, }, watch: { diff --git a/src/components/patientRegister/patientRegisterQuery.vue b/src/components/patientRegister/patientRegisterQuery.vue index 7c111de..0f10b51 100644 --- a/src/components/patientRegister/patientRegisterQuery.vue +++ b/src/components/patientRegister/patientRegisterQuery.vue @@ -150,10 +150,12 @@ export default { watch:{ 'patientRegister.query.customerOrgId'(newVal,oldVal){ + // console.log('patientRegister.query.customerOrgId',newVal,oldVal) if(newVal != oldVal){ if(!newVal || newVal == this.dict.personOrgId){ this.patientRegister.query.customerOrgRegister = null this.customerOrgRegisterList = [] + this.patientRegister.query.times++ }else{ getapi(`/api/app/customer-org/parent/${newVal} `).then(res => { @@ -166,6 +168,8 @@ export default { if (res.data.length > 0) { this.patientRegister.query.customerOrgRegister = res.data[res.data.length - 1]; } + this.patientRegister.query.times++ + // console.log('this.patientRegister.query.customerOrgRegister',this.patientRegister.query.customerOrgRegister) } }); } diff --git a/src/store/index.js b/src/store/index.js index 63271c0..85b6d41 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -127,7 +127,7 @@ export default new Vuex.Store({ customerOrgId: "", //体检单位ID CustomerOrgParentId: "", //单位父级ID customerOrgFlag: true, //单位作为查询条件 - customerOrgRegister: {}, //单位体检次数 + customerOrgRegister: {id:''}, //单位体检次数 checkAsbs: null, patientName:'', //姓名 sex:'', //性别 diff --git a/src/views/fee-settings/SysParmSet.vue b/src/views/fee-settings/SysParmSet.vue index aa8bba3..bcdd671 100644 --- a/src/views/fee-settings/SysParmSet.vue +++ b/src/views/fee-settings/SysParmSet.vue @@ -1,16 +1,16 @@