Commit d18c2dd2 authored by 任鸿志's avatar 任鸿志

refactor(outpatientCharging): 优化费用计算逻辑

- 调整了个人负担金额的计算方式,移除了部分冗余的四舍五入操作
- 注释掉了一些不必要的代码行,提高了代码的可读性
- 保留了原有的逻辑结构,确保功能不受影响
parent 2044f830
...@@ -1052,10 +1052,13 @@ export default { ...@@ -1052,10 +1052,13 @@ export default {
gjzhifu(e) { gjzhifu(e) {
this.$forceUpdate() this.$forceUpdate()
let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1 let chongzhi = this.source_pay_amount * 1 + this.xj_amount * 1
this.form.djf = this.round(this.round( this.form.djf =
// this.round(
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) - chongzhi, this.round(this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.grzhzf, 2) - chongzhi,
2, 2,
)- this.bxxxinfo.personal_pay_syd,2) )
// - this.bxxxinfo.personal_pay_syd,2)
// this.round( // - chongzhi, // this.round( // - chongzhi,
// 2, // 2,
// ) // )
...@@ -2462,9 +2465,9 @@ export default { ...@@ -2462,9 +2465,9 @@ export default {
this.bxxxinfo.family_balance = res2.data.gjzhye this.bxxxinfo.family_balance = res2.data.gjzhye
// this.dialogVisible = true // this.dialogVisible = true
console.log(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2),this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2), 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),'oooooooooooooooooo') // console.log(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2),this.round(this.round(this.bxxxinfo.patient_burden - this.bxxxinfo.gjzhzf, 2) - this.bxxxinfo.his_deduct_amount, 2), 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),'oooooooooooooooooo')
this.bxxxinfo.grzhzf = 0 this.bxxxinfo.grzhzf = 0
let djf = 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') {
...@@ -2498,7 +2501,7 @@ export default { ...@@ -2498,7 +2501,7 @@ export default {
// console.log(this.bxxxinfo.his_deduct_amount, this.form.insurance_type, '++++++++++++') // console.log(this.bxxxinfo.his_deduct_amount, this.form.insurance_type, '++++++++++++')
this.form.djf = 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) //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) //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=0 // this.form.djf=0
console.log(this.form.djf, 'djf') console.log(this.form.djf, 'djf')
// 验证违规 // 验证违规
......
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