修改产品价格显示

This commit is contained in:
wuweihua
2026-09-09 17:06:50 +08:00
parent fddd8f0586
commit e265656060
30 changed files with 771 additions and 194 deletions
+19 -4
View File
@@ -95,7 +95,9 @@
<el-descriptions-item label="套餐编号">{{ result.priceSetCode || '-' }}</el-descriptions-item>
<el-descriptions-item label="套餐名称">{{ result.priceSetName || '-' }}</el-descriptions-item>
<el-descriptions-item label="套餐类型">{{ result.setType || '-' }}</el-descriptions-item>
<el-descriptions-item label="币种">{{ result.currency || 'RMB' }}</el-descriptions-item>
<el-descriptions-item label="币种">
<dict-tag :options="bms_currency" :value="displayCurrency(result.currency)" />
</el-descriptions-item>
<el-descriptions-item label="运费单价">{{ formatMoney(result.freightRate) }}</el-descriptions-item>
<el-descriptions-item label="折扣前单价">{{ formatMoney(result.baseFreightRate) }}</el-descriptions-item>
<el-descriptions-item label="折扣%">{{ result.discountPercent != null ? result.discountPercent : '-' }}</el-descriptions-item>
@@ -130,7 +132,11 @@
<span>{{ formatMoney(row.amount) }}</span>
</template>
</el-table-column>
<el-table-column label="币种" width="80" align="center" prop="currency" />
<el-table-column label="币种" width="90" align="center">
<template #default="{ row }">
<dict-tag :options="bms_currency" :value="displayCurrency(row.currency)" />
</template>
</el-table-column>
<el-table-column label="取值方式" width="110" align="center">
<template #default="{ row }">{{ roundModeLabel(row.roundMode) }}</template>
</el-table-column>
@@ -209,7 +215,11 @@
<el-table-column label="金额" min-width="120" align="right">
<template #default="{ row }">{{ formatMoney(row.amount) }}</template>
</el-table-column>
<el-table-column label="币种" width="80" align="center" prop="currency" />
<el-table-column label="币种" width="90" align="center">
<template #default="{ row }">
<dict-tag :options="bms_currency" :value="displayCurrency(row.currency)" />
</template>
</el-table-column>
<el-table-column label="说明" min-width="160" show-overflow-tooltip>
<template #default="{ row }">{{ row.remark || '-' }}</template>
</el-table-column>
@@ -225,7 +235,7 @@ import { quoteBilling, listQuote, getQuote } from '@/api/price/billing'
import { listProduct, listProductCountries } from '@/api/price/product'
const { proxy } = getCurrentInstance()
const { bms_fee_type } = useDict('bms_fee_type')
const { bms_fee_type, bms_currency } = useDict('bms_fee_type', 'bms_currency')
const formRef = ref()
const historyTableRef = ref()
const loading = ref(false)
@@ -411,6 +421,11 @@ function feeTypeLabel(type) {
return found ? found.label : ''
}
function displayCurrency(v) {
if (!v || v === 'RMB' || v === 'rmb') return 'CNY'
return v
}
function displayFeeName(row) {
const typeLabel = feeTypeLabel(row.feeType)
const name = String(row.feeName || row.fee_name || '').trim()