Browse Source

fix():改退款订单bug

tags/PMS_Frontend_v1.0.6-develop
xingjx 1 year ago
parent
commit
bc3646530b
  1. 25
      src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.jsx

25
src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.jsx

@ -58,14 +58,25 @@ function ReturnOrderInquiry() {
} }
switch (type) { switch (type) {
case 8: case 8:
obj.render = (text, record) => (<>
obj.render = (text, record) => {
return <>
{record.status_name == "退款失败"||record.status_name =="处理种"?
<span type="primary" style={{ display: 'block', textAlign: 'center' }} onClick={() => {
// refundSearch(record)
// setTkddVisible(true)
}}>
<a>重试</a>
</span>
:null}
<span type="primary" style={{ display: 'block', textAlign: 'center' }} onClick={() => { <span type="primary" style={{ display: 'block', textAlign: 'center' }} onClick={() => {
refundSearch(record) refundSearch(record)
setTkddVisible(true) setTkddVisible(true)
}}> }}>
<a>详情</a> <a>详情</a>
</span> </span>
</>)
</>
}
arr.push(obj) arr.push(obj)
break break
default: break default: break
@ -159,7 +170,7 @@ function ReturnOrderInquiry() {
}, },
]; ];
const [resultData, setResultData] = useState([]) const [resultData, setResultData] = useState([])
const [ycddData, setYcddData] = useState([])//
const [ycddData, setYcddData] = useState([])//
const [detailVisible, setDetailVisible] = useState(false); const [detailVisible, setDetailVisible] = useState(false);
const [timesVisible, setTimesVisible] = useState(false); //退 const [timesVisible, setTimesVisible] = useState(false); //退
const [tkddVisible, setTkddVisible] = useState(false); const [tkddVisible, setTkddVisible] = useState(false);
@ -196,7 +207,7 @@ function ReturnOrderInquiry() {
ajax({ ajax({
url: "/api/ope/record/refund_info", url: "/api/ope/record/refund_info",
type: "get", type: "get",
data: { id: e.refund_id },
data: { id: e.id },
}).then((res) => { }).then((res) => {
let { status, data } = res let { status, data } = res
if (status == 20000) { if (status == 20000) {
@ -348,10 +359,6 @@ function ReturnOrderInquiry() {
</>} </>}
</div> </div>
useEffect(() => {
search()
}, [])
return ( return (
<> <>
{renderTable( {renderTable(
@ -382,10 +389,12 @@ function ReturnOrderInquiry() {
title={'订单详情'} title={'订单详情'}
onCancel={() => { onCancel={() => {
setTkddVisible(false); setTkddVisible(false);
setYcddData([]);
}} }}
footer={[ footer={[
<Button key="back" onClick={() => { <Button key="back" onClick={() => {
setTkddVisible(false); setTkddVisible(false);
setYcddData([]);
}}> }}>
关闭窗口 关闭窗口
</Button>]} </Button>]}

Loading…
Cancel
Save