fix: bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m11s

This commit is contained in:
sexygoat
2026-04-24 18:39:39 +08:00
parent 2d6b5d7903
commit 17c299e4ce
27 changed files with 500 additions and 481 deletions

View File

@@ -363,7 +363,7 @@
</template>
<script setup lang="ts">
import { h } from 'vue'
import { h, watch } from 'vue'
import { useRouter } from 'vue-router'
import { PackageManageService, PackageSeriesService } from '@/api/modules'
import { ElMessage, ElMessageBox, ElTag, ElSwitch, ElInputNumber } from 'element-plus'
@@ -922,6 +922,13 @@
getTableData()
})
// 监听对话框打开,加载系列选项
watch(dialogVisible, (visible) => {
if (visible) {
loadSeriesOptions()
}
})
// 加载系列选项(用于新增/编辑对话框,默认加载10条)
const loadSeriesOptions = async (seriesName?: string) => {
seriesLoading.value = true

View File

@@ -48,7 +48,7 @@
<ElDialog
v-model="dialogVisible"
:title="dialogType === 'add' ? '新增套餐系列' : '编辑套餐系列'"
width="30%"
width="40%"
:close-on-click-modal="false"
>
<ElForm ref="formRef" :model="form" :rules="rules" label-width="120px">
@@ -291,7 +291,13 @@
<span class="title-text">强充配置</span>
</div>
<ElFormItem label="强充金额">
<ElFormItem label="启用强充">
<ElSwitch
v-model="form.one_time_commission_config.enable_force_recharge"
/>
</ElFormItem>
<ElFormItem label="强充金额" v-if="form.one_time_commission_config.enable_force_recharge">
<ElInputNumber
v-model="form.one_time_commission_config.force_amount"
:min="0"
@@ -305,7 +311,7 @@
>
</ElFormItem>
<ElFormItem label="强充计算类型">
<ElFormItem label="强充计算类型" v-if="form.one_time_commission_config.enable_force_recharge">
<ElRadioGroup v-model="form.one_time_commission_config.force_calc_type">
<ElRadio value="fixed">固定</ElRadio>
<ElRadio value="dynamic">动态</ElRadio>
@@ -483,7 +489,8 @@
{
label: '强充状态',
prop: 'enable_force_recharge',
formatter: (row: any) => (row.one_time_commission_config?.enable_force_recharge ? '启用' : '未启用')
formatter: (row: any) =>
row.one_time_commission_config?.enable_force_recharge ? '启用' : '未启用'
},
{
label: '强充金额',

View File

@@ -209,7 +209,7 @@
<ElDialog
v-model="dialogVisible"
:title="dialogType === 'add' ? '新增代理系列授权' : '编辑代理系列授权'"
width="40%"
width="50%"
:close-on-click-modal="false"
@closed="handleDialogClosed"
>
@@ -973,13 +973,11 @@
loading: shopLoading.value,
placeholder: '请选择或搜索分配者店铺'
},
options: () => [
{ label: '平台', value: 0 },
...searchAllocatorShopOptions.value.map((s) => ({
options: () =>
searchAllocatorShopOptions.value.map((s) => ({
label: s.shop_name,
value: s.id
}))
]
},
{
@@ -1337,10 +1335,6 @@
}
onMounted(() => {
loadSeriesOptions()
loadSearchSeriesOptions()
loadSearchShopOptions()
loadSearchAllocatorShopOptions()
getTableData()
})
@@ -1647,7 +1641,7 @@
// 搜索系列(用于搜索栏)
const handleSearchSeries = async (query: string) => {
if (!query) {
loadSearchSeriesOptions()
await loadSearchSeriesOptions()
return
}
try {
@@ -1668,7 +1662,7 @@
// 搜索店铺(用于搜索栏-被分配的店铺)
const handleSearchShop = async (query: string) => {
if (!query) {
loadSearchShopOptions()
await loadSearchShopOptions()
return
}
try {
@@ -1688,7 +1682,7 @@
// 搜索分配者店铺(用于搜索栏)
const handleSearchAllocatorShop = async (query: string) => {
if (!query) {
loadSearchAllocatorShopOptions()
await loadSearchAllocatorShopOptions()
return
}
try {
@@ -1767,6 +1761,8 @@
// 每次打开对话框时重新加载店铺列表,确保获取最新的店铺数据
await loadShopListForDialog()
// 加载系列选项
await loadSeriesOptions()
if (type === 'edit' && row) {
// 编辑模式:先调用详情接口获取完整数据

View File

@@ -245,6 +245,7 @@
return actions
}
// 返回上一页
const handleBack = () => {
router.back()
}