feat: 完善15- 角色默认信用与店铺实际额度管理
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m8s

This commit is contained in:
luo
2026-07-25 11:55:44 +08:00
parent 9289a6e940
commit ee508c3e1e
16 changed files with 457 additions and 100 deletions

View File

@@ -618,10 +618,10 @@
return
}
if (value < 0) {
callback(new Error('实际信用额度不能小于0'))
return
}
if (value <= 0) {
callback(new Error('实际信用额度必须大于0'))
return
}
callback()
},
@@ -655,12 +655,13 @@
{ label: '店铺名称', prop: 'shop_name' },
{ label: '用户名', prop: 'username' },
{ label: '手机号', prop: 'phone' },
{ label: '现金余额', prop: 'balance' },
{ label: '冻结金额', prop: 'frozen_balance' },
{ label: '账面余额', prop: 'main_balance' },
{ label: '冻结金额', prop: 'main_frozen_balance' },
{ label: '现金可用', prop: 'cash_available_balance' },
{ label: '实际信用额度', prop: 'credit_limit' },
{ label: '可用金额', prop: 'available_balance' },
{ label: '可用金额', prop: 'available_balance' },
{ label: '欠款金额', prop: 'debt_amount' },
{ label: '版本', prop: 'version' },
{ label: '钱包版本', prop: 'version' },
{ label: '余额预警', prop: 'low_balance_warning' },
{ label: '总佣金', prop: 'total_commission' },
{ label: '可提现', prop: 'available_commission' },
@@ -748,22 +749,28 @@
width: 120
},
{
prop: 'balance',
label: '现金余额',
prop: 'main_balance',
label: '账面余额',
minWidth: 130,
formatter: (row: ShopFundSummaryItem) => {
return h(
'span',
{ style: 'color: var(--el-color-primary); font-weight: 500' },
formatMoney(row.balance)
formatMoney(row.main_balance)
)
}
},
{
prop: 'frozen_balance',
prop: 'main_frozen_balance',
label: '冻结金额',
minWidth: 120,
formatter: (row: ShopFundSummaryItem) => formatMoney(row.frozen_balance)
formatter: (row: ShopFundSummaryItem) => formatMoney(row.main_frozen_balance)
},
{
prop: 'cash_available_balance',
label: '现金可用',
minWidth: 120,
formatter: (row: ShopFundSummaryItem) => formatMoney(row.cash_available_balance)
},
{
prop: 'credit_limit',
@@ -783,7 +790,7 @@
},
{
prop: 'available_balance',
label: '可用金额',
label: '可用金额',
minWidth: 130,
formatter: (row: ShopFundSummaryItem) => {
return h(
@@ -806,7 +813,7 @@
},
{
prop: 'version',
label: '版本',
label: '钱包版本',
minWidth: 90,
formatter: (row: ShopFundSummaryItem) => row.version ?? '-'
},
@@ -957,11 +964,13 @@
})
}
actions.push({
label: '调整额度',
handler: () => showCreditDialog(row),
type: 'primary'
})
if (hasAuth('shop:credit-limit:manage')) {
actions.push({
label: '调整额度',
handler: () => showCreditDialog(row),
type: 'primary'
})
}
return actions
}