feat(dealer): 添加经销商申请管理功能

- 新增经销商申请页面,支持申请列表展示和分页查询
- 添加搜索组件,支持按客户名称、联系电话、审核状态等条件筛选
- 实现申请状态管理,包括跟进中、已签约、已取消三种状态
- 开发编辑弹窗功能,支持新增和修改申请信息
- 添加审核功能,支持批量通过和单个驳回操作
- 集成跟进记录管理,可查看历史记录并添加新的跟进内容
- 完善表单验证,包含必填字段校验和格式验证
- 优化模型定义,在相关实体中增加头像、昵称、真实姓名等字段
- 调整商品模型,将isShow字段从数字类型改为布尔类型
- 新增分销佣金相关字段,支持固定金额和百分比两种分佣类型
This commit is contained in:
2026-01-28 22:37:37 +08:00
parent b9d2648e6f
commit f96d4d8530
55 changed files with 11377 additions and 1383 deletions

View File

@@ -0,0 +1,89 @@
<!-- 经销商订单导入弹窗 -->
<template>
<ele-modal
:width="520"
:footer="null"
title="导入分销订单"
:visible="visible"
@update:visible="updateVisible"
>
<a-spin :spinning="loading">
<a-upload-dragger
accept=".xls,.xlsx"
:show-upload-list="false"
:customRequest="doUpload"
style="padding: 24px 0; margin-bottom: 16px"
>
<p class="ant-upload-drag-icon">
<cloud-upload-outlined />
</p>
<p class="ant-upload-hint">将文件拖到此处或点击上传</p>
</a-upload-dragger>
<div class="ant-upload-text text-gray-400">
<div
>1必须按<a
href="https://oss.wsdns.cn/20251018/408b805ec3cd4084a4dc686e130af578.xlsx"
target="_blank"
>导入模版</a
>的格式上传</div
>
<div>2导入成功确认结算完成佣金的发放</div>
</div>
</a-spin>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { message } from 'ant-design-vue/es';
import { CloudUploadOutlined } from '@ant-design/icons-vue';
import { importSdyDealerOrder } from '@/api/sdy/sdyDealerOrder';
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
defineProps<{
// 是否打开弹窗
visible: boolean;
}>();
// 导入请求状态
const loading = ref(false);
/* 上传 */
const doUpload = ({ file }) => {
if (
![
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
].includes(file.type)
) {
message.error('只能选择 excel 文件');
return false;
}
if (file.size / 1024 / 1024 > 10) {
message.error('大小不能超过 10MB');
return false;
}
loading.value = true;
importSdyDealerOrder(file)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
return false;
};
/* 更新 visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
</script>