fix: 回调配置, 调整信用位置, 套餐
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m55s

This commit is contained in:
luo
2026-07-29 18:20:42 +08:00
parent 4394ae0f78
commit 17d2eeebc5
39 changed files with 2687 additions and 1532 deletions

View File

@@ -512,6 +512,8 @@
{ label: '账号类型', prop: 'user_type' },
{ label: '店铺名称', prop: 'shop_name' },
{ label: '企业名称', prop: 'enterprise_name' },
{ label: '企微绑定', prop: 'wecom_bound' },
{ label: '企微用户名称', prop: 'wecom_name' },
...(canModifyAccountStatus ? [{ label: '状态', prop: 'status' }] : []),
{ label: '创建时间', prop: 'created_at' }
]
@@ -620,6 +622,21 @@
return row.enterprise_name || '-'
}
},
{
prop: 'wecom_bound',
label: '企微绑定',
width: 100,
formatter: (row: any) =>
h(ElTag, { type: row.wecom_bound ? 'success' : 'info', size: 'small' }, () =>
row.wecom_bound ? '已绑定' : '未绑定'
)
},
{
prop: 'wecom_name',
label: '企微用户名称',
minWidth: 130,
formatter: (row: any) => row.wecom_name || '-'
},
...(canModifyAccountStatus
? [
{
@@ -688,7 +705,7 @@
return actions
}
const showWecomBindingDialog = (row: any) => {
const showWecomBindingDialog = async (row: any) => {
if (row.user_type !== 2) {
ElMessage.warning('只有平台用户可以绑定企微账号')
return
@@ -699,7 +716,17 @@
wecomBindingForm.userid = ''
wecomMembers.value = []
wecomBindingDialogVisible.value = true
void loadWecomApplications()
await loadWecomApplications()
if (row.wecom_bound && row.wecom_corp_id) {
const boundApplication = wecomApplications.value.find(
(application) => application.corp_id === row.wecom_corp_id
)
if (boundApplication) {
wecomBindingForm.application_id = boundApplication.id
await handleWecomApplicationChange(boundApplication.id, row.wecom_userid || '')
}
}
}
const loadWecomApplications = async () => {
@@ -712,8 +739,8 @@
}
}
const handleWecomApplicationChange = async (applicationId?: number) => {
wecomBindingForm.userid = ''
const handleWecomApplicationChange = async (applicationId?: number, selectedUserid = '') => {
wecomBindingForm.userid = selectedUserid
wecomMembers.value = []
if (!applicationId) return
@@ -723,7 +750,15 @@
page: 1,
page_size: 100
})
if (response.code === 0) wecomMembers.value = response.data.items || []
if (response.code === 0) {
wecomMembers.value = response.data.items || []
if (
selectedUserid &&
!wecomMembers.value.some((member) => member.userid === selectedUserid)
) {
wecomBindingForm.userid = selectedUserid
}
}
} finally {
wecomMembersLoading.value = false
}
@@ -753,6 +788,7 @@
if (response.code === 0) {
ElMessage.success('账号企微绑定成功')
wecomBindingDialogVisible.value = false
await getAccountList()
}
} finally {
wecomBindingSubmitting.value = false