Commit 1086f385 authored by 任鸿志's avatar 任鸿志

fix(outpatientCharging): 修复共济支付逻辑

- 优化了共济支付相关的计算逻辑
- 调整了患者负担、医保扣除金额等字段的处理方式
- 修复了部分潜在的bug和性能问题
parent 59febbd0
...@@ -176,7 +176,6 @@ ...@@ -176,7 +176,6 @@
<div class="form_item"> <div class="form_item">
<el-tag class="label" color="#E7EEFF">人员类别</el-tag> <el-tag class="label" color="#E7EEFF">人员类别</el-tag>
<el-input v-model="patientData.type.name" disabled></el-input> <el-input v-model="patientData.type.name" disabled></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -677,9 +676,9 @@ export default { ...@@ -677,9 +676,9 @@ export default {
cardType: '', // 卡类型 cardType: '', // 卡类型
patientData: { patientData: {
type: {}, type: {},
settle_type:{ settle_type: {
name:'' name: '',
} },
}, },
tableDataList: [], tableDataList: [],
only_qq: 0, only_qq: 0,
...@@ -765,9 +764,9 @@ export default { ...@@ -765,9 +764,9 @@ export default {
name: '', name: '',
}, },
patient_burden:0, patient_burden: 0,
his_deduct_amount:0, his_deduct_amount: 0,
grzhzf:0, grzhzf: 0,
djf: 0, djf: 0,
zhye: 0, zhye: 0,
brxm: '', brxm: '',
...@@ -788,7 +787,7 @@ export default { ...@@ -788,7 +787,7 @@ export default {
form: { form: {
djf: 0, djf: 0,
admin_djf: '', admin_djf: '',
grzhzf:0, grzhzf: 0,
ybkh: '', ybkh: '',
sfzh: '', sfzh: '',
jbjg: '', jbjg: '',
...@@ -1064,14 +1063,14 @@ export default { ...@@ -1064,14 +1063,14 @@ export default {
//当共济支付开关打开时,其他额度根据共济变动 //当共济支付开关打开时,其他额度根据共济变动
gjzhifu(e) { gjzhifu(e) {
this.$forceUpdate() this.$forceUpdate()
if(this.bxxxinfo.his_deduct_amount==''){ if (this.bxxxinfo.his_deduct_amount == '') {
this.bxxxinfo.his_deduct_amount = 0 this.bxxxinfo.his_deduct_amount = 0
} }
if (this.bxxxinfo.gjzhzf=='') { if (this.bxxxinfo.gjzhzf == '') {
this.bxxxinfo.gjzhzf=0 this.bxxxinfo.gjzhzf = 0
} }
if (this.bxxxinfo.grzhzf=='') { if (this.bxxxinfo.grzhzf == '') {
this.bxxxinfo.grzhzf=0 this.bxxxinfo.grzhzf = 0
} }
let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1 let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1
...@@ -2398,10 +2397,10 @@ export default { ...@@ -2398,10 +2397,10 @@ export default {
}, },
selectCardYiboPreselect(data, x, y) { selectCardYiboPreselect(data, x, y) {
// 判断慢病 // 判断慢病
if (this.selectTableArr[0]?.settle_type.is_mb && this.man_name=='') { if (this.selectTableArr[0]?.settle_type.is_mb && this.man_name == '') {
// 判断多病种慢病 // 判断多病种慢病
if (data?.mzdbjbs_arr.length > 1 ) { if (data?.mzdbjbs_arr.length > 1) {
this.moreshow = true this.moreshow = true
this.moreshowdata = { this.moreshowdata = {
data: data, data: data,
...@@ -2453,7 +2452,7 @@ export default { ...@@ -2453,7 +2452,7 @@ export default {
if (this.man_name == '2' || this.man_name == '3' || this.man_name == '1') { if (this.man_name == '2' || this.man_name == '3' || this.man_name == '1') {
zhenduan = '' zhenduan = ''
} }
this.yujiesuanLoading = true this.yujiesuanLoading = true
this.xj_amount = 0 this.xj_amount = 0
this.source_pay_amount = 0 this.source_pay_amount = 0
...@@ -2469,25 +2468,32 @@ export default { ...@@ -2469,25 +2468,32 @@ export default {
channel: this.channel, channel: this.channel,
// is_gz: this.man_name == '3' ? true : false, // is_gz: this.man_name == '3' ? true : false,
injury_date: this.GSdatatime, injury_date: this.GSdatatime,
p_jbbm: this.man_name == '1'?'': this.man_name == '2'?'': this.man_name == '3'?'':this.selectTableArr[0]?.settle_type.is_mb ? zhenduan : '', p_jbbm: this.man_name == '1' ? '' : this.man_name == '2' ? '' : this.man_name == '3' ? '' : this.selectTableArr[0]?.settle_type.is_mb ? zhenduan : '',
patient_id: this.patientData.patient_id, patient_id: this.patientData.patient_id,
cache_key: data.cache_key, cache_key: data.cache_key,
prescription_nos: this.cost_id, prescription_nos: this.cost_id,
is_mt: this.man_name == '3' ? false :this.man_name == '2'?true:this.selectTableArr[0] ? this.selectTableArr[0].settle_type.is_mt : '', is_mt: this.man_name == '3' ? false : this.man_name == '2' ? true : this.selectTableArr[0] ? this.selectTableArr[0].settle_type.is_mt : '',
family_pay: false, family_pay: false,
settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '', settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '',
}) })
.then(res => { .then(res => {
this.bxxxinfo = res.data this.bxxxinfo = res.data
this.bxxxinfo.his_deduct_amount = 0 this.bxxxinfo.his_deduct_amount = 0
this.bxxxinfo.settle_type=this.man_name=='1'?'自费':this.man_name=='2'?'门诊统筹':this.man_name=='3'?'医保个账':this.man_name=='4'?'门诊慢性病':this.typeList[0].settle_type.name this.bxxxinfo.settle_type =
this.man_name == '1' ? '自费' : this.man_name == '2' ? '门诊统筹' : this.man_name == '3' ? '医保个账' : this.man_name == '4' ? '门诊慢性病' : this.typeList[0].settle_type.name
if (res.data.mzxets != '') { if (res.data.mzxets != '') {
this.dataText = res.data.mzxets this.dataText = res.data.mzxets
this.GSshow = true this.GSshow = true
} }
this.yujiesuanLoading = false this.yujiesuanLoading = false
this.moreLoading = false this.moreLoading = false
.022 console.log(res.data.his_deduct_amount, '*********************')
familybalanceinfor({
patient_id: this.patientData.patient_id,
pre_key: res.data.pre_key,
cache_key: this.form.cache_key,
}).then(async res2 => {
this.familyType = res2.data.family_type
if (res2.data.family_type == '1') { if (res2.data.family_type == '1') {
this.bxxxinfo.gjzhzf = res2.data.gjzhxfje this.bxxxinfo.gjzhzf = res2.data.gjzhxfje
this.bxxxinfo.grzhzf = this.round(res2.data.grzhzf - res2.data.gjzhxfje, 2) this.bxxxinfo.grzhzf = this.round(res2.data.grzhzf - res2.data.gjzhxfje, 2)
...@@ -2506,15 +2512,15 @@ export default { ...@@ -2506,15 +2512,15 @@ export default {
let djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) //this.round(this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) - this.bxxxinfo.personal_pay_syd,2) let djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) //this.round(this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) - this.bxxxinfo.personal_pay_syd,2)
if (this.bxxxinfo.personal_balance >= djf) { if (this.bxxxinfo.personal_balance >= djf) {
this.bxxxinfo.grzhzf = djf this.bxxxinfo.grzhzf = djf
// if (this.form.insurance_type == 'LONGDISTANCE') { // if (this.form.insurance_type == 'LONGDISTANCE') {
// this.bxxxinfo.grzhzf = 0 // this.bxxxinfo.grzhzf = 0
// } // }
} }
if (this.bxxxinfo.personal_balance < djf) { if (this.bxxxinfo.personal_balance < djf) {
this.bxxxinfo.grzhzf = this.bxxxinfo.personal_balance this.bxxxinfo.grzhzf = this.bxxxinfo.personal_balance
// if (this.form.insurance_type == 'LONGDISTANCE') { // if (this.form.insurance_type == 'LONGDISTANCE') {
// this.bxxxinfo.grzhzf = 0 // this.bxxxinfo.grzhzf = 0
// } // }
if (res2.data.family_type != '1') { if (res2.data.family_type != '1') {
if (res2.data.gjzhye > this.round(djf - this.bxxxinfo.grzhzf, 2)) { if (res2.data.gjzhye > this.round(djf - this.bxxxinfo.grzhzf, 2)) {
this.bxxxinfo.gjzhzf = this.round(djf - this.bxxxinfo.grzhzf, 2) this.bxxxinfo.gjzhzf = this.round(djf - this.bxxxinfo.grzhzf, 2)
...@@ -2583,23 +2589,24 @@ export default { ...@@ -2583,23 +2589,24 @@ export default {
channel: this.channel, channel: this.channel,
}) })
.then(res => { .then(res => {
console.log("=----------------------") console.log('=----------------------')
this.yujiesuanLoading = false this.yujiesuanLoading = false
this.dialogVisible = true this.dialogVisible = true
this.bxxxinfo = res.data this.bxxxinfo = res.data
console.log( this.bxxxinfo,'++++++++++++++++++++') console.log(this.bxxxinfo, '++++++++++++++++++++')
this.bxxxinfo.settle_type=this.man_name=='1'?'自费':this.man_name=='2'?'门诊统筹':this.man_name=='3'?'医保个账':this.man_name=='4'?'门诊慢性病': this.typeList[0].settle_type.name this.bxxxinfo.settle_type =
this.man_name == '1' ? '自费' : this.man_name == '2' ? '门诊统筹' : this.man_name == '3' ? '医保个账' : this.man_name == '4' ? '门诊慢性病' : this.typeList[0].settle_type.name
this.bxxxinfo.gjzhzf = 0 this.bxxxinfo.gjzhzf = 0
this.bxxxinfo.his_deduct_amount = 0 this.bxxxinfo.his_deduct_amount = 0
this.bxxxinfo.grzhzf = 0 this.bxxxinfo.grzhzf = 0
let djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) let djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2)
if (this.bxxxinfo.cash_balance >= djf) { if (this.bxxxinfo.cash_balance >= djf) {
this.bxxxinfo.his_deduct_amount = djf this.bxxxinfo.his_deduct_amount = djf
} else { } else {
this.bxxxinfo.his_deduct_amount = this.bxxxinfo.cash_balance this.bxxxinfo.his_deduct_amount = this.bxxxinfo.cash_balance
} }
this.form.djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) this.form.djf = this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2)
}) })
.catch(err => { .catch(err => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment