From 3f62a86a280111ed38c9798c50b9f291695c1fc2 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Tue, 5 Sep 2023 15:09:12 +0800 Subject: [PATCH] charge --- .../customerOrg/customerOrgEdit.vue | 20 ++--- .../patientRegister/PatientRegisterEdit.vue | 75 +++++++++++++++++-- .../patientRegister/PatientRegisterItem.vue | 14 +++- src/views/charge/charge.vue | 8 +- 4 files changed, 93 insertions(+), 24 deletions(-) diff --git a/src/components/customerOrg/customerOrgEdit.vue b/src/components/customerOrg/customerOrgEdit.vue index d5ef268..9ce4561 100644 --- a/src/components/customerOrg/customerOrgEdit.vue +++ b/src/components/customerOrg/customerOrgEdit.vue @@ -123,7 +123,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -239,18 +239,10 @@ export default { changeBox(type) { //赋值 - if (type == 'isActive') { - if (this.form.isActiveBox) { - this.form.isActive = 'Y'; - } else { - this.form.isActive = 'N'; - } - } else { - if (this.form.isLockBox) { - this.form.isLock = 'Y'; - } else { - this.form.isLock = 'N'; - } + if(this.form[type + 'Box']){ + this.form[type] = 'Y'; + }else{ + this.form[type] = 'N'; } }, diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index bd2df5f..feb5a46 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -196,14 +196,20 @@ + + + + @@ -212,6 +218,7 @@ --> + @@ -220,6 +227,7 @@ --> + @@ -305,7 +313,7 @@
- +
@@ -338,16 +346,16 @@
- 全个人支付 + 全个人支付
- 全单位支付 + 全单位支付
- 全赠送 + 全赠送
- 收费 + 收费
@@ -449,7 +457,7 @@ import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import mm from "../../utlis/mm"; -import { objCopy, setNull, dddw, parseID, birthdayToAge } from "../../utlis/proFunc"; +import { objCopy, setNull, dddw, parseID, birthdayToAge,deepCopy } from "../../utlis/proFunc"; import Camera from "./Camera.vue"; import PatientRegisterItem from "./PatientRegisterItem.vue"; import LisRequest from "./LisRequest.vue"; @@ -466,6 +474,7 @@ export default { return { apiurl: mm.apiurl, brushTimes: 0, + payTypeFlag:'', form: { id: "", //id patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000... @@ -509,6 +518,10 @@ export default { creationTime: "", lastModificationTime: "", lastModifierId: null, + isVipBox: false, //vip客户 + isNameHideBox: false, //隐藏姓名 + isPhoneFollowBox: false, //电话随访 + isLockBox: false, //是否锁住 }, //单位 记录 目前新增与更新是一致 defaultNull: [ @@ -546,6 +559,7 @@ export default { //挂载完成 mounted() { objCopy(this.formInitData, this.form); + this.initBox(); }, computed: { @@ -635,12 +649,48 @@ export default { return moment(new Date(date)).format(forMat); }, + changeBox(type) { + //赋值 + if(this.form[type + 'Box']){ + this.form[type] = 'Y'; + }else{ + this.form[type] = 'N'; + } + }, + + initBox(){ + if(this.form.isVip == 'Y'){ + this.form.isVipBox = true; + }else{ + this.form.isVipBox = false; + } + + if(this.form.isNameHide == 'Y'){ + this.form.isNameHideBox = true; + }else{ + this.form.isNameHideBox = false; + } + + if(this.form.isPhoneFollow == 'Y'){ + this.form.isPhoneFollowBox = true; + }else{ + this.form.isPhoneFollowBox = false; + } + + if(this.form.isLock == 'Y'){ + this.form.isLockBox = true; + }else{ + this.form.isLockBox = false; + } + + }, + //提交 Onsubmit(formName, msgTip) { this.$refs[formName].validate((valid) => { if (valid) { //赋值 - let body = { ...this.form }; + let body = deepCopy(this.form); delete body.id; delete body.patientRegisterNo; @@ -652,6 +702,10 @@ export default { delete body.creationTime; delete body.lastModificationTime; delete body.lastModifierId; + delete body.isVipBox; + delete body.isNameHideBox; + delete body.isPhoneFollowBox; + delete body.isLockBox; setNull(body, this.defaultNull); @@ -930,6 +984,12 @@ export default { this.brushTimes++; this.patientRegister.lisRequestVisble = true; }, + + toCharge(patientRegisterNo){ + this.patientRegister.patientRegisterRd.patientRegisterNo = patientRegisterNo; + this.$router.push({ path: "/charge" }); + }, + }, //监听事件 @@ -941,6 +1001,7 @@ export default { if (newVal != oldVal) { console.log('this.editTimes', this.editTimes) objCopy(this.formInitData, this.form); + this.initBox(); //console.log('this.form',this.form) } }, diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index cd7e53d..8975740 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -92,7 +92,7 @@ @@ -137,7 +137,7 @@ import { mapState, mapActions } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { arrayFilter, arrayReduce, arrayExistObj, dddw } from "../../utlis/proFunc"; export default { - props: ["patientRegisterForm"], + props: ["patientRegisterForm","payTypeFlag"], data() { return { itemType: [], //项目类别 @@ -813,6 +813,16 @@ export default { } }, + //按钮更新支付方式 + "payTypeFlag"(newVal, oldVal) { + if (newVal != oldVal && newVal != '') { + this.patientRegister.patientRegisterAbs.forEach(e =>{ + e.payTypeFlag = newVal; + return e; + }); + this.onSubmit('调整支付方式'); + } + }, }, }; diff --git a/src/views/charge/charge.vue b/src/views/charge/charge.vue index 74880c7..1b93161 100644 --- a/src/views/charge/charge.vue +++ b/src/views/charge/charge.vue @@ -316,11 +316,17 @@ export default { created() { this.dictInit(); + this.query.patientRegisterNo = this.patientRegister.patientRegisterRd.patientRegisterNo; }, //挂载完成 mounted() { - this.Query(); + if(this.query.patientRegisterNo){ + this.Query('patientRegisterNo'); + }else{ + this.Query(); + } + }, computed: {