Commit 08b94e0e authored by XieZhiXiong's avatar XieZhiXiong

fix: 添加数据为空的展示

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