超管审批额度不占用额度池
This commit is contained in:
@@ -994,11 +994,15 @@ import { AR_BALANCE_WRITEOFF_STATUS, AR_BALANCE_WRITEOFF_STATUS_OPTIONS, AR_BALA
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
import { nextTick } from 'vue'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const { proxy } = getCurrentInstance()
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
const userStore = useUserStore()
|
||||
/** 超管(admin 角色)审批额度不占用角色额度池,不受池余额限制 */
|
||||
const isSuperAdmin = computed(() => (userStore.roles || []).includes('admin'))
|
||||
|
||||
const activeTab = ref('receipt')
|
||||
const customer = ref({})
|
||||
@@ -1685,7 +1689,8 @@ function handleApproveApply(row) {
|
||||
const netDelta = isApplyNetIncrease(row)
|
||||
listMyCreditPools().then(res => {
|
||||
const pools = res.data || []
|
||||
if (netDelta > 0 && pools.length > 0) {
|
||||
// 超管审批不占用角色额度池,直接通过(后端 myPools 对超管返回空列表,此处双保险)
|
||||
if (!isSuperAdmin.value && netDelta > 0 && pools.length > 0) {
|
||||
// 非超管且名下有角色额度池:净增审批必须选池占用
|
||||
approveDialog.apply = row
|
||||
approveDialog.pools = pools
|
||||
@@ -1694,7 +1699,7 @@ function handleApproveApply(row) {
|
||||
approveDialog.visible = true
|
||||
return
|
||||
}
|
||||
const poolTip = (netDelta > 0 && pools.length === 0)
|
||||
const poolTip = (!isSuperAdmin.value && netDelta > 0 && pools.length === 0)
|
||||
? '(提示:净增额度需占用角色额度池,您名下未配置额度池,提交后将由后端校验拦截)'
|
||||
: ''
|
||||
proxy.$modal.confirm(`确认通过额度调整申请「${row.applyNo}」?通过后将立即调整客户额度并写入额度流水。${poolTip}`)
|
||||
|
||||
Reference in New Issue
Block a user