Commit 3b352d72 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 会员资金账户-待审核/支付提现

parent d41d6019
...@@ -21,13 +21,14 @@ const CheckDetail: React.FC<{}> = () => { ...@@ -21,13 +21,14 @@ const CheckDetail: React.FC<{}> = () => {
const refTrade = useRef<any>({}) const refTrade = useRef<any>({})
const [checkForm] = Form.useForm(); const [checkForm] = Form.useForm();
const [visibleModal, setVisibleModal] = useState<boolean>(false) const [visibleModal, setVisibleModal] = useState<boolean>(false)
const [dealRecord, setDealRecord] = useState<any>() const [checkStatus, setCheckStatus] = useState<number>(1)
const [checkStatus, setCheckStatus] = useState<number>(4)
const [disableCheck, setDisableCheck] = useState<boolean>(false) const [disableCheck, setDisableCheck] = useState<boolean>(false)
const [confirmLoading, setConfirmLoading] = useState<boolean>(false) const [confirmLoading, setConfirmLoading] = useState<boolean>(false)
const [ details, setDetails ] = useState<any>({ accountBalance: 0, lockBalance: 0}) const [details, setDetails] = useState<any>({ accountBalance: 0, lockBalance: 0})
const [bankDetail, setBankDetail] = useState<GetSettleAccountsCorporateAccountConfigResponse>() const [bankDetail, setBankDetail] = useState<GetSettleAccountsCorporateAccountConfigResponse>()
const [tempStatus, setTempStatus] = useState<number>(0)
useEffect(() => { useEffect(() => {
getAccountInfo() getAccountInfo()
}, []) }, [])
...@@ -100,11 +101,12 @@ const CheckDetail: React.FC<{}> = () => { ...@@ -100,11 +101,12 @@ const CheckDetail: React.FC<{}> = () => {
checkForm.validateFields().then(values => { checkForm.validateFields().then(values => {
setConfirmLoading(true) setConfirmLoading(true)
// @ts-ignore // @ts-ignore
PublicApi.postPayMemberAssetAccountCheck({ id: urlParams.id ,...values}).then(res => { PublicApi.postPayMemberAssetAccountCheck({ id: urlParams.tradeId ,...values}).then(res => {
if(res.code === 1000) { if(res.code === 1000) {
setDisableCheck(true) setDisableCheck(true)
console.log(res.data) getAccountInfo()
console.log(values, res.data, 'value') refTrade.current.reload()
setTempStatus(values.status)
}else{ }else{
setDisableCheck(false) setDisableCheck(false)
} }
...@@ -123,7 +125,7 @@ const CheckDetail: React.FC<{}> = () => { ...@@ -123,7 +125,7 @@ const CheckDetail: React.FC<{}> = () => {
title="审核提现" title="审核提现"
onBack={() => history.goBack()} onBack={() => history.goBack()}
backIcon={<ReutrnEle />} backIcon={<ReutrnEle />}
extra={[ extra={ urlParams.preview ? [] : [
<Button <Button
icon={<CheckSquareOutlined />} icon={<CheckSquareOutlined />}
key="1" key="1"
...@@ -137,7 +139,7 @@ const CheckDetail: React.FC<{}> = () => { ...@@ -137,7 +139,7 @@ const CheckDetail: React.FC<{}> = () => {
> >
<Space direction="vertical" style={{width:'100%'}}> <Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="外部流转"> <Card headStyle={{borderBottom:'none'}} title="外部流转">
<Steps progressDot current={1}> <Steps progressDot current={urlParams.status === 2 || tempStatus === 1 ? 2 : 1}>
<Step title="申请提现" description="采购商" /> <Step title="申请提现" description="采购商" />
<Step title="审核提现" description="平台" /> <Step title="审核提现" description="平台" />
<Step title="支付提现" description="平台" /> <Step title="支付提现" description="平台" />
...@@ -295,15 +297,15 @@ const CheckDetail: React.FC<{}> = () => { ...@@ -295,15 +297,15 @@ const CheckDetail: React.FC<{}> = () => {
message: '请选择审核状态' message: '请选择审核状态'
} }
]} ]}
initialValue={4} initialValue={1}
> >
<Radio.Group onChange={handleStatusChange}> <Radio.Group onChange={handleStatusChange}>
<Radio value={4}>审核通过</Radio> <Radio value={1}>审核通过</Radio>
<Radio value={3}>审核不通过</Radio> <Radio value={2}>审核不通过</Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
{ {
checkStatus===3 && <Form.Item checkStatus===2 && <Form.Item
name="remark" name="remark"
label={'审核不通过原因'} label={'审核不通过原因'}
rules={[ rules={[
......
...@@ -32,7 +32,9 @@ const CheckWithdraw: React.FC<{}> = () => { ...@@ -32,7 +32,9 @@ const CheckWithdraw: React.FC<{}> = () => {
key: 'memberAssetAccount', key: 'memberAssetAccount',
className: 'commonPickColor', className: 'commonPickColor',
render: (text, record) => <EyePreview render: (text, record) => <EyePreview
url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.memberAssetAccount.id}`} type="button"
handleClick={()=>clickUp({...record, preview: true})}
// url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.memberAssetAccount.id}`}
> >
{text} {text}
</EyePreview> </EyePreview>
...@@ -57,7 +59,9 @@ const CheckWithdraw: React.FC<{}> = () => { ...@@ -57,7 +59,9 @@ const CheckWithdraw: React.FC<{}> = () => {
title: '提现申请时间', title: '提现申请时间',
dataIndex: 'tradeTime', dataIndex: 'tradeTime',
key: 'tradeTime', key: 'tradeTime',
render: (t, r) => moment(t).format('YYYY-MM-DD HH:mm:ss') render: (t, r) => moment(t).format('YYYY-MM-DD HH:mm:ss'),
// sorter: (a, b) => b.tradeTime - a.tradeTime,
// defaultSortOrder: "ascend"
}, },
{ {
title: '状态', title: '状态',
...@@ -68,7 +72,7 @@ const CheckWithdraw: React.FC<{}> = () => { ...@@ -68,7 +72,7 @@ const CheckWithdraw: React.FC<{}> = () => {
{ {
title: '操作', title: '操作',
dataIndex: 'option', dataIndex: 'option',
render: (t, r) => (<Button type='link' onClick={()=>clickUp(r)}>审核</Button>) render: (t, r) => <>{r.status === 1 && <Button type='link' onClick={()=>clickUp(r)}>审核</Button>}</>
} }
] ]
...@@ -86,7 +90,10 @@ const CheckWithdraw: React.FC<{}> = () => { ...@@ -86,7 +90,10 @@ const CheckWithdraw: React.FC<{}> = () => {
let params = { let params = {
tradeCode: r.tradeCode, tradeCode: r.tradeCode,
id: r.memberAssetAccount.id, id: r.memberAssetAccount.id,
amount: r.tradeMoney tradeId: r.id,
amount: r.tradeMoney,
preview: r.preview,
status: r.status,
} }
history.push(`/memberCenter/payandSettle/amountAccountManage/checkWithdraw/detail?detailinfo=${btoa(JSON.stringify(params))}`) history.push(`/memberCenter/payandSettle/amountAccountManage/checkWithdraw/detail?detailinfo=${btoa(JSON.stringify(params))}`)
} }
......
...@@ -63,14 +63,14 @@ export const searchSchema: ISchema = { ...@@ -63,14 +63,14 @@ export const searchSchema: ISchema = {
label: '审核不通过', label: '审核不通过',
value: 3, value: 3,
}, },
{ // {
label: '提现成功', // label: '提现成功',
value: 4, // value: 4,
}, // },
{ // {
label: '提现失败', // label: '提现失败',
value: 5, // value: 5,
} // }
], ],
}, },
"[startTime,endTime]": { "[startTime,endTime]": {
......
import React, { useState } from 'react' import React, { useEffect, useState } from 'react'
import { Row, Col } from 'antd'; import { Row, Col } from 'antd';
import styled from 'styled-components' import styled from 'styled-components'
import { findItemAndDelete } from '@/utils' import { findItemAndDelete } from '@/utils'
...@@ -47,29 +47,31 @@ const RowStyleLayout = styled(props => <div {...props} />)` ...@@ -47,29 +47,31 @@ const RowStyleLayout = styled(props => <div {...props} />)`
interface IProps { interface IProps {
dataSource: any[], dataSource: any[],
cardChange: any,
name: string,
type?: string, type?: string,
editable?: boolean, editable?: boolean,
} }
const CardCheckBox = (props: IProps) => { const CardCheckBox = (props: IProps) => {
const { dataSource = [], type = 'checkbox', editable = true } = props const { dataSource = [], type = 'checkbox', editable = true, cardChange, name } = props
const [value, setValue] = useState<any>([]) const [value, setValue] = useState<any>([])
// const value: number[] = props.value || []
useEffect(() => {
let transport = {}
transport[name] = value[0]
cardChange(transport)
}, [value])
const handleChange = (id) => { const handleChange = (id) => {
console.log(id)
if (!editable) { if (!editable) {
return false return false
} }
if (value.includes(id)) { if (value.includes(id)) {
const newValue = findItemAndDelete(value, id) const newValue = findItemAndDelete(value, id)
setValue(newValue) setValue(newValue)
console.log(newValue)
// props.mutators.change(newValue)
} else { } else {
// type === 'radio' ? props.mutators.change([id]) : props.mutators.change([...value, id]) // type === 'radio' ? props.mutators.change([id]) : props.mutators.change([...value, id])
console.log([id])
type === 'radio' ? setValue([id]) : setValue([...value, id]) type === 'radio' ? setValue([id]) : setValue([...value, id])
} }
} }
......
...@@ -77,3 +77,8 @@ ...@@ -77,3 +77,8 @@
.repayinfo { .repayinfo {
background-color: #4279DF; background-color: #4279DF;
} }
// 支付详情错误提示
.errorTips {
color: red;
}
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react' import React, { useState, useEffect, useRef } from 'react'
import { history } from 'umi'
import { Card, Space, Button, } from 'antd' import { Card, Space, Button, } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god' import { StandardTable } from 'god'
...@@ -9,11 +10,10 @@ import { createFormActions, FormEffectHooks } from '@formily/antd' ...@@ -9,11 +10,10 @@ import { createFormActions, FormEffectHooks } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch' import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { searchSchema } from './schema' import { searchSchema } from './schema'
import { FORM_FILTER_PATH } from '@/formSchema/const' import { FORM_FILTER_PATH } from '@/formSchema/const'
import { PlusOutlined } from '@ant-design/icons'
import EyePreview from '@/components/EyePreview' import EyePreview from '@/components/EyePreview'
import { DatePicker } from '@formily/antd-components' import { DatePicker } from '@formily/antd-components'
import StatusTag from '@/components/StatusTag' import StatusTag from '@/components/StatusTag'
import { accountStatusMap, memberStatusMap } from '../../constant' import { statusMap } from '../../constant'
import moment from 'moment' import moment from 'moment'
const formActions = createFormActions(); const formActions = createFormActions();
...@@ -28,7 +28,9 @@ const PaymentWithdraw: React.FC<{}> = () => { ...@@ -28,7 +28,9 @@ const PaymentWithdraw: React.FC<{}> = () => {
key: 'memberAssetAccount', key: 'memberAssetAccount',
className: 'commonPickColor', className: 'commonPickColor',
render: (text, record) => <EyePreview render: (text, record) => <EyePreview
url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.id}`} type="button"
handleClick={()=>clickUp({...record, preview: true})}
// url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.id}`}
> >
{text} {text}
</EyePreview> </EyePreview>
...@@ -45,8 +47,8 @@ const PaymentWithdraw: React.FC<{}> = () => { ...@@ -45,8 +47,8 @@ const PaymentWithdraw: React.FC<{}> = () => {
}, },
{ {
title: '提现金额(元)', title: '提现金额(元)',
dataIndex: 'memberRoleName', dataIndex: 'tradeMoney',
key: 'memberRoleName', key: 'tradeMoney',
render: (t, r) => `¥${t.toFixed(2)}` render: (t, r) => `¥${t.toFixed(2)}`
}, },
{ {
...@@ -56,15 +58,15 @@ const PaymentWithdraw: React.FC<{}> = () => { ...@@ -56,15 +58,15 @@ const PaymentWithdraw: React.FC<{}> = () => {
render: (t, r) => moment(t).format('YYYY-MM-DD HH:mm:ss') render: (t, r) => moment(t).format('YYYY-MM-DD HH:mm:ss')
}, },
{ {
title: '会员状态', title: '状态',
dataIndex: 'memberStatus', dataIndex: 'status',
key: 'memberStatus', key: 'status',
render: (t, r) => (<StatusTag title={memberStatusMap[t]['title']} type={memberStatusMap[t]['type']} />) render: (t, r) => (<StatusTag title={statusMap[t]['title']} type={statusMap[t]['type']} />)
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'option', dataIndex: 'option',
render: (t, r) => (<Button type='link' onClick={()=>clickUp(r)}>支付</Button>) render: (t, r) => <>{r.status !== 4 && <Button type='link' onClick={()=>clickUp(r)}>支付</Button>}</>
} }
] ]
...@@ -79,7 +81,15 @@ const PaymentWithdraw: React.FC<{}> = () => { ...@@ -79,7 +81,15 @@ const PaymentWithdraw: React.FC<{}> = () => {
} }
const clickUp = (r: any) => { const clickUp = (r: any) => {
console.log('通过') let params = {
tradeCode: r.tradeCode,
id: r.memberAssetAccount.id,
payId: r.id,
amount: r.tradeMoney,
preview: r.preview,
status: r.status,
}
history.push(`/memberCenter/payandSettle/amountAccountManage/paymentWithdraw/detail?detailinfo=${btoa(JSON.stringify(params))}`)
} }
return ( return (
......
...@@ -8,22 +8,61 @@ import StatusTag from '@/components/StatusTag' ...@@ -8,22 +8,61 @@ import StatusTag from '@/components/StatusTag'
import cx from 'classnames' import cx from 'classnames'
import moment from 'moment' import moment from 'moment'
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import { statusMap } from '../../constant' import { memberStatusMap, operationMap, statusMap } from '../../constant'
import { CheckSquareOutlined } from '@ant-design/icons' import { CheckSquareOutlined } from '@ant-design/icons'
import CapitalCardCheckBox from './components/CardCheckbox' import CapitalCardCheckBox from './components/CardCheckbox'
import confirm_img from '@/assets/imgs/img_confirm.png' import confirm_img from '@/assets/imgs/img_confirm.png'
import { PublicApi } from '@/services/api'
import { GetSettleAccountsCorporateAccountConfigResponse } from '@/services/SettleApi'
import { StandardTable } from 'god'
import alipay from '@/assets/imgs/alipay_icon.png';
import wxpay from '@/assets/imgs/wechat_icon.png';
import { yellowBright } from 'chalk'
const { Step } = Steps; const { Step } = Steps;
const { TextArea } = Input; const { TextArea } = Input;
const PaymentDetail: React.FC<{}> = () => { const PaymentDetail: React.FC<{}> = () => {
const refTrade = useRef<any>({})
const [visibleModal, setVisibleModal] = useState<boolean>(false) const [visibleModal, setVisibleModal] = useState<boolean>(false)
const [loading, setLoading] = useState<boolean>(false) const [loading, setLoading] = useState<boolean>(false)
const [dealRecord, setDealRecord] = useState<any>()
const [checkStatus, setCheckStatus] = useState<number>(4) const [checkStatus, setCheckStatus] = useState<number>(4)
const [disableCheck, setDisableCheck] = useState<boolean>(false) const [disableCheck, setDisableCheck] = useState<boolean>(false)
const [currentStep, setCurrentStep] = useState<number>(0) const [currentStep, setCurrentStep] = useState<number>(0)
const [payResult, setPayResult] = useState<number>(2) const [payResult, setPayResult] = useState<number>(2)
const [payConfirmLoading, setPayConfirmLoading] = useState<boolean>(false)
const [details, setDetails] = useState<any>({ accountBalance: 0, lockBalance: 0})
const [bankDetail, setBankDetail] = useState<GetSettleAccountsCorporateAccountConfigResponse>()
const [payParam, setPayParam] = useState<any>()
const [errorTips, setErrorTips] = useState<any>({ tipMethod: false, tipChannel: false })
useEffect(() => {
getAccountInfo()
}, [])
const { detailinfo } = history.location.query
let urlParams: any = JSON.parse(atob(detailinfo))
const getAccountInfo = async () => {
let res = await PublicApi.getPayMemberAssetAccountGetMemberAssetAccount({id: urlParams.id})
const { code, data } = res
setDetails(data)
if(code === 1000) {
let bankRes = await PublicApi.getSettleAccountsCorporateAccountConfig({memberId: data.memberId + ''})
setBankDetail(bankRes.data)
}
}
// 获取提现处理记录
const fetchTradeData = (params) => {
return new Promise((resolve, reject) => {
PublicApi.getPayMemberAssetAccountGetCashOutRecordList({tradeCode: urlParams.tradeCode, ...params}).then(res => {
const { data } = res
resolve(data)
})
})
}
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
...@@ -41,16 +80,13 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -41,16 +80,13 @@ const PaymentDetail: React.FC<{}> = () => {
title: '交易金额(元)', title: '交易金额(元)',
dataIndex: 'tradeMoney', dataIndex: 'tradeMoney',
key: 'tradeMoney', key: 'tradeMoney',
render: (t, r) => `${operationMap[r.operation]['operator']} ${t.toFixed(2)}`
}, },
{ {
title: '交易项目', title: '交易项目',
dataIndex: 'operation', dataIndex: 'operation',
key: 'operation', key: 'operation',
}, render: (t, r) => operationMap[t]['title']
{
title: '交易金额(元)',
dataIndex: 'tradeMoney',
key: 'tradeMoney',
}, },
{ {
title: '状态', title: '状态',
...@@ -66,7 +102,29 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -66,7 +102,29 @@ const PaymentDetail: React.FC<{}> = () => {
]; ];
const handleOK = () => { const handleOK = () => {
console.log(payParam, '确认支付参数')
setPayConfirmLoading(true)
// 1-1 支付成功 1-2确认是否已转账 1-other支付失败
if(!payParam?.payType){
setErrorTips({...errorTips, tipMethod: true})
}else if(!payParam?.payChannel){
setErrorTips({...errorTips, tipChannel: true})
}else{
setErrorTips({tipMethod: false, tipChannel: false})
PublicApi.postPayMemberAssetAccountPayCashOut({ id: urlParams.payId, ...payParam },{ctlType: 'none'}).then(res => {
if(res.code === 1000){
setCurrentStep(1) setCurrentStep(1)
setPayResult(1)
getAccountInfo()
refTrade.current.reload()
setDisableCheck(true)
}else{
setCurrentStep(1)
setPayResult(3)
}
setPayConfirmLoading(false)
})
}
} }
const handleCancel = () => { const handleCancel = () => {
...@@ -75,12 +133,23 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -75,12 +133,23 @@ const PaymentDetail: React.FC<{}> = () => {
const handleConfirm = () => { const handleConfirm = () => {
console.log('确认') console.log('确认')
setVisibleModal(false)
} }
const handleBack = () => { const handleBack = () => {
setCurrentStep(0) setCurrentStep(0)
} }
const cardChange = (value) => {
console.log(value)
setPayParam(() => {
return {
...payParam,
...value,
}
})
}
const renderModalTitle = () => { const renderModalTitle = () => {
return ( return (
...@@ -111,7 +180,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -111,7 +180,7 @@ const PaymentDetail: React.FC<{}> = () => {
<Button key="back" onClick={handleCancel}> <Button key="back" onClick={handleCancel}>
取消 取消
</Button>, </Button>,
<Button key="submit" type="primary" loading={loading} onClick={handleOK}> <Button key="submit" type="primary" loading={payConfirmLoading} onClick={handleOK}>
下一步 下一步
</Button>, </Button>,
] ]
...@@ -151,7 +220,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -151,7 +220,7 @@ const PaymentDetail: React.FC<{}> = () => {
title="支付提现" title="支付提现"
onBack={() => history.goBack()} onBack={() => history.goBack()}
backIcon={<ReutrnEle />} backIcon={<ReutrnEle />}
extra={[ extra={ urlParams.preview ? [] : [
<Button <Button
icon={<CheckSquareOutlined />} icon={<CheckSquareOutlined />}
key="1" key="1"
...@@ -165,7 +234,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -165,7 +234,7 @@ const PaymentDetail: React.FC<{}> = () => {
> >
<Space direction="vertical" style={{width:'100%'}}> <Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="外部流转"> <Card headStyle={{borderBottom:'none'}} title="外部流转">
<Steps progressDot current={0}> <Steps progressDot current={urlParams.status === 4 || payResult === 1 ? 3 : 2}>
<Step title="申请提现" description="采购商" /> <Step title="申请提现" description="采购商" />
<Step title="审核提现" description="平台" /> <Step title="审核提现" description="平台" />
<Step title="支付提现" description="平台" /> <Step title="支付提现" description="平台" />
...@@ -184,16 +253,18 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -184,16 +253,18 @@ const PaymentDetail: React.FC<{}> = () => {
<div style={{display: 'flex',alignItems:'flex-end'}}> <div style={{display: 'flex',alignItems:'flex-end'}}>
<InputNumber <InputNumber
disabled={true} disabled={true}
defaultValue={0} defaultValue={urlParams.amount}
formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
parser={value => value.replace(/\$\s?|(,*)/g, '')} parser={value => value.replace(/\$\s?|(,*)/g, '')}
className={styles['statistic-input']} className={styles['statistic-input']}
precision={2}
min={0}
/> />
</div> </div>
</div> </div>
<div className={styles['repayment-end']}> <div className={styles['repayment-end']}>
<span className={styles['repayment-time']}> <span className={styles['repayment-time']}>
最多可以提现:¥10,000.00 最多可以提现:¥ {((details.accountBalance*100 - details.lockBalance*100)/100).toFixed(2)}
</span> </span>
</div> </div>
</div> </div>
...@@ -206,7 +277,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -206,7 +277,7 @@ const PaymentDetail: React.FC<{}> = () => {
<p className={styles.rightTitle}>账户归属:</p> <p className={styles.rightTitle}>账户归属:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p className={styles.rightInfo}>广州数商云网络科技有限公司</p> <p className={styles.rightInfo}>{bankDetail?.name}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
...@@ -214,7 +285,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -214,7 +285,7 @@ const PaymentDetail: React.FC<{}> = () => {
<p className={styles.rightTitle}>银行账号:</p> <p className={styles.rightTitle}>银行账号:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p className={styles.rightInfo}>6214 7812 3456 7891 1234</p> <p className={styles.rightInfo}>{bankDetail?.bankAccount}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
...@@ -222,7 +293,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -222,7 +293,7 @@ const PaymentDetail: React.FC<{}> = () => {
<p className={styles.rightTitle}>开户行:</p> <p className={styles.rightTitle}>开户行:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p className={styles.rightInfo}>中国建设银行广州市分行营业部</p> <p className={styles.rightInfo}>{bankDetail?.bankDeposit}</p>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -239,12 +310,12 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -239,12 +310,12 @@ const PaymentDetail: React.FC<{}> = () => {
<div className={styles.statistic}> <div className={styles.statistic}>
<div className={styles['statistic-title']}>可用余额(元):</div> <div className={styles['statistic-title']}>可用余额(元):</div>
<div className={styles['statistic-amount']}> <div className={styles['statistic-amount']}>
{`100000`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} {`${((details.accountBalance*100 - details.lockBalance*100)/100).toFixed(2)}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
</div> </div>
</div> </div>
<div className={styles['repayment-end']}> <div className={styles['repayment-end']}>
<span className={styles['repayment-time']}> <span className={styles['repayment-time']}>
温州市龙昌皮具有限公司 {details?.memberName}
</span> </span>
</div> </div>
</div> </div>
...@@ -257,7 +328,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -257,7 +328,7 @@ const PaymentDetail: React.FC<{}> = () => {
<p className={styles.rightTitle}>账户归属:</p> <p className={styles.rightTitle}>账户归属:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p className={styles.rightInfo}>广州数商云网络科技有限公司</p> <p className={styles.rightInfo}>{details?.parentMemberName}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
...@@ -265,7 +336,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -265,7 +336,7 @@ const PaymentDetail: React.FC<{}> = () => {
<p className={styles.rightTitle}>账户余额(元):</p> <p className={styles.rightTitle}>账户余额(元):</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p className={styles.rightInfo}>10,000</p> <p className={styles.rightInfo}>{details?.accountBalance?.toFixed(2)}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
...@@ -273,7 +344,7 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -273,7 +344,7 @@ const PaymentDetail: React.FC<{}> = () => {
<p className={styles.rightTitle}>锁定金额(元):</p> <p className={styles.rightTitle}>锁定金额(元):</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p className={styles.rightInfo}>0.00</p> <p className={styles.rightInfo}>{details?.lockBalance?.toFixed(2)}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
...@@ -281,7 +352,10 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -281,7 +352,10 @@ const PaymentDetail: React.FC<{}> = () => {
<p className={styles.rightTitle}>账户状态:</p> <p className={styles.rightTitle}>账户状态:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p className={styles.rightInfo}><StatusTag type="success" title="正常" /></p> {
details?.accountStatus &&
<StatusTag title={memberStatusMap[details.accountStatus]['title']} type={memberStatusMap[details.accountStatus]['type']} />
}
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -291,7 +365,11 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -291,7 +365,11 @@ const PaymentDetail: React.FC<{}> = () => {
</Space> </Space>
<Space direction="vertical" style={{width:'100%'}}> <Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="提现处理记录"> <Card headStyle={{borderBottom:'none'}} title="提现处理记录">
<Table dataSource={dealRecord} columns={columns} /> <StandardTable
columns={columns}
currentRef={refTrade}
fetchTableData={(params: any) => fetchTradeData(params)}
/>
</Card> </Card>
</Space> </Space>
<Modal <Modal
...@@ -306,25 +384,50 @@ const PaymentDetail: React.FC<{}> = () => { ...@@ -306,25 +384,50 @@ const PaymentDetail: React.FC<{}> = () => {
? ?
renderResult() renderResult()
: :
<>
<CapitalCardCheckBox <CapitalCardCheckBox
cardChange={(v)=>cardChange(v)}
name="payType"
dataSource={[ dataSource={[
{ {
title: '线上支付', title: '支付方式',
items: [ items: [
{id:1, name: '支付宝', logoUrl: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png'}, {id:1, name: '支付宝', logoUrl: alipay},
{id:2, name: '微信', logoUrl: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png'}, {id:2, name: '微信', logoUrl: wxpay},
{id:3, name: '银联', logoUrl: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png'}, {id:3, name: '银联', logoUrl: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png'},
] ]
}, },
// {
// title: '支付渠道',
// items: [
// {id: 4, name: '线下转账线上确认'},
// ]
// },
]}
type="radio"
/>
{
errorTips.tipMethod &&
<p className={styles.errorTips}>请选择支付方式</p>
}
<CapitalCardCheckBox
cardChange={(v)=>cardChange(v)}
name="payChannel"
dataSource={[
{ {
title: '线下支付', title: '支付渠道',
items: [ items: [
{id:4, name: '线下转账线上确认'}, {id: 1, name: '线下转账线上确认'},
] ]
}, },
]} ]}
type="radio" type="radio"
/> />
{
errorTips.tipChannel &&
<p className={styles.errorTips}>请选择支付渠道</p>
}
</>
} }
</Modal> </Modal>
</PageHeaderWrapper> </PageHeaderWrapper>
......
...@@ -47,15 +47,15 @@ export const searchSchema: ISchema = { ...@@ -47,15 +47,15 @@ export const searchSchema: ISchema = {
enum: [ enum: [
{ {
label: '审核通过', label: '审核通过',
value: 1, value: 2,
}, },
{ {
label: '提现成功', label: '提现成功',
value: 2, value: 4,
}, },
{ {
label: '提现失败', label: '提现失败',
value: 3, value: 5,
} }
], ],
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment