结算逻辑修改完成,起付额判定待处理
This commit is contained in:
@@ -10,7 +10,23 @@
|
||||
<el-table-column prop="payCoin" label="币种" min-width="100" />
|
||||
<el-table-column prop="address" label="收款地址" min-width="240" />
|
||||
<el-table-column prop="leaseTime" label="租赁天数" min-width="100" />
|
||||
<el-table-column prop="price" label="售价(USDT)" min-width="240" />
|
||||
<el-table-column prop="price" label="售价(USDT)" min-width="240">
|
||||
<template #default="scope">
|
||||
<span class="value strong">
|
||||
<el-tooltip
|
||||
v-if="formatAmount(scope.row.price, scope.row.payCoin || 'USDT').truncated"
|
||||
:content="formatAmount(scope.row.price, scope.row.payCoin || 'USDT').full"
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
{{ formatAmount(scope.row.price, scope.row.payCoin || 'USDT').text }}
|
||||
<i class="el-icon-more amount-more"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatAmount(scope.row.price, scope.row.payCoin || 'USDT').text }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -26,7 +42,21 @@
|
||||
<template #default="scope">{{ Array.isArray(scope.row && scope.row.orderItemDtoList) ? scope.row.orderItemDtoList.length : 0 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额(USDT)" min-width="140">
|
||||
<template #default="scope"><span class="value strong">{{ (scope.row && scope.row.totalPrice) != null ? scope.row.totalPrice : '—' }}</span></template>
|
||||
<template #default="scope">
|
||||
<span class="value strong">
|
||||
<el-tooltip
|
||||
v-if="formatAmount(scope.row && scope.row.totalPrice, 'USDT').truncated"
|
||||
:content="formatAmount(scope.row && scope.row.totalPrice, 'USDT').full"
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
{{ formatAmount(scope.row && scope.row.totalPrice, 'USDT').text }}
|
||||
<i class="el-icon-more amount-more"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatAmount(scope.row && scope.row.totalPrice, 'USDT').text }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="180">
|
||||
<template #header>
|
||||
@@ -43,11 +73,37 @@
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<span class="value strong">{{ (scope.row && scope.row.payAmount) != null ? scope.row.payAmount : '—' }}</span>
|
||||
<span class="value strong">
|
||||
<el-tooltip
|
||||
v-if="formatAmount(scope.row && scope.row.payAmount, 'USDT').truncated"
|
||||
:content="formatAmount(scope.row && scope.row.payAmount, 'USDT').full"
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
{{ formatAmount(scope.row && scope.row.payAmount, 'USDT').text }}
|
||||
<i class="el-icon-more amount-more"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatAmount(scope.row && scope.row.payAmount, 'USDT').text }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待支付金额(USDT)" min-width="140">
|
||||
<template #default="scope"><span class="value strong">{{ (scope.row && scope.row.noPayAmount) != null ? scope.row.noPayAmount : '—' }}</span></template>
|
||||
<template #default="scope">
|
||||
<span class="value strong">
|
||||
<el-tooltip
|
||||
v-if="formatAmount(scope.row && scope.row.noPayAmount, 'USDT').truncated"
|
||||
:content="formatAmount(scope.row && scope.row.noPayAmount, 'USDT').full"
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
{{ formatAmount(scope.row && scope.row.noPayAmount, 'USDT').text }}
|
||||
<i class="el-icon-more amount-more"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatAmount(scope.row && scope.row.noPayAmount, 'USDT').text }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="280" fixed="right">
|
||||
<template #default="scope">
|
||||
@@ -79,7 +135,21 @@
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" width="520px" title="请扫码支付">
|
||||
<div style="text-align:left; margin-bottom:12px; color:#666;">
|
||||
<div style="margin-bottom:6px;">总金额(USDT):<b>{{ paymentDialog.totalPrice }}</b></div>
|
||||
<div style="margin-bottom:6px;">总金额(USDT):
|
||||
<b>
|
||||
<el-tooltip
|
||||
v-if="formatAmount(paymentDialog.totalPrice, 'USDT').truncated"
|
||||
:content="formatAmount(paymentDialog.totalPrice, 'USDT').full"
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
{{ formatAmount(paymentDialog.totalPrice, 'USDT').text }}
|
||||
<i class="el-icon-more amount-more"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatAmount(paymentDialog.totalPrice, 'USDT').text }}</span>
|
||||
</b>
|
||||
</div>
|
||||
<div style="margin-bottom:6px;display:flex;align-items:center;gap:6px;">
|
||||
<el-tooltip placement="top" effect="dark">
|
||||
<div slot="content">
|
||||
@@ -90,9 +160,35 @@
|
||||
<i class="el-icon-question" style="color:#909399;" aria-label="说明" role="img"></i>
|
||||
</el-tooltip>
|
||||
<span>已支付金额(USDT):</span>
|
||||
<b class="value strong">{{ paymentDialog.payAmount }}</b>
|
||||
<b class="value strong">
|
||||
<el-tooltip
|
||||
v-if="formatAmount(paymentDialog.payAmount, 'USDT').truncated"
|
||||
:content="formatAmount(paymentDialog.payAmount, 'USDT').full"
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
{{ formatAmount(paymentDialog.payAmount, 'USDT').text }}
|
||||
<i class="el-icon-more amount-more"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatAmount(paymentDialog.payAmount, 'USDT').text }}</span>
|
||||
</b>
|
||||
</div>
|
||||
<div style="margin-bottom:6px;">待支付金额(USDT):
|
||||
<b class="value strong">
|
||||
<el-tooltip
|
||||
v-if="formatAmount(paymentDialog.noPayAmount, 'USDT').truncated"
|
||||
:content="formatAmount(paymentDialog.noPayAmount, 'USDT').full"
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
{{ formatAmount(paymentDialog.noPayAmount, 'USDT').text }}
|
||||
<i class="el-icon-more amount-more"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ formatAmount(paymentDialog.noPayAmount, 'USDT').text }}</span>
|
||||
</b>
|
||||
</div>
|
||||
<div style="margin-bottom:6px;">待支付金额(USDT):<b class="value strong">{{ paymentDialog.noPayAmount }}</b></div>
|
||||
<!-- <div style="word-break:break-all;">收款地址:<code>{{ orderDialog.address }}</code></div> -->
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
@@ -111,6 +207,7 @@
|
||||
|
||||
<script>
|
||||
import { addOrders } from '../../api/order'
|
||||
import { truncateAmountByCoin } from '../../utils/amount'
|
||||
export default {
|
||||
name: 'OrderList',
|
||||
props: {
|
||||
@@ -133,6 +230,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatAmount(value, coin) {
|
||||
return truncateAmountByCoin(value, coin)
|
||||
},
|
||||
buildQrSrc(img) {
|
||||
if (!img) return ''
|
||||
try { const s = String(img).trim(); return s.startsWith('data:') ? s : `data:image/png;base64,${s}` } catch (e) { return '' }
|
||||
@@ -244,6 +344,7 @@ export default {
|
||||
.empty { color: #888; padding: 24px; text-align: center; }
|
||||
.value.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; word-break: break-all; }
|
||||
.value.strong { font-weight: 700; color: #e74c3c; }
|
||||
.amount-more { font-size: 12px; color: #94a3b8; margin-left: 4px; }
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user