Commit 71cac618 authored by 任鸿志's avatar 任鸿志

refactor(jiesuan): 优化结算功能

- 修改了多个组件中的结算逻辑,增加了 settle_fee_id 参数
- 优化了自费预结算和普通预结算的处理流程
- 调整了订单和费用的处理方式,提高了代码的可读性和可维护性
parent 05d111f1
This diff is collapsed.
...@@ -1729,8 +1729,8 @@ export default { ...@@ -1729,8 +1729,8 @@ export default {
var orders = [] var orders = []
var costint = [] var costint = []
var cost_ids = [] var cost_ids = []
var order_no = [] var order_no = []
var serial_arr = []; var serial_arr = []
x.slice(0, x.length - 1).forEach(function (element) { x.slice(0, x.length - 1).forEach(function (element) {
let obj={} let obj={}
total += element.total * 1 * 1 total += element.total * 1 * 1
...@@ -1783,7 +1783,7 @@ export default { ...@@ -1783,7 +1783,7 @@ export default {
total += element.total * 1 * 1 total += element.total * 1 * 1
orders.push(element.settle_type) orders.push(element.settle_type)
cost_ids.push(element.serial_no) cost_ids.push(element.serial_no)
order_no.push(element.order_no) order_no.push(element.order_no)
costint.push(element) costint.push(element)
obj['serial_no']=element.serial_no obj['serial_no']=element.serial_no
obj['order_no']=element.order_no obj['order_no']=element.order_no
...@@ -2046,7 +2046,12 @@ export default { ...@@ -2046,7 +2046,12 @@ export default {
if (this.man_name == '5') { if (this.man_name == '5') {
this.isGS=true this.isGS=true
} }
let costIDarr=[]
this.costlist.forEach(element => {
costIDarr.push(element.settle_fee_id)
})
await settlementPre({ await settlementPre({
settle_fee_id:costIDarr.toString(),
sy: this.is_sy, sy: this.is_sy,
is_gs: this.isGS, is_gs: this.isGS,
channel: this.channel, channel: this.channel,
...@@ -2168,7 +2173,12 @@ export default { ...@@ -2168,7 +2173,12 @@ export default {
this.xj_amount = 0 this.xj_amount = 0
this.source_pay_amount = 0 this.source_pay_amount = 0
this.form = {} this.form = {}
let costIDarr=[]
this.costlist.forEach(element => {
costIDarr.push(element.settle_fee_id)
})
await settleSelfPre({ await settleSelfPre({
settle_fee_id:costIDarr.toString(),
patient_id: this.patientData.patient_id, patient_id: this.patientData.patient_id,
prescription_nos: this.cost_id, prescription_nos: this.cost_id,
settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '', settle_type: this.selectTableArr[0] ? this.selectTableArr[0].settle_type.code : '',
......
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