Commit 710e1624 authored by 卢均锐's avatar 卢均锐

feat: 支付能力-国际化

parent 9dd97460
This diff is collapsed.
import React, { useRef } from 'react'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { Card, Space, Button, Modal, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
......@@ -22,41 +22,42 @@ const { confirm } = Modal
const formActions = createFormActions();
const CheckWithdraw: React.FC<{}> = () => {
const intl = useIntl();
const ref = useRef<any>({})
const [withdrawRowSelection, withdrawRowCtl] = useRowSelectionTable()
const columns: ColumnType<any>[] = [
{
title: '会员名称',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.memberName'}),
dataIndex: ['memberAssetAccount', 'memberName'],
key: 'memberAssetAccount',
className: 'commonPickColor',
render: (text, record) => <EyePreview
type="button"
handleClick={()=>clickUp({...record, preview: true})}
// url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.memberAssetAccount.id}`}
handleClick={() => clickUp({ ...record, preview: true })}
// url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.memberAssetAccount.id}`}
>
{text}
</EyePreview>
},
{
title: '提现银行账户名称',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.bankAccountName'}),
dataIndex: 'bankAccountName',
key: 'bankAccountName',
},
{
title: '银行账号',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.bankAccount'}),
dataIndex: 'bankAccount',
key: 'bankAccount',
},
{
title: '提现金额(元)',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.tradeMoney'}),
dataIndex: 'tradeMoney',
key: 'tradeMoney',
render: (t, r) => t.toFixed(2)
},
{
title: '提现申请时间',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.tradeTime'}),
dataIndex: 'tradeTime',
key: 'tradeTime',
render: (t, r) => moment(t).format('YYYY-MM-DD HH:mm:ss'),
......@@ -64,15 +65,15 @@ const CheckWithdraw: React.FC<{}> = () => {
// defaultSortOrder: "ascend"
},
{
title: '状态',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.status'}),
dataIndex: 'status',
key: 'status',
render: (t, r) => (<StatusTag title={statusMap[t]['title']} type={statusMap[t]['type']} />)
},
{
title: '操作',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.option'}),
dataIndex: 'option',
render: (t, r) => <>{r.status === 1 && <Button type='link' onClick={()=>clickUp(r)}>审核</Button>}</>
render: (t, r) => <>{r.status === 1 && <Button type='link' onClick={() => clickUp(r)}>{intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.columns.option.1'})}</Button>}</>
}
]
......@@ -99,9 +100,9 @@ const CheckWithdraw: React.FC<{}> = () => {
}
const handleBatchCheck = () => {
if(withdrawRowCtl.selectedRowKeys.length > 0){
if (withdrawRowCtl.selectedRowKeys.length > 0) {
confirm({
title: '确定要执行批量审核操作?',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.handleBatchCheck.title'}),
icon: <ExclamationCircleOutlined />,
onOk() {
postPayMemberAssetAccountBatchCheck({ idList: withdrawRowCtl.selectedRowKeys }).then(res => {
......@@ -112,23 +113,23 @@ const CheckWithdraw: React.FC<{}> = () => {
onCancel() {
console.log('Cancel');
},
okText: '确定',
cancelText: '取消'
okText: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.handleBatchCheck.okText'}),
cancelText: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.handleBatchCheck.cancelText'})
})
}else{
message.error('请先选择对应项目进行操作!')
} else {
message.error(intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.handleBatchCheck.error'}))
}
}
const controllerBtns = (
<Space>
<Button onClick={handleBatchCheck}>
批量审核通过
{intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.controllerBtns'})}
</Button>
</Space>
);
const processWithdrawRowSelection = {
const processWithdrawRowSelection = {
getCheckboxProps: record => ({
disabled: record.status !== 1,
name: record.name,
......
import { getIntl } from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const intl = getIntl();
export const searchSchema: ISchema = {
type: 'object',
properties: {
......@@ -26,7 +29,7 @@ export const searchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '会员名称',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.memberName'}),
},
},
},
......@@ -47,20 +50,20 @@ export const searchSchema: ISchema = {
status: {
type: 'string',
'x-component-props': {
placeholder: '状态',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.status'}),
style: { width: '174px' },
},
enum: [
{
label: '申请提现',
label: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.status.1'}),
value: 1,
},
{
label: '审核通过',
label: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.status.2'}),
value: 2,
},
{
label: '审核不通过',
label: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.status.3'}),
value: 3,
},
// {
......@@ -77,7 +80,7 @@ export const searchSchema: ISchema = {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.startTime'}), intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.endTime'})],
},
},
submit: {
......@@ -86,7 +89,7 @@ export const searchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({id: 'payandSettle.amountAccountManage.checkWithdraw.schema.searchSchema.submit'}),
},
},
},
......@@ -94,4 +97,4 @@ export const searchSchema: ISchema = {
},
},
},
};
\ No newline at end of file
};
import React, { useState, useRef } from 'react'
import {useIntl} from 'umi';
import { Card, Button, Input, Modal, Form } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
......@@ -22,13 +23,14 @@ const { TextArea } = Input;
const AccountLists: React.FC<{}> = () => {
const ref = useRef<any>({})
const intl = useIntl();
const [checkForm] = Form.useForm()
const [currentRecord, setCurrentRecord] = useState<GetPayMemberAssetAccountGetMemberAssetAccountListResponseDetail>()
const [visibleModal, setVisibleModal] = useState<boolean>(false)
const columns: ColumnType<any>[] = [
{
title: '会员名称',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.memberName'}),
dataIndex: 'memberName',
key: 'memberName',
className: 'commonPickColor',
......@@ -41,13 +43,13 @@ const AccountLists: React.FC<{}> = () => {
</>
},
{
title: '会员类型',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.memberType'}),
dataIndex: 'memberType',
key: 'memberType',
render: (t, r) => accountMemberType[t]
},
{
title: '会员角色',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.memberRoleName'}),
dataIndex: 'memberRoleName',
key: 'memberRoleName',
},
......@@ -58,40 +60,40 @@ const AccountLists: React.FC<{}> = () => {
// render: (t, r) => <LevelBrand level={r.level} />
// },
{
title: '账户余额',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.accountBalance'}),
dataIndex: 'accountBalance',
key: 'accountBalance',
render: text => `${text.toFixed(2)}`
render: text => `${intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.currency'})}${text.toFixed(2)}`
},
{
title: '锁定余额',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.lockBalance'}),
dataIndex: 'lockBalance',
key: 'lockBalance',
render: text => `${text.toFixed(2)}`
render: text => `${intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.currency'})}${text.toFixed(2)}`
},
{
title: '可用余额',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.usableBalance'}),
dataIndex: 'usableBalance',
key: 'usableBalance',
render: (t, r) => `${((r.accountBalance*100 - r.lockBalance*100)/100).toFixed(2)}`
render: (t, r) => `${intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.currency'})}${((r.accountBalance*100 - r.lockBalance*100)/100).toFixed(2)}`
},
{
title: '会员状态',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.memberStatus'}),
dataIndex: 'memberStatus',
key: 'memberStatus',
render: (t, r) => (<StatusTag title={memberStatusMap[t]['title']} type={memberStatusMap[t]['type']} />)
},
{
title: '账户状态',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.accountStatus'}),
dataIndex: 'accountStatus',
key: 'accountStatus',
render: (t, r) => (<><span className={accountStatusMap[t]['className']}></span>{accountStatusMap[t]['title']}</>)
},
{
title: '操作',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.option'}),
dataIndex: 'option',
render: (t: any, r: any) => (
<Button type='link' onClick={() => handleRow(r)}>{r.accountStatus===1?'冻结':'解除'}</Button>
<Button type='link' onClick={() => handleRow(r)}>{r.accountStatus===1?intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.option.1'}):intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.columns.option.2'})}</Button>
)
}
]
......@@ -178,7 +180,7 @@ const AccountLists: React.FC<{}> = () => {
/>
</Card>
<Modal
title={currentRecord?.accountStatus === 1 ? '会员冻结' : '会员解冻'}
title={currentRecord?.accountStatus === 1 ? intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.modal.title.1'}) : intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.modal.title.2'})}
visible={visibleModal}
onOk={handleOK}
onCancel={handleCancel}
......@@ -190,18 +192,18 @@ const AccountLists: React.FC<{}> = () => {
>
<Form.Item
name="remark"
label={currentRecord?.accountStatus === 1 ? '会员冻结原因' : '会员解冻原因'}
label={currentRecord?.accountStatus === 1 ? intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.modal.remark.1'}) : intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.modal.remark.2'})}
rules={[
{
required: true,
message: '请填写原因'
message: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.modal.remark.message'})
},
{
validator: (r, v, c) => validatorByte(r, v, c, 120)
}
]}
>
<TextArea rows={6} placeholder="请填写原因" />
<TextArea rows={6} placeholder={intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.modal.remark.placeholder'})} />
</Form.Item>
</Form>
</Modal>
......
import {getIntl} from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const intl = getIntl();
export const searchSchema: ISchema = {
type: 'object',
properties: {
......@@ -19,7 +22,7 @@ export const searchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '会员名称',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.memberName'}),
align: 'flex-left',
},
},
......@@ -42,7 +45,7 @@ export const searchSchema: ISchema = {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员类型',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.memberType'}),
style: {
width: 174
}
......@@ -52,7 +55,7 @@ export const searchSchema: ISchema = {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员角色',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.memberRoleId'}),
style: {
width: 174
}
......@@ -62,7 +65,7 @@ export const searchSchema: ISchema = {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员等级',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.memberLevel'}),
style: {
width: 174
}
......@@ -72,16 +75,16 @@ export const searchSchema: ISchema = {
memberStatus: {
type: 'string',
'x-component-props': {
placeholder: '会员状态',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.memberStatus'}),
style: { width: '174px' },
},
enum: [
{
label: '正常',
label: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.memberStatus.1'}),
value: 1,
},
{
label: '已冻结',
label: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.memberStatus.2'}),
value: 2,
}
],
......@@ -89,16 +92,16 @@ export const searchSchema: ISchema = {
accountStatus: {
type: 'string',
'x-component-props': {
placeholder: '账户状态',
placeholder: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.accountStatus'}),
style: { width: '174px' },
},
enum: [
{
label: '正常',
label: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.accountStatus.1'}),
value: 1,
},
{
label: '已冻结',
label: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.accountStatus.2'}),
value: 2,
}
],
......@@ -109,7 +112,7 @@ export const searchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.searchSchema.submit'}),
},
},
},
......@@ -133,14 +136,14 @@ export const rechargeSchema: ISchema = {
properties: {
money: {
type: "string",
title: '充值金额',
title: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.rechargeSchema.money'}),
'x-component-props': {
addonBefore: "¥"
addonBefore: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.rechargeSchema.money.addonBefore'})
},
"x-rules": [
{
required: true,
message: '请输入充值金额'
message: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.rechargeSchema.money.message'})
},
]
},
......@@ -152,11 +155,11 @@ export const rechargeSchema: ISchema = {
dataSource: [],
type: 'radio' // CardCheckBox 单选模式
},
"title": "充值方式",
"title": intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.rechargeSchema.type'}),
"x-rules": [
{
required: true,
message: '请选择充值方式'
message: intl.formatMessage({id: 'payandSettle.amountAccountManage.memberAccountManage.schema.rechargeSchema.type.message'})
}
],
}
......
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, } from 'antd'
import { history, useIntl } from 'umi'
import { Card, Button, } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
......@@ -19,54 +19,55 @@ import { getPayMemberAssetAccountGetPayCashOutList } from '@/services/PayV2Api'
const formActions = createFormActions();
const PaymentWithdraw: React.FC<{}> = () => {
const intl = useIntl();
const ref = useRef<any>({})
const columns: ColumnType<any>[] = [
{
title: '会员名称',
title: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.memberName' }),
dataIndex: ['memberAssetAccount', 'memberName'],
key: 'memberAssetAccount',
className: 'commonPickColor',
render: (text, record) => <EyePreview
type="button"
handleClick={()=>clickUp({...record, preview: true})}
// url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.id}`}
handleClick={() => clickUp({ ...record, preview: true })}
// url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.id}`}
>
{text}
</EyePreview>
},
{
title: '提现银行账户名称',
title: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.bankAccountName' }),
dataIndex: 'bankAccountName',
key: 'bankAccountName',
},
{
title: '银行账号',
title: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.bankAccount' }),
dataIndex: 'bankAccount',
key: 'bankAccount',
},
{
title: '提现金额(元)',
title: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.tradeMoney' }),
dataIndex: 'tradeMoney',
key: 'tradeMoney',
render: (t, r) => `${t.toFixed(2)}`
render: (t, r) => `${intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.currency' })}${t.toFixed(2)}`
},
{
title: '提现申请时间',
title: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.tradeTime' }),
dataIndex: 'tradeTime',
key: 'tradeTime',
render: (t, r) => moment(t).format('YYYY-MM-DD HH:mm:ss')
},
{
title: '状态',
title: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.status' }),
dataIndex: 'status',
key: 'status',
render: (t, r) => (<StatusTag title={statusMap[t]['title']} type={statusMap[t]['type']} />)
},
{
title: '操作',
title: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.option' }),
dataIndex: 'option',
render: (t, r) => <>{r.status !== 4 && <Button type='link' onClick={()=>clickUp(r)}>支付</Button>}</>
render: (t, r) => <>{r.status !== 4 && <Button type='link' onClick={() => clickUp(r)}>{intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.columns.option.1' })}</Button>}</>
}
]
......
import { getIntl } from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const intl = getIntl();
export const searchSchema: ISchema = {
type: 'object',
properties: {
......@@ -19,7 +22,7 @@ export const searchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '会员名称',
placeholder: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.memberName' }),
align: 'flex-left',
},
},
......@@ -41,20 +44,20 @@ export const searchSchema: ISchema = {
status: {
type: 'string',
'x-component-props': {
placeholder: '状态',
placeholder: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.status' }),
style: { width: '174px' },
},
enum: [
{
label: '审核通过',
label: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.status.1' }),
value: 2,
},
{
label: '提现成功',
label: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.status.2' }),
value: 4,
},
{
label: '提现失败',
label: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.status.3' }),
value: 5,
}
],
......@@ -63,7 +66,7 @@ export const searchSchema: ISchema = {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.startTime' }), intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.endTime' })],
},
},
submit: {
......@@ -72,7 +75,7 @@ export const searchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({ id: 'payandSettle.amountAccountManage.paymentWithdraw.schema.searchSchema.submit' }),
},
},
},
......@@ -80,4 +83,4 @@ export const searchSchema: ISchema = {
},
},
},
};
\ No newline at end of file
};
import React, { useRef } from 'react'
import {useIntl} from 'umi';
import { Card } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
......@@ -17,11 +18,12 @@ import { getPayAssetAccountGetAssetAccountList } from '@/services/PayV2Api'
const formActions = createFormActions();
const AccountLists: React.FC<{}> = () => {
const intl = useIntl();
const ref = useRef<any>({})
const columns: ColumnType<any>[] = [
{
title: '账户归属',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.parentMemberName'}),
dataIndex: 'parentMemberName',
key: 'parentMemberName',
className: 'commonPickColor',
......@@ -32,13 +34,13 @@ const AccountLists: React.FC<{}> = () => {
</EyePreview>
},
{
title: '会员类型',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.memberType'}),
dataIndex: 'memberType',
key: 'memberType',
render: (t, r) => accountMemberType[t]
},
{
title: '会员角色',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.memberRoleName'}),
dataIndex: 'memberRoleName',
key: 'memberRoleName',
},
......@@ -49,40 +51,40 @@ const AccountLists: React.FC<{}> = () => {
// render: (t, r) => <LevelBrand level={r.memberLevel} />
// },
{
title: '会员等级类型',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.memberLevelType'}),
dataIndex: 'memberLevelType',
key: 'memberLevelType',
render: (t, r) => memberLevelTypeMap[t]
},
{
title: '会员状态',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.memberStatus'}),
dataIndex: 'memberStatus',
key: 'memberStatus',
render: (t, r) => (<StatusTag title={memberStatusMap[t]['title']} type={memberStatusMap[t]['type']} />)
},
{
title: '账户状态',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.accountStatus'}),
dataIndex: 'accountStatus',
key: 'accountStatus',
render: (t, r) => (<><span className={accountStatusMap[t]['className']}></span>{accountStatusMap[t]['title']}</>)
},
{
title: '账户余额',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.accountBalance'}),
dataIndex: 'accountBalance',
key: 'accountBalance',
render: text => `${text.toFixed(2)}`
render: text => `${intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.currency'})}${text.toFixed(2)}`
},
{
title: '锁定余额',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.lockBalance'}),
dataIndex: 'lockBalance',
key: 'lockBalance',
render: text => `${text.toFixed(2)}`
render: text => `${intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.currency'})}${text.toFixed(2)}`
},
{
title: '可用余额',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.usableBalance'}),
dataIndex: 'usableBalance',
key: 'usableBalance',
render: (t, r) => `${((r.accountBalance*100 - r.lockBalance*100)/100).toFixed(2)}`
render: (t, r) => `${intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.columns.currency'})}${((r.accountBalance*100 - r.lockBalance*100)/100).toFixed(2)}`
},
]
......
import {getIntl} from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import alipay from '@/assets/imgs/alipay_icon.png';
import wxpay from '@/assets/imgs/wechat_icon.png';
const intl = getIntl();
export const searchSchema: ISchema = {
type: 'object',
properties: {
......@@ -21,7 +24,7 @@ export const searchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '账户归属',
placeholder: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.parentMemberName'}),
align: 'flex-left',
},
},
......@@ -43,16 +46,16 @@ export const searchSchema: ISchema = {
memberStatus: {
type: 'string',
'x-component-props': {
placeholder: '会员状态',
placeholder: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.memberStatus'}),
style: { width: '174px' },
},
enum: [
{
label: '正常',
label: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.memberStatus.1'}),
value: 1,
},
{
label: '已冻结',
label: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.memberStatus.2'}),
value: 2,
}
],
......@@ -60,16 +63,16 @@ export const searchSchema: ISchema = {
accountStatus: {
type: 'string',
'x-component-props': {
placeholder: '账户状态',
placeholder: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.accountStatus'}),
style: { width: '174px' },
},
enum: [
{
label: '正常',
label: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.accountStatus.1'}),
value: 1,
},
{
label: '已冻结',
label: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.accountStatus.2'}),
value: 2,
}
],
......@@ -78,7 +81,7 @@ export const searchSchema: ISchema = {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.startTime'}),intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.endTime'})],
},
},
submit: {
......@@ -87,7 +90,7 @@ export const searchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.searchSchema.submit'}),
},
},
},
......@@ -111,25 +114,25 @@ export const rechargeSchema: ISchema = {
properties: {
money: {
type: "string",
title: '充值金额',
title: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.money'}),
'x-component-props': {
addonBefore: "¥",
addonBefore: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.money.addonBefore'}),
// suffix: "RMB"
},
"x-rules": [
{
required: true,
message: '请输入充值金额'
message: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.money.message.1'})
},
{
validator: value => {
return isNaN(value)
},
message:'请正确输入数字金额'
message:intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.money.message.2'})
},
{
pattern: /^\d+(\.\d{1,2})?$/,
message: '充值金额仅限两位小数',
message: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.money.message.3'}),
},
]
},
......@@ -140,19 +143,19 @@ export const rechargeSchema: ISchema = {
"x-component-props": {
dataSource: [
// {id: 1, name: '支付宝', logoUrl: alipay},
{id: 2, name: '微信', logoUrl: wxpay}
{id: 2, name: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.type.dataSource.2'}), logoUrl: wxpay}
],
type: 'radio' // CardCheckBox 单选模式
},
"title": "充值方式",
"title": intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.type'}),
"x-rules": [
{
required: true,
message: '请选择充值方式'
message: intl.formatMessage({id: 'payandSettle.capitalAccounts.accountLists.schema.rechargeSchema.type.message'})
}
],
}
}
}
}
}
\ No newline at end of file
}
import { getIntl } from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import alipay from '@/assets/imgs/alipay_icon.png';
import wxpay from '@/assets/imgs/wechat_icon.png';
const intl = getIntl();
export const searchSchema: ISchema = {
type: 'object',
properties: {
......@@ -21,7 +24,7 @@ export const searchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '账户归属',
placeholder: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.parentMemberName' }),
align: 'flex-left',
},
},
......@@ -43,16 +46,16 @@ export const searchSchema: ISchema = {
memberStatus: {
type: 'string',
'x-component-props': {
placeholder: '会员状态',
placeholder: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.memberStatus' }),
style: { width: '174px' },
},
enum: [
{
label: '正常',
label: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.memberStatus.1' }),
value: 1,
},
{
label: '已冻结',
label: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.memberStatus.2' }),
value: 2,
}
],
......@@ -60,16 +63,16 @@ export const searchSchema: ISchema = {
accountStatus: {
type: 'string',
'x-component-props': {
placeholder: '账户状态',
placeholder: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.accountStatus' }),
style: { width: '174px' },
},
enum: [
{
label: '正常',
label: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.accountStatus.1' }),
value: 1,
},
{
label: '已冻结',
label: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.accountStatus.2' }),
value: 2,
}
],
......@@ -78,7 +81,7 @@ export const searchSchema: ISchema = {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.startTime' }), intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.endTime' })],
},
},
submit: {
......@@ -87,7 +90,7 @@ export const searchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.searchSchema.submit' }),
},
},
},
......@@ -111,25 +114,25 @@ export const rechargeSchema: ISchema = {
properties: {
money: {
type: "string",
title: '充值金额',
title: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.money' }),
'x-component-props': {
addonBefore: "¥",
addonBefore: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.money.addonBefore' }),
// suffix: "RMB"
},
"x-rules": [
{
required: true,
message: '请输入充值金额'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.money.message.1' })
},
{
validator: value => {
return isNaN(value)
},
message:'请正确输入数字金额'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.money.message.2' })
},
{
pattern: /^\d+(\.\d{1,2})?$/,
message: '充值金额仅限两位小数',
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.money.message.3' }),
},
]
},
......@@ -140,19 +143,19 @@ export const rechargeSchema: ISchema = {
"x-component-props": {
dataSource: [
// {id: 1, name: '支付宝', logoUrl: alipay},
{id: 2, name: '微信', logoUrl: wxpay}
{ id: 2, name: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.type.dataSource.2' }), logoUrl: wxpay }
],
type: 'radio' // CardCheckBox 单选模式
},
"title": "充值方式",
"title": intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.type' }),
"x-rules": [
{
required: true,
message: '请选择充值方式'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.type。message' })
}
],
}
}
}
}
}
\ No newline at end of file
}
import React, { Component } from 'react'
import {Card,Row,Col,Space,Button} from 'antd'
import style from './initBase.less'
const initBase :React.FC<{}> = (props:any) => {
import { useIntl } from 'umi';
import { Card, Row, Col, Space, Button } from 'antd'
import style from './initBase.less'
const initBase: React.FC<{}> = (props: any) => {
const intl = useIntl();
const initImg = require('../../../../public/static/imgs/icon_initpayBase@2x.png')
return (
<Card>
......@@ -9,13 +11,13 @@ const initBase :React.FC<{}> = (props:any) => {
<Col pull={6} push={6}>
<Row>
<Col span={12}>
<img className={style['init-img']} src={initImg}/>
<img className={style['init-img']} src={initImg} />
</Col>
<Col span={12} className={style['right']}>
<Space direction="vertical">
<div className={style['title']}>抱歉</div>
<div>平台还未配置您的支付方式,请联系平台客服</div>
<Button className={style['btn']} type="primary" size='small'>联系客服</Button>
<div className={style['title']}>{intl.formatMessage({ id: 'payandSettle.components.initBase.title' })}</div>
<div>{intl.formatMessage({ id: 'payandSettle.components.initBase.text' })}</div>
<Button className={style['btn']} type="primary" size='small'>{intl.formatMessage({ id: 'payandSettle.components.initBase.button' })}</Button>
</Space>
</Col>
</Row>
......@@ -24,4 +26,4 @@ const initBase :React.FC<{}> = (props:any) => {
</Card>
)
}
export default initBase
\ No newline at end of file
export default initBase
......@@ -10,7 +10,7 @@ import {
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { isNumber } from 'lodash';
import { GetPayCreditApplyGetApplyDetailResponse, postPayCreditApplyAddCreditApply } from '@/services/PayV2Api';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants/payment';
......@@ -53,6 +53,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isEdit = false,
target,
}) => {
const intl = useIntl();
const [quotaInfo, setQuotaInfo] = useState<GetPayCreditApplyGetApplyDetailResponse>(null);
const [quotaValues, setQuotaValues] = useState<QuotaValues>({
applyQuota: null,
......@@ -132,8 +133,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: `申请单号:${quotaInfo && quotaInfo.member ? quotaInfo.member.applyNo : ''}`,
aloneTxt: intl.formatMessage({ id: 'payandSettle.creditApplication.components.detailInfo.avatarWrap.aloneTxt' }),
name: `${intl.formatMessage({ id: 'payandSettle.creditApplication.components.detailInfo.avatarWrap.name' })}${quotaInfo && quotaInfo.member ? quotaInfo.member.applyNo : ''}`,
}}
extra={quotaInfo && quotaInfo.member ? quotaInfo.member.levelTag || '' : ''}
/>
......@@ -146,7 +147,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onClick={handleSubmit}
loading={submitLoading}
>
提交
{intl.formatMessage({ id: 'payandSettle.creditApplication.components.detailInfo.extra' })}
</Button>
)}
</>
......@@ -159,19 +160,19 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
padding: '0 32px',
}}
>
<Descriptions.Item label="会员归属">{quotaInfo?.member?.parentMemberName}</Descriptions.Item>
<Descriptions.Item label="会员类型">{quotaInfo?.member?.memberTypeName}</Descriptions.Item>
<Descriptions.Item label="会员角色名称">{quotaInfo?.member?.roleName}</Descriptions.Item>
<Descriptions.Item label="会员状态">
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.components.detailInfo.descriptions.1'})}>{quotaInfo?.member?.parentMemberName}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.components.detailInfo.descriptions.2'})}>{quotaInfo?.member?.memberTypeName}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.components.detailInfo.descriptions.3'})}>{quotaInfo?.member?.roleName}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.components.detailInfo.descriptions.4'})}>
<StatusTag
type={CREDIT_STATUS_TAG_MAP[quotaInfo && quotaInfo.member ? quotaInfo.member.status : 'default']}
title={quotaInfo && quotaInfo.member ? CREDIT_STATUS[quotaInfo.member.status] : ''}
/>
</Descriptions.Item>
<Descriptions.Item label="外部状态">
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.components.detailInfo.descriptions.5'})}>
<StatusTag type={CREDIT_OUTER_STATUS_TAG_MAP[quotaInfo?.member.outerStatus]} title={CREDIT_OUTER_STATUS[quotaInfo?.member.outerStatus]} />
</Descriptions.Item>
<Descriptions.Item label="内部状态">
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.components.detailInfo.descriptions.6'})}>
<Badge color={CREDIT_INNER_STATUS_BADGE_MAP_PURCHASER[quotaInfo?.member.innerStatus] || '#606266'} text={quotaInfo?.member.innerStatusName} />
</Descriptions.Item>
</Descriptions>
......@@ -205,15 +206,15 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
}}
verify={
quotaInfo &&
quotaInfo.verify &&
isNumber(quotaInfo.verify.quota) ? {
quotaInfo.verify &&
isNumber(quotaInfo.verify.quota) ? {
quota: quotaInfo?.verify?.quota,
billDay: quotaInfo?.verify?.billDay,
repayPeriod: quotaInfo?.verify?.repayPeriod,
verifyTime: quotaInfo?.verify?.verifyTime,
maxApplyQuota: quotaInfo?.verify?.maxApplyQuota,
} :
null
null
}
editable={isEdit}
onSubmit={handleQuotaSubmit}
......
import React from 'react';
import {useIntl} from 'umi';
import MellowCard from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
......@@ -6,7 +7,7 @@ import EyePreview from '@/components/EyePreview';
interface HistoryListHistoryListProps {
dataSource: {
applyNo: string,
applyNo: string,
originalQuota: number;
applyQuota: number;
auditQuota: number;
......@@ -17,14 +18,14 @@ interface HistoryListHistoryListProps {
};
const HistoryList: React.FC<HistoryListHistoryListProps> = ({
dataSource = [],
target,
dataSource = [],
target,
}) => {
const intl = useIntl();
const columns: EditableColumns[] = [
{
title: '申请单号',
dataIndex: 'applyNo',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.historyList.columns.applyNo'}),
dataIndex: 'applyNo',
render: (text, record) => (
<EyePreview
url={`${target ? target : '/memberCenter/payandSettle/creditApplication/quotaPrSubmit/detail'}?id=${record.id}&creditId=${record.creditId}`}
......@@ -34,22 +35,22 @@ const HistoryList: React.FC<HistoryListHistoryListProps> = ({
),
},
{
title: '调整前额度(元)',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.historyList.columns.originalQuota'}),
dataIndex: 'originalQuota',
align: 'center',
},
{
title: '申请调整额度(元)',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.historyList.columns.applyQuota'}),
dataIndex: 'applyQuota',
align: 'center',
},
{
title: '审批额度(元)',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.historyList.columns.auditQuota'}),
dataIndex: 'auditQuota',
align: 'center',
},
{
title: '申请时间',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.historyList.columns.applyTime'}),
dataIndex: 'applyTime',
align: 'center',
},
......@@ -57,9 +58,9 @@ const HistoryList: React.FC<HistoryListHistoryListProps> = ({
return (
<MellowCard
title="历史授信申请"
title={intl.formatMessage({id: 'payandSettle.creditApplication.components.historyList.title'})}
style={{
marginBottom: 24,
marginBottom: 24,
}}
>
<PolymericTable
......@@ -73,4 +74,4 @@ const HistoryList: React.FC<HistoryListHistoryListProps> = ({
);
};
export default HistoryList;
\ No newline at end of file
export default HistoryList;
......@@ -6,22 +6,24 @@
* @Description: 外部流转组件
*/
import React from 'react';
import {useIntl} from 'umi';
import { Steps, Empty } from 'antd';
import MellowCard from '@/components/MellowCard';
import styles from './index.less';
interface OuterCirculation {
steps: {
title: string,
description: string,
title: string,
description: string,
}[];
current: number;
};
const OuterCirculation: React.FC<OuterCirculation> = ({
steps = [],
current,
steps = [],
current,
}) => {
const intl = useIntl();
if (!Array.isArray(steps)) {
return null;
......@@ -29,9 +31,9 @@ const OuterCirculation: React.FC<OuterCirculation> = ({
return (
<MellowCard
title="外部流转"
title={intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculation'})}
style={{
marginBottom: 24,
marginBottom: 24,
}}
>
{(steps && steps.length > 0) ? (
......@@ -47,4 +49,4 @@ const OuterCirculation: React.FC<OuterCirculation> = ({
);
};
export default OuterCirculation;
\ No newline at end of file
export default OuterCirculation;
......@@ -6,6 +6,7 @@
* @Description: 外部流转记录
*/
import React from 'react';
import {useIntl} from 'umi';
import { CREDIT_OUTER_STATUS } from '@/constants/payment';
import MellowCard from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable';
......@@ -15,54 +16,55 @@ import { CREDIT_OUTER_STATUS_TAG_MAP } from '../../../constant';
interface OuterCirculationRecordProps {
dataSource: {
roleName: string,
status: number,
operate: string,
operateTime: string,
opinion: string,
roleName: string,
status: number,
operate: string,
operateTime: string,
opinion: string,
}[];
onPaginationChange?: (page: number, size: number) => void;
};
const OuterCirculationRecord: React.FC<OuterCirculationRecordProps> = ({
dataSource = [],
onPaginationChange,
dataSource = [],
onPaginationChange,
}) => {
const intl = useIntl();
const columns: EditableColumns[] = [
{
title: '序号',
dataIndex: 'order',
align: 'center',
render: (_, record, index) => index + 1,
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculationRecord.columns.order'}),
dataIndex: 'order',
align: 'center',
render: (_, record, index) => index + 1,
},
{
title: '操作角色',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculationRecord.columns.roleName'}),
dataIndex: 'roleName',
align: 'center',
},
{
title: '状态',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculationRecord.columns.status'}),
dataIndex: 'status',
align: 'center',
align: 'center',
render: text => <StatusTag type={CREDIT_OUTER_STATUS_TAG_MAP[text]} title={CREDIT_OUTER_STATUS[text]} />
},
{
title: '操作',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculationRecord.columns.operate'}),
dataIndex: 'operate',
align: 'center',
ellipsis: true,
ellipsis: true,
},
{
title: '操作时间',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculationRecord.columns.operateTime'}),
dataIndex: 'operateTime',
align: 'center',
},
{
title: '审核意见',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculationRecord.columns.opinion'}),
dataIndex: 'opinion',
align: 'center',
ellipsis: true,
align: 'center',
ellipsis: true,
},
];
......@@ -74,9 +76,9 @@ const OuterCirculationRecord: React.FC<OuterCirculationRecordProps> = ({
return (
<MellowCard
title="外部流转记录"
title={intl.formatMessage({id: 'payandSettle.creditApplication.components.outerCirculationRecord.title'})}
style={{
marginBottom: 24,
marginBottom: 24,
}}
>
<PolymericTable
......@@ -90,4 +92,4 @@ const OuterCirculationRecord: React.FC<OuterCirculationRecordProps> = ({
);
};
export default OuterCirculationRecord;
\ No newline at end of file
export default OuterCirculationRecord;
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:51:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-20 14:41:42
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
import { PATTERN_MAPS } from '@/constants/regExp';
export const editModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
full: true,
description: '一次只能上传一个附件,每个附件大小不能超过20M',
},
properties: {
applyQuota: {
type: 'string',
title: '申请调整额度',
'x-component-props': {
placeholder: '',
addonBefore: '¥',
},
'x-rules': [
{
required: true,
message: '请填写申请调整额度',
},
{
pattern: PATTERN_MAPS.money,
message: '请填写正数',
},
],
},
quotaSlide: {
type: 'number',
title: '',
'x-component': 'range',
'x-component-props': {
min: 0,
// max: 1024,
// marks: {
// 0: {
// label: '{{MinMarks}}',
// },
// 1024: {
// label: '{{MaxMarks}}',
// },
// },
style: {
margin: '0 20px 28px'
},
},
},
billDay: {
type: 'string',
title: '申请调整账单日期',
'x-component-props': {
placeholder: '',
addonAfter: '日',
},
'x-rules': [
{
required: true,
message: '请填写申请调整账单日期',
},
{
pattern: PATTERN_MAPS.quantity,
message: '请填写大于等于1的正整数',
},
{
validator(value) {
const intVal = +value;
return intVal > 28 || intVal < 0 ? '请输入大于0 小于等于 28的数值' : '';
}
},
],
},
repayPeriod: {
type: 'string',
title: '申请还款周期',
'x-component-props': {
placeholder: '',
addonAfter: '天',
},
'x-rules': [
{
required: true,
message: '请填写申请还款周期',
},
{
pattern: PATTERN_MAPS.quantity,
message: '请填写大于等于1的正整数',
},
],
},
fileList: {
type: 'string',
title: '申请附件',
'x-component': 'FixUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '',
},
beforeUpload: '{{beforeUpload}}',
accept: '.xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .png, .jpeg',
},
'x-rules': [
{
required: true,
message: '请上传申请附件',
},
],
},
},
},
},
};
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:51:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-20 14:41:42
* @Description:
*/
import {getIntl} from 'umi';
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
import { PATTERN_MAPS } from '@/constants/regExp';
const intl = getIntl();
export const editModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
full: true,
description: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.description'}),
},
properties: {
applyQuota: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.applyQuota'}),
'x-component-props': {
placeholder: '',
addonBefore: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.applyQuota.addonBefore'}),
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.applyQuota.message.1'}),
},
{
pattern: PATTERN_MAPS.money,
message: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.applyQuota.message.2'}),
},
],
},
quotaSlide: {
type: 'number',
title: '',
'x-component': 'range',
'x-component-props': {
min: 0,
// max: 1024,
// marks: {
// 0: {
// label: '{{MinMarks}}',
// },
// 1024: {
// label: '{{MaxMarks}}',
// },
// },
style: {
margin: '0 20px 28px'
},
},
},
billDay: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.billDay'}),
'x-component-props': {
placeholder: '',
addonAfter: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.billDay.addonAfter'}),
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.billDay.message.1'}),
},
{
pattern: PATTERN_MAPS.quantity,
message: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.billDay.message.2'}),
},
{
validator(value) {
const intVal = +value;
return intVal > 28 || intVal < 0 ? intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.billDay.message.3'}) : '';
}
},
],
},
repayPeriod: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.repayPeriod'}),
'x-component-props': {
placeholder: '',
addonAfter: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.repayPeriod.addonAfter'}),
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.repayPeriod.message.1'}),
},
{
pattern: PATTERN_MAPS.quantity,
message: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.repayPeriod.message.2'}),
},
],
},
fileList: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.fileList'}),
'x-component': 'FixUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '',
},
beforeUpload: '{{beforeUpload}}',
accept: '.xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .png, .jpeg',
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.components.quotaApplicationInfo.schema.fileList.message'}),
},
],
},
},
},
},
};
import React, { useState, useRef } from 'react';
import { useIntl } from 'umi';
import { Card, Badge, Progress, Button } from 'antd';
import {
ClockCircleOutlined,
......@@ -18,8 +19,8 @@ import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema';
import {
CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP_PURCHASER,
CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP_PURCHASER,
} from '../../constant';
import styles from './index.less';
......@@ -27,10 +28,11 @@ const formActions = createFormActions();
const QuotaFormQuery: React.FC = () => {
const ref = useRef<any>({});
const intl = useIntl();
const defaultColumns: ColumnType<any>[] = [
{
title: '申请单号/时间',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.applyNo' }),
dataIndex: 'applyNo',
align: 'center',
render: (text, record) => (
......@@ -47,39 +49,39 @@ const QuotaFormQuery: React.FC = () => {
),
},
{
title: '会员归属',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.parentMemberName' }),
dataIndex: 'parentMemberName',
align: 'center',
},
{
title: '会员类型',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.memberTypeName' }),
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '会员角色',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.memberRoleName' }),
dataIndex: 'memberRoleName',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '所属会员等级',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.memberLevelName' }),
dataIndex: 'memberLevelName',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '调整前额度(元)',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.originalQuota' }),
dataIndex: 'originalQuota',
align: 'center',
},
{
title: '申请调整后额度(元)',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.applyQuota' }),
dataIndex: 'applyQuota',
align: 'center',
align: 'center',
},
{
title: '外部状态',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.outerStatusName' }),
dataIndex: 'outerStatusName',
align: 'center',
filters: [],
......@@ -89,7 +91,7 @@ const QuotaFormQuery: React.FC = () => {
),
},
{
title: '内部状态',
title: intl.formatMessage({ id: 'payandSettle.creditApplication.quotaFormQuery.defaultColumns.innerStatusName' }),
dataIndex: 'innerStatusName',
align: 'center',
filters: [],
......@@ -101,12 +103,12 @@ const QuotaFormQuery: React.FC = () => {
const [columns, setColumns] = useState<any[]>(defaultColumns);
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
getPayCreditApplyPageCreditApply({
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD HH:mm:ss') : null,
endTime: endTime ? moment(+endTime).format('YYYY-MM-DD HH:mm:ss') : null,
...rest,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD HH:mm:ss') : null,
endTime: endTime ? moment(+endTime).format('YYYY-MM-DD HH:mm:ss') : null,
...rest,
})
.then(res => {
if (res.code === 1000) {
......@@ -123,33 +125,33 @@ const QuotaFormQuery: React.FC = () => {
// 初始化高级筛选选项
const fetchSearchItems = async () => {
const res = await getPayCreditApplyPageItemsByConsumer();
if (res.code === 1000) {
const { data } = res;
const {
outerStatusList = [],
innerStatusList = [],
const {
outerStatusList = [],
innerStatusList = [],
} = data;
const newColumns = columns.slice();
// filter 0 过滤掉全部选项
coverColFiltersItem(
newColumns,
'outerStatusName',
newColumns,
'outerStatusName',
outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
);
coverColFiltersItem(
newColumns,
'innerStatusName',
newColumns,
'innerStatusName',
innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
);
setColumns(newColumns);
return {
outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
};
}
return {};
......@@ -190,4 +192,4 @@ const QuotaFormQuery: React.FC = () => {
);
};
export default QuotaFormQuery;
\ No newline at end of file
export default QuotaFormQuery;
......@@ -3,12 +3,15 @@
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-08 14:50:23
* @Description:
* @Description:
*/
import { getIntl } from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants';
const intl = getIntl();
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
......@@ -20,9 +23,9 @@ export const listSearchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 会员归属 进行搜索',
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaFormQuery.schema.listSearchSchema.memberName'}),
align: 'flex-left',
tip: intl.formatMessage({id: 'payandSettle.creditApplication.quotaFormQuery.schema.listSearchSchema.memberName.tip'}),
},
},
[FORM_FILTER_PATH]: {
......@@ -38,17 +41,17 @@ export const listSearchSchema: ISchema = {
applyNo: {
type: 'string',
'x-component-props': {
placeholder: '申请单号',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaFormQuery.schema.listSearchSchema.applyNo'}),
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaFormQuery.schema.listSearchSchema.time'}),
allowClear: true,
},
},
outerStatus: {
......@@ -56,8 +59,8 @@ export const listSearchSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaFormQuery.schema.listSearchSchema.outerStatus'}),
allowClear: true,
},
},
innerStatus: {
......@@ -65,8 +68,8 @@ export const listSearchSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaFormQuery.schema.listSearchSchema.innerStatus'}),
allowClear: true,
},
},
submit: {
......@@ -75,7 +78,7 @@ export const listSearchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({id: 'payandSettle.creditApplication.quotaFormQuery.schema.listSearchSchema.submit'}),
},
},
},
......@@ -83,4 +86,4 @@ export const listSearchSchema: ISchema = {
},
},
},
};
\ No newline at end of file
};
import React, { useState } from 'react';
import { useIntl } from 'umi';
import {
Tabs,
Descriptions,
......@@ -26,6 +27,7 @@ const BillInfo: React.FC<BillInfoProps> = ({
overdueList = [],
loading = false,
}) => {
const intl = useIntl();
const [currentVoucher, setCurrentVoucher] = useState<FileData[]>([]);
const [voucherVisible, setVoucherVisible] = useState(false);
......@@ -49,13 +51,13 @@ const BillInfo: React.FC<BillInfoProps> = ({
}}
>
<div className={styles.billInfo}>
{(!loading && overdueList && overdueList.length > 0 ) ? (
<Tabs onChange={() => {}}>
{(!loading && overdueList && overdueList.length > 0) ? (
<Tabs onChange={() => { }}>
{overdueList.map((item, index) => (
<TabPane
tab={(
<div className={styles.dateWrap}>
<StatusTag type="danger" title={`逾期 ${item.overdueDay} 天`} />
<StatusTag type="danger" title={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.statusTag' }, { data: item.overdueDay })} />
<div className={styles.time}>{item.billName}</div>
</div>
)}
......@@ -64,10 +66,10 @@ const BillInfo: React.FC<BillInfoProps> = ({
<div className={styles.content}>
<div className={styles['content-left']}>
<Descriptions column={1}>
<Descriptions.Item label="账单金额(元)">{item.billQuota}</Descriptions.Item>
<Descriptions.Item label="账单最后还款日期">{item.lastRepayDate}</Descriptions.Item>
<Descriptions.Item label="账单最后还款金额(元)">{item.lastRepayQuota}</Descriptions.Item>
<Descriptions.Item label="还清日期">{item.payOffDate}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.descriptions.1' })}>{item.billQuota}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.descriptions.2' })}>{item.lastRepayDate}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.descriptions.3' })}>{item.lastRepayQuota}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.descriptions.4' })}>{item.payOffDate}</Descriptions.Item>
</Descriptions>
</div>
<div className={styles['content-right']}>
......@@ -78,7 +80,7 @@ const BillInfo: React.FC<BillInfoProps> = ({
key={trade.tradeCode}
>
<Descriptions column={1}>
<Descriptions.Item label="交易流水号">
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.descriptions.5' })}>
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={12}>
<a onClick={() => handleCheckVoucher(trade.payProveList)}>{trade.tradeCode}</a>
......@@ -89,11 +91,11 @@ const BillInfo: React.FC<BillInfoProps> = ({
textAlign: 'right',
}}
>
<StatusTag type="danger" title={`逾期 ${trade.overdueDay} 天`} />
<StatusTag type="danger" title={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.statusTag' }, { data: item.overdueDay })} />
</Col>
</Row>
</Descriptions.Item>
<Descriptions.Item label="交易项目">
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.descriptions.6' })}>
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={12}>
{BILL_TRADE_OPERATION[trade.operation]}
......@@ -108,7 +110,7 @@ const BillInfo: React.FC<BillInfoProps> = ({
</Col>
</Row>
</Descriptions.Item>
<Descriptions.Item label="交易时间">{trade.tradeTime}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.billInfo.descriptions.7' })}>{trade.tradeTime}</Descriptions.Item>
</Descriptions>
</TradeWrap.TradeItem>
))}
......
import React from 'react';
import { useIntl } from 'umi';
import { Modal, Upload } from 'antd';
import styles from './index.less';
......@@ -14,10 +15,11 @@ interface CheckVoucherModalProps {
};
const CheckVoucherModal: React.FC<CheckVoucherModalProps> = ({
visible,
fileList = [],
onCancel,
visible,
fileList = [],
onCancel,
}) => {
const intl = useIntl();
const handleCancel = () => {
if (onCancel) {
......@@ -27,13 +29,13 @@ const CheckVoucherModal: React.FC<CheckVoucherModalProps> = ({
return (
<Modal
title="查看凭证"
title={intl.formatMessage({ id: 'payandSettle.creditApplication.quotaMenage.detail.components.checkVoucherModal' })}
width={576}
visible={visible}
onCancel={handleCancel}
footer={null}
bodyStyle={{
padding: '16px 24px 24px',
padding: '16px 24px 24px',
}}
destroyOnClose
>
......@@ -45,4 +47,4 @@ const CheckVoucherModal: React.FC<CheckVoucherModalProps> = ({
);
};
export default CheckVoucherModal;
\ No newline at end of file
export default CheckVoucherModal;
import React from 'react';
import { Modal } from 'antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { getOrderCommonPayChannels } from '@/services/OrderNewV2Api';
import NiceForm from '@/components/NiceForm';
import { BillDetailData } from '../IntroduceRow';
import { repaymentModalSchema } from './schema';
import { createEffects } from './effects';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import styles from './index.less';
const { onFormInit$ } = FormEffectHooks;
const repaymentFormActions = createFormActions();
interface RefundModalProps {
/**
* 是否可见
*/
visible: boolean,
/**
* 隐藏事件
*/
onCancel: () => void,
/**
* 确认按钮 loading
*/
confirmLoading?: boolean,
/**
* 账单信息
*/
billInfo: BillDetailData | null,
/**
* 提交事件
*/
onSubmit: (values: any) => void,
};
const RefundModal: React.FC<RefundModalProps> = (props) => {
const {
visible,
onCancel,
confirmLoading,
billInfo,
onSubmit,
} = props;
// 获取供应商支付渠道
const getPayChannels = (): Promise<any[]> => {
return new Promise((resolve, reject) => {
getOrderCommonPayChannels({
payType: `${1}`, // 支付方式:1 线上支付
memberId: `${billInfo.memberId}`,
roleId: `${billInfo.memberRoleId}`,
}).then(res => {
if (res.code === 1000) {
const options =
res.data ?
res.data.map(item => ({
label: item.payChannelName,
value: item.payChannel,
})) :
[];
resolve(options);
}
reject();
}).catch(() => {
reject();
});
});
};
const handleRepaymentSubmit = (values) => {
if (onSubmit) {
onSubmit(values);
}
};
return (
<Modal
title="还款"
width={576}
visible={visible}
confirmLoading={confirmLoading}
onOk={() => repaymentFormActions.submit()}
onCancel={onCancel}
className={styles.modal}
destroyOnClose
>
<NiceForm
previewPlaceholder=""
effects={($, actions) => {
const { setFieldState, setFieldValue } = actions;
onFormInit$().subscribe(() => {
// 初始化数据
setFieldState('repayQuota', fileState => {
fileState.value = billInfo.residueRepayQuota;
fileState.rules = fileState.rules.concat({
validator(value) {
return +value > billInfo.residueRepayQuota ? '输入值已超出还款金额' : '';
}
});
});
setFieldState('amountSlide', fileState => {
fileState.value = billInfo.residueRepayQuota;
fileState.props['x-component-props'].max = billInfo.residueRepayQuota;
fileState.props['x-component-props'].marks = {
0: {
label: 0,
},
[billInfo.residueRepayQuota]: {
label: billInfo.residueRepayQuota,
},
};
});
});
createEffects($, actions);
useAsyncSelect('tradeChannel', getPayChannels, ['label', 'value']);
}}
expressionScope={{
}}
actions={repaymentFormActions}
schema={repaymentModalSchema}
onSubmit={handleRepaymentSubmit}
/>
</Modal>
);
};
export default RefundModal;
\ No newline at end of file
import React from 'react';
import {useIntl} from 'umi';
import { Modal } from 'antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { getOrderCommonPayChannels } from '@/services/OrderNewV2Api';
import NiceForm from '@/components/NiceForm';
import { BillDetailData } from '../IntroduceRow';
import { repaymentModalSchema } from './schema';
import { createEffects } from './effects';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import styles from './index.less';
const { onFormInit$ } = FormEffectHooks;
const repaymentFormActions = createFormActions();
interface RefundModalProps {
/**
* 是否可见
*/
visible: boolean,
/**
* 隐藏事件
*/
onCancel: () => void,
/**
* 确认按钮 loading
*/
confirmLoading?: boolean,
/**
* 账单信息
*/
billInfo: BillDetailData | null,
/**
* 提交事件
*/
onSubmit: (values: any) => void,
};
const RefundModal: React.FC<RefundModalProps> = (props) => {
const {
visible,
onCancel,
confirmLoading,
billInfo,
onSubmit,
} = props;
const intl = useIntl();
// 获取供应商支付渠道
const getPayChannels = (): Promise<any[]> => {
return new Promise((resolve, reject) => {
getOrderCommonPayChannels({
payType: `${1}`, // 支付方式:1 线上支付
memberId: `${billInfo.memberId}`,
roleId: `${billInfo.memberRoleId}`,
}).then(res => {
if (res.code === 1000) {
const options =
res.data ?
res.data.map(item => ({
label: item.payChannelName,
value: item.payChannel,
})) :
[];
resolve(options);
}
reject();
}).catch(() => {
reject();
});
});
};
const handleRepaymentSubmit = (values) => {
if (onSubmit) {
onSubmit(values);
}
};
return (
<Modal
title={intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.title'})}
width={576}
visible={visible}
confirmLoading={confirmLoading}
onOk={() => repaymentFormActions.submit()}
onCancel={onCancel}
className={styles.modal}
destroyOnClose
>
<NiceForm
previewPlaceholder=""
effects={($, actions) => {
const { setFieldState, setFieldValue } = actions;
onFormInit$().subscribe(() => {
// 初始化数据
setFieldState('repayQuota', fileState => {
fileState.value = billInfo.residueRepayQuota;
fileState.rules = fileState.rules.concat({
validator(value) {
return +value > billInfo.residueRepayQuota ? intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.validator'}) : '';
}
});
});
setFieldState('amountSlide', fileState => {
fileState.value = billInfo.residueRepayQuota;
fileState.props['x-component-props'].max = billInfo.residueRepayQuota;
fileState.props['x-component-props'].marks = {
0: {
label: 0,
},
[billInfo.residueRepayQuota]: {
label: billInfo.residueRepayQuota,
},
};
});
});
createEffects($, actions);
useAsyncSelect('tradeChannel', getPayChannels, ['label', 'value']);
}}
expressionScope={{
}}
actions={repaymentFormActions}
schema={repaymentModalSchema}
onSubmit={handleRepaymentSubmit}
/>
</Modal>
);
};
export default RefundModal;
/*
* @Author: XieZhiXiong
* @Date: 2020-12-30 14:49:11
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-13 11:50:14
* @Description:
*/
import { ISchema } from '@formily/antd';
import { PATTERN_MAPS } from '@/constants/regExp';
export const repaymentModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
full: true,
},
properties: {
repayQuota: {
type: 'string',
title: '还款金额',
'x-component-props': {
placeholder: '',
addonBefore: '¥',
step: 0.01,
},
'x-rules': [
{
required: true,
message: '请填写还款金额',
},
{
pattern: PATTERN_MAPS.money,
message: '请输入整数或小数位不超过两位的小数',
},
],
},
amountSlide: {
type: 'number',
title: '',
'x-component': 'range',
'x-component-props': {
min: 0,
// max: 20000,
},
},
tradeType: {
type: 'number',
enum: [
{
label: '线上支付方式',
value: 1,
},
{
label: '线下支付方式',
value: 2,
},
],
default: 1,
title: '选择支付方式',
'x-component-props': {
placeholder: '请选择',
},
'x-rules': [
{
required: true,
message: '请选择支付方式',
},
],
},
tradeChannel: {
type: 'string',
title: '选择支付渠道',
enum: [],
'x-component-props': {
placeholder: '请选择',
},
'x-rules': [
{
required: true,
message: '请选择支付渠道',
},
],
},
},
},
},
};
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-12-30 14:49:11
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-13 11:50:14
* @Description:
*/
import {getIntl} from 'umi';
import { ISchema } from '@formily/antd';
import { PATTERN_MAPS } from '@/constants/regExp';
const intl = getIntl();
export const repaymentModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
full: true,
},
properties: {
repayQuota: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.repayQuota'}),
'x-component-props': {
placeholder: '',
addonBefore: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.repayQuota.addonBefore'}),
step: 0.01,
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.repayQuota.message.1'}),
},
{
pattern: PATTERN_MAPS.money,
message: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.repayQuota.message.2'}),
},
],
},
amountSlide: {
type: 'number',
title: '',
'x-component': 'range',
'x-component-props': {
min: 0,
// max: 20000,
},
},
tradeType: {
type: 'number',
enum: [
{
label: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeType.1'}),
value: 1,
},
{
label: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeType.2'}),
value: 2,
},
],
default: 1,
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeType'}),
'x-component-props': {
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeType.placeholder'}),
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeType.message'}),
},
],
},
tradeChannel: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeChannel'}),
enum: [],
'x-component-props': {
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeChannel.placeholder'}),
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.refundModal.schema.repaymentModalSchema.tradeChannel.message'}),
},
],
},
},
},
},
};
/*
* @Author: XieZhiXiong
* @Date: 2021-01-13 13:46:08
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-18 10:05:27
* @Description: 上传凭证弹窗
*/
import React, { useState, useEffect } from 'react';
import { Modal, message, Upload } from 'antd';
import styled from 'styled-components';
import { createFormActions } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import { getSettleAccountsGetMemberAccountConfig } from '@/services/SettleV2Api';
import { uploadVoucherModalSchema } from './schema';
import styles from './index.less';
const uploadVoucherFormActions = createFormActions();
const Wrap = styled(props => <div {...props} />)`
.ant-form-item {
margin-bottom: 2px;
}
`
interface UploadVoucherModalProps {
/**
* 是否可见
*/
visible: boolean;
/**
* 确认按钮loading
*/
confirmLoading: boolean;
/**
* 会员id
*/
memberId: number;
/**
* 会员角色
*/
memberRoleId: number;
/**
* 提交事件
*/
onSubmit: (values: any) => void;
/**
* 隐藏事件
*/
onCancel: () => void,
}
interface BankAccountData {
id: number,
name: string,
bankAccount: string,
bankDeposit: string,
}
const UploadVoucherModal: React.FC<UploadVoucherModalProps> = (props: UploadVoucherModalProps) => {
const {
visible,
confirmLoading,
memberId,
memberRoleId,
onSubmit,
onCancel,
} = props;
const [bankAccount, setBankAccount] = useState<BankAccountData>({
id: 0,
name: '',
bankAccount: '',
bankDeposit: '',
});
const [loading, setLoading] = useState(false);
// 获取对公账户信息
const fetchSettleAccountsGetMemberAccountConfig = (memberId: number, memberRoleId: number) => {
if (!memberId || !memberRoleId || loading) {
return;
}
setLoading(true);
getSettleAccountsGetMemberAccountConfig({
memberId: `${memberId}`,
roleId: `${memberRoleId}`,
}).then(res => {
if (res.code === 1000) {
setBankAccount(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setLoading(false);
});
};
useEffect(() => {
if (visible) {
fetchSettleAccountsGetMemberAccountConfig(memberId, memberRoleId);
}
}, [visible]);
const beforeUploadVoucher = file => {
if (file.size / 1024 > 200) {
message.warning('图片大小超过200K');
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const handleUploadVoucherSubmit = values => {
if (onSubmit) {
if (
!bankAccount ||
!bankAccount.id ||
!bankAccount.bankAccount ||
!bankAccount.bankDeposit
) {
message.error('没有还款账户完整相关信息,无法还款');
return;
}
onSubmit(values);
}
};
return (
<Modal
title="上传支付凭证"
width={576}
visible={visible}
confirmLoading={confirmLoading}
onOk={() => uploadVoucherFormActions.submit()}
onCancel={onCancel}
destroyOnClose
>
<Wrap>
<NiceForm
previewPlaceholder=""
value={bankAccount}
effects={($, { setFieldState }) => {
}}
expressionScope={{
beforeUpload: beforeUploadVoucher,
}}
actions={uploadVoucherFormActions}
schema={uploadVoucherModalSchema}
onSubmit={handleUploadVoucherSubmit}
colon
/>
</Wrap>
</Modal>
);
};
export default UploadVoucherModal;
/*
* @Author: XieZhiXiong
* @Date: 2021-01-13 13:46:08
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-18 10:05:27
* @Description: 上传凭证弹窗
*/
import React, { useState, useEffect } from 'react';
import {useIntl} from 'umi';
import { Modal, message, Upload } from 'antd';
import styled from 'styled-components';
import { createFormActions } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import { getSettleAccountsGetMemberAccountConfig } from '@/services/SettleV2Api';
import { uploadVoucherModalSchema } from './schema';
import styles from './index.less';
const uploadVoucherFormActions = createFormActions();
const Wrap = styled(props => <div {...props} />)`
.ant-form-item {
margin-bottom: 2px;
}
`
interface UploadVoucherModalProps {
/**
* 是否可见
*/
visible: boolean;
/**
* 确认按钮loading
*/
confirmLoading: boolean;
/**
* 会员id
*/
memberId: number;
/**
* 会员角色
*/
memberRoleId: number;
/**
* 提交事件
*/
onSubmit: (values: any) => void;
/**
* 隐藏事件
*/
onCancel: () => void,
}
interface BankAccountData {
id: number,
name: string,
bankAccount: string,
bankDeposit: string,
}
const UploadVoucherModal: React.FC<UploadVoucherModalProps> = (props: UploadVoucherModalProps) => {
const {
visible,
confirmLoading,
memberId,
memberRoleId,
onSubmit,
onCancel,
} = props;
const intl = useIntl();
const [bankAccount, setBankAccount] = useState<BankAccountData>({
id: 0,
name: '',
bankAccount: '',
bankDeposit: '',
});
const [loading, setLoading] = useState(false);
// 获取对公账户信息
const fetchSettleAccountsGetMemberAccountConfig = (memberId: number, memberRoleId: number) => {
if (!memberId || !memberRoleId || loading) {
return;
}
setLoading(true);
getSettleAccountsGetMemberAccountConfig({
memberId: `${memberId}`,
roleId: `${memberRoleId}`,
}).then(res => {
if (res.code === 1000) {
setBankAccount(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setLoading(false);
});
};
useEffect(() => {
if (visible) {
fetchSettleAccountsGetMemberAccountConfig(memberId, memberRoleId);
}
}, [visible]);
const beforeUploadVoucher = file => {
if (file.size / 1024 > 200) {
message.warning(intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.warning'}));
return Upload.LIST_IGNORE;
}
return Promise.resolve();
};
const handleUploadVoucherSubmit = values => {
if (onSubmit) {
if (
!bankAccount ||
!bankAccount.id ||
!bankAccount.bankAccount ||
!bankAccount.bankDeposit
) {
message.error(intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.error'}));
return;
}
onSubmit(values);
}
};
return (
<Modal
title={intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.title'})}
width={576}
visible={visible}
confirmLoading={confirmLoading}
onOk={() => uploadVoucherFormActions.submit()}
onCancel={onCancel}
destroyOnClose
>
<Wrap>
<NiceForm
previewPlaceholder=""
value={bankAccount}
effects={($, { setFieldState }) => {
}}
expressionScope={{
beforeUpload: beforeUploadVoucher,
}}
actions={uploadVoucherFormActions}
schema={uploadVoucherModalSchema}
onSubmit={handleUploadVoucherSubmit}
colon
/>
</Wrap>
</Modal>
);
};
export default UploadVoucherModal;
/*
* @Author: XieZhiXiong
* @Date: 2021-01-13 14:01:40
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-20 14:37:35
* @Description:
*/
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
export const uploadVoucherModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 6,
wrapperCol: 18,
labelAlign: 'left',
full: true,
description: '单个凭证文件大小不能超过 200K',
},
properties: {
name: {
type: 'string',
title: '还款账户名称',
'x-component': 'Text',
},
bankAccount: {
type: 'string',
title: '银行账号',
'x-component': 'Text',
},
bankDeposit: {
type: 'string',
title: '开户行',
'x-component': 'Text',
},
payProveList: {
type: 'string',
title: '上传支付凭证',
'x-component': 'FixUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
labelAlign: 'top',
full: true,
},
'x-rules': [
{
required: true,
message: '请上传支付凭证',
},
],
},
},
},
},
};
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2021-01-13 14:01:40
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-20 14:37:35
* @Description:
*/
import {getIntl} from 'umi';
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
const intl = getIntl();
export const uploadVoucherModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 6,
wrapperCol: 18,
labelAlign: 'left',
full: true,
description: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.schema.uploadVoucherModalSchema.description'}),
},
properties: {
name: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.schema.uploadVoucherModalSchema.name'}),
'x-component': 'Text',
},
bankAccount: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.schema.uploadVoucherModalSchema.bankAccount'}),
'x-component': 'Text',
},
bankDeposit: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.schema.uploadVoucherModalSchema.bankDeposit'}),
'x-component': 'Text',
},
payProveList: {
type: 'string',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.schema.uploadVoucherModalSchema.payProveList'}),
'x-component': 'FixUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
labelAlign: 'top',
full: true,
},
'x-rules': [
{
required: true,
message: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.uploadVoucherModal.schema.uploadVoucherModalSchema.payProveList.message'}),
},
],
},
},
},
},
};
/*
* @Author: XieZhiXiong
* @Date: 2020-12-16 11:07:13
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-30 13:50:05
* @Description: 微信支付弹窗
*/
import React, { useState, useEffect, useRef } from 'react';
import { Modal, Upload } from 'antd';
import QRCode from 'qrcode';
import { priceFormat } from '@/utils/numberFomat';
import WechatIcon from '@/assets/imgs/wechat_icon.png';
import styles from './index.less';
interface WxPayModalProps {
/**
* 需要生成 二维码的 地址
*/
url: string;
/**
* 支付金额
*/
price: number;
/**
* 是否可见
*/
visible: boolean;
/**
* 弹窗取消事件
*/
onCancel: () => void;
/**
* 轮训查询支付结果事件
*/
onCheckResult: () => Promise<{ success: Boolean }>;
/**
* 轮训查询支付结果成功
*/
onSuccess?: () => void;
/**
* 轮训查询支付结果失败
*/
onFail?: () => void;
};
const WxPayModal: React.FC<WxPayModalProps> = ({
url,
price,
visible,
onCancel,
onCheckResult,
onSuccess,
onFail,
}) => {
const [qrCode, setQrCode] = useState<string>('');
const getQRCode = async params => {
if (!params) {
return;
}
// 生成二维码
const res = await QRCode.toDataURL(params);
setQrCode(res);
};
let timer = useRef(null);
// 最多请求3600次,2000毫秒一次,二维码过期两小时
let count = 0;
const handleCheckResult = () => {
if (!onCheckResult) {
return;
}
count++;
if (count > 3600) {
return;
}
onCheckResult().then(res => {
if (!res.success) {
timer.current = setTimeout(() => {
handleCheckResult();
}, 2000);
} else {
clearTimeout(timer.current);
timer = null;
if (onSuccess) {
onSuccess();
}
}
});
};
useEffect(() => {
getQRCode(url);
if (url) {
handleCheckResult();
}
return () => {
if (timer.current) {
clearTimeout(timer.current);
timer.current = null;
}
};
}, [url]);
useEffect(() => {
if (!visible) {
if (timer.current) {
clearTimeout(timer.current);
timer.current = null;
}
}
}, [visible]);
const handleCancel = () => {
if (onCancel) {
onCancel();
}
};
return (
<Modal
title={(
<div className={styles.common_title}>
<div className={styles.common_title_icon}><img src={WechatIcon} /></div>
<span>微信支付</span>
</div>
)}
width={576}
visible={visible}
onCancel={handleCancel}
footer={null}
maskClosable={false}
destroyOnClose
>
<div className={styles.wechat_payway}>
<p className={styles.wechat_payway_title}>使用微信扫一扫下方二维码</p>
<div className={styles.wechat_payway_imgbox}>
{qrCode && <img src={qrCode} />}
</div>
<div className={styles.wechat_payway_needpay}>
<label>当前需支付:</label>
<span>{priceFormat(price)}</span>
<label>RMB</label>
</div>
</div>
</Modal>
);
};
export default WxPayModal;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-12-16 11:07:13
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-30 13:50:05
* @Description: 微信支付弹窗
*/
import React, { useState, useEffect, useRef } from 'react';
import {useIntl} from 'umi';
import { Modal, Upload } from 'antd';
import QRCode from 'qrcode';
import { priceFormat } from '@/utils/numberFomat';
import WechatIcon from '@/assets/imgs/wechat_icon.png';
import styles from './index.less';
interface WxPayModalProps {
/**
* 需要生成 二维码的 地址
*/
url: string;
/**
* 支付金额
*/
price: number;
/**
* 是否可见
*/
visible: boolean;
/**
* 弹窗取消事件
*/
onCancel: () => void;
/**
* 轮训查询支付结果事件
*/
onCheckResult: () => Promise<{ success: Boolean }>;
/**
* 轮训查询支付结果成功
*/
onSuccess?: () => void;
/**
* 轮训查询支付结果失败
*/
onFail?: () => void;
};
const WxPayModal: React.FC<WxPayModalProps> = ({
url,
price,
visible,
onCancel,
onCheckResult,
onSuccess,
onFail,
}) => {
const intl = useIntl();
const [qrCode, setQrCode] = useState<string>('');
const getQRCode = async params => {
if (!params) {
return;
}
// 生成二维码
const res = await QRCode.toDataURL(params);
setQrCode(res);
};
let timer = useRef(null);
// 最多请求3600次,2000毫秒一次,二维码过期两小时
let count = 0;
const handleCheckResult = () => {
if (!onCheckResult) {
return;
}
count++;
if (count > 3600) {
return;
}
onCheckResult().then(res => {
if (!res.success) {
timer.current = setTimeout(() => {
handleCheckResult();
}, 2000);
} else {
clearTimeout(timer.current);
timer = null;
if (onSuccess) {
onSuccess();
}
}
});
};
useEffect(() => {
getQRCode(url);
if (url) {
handleCheckResult();
}
return () => {
if (timer.current) {
clearTimeout(timer.current);
timer.current = null;
}
};
}, [url]);
useEffect(() => {
if (!visible) {
if (timer.current) {
clearTimeout(timer.current);
timer.current = null;
}
}
}, [visible]);
const handleCancel = () => {
if (onCancel) {
onCancel();
}
};
return (
<Modal
title={(
<div className={styles.common_title}>
<div className={styles.common_title_icon}><img src={WechatIcon} /></div>
<span>{intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.wxPayModal.title'})}</span>
</div>
)}
width={576}
visible={visible}
onCancel={handleCancel}
footer={null}
maskClosable={false}
destroyOnClose
>
<div className={styles.wechat_payway}>
<p className={styles.wechat_payway_title}>{intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.wxPayModal.p'})}</p>
<div className={styles.wechat_payway_imgbox}>
{qrCode && <img src={qrCode} />}
</div>
<div className={styles.wechat_payway_needpay}>
<label>{intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.wxPayModal.label.1'})}</label>
<span>{priceFormat(price)}</span>
<label>{intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.components.wxPayModal.label.2'})}</label>
</div>
</div>
</Modal>
);
};
export default WxPayModal;
import React, { Suspense, useEffect, useState, useMemo, useCallback } from 'react';
import {
PageHeader,
Descriptions,
Spin,
Badge,
message,
import {
PageHeader,
Descriptions,
Spin,
Badge,
message,
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { history,useIntl } from 'umi';
import { getPayCreditApplyGetCreditDetail, getPayCreditApplyGetCreditBillDetail, getPayCreditApplyPageCreditTradeRecord, getPayCreditApplyPageCreditOverdue, GetPayCreditApplyGetCreditDetailResponse } from '@/services/PayV2Api';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
import {
CREDIT_REPAYMENT_STATUS,
CREDIT_STATUS,
CREDIT_REPAYMENT_STATUS,
CREDIT_STATUS,
} from '@/constants/payment';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
import {
CREDIT_STATUS_BADGE_MAP,
CREDIT_REPAYMENT_STATUS_TAG_MAP,
CREDIT_STATUS_BADGE_MAP,
CREDIT_REPAYMENT_STATUS_TAG_MAP,
} from '../../../constant';
import { BillDetailParams, BillDetailData, BillRecordParams } from './components/IntroduceRow';
import styles from './index.less';
......@@ -29,6 +29,7 @@ const HistoryList = React.lazy(() => import('../../components/HistoryList'));
const QuotaMenageDetail: React.FC = () => {
const { id } = usePageStatus();
const intl = useIntl();
const [creditInfo, setCreditInfo] = useState<GetPayCreditApplyGetCreditDetailResponse>(null);
const [creditOverdueList, setCreditOverdueList] = useState([]);
const [infoLoading, setInfoLoading] = useState(false);
......@@ -60,14 +61,14 @@ const QuotaMenageDetail: React.FC = () => {
const quotaData = [
{
x: '剩余可用额度(元)',
y: creditInfo && creditInfo.canUseQuota ? creditInfo.canUseQuota : 0,
},
x: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.quotaData.1'}),
y: creditInfo && creditInfo.canUseQuota ? creditInfo.canUseQuota : 0,
},
{
x: '已用额度(元)',
y: creditInfo && creditInfo.useQuota ? creditInfo.useQuota : 0,
},
];
x: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.quotaData.2'}),
y: creditInfo && creditInfo.useQuota ? creditInfo.useQuota : 0,
},
];
// 获取账单详情
const fetchBillDetail = (params: BillDetailParams): Promise<BillDetailData> => {
......@@ -92,8 +93,8 @@ const QuotaMenageDetail: React.FC = () => {
}
return new Promise((resolve, reject) => {
getPayCreditApplyPageCreditTradeRecord({
creditId: id,
...params,
creditId: id,
...params,
}).then(res => {
if (res.code === 1000) {
resolve(res.data);
......@@ -112,8 +113,8 @@ const QuotaMenageDetail: React.FC = () => {
}
setCreditOverdueListLoading(true);
getPayCreditApplyPageCreditOverdue({
creditId: id,
current: '1',
creditId: id,
current: '1',
pageSize: '9999', // 暂时写死
}).then(res => {
if (res.code === 1000) {
......@@ -131,7 +132,7 @@ const QuotaMenageDetail: React.FC = () => {
return [];
}
return arr.map(item => ({
title: item.name,
title: item.name,
value: item.id,
}));
};
......@@ -140,7 +141,7 @@ const QuotaMenageDetail: React.FC = () => {
<Spin spinning={infoLoading}>
<PageHeaderWrapper
style={{
padding: 24,
padding: 24,
}}
title={
<>
......@@ -148,38 +149,38 @@ const QuotaMenageDetail: React.FC = () => {
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
<AvatarWrap
info={{
name: creditInfo?.member?.memberName,
name: creditInfo?.member?.memberName,
}}
extra={creditInfo?.member?.levelTag}
/>
}
}
extra={(
<>
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="会员类型">{creditInfo?.member?.memberTypeName}</Descriptions.Item>
<Descriptions.Item label="会员角色" span={2}>{creditInfo?.member?.roleName}</Descriptions.Item>
<Descriptions.Item label="还款状态">
<StatusTag
type={CREDIT_REPAYMENT_STATUS_TAG_MAP[creditInfo?.member?.repayStatus]}
title={CREDIT_REPAYMENT_STATUS[creditInfo?.member?.repayStatus]}
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.descriptions.1'})}>{creditInfo?.member?.memberTypeName}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.descriptions.2'})} span={2}>{creditInfo?.member?.roleName}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.descriptions.3'})}>
<StatusTag
type={CREDIT_REPAYMENT_STATUS_TAG_MAP[creditInfo?.member?.repayStatus]}
title={CREDIT_REPAYMENT_STATUS[creditInfo?.member?.repayStatus]}
/>
</Descriptions.Item>
<Descriptions.Item label="会员状态" span={2}>
<Badge
color={CREDIT_STATUS_BADGE_MAP[creditInfo?.member?.status]}
text={CREDIT_STATUS[creditInfo?.member?.status]}
<Descriptions.Item label={intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.detail.descriptions.4'})} span={2}>
<Badge
color={CREDIT_STATUS_BADGE_MAP[creditInfo?.member?.status]}
text={CREDIT_STATUS[creditInfo?.member?.status]}
/>
</Descriptions.Item>
</Descriptions>
......@@ -188,12 +189,12 @@ const QuotaMenageDetail: React.FC = () => {
}
>
<Suspense fallback={null}>
<IntroduceRow
quotaData={quotaData}
<IntroduceRow
quotaData={quotaData}
extraData={{
canUseQuota: creditInfo?.canUseQuota,
useQuota: creditInfo?.useQuota,
quota: creditInfo?.quota,
canUseQuota: creditInfo?.canUseQuota,
useQuota: creditInfo?.useQuota,
quota: creditInfo?.quota,
}}
options={normalizeOptions(creditInfo?.billSelectList)}
fetchBillDetail={fetchBillDetail}
......@@ -206,8 +207,8 @@ const QuotaMenageDetail: React.FC = () => {
</Suspense>
<Suspense fallback={null}>
<HistoryList
dataSource={creditInfo?.historyApplyList}
<HistoryList
dataSource={creditInfo?.historyApplyList}
target="/memberCenter/payandSettle/creditApplication/quotaMenage/history"
/>
</Suspense>
......@@ -216,4 +217,4 @@ const QuotaMenageDetail: React.FC = () => {
);
};
export default QuotaMenageDetail;
\ No newline at end of file
export default QuotaMenageDetail;
......@@ -3,11 +3,14 @@
* @Date: 2020-09-27 17:47:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-08 14:49:50
* @Description:
* @Description:
*/
import {getIntl} from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const intl = getIntl();
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
......@@ -19,9 +22,9 @@ export const listSearchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 会员归属 进行搜索',
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.schema.listSearchSchema.parentMemberName'}),
align: 'flex-left',
tip: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.schema.listSearchSchema.parentMemberName.tip'}),
},
},
[FORM_FILTER_PATH]: {
......@@ -39,8 +42,8 @@ export const listSearchSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '还款状态(全部)',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.schema.listSearchSchema.rePayStatus'}),
allowClear: true,
},
},
status: {
......@@ -48,8 +51,8 @@ export const listSearchSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '状态(全部)',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.schema.listSearchSchema.status'}),
allowClear: true,
},
},
submit: {
......@@ -58,7 +61,7 @@ export const listSearchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({id: 'payandSettle.creditApplication.quotaMenage.schema.listSearchSchema.submit'}),
},
},
},
......@@ -66,4 +69,4 @@ export const listSearchSchema: ISchema = {
},
},
},
};
\ No newline at end of file
};
import React, { useState, useRef } from 'react';
import {
Card,
Badge,
Progress,
Button,
Popconfirm,
message,
import {
Card,
Badge,
Progress,
Button,
Popconfirm,
message,
} from 'antd';
import {
ClockCircleOutlined,
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { history } from 'umi';
import { history,useIntl } from 'umi';
import moment from 'moment';
import { ColumnType } from 'antd/lib/table/interface';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
......@@ -24,27 +24,28 @@ import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema';
import {
CREDIT_INNER_STATUS_UNCOMMITTED,
CREDIT_OUTER_STATUS_FAILED,
CREDIT_INNER_STATUS_UNCOMMITTED,
CREDIT_OUTER_STATUS_FAILED,
} from '@/constants/payment';
import {
CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP_PURCHASER,
CREDIT_OUTER_STATUS_TAG_MAP,
CREDIT_INNER_STATUS_BADGE_MAP_PURCHASER,
} from '../../constant';
import styles from './index.less';
const formActions = createFormActions();
const QuotaPrSubmit: React.FC = () => {
const intl = useIntl();
const ref = useRef<any>({});
const handleSubmit = record => {
const msg = message.loading({
content: '正在提交',
content: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.handleSubmit'}),
duration: 0,
});
postPayCreditApplySubmitCreditApply({
applyId: record.id,
applyId: record.id,
}).then(res => {
if (res.code === 1000) {
ref.current.reload();
......@@ -60,11 +61,11 @@ const QuotaPrSubmit: React.FC = () => {
const handleDelete = record => {
const msg = message.loading({
content: '正在删除',
content: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.handleDelete'}),
duration: 0,
});
postPayCreditApplyDeleteCreditApply({
applyId: record.id,
applyId: record.id,
}).then(res => {
if (res.code === 1000) {
ref.current.reload();
......@@ -76,7 +77,7 @@ const QuotaPrSubmit: React.FC = () => {
const defaultColumns: ColumnType<any>[] = [
{
title: '申请单号/时间',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.applyNo'}),
dataIndex: 'applyNo',
align: 'center',
render: (text, record) => (
......@@ -93,39 +94,39 @@ const QuotaPrSubmit: React.FC = () => {
),
},
{
title: '会员归属',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.parentMemberName'}),
dataIndex: 'parentMemberName',
align: 'center',
},
{
title: '会员类型',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.memberTypeName'}),
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '会员角色',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.memberRoleName'}),
dataIndex: 'memberRoleName',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '所属会员等级',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.memberLevelName'}),
dataIndex: 'memberLevelName',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '调整前额度(元)',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.originalQuota'}),
dataIndex: 'originalQuota',
align: 'center',
},
{
title: '申请调整后额度(元)',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.applyQuota'}),
dataIndex: 'applyQuota',
align: 'center',
align: 'center',
},
{
title: '外部状态',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.outerStatus'}),
dataIndex: 'outerStatus',
align: 'center',
render: (text, record) => (
......@@ -133,13 +134,13 @@ const QuotaPrSubmit: React.FC = () => {
),
},
{
title: '内部状态',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.innerStatus'}),
dataIndex: 'innerStatus',
align: 'center',
render: (text, record) => <Badge color={CREDIT_INNER_STATUS_BADGE_MAP_PURCHASER[record.innerStatus] || '#606266'} text={record.innerStatusName} />,
},
},
{
title: '操作',
title: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.option'}),
dataIndex: 'option',
align: 'center',
render: (text, record) => (
......@@ -149,34 +150,34 @@ const QuotaPrSubmit: React.FC = () => {
type="link"
onClick={() => handleSubmit(record)}
>
提交
{intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.option.button.1'})}
</Button>
)}
{record.outerStatus === CREDIT_INNER_STATUS_UNCOMMITTED && (
<Popconfirm
title="确定要删除吗?"
okText="是"
cancelText="否"
<Popconfirm
title={intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.option.button.2.popconfirm.title'})}
okText={intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.option.button.2.popconfirm.okText'})}
cancelText={intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.option.button.2.popconfirm.cancelText'})}
onConfirm={() => handleDelete(record)}
>
<Button
<Button
type="link"
danger
>
删除
{intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.option.button.2'})}
</Button>
</Popconfirm>
)}
{/* 外部状态为不接受申请 或者 内部状态为 待提交申请 都可以进行编辑 */}
{(
record.outerStatus === CREDIT_OUTER_STATUS_FAILED ||
record.innerStatus === CREDIT_INNER_STATUS_UNCOMMITTED
record.outerStatus === CREDIT_OUTER_STATUS_FAILED ||
record.innerStatus === CREDIT_INNER_STATUS_UNCOMMITTED
) && (
<Button
type="link"
onClick={() => handleJumpVerify(record)}
>
编辑
{intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.defaultColumns.option.button.3'})}
</Button>
)}
</>
......@@ -187,12 +188,12 @@ const QuotaPrSubmit: React.FC = () => {
const [columns, setColumns] = useState<any[]>(defaultColumns);
const fetchListData = (params: any) => {
const { startTime, endTime, ...rest } = params;
const { startTime, endTime, ...rest } = params;
return new Promise((resolve, reject) => {
getPayCreditApplyPageWaitSubmitCreditApply({
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD HH:mm:ss') : null,
endTime: endTime ? moment(+endTime).format('YYYY-MM-DD HH:mm:ss') : null,
...rest,
startTime: startTime ? moment(+startTime).format('YYYY-MM-DD HH:mm:ss') : null,
endTime: endTime ? moment(+endTime).format('YYYY-MM-DD HH:mm:ss') : null,
...rest,
})
.then(res => {
if (res.code === 1000) {
......@@ -237,4 +238,4 @@ const QuotaPrSubmit: React.FC = () => {
);
};
export default QuotaPrSubmit;
\ No newline at end of file
export default QuotaPrSubmit;
......@@ -3,12 +3,15 @@
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-08 14:49:20
* @Description:
* @Description:
*/
import {getIntl} from 'umi';
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants';
const intl = getIntl();
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
......@@ -20,9 +23,9 @@ export const listSearchSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 会员归属 进行搜索',
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.schema.listSearchSchema.memberName'}),
align: 'flex-left',
tip: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.schema.listSearchSchema.memberName.tip'}),
},
},
[FORM_FILTER_PATH]: {
......@@ -38,17 +41,17 @@ export const listSearchSchema: ISchema = {
applyNo: {
type: 'string',
'x-component-props': {
placeholder: '申请单号',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.schema.listSearchSchema.applyNo'}),
allowClear: true,
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
placeholder: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.schema.listSearchSchema.time'}),
allowClear: true,
},
},
submit: {
......@@ -57,7 +60,7 @@ export const listSearchSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({id: 'payandSettle.creditApplication.quotaPrSubmit.schema.listSearchSchema.submit'}),
},
},
},
......@@ -65,4 +68,4 @@ export const listSearchSchema: ISchema = {
},
},
},
};
\ No newline at end of file
};
import React, { useState, useEffect } from 'react';
import { useIntl } from 'umi';
import { injectIntl } from 'umi';
import {
Row,
Col,
......@@ -90,6 +90,7 @@ interface TradeRecordProps {
fetchRecordList: (params: RecordParams) => Promise<RecordRes>;
// 确认还款结果
onConfirm?: (any) => Promise<any>;
intl?: any
};
interface TradeRecordState {
......@@ -231,8 +232,6 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
receivedLoading,
} = this.state;
const intl = useIntl();
return (
<div className={styles.record}>
<Spin spinning={loading}>
......@@ -242,7 +241,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
{record.data.map(item => (
<TradeWrap.TradeItem key={item.tradeCode}>
<Descriptions column={1}>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.1' })}>
<Descriptions.Item label={this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.1' })}>
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={10}>
<a onClick={() => this.handleCheckVoucher(item.payProveList)}>{item.tradeCode}</a>
......@@ -257,7 +256,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
</Col>
</Row>
</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.2' })}>
<Descriptions.Item label={this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.2' })}>
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={12}>
{item.operationName}
......@@ -268,12 +267,12 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
textAlign: 'right',
}}
>
<strong>{item.tradeMoney}{intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.2.strong' })}</strong>
<strong>{item.tradeMoney}{this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.2.strong' })}</strong>
</Col>
</Row>
</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.3' })}>{item.tradeTime}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.4' })}>
<Descriptions.Item label={this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.3' })}>{item.tradeTime}</Descriptions.Item>
<Descriptions.Item label={this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.4' })}>
<Row justify="space-between">
<Col
span={item.status === BILL_TRADE_STATUS_UNCONFIRMED ? 12 : 24}
......@@ -295,7 +294,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
type="primary"
onClick={() => this.handleVisibleResult(true, item.id, item.payProveList)}
>
{intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.4.button' })}
{this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.descriptions.4.button' })}
</Button>
</Col>
)}
......@@ -332,7 +331,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
/>
<Modal
title={intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.title' })}
title={this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.title' })}
width={576}
visible={visibleResult}
footer={[
......@@ -340,7 +339,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
key="1"
onClick={() => this.handleVisibleResult(false)}
>
{intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.button.1' })}
{this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.button.1' })}
</Button>,
<Button
key="2"
......@@ -349,7 +348,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
onClick={() => this.handleConfirm(BILL_TRADE_STATUS_OUTSTANDIND)}
danger
>
{intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.button.2' })}
{this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.button.2' })}
</Button>,
<Button
key="2"
......@@ -357,7 +356,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
loading={receivedLoading}
onClick={() => this.handleConfirm(BILL_TRADE_STATUS_RECEIVED)}
>
{intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.button.3' })}
{this.props.intl.formatMessage({ id: 'payandSettle.creditManage.quotaMenage.detail.components.tradeRecord.modal.button.3' })}
</Button>,
]}
destroyOnClose
......@@ -372,4 +371,4 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
}
};
export default TradeRecord;
export default injectIntl(TradeRecord);
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