退款
This commit is contained in:
parent
2626762941
commit
f4f1f52e57
@ -1,5 +1,5 @@
|
|||||||
import './refun.css';
|
import './refun.css';
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect, } from 'react';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
// Pagination,
|
// Pagination,
|
||||||
@ -8,6 +8,7 @@ import {
|
|||||||
import { useSelector, useDispatch } from 'react-redux'
|
import { useSelector, useDispatch } from 'react-redux'
|
||||||
import { get, put, downloadUrl } from '../../util/AjaxUtils'
|
import { get, put, downloadUrl } from '../../util/AjaxUtils'
|
||||||
import type { TableProps } from 'antd';
|
import type { TableProps } from 'antd';
|
||||||
|
import {getMenuActive} from '../../util/cache'
|
||||||
interface DataType {
|
interface DataType {
|
||||||
projName: string;
|
projName: string;
|
||||||
projPayment: string;
|
projPayment: string;
|
||||||
@ -32,10 +33,12 @@ export default function Refun() {
|
|||||||
const [revokeModal, setRevokeModal] = useState(false) //撤销弹窗
|
const [revokeModal, setRevokeModal] = useState(false) //撤销弹窗
|
||||||
const [projRefundApplyId, setprojRefundApplyId] = useState('') //要撤销的id
|
const [projRefundApplyId, setprojRefundApplyId] = useState('') //要撤销的id
|
||||||
const { state } = useLocation()
|
const { state } = useLocation()
|
||||||
|
const type = state? state.type:getMenuActive()
|
||||||
|
// setMenuActive(type)
|
||||||
// {state.type}
|
// {state.type}
|
||||||
const columns: TableProps<DataType>['columns'] =
|
const columns: TableProps<DataType>['columns'] =
|
||||||
// 撤销状态
|
// 撤销状态
|
||||||
state.type == 'CANCELED' ? [
|
type == 'CANCELED' ? [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'index',
|
dataIndex: 'index',
|
||||||
@ -121,7 +124,7 @@ export default function Refun() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
: state.type == 'PENDING' ?
|
: type == 'PENDING' ?
|
||||||
// PENDING待审核状态
|
// PENDING待审核状态
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -335,7 +338,7 @@ export default function Refun() {
|
|||||||
params: {
|
params: {
|
||||||
page: page,
|
page: page,
|
||||||
rows: 10,
|
rows: 10,
|
||||||
applyStatus: state.type
|
applyStatus: type
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onBefore() {
|
onBefore() {
|
||||||
@ -379,7 +382,7 @@ export default function Refun() {
|
|||||||
params: {
|
params: {
|
||||||
page: page,
|
page: page,
|
||||||
rows: 10,
|
rows: 10,
|
||||||
applyStatus: state.type
|
applyStatus: type
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSuccess(data: any) {
|
onSuccess(data: any) {
|
||||||
@ -415,7 +418,9 @@ export default function Refun() {
|
|||||||
// getData(1)
|
// getData(1)
|
||||||
setPage(1)
|
setPage(1)
|
||||||
getData(1)
|
getData(1)
|
||||||
}, [state.type])
|
console.log(type);
|
||||||
|
|
||||||
|
}, [type])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
Reference in New Issue
Block a user