feat(shopDealerApply): 调整经销商申请页面字段与状态展示

- 新增 `dealerName` 字段用于搜索和展示客户名称
- 将“申请人姓名”搜索项改为“客户名称”
- 更新审核状态标签文案:待审核 → 跟进中,已通过 → 已签约,已驳回 → 已取消
- 移除“申请方式”筛选项- 修改“申请时间”为“添加时间”- 表格列结构调整,合并客户信息展示,增加报备人信息- 移除部分操作按钮及导出功能
- 双击行不再触发编辑操作- 启用本地开发环境 API 地址配置```
This commit is contained in:
2025-09-23 17:36:38 +08:00
parent da620dd961
commit 5516e994d5
4 changed files with 59 additions and 118 deletions

View File

@@ -8,10 +8,10 @@
class="search-form"
@finish="handleSearch"
>
<a-form-item label="申请人姓名">
<a-form-item label="客户名称">
<a-input
v-model:value="searchForm.realName"
placeholder="请输入申请人姓名"
v-model:value="searchForm.dealerName"
placeholder="请输入客户名称"
allow-clear
style="width: 160px"
/>
@@ -26,18 +26,6 @@
/>
</a-form-item>
<a-form-item label="申请方式">
<a-select
v-model:value="searchForm.applyType"
placeholder="全部方式"
allow-clear
style="width: 120px"
>
<a-select-option :value="10">需要审核</a-select-option>
<a-select-option :value="20">免审核</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="审核状态">
<a-select
v-model:value="searchForm.applyStatus"
@@ -45,13 +33,13 @@
allow-clear
style="width: 120px"
>
<a-select-option :value="10">待审核</a-select-option>
<a-select-option :value="20">审核通过</a-select-option>
<a-select-option :value="30">审核驳回</a-select-option>
<a-select-option :value="10">跟进中</a-select-option>
<a-select-option :value="20">已签约</a-select-option>
<a-select-option :value="30">已取消</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="申请时间">
<a-form-item label="添加时间">
<a-range-picker
v-model:value="searchForm.dateRange"
style="width: 240px"
@@ -72,50 +60,13 @@
</a-space>
</a-form-item>
</a-form>
<!-- 操作按钮 -->
<div class="action-buttons">
<a-space>
<!-- <a-button type="primary" @click="add" class="ele-btn-icon">-->
<!-- <template #icon>-->
<!-- <PlusOutlined />-->
<!-- </template>-->
<!-- 新增申请-->
<!-- </a-button>-->
<a-button
type="primary"
ghost
:disabled="!selection?.length"
@click="batchApprove"
class="ele-btn-icon"
>
<template #icon>
<CheckOutlined />
</template>
批量通过
</a-button>
<a-button
:disabled="!selection?.length"
@click="exportData"
class="ele-btn-icon"
>
<template #icon>
<ExportOutlined />
</template>
导出数据
</a-button>
</a-space>
</div>
</div>
</template>
<script lang="ts" setup>
import { reactive } from 'vue';
import {
PlusOutlined,
SearchOutlined,
CheckOutlined,
ExportOutlined
SearchOutlined
} from '@ant-design/icons-vue';
import type { ShopDealerApplyParam } from '@/api/shop/shopDealerApply/model';
import dayjs from 'dayjs';
@@ -166,6 +117,9 @@
searchParams.startTime = dayjs(searchForm.dateRange[0]).format('YYYY-MM-DD');
searchParams.endTime = dayjs(searchForm.dateRange[1]).format('YYYY-MM-DD');
}
if(searchForm.dealerName){
searchParams.dealerName = searchForm.dealerName;
}
emit('search', searchParams);
};
@@ -180,20 +134,6 @@
emit('search', {});
};
// 新增
const add = () => {
emit('add');
};
// 批量通过
const batchApprove = () => {
emit('batchApprove');
};
// 导出数据
const exportData = () => {
emit('export');
};
</script>
<style lang="less" scoped>

View File

@@ -9,7 +9,6 @@
:customRow="customRow"
tool-class="ele-toolbar-form"
class="sys-org-table"
v-model:selection="selection"
>
<template #toolbar>
<search
@@ -22,9 +21,22 @@
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'applyStatus'">
<a-tag v-if="record.applyStatus === 10" color="orange">待审核</a-tag>
<a-tag v-if="record.applyStatus === 20" color="green">通过</a-tag>
<a-tag v-if="record.applyStatus === 30" color="red">驳回</a-tag>
<a-tag v-if="record.applyStatus === 10" color="orange">跟进中</a-tag>
<a-tag v-if="record.applyStatus === 20" color="green">签约</a-tag>
<a-tag v-if="record.applyStatus === 30" color="red">取消</a-tag>
</template>
<template v-if="column.key === 'customer'">
<div class="flex flex-col">
<span class="font-medium">{{ record.dealerName }}</span>
<span>联系人{{ record.realName }}</span>
<span>联系电话{{ record.mobile }}</span>
</div>
</template>
<template v-if="column.key === 'createTime'">
<div class="flex flex-col">
<span>{{ record.createTime }}</span>
<span>保护期7</span>
</div>
</template>
<template v-if="column.key === 'action'">
<a @click="openEdit(record)" class="ele-text-primary">
@@ -35,7 +47,7 @@
<a-divider type="vertical"/>
<a @click="approveApply(record)" class="ele-text-success">
<CheckOutlined/>
通过
已签约
</a>
<a-divider type="vertical"/>
<a @click="rejectApply(record)" class="ele-text-warning">
@@ -135,20 +147,9 @@ const columns = ref<ColumnItem[]>([
fixed: 'left'
},
{
title: '申请人信息',
key: 'applicantInfo',
align: 'left',
fixed: 'left',
customRender: ({record}) => {
return `${record.realName || '-'} (${record.mobile || '-'})`;
}
},
{
title: '申请方式',
dataIndex: 'applyType',
key: 'applyType',
align: 'center',
width: 120,
title: '客户名称',
dataIndex: 'customer',
key: 'customer',
customRender: ({text}) => {
const typeMap = {
10: {text: '需审核', color: 'orange'},
@@ -159,20 +160,27 @@ const columns = ref<ColumnItem[]>([
}
},
{
title: '审核状态',
title: '跟进情况',
dataIndex: 'comments',
key: 'comments',
align: 'left'
},
{
title: '报备人信息',
key: 'applicantInfo',
align: 'left',
fixed: 'left',
customRender: ({record}) => {
return `${record.nickName || '-'} (${record.phone || '-'})`;
}
},
{
title: '状态',
dataIndex: 'applyStatus',
key: 'applyStatus',
align: 'center',
width: 120
},
{
title: '推荐人',
dataIndex: 'refereeId',
key: 'refereeId',
align: 'center',
width: 100,
customRender: ({text}) => text ? `ID: ${text}` : '无'
},
// {
// title: '申请时间',
// dataIndex: 'applyTime',
@@ -189,29 +197,21 @@ const columns = ref<ColumnItem[]>([
// customRender: ({ text }) => text ? toDateString(new Date(text), 'yyyy-MM-dd HH:mm') : '-'
// },
{
title: '驳回原因',
dataIndex: 'rejectReason',
key: 'rejectReason',
align: 'left',
ellipsis: true,
customRender: ({text}) => text || '-'
},
{
title: '创建时间',
title: '添加时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center',
sorter: true,
ellipsis: true
},
{
title: '操作',
key: 'action',
fixed: 'right',
align: 'center',
width: 380,
hideInSetting: true
}
// {
// title: '操作',
// key: 'action',
// fixed: 'right',
// align: 'center',
// width: 380,
// hideInSetting: true
// }
]);
/* 搜索 */
@@ -416,7 +416,7 @@ const customRow = (record: ShopDealerApply) => {
},
// 行双击事件
onDblclick: () => {
openEdit(record);
// openEdit(record);
}
};
};