This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
| 页面/操作 | URL | 权限名称 | 权限编码 |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| 预警列表 | `/package-management/traffic-alerts` | `recordsView` | `package_traffic_alert:records_view` |
|
| 预警列表 | `/package-management/traffic-alerts` | `recordsView` | `package_traffic_alert:records_view` |
|
||||||
| 预警详情 | `/package-management/traffic-alerts/detail/:id` | `recordDetail` | `package_traffic_alert:record_detail` |
|
| 点击套餐名称进入预警详情 | `/package-management/traffic-alerts/detail/:id` | `recordDetail` | `package_traffic_alert:record_detail` |
|
||||||
| 导出预警记录 | — | `export` | `package_traffic_alert:export` |
|
| 导出预警记录 | — | `export` | `package_traffic_alert:export` |
|
||||||
| 导出任务页面 | `/asset-management/export-task-management/export-package-traffic-alert` | `page` | `export_task:package_traffic_alert_page` |
|
| 导出任务页面 | `/asset-management/export-task-management/export-package-traffic-alert` | `page` | `export_task:package_traffic_alert_page` |
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
| 删除 | `delete` | `business_user_group:delete` |
|
| 删除 | `delete` | `business_user_group:delete` |
|
||||||
| 成员管理 | `members` | `business_user_group:members` |
|
| 成员管理 | `members` | `business_user_group:members` |
|
||||||
|
|
||||||
## 店铺管理:业务负责人导入
|
## 店铺管理:批量换绑业务员
|
||||||
|
|
||||||
页面 URL:`/shop-management/business-owner-import`
|
页面 URL:`/shop-management/business-owner-import`
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
- src/views/shop-management/business-user-groups/index.vue(新增页面)
|
- src/views/shop-management/business-user-groups/index.vue(新增页面)
|
||||||
- src/views/shop-management/list/index.vue
|
- src/views/shop-management/list/index.vue
|
||||||
- src/router/routes/asyncRoutes.ts、src/router/routesAlias.ts、src/locales/langs/{zh,en}.json
|
- src/router/routes/asyncRoutes.ts、src/router/routesAlias.ts、src/locales/langs/{zh,en}.json
|
||||||
- src/template/业务负责人导入模板.csv(前端自带模板)
|
- src/template/批量换绑业务员模板.csv(前端自带模板)
|
||||||
- API contracts: 11 个端点(7 个业务用户组 + 店铺筛选/字段 + 批量交接 + 导入三步)
|
- API contracts: 11 个端点(7 个业务用户组 + 店铺筛选/字段 + 批量交接 + 导入三步)
|
||||||
- Dependencies:
|
- Dependencies:
|
||||||
- docs/产品迭代8月份/业务用户组.md(7 个组端点 OpenAPI)
|
- docs/产品迭代8月份/业务用户组.md(7 个组端点 OpenAPI)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#### Scenario: 任务列表展示扩展字段
|
#### Scenario: 任务列表展示扩展字段
|
||||||
|
|
||||||
- **GIVEN** 用户进入业务负责人导入任务列表
|
- **GIVEN** 用户进入批量换绑业务员任务列表
|
||||||
- **WHEN** 列表加载完成
|
- **WHEN** 列表加载完成
|
||||||
- **THEN** 前端 MUST 展示任务编号、文件名、创建人、开始/完成时间与状态中文名
|
- **THEN** 前端 MUST 展示任务编号、文件名、创建人、开始/完成时间与状态中文名
|
||||||
- **AND** 原有状态/总数/成功/失败/创建时间展示 MUST 保留
|
- **AND** 原有状态/总数/成功/失败/创建时间展示 MUST 保留
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ export class ShopService extends BaseService {
|
|||||||
// ========== 业务负责人 CSV 导入 ==========
|
// ========== 业务负责人 CSV 导入 ==========
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建业务负责人导入任务
|
* 创建批量换绑业务员任务
|
||||||
* POST /api/admin/shops/business-owner-imports
|
* POST /api/admin/shops/business-owner-imports
|
||||||
* @param data 上传后拿到的 file_key
|
* @param data 上传后拿到的 file_key
|
||||||
*/
|
*/
|
||||||
@@ -191,7 +191,7 @@ export class ShopService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询业务负责人导入任务详情
|
* 查询批量换绑业务员任务详情
|
||||||
* GET /api/admin/shops/business-owner-imports/{id}
|
* GET /api/admin/shops/business-owner-imports/{id}
|
||||||
*/
|
*/
|
||||||
static getBusinessOwnerImportDetail(
|
static getBusinessOwnerImportDetail(
|
||||||
@@ -201,7 +201,7 @@ export class ShopService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询业务负责人导入任务列表
|
* 查询批量换绑业务员任务列表
|
||||||
* GET /api/admin/shops/business-owner-imports
|
* GET /api/admin/shops/business-owner-imports
|
||||||
*/
|
*/
|
||||||
static getBusinessOwnerImportList(
|
static getBusinessOwnerImportList(
|
||||||
|
|||||||
@@ -367,7 +367,7 @@
|
|||||||
"title": "店铺管理",
|
"title": "店铺管理",
|
||||||
"shopList": "店铺列表",
|
"shopList": "店铺列表",
|
||||||
"businessUserGroups": "业务用户组",
|
"businessUserGroups": "业务用户组",
|
||||||
"businessOwnerImport": "业务负责人导入",
|
"businessOwnerImport": "批量换绑业务员",
|
||||||
"agentDistributionRegistrations": "代理注册申请",
|
"agentDistributionRegistrations": "代理注册申请",
|
||||||
"agentDistributionRegistrationDetail": "代理注册申请详情"
|
"agentDistributionRegistrationDetail": "代理注册申请详情"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ export const asyncRoutes: AppRouteRecord[] = [
|
|||||||
permissions: [BUSINESS_USER_GROUP_PERMISSIONS.page]
|
permissions: [BUSINESS_USER_GROUP_PERMISSIONS.page]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 业务负责人导入
|
// 批量换绑业务员
|
||||||
{
|
{
|
||||||
path: 'business-owner-import',
|
path: 'business-owner-import',
|
||||||
name: 'BusinessOwnerImport',
|
name: 'BusinessOwnerImport',
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export enum RoutesAlias {
|
|||||||
Shop = '/shop-management/list', // 店铺列表
|
Shop = '/shop-management/list', // 店铺列表
|
||||||
ShopDetail = '/shop-management/detail', // 店铺详情
|
ShopDetail = '/shop-management/detail', // 店铺详情
|
||||||
BusinessUserGroups = '/shop-management/business-user-groups', // 业务用户组
|
BusinessUserGroups = '/shop-management/business-user-groups', // 业务用户组
|
||||||
BusinessOwnerImport = '/shop-management/business-owner-import', // 业务负责人导入
|
BusinessOwnerImport = '/shop-management/business-owner-import', // 批量换绑业务员
|
||||||
AgentDistributionRegistrations = '/shop-management/agent-distribution-registrations', // 代理注册申请
|
AgentDistributionRegistrations = '/shop-management/agent-distribution-registrations', // 代理注册申请
|
||||||
AgentDistributionRegistrationDetail = '/shop-management/agent-distribution-registrations/detail', // 代理注册申请详情
|
AgentDistributionRegistrationDetail = '/shop-management/agent-distribution-registrations/detail', // 代理注册申请详情
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ export interface BatchUpdateBusinessOwnerResult {
|
|||||||
|
|
||||||
// ========== 业务负责人 CSV 导入 ==========
|
// ========== 业务负责人 CSV 导入 ==========
|
||||||
|
|
||||||
/** 业务负责人导入任务行级结果 */
|
/** 批量换绑业务员任务行级结果 */
|
||||||
export interface BusinessOwnerImportRow {
|
export interface BusinessOwnerImportRow {
|
||||||
line: number // 行号,从数据首行 1 开始
|
line: number // 行号,从数据首行 1 开始
|
||||||
shop_code: string // 店铺编码
|
shop_code: string // 店铺编码
|
||||||
@@ -176,7 +176,7 @@ export interface BusinessOwnerImportRow {
|
|||||||
reason: string // 失败原因
|
reason: string // 失败原因
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 业务负责人导入任务详情 */
|
/** 批量换绑业务员任务详情 */
|
||||||
export interface BusinessOwnerImportDetail {
|
export interface BusinessOwnerImportDetail {
|
||||||
id: number // 导入任务ID
|
id: number // 导入任务ID
|
||||||
task_no?: string // 任务编号
|
task_no?: string // 任务编号
|
||||||
@@ -195,19 +195,19 @@ export interface BusinessOwnerImportDetail {
|
|||||||
updated_at?: string
|
updated_at?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 创建业务负责人导入任务请求 */
|
/** 创建批量换绑业务员任务请求 */
|
||||||
export interface CreateBusinessOwnerImportParams {
|
export interface CreateBusinessOwnerImportParams {
|
||||||
file_key: string // 由 /storage/upload-url(purpose=shop_import)获取
|
file_key: string // 由 /storage/upload-url(purpose=shop_import)获取
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 业务负责人导入任务列表查询参数 */
|
/** 批量换绑业务员任务列表查询参数 */
|
||||||
export interface BusinessOwnerImportQueryParams {
|
export interface BusinessOwnerImportQueryParams {
|
||||||
page?: number
|
page?: number
|
||||||
page_size?: number
|
page_size?: number
|
||||||
status?: number // 按状态筛选
|
status?: number // 按状态筛选
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 业务负责人导入任务列表响应 */
|
/** 批量换绑业务员任务列表响应 */
|
||||||
export interface BusinessOwnerImportPageResult {
|
export interface BusinessOwnerImportPageResult {
|
||||||
items: BusinessOwnerImportDetail[] | null
|
items: BusinessOwnerImportDetail[] | null
|
||||||
page?: number
|
page?: number
|
||||||
|
|||||||
@@ -359,7 +359,7 @@
|
|||||||
|
|
||||||
<template v-if="previousExchangeAsset || nextExchangeAsset">
|
<template v-if="previousExchangeAsset || nextExchangeAsset">
|
||||||
<ElDivider content-position="left">换货链路</ElDivider>
|
<ElDivider content-position="left">换货链路</ElDivider>
|
||||||
<ElDescriptions :column="descriptionsColumn" border size="large">
|
<ElDescriptions :column="descriptionsColumn" border>
|
||||||
<ElDescriptionsItem v-if="previousExchangeAsset" label="前代资产">
|
<ElDescriptionsItem v-if="previousExchangeAsset" label="前代资产">
|
||||||
<div class="exchange-asset">
|
<div class="exchange-asset">
|
||||||
<ElTag type="success" size="small">旧资产</ElTag>
|
<ElTag type="success" size="small">旧资产</ElTag>
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
<ElButton
|
<ElButton
|
||||||
v-if="canCreate"
|
v-if="canCreate"
|
||||||
type="primary"
|
type="primary"
|
||||||
:icon="Plus"
|
|
||||||
@click="openFormDialog('create')"
|
@click="openFormDialog('create')"
|
||||||
>
|
>
|
||||||
新增规则
|
新增规则
|
||||||
@@ -54,7 +53,7 @@
|
|||||||
destroy-on-close
|
destroy-on-close
|
||||||
@closed="resetForm"
|
@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">
|
<ElFormItem label="套餐商品" prop="package_id">
|
||||||
<ElSelect
|
<ElSelect
|
||||||
v-model="form.package_id"
|
v-model="form.package_id"
|
||||||
|
|||||||
@@ -28,8 +28,6 @@
|
|||||||
:pageSize="pagination.pageSize"
|
:pageSize="pagination.pageSize"
|
||||||
:total="pagination.total"
|
:total="pagination.total"
|
||||||
:marginTop="10"
|
:marginTop="10"
|
||||||
:actions="getActions"
|
|
||||||
:actionsWidth="100"
|
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
@@ -76,7 +74,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, h, onMounted, reactive, ref } from 'vue'
|
import { computed, h, onMounted, reactive, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
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 { Download } from '@element-plus/icons-vue'
|
||||||
import { PackageManageService, PackageTrafficAlertService, ShopService } from '@/api/modules'
|
import { PackageManageService, PackageTrafficAlertService, ShopService } from '@/api/modules'
|
||||||
import { useAuth } from '@/composables/useAuth'
|
import { useAuth } from '@/composables/useAuth'
|
||||||
@@ -284,7 +282,15 @@
|
|||||||
label: '套餐名称',
|
label: '套餐名称',
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
showOverflowTooltip: true,
|
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',
|
prop: 'shop_name',
|
||||||
@@ -452,17 +458,6 @@
|
|||||||
router.push(`${RoutesAlias.TrafficAlertDetail}/${row.id}`)
|
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)
|
const exportDialogVisible = ref(false)
|
||||||
|
|||||||
@@ -56,10 +56,11 @@
|
|||||||
</div>
|
</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">
|
<ElAlert type="info" :closable="false" show-icon class="import-alert">
|
||||||
<template #title>导入说明</template>
|
<template #title>导入说明</template>
|
||||||
<div>通过 CSV 批量交接或清空店铺平台业务员。</div>
|
<div>通过 CSV 批量交接或清空店铺平台业务员。</div>
|
||||||
|
<div>注意: 清空不要填写业务员登录账号</div>
|
||||||
<div>
|
<div>
|
||||||
表头固定:<code>店铺编码,操作类型,业务员登录账号,备注</code>;操作类型仅支持「换绑」或「清空」。
|
表头固定:<code>店铺编码,操作类型,业务员登录账号,备注</code>;操作类型仅支持「换绑」或「清空」。
|
||||||
</div>
|
</div>
|
||||||
@@ -359,8 +360,8 @@
|
|||||||
const handleDownloadTemplate = () => {
|
const handleDownloadTemplate = () => {
|
||||||
try {
|
try {
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = new URL('@/template/业务负责人导入模板.csv', import.meta.url).href
|
link.href = new URL('@/template/批量换绑业务员模板.csv', import.meta.url).href
|
||||||
link.download = '业务负责人导入模板.csv'
|
link.download = '批量换绑业务员模板.csv'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
|
|||||||
@@ -329,13 +329,6 @@
|
|||||||
|
|
||||||
const getActions = (row: BusinessUserGroupItem) => {
|
const getActions = (row: BusinessUserGroupItem) => {
|
||||||
const actions: Array<{ label: string; handler: () => void; type?: 'primary' | 'danger' }> = []
|
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)) {
|
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.members)) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '成员',
|
label: '成员',
|
||||||
@@ -343,6 +336,13 @@
|
|||||||
type: 'primary'
|
type: 'primary'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.update)) {
|
||||||
|
actions.push({
|
||||||
|
label: '编辑',
|
||||||
|
handler: () => openEditDialog(row),
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
|
}
|
||||||
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.delete)) {
|
if (hasAuth(BUSINESS_USER_GROUP_PERMISSIONS.delete)) {
|
||||||
actions.push({
|
actions.push({
|
||||||
label: '删除',
|
label: '删除',
|
||||||
|
|||||||
@@ -1276,7 +1276,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到业务负责人导入页
|
// 跳转到批量换绑业务员页
|
||||||
const goToImportPage = () => {
|
const goToImportPage = () => {
|
||||||
router.push(RoutesAlias.BusinessOwnerImport)
|
router.push(RoutesAlias.BusinessOwnerImport)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user