From a530e51e47551615274bc13429f50677edbe9198 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Thu, 21 Sep 2023 18:36:52 +0800 Subject: [PATCH] tjcs seo --- src/components/customerOrg/ContactPerson.vue | 16 +- .../customerOrg/customerOrgEdit.vue | 14 +- .../customerOrg/customerOrgRegister.vue | 10 +- .../patientRegister/PatientRegisterEdit.vue | 191 ++++++++++++------ 4 files changed, 163 insertions(+), 68 deletions(-) diff --git a/src/components/customerOrg/ContactPerson.vue b/src/components/customerOrg/ContactPerson.vue index 4f9304d..9e90086 100644 --- a/src/components/customerOrg/ContactPerson.vue +++ b/src/components/customerOrg/ContactPerson.vue @@ -10,13 +10,17 @@ @@ -34,13 +38,17 @@ diff --git a/src/components/customerOrg/customerOrgEdit.vue b/src/components/customerOrg/customerOrgEdit.vue index 412311d..6b88881 100644 --- a/src/components/customerOrg/customerOrgEdit.vue +++ b/src/components/customerOrg/customerOrgEdit.vue @@ -134,7 +134,7 @@ - + @@ -200,6 +200,10 @@ export default { isLockBox: false, isActiveBox: true, organizationUnitId: null, + creatorName:'', + creationTime:null, + lastModifierName:'', + lastModificationTime:null, }, //初始化 单位 记录 目前新增与更新是一致 rules: { @@ -311,6 +315,10 @@ export default { body = deepCopy(this.form); delete body.isActiveBox; delete body.isLockBox; + delete body.creatorName; + delete body.creationTime; + delete body.lastModifierName; + delete body.lastModificationTime; if (typeof body.parentId === "string") { if (!body.parentId || body.parentId.length < 1) { @@ -326,9 +334,9 @@ export default { console.log("body", body, "this.form", this.form); - if (this.customerOrg.customerOrgRd.id.length < 1) { + if (!this.customerOrg.customerOrgRd.id) { //id为空则新增 - postapi(`/api/app/customer-org`, body).then((res) => { + postapi(`/api/app/customerorg/create`, body).then((res) => { if (res.code == 1) { this.$message.success("创健 操作成功"); this.setData({ key: "customerOrg.customerOrgRd", value: res }); diff --git a/src/components/customerOrg/customerOrgRegister.vue b/src/components/customerOrg/customerOrgRegister.vue index b2cf8c9..1b12be3 100644 --- a/src/components/customerOrg/customerOrgRegister.vue +++ b/src/components/customerOrg/customerOrgRegister.vue @@ -22,13 +22,17 @@ @@ -112,7 +116,7 @@ export default { return; } postapi( - `/api/app/customer-org-register/default/${customerOrgId}` + `/api/customerorgregister/createcustomerorgregister?CustomerOrgId=${customerOrgId}` ).then((res) => { if (res.Code != -1) { this.getCustomerOrgRegisterList(customerOrgId); diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 76e3d77..cbf70ff 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -56,7 +56,7 @@ + prefix-icon="" /> @@ -183,7 +183,8 @@ - @@ -192,15 +193,17 @@ - - - + + + + - + + + + - + @@ -310,7 +322,7 @@
- +
@@ -346,13 +358,13 @@
- 全个人支付 + 全个人支付
- 全单位支付 + 全单位支付
- 全赠送 + 全赠送
收费 @@ -364,23 +376,19 @@
查找:  条码号 - +
档案号 - +
姓名 - +
手机号 - +
@@ -438,7 +446,7 @@ - @@ -463,7 +471,7 @@ import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import mm from "../../utlis/mm"; -import { objCopy, setNull, dddw, parseID, birthdayToAge,deepCopy } from "../../utlis/proFunc"; +import { objCopy, setNull, dddw, parseID, birthdayToAge, deepCopy, arrayFilter } from "../../utlis/proFunc"; import Camera from "./Camera.vue"; import PatientRegisterItem from "./PatientRegisterItem.vue"; import LisRequest from "./LisRequest.vue"; @@ -481,8 +489,8 @@ export default { return { apiurl: mm.apiurl, brushTimes: 0, - payTypeFlag:'', - peisid:null, + payTypeFlag: '', + peisid: null, form: { id: "", //id patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000... @@ -491,7 +499,7 @@ export default { customerOrgGroupId: null, //分组 medicalPackageId: null, //套餐 patientName: "", //姓名 - birthDate: "", //字符串 如:2012-01-29 + birthDate: null, //日期型 sexId: "U", //性别 默认未知U age: null, //年龄 jobCardNo: "", //工卡号 @@ -530,8 +538,10 @@ export default { isNameHideBox: false, //隐藏姓名 isPhoneFollowBox: false, //电话随访 isLockBox: false, //是否锁住 + customerOrgRegisterId: null, + isMaxMedicalTimes: 'N', }, //单位 记录 目前新增与更新是一致 - + customerOrgRegisterList: [], //单位体检次数列表 defaultNull: [ "customerOrgId", "customerOrgGroupId", @@ -562,17 +572,18 @@ export default { }; }, - created() { + created() { this.peisid = window.sessionStorage.getItem('peisid'); - if(!this.form.id){ + if (!this.form.id) { this.form.organizationUnitId = this.peisid; } }, //挂载完成 mounted() { - objCopy(this.formInitData, this.form); + objCopy(this.formInitData, this.form); this.initBox(); + this.getCustomerOrgRegisterList() }, computed: { @@ -583,6 +594,48 @@ export default { console.log("this.form1", this.form); }, + //获取单位体检次数列表,并默认赋最后一次体检次数 + async getCustomerOrgRegisterList() { + this.customerOrgRegisterList = [] + if (this.form.customerOrgId == this.dict.personOrgId){ + this.form.customerOrgRegisterId = null + return + } + try { + let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`); + let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`); + this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N') + //要把已完成体检的次数去掉 + if (this.customerOrgRegisterList.length > 0) { + this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id + //this.changeCustomerOrgGroupId() + this.changeMedicalTimes() + } + } catch (error) { + console.log(error) + } + }, + + //修改单位体检次数 + changeMedicalTimes() { + + this.form.customerOrgGroupId = null + this.changeCustomerOrgGroupId() + + //获取体检次数下的分组 + this.getCustomerOrgGroup(this.form.customerOrgRegisterId) + }, + + //获取体检次数下的分组 + getCustomerOrgGroup(customerOrgRegisterId){ + this.patientRegister.customerOrgGroup = [] + getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => { + if (res.code != - 1) { + this.patientRegister.customerOrgGroup = res.data.items; + } + }) + }, + //修改出生日期 changeBirthDate() { this.form.age = birthdayToAge(this.form.birthDate) @@ -592,14 +645,14 @@ export default { changeIdNo() { let ret = parseID(this.form.idNo) if (ret.age != -1) { - this.form.birthDate = ret.birthday + this.form.birthDate = new Date(ret.birthday) this.form.age = ret.age this.form.sexId = ret.sex } }, //分组改变时触发 - changeCustomerOrgGroupId() { + changeCustomerOrgGroupId() { this.patientRegister.customerOrgGroupChange++; if (this.form.id) this.Onsubmit('form', false); }, @@ -645,13 +698,26 @@ export default { this.form.patientName = this.patientChoosed.displayName; this.form.sexId = this.patientChoosed.sexId; this.form.maritalStatusId = this.patientChoosed.maritalStatusId; - this.form.birthDate = this.patientChoosed.birthDate; + this.form.birthDate = new Date(this.patientChoosed.birthDate); this.form.nationId = this.patientChoosed.nationId; this.form.idNo = this.patientChoosed.idNo; this.form.telephone = this.patientChoosed.telephone; this.form.mobileTelephone = this.patientChoosed.mobileTelephone; this.form.patientNo = this.patientChoosed.patientNo; this.form.medicalTimes = this.patientChoosed.medicalTimes + 1; + + if (this.form.birthDate) { + this.form.age = birthdayToAge(this.form.birthDate) + } + + if (this.form.idNo) { + let ret = parseID(this.form.idNo) + + if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday) + if (!this.form.age) this.form.age = ret.age + if (!this.form.sexId) this.form.age = ret.sex + } + }, ldddw(arrayData, key, value, display) { @@ -664,39 +730,39 @@ export default { changeBox(type) { //赋值 - if(this.form[type + 'Box']){ + if (this.form[type + 'Box']) { this.form[type] = 'Y'; - }else{ + } else { this.form[type] = 'N'; } }, - - initBox(){ - if(this.form.isVip == 'Y'){ + + initBox() { + if (this.form.isVip == 'Y') { this.form.isVipBox = true; - }else{ + } else { this.form.isVipBox = false; } - if(this.form.isNameHide == 'Y'){ + if (this.form.isNameHide == 'Y') { this.form.isNameHideBox = true; - }else{ + } else { this.form.isNameHideBox = false; } - if(this.form.isPhoneFollow == 'Y'){ + if (this.form.isPhoneFollow == 'Y') { this.form.isPhoneFollowBox = true; - }else{ + } else { this.form.isPhoneFollowBox = false; } - if(this.form.isLock == 'Y'){ + if (this.form.isLock == 'Y') { this.form.isLockBox = true; - }else{ + } else { this.form.isLockBox = false; } - if(!this.form.id){ + if (!this.form.id) { this.form.organizationUnitId = this.peisid; } }, @@ -735,8 +801,8 @@ export default { if (this.form.id.length < 1) { //id为空则新增 - console.log(`/api/app/patient-register/return-info`, body); - postapi(`/api/app/patient-register/return-info`, body).then( + console.log(`/api/patientregister/createreturninfo`, body); + postapi(`/api/patientregister/createreturninfo`, body).then( (res) => { if (res.code == 1) { //console.log('res',res) @@ -756,9 +822,9 @@ export default { } ); } else { - //id不为空则编辑 - console.log(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body); - putapi(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body).then((res) => { + //id不为空则编辑 api/patientregister/updatepatientregister + console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body); + postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => { if (res.code == 1) { if (msgTip) this.$message.success("更新 操作成功"); this.patientRegister.query.times++; @@ -1012,16 +1078,23 @@ export default { this.patientRegister.mergeAsbitemVisble = true; }, - toCharge(patientRegisterNo){ + toCharge(patientRegisterNo) { this.patientRegister.patientRegisterRd.patientRegisterNo = patientRegisterNo; this.$router.push({ path: "/charge" }); }, - + }, //监听事件 watch: { + "form.customerOrgId"(newVal, oldVal) { + //console.log('editTimes newVal:',newVal,' oldVal:',oldVal) + if (newVal != oldVal) { + this.getCustomerOrgRegisterList() + } + }, + //新增或编辑 "editTimes"(newVal, oldVal) { //console.log('editTimes newVal:',newVal,' oldVal:',oldVal) @@ -1045,9 +1118,11 @@ export default { };