|
@@ -1,5 +1,6 @@
|
|
|
import { getYbParams } from "./service";
|
|
|
import { tradePay } from "../../utils/tradePay";
|
|
|
+import { prePayConfirm } from "../../../../core/utils/ywtService";
|
|
|
import history from "../../utils/history";
|
|
|
// import { reportApi, reportCmPV_YL } from "../../utils/cloudMonitorHelper";
|
|
|
// import { getSubscribeAuth } from "../../../../core/utils/ywtService";
|
|
@@ -20,6 +21,7 @@ Component({
|
|
|
|
|
|
didMount() {
|
|
|
this.getPayDetail(this.$page.data.query);
|
|
|
+ this.handlePrePayConfirm()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -27,6 +29,29 @@ Component({
|
|
|
this.subscribe = ref;
|
|
|
},
|
|
|
|
|
|
+ async handlePrePayConfirm() {
|
|
|
+ my.showLoading({ mask: true });
|
|
|
+ const { hisOrderNo: hisOrdNum, hisPatientId: patientId, hisClinicCode: clinicCode, authCode, total: orderSum, orderInsType } = this.$page.data.query
|
|
|
+ const [err, result] = await prePayConfirm({
|
|
|
+ patientId,
|
|
|
+ clinicCode,
|
|
|
+ hisOrdNum,
|
|
|
+ orderSum,
|
|
|
+ payInsType: '2',
|
|
|
+ orderInsType,
|
|
|
+ authCode,
|
|
|
+ })
|
|
|
+ if (!err) {
|
|
|
+ // 预结算成功
|
|
|
+ this.setData({
|
|
|
+ }, () => {
|
|
|
+ my.hideLoading()
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ my.hideLoading()
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
parseDetailItems(detailItems) {
|
|
|
const list = detailItems
|
|
|
? JSON.parse(decodeURIComponent(detailItems || ""))
|