Commit 131a2aa1 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复授信相关bug

parent 3587c772
......@@ -100,6 +100,15 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
setSubmitLoading(true);
const { fileList, ...rest } = quotaValues;
console.log({
applyId: +id,
creditId: creditId ? +creditId : 0,
fileList: fileList.map((item: any) => ({ name: item.name, fileUrl: item.data.url })),
...rest,
})
return;
PublicApi.postPayCreditApplyAddCreditApply({
applyId: +id,
creditId: creditId ? +creditId : 0,
......
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:51:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-04 10:02:55
* @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,
},
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': 'AntUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/creditApplication/applicationAttachment/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .png, .jpeg',
},
'x-rules': [
{
required: false,
message: '请上传申请附件',
},
],
description: '一次只能上传一个附件,每个附件大小不能超过20M',
},
},
},
},
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:51:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-04 10:02:55
* @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,
},
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': 'AntUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/creditApplication/applicationAttachment/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .png, .jpeg',
},
'x-rules': [
{
required: true,
message: '请上传申请附件',
},
],
description: '一次只能上传一个附件,每个附件大小不能超过20M',
},
},
},
},
};
\ No newline at end of file
......@@ -10,7 +10,6 @@ const QuotaFormQueryDetail: React.FC = () => {
id={id}
creditId={creditId}
target="/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail"
isEdit
/>
);
};
......
......@@ -72,6 +72,10 @@ export interface BillDetailData {
* 收款人Id
*/
memberId: number
/**
* 收款人角色Id
*/
memberRoleId: number
};
export interface BillRecordParams extends RecordParams {
......@@ -113,7 +117,6 @@ interface IntroduceRowState {
name: string,
bankAccount: string,
bankDeposit: string,
memberId: number,
},
visibleRecord: boolean;
visibleRepayment: boolean;
......@@ -144,7 +147,6 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
name: '',
bankAccount: '',
bankDeposit: '',
memberId: 0,
},
visibleRecord: false,
visibleRepayment: false,
......@@ -180,7 +182,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
id: `${id}`,
}).then(res => {
this.setState({ billInfo: res });
this.getSettleAccountsCorporateAccountConfig(res.memberId, res.memberRoleId);
this.getSettleAccountsGetMemberAccountConfig(res.memberId, res.memberRoleId);
}).finally(() => {
this.setState({ billInfoLoading: false });
});
......@@ -188,13 +190,13 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
};
// 获取对公账户信息
getSettleAccountsCorporateAccountConfig = (memberId: number, memberRoleId: number) => {
getSettleAccountsGetMemberAccountConfig = (memberId: number, memberRoleId: number) => {
if (!memberId || !memberRoleId) {
return;
}
PublicApi.getSettleAccountsCorporateAccountConfig({
PublicApi.getSettleAccountsGetMemberAccountConfig({
memberId: `${memberId}`,
memberRoleId: `${memberRoleId}`,
roleId: `${memberRoleId}`,
}).then(res => {
if (res.code === 1000) {
this.setState({
......@@ -289,10 +291,10 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
};
handleUploadVoucherSubmit = values => {
const { payProveList } = values;
const { payProveList = [] } = values;
const { repaymentValues, billId, bankAccount } = this.state;
if (!bankAccount || !bankAccount.id || !bankAccount.memberId) {
if (!bankAccount || !bankAccount.id) {
message.error('没有还款账户相关信息,无法还款');
return;
}
......
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
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: '¥',
},
'x-rules': [
{
required: true,
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: [
{
label: '微信',
value: 1,
},
{
label: '支付宝',
value: 2,
},
{
label: '银联',
value: 3,
},
],
default: 1,
'x-component-props': {
placeholder: '请选择',
},
'x-rules': [
{
required: true,
message: '请选择支付渠道',
},
],
},
},
},
},
};
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,
},
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': 'AntUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/creditApplication/paymentVoucher/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
labelAlign: 'top',
full: true,
},
'x-rules': [
{
required: false,
message: '请上传支付凭证',
},
],
description: '单个凭证文件大小不能超过 200K',
},
},
},
},
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
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: '¥',
},
'x-rules': [
{
required: true,
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: [
{
label: '微信',
value: 1,
},
{
label: '支付宝',
value: 2,
},
{
label: '银联',
value: 3,
},
],
default: 1,
'x-component-props': {
placeholder: '请选择',
},
'x-rules': [
{
required: true,
message: '请选择支付渠道',
},
],
},
},
},
},
};
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,
},
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': 'AntUpload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/creditApplication/paymentVoucher/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
labelAlign: 'top',
full: true,
},
'x-rules': [
{
required: true,
message: '请上传支付凭证',
},
],
description: '单个凭证文件大小不能超过 200K',
},
},
},
},
};
\ No newline at end of file
......@@ -79,7 +79,7 @@ const BillInfo: React.FC<BillInfoProps> = ({
>
<Descriptions column={1}>
<Descriptions.Item label="交易流水号">
<Row justify="space-between">
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={12}>
<a onClick={() => handleCheckVoucher(trade.payProveList)}>{trade.tradeCode}</a>
</Col>
......@@ -94,7 +94,7 @@ const BillInfo: React.FC<BillInfoProps> = ({
</Row>
</Descriptions.Item>
<Descriptions.Item label="交易项目">
<Row justify="space-between">
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={12}>
{BILL_TRADE_OPERATION[trade.operation]}
</Col>
......
......@@ -240,7 +240,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
<TradeWrap.TradeItem key={item.tradeCode}>
<Descriptions column={1}>
<Descriptions.Item label="交易流水号">
<Row justify="space-between">
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={10}>
<a onClick={() => this.handleCheckVoucher(item.payProveList)}>{item.tradeCode}</a>
</Col>
......@@ -255,7 +255,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
</Row>
</Descriptions.Item>
<Descriptions.Item label="交易项目">
<Row justify="space-between">
<Row justify="space-between" style={{ width: '100%' }}>
<Col span={12}>
{item.operationName}
</Col>
......
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