Compare commits
No commits in common. "efeb21fc7944c5a999f8bf581931a4e7d0ba3d44" and "f50cc00d84c17fc406982b34a9bf3105cab7b41e" have entirely different histories.
efeb21fc79
...
f50cc00d84
@ -3,7 +3,6 @@ import {ColumnProps} from "@douyinfe/semi-ui/lib/es/table";
|
|||||||
import React, {useMemo, useState} from "react";
|
import React, {useMemo, useState} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import {IconCheckCircleStroked} from "@douyinfe/semi-icons";
|
|
||||||
|
|
||||||
import MoneyFormat from "@/components/money-format.tsx";
|
import MoneyFormat from "@/components/money-format.tsx";
|
||||||
import {Card} from "@/components/card";
|
import {Card} from "@/components/card";
|
||||||
@ -21,15 +20,6 @@ type BillListProps = {
|
|||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
beforeTotalAmount?: React.ReactNode;
|
beforeTotalAmount?: React.ReactNode;
|
||||||
}
|
}
|
||||||
const CheckNumberCorrect = ({origin,confirmed}:{origin: string,confirmed?:string}) => {
|
|
||||||
if(origin == confirmed && origin){
|
|
||||||
return (<Space style={{marginTop:2,color:'green'}}><span>{origin}</span><IconCheckCircleStroked /></Space>)
|
|
||||||
}
|
|
||||||
return <div style={{lineHeight:1}}>
|
|
||||||
<div style={confirmed?{color:'red'}:{}}>{origin?.length ?origin: 'N/A'}</div>
|
|
||||||
{confirmed&&<Space style={{marginTop:2,color:'green'}}><span>{confirmed}</span><IconCheckCircleStroked /></Space>}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
export const BillList: React.FC<BillListProps> = (props) => {
|
export const BillList: React.FC<BillListProps> = (props) => {
|
||||||
const {t, i18n} = useTranslation()
|
const {t, i18n} = useTranslation()
|
||||||
@ -79,13 +69,12 @@ export const BillList: React.FC<BillListProps> = (props) => {
|
|||||||
title: t('base.student_number'),
|
title: t('base.student_number'),
|
||||||
dataIndex: 'student_number',
|
dataIndex: 'student_number',
|
||||||
width: 150,
|
width: 150,
|
||||||
render: (value,record) => (<CheckNumberCorrect origin={value} confirmed={record.student_number_confirm || 'test-confirm'} />)
|
render: (value) => value?.length ?value: 'N/A'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('base.bill_number'),
|
title: t('base.bill_number'),
|
||||||
dataIndex: 'application_number',
|
dataIndex: 'application_number',
|
||||||
width: 150,
|
width: 150,
|
||||||
render: (value,record) => (<CheckNumberCorrect origin={value} confirmed={value||record.application_number_confirm} />)
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('bill.title_initiated_paid_at'),
|
title: t('bill.title_initiated_paid_at'),
|
||||||
@ -150,7 +139,7 @@ export const BillList: React.FC<BillListProps> = (props) => {
|
|||||||
dataIndex: 'detail',
|
dataIndex: 'detail',
|
||||||
ellipsis: {showTitle: true},
|
ellipsis: {showTitle: true},
|
||||||
width: 220,
|
width: 220,
|
||||||
render: (_, record) => (<div style={{fontSize: 13, lineHeight: 1.2,wordBreak:'break-all',maxWidth:'100%',whiteSpace:'normal'}}>
|
render: (_, record) => (<div style={{fontSize: 13, lineHeight: 1.2}}>
|
||||||
{record.details.map((it, idx) => (<div key={idx}>{it.bill_type}: <MoneyFormat money={it.amount}/></div>))}
|
{record.details.map((it, idx) => (<div key={idx}>{it.bill_type}: <MoneyFormat money={it.amount}/></div>))}
|
||||||
</div>),
|
</div>),
|
||||||
},
|
},
|
||||||
@ -159,7 +148,7 @@ export const BillList: React.FC<BillListProps> = (props) => {
|
|||||||
dataIndex: '_detail',
|
dataIndex: '_detail',
|
||||||
ellipsis: {showTitle: true},
|
ellipsis: {showTitle: true},
|
||||||
width: 220,
|
width: 220,
|
||||||
render: (_, record) => (<div style={{fontSize: 13, lineHeight: 1.2,wordBreak:'break-all',maxWidth:'100%',whiteSpace:'normal'}}>
|
render: (_, record) => (<div style={{fontSize: 13, lineHeight: 1.2}}>
|
||||||
{record.details.filter(s=>s.confirm_status == 'CONFIRMED').map((it) => (<div key={it.id}>{it.confirm_type}: <MoneyFormat money={it.amount}/></div>))}
|
{record.details.filter(s=>s.confirm_status == 'CONFIRMED').map((it) => (<div key={it.id}>{it.confirm_type}: <MoneyFormat money={it.amount}/></div>))}
|
||||||
</div>),
|
</div>),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user