交易明细添加订单金额 & 长效套餐表格滚动问题
This commit is contained in:
@@ -209,7 +209,7 @@ export default function ResourcesPage() {
|
|||||||
>
|
>
|
||||||
<ResourceList resourceType="short" />
|
<ResourceList resourceType="short" />
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="long" className="flex flex-col gap-4">
|
<TabsContent value="long" className="flex flex-col gap-4 overflow-hidden">
|
||||||
<ResourceList resourceType="long" />
|
<ResourceList resourceType="long" />
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
@@ -268,7 +268,6 @@ function ResourceList({ resourceType }: ResourceListProps) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const table = useDataTable<Resources>(fetchResources)
|
const table = useDataTable<Resources>(fetchResources)
|
||||||
console.log(table, "table")
|
|
||||||
|
|
||||||
const handleStatusChange = useCallback(
|
const handleStatusChange = useCallback(
|
||||||
async (resource: Resources, newStatusValue: string) => {
|
async (resource: Resources, newStatusValue: string) => {
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default function TradePage() {
|
|||||||
setFilters(result)
|
setFilters(result)
|
||||||
table.pagination.onPageChange(1)
|
table.pagination.onPageChange(1)
|
||||||
})
|
})
|
||||||
console.log(...table.data.map(i => i.remark), "tabletabletabletable")
|
// console.log(...table.data.map(i => i.remark), "tabletabletabletable")
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
@@ -308,6 +308,22 @@ export default function TradePage() {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
},{
|
||||||
|
header:"订单金额",
|
||||||
|
accessorKey:"amount",
|
||||||
|
cell: ({ row }) => {
|
||||||
|
const amount =
|
||||||
|
typeof row.original.amount === "string"
|
||||||
|
? parseFloat(row.original.amount)
|
||||||
|
: row.original.amount || 0
|
||||||
|
return (
|
||||||
|
<div className="flex gap-1">
|
||||||
|
<span>
|
||||||
|
¥{amount.toFixed(2)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: "支付状态",
|
header: "支付状态",
|
||||||
@@ -418,7 +434,6 @@ function CheckOrder(props: { trade: Trade }) {
|
|||||||
method: Number(props.trade.method),
|
method: Number(props.trade.method),
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(res, "res")
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
setData(res.data)
|
setData(res.data)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -16,4 +16,5 @@ export type Trade = {
|
|||||||
updated_at: Date
|
updated_at: Date
|
||||||
user?: User
|
user?: User
|
||||||
remark: string
|
remark: string
|
||||||
|
amount:string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user