增加前端格式检查配置
This commit is contained in:
@@ -19,10 +19,14 @@ const filters = reactive({
|
||||
})
|
||||
|
||||
const inAmount = computed(() =>
|
||||
ledger.value.filter((item) => item.direction === 'in').reduce((sum, item) => sum + Number(item.amount || 0), 0),
|
||||
ledger.value
|
||||
.filter(item => item.direction === 'in')
|
||||
.reduce((sum, item) => sum + Number(item.amount || 0), 0)
|
||||
)
|
||||
const outAmount = computed(() =>
|
||||
ledger.value.filter((item) => item.direction === 'out').reduce((sum, item) => sum + Number(item.amount || 0), 0),
|
||||
ledger.value
|
||||
.filter(item => item.direction === 'out')
|
||||
.reduce((sum, item) => sum + Number(item.amount || 0), 0)
|
||||
)
|
||||
|
||||
onMounted(loadLedger)
|
||||
@@ -89,7 +93,9 @@ function directionLabel(direction: string) {
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
<el-button @click="resetFilters">重置</el-button>
|
||||
<el-button type="primary" :icon="Search" :loading="loading" @click="loadLedger">查询</el-button>
|
||||
<el-button type="primary" :icon="Search" :loading="loading" @click="loadLedger"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -134,7 +140,9 @@ function directionLabel(direction: string) {
|
||||
</el-table-column>
|
||||
<el-table-column label="订单" min-width="160">
|
||||
<template #default="{ row }">
|
||||
<RouterLink v-if="row.order_id" :to="`/admin/orders/${row.order_id}`">{{ row.order_no || row.order_id }}</RouterLink>
|
||||
<RouterLink v-if="row.order_id" :to="`/admin/orders/${row.order_id}`">{{
|
||||
row.order_no || row.order_id
|
||||
}}</RouterLink>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user