feat: small fix
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m12s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m12s
This commit is contained in:
@@ -5,9 +5,14 @@
|
|||||||
export const JULY_PERMISSIONS = {
|
export const JULY_PERMISSIONS = {
|
||||||
wecom: {
|
wecom: {
|
||||||
page: 'wecom:config',
|
page: 'wecom:config',
|
||||||
application: 'wecom:application',
|
applicationCreate: 'wecom:application_create',
|
||||||
member: 'wecom:member',
|
applicationTest: 'wecom:application_test',
|
||||||
scene: 'wecom:scene',
|
applicationEdit: 'wecom:application_edit',
|
||||||
|
memberManage: 'wecom:member_manage',
|
||||||
|
memberSync: 'wecom:member_sync',
|
||||||
|
memberDefaultCreator: 'wecom:member_default_creator',
|
||||||
|
sceneCreate: 'wecom:scene_create',
|
||||||
|
sceneEdit: 'wecom:scene_edit',
|
||||||
binding: 'wecom:account_binding'
|
binding: 'wecom:account_binding'
|
||||||
},
|
},
|
||||||
systemConfig: {
|
systemConfig: {
|
||||||
|
|||||||
@@ -291,7 +291,6 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<ElButton @click="wecomBindingDialogVisible = false">取消</ElButton>
|
<ElButton @click="wecomBindingDialogVisible = false">取消</ElButton>
|
||||||
<ElButton
|
<ElButton
|
||||||
v-permission="JULY_PERMISSIONS.wecom.binding"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="wecomBindingSubmitting"
|
:loading="wecomBindingSubmitting"
|
||||||
@click="submitWecomBinding"
|
@click="submitWecomBinding"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<ElDrawer
|
<ElDrawer
|
||||||
v-model="detailDrawerVisible"
|
v-model="detailDrawerVisible"
|
||||||
:title="`${currentShop?.shop_name || ''} - 佣金详情`"
|
:title="`${currentShop?.shop_name || ''} - 佣金详情`"
|
||||||
size="60%"
|
size="65%"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
>
|
>
|
||||||
<ElTabs v-model="activeTab" class="detail-tabs">
|
<ElTabs v-model="activeTab" class="detail-tabs">
|
||||||
@@ -990,14 +990,6 @@
|
|||||||
const getActions = (row: ShopFundSummaryItem) => {
|
const getActions = (row: ShopFundSummaryItem) => {
|
||||||
const actions: any[] = []
|
const actions: any[] = []
|
||||||
|
|
||||||
if (hasAuth('agent_commission:detail')) {
|
|
||||||
actions.push({
|
|
||||||
label: '查看详情',
|
|
||||||
handler: () => showDetail(row),
|
|
||||||
type: 'primary'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasAuth('shop:credit_limit_manage')) {
|
if (hasAuth('shop:credit_limit_manage')) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '调整额度',
|
label: '调整额度',
|
||||||
|
|||||||
@@ -131,15 +131,19 @@
|
|||||||
<div class="package-config-name" :title="pkg.package_name || ''">
|
<div class="package-config-name" :title="pkg.package_name || ''">
|
||||||
{{ pkg.package_name || '套餐名称不可用' }}
|
{{ pkg.package_name || '套餐名称不可用' }}
|
||||||
</div>
|
</div>
|
||||||
<ElInputNumber
|
<div class="package-config-cost">
|
||||||
v-model="pkg.cost_price_yuan"
|
<span class="package-config-field-label">套餐成本价(元)</span>
|
||||||
:min="pkg.original_cost_price || 0"
|
<ElInputNumber
|
||||||
:max="getPackageCostPriceMax(pkg)"
|
v-model="pkg.cost_price_yuan"
|
||||||
:precision="2"
|
:min="pkg.original_cost_price || 0"
|
||||||
:step="0.01"
|
:max="getPackageCostPriceMax(pkg)"
|
||||||
:controls="false"
|
:precision="2"
|
||||||
placeholder="成本价(元)"
|
:step="0.01"
|
||||||
/>
|
:controls="false"
|
||||||
|
placeholder="请输入成本价"
|
||||||
|
style="width: 150px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
@@ -759,7 +763,10 @@
|
|||||||
remove: true
|
remove: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
await ShopSeriesGrantService.manageGrantPackages(grantId.value, { packages })
|
await ShopSeriesGrantService.manageGrantPackages(grantId.value, {
|
||||||
|
expiry_base_override: row.expiry_base_override ?? null,
|
||||||
|
packages
|
||||||
|
})
|
||||||
await fetchPackageList()
|
await fetchPackageList()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@@ -858,6 +865,19 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.package-config-cost {
|
||||||
|
display: flex;
|
||||||
|
flex-shrink: 0;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-config-field-label {
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
font-size: 13px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.ellipsis-value {
|
.ellipsis-value {
|
||||||
display: block;
|
display: block;
|
||||||
width: 260px;
|
width: 260px;
|
||||||
|
|||||||
@@ -76,22 +76,8 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<ElButton @click="visible = false">取消</ElButton>
|
<ElButton @click="visible = false">取消</ElButton>
|
||||||
<ElButton
|
<ElButton v-if="isEdit" :loading="testing" @click="testApplication"> 测试连接 </ElButton>
|
||||||
v-if="isEdit"
|
<ElButton type="primary" :loading="saving" @click="saveApplication"> 保存应用 </ElButton>
|
||||||
v-permission="JULY_PERMISSIONS.wecom.application"
|
|
||||||
:loading="testing"
|
|
||||||
@click="testApplication"
|
|
||||||
>
|
|
||||||
测试连接
|
|
||||||
</ElButton>
|
|
||||||
<ElButton
|
|
||||||
v-permission="JULY_PERMISSIONS.wecom.application"
|
|
||||||
type="primary"
|
|
||||||
:loading="saving"
|
|
||||||
@click="saveApplication"
|
|
||||||
>
|
|
||||||
保存应用
|
|
||||||
</ElButton>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ElDialog>
|
</ElDialog>
|
||||||
@@ -102,7 +88,6 @@
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
import { WecomService } from '@/api/modules'
|
import { WecomService } from '@/api/modules'
|
||||||
import { JULY_PERMISSIONS } from '@/config/constants'
|
|
||||||
import type { WecomApplication } from '@/types/api'
|
import type { WecomApplication } from '@/types/api'
|
||||||
|
|
||||||
defineOptions({ name: 'WecomApplicationFormDialog' })
|
defineOptions({ name: 'WecomApplicationFormDialog' })
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
>
|
>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ElButton
|
<ElButton
|
||||||
v-permission="JULY_PERMISSIONS.wecom.application"
|
v-permission="JULY_PERMISSIONS.wecom.applicationCreate"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openCreateDialog"
|
@click="openCreateDialog"
|
||||||
>
|
>
|
||||||
@@ -173,19 +173,21 @@
|
|||||||
|
|
||||||
const getActions = (row: WecomApplication) => {
|
const getActions = (row: WecomApplication) => {
|
||||||
const actions: any[] = []
|
const actions: any[] = []
|
||||||
if (hasAuth(JULY_PERMISSIONS.wecom.application)) {
|
if (hasAuth(JULY_PERMISSIONS.wecom.applicationTest)) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '测试连接',
|
label: '测试连接',
|
||||||
handler: () => testApplication(row.id),
|
handler: () => testApplication(row.id),
|
||||||
type: 'primary'
|
type: 'primary'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
if (hasAuth(JULY_PERMISSIONS.wecom.applicationEdit)) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '编辑配置',
|
label: '编辑配置',
|
||||||
handler: () => openEditDialog(row),
|
handler: () => openEditDialog(row),
|
||||||
type: 'primary'
|
type: 'primary'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (hasAuth(JULY_PERMISSIONS.wecom.member)) {
|
if (hasAuth(JULY_PERMISSIONS.wecom.memberManage)) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '成员管理',
|
label: '成员管理',
|
||||||
handler: () => goToMembers(row.id),
|
handler: () => goToMembers(row.id),
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="members-toolbar">
|
<div class="members-toolbar">
|
||||||
<div class="toolbar-actions">
|
<div class="toolbar-actions">
|
||||||
<ElButton
|
<ElButton
|
||||||
v-permission="JULY_PERMISSIONS.wecom.member"
|
v-permission="JULY_PERMISSIONS.wecom.memberSync"
|
||||||
:disabled="!selectedApplicationId"
|
:disabled="!selectedApplicationId"
|
||||||
:loading="syncing"
|
:loading="syncing"
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</ElTag>
|
</ElTag>
|
||||||
<ElTag
|
<ElTag
|
||||||
v-else
|
v-else
|
||||||
v-permission="JULY_PERMISSIONS.wecom.member"
|
v-permission="JULY_PERMISSIONS.wecom.memberDefaultCreator"
|
||||||
class="member-card__action-tag"
|
class="member-card__action-tag"
|
||||||
type="primary"
|
type="primary"
|
||||||
effect="plain"
|
effect="plain"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
>
|
>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ElButton
|
<ElButton
|
||||||
v-permission="JULY_PERMISSIONS.wecom.scene"
|
v-permission="JULY_PERMISSIONS.wecom.sceneCreate"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="createScene"
|
@click="createScene"
|
||||||
>
|
>
|
||||||
@@ -88,11 +88,7 @@
|
|||||||
<ElFormItem label="模板 ID" required>
|
<ElFormItem label="模板 ID" required>
|
||||||
<ElInput v-model="sceneForm.template_id" placeholder="请输入企微后台模板 ID">
|
<ElInput v-model="sceneForm.template_id" placeholder="请输入企微后台模板 ID">
|
||||||
<template #append>
|
<template #append>
|
||||||
<ElButton
|
<ElButton :loading="inspectingTemplate" @click="syncTemplate()">
|
||||||
v-permission="JULY_PERMISSIONS.wecom.scene"
|
|
||||||
:loading="inspectingTemplate"
|
|
||||||
@click="syncTemplate()"
|
|
||||||
>
|
|
||||||
同步模板
|
同步模板
|
||||||
</ElButton>
|
</ElButton>
|
||||||
</template>
|
</template>
|
||||||
@@ -173,14 +169,7 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<ElButton @click="editorVisible = false">取消</ElButton>
|
<ElButton @click="editorVisible = false">取消</ElButton>
|
||||||
<ElButton @click="createScene">清空表单</ElButton>
|
<ElButton @click="createScene">清空表单</ElButton>
|
||||||
<ElButton
|
<ElButton type="primary" :loading="saving" @click="saveScene"> 保存并校验 </ElButton>
|
||||||
v-permission="JULY_PERMISSIONS.wecom.scene"
|
|
||||||
type="primary"
|
|
||||||
:loading="saving"
|
|
||||||
@click="saveScene"
|
|
||||||
>
|
|
||||||
保存并校验
|
|
||||||
</ElButton>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ElDialog>
|
</ElDialog>
|
||||||
@@ -490,7 +479,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getActions = (row: WecomScene) => {
|
const getActions = (row: WecomScene) => {
|
||||||
if (!hasAuth(JULY_PERMISSIONS.wecom.scene)) return []
|
if (!hasAuth(JULY_PERMISSIONS.wecom.sceneEdit)) return []
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
|
|||||||
@@ -307,12 +307,14 @@
|
|||||||
{
|
{
|
||||||
prop: 'carrier_code',
|
prop: 'carrier_code',
|
||||||
label: '运营商编码',
|
label: '运营商编码',
|
||||||
minWidth: 160
|
minWidth: 160,
|
||||||
|
showOverflowTooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'carrier_name',
|
prop: 'carrier_name',
|
||||||
label: '运营商名称',
|
label: '运营商名称',
|
||||||
minWidth: 150
|
minWidth: 150,
|
||||||
|
showOverflowTooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'carrier_type',
|
prop: 'carrier_type',
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
:title="dialogType === 'add' ? '新增角色' : '编辑角色'"
|
:title="dialogType === 'add' ? '新增角色' : '编辑角色'"
|
||||||
width="30%"
|
width="30%"
|
||||||
>
|
>
|
||||||
<ElForm ref="formRef" :model="form" :rules="rules" label-width="160px">
|
<ElForm ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||||
<ElFormItem label="角色名称" prop="role_name">
|
<ElFormItem label="角色名称" prop="role_name">
|
||||||
<ElInput v-model="form.role_name" placeholder="请输入角色名称" />
|
<ElInput v-model="form.role_name" placeholder="请输入角色名称" />
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<template v-if="isCustomerRoleForm">
|
<template v-if="isCustomerRoleForm">
|
||||||
<ElFormItem label="新建代理默认信用">
|
<ElFormItem label="代理默认信用">
|
||||||
<ElSwitch
|
<ElSwitch
|
||||||
v-model="form.credit_enabled"
|
v-model="form.credit_enabled"
|
||||||
@change="handleDefaultCreditEnabledChange"
|
@change="handleDefaultCreditEnabledChange"
|
||||||
|
|||||||
Reference in New Issue
Block a user