样式和代码结构调整
This commit is contained in:
@@ -90,16 +90,6 @@ export default function BillsPage(props: BillsPageProps) {
|
||||
</div>
|
||||
|
||||
<Form form={form} onSubmit={onSubmit} className="flex items-end gap-4 flex-wrap">
|
||||
{/* <FormField name="trade_id" label={<span className="text-sm">订单号</span>}>
|
||||
{({id, field}) => (
|
||||
<Input
|
||||
{...field}
|
||||
id={id}
|
||||
className="h-9 text-sm"
|
||||
placeholder="输入订单号"
|
||||
/>
|
||||
)}
|
||||
</FormField> */}
|
||||
<FormField name="type" label={<span className="text-sm">账单类型</span>}>
|
||||
{({id, field}) => (
|
||||
<Select value={field.value} onValueChange={field.onChange}>
|
||||
@@ -178,7 +168,7 @@ export default function BillsPage(props: BillsPageProps) {
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
{/* 类型展示 */}
|
||||
<div className="flex-shrink-0">
|
||||
<div className="shrink-0">
|
||||
{bill.type === 1 && (
|
||||
<div className="flex gap-2 items-center bg-orange-50 w-fit px-2 py-1 rounded-md">
|
||||
<CreditCard size={16}/>
|
||||
@@ -248,21 +238,13 @@ export default function BillsPage(props: BillsPageProps) {
|
||||
}
|
||||
const paymentMethod = trade ? paymentMethodMap[trade.method as keyof typeof paymentMethodMap] || '余额' : '余额'
|
||||
return (
|
||||
<div className="flex flex-col gap-1">
|
||||
<div className="flex gap-1">
|
||||
<span className="text-sm">
|
||||
{paymentMethod}
|
||||
</span>
|
||||
<span className={amount > 0 ? 'text-green-400' : 'text-orange-400'}>
|
||||
¥
|
||||
{amount.toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
{trade?.inner_no && (
|
||||
<div className="text-xs text-gray-500">
|
||||
订单号: {trade.inner_no}
|
||||
</div>
|
||||
)}
|
||||
<div className="flex gap-1">
|
||||
<span className="text-sm">
|
||||
{paymentMethod}
|
||||
</span>
|
||||
<span className={amount > 0 ? 'text-green-500' : 'text-orange-500'}>
|
||||
¥{amount.toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user