This commit is contained in:
@@ -449,6 +449,7 @@
|
||||
|
||||
const { hasAuth } = useAuth()
|
||||
const router = useRouter()
|
||||
const canUpdateWechatConfigStatus = hasAuth('wechat_config:status')
|
||||
|
||||
const loading = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
@@ -509,7 +510,7 @@
|
||||
{ label: '配置名称', prop: 'name' },
|
||||
{ label: '配置描述', prop: 'description' },
|
||||
{ label: '支付渠道类型', prop: 'provider_type' },
|
||||
{ label: '激活状态', prop: 'is_active' },
|
||||
...(canUpdateWechatConfigStatus ? [{ label: '激活状态', prop: 'is_active' }] : []),
|
||||
{ label: '商户号', prop: 'merchant_id' },
|
||||
{ label: '小程序AppID', prop: 'miniapp_app_id' },
|
||||
{ label: '公众号AppID', prop: 'oa_app_id' },
|
||||
@@ -668,21 +669,24 @@
|
||||
width: 130,
|
||||
formatter: (row: WechatConfig) => getProviderTypeText(row.provider_type)
|
||||
},
|
||||
{
|
||||
prop: 'is_active',
|
||||
label: '激活状态',
|
||||
width: 100,
|
||||
formatter: (row: WechatConfig) => {
|
||||
return h(ElSwitch, {
|
||||
modelValue: row.is_active,
|
||||
activeText: '已激活',
|
||||
inactiveText: '未激活',
|
||||
inlinePrompt: true,
|
||||
disabled: !hasAuth('wechat_config:status'),
|
||||
'onUpdate:modelValue': (val) => handleStatusChange(row, val)
|
||||
})
|
||||
}
|
||||
},
|
||||
...(canUpdateWechatConfigStatus
|
||||
? [
|
||||
{
|
||||
prop: 'is_active',
|
||||
label: '激活状态',
|
||||
width: 100,
|
||||
formatter: (row: WechatConfig) => {
|
||||
return h(ElSwitch, {
|
||||
modelValue: row.is_active,
|
||||
activeText: '已激活',
|
||||
inactiveText: '未激活',
|
||||
inlinePrompt: true,
|
||||
'onUpdate:modelValue': (val) => handleStatusChange(row, val)
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
: []),
|
||||
{
|
||||
prop: 'merchant_id',
|
||||
label: '商户号',
|
||||
|
||||
Reference in New Issue
Block a user