feat(shop): 添加小区、门店、配送员、店员、仓库管理功能及相关API

- 新增小区管理模块,包括查询、添加、修改、删除等功能
- 新增门店管理模块,包含门店基础信息管理功能
- 新增配送员管理模块,支持骑手信息配置及工作状态管理
- 新增店员管理模块,用于门店人员信息维护
- 新增仓库管理模块,支持不同类型的仓库信息管理
- 添加电子围栏功能,支持圆形和方形围栏设置
- 更新经销商用户模型,增加类型、头像、店铺名称等字段
- 更新订单模型,添加物流单号、昵称等字段
- 更新商品模型,调整分销佣金相关字段设计
- 修复信用模块中部分字段映射错误问题
- 优化邀请链接生成逻辑,增加租户ID参数传递
- 移除部分不必要部门字段显示,简化管理员界面
This commit is contained in:
2026-03-04 14:04:57 +08:00
parent fe20f0f0b3
commit a9d513fca4
77 changed files with 9319 additions and 2023 deletions

View File

@@ -0,0 +1,105 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopCommunity, ShopCommunityParam } from './model';
/**
* 分页查询小区
*/
export async function pageShopCommunity(params: ShopCommunityParam) {
const res = await request.get<ApiResult<PageResult<ShopCommunity>>>(
'/shop/shop-community/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询小区列表
*/
export async function listShopCommunity(params?: ShopCommunityParam) {
const res = await request.get<ApiResult<ShopCommunity[]>>(
'/shop/shop-community',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加小区
*/
export async function addShopCommunity(data: ShopCommunity) {
const res = await request.post<ApiResult<unknown>>(
'/shop/shop-community',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改小区
*/
export async function updateShopCommunity(data: ShopCommunity) {
const res = await request.put<ApiResult<unknown>>(
'/shop/shop-community',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除小区
*/
export async function removeShopCommunity(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/shop/shop-community/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除小区
*/
export async function removeBatchShopCommunity(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
'/shop/shop-community/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询小区
*/
export async function getShopCommunity(id: number) {
const res = await request.get<ApiResult<ShopCommunity>>(
'/shop/shop-community/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,35 @@
import type { PageParam } from '@/api';
/**
* 小区
*/
export interface ShopCommunity {
// ID
id?: number;
// 小区名称
name?: string;
// 小区编号
code?: string;
// 详细地址
address?: string;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0正常, 1冻结
status?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 小区搜索条件
*/
export interface ShopCommunityParam extends PageParam {
id?: number;
name?: string;
code?: string;
keywords?: string;
}