|
@@ -200,12 +200,9 @@ Component(
|
|
|
medicalCardId,
|
|
|
consumeType: isUserPersonalAccount ? 0 : 2,
|
|
|
});
|
|
|
- console.log("result ===>", result);
|
|
|
if (!err) {
|
|
|
// 预结算成功
|
|
|
- console.log("111");
|
|
|
const ybData = await getYbParams(result);
|
|
|
- console.log("ybData ===>", ybData);
|
|
|
this.setData(
|
|
|
{
|
|
|
preConfirmInfo: Object.assign(result, ybData),
|
|
@@ -228,130 +225,96 @@ Component(
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- },
|
|
|
|
|
|
- async handleIsUserPersonalAccount(e) {
|
|
|
- const _this = this;
|
|
|
- const { valuex } = e.currentTarget.dataset;
|
|
|
- const { hisOrderNo, hisPatientId } = this.$page.data.query;
|
|
|
- const { preConfirmInfo, isUserPersonalAccount } = this.data;
|
|
|
- if (isUserPersonalAccount === valuex) return;
|
|
|
- my.showLoading();
|
|
|
- this.setData(
|
|
|
- {
|
|
|
- isUserPersonalAccount: valuex,
|
|
|
- isCulculate: true,
|
|
|
- },
|
|
|
- async () => {
|
|
|
- const [err, result] = await revokeSettle({
|
|
|
- hisOrderNo,
|
|
|
- insuDivId: preConfirmInfo.insuDivId || "",
|
|
|
- hisPatientId,
|
|
|
- isInsV2: true,
|
|
|
- });
|
|
|
- if (!err) {
|
|
|
- _this.handlePrePayConfirm();
|
|
|
- } else {
|
|
|
- my.showToast({
|
|
|
- type: "fail",
|
|
|
- content: "撤销预结算失败",
|
|
|
- duration: 2000,
|
|
|
- complete() {
|
|
|
- my.hideLoading();
|
|
|
- my.navigateBack();
|
|
|
- },
|
|
|
+ async handleIsUserPersonalAccount(e) {
|
|
|
+ const _this = this;
|
|
|
+ const { valuex } = e.currentTarget.dataset;
|
|
|
+ const { hisOrderNo, hisPatientId } = this.$page.data.query;
|
|
|
+ const { preConfirmInfo, isUserPersonalAccount } = this.data;
|
|
|
+ if (isUserPersonalAccount === valuex) return;
|
|
|
+ my.showLoading();
|
|
|
+ this.setData(
|
|
|
+ {
|
|
|
+ isUserPersonalAccount: valuex,
|
|
|
+ isCulculate: true,
|
|
|
+ },
|
|
|
+ async () => {
|
|
|
+ const [err, result] = await revokeSettle({
|
|
|
+ hisOrderNo,
|
|
|
+ insuDivId: preConfirmInfo.insuDivId || "",
|
|
|
+ hisPatientId,
|
|
|
+ isInsV2: true,
|
|
|
});
|
|
|
+ if (!err) {
|
|
|
+ _this.handlePrePayConfirm();
|
|
|
+ } else {
|
|
|
+ my.showToast({
|
|
|
+ type: "fail",
|
|
|
+ content: "撤销预结算失败",
|
|
|
+ duration: 2000,
|
|
|
+ complete() {
|
|
|
+ my.hideLoading();
|
|
|
+ my.navigateBack();
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- );
|
|
|
- },
|
|
|
+ );
|
|
|
+ },
|
|
|
|
|
|
- getPayDetail1(query) {
|
|
|
- let infoList = [];
|
|
|
- if (query) {
|
|
|
- infoList = [
|
|
|
- {
|
|
|
- title: "就诊信息",
|
|
|
- list: [
|
|
|
- // { label: "门诊类别", value: info.deptName },
|
|
|
- { label: "门诊科室", value: query.deptName },
|
|
|
- { label: "医生姓名", value: query.doctorName },
|
|
|
- { label: "处方时间", value: query.prescribeDate },
|
|
|
- {
|
|
|
- label: "费用总额",
|
|
|
- value: parseFloat(query.total / 100, 2) || 0 + "元",
|
|
|
- highlight: true,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- title: "费用信息",
|
|
|
- list: parseDetailItems(query.orderItems),
|
|
|
- },
|
|
|
- ];
|
|
|
- this.setData({ prescriptionList: infoList });
|
|
|
- }
|
|
|
- },
|
|
|
+ getPayDetail1(query) {
|
|
|
+ let infoList = [];
|
|
|
+ if (query) {
|
|
|
+ infoList = [
|
|
|
+ {
|
|
|
+ title: "就诊信息",
|
|
|
+ list: [
|
|
|
+ // { label: "门诊类别", value: info.deptName },
|
|
|
+ { label: "门诊科室", value: query.deptName },
|
|
|
+ { label: "医生姓名", value: query.doctorName },
|
|
|
+ { label: "处方时间", value: query.prescribeDate },
|
|
|
+ {
|
|
|
+ label: "费用总额",
|
|
|
+ value: parseFloat(query.total / 100, 2) || 0 + "元",
|
|
|
+ highlight: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "费用信息",
|
|
|
+ list: parseDetailItems(query.orderItems),
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.setData({ prescriptionList: infoList });
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- // 查看更多
|
|
|
- openForm() {
|
|
|
- this.setData({
|
|
|
- expand: !this.data.expand,
|
|
|
- });
|
|
|
- },
|
|
|
+ // 查看更多
|
|
|
+ openForm() {
|
|
|
+ this.setData({
|
|
|
+ expand: !this.data.expand,
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- medicareExpand() {
|
|
|
- this.setData({
|
|
|
- medicareExpand: !this.data.medicareExpand,
|
|
|
- });
|
|
|
- },
|
|
|
+ medicareExpand() {
|
|
|
+ this.setData({
|
|
|
+ medicareExpand: !this.data.medicareExpand,
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- handleActionsheet() {
|
|
|
- this.setData({
|
|
|
- actionsheetVisible: !this.data.actionsheetVisible,
|
|
|
- });
|
|
|
- },
|
|
|
+ handleActionsheet() {
|
|
|
+ this.setData({
|
|
|
+ actionsheetVisible: !this.data.actionsheetVisible,
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- // 发起支付
|
|
|
- async onPay(e) {
|
|
|
- const { canPay } = this.data;
|
|
|
- console.log("canPay ==>", canPay);
|
|
|
- if (!canPay) return;
|
|
|
- this._paying = true;
|
|
|
- const {
|
|
|
- hisPatientId,
|
|
|
- age,
|
|
|
- sex,
|
|
|
- orderId,
|
|
|
- hisOrderNo,
|
|
|
- amount,
|
|
|
- deptName,
|
|
|
- doctorName,
|
|
|
- doctorCode,
|
|
|
- hisClinicCode,
|
|
|
- total,
|
|
|
- name,
|
|
|
- orderInsType,
|
|
|
- prescribeDate,
|
|
|
- payInsType = "2",
|
|
|
- medInsFee,
|
|
|
- selfFee,
|
|
|
- payName,
|
|
|
- patName,
|
|
|
- outTradeNo,
|
|
|
- } = this.$page.data.query;
|
|
|
- const {
|
|
|
- preConfirmInfo: { invoiceNo, insuAdmDr, insUploadFeeResp },
|
|
|
- isUserPersonalAccount,
|
|
|
- } = this.data;
|
|
|
- let result = false;
|
|
|
- my.showLoading();
|
|
|
- // 门诊订单
|
|
|
- result = await tradePay(
|
|
|
- {
|
|
|
- useBalance: false,
|
|
|
- useMedicare: true,
|
|
|
- outTradeNo,
|
|
|
+ // 发起支付
|
|
|
+ async onPay(e) {
|
|
|
+ const { canPay } = this.data;
|
|
|
+ console.log("canPay ==>", canPay);
|
|
|
+ if (!canPay) return;
|
|
|
+ this._paying = true;
|
|
|
+ const {
|
|
|
hisPatientId,
|
|
|
age,
|
|
|
sex,
|
|
@@ -361,43 +324,77 @@ Component(
|
|
|
deptName,
|
|
|
doctorName,
|
|
|
doctorCode,
|
|
|
- total,
|
|
|
hisClinicCode,
|
|
|
+ total,
|
|
|
name,
|
|
|
- prescribeDate,
|
|
|
orderInsType,
|
|
|
- payInsType,
|
|
|
- totalFee: total,
|
|
|
+ prescribeDate,
|
|
|
+ payInsType = "2",
|
|
|
medInsFee,
|
|
|
selfFee,
|
|
|
payName,
|
|
|
patName,
|
|
|
- invoiceNo,
|
|
|
- insuAdmDr,
|
|
|
- insUploadFeeResp,
|
|
|
- consumeType: isUserPersonalAccount ? 0 : 2,
|
|
|
- },
|
|
|
- {
|
|
|
- tradeType: "Outpatient",
|
|
|
- }
|
|
|
- );
|
|
|
+ outTradeNo,
|
|
|
+ } = this.$page.data.query;
|
|
|
+ const {
|
|
|
+ preConfirmInfo: { invoiceNo, insuAdmDr, insUploadFeeResp },
|
|
|
+ isUserPersonalAccount,
|
|
|
+ } = this.data;
|
|
|
+ let result = false;
|
|
|
+ my.showLoading();
|
|
|
+ // 门诊订单
|
|
|
+ result = await tradePay(
|
|
|
+ {
|
|
|
+ useBalance: false,
|
|
|
+ useMedicare: true,
|
|
|
+ outTradeNo,
|
|
|
+ hisPatientId,
|
|
|
+ age,
|
|
|
+ sex,
|
|
|
+ orderId,
|
|
|
+ hisOrderNo,
|
|
|
+ amount,
|
|
|
+ deptName,
|
|
|
+ doctorName,
|
|
|
+ doctorCode,
|
|
|
+ total,
|
|
|
+ hisClinicCode,
|
|
|
+ name,
|
|
|
+ prescribeDate,
|
|
|
+ orderInsType,
|
|
|
+ payInsType,
|
|
|
+ totalFee: total,
|
|
|
+ medInsFee,
|
|
|
+ selfFee,
|
|
|
+ payName,
|
|
|
+ patName,
|
|
|
+ invoiceNo,
|
|
|
+ insuAdmDr,
|
|
|
+ insUploadFeeResp,
|
|
|
+ consumeType: isUserPersonalAccount ? 0 : 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tradeType: "Outpatient",
|
|
|
+ }
|
|
|
+ );
|
|
|
|
|
|
- my.hideLoading();
|
|
|
+ my.hideLoading();
|
|
|
|
|
|
- if (result) {
|
|
|
- this._paying = false;
|
|
|
- console.log("pay result ===>", result);
|
|
|
- // 支付成功后返回列表页
|
|
|
- // my.navigateBack();
|
|
|
+ if (result) {
|
|
|
+ this._paying = false;
|
|
|
+ console.log("pay result ===>", result);
|
|
|
+ // 支付成功后返回列表页
|
|
|
+ // my.navigateBack();
|
|
|
|
|
|
- history.replace({
|
|
|
- title: "支付成功",
|
|
|
- query: {},
|
|
|
- pageType: "hospital-payment-detail-yibao-result",
|
|
|
- });
|
|
|
- } else {
|
|
|
- this._paying = false;
|
|
|
- }
|
|
|
+ history.replace({
|
|
|
+ title: "支付成功",
|
|
|
+ query: {},
|
|
|
+ pageType: "hospital-payment-detail-yibao-result",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this._paying = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
})
|
|
|
);
|