12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- import request from '../../service/request'; // 查询订单状态
- function payDetail(data) {
- return request.post('/miniProRequest.pay.payDetail', data);
- }
- /**
- * 获取医保缴费字段
- * @param {object} obj
- */
- function getYbParams(obj) {
- if (!obj) return {};
- const list = obj.insUploadFeeResp.split(":");
- const params = {};
- // 总额:feeSumamt
- // 医保支付:fundPay
- // 个人支付:ownPayAmt
- list.map((i, index) => {
- if (i.includes("feeSumamt")) {
- let innerList = i.split(",");
- let value = "";
- if (innerList[0].includes("feeSumamt")) {
- value = innerList[1];
- } else {
- value = list[index + 1].split(",")[0];
- }
- params.feeSumamt = value
- .replaceAll('"', "")
- .replaceAll("}", "")
- .replaceAll("{", "")
- .replaceAll("\\", "");
- }
- if (i.includes("fundPay")) {
- let innerList = i.split(",");
- let value = "";
- if (innerList[0].includes("fundPay")) {
- value = innerList[1];
- } else {
- value = list[index + 1].split(",")[0];
- }
- params.fundPay = value
- .replaceAll('"', "")
- .replaceAll("}", "")
- .replaceAll("{", "")
- .replaceAll("\\", "");
- }
- if (i.includes("ownPayAmt")) {
- let innerList = i.split(",");
- let value = "";
- if (innerList[0].includes("ownPayAmt")) {
- value = innerList[1];
- } else {
- value = list[index + 1].split(",")[0];
- }
- params.ownPayAmt = value
- .replaceAll('"', "")
- .replaceAll("}", "")
- .replaceAll("{", "")
- .replaceAll("\\", "");
- }
- });
- return params;
- }
- export default {
- payDetail,
- getYbParams
- };
|