From 02d84ccb8c50caf16b9c5eb58283199c86e5c4ff Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Sun, 29 Oct 2023 18:41:35 +0800 Subject: [PATCH] register --- .../patientRegister/PatientRegisterEdit.vue | 84 +++++++++++++------ .../patientRegister/PatientRegisterList.vue | 6 +- 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 1c7f071..3f88e6c 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -8,7 +8,7 @@ @@ -32,7 +32,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'"> @@ -55,7 +55,7 @@ @@ -67,7 +67,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'"> @@ -100,7 +100,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" size="small"> @@ -117,7 +117,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small"> @@ -135,7 +135,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" size="small"> @@ -147,7 +147,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small"> @@ -171,7 +171,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" /> @@ -185,7 +185,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"> @@ -196,7 +196,7 @@ @@ -253,7 +253,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small"> @@ -263,7 +263,7 @@ + :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small"> @@ -739,13 +739,9 @@ export default { }, created() { - this.peisid = window.sessionStorage.getItem('peisid'); - if (!this.form.id) { - this.form.organizationUnitId = this.peisid; - } - objCopy(this.formInitData, this.form); - this.initBox(); - this.getPeoplePhoto(this.patientRegister.photo) + this.initFormData() + + }, //挂载完成 @@ -762,6 +758,48 @@ export default { }, methods: { ...mapActions(['getPatientRegisterAbs']), + + //初始form表单数据 + initFormData(){ + objCopy(this.formInitData, this.form); + this.peisid = window.sessionStorage.getItem('peisid'); + if (!this.form.id) { + this.form.organizationUnitId = this.peisid; + } + this.initBox(); + this.getPeoplePhoto(this.patientRegister.photo) + + + //获取顶级单位ID + let customerOrgParentId = '' + if (this.form.customerOrgId == this.dict.personOrgId) { + customerOrgParentId = this.dict.personOrgId; + this.form.customerOrgRegisterId = null + this.patientRegister.customerOrgGroup = [] + }else{ + getapi(`/api/app/customer-org/parent/${this.form.customerOrgId} + `).then(res => { + if(res.code != - 1){ + customerOrgParentId = res.data //获取顶级单位ID + return getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`) //获取单位体检次数信息 + } + }).then(res =>{ + if(res.code != - 1){ + this.customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数 + if(this.customerOrgRegisterList.length > 0){ + this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id + return getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}`) //获取单位分组 + } + } + }).then(res =>{ + if(res.code != -1){ + this.patientRegister.customerOrgGroup = res.data.items; + } + }) + } + }, + + //快速查找个人数据 quickQuery(type) { let url1 = '/api/app/patientregister/getpatientregisterorpatient' @@ -1498,11 +1536,7 @@ export default { "editTimes"(newVal, oldVal) { //console.log('editTimes newVal:',newVal,' oldVal:',oldVal) if (newVal != oldVal) { - console.log('this.editTimes', this.editTimes,this.formInitData) - objCopy(this.formInitData, this.form); - this.initBox(); - this.getPeoplePhoto(this.patientRegister.photo) - //console.log('this.form',this.form) + this.initFormData() } }, diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index f1a8957..b303657 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -780,7 +780,7 @@ export default { // this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId; this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作 this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作 - this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId); + // this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId); this.dict.asbItem = [...this.dict.asbItemAll]; this.getPatientRegisterAbs(this.patientRegister.prList[lfind].id); } @@ -793,13 +793,13 @@ export default { this.$message.warning("该用户未选归属体检中心,不能执行此操作!"); return } - + let customerOrgId = this.patientRegister.query.customerOrgId; if (!customerOrgId) { this.$message.warning("请选择单位或个人"); return; } - + this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId this.setForm(this.patientRegister.patientRegisterRdInit) this.patientRegister.patientRegisterAbs = []; this.dialogVisible = true;