金额使用整数, 不再扣押金, 价格每个人看到自己的-1
This commit is contained in:
@@ -48,6 +48,10 @@ function orderRole(order: Order) {
|
||||
if (order.owner_id === session.userId) return '号主'
|
||||
return '-'
|
||||
}
|
||||
|
||||
function money(value: unknown) {
|
||||
return Math.round(Number(value || 0))
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -61,8 +65,12 @@ function orderRole(order: Order) {
|
||||
<el-table v-loading="loading" class="table-panel" :data="orders">
|
||||
<el-table-column prop="order_no" label="订单号" min-width="210" />
|
||||
<el-table-column prop="title" label="账号" min-width="180" />
|
||||
<el-table-column prop="rent_amount" label="订单金额" width="100" />
|
||||
<el-table-column prop="deposit_amount" label="押金" width="100" />
|
||||
<el-table-column label="我的金额" width="100">
|
||||
<template #default="{ row }">¥{{ money(row.display_amount) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="押金" width="100">
|
||||
<template #default="{ row }">¥{{ money(row.deposit_amount) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份" width="80">
|
||||
<template #default="{ row }">{{ orderRole(row) }}</template>
|
||||
</el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user