feat(shop): 添加小区、配送员、门店等相关功能模块

- 新增 ShopCommunity 相关 API 接口和模型定义
- 新增 ShopRider 配送员管理模块及相应接口实现
- 新增 ShopStore 门店管理模块及数据模型
- 新增 ShopStoreRider 门店配送员关联关系管理
- 新增 ShopStoreUser 店员管理功能模块
- 在配送员用户界面添加所属门店字段显示
- 重构配送员相关组件和页面实现
- 添加小区选择组件及相应的交互功能
- 实现完整的 CRUD 操作接口包括分页、新增、修改、删除等
- 添加批量操作功能支持
- 优化数据表格展示和搜索功能
This commit is contained in:
2026-01-30 15:04:18 +08:00
parent fad67cdbad
commit 055e53e06e
31 changed files with 3894 additions and 57 deletions

View File

@@ -1,7 +1,7 @@
<!-- 编辑弹窗 -->
<template>
<ele-modal
:width="900"
:width="1000"
:visible="visible"
:maskClosable="false"
:maxable="maxable"
@@ -36,11 +36,11 @@
</a-col>
<a-col :span="12">
<a-form-item label="小区名称" name="community">
<a-input
allow-clear
:maxlength="20"
placeholder="请输入小区名称"
v-model:value="form.community"
<SelectCommunity
:key="`community`"
:value="form.community"
:placeholder="`选择小区`"
@done="onCommunity"
/>
</a-form-item>
</a-col>
@@ -223,8 +223,9 @@
import { storeToRefs } from 'pinia';
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model';
import type { User } from '@/api/system/user/model';
import SelectCommunity from '@/components/SelectCommunity/index.vue';
import {ShopCommunity} from "@/api/shop/shopCommunity/model";
// 是否是修改
const isUpdate = ref(false);
@@ -288,14 +289,6 @@
emit('update:visible', value);
};
const createTimeText = computed(() => {
return form.createTime ? toDateString(form.createTime, 'yyyy-MM-dd HH:mm:ss') : '';
});
const updateTimeText = computed(() => {
return form.updateTime ? toDateString(form.updateTime, 'yyyy-MM-dd HH:mm:ss') : '';
});
const selectedUserText = ref<string>('');
// 表单验证规则
@@ -319,11 +312,19 @@
trigger: 'change'
}
],
realName: [
dealerName: [
{
required: true,
type: 'string',
message: '请填写真实姓名',
message: '请填写店铺名称',
trigger: 'blur'
}
],
community: [
{
required: true,
type: 'string',
message: '请选择所在小区',
trigger: 'blur'
}
],
@@ -372,19 +373,9 @@
selectedUserText.value = phone ? `${name}${phone}` : name;
};
const chooseImage = (data: FileRecord) => {
images.value.push({
uid: data.id,
url: data.path,
status: 'done'
});
form.image = data.path;
};
const onDeleteItem = (index: number) => {
images.value.splice(index, 1);
form.image = '';
};
const onCommunity = (data: ShopCommunity) => {
form.community = data.name;
}
const { resetFields } = useForm(form, rules);