修改导入功能

This commit is contained in:
wuweihua
2026-09-23 17:56:45 +08:00
parent f834dd785b
commit 168ad13396
6 changed files with 75 additions and 14 deletions
+22 -1
View File
@@ -37,6 +37,12 @@
<el-descriptions-item v-if="detail.logType === 'CREDIT'" label="金额">
{{ creditAmountLabel(detail) }}
</el-descriptions-item>
<el-descriptions-item v-if="detail.logType === 'ARREARS'" label="清除范围">
{{ arrearsScopeLabel(detail) }}
</el-descriptions-item>
<el-descriptions-item v-if="detail.logType === 'ARREARS'" label="清除金额">
{{ arrearsAmountLabel(detail) }}
</el-descriptions-item>
<el-descriptions-item v-if="detail.errorMessage" label="错误信息" :span="2">
<span class="err-text">{{ detail.errorMessage }}</span>
</el-descriptions-item>
@@ -73,7 +79,8 @@ const drawerTitle = ref('ES日志详情')
const typeOptions = [
{ label: '计费', value: 'BILL' },
{ label: '试算', value: 'QUOTE' },
{ label: '扣减额度', value: 'CREDIT' }
{ label: '扣减额度', value: 'CREDIT' },
{ label: '欠费清除', value: 'ARREARS' }
]
const statusOptions = [
@@ -125,10 +132,24 @@ function creditAmountLabel(detail) {
return String(req.amount) + (req.currency ? (' ' + req.currency) : '')
}
function arrearsScopeLabel(detail) {
const req = parseReq(detail)
const map = { SUMMARY: '客户汇总', ORDER: '单订单' }
return map[req.scope] || req.scope || '-'
}
function arrearsAmountLabel(detail) {
const req = parseReq(detail)
const amount = req.scope === 'ORDER' ? req.batchAmount : req.amount
if (amount == null || amount === '') return '-'
return String(amount) + (req.currency ? (' ' + req.currency) : '')
}
function typeTag(type) {
if (type === 'BILL') return 'success'
if (type === 'QUOTE') return 'warning'
if (type === 'CREDIT') return 'danger'
if (type === 'ARREARS') return 'primary'
return 'info'
}