Browse Source

feat(): 对接重复支付退款记录数据

tags/PMS_Frontend_v1.0.6-develop
chenqiang 1 year ago
parent
commit
d1608f075c
  1. 2
      src/pages/FinancialMgm/SettleBill/PayRepeat/index.scss
  2. 95
      src/pages/FinancialMgm/SettleBill/PayRepeat/loadable.jsx
  3. 9
      src/services/ElectInvoice/index.js

2
src/pages/FinancialMgm/SettleBill/PayRepeat/index.scss

@ -87,7 +87,7 @@ $color-primary: var(--color-primary);
} }
.inputst { .inputst {
width: 228px;
width: 230px;
// border: 1px solid var(--color-table-border-bottom-color); // border: 1px solid var(--color-table-border-bottom-color);
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;

95
src/pages/FinancialMgm/SettleBill/PayRepeat/loadable.jsx

@ -35,11 +35,12 @@ function PayRepeat() {
//-退 //-退
const formdatb = { const formdatb = {
type: 2, type: 2,
time_class: "1", //
reason: 2,
time_type: "1", //
end_time: moment(new Date()).format("YYYY-MM-DD"), end_time: moment(new Date()).format("YYYY-MM-DD"),
start_time: moment(new Date()).subtract(1, "months").format("YYYY-MM-DD"), start_time: moment(new Date()).subtract(1, "months").format("YYYY-MM-DD"),
water_class: "1", //
out_trade_no: "", //
flow_type: "1", //
flow_id: "", //
pn: 1, pn: 1,
page_size: dictionary?.pageSizeOptions1[0], page_size: dictionary?.pageSizeOptions1[0],
}; };
@ -152,14 +153,14 @@ function PayRepeat() {
}, },
{ {
title: "退款金额", title: "退款金额",
dataIndex: "paid_in_money",
key: "paid_in_money",
dataIndex: "has_refund_actual_amount",
key: "has_refund_actual_amount",
align: "center", align: "center",
}, },
{ {
title: "支付方式", title: "支付方式",
dataIndex: "payment_name",
key: "payment_name",
dataIndex: "payment_channels_name",
key: "payment_channels_name",
align: "center", align: "center",
}, },
{ {
@ -170,20 +171,20 @@ function PayRepeat() {
}, },
{ {
title: "对方流水号", title: "对方流水号",
dataIndex: "third_party_flow_id",
key: "third_party_flow_id",
dataIndex: "flow_id",
key: "flow_id",
align: "center", align: "center",
}, },
{ {
title: "退款时间", title: "退款时间",
dataIndex: "out_time",
key: "out_time",
dataIndex: "refund_time",
key: "refund_time",
align: "center", align: "center",
}, },
{ {
title: "操作人", title: "操作人",
dataIndex: "workker",
key: "workker",
dataIndex: "user",
key: "user",
align: "center", align: "center",
}, },
{ {
@ -200,7 +201,7 @@ function PayRepeat() {
<a <a
onClick={() => { onClick={() => {
setEdit(true); setEdit(true);
setTextcl("重复支付自动退款");
getRepeatDetail(record.park_record_id); getRepeatDetail(record.park_record_id);
}} }}
> >
@ -473,14 +474,9 @@ function PayRepeat() {
if (parseInt(res?.status) === 20000) { if (parseInt(res?.status) === 20000) {
setTabdata({ setTabdata({
order: [res?.data?.order || {}], order: [res?.data?.order || {}],
flow_list: [
{
...res?.data?.flow_list[0],
repeat_out_trade_no: "",
},
{ ...res?.data?.flow_list[0] },
],
flow_list: res?.data?.flow_list || [],
}); });
setTextcl(res?.data?.flow_list[1]?.remark || "");
setOpen(true); setOpen(true);
} else { } else {
message.error(res?.message); message.error(res?.message);
@ -515,24 +511,24 @@ function PayRepeat() {
} }
); );
} else { } else {
// ajax.ElectInvoice.getPayRepeat({ ...data }).then(
// (res) => {
// if (parseInt(res?.status) === 20000) {
// setData({
// data: res?.data || [],
// total: res.total || 0,
// });
setLoading(true);
// } else {
// message.error(res?.message);
// }
// setLoading(true);
// },
// (err) => {
// console.log(err);
// setLoading(true);
// }
// );
ajax.ElectInvoice.getPayRepeatRefund({ ...data }).then(
(res) => {
if (parseInt(res?.status) === 20000) {
setData({
data: res?.data?.list || [],
total: res.total || 0,
});
setLoading(true);
} else {
message.error(res?.message);
}
setLoading(true);
},
(err) => {
console.log(err);
setLoading(true);
}
);
} }
}; };
useEffect(() => { useEffect(() => {
@ -555,6 +551,10 @@ function PayRepeat() {
...formdata, ...formdata,
type: 1, type: 1,
}); });
setData({
data: [],
total: 0,
});
}} }}
> >
重复支付 重复支付
@ -570,6 +570,10 @@ function PayRepeat() {
...formdatb, ...formdatb,
type: 2, type: 2,
}); });
setData({
data: [],
total: 0,
});
}} }}
> >
退款记录 退款记录
@ -698,7 +702,7 @@ function PayRepeat() {
<div className="form_item"> <div className="form_item">
<span className="labs"> <span className="labs">
<Select <Select
value={FormData.time_class}
value={FormData.time_type}
style={{ style={{
width: "100%", width: "100%",
}} }}
@ -716,7 +720,7 @@ function PayRepeat() {
onChange={(e) => onChange={(e) =>
setFormData({ setFormData({
...FormData, ...FormData,
time_class: e,
time_type: e,
}) })
} }
/> />
@ -758,7 +762,7 @@ function PayRepeat() {
<div className="form_item"> <div className="form_item">
<span className="labs"> <span className="labs">
<Select <Select
value={FormData.water_class}
value={FormData.flow_type}
style={{ style={{
width: "100%", width: "100%",
}} }}
@ -776,14 +780,14 @@ function PayRepeat() {
onChange={(e) => onChange={(e) =>
setFormData({ setFormData({
...FormData, ...FormData,
water_class: e,
flow_type: e,
}) })
} }
/> />
</span> </span>
<div className="inputst"> <div className="inputst">
<Input <Input
value={FormData.out_trade_no}
value={FormData.flow_id}
// style={{ // style={{
// width: 294, // width: 294,
// }} // }}
@ -791,7 +795,7 @@ function PayRepeat() {
onChange={(e) => onChange={(e) =>
setFormData({ setFormData({
...FormData, ...FormData,
out_trade_no: e.target.value,
flow_id: e.target.value,
}) })
} }
/> />
@ -885,6 +889,7 @@ function PayRepeat() {
setTabdata([]); setTabdata([]);
}} }}
width={1200} width={1200}
destroyOnClose
className="modal-repeat" className="modal-repeat"
title={FormDatas.type == 1 && Edit ? "重复支付详情" : "退款详情"} title={FormDatas.type == 1 && Edit ? "重复支付详情" : "退款详情"}
> >

9
src/services/ElectInvoice/index.js

@ -118,6 +118,14 @@ const getPayRepeat = (params) => {
type: "post", type: "post",
data: params, data: params,
}); });
};
//退款
const getPayRepeatRefund = (params) => {
return ajax({
url: "/api/fin/bill/refund_list",
type: "post",
data: params,
});
}; };
// 获取详情数据 // 获取详情数据
const getRepeatDetail = (params) => { const getRepeatDetail = (params) => {
@ -144,4 +152,5 @@ export default {
getSetBilly, getSetBilly,
getPayRepeat, getPayRepeat,
getRepeatDetail, getRepeatDetail,
getPayRepeatRefund,
}; };
Loading…
Cancel
Save