Commit 397318ba authored by 任鸿志's avatar 任鸿志

fix(settlement): 修正支付宝支付逻辑

- 设置 rechargeType 为 0,表示不是预交金充值
- 移除了不必要的注释代码
- 修复了支付成功后的余额计算逻辑
- 添加了支付相关参数,包括 source_type、source_trade_no 等
parent 9c0dc822
...@@ -1155,13 +1155,9 @@ export default { ...@@ -1155,13 +1155,9 @@ export default {
authCode: this.fee.weixin, authCode: this.fee.weixin,
operatorNo: this.jobNumber, operatorNo: this.jobNumber,
payType: e == '1' ? 'cumsNative' : e == '5' ? 'cash' : e == '2'?'智慧医保':'', // 支付类型 cumsNative 聚合支付 cash 现金 payType: e == '1' ? 'cumsNative' : e == '5' ? 'cash' : e == '2'?'智慧医保':'', // 支付类型 cumsNative 聚合支付 cash 现金
rechargeType: 1, // 是否预交金充值 1是 0否, rechargeType: 0, // 是否预交金充值 1是 0否,
patientId: this.patientData.patient_id, patientId: this.patientData.patient_id,
deptCode: this.dept, deptCode: this.dept,
// amount: this.form.djf,
// auth_code: this.fee.weixin,
// patient_id: this.patientData.patient_id,
// settlement_no: this.bxxxinfo.settlement_no,
}) })
.then(response => { .then(response => {
if (response.code == 200) { if (response.code == 200) {
...@@ -1170,21 +1166,21 @@ export default { ...@@ -1170,21 +1166,21 @@ export default {
type: 'success', type: 'success',
}) })
this.payData = response.data this.payData = response.data
// if (e == '1') { if (e == '1') {
// this.xj_amount = 0 this.xj_amount = 0
// this.source_pay_amount = this.form.djf this.source_pay_amount = this.form.djf
// } else { } else {
// this.xj_amount = this.form.djf this.xj_amount = this.form.djf
// this.source_pay_amount = 0 this.source_pay_amount = 0
// } }
this.bxxxinfo.his_deduct_amount = this.form.djf + this.bxxxinfo.his_deduct_amount this.bxxxinfo.his_deduct_amount = this.form.djf + this.bxxxinfo.his_deduct_amount
this.form.djf = 0 this.form.djf = 0
//接口返回新的院内账户余额 //接口返回新的院内账户余额
this.bxxxinfo.cash_balance = response.data.hisBalance * 1 // this.bxxxinfo.cash_balance = response.data.hisBalance * 1
let djsold = this.round(this.bxxxinfo.brfdje - this.bxxxinfo.grzhzf, 2) let djsold = this.round(this.bxxxinfo.brfdje - this.bxxxinfo.grzhzf, 2)
// 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(djsold - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.gjzhzf, 2) //this.round(- chongzhi, 2) this.form.djf = this.round(this.round(this.round(djsold - this.bxxxinfo.his_deduct_amount, 2) - this.bxxxinfo.gjzhzf, 2)- chongzhi, 2) //this.round(- chongzhi, 2)
//微信支付宝弹窗 //微信支付宝弹窗
this.uploadfeeshow = false this.uploadfeeshow = false
...@@ -2008,13 +2004,13 @@ export default { ...@@ -2008,13 +2004,13 @@ export default {
}, 1000) }, 1000)
this.sureshow = true this.sureshow = true
let y = { let y = {
// source_type: this.payData.targetSys, source_type: this.payData.targetSys,
// source_trade_no: this.payData.sourceTradeNo, source_trade_no: this.payData.sourceTradeNo,
is_gz: this.gz_name, is_gz: this.gz_name,
channel: this.channel, channel: this.channel,
// xj_amount: this.xj_amount, xj_amount: this.xj_amount,
// source_pay_amount: this.source_pay_amount, source_pay_amount: this.source_pay_amount,
// tradeNo: this.payData.tradeNo, tradeNo: this.payData.tradeNo,
family_type: this.familyType, family_type: this.familyType,
patient_id: this.patientData.patient_id, patient_id: this.patientData.patient_id,
personal_pay: this.bxxxinfo.grzhzf, personal_pay: this.bxxxinfo.grzhzf,
...@@ -2647,11 +2643,11 @@ export default { ...@@ -2647,11 +2643,11 @@ export default {
return false return false
} }
let y = { let y = {
// source_type: this.payData.targetSys, source_type: this.payData.targetSys,
// source_trade_no: this.payData.sourceTradeNo, source_trade_no: this.payData.sourceTradeNo,
channel: this.channel, channel: this.channel,
// xj_amount: this.xj_amount, xj_amount: this.xj_amount,
// source_pay_amount: this.source_pay_amount, source_pay_amount: this.source_pay_amount,
tradeNo: this.payData.tradeNo, tradeNo: this.payData.tradeNo,
patient_id: this.patientData.patient_id, patient_id: this.patientData.patient_id,
personal_pay: this.bxxxinfo.grzhzf, personal_pay: this.bxxxinfo.grzhzf,
......
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