feat(shop): 添加配送员和门店管理功能

- 在ShopDealerUser模型中新增dealerName和community字段
- 添加realName和mobile搜索参数支持
- 将经销商类型重命名为分销商,并添加配送员类型
- 新增配送员管理页面(src/views/shop/shopDealerUserDelivery)
- 新增门店管理页面(src/views/shop/shopDealerUserShop)
- 为不同类型的用户创建独立的搜索组件
- 实现配送员编辑弹窗功能
- 更新表格显示逻辑以支持不同类型用户过滤
This commit is contained in:
2026-01-29 20:43:01 +08:00
parent ec8cc3a8de
commit fad67cdbad
10 changed files with 1790 additions and 14 deletions

View File

@@ -1,19 +1,21 @@
<!-- 搜索表单 -->
<template>
<a-space :size="10" style="flex-wrap: wrap">
<a-button type="primary" class="ele-btn-icon" @click="add">
<template #icon>
<PlusOutlined />
</template>
<span>添加</span>
</a-button>
<a-input-search
allow-clear
placeholder="姓名|电话"
style="width: 240px"
v-model:value="where.keywords"
@search="reload"
/>
</a-space>
</template>
<script lang="ts" setup>
import { PlusOutlined } from '@ant-design/icons-vue';
import type { GradeParam } from '@/api/user/grade/model';
import { watch } from 'vue';
import useSearch from "@/utils/use-search";
import {ShopDealerUserParam} from "@/api/shop/shopDealerUser/model";
const props = withDefaults(
defineProps<{
@@ -30,11 +32,18 @@
(e: 'batchMove'): void;
}>();
// 新增
const add = () => {
emit('add');
const reload = () => {
emit('search', where);
};
// 表单数据
const { where } = useSearch<ShopDealerUserParam>({
keywords: '',
userId: undefined,
mobile: undefined,
realName: undefined
});
watch(
() => props.selection,
() => {}

View File

@@ -38,9 +38,9 @@
<a-col :span="12">
<a-form-item label="类型" name="type">
<a-select v-model:value="form.type" placeholder="请选择类型">
<a-select-option :value="0">销商</a-select-option>
<a-select-option :value="0">销商</a-select-option>
<a-select-option :value="1">门店</a-select-option>
<!-- <a-select-option :value="2">集团</a-select-option>-->
<a-select-option :value="2">配送员</a-select-option>
</a-select>
</a-form-item>
</a-col>

View File

@@ -24,9 +24,9 @@
<a-image :src="record.image" :width="50" />
</template>
<template v-if="column.key === 'type'">
<a-tag v-if="record.type === 0">销商</a-tag>
<a-tag v-if="record.type === 0">销商</a-tag>
<a-tag v-if="record.type === 1" color="orange">门店</a-tag>
<!-- <a-tag v-if="record.type === 2" color="purple">集团</a-tag>-->
<a-tag v-if="record.type === 2" color="purple">配送员</a-tag>
</template>
<template v-if="column.key === 'qrcode'">
<QrcodeOutlined :style="{fontSize: '24px'}" @click="openQrCode(record)" />