diff --git a/src/assets/index.less b/src/assets/index.less
index eb18a57..0470733 100644
--- a/src/assets/index.less
+++ b/src/assets/index.less
@@ -130,6 +130,9 @@ body #root{
}
}
}
+.text-nowrap{
+ white-space: nowrap;
+}
// input
.semi-input-wrapper, .semi-select,.semi-datepicker-range-input,.semi-input-textarea-wrapper {
diff --git a/src/components/bill/bill-detail-items.tsx b/src/components/bill/bill-detail-items.tsx
index e9e2a49..d710f13 100644
--- a/src/components/bill/bill-detail-items.tsx
+++ b/src/components/bill/bill-detail-items.tsx
@@ -1,25 +1,29 @@
import React, {useMemo} from "react";
import {useTranslation} from "react-i18next";
-import {IconBillType, IconMoney, IconStudentEmail, IconStudentId} from "@/components/icons";
+import {IconBillType, IconMoney, IconStudentEmail, IconStudentId, IconStudentName} from "@/components/icons";
import MoneyFormat from "@/components/money-format.tsx";
import './bill.less'
-const BillDetailItem = (item: { title: React.ReactNode; value: React.ReactNode, icon?: React.ReactNode }) => {
+export const BillDetailItem = (item: { title: React.ReactNode; value: React.ReactNode, icon?: React.ReactNode }) => {
return
{item.icon} {item.title} :
{item.value}
}
-const BillDetailItems = (prop: { bill: BillModel }) => {
+type BillDetailItemsProps = {
+ bill: BillModel;
+ studentNumberRender?: React.ReactNode;
+}
+const BillDetailItems = (prop: BillDetailItemsProps) => {
const {t} = useTranslation();
const billType = useMemo(()=>{
return prop.bill.details[0].bill_type
},[prop.bill])
return (<>
} title={t('manual.bill_type')} value={billType}/>
- } title={t('manual.student_number')} value={prop.bill.student_number || prop.bill.application_number}/>
- } title={t('bill.title_student_name')}
+ {prop.studentNumberRender?prop.studentNumberRender:} title={t('manual.student_number')} value={prop.bill.student_number || prop.bill.application_number || '-'}/>}
+ } title={t('bill.title_student_name')}
value={`${prop.bill.student_english_name||'-'}${prop.bill.student_chinese_name?' / '+ prop.bill.student_chinese_name : ''}`}/>
} title={'Email'} value={prop.bill.student_email||'-'}/>
} title={t('manual.amount')} value={}/>
diff --git a/src/components/bill/list.tsx b/src/components/bill/list.tsx
index 700cc20..5d9bcbe 100644
--- a/src/components/bill/list.tsx
+++ b/src/components/bill/list.tsx
@@ -32,7 +32,10 @@ export const BillList: React.FC = (props) => {
return t('bill.pay_status_pending')
case 'PAID':
return t('bill.pay_status_paid')
+ case 'EXPIRED':
+ return t('bill.pay_status_expired')
case 'CANCELED':
+ case 'CANCELLED':
return t('bill.pay_status_canceled')
default:
return billStatus
@@ -56,6 +59,12 @@ export const BillList: React.FC = (props) => {
dataIndex: 'id',
width: 120,
},
+ {
+ title: 'Merchant Ref',
+ dataIndex: 'merchant_ref',
+ width: 200,
+ // render: (_) => (),
+ },
{
title: t('base.student_number'),
dataIndex: 'student_number',
@@ -68,33 +77,33 @@ export const BillList: React.FC = (props) => {
width: 150,
},
{
- title: '开始支付时间',
+ title: t('bill.title_initiated_paid_at'),
dataIndex: 'initiated_paid_at',
- width: 150,
+ width: 180,
render: (value) => value?.length ?value: 'N/A'
},
{
- title: '到账时间',
+ title: t('bill.title_delivered_at'),
dataIndex: 'delivered_at',
- width: 150,
+ width: 180,
render: (value) => value?.length ?value: 'N/A'
},
{
title: t('bill.title_paid_at'),
dataIndex: 'paid_at',
- width: 150,
+ width: 180,
render: (value) => value?.length ?value: 'N/A'
},
{
title: t('bill.title_create_at'),
dataIndex: 'create_at',
- width: 150,
+ width: 180,
render: (value) => value?.length ?value: 'N/A'
},
{
title: t('bill.title_student_name'),
dataIndex: 'student_english_name',
- width: 150,
+ width: 180,
render: (_, record) => ({record.student_english_name}
{record.student_chinese_name}
)
},
{
@@ -118,7 +127,7 @@ export const BillList: React.FC = (props) => {
title: t('bill.title_year'),
dataIndex: 'intake_year',
width: 120,
- render: (_, record) => ({record.intake_year}/{String(record.intake_semester).length == 1 ? '0':''}{record.intake_semester}
)
+ render: (_, record) => record.intake_year?({record.intake_year}/{String(record.intake_semester).length == 1 ? '0':''}{record.intake_semester}
):"N/A"
},
// {
// title: t('bill.title_semester'),
@@ -187,12 +196,6 @@ export const BillList: React.FC = (props) => {
):'N/A'),
},
- {
- title: 'Merchant Ref',
- dataIndex: 'merchant_ref',
- width: 250,
- // render: (_) => (),
- },
{
title: t('bill.title_bill_status'),
dataIndex: 'status',
diff --git a/src/components/bill/search-form.tsx b/src/components/bill/search-form.tsx
index e544b6d..9f7368f 100644
--- a/src/components/bill/search-form.tsx
+++ b/src/components/bill/search-form.tsx
@@ -4,6 +4,7 @@ import dayjs from "dayjs";
import {useTranslation} from "react-i18next";
import {Card} from "@/components/card";
import {BillQueryParams} from "@/service/api/bill.ts";
+import {BillTypes} from "@/service/bill-types.ts";
type SearchFormProps = {
onSearch?: (params: BillQueryParams) => void;
@@ -20,6 +21,7 @@ type SearchFormFields = {
application_number?: string;
bill_number?: string;
payment_channel?: string;
+ confirm_status?: ConfirmStatus;
bill_status?: string;
apply_status?: string;
sort_by?: string;
@@ -35,9 +37,6 @@ const SearchForm: React.FC = (props) => {
if (value.id) {
params.id = value.id;
}
- if (value.merchant_ref) {
- params.merchant_ref = value.merchant_ref;
- }
if (value.student_number) {
params.student_number = value.student_number;
}
@@ -48,6 +47,10 @@ const SearchForm: React.FC = (props) => {
if (value.apply_status) {
params.apply_status = value.apply_status;
}
+ // 确认状态
+ if (value.confirm_status) {
+ params.confirm_status = value.confirm_status;
+ }
// 账单状态
if (value.bill_status) {
params.status = value.bill_status;
@@ -91,17 +94,19 @@ const SearchForm: React.FC = (props) => {