Commit 08b94e0e authored by XieZhiXiong's avatar XieZhiXiong

fix: 添加数据为空的展示

parent 3fd6b643
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
Modal, Modal,
Spin, Spin,
message, message,
Empty,
} from 'antd'; } from 'antd';
import { createFormActions, FormEffectHooks } from '@formily/antd'; import { createFormActions, FormEffectHooks } from '@formily/antd';
import lodash from 'lodash'; import lodash from 'lodash';
...@@ -503,68 +504,73 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState> ...@@ -503,68 +504,73 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
<Spin spinning={billInfoLoading}> <Spin spinning={billInfoLoading}>
{!visibleRecord ? ( {!visibleRecord ? (
<> <>
<Row {!billInfoLoading && billInfo && (<>
gutter={100} <Row
align="middle" gutter={100}
style={{ align="middle"
marginBottom: 24, style={{
}} marginBottom: 24,
> }}
<Col span={14}> >
<div className={styles.repayment}> <Col span={14}>
<div className={styles['repayment-left']}> <div className={styles.repayment}>
<div className={styles.statistic}> <div className={styles['repayment-left']}>
<div className={styles['statistic-title']}>剩余应还(元):</div> <div className={styles.statistic}>
<div className={styles['statistic-amount']}>{billInfo?.residueRepayQuota}</div> <div className={styles['statistic-title']}>剩余应还(元):</div>
<div className={styles['statistic-amount']}>{billInfo?.residueRepayQuota}</div>
</div>
<div className={styles['repayment-end']}>
<span className={styles['repayment-time']}>
{billInfo?.expireTime} 到期
</span>
<StatusTag
type="danger"
title={
billInfo && billInfo.expireDay !== undefined ?
billInfo.expireDay > 0 ? `${billInfo.expireDay}天后` : `逾期 ${billInfo.expireDay} 天` :
''
}
/>
</div>
</div> </div>
<div className={styles['repayment-end']}> <div className={styles['repayment-right']}>
<span className={styles['repayment-time']}> <Button type="primary" onClick={() => this.handleRepayment(true)}>立即还款</Button>
{billInfo?.expireTime} 到期
</span>
<StatusTag
type="danger"
title={
billInfo && billInfo.expireDay !== undefined ?
billInfo.expireDay > 0 ? `${billInfo.expireDay}天后` : `逾期 ${billInfo.expireDay} 天` :
''
}
/>
</div> </div>
</div> </div>
<div className={styles['repayment-right']}>
<Button type="primary" onClick={() => this.handleRepayment(true)}>立即还款</Button>
</div>
</div>
</Col>
<Col span={10}>
<div className={styles.statistic}>
<div className={styles['statistic-title']}>本期账单(元):</div>
<div className={styles['statistic-amount']}>{billInfo?.billQuota}</div>
</div>
</Col>
</Row>
<div className={styles.foot}>
<Row>
<Col span={8}>
<div className={styles.badgeWrap}>
<Badge color="#EF6260" text={(<span className={styles['badgeWrap-title']}>最后还款日期:</span>)} />
<span className={styles['badgeWrap-content']}>{billInfo?.lastRepayDate}</span>
</div>
</Col>
<Col span={8}>
<div className={styles.badgeWrap}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>还款周期:</span>)} />
<span className={styles['badgeWrap-content']}>{billInfo?.repayPeriod}</span>
</div>
</Col> </Col>
<Col span={8}> <Col span={10}>
<div className={styles.badgeWrap}> <div className={styles.statistic}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>账单日期:</span>)} /> <div className={styles['statistic-title']}>本期账单(元):</div>
<span className={styles['badgeWrap-content']}>{billInfo?.billDay}</span> <div className={styles['statistic-amount']}>{billInfo?.billQuota}</div>
</div> </div>
</Col> </Col>
</Row> </Row>
</div> <div className={styles.foot}>
<Row>
<Col span={8}>
<div className={styles.badgeWrap}>
<Badge color="#EF6260" text={(<span className={styles['badgeWrap-title']}>最后还款日期:</span>)} />
<span className={styles['badgeWrap-content']}>{billInfo?.lastRepayDate}</span>
</div>
</Col>
<Col span={8}>
<div className={styles.badgeWrap}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>还款周期:</span>)} />
<span className={styles['badgeWrap-content']}>{billInfo?.repayPeriod}</span>
</div>
</Col>
<Col span={8}>
<div className={styles.badgeWrap}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>账单日期:</span>)} />
<span className={styles['badgeWrap-content']}>{billInfo?.billDay}</span>
</div>
</Col>
</Row>
</div>
</>)}
{!billInfoLoading && !billInfo && (
<Empty style={{ marginTop: 80 }} />
)}
</> </>
) : ( ) : (
<TradeRecord fetchRecordList={this.getRecordList} ref={node => this.tradeRecordRef = node} /> <TradeRecord fetchRecordList={this.getRecordList} ref={node => this.tradeRecordRef = node} />
......
...@@ -116,8 +116,6 @@ const RefundModal: React.FC<RefundModalProps> = (props) => { ...@@ -116,8 +116,6 @@ const RefundModal: React.FC<RefundModalProps> = (props) => {
}); });
createEffects($, actions); createEffects($, actions);
console.log('123')
useAsyncSelect('tradeChannel', getPayChannels, ['label', 'value']); useAsyncSelect('tradeChannel', getPayChannels, ['label', 'value']);
}} }}
expressionScope={{ expressionScope={{
......
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