Commit 526d2da6 authored by 任鸿志's avatar 任鸿志

refactor(jiesuan): 优化门诊结算逻辑和显示

- 修改了结算类型的判断逻辑,考虑了保险类型的因素
- 优化了个人账户支付和余额计算的相关逻辑
- 调整了结算信息的显示格式,增加了自费和纯个账的判断
- 修复了一些变量初始化和赋值的问题
parent b80ab705
......@@ -1695,12 +1695,13 @@ export default {
settle_type: '',
}
this.ismb = false
console.log(this.orders,'oooooooooooooo')
this.orders.forEach(element => {
if (element) {
this.ismb = true
}
})
if ((!this.ismb && this.man_name == false) || this.channel == '4') {
if (((!this.ismb || this.man_name == true) || this.channel == '4') && this.patientData.insurance_type.value != 'PROVINCE') {
if (this.orders.length > 0) {
this.ybjs()
} else {
......@@ -2428,6 +2429,9 @@ export default {
this.yujiesuanLoading = false
this.moreLoading = false
this.bxxxinfo = res.data
this.bxxxinfo.settle_type.name = //this.bxxxinfo.settle_type.name
this.man_name ?'自费':this.gz_name?"纯个账": this.bxxxinfo.settle_type.name
console.log(this.bxxxinfo,'+++++++++++++++++++')
familybalanceinfor({
patient_id: this.patientData.patient_id,
pre_key: res.data.pre_key,
......@@ -2465,6 +2469,7 @@ export default {
this.bxxxinfo.his_deduct_amount = 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)
if (this.bxxxinfo.personal_balance >= djf) {
this.bxxxinfo.grzhzf = djf
......@@ -2516,21 +2521,27 @@ export default {
zfBeforePre() {
this.yujiesuanLoading = true
this.form = {}
console.log(this.bxxxinfo,'33333333333')
settleSelfPre({ patient_id: this.patientData.patient_id, prescription_nos: this.cost_id, settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '' })
.then(res => {
this.yujiesuanLoading = false
this.dialogVisible = true
this.bxxxinfo = res.data
this.bxxxinfo.gjzhzf = 0
this.bxxxinfo.his_deduct_amount = 0
this.bxxxinfo.grzhzf = 0
this.bxxxinfo.settle_type={name:''}
this.bxxxinfo.settle_type.name = //this.bxxxinfo.settle_type.name
this.man_name ?'自费':this.gz_name?"纯个账": this.selectTableArr[0].settle_type.name
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) {
this.bxxxinfo.his_deduct_amount = djf
} else {
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)
})
.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