From 316e383a8bafef8ddc4688e23ca581f25459b29e Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Fri, 30 Jun 2023 21:23:36 +0800 Subject: [PATCH] rydj --- .../customerOrg/customerOrgEdit.vue | 44 ++- src/components/itemSet/ReferenceRange.vue | 4 +- .../patientRegister/PatientRegisterEdit.vue | 255 +++++++++++++++--- .../patientRegister/PatientRegisterList.vue | 167 +++++++----- .../patientRegister/customerOrgTreeAll.vue | 2 +- src/store/index.js | 42 +++ src/utlis/proFunc.js | 11 + src/views/customerOrg/patientRegister.vue | 15 ++ 8 files changed, 396 insertions(+), 144 deletions(-) diff --git a/src/components/customerOrg/customerOrgEdit.vue b/src/components/customerOrg/customerOrgEdit.vue index 753d875..d9a9167 100644 --- a/src/components/customerOrg/customerOrgEdit.vue +++ b/src/components/customerOrg/customerOrgEdit.vue @@ -139,7 +139,7 @@ import { mapState,mapMutations } from 'vuex' import { getapi, postapi, putapi, deletapi } from "@/api/api"; -import { tcdate } from '../../utlis/proFunc' +import { tcdate,objCopy } from '../../utlis/proFunc' export default { components: { @@ -245,37 +245,25 @@ export default { //提交 Onsubmit(formName) { console.log('vuex data',this.customerOrg.customerOrgRd) - let vpojo = this.customerOrg.customerOrgRd this.$refs[formName].validate((valid) => { if (valid) { //赋值 - this.pojo = { - displayName: vpojo.displayName, - shortName: vpojo.shortName, - invoiceName: vpojo.invoiceName, - parentId: vpojo.parentId, - telephone: vpojo.telephone, - fax: vpojo.fax, - postalCode: vpojo.postalCode, - address: vpojo.address, - bank: vpojo.bank, - accounts: vpojo.accounts, - orgTypeId: vpojo.orgTypeId, - remark: vpojo.remark, - isLock: vpojo.isLock, - isActive: vpojo.isActive, - organizationUnitId: vpojo.organizationUnitId - } + objCopy(this.customerOrg.customerOrgRd,this.pojo) - // - if(this.pojo.parentId && this.pojo.parentId.length > 0){ - this.pojo.parentId = this.pojo.parentId[this.pojo.parentId.length - 1] + if(typeof this.pojo.parentId === "string"){ + if(!this.pojo.parentId || this.pojo.parentId.length < 1){ + this.pojo.parentId = null + } }else{ - this.pojo.parentId = null + if(this.pojo.parentId && this.pojo.parentId.length > 0){ + this.pojo.parentId = this.pojo.parentId[this.pojo.parentId.length - 1] + }else{ + this.pojo.parentId = null + } } + - console.log('pojo',this.pojo) - console.log(this.customerOrg.customerOrgRd) + console.log('pojo',this.pojo,'this.customerOrg.customerOrgRd',this.customerOrg.customerOrgRd) if(this.customerOrg.customerOrgRd.id.length < 1){ //id为空则新增 postapi(`/api/app/customer-org`, this.pojo).then( @@ -294,8 +282,10 @@ export default { //id不为空则编辑 putapi(`/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`, this.pojo).then( (res) => { - this.$message.success("更新 操作成功"); - this.getCustomerOrgTree() + if(res.code == 1){ + this.$message.success("更新 操作成功"); + this.getCustomerOrgTree() + } } ); } diff --git a/src/components/itemSet/ReferenceRange.vue b/src/components/itemSet/ReferenceRange.vue index 98ad5b8..d9fa9cd 100644 --- a/src/components/itemSet/ReferenceRange.vue +++ b/src/components/itemSet/ReferenceRange.vue @@ -217,11 +217,11 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - deletapi(`/api/app/reference-range/${this.id}`, this.form).then(res => { + return deletapi(`/api/app/reference-range/${this.id}`, this.form) + }).then(res => { this.$message.success('删除成功') this.getlist(this.itemId, this.ReferenceRangeTypeFlag) this.id = '' - }) }).catch(() => { this.$message({ type: 'info', diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 51386f7..d1d607e 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -17,8 +17,8 @@ - - + + @@ -26,7 +26,7 @@ - + @@ -68,13 +68,20 @@ - + - + + + + + + + + @@ -95,7 +102,44 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -153,7 +197,7 @@ + :disabled="form.customerOrgId === dict.personOrgId ? true : false"> @@ -163,7 +207,7 @@ + :disabled="form.customerOrgId === dict.personOrgId ? false : true"> @@ -213,6 +257,7 @@ +
@@ -237,6 +282,44 @@ 复制新增
+ + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + +