临时额度定时失效
This commit is contained in:
+11
-4
@@ -70,7 +70,10 @@
|
||||
<el-col :xs="12" :sm="8" :md="4">
|
||||
<el-card shadow="hover" class="balance-card">
|
||||
<div class="balance-label">可用额度</div>
|
||||
<div class="balance-value success">{{ availableCredit }}</div>
|
||||
<div class="balance-value" :class="availableOverLimit ? 'danger' : 'success'">{{ availableCredit }}</div>
|
||||
<div class="balance-sub" v-if="availableOverLimit" style="color: var(--el-color-danger);">
|
||||
已超额,回款核销后恢复
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -1006,14 +1009,18 @@ const currentAccount = computed(() => {
|
||||
return accountList.value.find(a => a.currency === 'CNY') || {}
|
||||
})
|
||||
|
||||
/** 可用额度 = 总额度 + 额外额度 - 已用额度 */
|
||||
const availableCredit = computed(() => {
|
||||
/** 可用额度数值 = 总额度 + 临时额度 - 已用额度(可能为负,表示临时额度到期/占用超授信总额) */
|
||||
const availableCreditValue = computed(() => {
|
||||
const a = currentAccount.value
|
||||
const total = Number(a.totalCredit) || 0
|
||||
const extra = Number(a.extraCredit) || 0
|
||||
const used = Number(a.usedCredit) || 0
|
||||
return formatMoney(total + extra - used)
|
||||
return total + extra - used
|
||||
})
|
||||
/** 可用额度展示文本 */
|
||||
const availableCredit = computed(() => formatMoney(availableCreditValue.value))
|
||||
/** 是否处于超额状态(已用额度超过授信总额,新计费开单将被拦截,需先回款核销) */
|
||||
const availableOverLimit = computed(() => availableCreditValue.value < 0)
|
||||
|
||||
/** 临时额度有效期文案 */
|
||||
const tempCreditPeriodText = computed(() => {
|
||||
|
||||
@@ -157,7 +157,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="重量阈值" align="center" prop="weightThreshold" />
|
||||
<el-table-column label="抛比" align="center" prop="throwRatio" />
|
||||
<el-table-column label="信用额度" align="center" prop="creditEd" />
|
||||
<el-table-column label="信用额度" align="center" prop="creditEd">
|
||||
<template #default="scope">
|
||||
<span v-if="Number(scope.row.creditEd) < 0" style="color: var(--el-color-danger); font-weight: 600;"
|
||||
title="已用额度超过授信总额(如临时额度已到期),客户回款核销后恢复">
|
||||
{{ scope.row.creditEd }}
|
||||
</span>
|
||||
<span v-else>{{ scope.row.creditEd }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定产品" align="center" prop="productIds" min-width="180">
|
||||
<template #default="scope">
|
||||
<span v-if="productNames(scope.row.productIds)" :title="productNames(scope.row.productIds)">
|
||||
|
||||
Reference in New Issue
Block a user