Commit 67d5b884 authored by XieZhiXiong's avatar XieZhiXiong

fixbug

parent b6a05dc7
......@@ -11,6 +11,7 @@ import {
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import lodash from 'lodash';
import { PublicApi } from '@/services/api';
import { GetPayCreditApplyGetApplyDetailResponse } from '@/services/PayApi';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants';
......@@ -201,7 +202,9 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
fileList: quotaValues.fileList,
}}
verify={
quotaInfo && quotaInfo.verify ? {
quotaInfo &&
quotaInfo.verify &&
lodash.isNumber(quotaInfo.verify.quota) ? {
quota: quotaInfo?.verify?.quota,
billDay: quotaInfo?.verify?.billDay,
repayPeriod: quotaInfo?.verify?.repayPeriod,
......
......@@ -26,4 +26,9 @@ export const useBusinessEffects = (context, actions) => {
onFieldInputChange$('applyQuota').subscribe(fieldState => {
linkage.value('quotaSlide', +fieldState.value);
});
// 滑块条 联动 还款金额
onFieldInputChange$('quotaSlide').subscribe(fieldState => {
linkage.value('applyQuota', `${fieldState.value}`);
});
}
\ No newline at end of file
......@@ -140,6 +140,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
<Button
type="link"
icon={<FormOutlined />}
disabled={!quotaInfo || !quotaInfo.applyQuota}
onClick={() => setModalVisible(true)}
>
编辑
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:51:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-27 09:52:57
* @LastEditTime: 2020-11-04 10:02:55
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -41,7 +41,6 @@ export const editModalSchema: ISchema = {
quotaSlide: {
type: 'number',
title: '',
editable: false,
'x-component': 'range',
'x-component-props': {
min: 0,
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-10-22 17:31:08
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-22 17:33:08
* @LastEditTime: 2020-11-04 09:56:33
* @Description: 联动逻辑相关
*/
import { FormEffectHooks, FormPath } from '@formily/antd';
......@@ -27,4 +27,9 @@ export const useBusinessEffects = (context, actions) => {
onFieldInputChange$('repayQuota').subscribe(fieldState => {
linkage.value('amountSlide', +fieldState.value);
});
// 滑块条 联动 还款金额
onFieldInputChange$('amountSlide').subscribe(fieldState => {
linkage.value('repayQuota', `${fieldState.value}`);
});
}
\ No newline at end of file
......@@ -32,9 +32,8 @@ export const repaymentModalSchema: ISchema = {
'x-component': 'range',
'x-component-props': {
min: 0,
max: 20000,
// max: 20000,
},
editable: false,
},
tradeType: {
type: 'number',
......
......@@ -137,9 +137,12 @@ const QuotaMenage: React.FC = () => {
<>
{/* 现有额度为 0,并且授信状态为 未申请 或 到达了可调额时间(会员支付参数配置的时间) */}
{
((
record.quota === 0 && record.status === CREDIT_STATUS_NOT_APPLIED) ||
record.isCanApply
(
(
record.quota === 0 &&
record.status === CREDIT_STATUS_NOT_APPLIED
) ||
!!record.isCanApply
) && (
<Button
type="link"
......
......@@ -173,7 +173,11 @@ const QuotaPrSubmit: React.FC = () => {
</Button>
</Popconfirm>
)}
{record.outerStatus === CREDIT_OUTER_STATUS_FAILED && (
{/* 外部状态为不接受申请 或者 内部状态为 待提交申请 都可以进行编辑 */}
{(
record.outerStatus === CREDIT_OUTER_STATUS_FAILED ||
record.innerStatus === CREDIT_INNER_STATUS_UNCOMMITTED
) && (
<Button
type="link"
onClick={() => handleJumpVerify(record)}
......
......@@ -26,4 +26,9 @@ export const useBusinessEffects = (context, actions) => {
onFieldInputChange$('quota').subscribe(fieldState => {
linkage.value('quotaSlide', +fieldState.value);
});
// 滑块条 联动 还款金额
onFieldInputChange$('quotaSlide').subscribe(fieldState => {
linkage.value('quota', `${fieldState.value}`);
});
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:51:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-28 17:02:02
* @LastEditTime: 2020-11-04 10:01:52
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -36,7 +36,6 @@ export const editModalSchema: ISchema = {
quotaSlide: {
type: 'number',
title: '',
editable: false,
'x-component': 'range',
'x-component-props': {
min: 0,
......
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