feat(shop): 添加经销商申请导入功能

- 新增经销商申请导入接口和相关页面组件
- 更新经销商申请列表,增加导入按钮和相关功能
- 修改经销商用户相关页面,适应新的业务需求
- 优化环境变量配置
This commit is contained in:
2025-09-06 02:25:39 +08:00
parent f5a1686de1
commit a0375d8a97
10 changed files with 196 additions and 234 deletions

View File

@@ -25,17 +25,15 @@
<a-tag v-if="record.isDelete === 1" color="red">已删除</a-tag>
<a-tag v-else color="green">正常</a-tag>
</template>
<template v-if="column.key === 'money'">
{{ record.money }}
</template>
<template v-if="column.key === 'action'">
<a @click="openEdit(record)" class="ele-text-primary">
<EditOutlined/>
编辑
</a>
<a-divider type="vertical"/>
<a @click="viewDetail(record)" class="ele-text-info">
<EyeOutlined/>
详情
</a>
<a-divider type="vertical"/>
<a-popconfirm
title="确定要删除此分销商用户吗?"
@confirm="remove(record)"
@@ -62,7 +60,6 @@ import {message, Modal} from 'ant-design-vue';
import {
ExclamationCircleOutlined,
EditOutlined,
EyeOutlined,
DeleteOutlined
} from '@ant-design/icons-vue';
import type {EleProTable} from 'ele-admin-pro';
@@ -102,6 +99,7 @@ const datasource: DatasourceFunction = ({
if (filters) {
where.status = filters.status;
}
where.type = 0;
return pageShopDealerUser({
...where,
...orders,
@@ -143,6 +141,26 @@ const columns = ref<ColumnItem[]>([
align: 'center',
width: 180
},
{
title: '供电局',
key: 'money4',
align: 'center'
},
{
title: '供电分局',
key: 'money3',
align: 'center'
},
{
title: '供电所',
key: 'money2',
align: 'center'
},
{
title: '渠道负责人',
key: 'comments',
align: 'center'
},
{
title: '状态',
key: 'userStatus',
@@ -187,43 +205,6 @@ const openEdit = (row?: ShopDealerUser) => {
showEdit.value = true;
};
/* 查看详情 */
const viewDetail = (row: ShopDealerUser) => {
Modal.info({
title: '分销商用户详情',
width: 600,
content: createVNode('div', {style: 'max-height: 400px; overflow-y: auto;'}, [
createVNode('div', {class: 'detail-item'}, [
createVNode('strong', null, '基本信息'),
createVNode('p', null, `姓名: ${row.realName || '-'}`),
createVNode('p', null, `手机号: ${row.mobile || '-'}`),
createVNode('p', null, `用户ID: ${row.userId || '-'}`),
createVNode('p', null, `推荐人ID: ${row.refereeId || '无'}`),
]),
createVNode('div', {class: 'detail-item', style: 'margin-top: 16px;'}, [
createVNode('strong', null, '佣金信息'),
createVNode('p', null, `可提现佣金: ¥${parseFloat(row.money || '0').toFixed(2)}`),
createVNode('p', null, `冻结佣金: ¥${parseFloat(row.freezeMoney || '0').toFixed(2)}`),
createVNode('p', null, `累计提现: ¥${parseFloat(row.totalMoney || '0').toFixed(2)}`),
]),
createVNode('div', {class: 'detail-item', style: 'margin-top: 16px;'}, [
createVNode('strong', null, '团队信息'),
createVNode('p', null, `一级成员: ${row.firstNum || 0}`),
createVNode('p', null, `二级成员: ${row.secondNum || 0}`),
createVNode('p', null, `三级成员: ${row.thirdNum || 0}`),
createVNode('p', null, `团队总数: ${(row.firstNum || 0) + (row.secondNum || 0) + (row.thirdNum || 0)}`),
]),
createVNode('div', {class: 'detail-item', style: 'margin-top: 16px;'}, [
createVNode('strong', null, '其他信息'),
createVNode('p', null, `专属二维码: ${row.qrcode ? '已生成' : '未生成'}`),
createVNode('p', null, `创建时间: ${row.createTime ? toDateString(row.createTime, 'yyyy-MM-dd HH:mm:ss') : '-'}`),
createVNode('p', null, `更新时间: ${row.updateTime ? toDateString(row.updateTime, 'yyyy-MM-dd HH:mm:ss') : '-'}`),
])
]),
okText: '关闭'
});
};
/* 打开批量移动弹窗 */
const openMove = () => {
showMove.value = true;