fix: some
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 55s

This commit is contained in:
luo
2026-09-28 10:08:30 +08:00
parent 063337e6a3
commit 015f990fb6
14 changed files with 39 additions and 44 deletions

View File

@@ -180,7 +180,7 @@ export class ShopService extends BaseService {
// ========== 业务负责人 CSV 导入 ==========
/**
* 创建业务负责人导入任务
* 创建批量换绑业务员任务
* POST /api/admin/shops/business-owner-imports
* @param data 上传后拿到的 file_key
*/
@@ -191,7 +191,7 @@ export class ShopService extends BaseService {
}
/**
* 查询业务负责人导入任务详情
* 查询批量换绑业务员任务详情
* GET /api/admin/shops/business-owner-imports/{id}
*/
static getBusinessOwnerImportDetail(
@@ -201,7 +201,7 @@ export class ShopService extends BaseService {
}
/**
* 查询业务负责人导入任务列表
* 查询批量换绑业务员任务列表
* GET /api/admin/shops/business-owner-imports
*/
static getBusinessOwnerImportList(

View File

@@ -367,7 +367,7 @@
"title": "店铺管理",
"shopList": "店铺列表",
"businessUserGroups": "业务用户组",
"businessOwnerImport": "业务负责人导入",
"businessOwnerImport": "批量换绑业务员",
"agentDistributionRegistrations": "代理注册申请",
"agentDistributionRegistrationDetail": "代理注册申请详情"
},

View File

@@ -298,7 +298,7 @@ export const asyncRoutes: AppRouteRecord[] = [
permissions: [BUSINESS_USER_GROUP_PERMISSIONS.page]
}
},
// 业务负责人导入
// 批量换绑业务员
{
path: 'business-owner-import',
name: 'BusinessOwnerImport',

View File

@@ -46,7 +46,7 @@ export enum RoutesAlias {
Shop = '/shop-management/list', // 店铺列表
ShopDetail = '/shop-management/detail', // 店铺详情
BusinessUserGroups = '/shop-management/business-user-groups', // 业务用户组
BusinessOwnerImport = '/shop-management/business-owner-import', // 业务负责人导入
BusinessOwnerImport = '/shop-management/business-owner-import', // 批量换绑业务员
AgentDistributionRegistrations = '/shop-management/agent-distribution-registrations', // 代理注册申请
AgentDistributionRegistrationDetail = '/shop-management/agent-distribution-registrations/detail', // 代理注册申请详情

View File

@@ -166,7 +166,7 @@ export interface BatchUpdateBusinessOwnerResult {
// ========== 业务负责人 CSV 导入 ==========
/** 业务负责人导入任务行级结果 */
/** 批量换绑业务员任务行级结果 */
export interface BusinessOwnerImportRow {
line: number // 行号,从数据首行 1 开始
shop_code: string // 店铺编码
@@ -176,7 +176,7 @@ export interface BusinessOwnerImportRow {
reason: string // 失败原因
}
/** 业务负责人导入任务详情 */
/** 批量换绑业务员任务详情 */
export interface BusinessOwnerImportDetail {
id: number // 导入任务ID
task_no?: string // 任务编号
@@ -195,19 +195,19 @@ export interface BusinessOwnerImportDetail {
updated_at?: string
}
/** 创建业务负责人导入任务请求 */
/** 创建批量换绑业务员任务请求 */
export interface CreateBusinessOwnerImportParams {
file_key: string // 由 /storage/upload-url(purpose=shop_import)获取
}
/** 业务负责人导入任务列表查询参数 */
/** 批量换绑业务员任务列表查询参数 */
export interface BusinessOwnerImportQueryParams {
page?: number
page_size?: number
status?: number // 按状态筛选
}
/** 业务负责人导入任务列表响应 */
/** 批量换绑业务员任务列表响应 */
export interface BusinessOwnerImportPageResult {
items: BusinessOwnerImportDetail[] | null
page?: number

View File

@@ -359,7 +359,7 @@
<template v-if="previousExchangeAsset || nextExchangeAsset">
<ElDivider content-position="left">换货链路</ElDivider>
<ElDescriptions :column="descriptionsColumn" border size="large">
<ElDescriptions :column="descriptionsColumn" border>
<ElDescriptionsItem v-if="previousExchangeAsset" label="前代资产">
<div class="exchange-asset">
<ElTag type="success" size="small">旧资产</ElTag>

View File

@@ -19,7 +19,6 @@
<ElButton
v-if="canCreate"
type="primary"
:icon="Plus"
@click="openFormDialog('create')"
>
新增规则
@@ -54,7 +53,7 @@
destroy-on-close
@closed="resetForm"
>
<ElForm ref="formRef" :model="form" :rules="formRules" label-width="120px">
<ElForm ref="formRef" :model="form" :rules="formRules" label-width="100px">
<ElFormItem label="套餐商品" prop="package_id">
<ElSelect
v-model="form.package_id"

View File

@@ -28,8 +28,6 @@
:pageSize="pagination.pageSize"
:total="pagination.total"
:marginTop="10"
:actions="getActions"
:actionsWidth="100"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
@@ -76,7 +74,7 @@
<script setup lang="ts">
import { computed, h, onMounted, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage, ElMessageBox, ElRadio, ElRadioGroup, ElTag } from 'element-plus'
import { ElButton, ElMessage, ElMessageBox, ElRadio, ElRadioGroup, ElTag } from 'element-plus'
import { Download } from '@element-plus/icons-vue'
import { PackageManageService, PackageTrafficAlertService, ShopService } from '@/api/modules'
import { useAuth } from '@/composables/useAuth'
@@ -284,7 +282,15 @@
label: '套餐名称',
minWidth: 160,
showOverflowTooltip: true,
formatter: (row: PackageTrafficAlertRecordItem) => row.package_name || '-'
formatter: (row: PackageTrafficAlertRecordItem) => {
const packageName = row.package_name || '-'
if (!canViewDetail.value) return packageName
return h(
ElButton,
{ link: true, type: 'primary', onClick: () => goDetail(row) },
() => h('span', { style: { textDecoration: 'underline' } }, packageName)
)
}
},
{
prop: 'shop_name',
@@ -452,17 +458,6 @@
router.push(`${RoutesAlias.TrafficAlertDetail}/${row.id}`)
}
const getActions = (row: PackageTrafficAlertRecordItem) => {
if (!canViewDetail.value) return []
return [
{
label: '详情',
handler: () => goDetail(row),
type: 'primary' as const
}
]
}
// ========== 导出 ==========
const exportDialogVisible = ref(false)

View File

@@ -56,10 +56,11 @@
</div>
<!-- 新建导入弹窗 -->
<ElDialog v-model="importDialogVisible" title="导入业务员" width="560px" destroy-on-close>
<ElDialog v-model="importDialogVisible" title="导入业务员" width="50%" destroy-on-close>
<ElAlert type="info" :closable="false" show-icon class="import-alert">
<template #title>导入说明</template>
<div>通过 CSV 批量交接或清空店铺平台业务员。</div>
<div>注意: 清空不要填写业务员登录账号</div>
<div>
表头固定:<code>店铺编码,操作类型,业务员登录账号,备注</code>;操作类型仅支持「换绑」或「清空」。
</div>
@@ -359,8 +360,8 @@
const handleDownloadTemplate = () => {
try {
const link = document.createElement('a')
link.href = new URL('@/template/业务负责人导入模板.csv', import.meta.url).href
link.download = '业务负责人导入模板.csv'
link.href = new URL('@/template/批量换绑业务员模板.csv', import.meta.url).href
link.download = '批量换绑业务员模板.csv'
document.body.appendChild(link)
link.click()
document.body.removeChild(link)

View File

@@ -329,13 +329,6 @@
const getActions = (row: BusinessUserGroupItem) => {
const actions: Array<{ label: string; handler: () => void; type?: 'primary' | 'danger' }> = []
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.update)) {
actions.push({
label: '编辑',
handler: () => openEditDialog(row),
type: 'primary'
})
}
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.members)) {
actions.push({
label: '成员',
@@ -343,6 +336,13 @@
type: 'primary'
})
}
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.update)) {
actions.push({
label: '编辑',
handler: () => openEditDialog(row),
type: 'primary'
})
}
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.delete)) {
actions.push({
label: '删除',

View File

@@ -1276,7 +1276,7 @@
}
}
// 跳转到业务负责人导入页
// 跳转到批量换绑业务员页
const goToImportPage = () => {
router.push(RoutesAlias.BusinessOwnerImport)
}