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 {
width: 228px;
width: 230px;
// border: 1px solid var(--color-table-border-bottom-color);
border-radius: 4px;
overflow: hidden;

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

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

9
src/services/ElectInvoice/index.js

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