优化网站导航模块
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
VITE_APP_NAME=后台管理系统
|
VITE_APP_NAME=后台管理系统
|
||||||
VITE_SOCKET_URL=wss://server.gxwebsoft.com
|
VITE_SOCKET_URL=wss://server.gxwebsoft.com
|
||||||
VITE_SERVER_URL=https://server.gxwebsoft.com/api
|
VITE_SERVER_URL=https://server.gxwebsoft.com/api
|
||||||
|
VITE_THINK_URL=https://gxtyzx-api.websoft.top/api
|
||||||
#VITE_API_URL=https://modules.gxwebsoft.com/api
|
#VITE_API_URL=https://modules.gxwebsoft.com/api
|
||||||
|
|
||||||
#VITE_SERVER_URL=http://127.0.0.1:9091/api
|
|
||||||
VITE_API_URL=http://127.0.0.1:9099/api
|
#VITE_SERVER_URL=http://127.0.0.1:9090/api
|
||||||
|
VITE_API_URL=http://127.0.0.1:9001/api
|
||||||
|
#VITE_THINK_URL=http://127.0.0.1:9099/api
|
||||||
|
#/booking/bookingItem
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
VITE_APP_NAME=后台管理系统
|
VITE_APP_NAME=后台管理系统
|
||||||
VITE_SOCKET_URL=wss://server.gxwebsoft.com
|
VITE_SOCKET_URL=wss://server.gxwebsoft.com
|
||||||
VITE_SERVER_URL=https://server.gxwebsoft.com/api
|
VITE_SERVER_URL=https://server.gxwebsoft.com/api
|
||||||
|
VITE_THINK_URL=https://gxtyzx-api.websoft.top/api
|
||||||
VITE_API_URL=https://modules.gxwebsoft.com/api
|
VITE_API_URL=https://modules.gxwebsoft.com/api
|
||||||
|
|
||||||
#VITE_API_URL=http://103.233.255.195:9300/api
|
|
||||||
|
|||||||
106
modules/api/booking_____/bookingCard/index.ts
Normal file
106
modules/api/booking_____/bookingCard/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingCard, BookingCardParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询会员卡
|
||||||
|
*/
|
||||||
|
export async function pageBookingCard(params: BookingCardParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingCard>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会员卡列表
|
||||||
|
*/
|
||||||
|
export async function listBookingCard(params?: BookingCardParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingCard[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加会员卡
|
||||||
|
*/
|
||||||
|
export async function addBookingCard(data: BookingCard) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会员卡
|
||||||
|
*/
|
||||||
|
export async function updateBookingCard(data: BookingCard) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会员卡
|
||||||
|
*/
|
||||||
|
export async function removeBookingCard(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除会员卡
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingCard(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询会员卡
|
||||||
|
*/
|
||||||
|
export async function getBookingCard(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingCard>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
modules/api/booking_____/bookingCard/model/index.ts
Normal file
57
modules/api/booking_____/bookingCard/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员卡
|
||||||
|
*/
|
||||||
|
export interface BookingCard {
|
||||||
|
// ID
|
||||||
|
cardId?: number;
|
||||||
|
// 会员卡名称
|
||||||
|
cardName?: string;
|
||||||
|
// 会员卡标识
|
||||||
|
cardCode?: string;
|
||||||
|
// 会员卡介绍
|
||||||
|
cardDesc?: string;
|
||||||
|
// 卡类型:1成人卡,2儿童卡
|
||||||
|
cardType?: number;
|
||||||
|
// IC卡类型:1年卡,2次卡,3月卡,4会员IC卡,5充值卡
|
||||||
|
type?: number;
|
||||||
|
// 会员卡图片
|
||||||
|
image?: string;
|
||||||
|
// 价格
|
||||||
|
price?: string;
|
||||||
|
// 次数
|
||||||
|
number?: number;
|
||||||
|
// 月份
|
||||||
|
month?: number;
|
||||||
|
// 折扣
|
||||||
|
discount?: string;
|
||||||
|
// 老师介绍
|
||||||
|
content?: string;
|
||||||
|
// 关联用户
|
||||||
|
userId?: number;
|
||||||
|
// 商户ID
|
||||||
|
merchantId?: number;
|
||||||
|
// 商户类型
|
||||||
|
merchantType?: string;
|
||||||
|
// 适用的场馆ID
|
||||||
|
merchantIds?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员卡搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingCardParam extends PageParam {
|
||||||
|
cardId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingCardPlan/index.ts
Normal file
106
modules/api/booking_____/bookingCardPlan/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingCardPlan, BookingCardPlanParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询会员卡类型
|
||||||
|
*/
|
||||||
|
export async function pageBookingCardPlan(params: BookingCardPlanParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingCardPlan>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card-plan/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会员卡类型列表
|
||||||
|
*/
|
||||||
|
export async function listBookingCardPlan(params?: BookingCardPlanParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingCardPlan[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card-plan',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加会员卡类型
|
||||||
|
*/
|
||||||
|
export async function addBookingCardPlan(data: BookingCardPlan) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card-plan',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会员卡类型
|
||||||
|
*/
|
||||||
|
export async function updateBookingCardPlan(data: BookingCardPlan) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card-plan',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会员卡类型
|
||||||
|
*/
|
||||||
|
export async function removeBookingCardPlan(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card-plan/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除会员卡类型
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingCardPlan(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card-plan/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询会员卡类型
|
||||||
|
*/
|
||||||
|
export async function getBookingCardPlan(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingCardPlan>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-card-plan/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
33
modules/api/booking_____/bookingCardPlan/model/index.ts
Normal file
33
modules/api/booking_____/bookingCardPlan/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员卡类型
|
||||||
|
*/
|
||||||
|
export interface BookingCardPlan {
|
||||||
|
// ID
|
||||||
|
cardPlanId?: number;
|
||||||
|
// 会员卡名称
|
||||||
|
name?: string;
|
||||||
|
// 标识
|
||||||
|
code?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员卡类型搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingCardPlanParam extends PageParam {
|
||||||
|
cardPlanId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingCooperate/index.ts
Normal file
106
modules/api/booking_____/bookingCooperate/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingCooperate, BookingCooperateParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询商务合作
|
||||||
|
*/
|
||||||
|
export async function pageBookingCooperate(params: BookingCooperateParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingCooperate>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商务合作列表
|
||||||
|
*/
|
||||||
|
export async function listBookingCooperate(params?: BookingCooperateParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingCooperate[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加商务合作
|
||||||
|
*/
|
||||||
|
export async function addBookingCooperate(data: BookingCooperate) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商务合作
|
||||||
|
*/
|
||||||
|
export async function updateBookingCooperate(data: BookingCooperate) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商务合作
|
||||||
|
*/
|
||||||
|
export async function removeBookingCooperate(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商务合作
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingCooperate(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询商务合作
|
||||||
|
*/
|
||||||
|
export async function getBookingCooperate(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingCooperate>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
33
modules/api/booking_____/bookingCooperate/model/index.ts
Normal file
33
modules/api/booking_____/bookingCooperate/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商务合作
|
||||||
|
*/
|
||||||
|
export interface BookingCooperate {
|
||||||
|
// ID
|
||||||
|
cooperateId?: number;
|
||||||
|
// 部门名称
|
||||||
|
name?: string;
|
||||||
|
// 咨询电话
|
||||||
|
phone?: string;
|
||||||
|
// 图片
|
||||||
|
image?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商务合作搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingCooperateParam extends PageParam {
|
||||||
|
cooperateId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingCooperateLog/index.ts
Normal file
106
modules/api/booking_____/bookingCooperateLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingCooperateLog, BookingCooperateLogParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询商务合作留言记录
|
||||||
|
*/
|
||||||
|
export async function pageBookingCooperateLog(params: BookingCooperateLogParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingCooperateLog>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate-log/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商务合作留言记录列表
|
||||||
|
*/
|
||||||
|
export async function listBookingCooperateLog(params?: BookingCooperateLogParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingCooperateLog[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate-log',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加商务合作留言记录
|
||||||
|
*/
|
||||||
|
export async function addBookingCooperateLog(data: BookingCooperateLog) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商务合作留言记录
|
||||||
|
*/
|
||||||
|
export async function updateBookingCooperateLog(data: BookingCooperateLog) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商务合作留言记录
|
||||||
|
*/
|
||||||
|
export async function removeBookingCooperateLog(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商务合作留言记录
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingCooperateLog(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate-log/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询商务合作留言记录
|
||||||
|
*/
|
||||||
|
export async function getBookingCooperateLog(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingCooperateLog>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-cooperate-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
35
modules/api/booking_____/bookingCooperateLog/model/index.ts
Normal file
35
modules/api/booking_____/bookingCooperateLog/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商务合作留言记录
|
||||||
|
*/
|
||||||
|
export interface BookingCooperateLog {
|
||||||
|
// ID
|
||||||
|
logId?: number;
|
||||||
|
// 关联ID
|
||||||
|
cooperateId?: number;
|
||||||
|
// 部门名称
|
||||||
|
name?: string;
|
||||||
|
// 咨询电话
|
||||||
|
phone?: string;
|
||||||
|
// 图片
|
||||||
|
image?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商务合作留言记录搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingCooperateLogParam extends PageParam {
|
||||||
|
logId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingCoupon/index.ts
Normal file
106
modules/api/booking_____/bookingCoupon/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingCoupon, BookingCouponParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询我的优惠券
|
||||||
|
*/
|
||||||
|
export async function pageBookingCoupon(params: BookingCouponParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingCoupon>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-coupon/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我的优惠券列表
|
||||||
|
*/
|
||||||
|
export async function listBookingCoupon(params?: BookingCouponParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingCoupon[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-coupon',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加我的优惠券
|
||||||
|
*/
|
||||||
|
export async function addBookingCoupon(data: BookingCoupon) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-coupon',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改我的优惠券
|
||||||
|
*/
|
||||||
|
export async function updateBookingCoupon(data: BookingCoupon) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-coupon',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除我的优惠券
|
||||||
|
*/
|
||||||
|
export async function removeBookingCoupon(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-coupon/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除我的优惠券
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingCoupon(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-coupon/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询我的优惠券
|
||||||
|
*/
|
||||||
|
export async function getBookingCoupon(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingCoupon>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-coupon/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
55
modules/api/booking_____/bookingCoupon/model/index.ts
Normal file
55
modules/api/booking_____/bookingCoupon/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的优惠券
|
||||||
|
*/
|
||||||
|
export interface BookingCoupon {
|
||||||
|
// id
|
||||||
|
id?: number;
|
||||||
|
// 优惠券名称
|
||||||
|
name?: string;
|
||||||
|
// 优惠券类型(10满减券 20折扣券)
|
||||||
|
type?: number;
|
||||||
|
// 满减券-减免金额
|
||||||
|
reducePrice?: string;
|
||||||
|
// 折扣券-折扣率(0-100)
|
||||||
|
discount?: number;
|
||||||
|
// 最低消费金额
|
||||||
|
minPrice?: string;
|
||||||
|
// 到期类型(10领取后生效 20固定时间)
|
||||||
|
expireType?: number;
|
||||||
|
// 领取后生效-有效天数
|
||||||
|
expireDay?: number;
|
||||||
|
// 有效期开始时间
|
||||||
|
startTime?: string;
|
||||||
|
// 有效期结束时间
|
||||||
|
endTime?: string;
|
||||||
|
// 适用范围(10全部商品 20指定商品)
|
||||||
|
applyRange?: number;
|
||||||
|
// 适用范围配置(json格式)
|
||||||
|
applyRangeConfig?: string;
|
||||||
|
// 是否过期(0未过期 1已过期)
|
||||||
|
isExpire?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0待使用, 1已使用, 2已失效
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的优惠券搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingCouponParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingEmergency/index.ts
Normal file
106
modules/api/booking_____/bookingEmergency/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingEmergency, BookingEmergencyParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询紧急联系人管理
|
||||||
|
*/
|
||||||
|
export async function pageBookingEmergency(params: BookingEmergencyParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingEmergency>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-emergency/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询紧急联系人管理列表
|
||||||
|
*/
|
||||||
|
export async function listBookingEmergency(params?: BookingEmergencyParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingEmergency[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-emergency',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加紧急联系人管理
|
||||||
|
*/
|
||||||
|
export async function addBookingEmergency(data: BookingEmergency) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-emergency',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改紧急联系人管理
|
||||||
|
*/
|
||||||
|
export async function updateBookingEmergency(data: BookingEmergency) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-emergency',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除紧急联系人管理
|
||||||
|
*/
|
||||||
|
export async function removeBookingEmergency(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-emergency/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除紧急联系人管理
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingEmergency(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-emergency/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询紧急联系人管理
|
||||||
|
*/
|
||||||
|
export async function getBookingEmergency(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingEmergency>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-emergency/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
35
modules/api/booking_____/bookingEmergency/model/index.ts
Normal file
35
modules/api/booking_____/bookingEmergency/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 紧急联系人管理
|
||||||
|
*/
|
||||||
|
export interface BookingEmergency {
|
||||||
|
// ID
|
||||||
|
emergencyId?: number;
|
||||||
|
// 姓名
|
||||||
|
name?: string;
|
||||||
|
// 手机号
|
||||||
|
phone?: string;
|
||||||
|
// 关联用户
|
||||||
|
userId?: number;
|
||||||
|
// 商户ID
|
||||||
|
merchantId?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 紧急联系人管理搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingEmergencyParam extends PageParam {
|
||||||
|
emergencyId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingField/index.ts
Normal file
106
modules/api/booking_____/bookingField/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingField, BookingFieldParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询场馆场地
|
||||||
|
*/
|
||||||
|
export async function pageBookingField(params: BookingFieldParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingField>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-field/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询场馆场地列表
|
||||||
|
*/
|
||||||
|
export async function listBookingField(params?: BookingFieldParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingField[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-field',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加场馆场地
|
||||||
|
*/
|
||||||
|
export async function addBookingField(data: BookingField) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-field',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改场馆场地
|
||||||
|
*/
|
||||||
|
export async function updateBookingField(data: BookingField) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-field',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除场馆场地
|
||||||
|
*/
|
||||||
|
export async function removeBookingField(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-field/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除场馆场地
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingField(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-field/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询场馆场地
|
||||||
|
*/
|
||||||
|
export async function getBookingField(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingField>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-field/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
45
modules/api/booking_____/bookingField/model/index.ts
Normal file
45
modules/api/booking_____/bookingField/model/index.ts
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场馆场地
|
||||||
|
*/
|
||||||
|
export interface BookingField {
|
||||||
|
//
|
||||||
|
fieldId?: number;
|
||||||
|
// 场地名称
|
||||||
|
fieldName?: string;
|
||||||
|
// 是否有卫生间,1有,0没有
|
||||||
|
isToilet?: string;
|
||||||
|
// 状态,0开启,1关闭
|
||||||
|
isStatus?: string;
|
||||||
|
// 是否重复预订,1可以,0不可以
|
||||||
|
isRepeat?: string;
|
||||||
|
// 是否可预定半场,1可以,0不可以
|
||||||
|
isHalf?: string;
|
||||||
|
// 是否支持儿童价:1支持,0不支持
|
||||||
|
isChildren?: string;
|
||||||
|
// 可重复预订次数
|
||||||
|
num?: number;
|
||||||
|
// 排序
|
||||||
|
sortNumber?: number;
|
||||||
|
// 关联id
|
||||||
|
merchantId?: number;
|
||||||
|
// 显示在第几行
|
||||||
|
row?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场馆场地搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingFieldParam extends PageParam {
|
||||||
|
fieldId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingIntegral/index.ts
Normal file
106
modules/api/booking_____/bookingIntegral/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingIntegral, BookingIntegralParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询签到积分
|
||||||
|
*/
|
||||||
|
export async function pageBookingIntegral(params: BookingIntegralParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingIntegral>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询签到积分列表
|
||||||
|
*/
|
||||||
|
export async function listBookingIntegral(params?: BookingIntegralParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingIntegral[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加签到积分
|
||||||
|
*/
|
||||||
|
export async function addBookingIntegral(data: BookingIntegral) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改签到积分
|
||||||
|
*/
|
||||||
|
export async function updateBookingIntegral(data: BookingIntegral) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除签到积分
|
||||||
|
*/
|
||||||
|
export async function removeBookingIntegral(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除签到积分
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingIntegral(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询签到积分
|
||||||
|
*/
|
||||||
|
export async function getBookingIntegral(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingIntegral>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
33
modules/api/booking_____/bookingIntegral/model/index.ts
Normal file
33
modules/api/booking_____/bookingIntegral/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签到积分
|
||||||
|
*/
|
||||||
|
export interface BookingIntegral {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 用户id
|
||||||
|
uid?: number;
|
||||||
|
// 微信昵称
|
||||||
|
username?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 获得积分
|
||||||
|
integral?: string;
|
||||||
|
// 日期
|
||||||
|
dateTime?: string;
|
||||||
|
// 天
|
||||||
|
day?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 签到时间
|
||||||
|
createTime?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签到积分搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingIntegralParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingIntegralLog/index.ts
Normal file
106
modules/api/booking_____/bookingIntegralLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingIntegralLog, BookingIntegralLogParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询积分明细
|
||||||
|
*/
|
||||||
|
export async function pageBookingIntegralLog(params: BookingIntegralLogParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingIntegralLog>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral-log/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询积分明细列表
|
||||||
|
*/
|
||||||
|
export async function listBookingIntegralLog(params?: BookingIntegralLogParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingIntegralLog[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral-log',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加积分明细
|
||||||
|
*/
|
||||||
|
export async function addBookingIntegralLog(data: BookingIntegralLog) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改积分明细
|
||||||
|
*/
|
||||||
|
export async function updateBookingIntegralLog(data: BookingIntegralLog) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除积分明细
|
||||||
|
*/
|
||||||
|
export async function removeBookingIntegralLog(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除积分明细
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingIntegralLog(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral-log/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询积分明细
|
||||||
|
*/
|
||||||
|
export async function getBookingIntegralLog(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingIntegralLog>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-integral-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
39
modules/api/booking_____/bookingIntegralLog/model/index.ts
Normal file
39
modules/api/booking_____/bookingIntegralLog/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 积分明细
|
||||||
|
*/
|
||||||
|
export interface BookingIntegralLog {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 场馆订单号
|
||||||
|
orderNum?: string;
|
||||||
|
// 订单id
|
||||||
|
oid?: number;
|
||||||
|
// 场馆名称
|
||||||
|
siteName?: string;
|
||||||
|
// 微信昵称
|
||||||
|
username?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 获得积分
|
||||||
|
integral?: string;
|
||||||
|
// 变化前积分
|
||||||
|
oldMoney?: string;
|
||||||
|
// 变化后积分
|
||||||
|
newMoney?: string;
|
||||||
|
// 描述
|
||||||
|
info?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 记录时间
|
||||||
|
createTime?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 积分明细搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingIntegralLogParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingItem/index.ts
Normal file
106
modules/api/booking_____/bookingItem/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingItem, BookingItemParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询项目类型
|
||||||
|
*/
|
||||||
|
export async function pageBookingItem(params: BookingItemParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingItem>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-item/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目类型列表
|
||||||
|
*/
|
||||||
|
export async function listBookingItem(params?: BookingItemParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingItem[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-item',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加项目类型
|
||||||
|
*/
|
||||||
|
export async function addBookingItem(data: BookingItem) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-item',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目类型
|
||||||
|
*/
|
||||||
|
export async function updateBookingItem(data: BookingItem) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-item',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除项目类型
|
||||||
|
*/
|
||||||
|
export async function removeBookingItem(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-item/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除项目类型
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingItem(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-item/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询项目类型
|
||||||
|
*/
|
||||||
|
export async function getBookingItem(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingItem>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-item/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
31
modules/api/booking_____/bookingItem/model/index.ts
Normal file
31
modules/api/booking_____/bookingItem/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目类型
|
||||||
|
*/
|
||||||
|
export interface BookingItem {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 项目类型
|
||||||
|
name?: string;
|
||||||
|
// 项目图标
|
||||||
|
image?: string;
|
||||||
|
// 项目备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目类型搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingItemParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingOrder/index.ts
Normal file
106
modules/api/booking_____/bookingOrder/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingOrder, BookingOrderParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageBookingOrder(params: BookingOrderParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingOrder>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listBookingOrder(params?: BookingOrderParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingOrder[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addBookingOrder(data: BookingOrder) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateBookingOrder(data: BookingOrder) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeBookingOrder(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingOrder(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getBookingOrder(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingOrder>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
107
modules/api/booking_____/bookingOrder/model/index.ts
Normal file
107
modules/api/booking_____/bookingOrder/model/index.ts
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface BookingOrder {
|
||||||
|
//
|
||||||
|
orderId?: number;
|
||||||
|
// 订单类型,0商城订单 1预定订单 2会员卡
|
||||||
|
type?: number;
|
||||||
|
// 订单号
|
||||||
|
orderNo?: string;
|
||||||
|
// 下单渠道,0小程序预定 1俱乐部训练场 3活动订场
|
||||||
|
channel?: number;
|
||||||
|
// 微信支付订单号
|
||||||
|
transactionId?: string;
|
||||||
|
// 微信退款订单号
|
||||||
|
refundOrder?: string;
|
||||||
|
// 场馆id用于权限判断
|
||||||
|
merchantId?: number;
|
||||||
|
// 商户名称
|
||||||
|
merchantName?: string;
|
||||||
|
// 商户编号
|
||||||
|
merchantCode?: string;
|
||||||
|
// 用户id
|
||||||
|
uid?: number;
|
||||||
|
// 使用的优惠券id
|
||||||
|
cid?: number;
|
||||||
|
// 使用的会员卡id
|
||||||
|
vid?: number;
|
||||||
|
// 关联管理员id
|
||||||
|
aid?: number;
|
||||||
|
// 核销管理员id
|
||||||
|
adminId?: number;
|
||||||
|
// IC卡号
|
||||||
|
code?: string;
|
||||||
|
// 真实姓名
|
||||||
|
name?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 订单总额
|
||||||
|
totalPrice?: string;
|
||||||
|
// 减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
|
||||||
|
reducePrice?: string;
|
||||||
|
// 实际付款
|
||||||
|
payPrice?: string;
|
||||||
|
// 用于统计
|
||||||
|
price?: string;
|
||||||
|
// 价钱,用于积分赠送
|
||||||
|
money?: string;
|
||||||
|
// 退款金额
|
||||||
|
refundMoney?: string;
|
||||||
|
// 教练价格
|
||||||
|
coachPrice?: string;
|
||||||
|
// 教练id
|
||||||
|
coachId?: number;
|
||||||
|
// 1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡
|
||||||
|
payType?: string;
|
||||||
|
// 1已付款,2未付款
|
||||||
|
payStatus?: string;
|
||||||
|
// 1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款
|
||||||
|
orderStatus?: string;
|
||||||
|
// 优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
|
||||||
|
couponType?: string;
|
||||||
|
// 二维码地址,保存订单号,支付成功后才生成
|
||||||
|
qrcode?: string;
|
||||||
|
// 优惠说明
|
||||||
|
couponDesc?: string;
|
||||||
|
// vip月卡年卡、ic月卡年卡回退次数
|
||||||
|
returnNum?: number;
|
||||||
|
// vip充值回退金额
|
||||||
|
returnMoney?: string;
|
||||||
|
// 预约详情开始时间数组
|
||||||
|
startTime?: string;
|
||||||
|
// 是否已开具发票:1已开发票,2未开发票,3不能开具发票
|
||||||
|
isInvoice?: string;
|
||||||
|
// 下单时间
|
||||||
|
createTime?: number;
|
||||||
|
//
|
||||||
|
updateTime?: number;
|
||||||
|
// 付款时间
|
||||||
|
payTime?: number;
|
||||||
|
// 退款时间
|
||||||
|
refundTime?: number;
|
||||||
|
// 申请退款时间
|
||||||
|
refundApplyTime?: number;
|
||||||
|
// 过期时间
|
||||||
|
expirationTime?: string;
|
||||||
|
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||||
|
checkBill?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingOrderParam extends PageParam {
|
||||||
|
orderId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingOrderInfo/index.ts
Normal file
106
modules/api/booking_____/bookingOrderInfo/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingOrderInfo, BookingOrderInfoParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageBookingOrderInfo(params: BookingOrderInfoParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingOrderInfo>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order-info/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listBookingOrderInfo(params?: BookingOrderInfoParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingOrderInfo[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order-info',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addBookingOrderInfo(data: BookingOrderInfo) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order-info',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateBookingOrderInfo(data: BookingOrderInfo) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order-info',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeBookingOrderInfo(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order-info/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingOrderInfo(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order-info/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getBookingOrderInfo(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingOrderInfo>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-order-info/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
modules/api/booking_____/bookingOrderInfo/model/index.ts
Normal file
57
modules/api/booking_____/bookingOrderInfo/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface BookingOrderInfo {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 关联订单表id
|
||||||
|
oid?: number;
|
||||||
|
// 关联场馆id
|
||||||
|
sid?: number;
|
||||||
|
// 关联场地id
|
||||||
|
fid?: number;
|
||||||
|
// 场馆
|
||||||
|
siteName?: string;
|
||||||
|
// 场地
|
||||||
|
fieldName?: string;
|
||||||
|
// 预约时间段
|
||||||
|
dateTime?: string;
|
||||||
|
// 单价
|
||||||
|
price?: string;
|
||||||
|
// 儿童价
|
||||||
|
childrenPrice?: string;
|
||||||
|
// 成人人数
|
||||||
|
adultNum?: string;
|
||||||
|
// 儿童人数
|
||||||
|
childrenNum?: string;
|
||||||
|
// 1已付款,2未付款,3无需付款或占用状态
|
||||||
|
payStatus?: string;
|
||||||
|
// 是否免费:1免费、2收费
|
||||||
|
isFree?: string;
|
||||||
|
// 是否支持儿童票:1支持,2不支持
|
||||||
|
isChildren?: string;
|
||||||
|
// 预订类型:1全场,2半场
|
||||||
|
type?: string;
|
||||||
|
// 组合数据:日期+时间段+场馆id+场地id
|
||||||
|
mergeData?: string;
|
||||||
|
// 开场时间
|
||||||
|
startTime?: number;
|
||||||
|
// 下单时间
|
||||||
|
orderTime?: number;
|
||||||
|
// 毫秒时间戳
|
||||||
|
timeFlag?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingOrderInfoParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingPeriod/index.ts
Normal file
106
modules/api/booking_____/bookingPeriod/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingPeriod, BookingPeriodParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询场地时段
|
||||||
|
*/
|
||||||
|
export async function pageBookingPeriod(params: BookingPeriodParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingPeriod>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-period/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询场地时段列表
|
||||||
|
*/
|
||||||
|
export async function listBookingPeriod(params?: BookingPeriodParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingPeriod[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-period',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加场地时段
|
||||||
|
*/
|
||||||
|
export async function addBookingPeriod(data: BookingPeriod) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-period',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改场地时段
|
||||||
|
*/
|
||||||
|
export async function updateBookingPeriod(data: BookingPeriod) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-period',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除场地时段
|
||||||
|
*/
|
||||||
|
export async function removeBookingPeriod(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-period/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除场地时段
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingPeriod(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-period/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询场地时段
|
||||||
|
*/
|
||||||
|
export async function getBookingPeriod(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingPeriod>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-period/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
49
modules/api/booking_____/bookingPeriod/model/index.ts
Normal file
49
modules/api/booking_____/bookingPeriod/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场地时段
|
||||||
|
*/
|
||||||
|
export interface BookingPeriod {
|
||||||
|
//
|
||||||
|
periodId?: number;
|
||||||
|
// 时段
|
||||||
|
timePeriod?: string;
|
||||||
|
// 价格
|
||||||
|
price?: string;
|
||||||
|
// 每日不同价格
|
||||||
|
prices?: string;
|
||||||
|
// 半场价格
|
||||||
|
halfPrice?: string;
|
||||||
|
// 每日不同半场价格
|
||||||
|
halfPrices?: string;
|
||||||
|
// 儿童价
|
||||||
|
childrenPrice?: string;
|
||||||
|
// 星期选择
|
||||||
|
week?: string;
|
||||||
|
// 排序
|
||||||
|
sortNumber?: number;
|
||||||
|
// 关联id
|
||||||
|
merchantId?: number;
|
||||||
|
// 是否关闭,0开启,1关闭
|
||||||
|
isStatus?: string;
|
||||||
|
// 是否免费:0免费,1收费
|
||||||
|
isFree?: string;
|
||||||
|
// 开始时间
|
||||||
|
startTime?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场地时段搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingPeriodParam extends PageParam {
|
||||||
|
periodId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,16 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type {
|
import type { BookingUser, BookingUserParam } from './model';
|
||||||
BCTemporary,
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
BCTemporaryParam
|
|
||||||
} from '@/api/apps/bc/temporary/model';
|
|
||||||
import { OPEN_API_URL } from '@/config/setting';
|
|
||||||
/**
|
/**
|
||||||
* 分页查询设备
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageBCTemporary(params: BCTemporaryParam) {
|
export async function pageBookingUser(params: BookingUserParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<BCTemporary>>>(
|
const res = await request.get<ApiResult<PageResult<BookingUser>>>(
|
||||||
OPEN_API_URL + '/apps/bc-temporary/page',
|
MODULES_API_URL + '/booking/booking-user/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -22,11 +20,11 @@ export async function pageBCTemporary(params: BCTemporaryParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listBCTemporary(params?: BCTemporaryParam) {
|
export async function listBookingUser(params?: BookingUserParam) {
|
||||||
const res = await request.get<ApiResult<BCTemporary[]>>(
|
const res = await request.get<ApiResult<BookingUser[]>>(
|
||||||
OPEN_API_URL + '/apps/bc-temporary',
|
MODULES_API_URL + '/booking/booking-user',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -38,11 +36,11 @@ export async function listBCTemporary(params?: BCTemporaryParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加设备
|
* 添加
|
||||||
*/
|
*/
|
||||||
export async function addBCTemporary(data: BCTemporary) {
|
export async function addBookingUser(data: BookingUser) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-temporary',
|
MODULES_API_URL + '/booking/booking-user',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -52,11 +50,11 @@ export async function addBCTemporary(data: BCTemporary) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改设备
|
* 修改
|
||||||
*/
|
*/
|
||||||
export async function updateBCTemporary(data: BCTemporary) {
|
export async function updateBookingUser(data: BookingUser) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-temporary',
|
MODULES_API_URL + '/booking/booking-user',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -66,12 +64,11 @@ export async function updateBCTemporary(data: BCTemporary) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定设备
|
* 删除
|
||||||
*/
|
*/
|
||||||
export async function bindBCTemporary(data: BCTemporary) {
|
export async function removeBookingUser(id?: number) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-temporary/bind',
|
MODULES_API_URL + '/booking/booking-user/' + id
|
||||||
data
|
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -80,24 +77,11 @@ export async function bindBCTemporary(data: BCTemporary) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除设备
|
* 批量删除
|
||||||
*/
|
*/
|
||||||
export async function removeBCTemporary(id?: number) {
|
export async function removeBatchBookingUser(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-temporary/' + id
|
MODULES_API_URL + '/booking/booking-user/batch',
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除设备
|
|
||||||
*/
|
|
||||||
export async function removeBatchBCTemporary(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/apps/bc-temporary/batch',
|
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -107,3 +91,16 @@ export async function removeBatchBCTemporary(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getBookingUser(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingUser>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
49
modules/api/booking_____/bookingUser/model/index.ts
Normal file
49
modules/api/booking_____/bookingUser/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface BookingUser {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 用户唯一小程序id
|
||||||
|
openId?: string;
|
||||||
|
// 小程序用户秘钥
|
||||||
|
sessionKey?: string;
|
||||||
|
// 用户名
|
||||||
|
username?: string;
|
||||||
|
// 头像地址
|
||||||
|
avatarUrl?: string;
|
||||||
|
// 1男,2女
|
||||||
|
gender?: string;
|
||||||
|
// 国家
|
||||||
|
country?: string;
|
||||||
|
// 省份
|
||||||
|
province?: string;
|
||||||
|
// 城市
|
||||||
|
city?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 积分
|
||||||
|
integral?: string;
|
||||||
|
// 余额
|
||||||
|
money?: string;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: number;
|
||||||
|
//
|
||||||
|
idcard?: string;
|
||||||
|
//
|
||||||
|
truename?: string;
|
||||||
|
// 是否管理员:1是;2否
|
||||||
|
isAdmin?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingUserParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingUserCard/index.ts
Normal file
106
modules/api/booking_____/bookingUserCard/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingUserCard, BookingUserCardParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询会员卡
|
||||||
|
*/
|
||||||
|
export async function pageBookingUserCard(params: BookingUserCardParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingUserCard>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-card/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会员卡列表
|
||||||
|
*/
|
||||||
|
export async function listBookingUserCard(params?: BookingUserCardParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingUserCard[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-card',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加会员卡
|
||||||
|
*/
|
||||||
|
export async function addBookingUserCard(data: BookingUserCard) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-card',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会员卡
|
||||||
|
*/
|
||||||
|
export async function updateBookingUserCard(data: BookingUserCard) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-card',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会员卡
|
||||||
|
*/
|
||||||
|
export async function removeBookingUserCard(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-card/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除会员卡
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingUserCard(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-card/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询会员卡
|
||||||
|
*/
|
||||||
|
export async function getBookingUserCard(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingUserCard>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-card/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
98
modules/api/booking_____/bookingUserCard/model/index.ts
Normal file
98
modules/api/booking_____/bookingUserCard/model/index.ts
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员卡
|
||||||
|
*/
|
||||||
|
export interface BookingUserCard {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// sid场馆id集合,适用的场馆
|
||||||
|
sid?: string;
|
||||||
|
// 用户id
|
||||||
|
uid?: number;
|
||||||
|
// vip卡id
|
||||||
|
vid?: number;
|
||||||
|
// 开卡人id
|
||||||
|
aid?: number;
|
||||||
|
// 微信订单号
|
||||||
|
wechatOrder?: string;
|
||||||
|
// 卡号
|
||||||
|
code?: string;
|
||||||
|
// 会员卡名称
|
||||||
|
name?: string;
|
||||||
|
// 真实姓名
|
||||||
|
username?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// vip购卡价格
|
||||||
|
price?: string;
|
||||||
|
// 会员卡介绍
|
||||||
|
comments?: string;
|
||||||
|
// 会员卡说明
|
||||||
|
info?: string;
|
||||||
|
// vip卡折扣率
|
||||||
|
discount?: string;
|
||||||
|
// 使用次数
|
||||||
|
count?: number;
|
||||||
|
// 每使用一次减少的金额
|
||||||
|
eachMoney?: string;
|
||||||
|
// 剩余金额
|
||||||
|
remainingMoney?: string;
|
||||||
|
// 续费累加次数
|
||||||
|
number?: number;
|
||||||
|
// 剩余次数
|
||||||
|
num?: number;
|
||||||
|
// 付款状态,1已付款,2未付款
|
||||||
|
status?: number;
|
||||||
|
// 会员卡年限
|
||||||
|
term?: number;
|
||||||
|
// 月限
|
||||||
|
month?: number;
|
||||||
|
// IC卡类型:1年卡,2次卡,3月卡,4会员IC卡,5充值卡
|
||||||
|
type?: number;
|
||||||
|
// 卡类型:1成人卡,2儿童卡
|
||||||
|
cardType?: number;
|
||||||
|
// vip卡等级类型:1特殊vip卡,2普通vip卡
|
||||||
|
vipType?: number;
|
||||||
|
// 特殊卡开发凭证图
|
||||||
|
pic?: string;
|
||||||
|
// 价格组
|
||||||
|
prices?: string;
|
||||||
|
// 1微信支付,2支付宝支付,3现金,4POS机刷卡,15平安健康卡
|
||||||
|
payType?: number;
|
||||||
|
// 是否赠送积分:1赠送,2不赠送
|
||||||
|
isIntegral?: number;
|
||||||
|
// 是否已开具发票:1已开发票,2未开发票
|
||||||
|
isInvoice?: number;
|
||||||
|
// vip卡到期时间
|
||||||
|
expireTime?: number;
|
||||||
|
// 紧急联系人
|
||||||
|
urgentName?: string;
|
||||||
|
// 紧急联系人号码
|
||||||
|
urgentPhone?: string;
|
||||||
|
// 卡号
|
||||||
|
cardNum?: string;
|
||||||
|
// 密码
|
||||||
|
password?: string;
|
||||||
|
// 使用时间
|
||||||
|
useTime?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: number;
|
||||||
|
//
|
||||||
|
updateTime?: number;
|
||||||
|
@TableField("IDCard")
|
||||||
|
// 身份证号码
|
||||||
|
idcard?: string;
|
||||||
|
// 备注
|
||||||
|
remark?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员卡搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingUserCardParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingUserCoupon/index.ts
Normal file
106
modules/api/booking_____/bookingUserCoupon/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingUserCoupon, BookingUserCouponParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询我的优惠券
|
||||||
|
*/
|
||||||
|
export async function pageBookingUserCoupon(params: BookingUserCouponParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingUserCoupon>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-coupon/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我的优惠券列表
|
||||||
|
*/
|
||||||
|
export async function listBookingUserCoupon(params?: BookingUserCouponParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingUserCoupon[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-coupon',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加我的优惠券
|
||||||
|
*/
|
||||||
|
export async function addBookingUserCoupon(data: BookingUserCoupon) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-coupon',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改我的优惠券
|
||||||
|
*/
|
||||||
|
export async function updateBookingUserCoupon(data: BookingUserCoupon) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-coupon',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除我的优惠券
|
||||||
|
*/
|
||||||
|
export async function removeBookingUserCoupon(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-coupon/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除我的优惠券
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingUserCoupon(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-coupon/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询我的优惠券
|
||||||
|
*/
|
||||||
|
export async function getBookingUserCoupon(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingUserCoupon>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-coupon/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
59
modules/api/booking_____/bookingUserCoupon/model/index.ts
Normal file
59
modules/api/booking_____/bookingUserCoupon/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的优惠券
|
||||||
|
*/
|
||||||
|
export interface BookingUserCoupon {
|
||||||
|
// id
|
||||||
|
id?: number;
|
||||||
|
// 优惠劵id
|
||||||
|
couponId?: number;
|
||||||
|
// 优惠券名称
|
||||||
|
name?: string;
|
||||||
|
// 优惠券类型(10满减券 20折扣券)
|
||||||
|
type?: number;
|
||||||
|
// 满减券-减免金额
|
||||||
|
reducePrice?: string;
|
||||||
|
// 折扣券-折扣率(0-100)
|
||||||
|
discount?: number;
|
||||||
|
// 最低消费金额
|
||||||
|
minPrice?: string;
|
||||||
|
// 到期类型(10领取后生效 20固定时间)
|
||||||
|
expireType?: number;
|
||||||
|
// 领取后生效-有效天数
|
||||||
|
expireDay?: number;
|
||||||
|
// 有效期开始时间
|
||||||
|
startTime?: string;
|
||||||
|
// 有效期结束时间
|
||||||
|
endTime?: string;
|
||||||
|
// 适用范围(10全部商品 20指定商品)
|
||||||
|
applyRange?: number;
|
||||||
|
// 适用范围配置(json格式)
|
||||||
|
applyRangeConfig?: string;
|
||||||
|
// 是否过期(0未过期 1已过期)
|
||||||
|
isExpire?: number;
|
||||||
|
// 是否已使用(0未使用 1已使用)
|
||||||
|
isUse?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0待使用, 1已使用, 2已失效
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的优惠券搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingUserCouponParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/bookingUserInvoice/index.ts
Normal file
106
modules/api/booking_____/bookingUserInvoice/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BookingUserInvoice, BookingUserInvoiceParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询发票
|
||||||
|
*/
|
||||||
|
export async function pageBookingUserInvoice(params: BookingUserInvoiceParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BookingUserInvoice>>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-invoice/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发票列表
|
||||||
|
*/
|
||||||
|
export async function listBookingUserInvoice(params?: BookingUserInvoiceParam) {
|
||||||
|
const res = await request.get<ApiResult<BookingUserInvoice[]>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-invoice',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加发票
|
||||||
|
*/
|
||||||
|
export async function addBookingUserInvoice(data: BookingUserInvoice) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-invoice',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发票
|
||||||
|
*/
|
||||||
|
export async function updateBookingUserInvoice(data: BookingUserInvoice) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-invoice',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发票
|
||||||
|
*/
|
||||||
|
export async function removeBookingUserInvoice(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-invoice/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发票
|
||||||
|
*/
|
||||||
|
export async function removeBatchBookingUserInvoice(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-invoice/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询发票
|
||||||
|
*/
|
||||||
|
export async function getBookingUserInvoice(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BookingUserInvoice>>(
|
||||||
|
MODULES_API_URL + '/booking/booking-user-invoice/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
61
modules/api/booking_____/bookingUserInvoice/model/index.ts
Normal file
61
modules/api/booking_____/bookingUserInvoice/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票
|
||||||
|
*/
|
||||||
|
export interface BookingUserInvoice {
|
||||||
|
// id
|
||||||
|
id?: number;
|
||||||
|
// 发票类型(0纸质 1电子)
|
||||||
|
type?: number;
|
||||||
|
// 发票名称
|
||||||
|
name?: string;
|
||||||
|
// 开票类型(0普票 1专票)
|
||||||
|
invoiceType?: number;
|
||||||
|
// 税号
|
||||||
|
invoiceCode?: string;
|
||||||
|
// 公司地址
|
||||||
|
address?: string;
|
||||||
|
// 公司电话
|
||||||
|
tel?: string;
|
||||||
|
// 开户行
|
||||||
|
bankName?: string;
|
||||||
|
// 开户账号
|
||||||
|
bankAccount?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 电子邮箱
|
||||||
|
email?: string;
|
||||||
|
// 发票流水号
|
||||||
|
invoiceNo?: string;
|
||||||
|
// 发票图片预览
|
||||||
|
invoiceImg?: string;
|
||||||
|
// 发票pdf地址
|
||||||
|
invoicePdf?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否启用
|
||||||
|
isCompany?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0待使用, 1已使用, 2已失效
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票搜索条件
|
||||||
|
*/
|
||||||
|
export interface BookingUserInvoiceParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { BcExport, BcExportParam } from '@/api/apps/bc/export/model';
|
import type { Field, FieldParam } from './model';
|
||||||
import { OPEN_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询计划
|
* 分页查询场馆场地
|
||||||
*/
|
*/
|
||||||
export async function pageBcExport(params: BcExportParam) {
|
export async function pageField(params: FieldParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<BcExport>>>(
|
const res = await request.get<ApiResult<PageResult<Field>>>(
|
||||||
OPEN_API_URL + '/apps/bc-export/page',
|
MODULES_API_URL + '/booking/field/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -20,11 +20,11 @@ export async function pageBcExport(params: BcExportParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询计划列表
|
* 查询场馆场地列表
|
||||||
*/
|
*/
|
||||||
export async function listBcExport(params?: BcExportParam) {
|
export async function listField(params?: FieldParam) {
|
||||||
const res = await request.get<ApiResult<BcExport[]>>(
|
const res = await request.get<ApiResult<Field[]>>(
|
||||||
OPEN_API_URL + '/apps/bc-export',
|
MODULES_API_URL + '/booking/field',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -36,11 +36,11 @@ export async function listBcExport(params?: BcExportParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加计划
|
* 添加场馆场地
|
||||||
*/
|
*/
|
||||||
export async function addBcExport(data: BcExport) {
|
export async function addField(data: Field) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-export',
|
MODULES_API_URL + '/booking/field',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -50,11 +50,11 @@ export async function addBcExport(data: BcExport) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改计划
|
* 修改场馆场地
|
||||||
*/
|
*/
|
||||||
export async function updateBcExport(data: BcExport) {
|
export async function updateField(data: Field) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-export',
|
MODULES_API_URL + '/booking/field',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -64,12 +64,11 @@ export async function updateBcExport(data: BcExport) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定计划
|
* 删除场馆场地
|
||||||
*/
|
*/
|
||||||
export async function bindBcExport(data: BcExport) {
|
export async function removeField(id?: number) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-export/bind',
|
MODULES_API_URL + '/booking/field/' + id
|
||||||
data
|
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -78,24 +77,11 @@ export async function bindBcExport(data: BcExport) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除计划
|
* 批量删除场馆场地
|
||||||
*/
|
*/
|
||||||
export async function removeBcExport(id?: number) {
|
export async function removeBatchField(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-export/' + id
|
MODULES_API_URL + '/booking/field/batch',
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBatchBcExport(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/apps/bc-export/batch',
|
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -105,3 +91,16 @@ export async function removeBatchBcExport(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询场馆场地
|
||||||
|
*/
|
||||||
|
export async function getField(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Field>>(
|
||||||
|
MODULES_API_URL + '/booking/field/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
69
modules/api/booking_____/field/model/index.ts
Normal file
69
modules/api/booking_____/field/model/index.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
import { OrderInfo } from "@/api/shop/orderInfo/model";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场馆场地
|
||||||
|
*/
|
||||||
|
export interface Field {
|
||||||
|
// ID
|
||||||
|
fieldId?: number;
|
||||||
|
// 场地名称
|
||||||
|
fieldName?: string;
|
||||||
|
// 图标
|
||||||
|
image?: string;
|
||||||
|
// 分类ID
|
||||||
|
categoryId?: number;
|
||||||
|
// 关联用户
|
||||||
|
userId?: number;
|
||||||
|
// 老师ID
|
||||||
|
teacherId?: number;
|
||||||
|
// 是否支持半场
|
||||||
|
isHalf?: number;
|
||||||
|
// 可重复订阅数
|
||||||
|
isRepeat?: number;
|
||||||
|
// 是否厕所
|
||||||
|
isToilet?: number;
|
||||||
|
// 是否支持儿童价
|
||||||
|
isChildren?: number;
|
||||||
|
// 显示在第几行
|
||||||
|
row?: number;
|
||||||
|
num?: number;
|
||||||
|
// 商户ID
|
||||||
|
merchantId?: number;
|
||||||
|
// 上课时间
|
||||||
|
startTime?: string;
|
||||||
|
// 报名人数上限
|
||||||
|
maxNumber?: number;
|
||||||
|
// 上课地点
|
||||||
|
address?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 场地状态
|
||||||
|
isStatus?: number;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
orderId?: number;
|
||||||
|
orderInfoList?: OrderInfo[];
|
||||||
|
orderKey?: string;
|
||||||
|
// 是否已预定
|
||||||
|
sold?: boolean;
|
||||||
|
// 购买数量
|
||||||
|
cartNum?: number;
|
||||||
|
// 场地价格
|
||||||
|
price?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场馆场地搜索条件
|
||||||
|
*/
|
||||||
|
export interface FieldParam extends PageParam {
|
||||||
|
fieldId?: number;
|
||||||
|
fieldName?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { BCAgent, BCAgentParam } from '@/api/apps/bc/agent/model';
|
import type { Item, ItemParam } from './model';
|
||||||
import { OPEN_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询设备
|
* 分页查询项目类型
|
||||||
*/
|
*/
|
||||||
export async function pageBCAgent(params: BCAgentParam) {
|
export async function pageItem(params: ItemParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<BCAgent>>>(
|
const res = await request.get<ApiResult<PageResult<Item>>>(
|
||||||
OPEN_API_URL + '/apps/bc-agent/page',
|
MODULES_API_URL + '/booking/item/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -19,11 +20,11 @@ export async function pageBCAgent(params: BCAgentParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备列表
|
* 查询项目类型列表
|
||||||
*/
|
*/
|
||||||
export async function listBCAgent(params?: BCAgentParam) {
|
export async function listItem(params?: ItemParam) {
|
||||||
const res = await request.get<ApiResult<BCAgent[]>>(
|
const res = await request.get<ApiResult<Item[]>>(
|
||||||
OPEN_API_URL + '/apps/bc-agent',
|
MODULES_API_URL + '/booking/item',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -35,11 +36,11 @@ export async function listBCAgent(params?: BCAgentParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加设备
|
* 添加项目类型
|
||||||
*/
|
*/
|
||||||
export async function addBCAgent(data: BCAgent) {
|
export async function addItem(data: Item) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-agent',
|
MODULES_API_URL + '/booking/item',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -49,11 +50,11 @@ export async function addBCAgent(data: BCAgent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改设备
|
* 修改项目类型
|
||||||
*/
|
*/
|
||||||
export async function updateBCAgent(data: BCAgent) {
|
export async function updateItem(data: Item) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-agent',
|
MODULES_API_URL + '/booking/item',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -63,12 +64,11 @@ export async function updateBCAgent(data: BCAgent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定设备
|
* 删除项目类型
|
||||||
*/
|
*/
|
||||||
export async function bindBCAgent(data: BCAgent) {
|
export async function removeItem(id?: number) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-agent/bind',
|
MODULES_API_URL + '/booking/item/' + id
|
||||||
data
|
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -77,24 +77,11 @@ export async function bindBCAgent(data: BCAgent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除设备
|
* 批量删除项目类型
|
||||||
*/
|
*/
|
||||||
export async function removeBCAgent(id?: number) {
|
export async function removeBatchItem(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-agent/' + id
|
MODULES_API_URL + '/booking/item/batch',
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除设备
|
|
||||||
*/
|
|
||||||
export async function removeBatchBCAgent(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/apps/bc-agent/batch',
|
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -104,3 +91,16 @@ export async function removeBatchBCAgent(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询项目类型
|
||||||
|
*/
|
||||||
|
export async function getItem(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Item>>(
|
||||||
|
MODULES_API_URL + '/booking/item/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
32
modules/api/booking_____/item/model/index.ts
Normal file
32
modules/api/booking_____/item/model/index.ts
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目类型
|
||||||
|
*/
|
||||||
|
export interface Item {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 项目类型
|
||||||
|
name?: string;
|
||||||
|
// 项目图标
|
||||||
|
image?: string;
|
||||||
|
// 项目备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目类型搜索条件
|
||||||
|
*/
|
||||||
|
export interface ItemParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
ids?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { Order, OrderParam } from './model';
|
import type { Order, OrderParam } from './model';
|
||||||
import { OPEN_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询订单
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageOrder(params: OrderParam) {
|
export async function pageOrder(params: OrderParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<Order>>>(
|
const res = await request.get<ApiResult<PageResult<Order>>>(
|
||||||
OPEN_API_URL + '/shop/order/page',
|
MODULES_API_URL + '/booking/order/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -20,11 +20,11 @@ export async function pageOrder(params: OrderParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listOrder(params?: OrderParam) {
|
export async function listOrder(params?: OrderParam) {
|
||||||
const res = await request.get<ApiResult<Order[]>>(
|
const res = await request.get<ApiResult<Order[]>>(
|
||||||
OPEN_API_URL + '/shop/order',
|
MODULES_API_URL + '/booking/order',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -36,91 +36,71 @@ export async function listOrder(params?: OrderParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询订单
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addOrder(data: Order) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateOrder(data: Order) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeOrder(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchOrder(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
*/
|
*/
|
||||||
export async function getOrder(id: number) {
|
export async function getOrder(id: number) {
|
||||||
const res = await request.get<ApiResult<Order>>(
|
const res = await request.get<ApiResult<Order>>(
|
||||||
OPEN_API_URL + '/shop/order/' + id
|
MODULES_API_URL + '/booking/order/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加订单
|
|
||||||
*/
|
|
||||||
export async function addOrder(data: Order) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/shop/order',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改订单
|
|
||||||
*/
|
|
||||||
export async function updateOrder(data: Order) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/shop/order',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除订单
|
|
||||||
*/
|
|
||||||
export async function removeOrder(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/shop/order/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除订单
|
|
||||||
*/
|
|
||||||
export async function removeBatchOrder(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/shop/order/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/shop/order/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
107
modules/api/booking_____/order/model/index.ts
Normal file
107
modules/api/booking_____/order/model/index.ts
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface Order {
|
||||||
|
//
|
||||||
|
orderId?: number;
|
||||||
|
// 订单类型,0商城订单 1预定订单 2会员卡
|
||||||
|
type?: number;
|
||||||
|
// 订单号
|
||||||
|
orderNo?: string;
|
||||||
|
// 下单渠道,0小程序预定 1俱乐部训练场 3活动订场
|
||||||
|
channel?: number;
|
||||||
|
// 微信支付订单号
|
||||||
|
transactionId?: string;
|
||||||
|
// 微信退款订单号
|
||||||
|
refundOrder?: string;
|
||||||
|
// 场馆id用于权限判断
|
||||||
|
merchantId?: number;
|
||||||
|
// 商户名称
|
||||||
|
merchantName?: string;
|
||||||
|
// 商户编号
|
||||||
|
merchantCode?: string;
|
||||||
|
// 用户id
|
||||||
|
uid?: number;
|
||||||
|
// 使用的优惠券id
|
||||||
|
cid?: number;
|
||||||
|
// 使用的会员卡id
|
||||||
|
vid?: number;
|
||||||
|
// 关联管理员id
|
||||||
|
aid?: number;
|
||||||
|
// 核销管理员id
|
||||||
|
adminId?: number;
|
||||||
|
// IC卡号
|
||||||
|
code?: string;
|
||||||
|
// 真实姓名
|
||||||
|
name?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 订单总额
|
||||||
|
totalPrice?: string;
|
||||||
|
// 减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
|
||||||
|
reducePrice?: string;
|
||||||
|
// 实际付款
|
||||||
|
payPrice?: string;
|
||||||
|
// 用于统计
|
||||||
|
price?: string;
|
||||||
|
// 价钱,用于积分赠送
|
||||||
|
money?: string;
|
||||||
|
// 退款金额
|
||||||
|
refundMoney?: string;
|
||||||
|
// 教练价格
|
||||||
|
coachPrice?: string;
|
||||||
|
// 教练id
|
||||||
|
coachId?: number;
|
||||||
|
// 1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡
|
||||||
|
payType?: string;
|
||||||
|
// 1已付款,2未付款
|
||||||
|
payStatus?: string;
|
||||||
|
// 1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款
|
||||||
|
orderStatus?: string;
|
||||||
|
// 优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
|
||||||
|
couponType?: string;
|
||||||
|
// 二维码地址,保存订单号,支付成功后才生成
|
||||||
|
qrcode?: string;
|
||||||
|
// 优惠说明
|
||||||
|
couponDesc?: string;
|
||||||
|
// vip月卡年卡、ic月卡年卡回退次数
|
||||||
|
returnNum?: number;
|
||||||
|
// vip充值回退金额
|
||||||
|
returnMoney?: string;
|
||||||
|
// 预约详情开始时间数组
|
||||||
|
startTime?: string;
|
||||||
|
// 是否已开具发票:1已开发票,2未开发票,3不能开具发票
|
||||||
|
isInvoice?: string;
|
||||||
|
// 下单时间
|
||||||
|
createTime?: number;
|
||||||
|
//
|
||||||
|
updateTime?: number;
|
||||||
|
// 付款时间
|
||||||
|
payTime?: number;
|
||||||
|
// 退款时间
|
||||||
|
refundTime?: number;
|
||||||
|
// 申请退款时间
|
||||||
|
refundApplyTime?: number;
|
||||||
|
// 过期时间
|
||||||
|
expirationTime?: string;
|
||||||
|
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||||
|
checkBill?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface OrderParam extends PageParam {
|
||||||
|
orderId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/orderExport/index.ts
Normal file
106
modules/api/booking_____/orderExport/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { OrderExport, OrderExportParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询统计报表导出
|
||||||
|
*/
|
||||||
|
export async function pageOrderExport(params: OrderExportParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<OrderExport>>>(
|
||||||
|
MODULES_API_URL + '/booking/order-export/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询统计报表导出列表
|
||||||
|
*/
|
||||||
|
export async function listOrderExport(params?: OrderExportParam) {
|
||||||
|
const res = await request.get<ApiResult<OrderExport[]>>(
|
||||||
|
MODULES_API_URL + '/booking/order-export',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加统计报表导出
|
||||||
|
*/
|
||||||
|
export async function addOrderExport(data: OrderExport) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order-export',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改统计报表导出
|
||||||
|
*/
|
||||||
|
export async function updateOrderExport(data: OrderExport) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order-export',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计报表导出
|
||||||
|
*/
|
||||||
|
export async function removeOrderExport(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order-export/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除统计报表导出
|
||||||
|
*/
|
||||||
|
export async function removeBatchOrderExport(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/order-export/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询统计报表导出
|
||||||
|
*/
|
||||||
|
export async function getOrderExport(id: number) {
|
||||||
|
const res = await request.get<ApiResult<OrderExport>>(
|
||||||
|
MODULES_API_URL + '/booking/order-export/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
modules/api/booking_____/orderExport/model/index.ts
Normal file
57
modules/api/booking_____/orderExport/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计报表导出
|
||||||
|
*/
|
||||||
|
export interface OrderExport {
|
||||||
|
// 自增ID
|
||||||
|
exportId?: number;
|
||||||
|
// 机构名称
|
||||||
|
organizationName?: string;
|
||||||
|
// 实际消费的金额(不含退款)
|
||||||
|
expendMoney?: string;
|
||||||
|
// 早餐报餐次数
|
||||||
|
breakfastPost?: number;
|
||||||
|
// 早餐签到次数
|
||||||
|
breakfastSign?: number;
|
||||||
|
// 午餐报餐次数
|
||||||
|
lunchPost?: number;
|
||||||
|
// 午餐签到次数
|
||||||
|
lunchSign?: number;
|
||||||
|
// 晚餐报餐次数
|
||||||
|
dinnerPost?: number;
|
||||||
|
// 晚餐签到次数
|
||||||
|
dinnerSign?: number;
|
||||||
|
// 档口 10 食堂档口 20 物品档口
|
||||||
|
gear?: string;
|
||||||
|
// 商品价格(单价)
|
||||||
|
goodsPrice?: string;
|
||||||
|
// 发货时间
|
||||||
|
deliveryTime?: string;
|
||||||
|
// 状态, 0待发布, 1已发布
|
||||||
|
status?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 订单号
|
||||||
|
orderId?: number;
|
||||||
|
// 机构id
|
||||||
|
organizationId?: number;
|
||||||
|
// 发布人
|
||||||
|
userId?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计报表导出搜索条件
|
||||||
|
*/
|
||||||
|
export interface OrderExportParam extends PageParam {
|
||||||
|
exportId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
|
|||||||
*/
|
*/
|
||||||
export async function pageOrderInfo(params: OrderInfoParam) {
|
export async function pageOrderInfo(params: OrderInfoParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<OrderInfo>>>(
|
const res = await request.get<ApiResult<PageResult<OrderInfo>>>(
|
||||||
MODULES_API_URL + '/shop/order-info/page',
|
MODULES_API_URL + '/booking/order-info/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ export async function pageOrderInfo(params: OrderInfoParam) {
|
|||||||
*/
|
*/
|
||||||
export async function listOrderInfo(params?: OrderInfoParam) {
|
export async function listOrderInfo(params?: OrderInfoParam) {
|
||||||
const res = await request.get<ApiResult<OrderInfo[]>>(
|
const res = await request.get<ApiResult<OrderInfo[]>>(
|
||||||
MODULES_API_URL + '/shop/order-info',
|
MODULES_API_URL + '/booking/order-info',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ export async function listOrderInfo(params?: OrderInfoParam) {
|
|||||||
*/
|
*/
|
||||||
export async function addOrderInfo(data: OrderInfo) {
|
export async function addOrderInfo(data: OrderInfo) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/order-info',
|
MODULES_API_URL + '/booking/order-info',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -54,7 +54,7 @@ export async function addOrderInfo(data: OrderInfo) {
|
|||||||
*/
|
*/
|
||||||
export async function updateOrderInfo(data: OrderInfo) {
|
export async function updateOrderInfo(data: OrderInfo) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/order-info',
|
MODULES_API_URL + '/booking/order-info',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -68,7 +68,7 @@ export async function updateOrderInfo(data: OrderInfo) {
|
|||||||
*/
|
*/
|
||||||
export async function removeOrderInfo(id?: number) {
|
export async function removeOrderInfo(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/order-info/' + id
|
MODULES_API_URL + '/booking/order-info/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -81,7 +81,7 @@ export async function removeOrderInfo(id?: number) {
|
|||||||
*/
|
*/
|
||||||
export async function removeBatchOrderInfo(data: (number | undefined)[]) {
|
export async function removeBatchOrderInfo(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/order-info/batch',
|
MODULES_API_URL + '/booking/order-info/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ export async function removeBatchOrderInfo(data: (number | undefined)[]) {
|
|||||||
*/
|
*/
|
||||||
export async function getOrderInfo(id: number) {
|
export async function getOrderInfo(id: number) {
|
||||||
const res = await request.get<ApiResult<OrderInfo>>(
|
const res = await request.get<ApiResult<OrderInfo>>(
|
||||||
MODULES_API_URL + '/shop/order-info/' + id
|
MODULES_API_URL + '/booking/order-info/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
@@ -44,6 +44,8 @@ export interface OrderInfo {
|
|||||||
timeFlag?: string;
|
timeFlag?: string;
|
||||||
// 租户id
|
// 租户id
|
||||||
tenantId?: number;
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
106
modules/api/booking_____/period/index.ts
Normal file
106
modules/api/booking_____/period/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { Period, PeriodParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询场地时段
|
||||||
|
*/
|
||||||
|
export async function pagePeriod(params: PeriodParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<Period>>>(
|
||||||
|
MODULES_API_URL + '/booking/period/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询场地时段列表
|
||||||
|
*/
|
||||||
|
export async function listPeriod(params?: PeriodParam) {
|
||||||
|
const res = await request.get<ApiResult<Period[]>>(
|
||||||
|
MODULES_API_URL + '/booking/period',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加场地时段
|
||||||
|
*/
|
||||||
|
export async function addPeriod(data: Period) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/period',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改场地时段
|
||||||
|
*/
|
||||||
|
export async function updatePeriod(data: Period) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/period',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除场地时段
|
||||||
|
*/
|
||||||
|
export async function removePeriod(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/period/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除场地时段
|
||||||
|
*/
|
||||||
|
export async function removeBatchPeriod(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/period/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询场地时段
|
||||||
|
*/
|
||||||
|
export async function getPeriod(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Period>>(
|
||||||
|
MODULES_API_URL + '/booking/period/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
61
modules/api/booking_____/period/model/index.ts
Normal file
61
modules/api/booking_____/period/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
import { BookingField } from '@/api/booking/bookingField/model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场地时段
|
||||||
|
*/
|
||||||
|
export interface Period {
|
||||||
|
//
|
||||||
|
periodId?: number;
|
||||||
|
// 时段
|
||||||
|
timePeriod?: string;
|
||||||
|
timePeriod1?: string;
|
||||||
|
timePeriod2?: string;
|
||||||
|
// 价格
|
||||||
|
price?: number;
|
||||||
|
// 每日不同价格
|
||||||
|
prices?: string;
|
||||||
|
// 半场价格
|
||||||
|
halfPrice?: number;
|
||||||
|
// 每日不同半场价格
|
||||||
|
halfPrices?: string;
|
||||||
|
// 儿童价
|
||||||
|
childrenPrice?: number;
|
||||||
|
// 星期选择
|
||||||
|
week?: string;
|
||||||
|
// 排序
|
||||||
|
sortNumber?: number;
|
||||||
|
// 关联id
|
||||||
|
merchantId?: number;
|
||||||
|
// 是否关闭,1开启,2关闭
|
||||||
|
isStatus?: number;
|
||||||
|
// 是否免费:1免费,2收费
|
||||||
|
isFree?: number;
|
||||||
|
// 开始时间
|
||||||
|
startTime?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态
|
||||||
|
status?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 场地列表
|
||||||
|
fieldList?: BookingField[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场地时段搜索条件
|
||||||
|
*/
|
||||||
|
export interface PeriodParam extends PageParam {
|
||||||
|
periodId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
dateTime?: string;
|
||||||
|
isStatus?: number;
|
||||||
|
timePeriod?: string;
|
||||||
|
merchantId?: number;
|
||||||
|
week?: number;
|
||||||
|
startTime?: string;
|
||||||
|
half?: number;
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { BCPlan, BCPlanParam } from '@/api/apps/bc/plan/model';
|
import type { Site, SiteParam } from './model';
|
||||||
import { OPEN_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询计划
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageBCPlan(params: BCPlanParam) {
|
export async function pageSite(params: SiteParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<BCPlan>>>(
|
const res = await request.get<ApiResult<PageResult<Site>>>(
|
||||||
OPEN_API_URL + '/apps/bc-plan/page',
|
MODULES_API_URL + '/booking/site/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -19,11 +20,11 @@ export async function pageBCPlan(params: BCPlanParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询计划列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listBCPlan(params?: BCPlanParam) {
|
export async function listSite(params?: SiteParam) {
|
||||||
const res = await request.get<ApiResult<BCPlan[]>>(
|
const res = await request.get<ApiResult<Site[]>>(
|
||||||
OPEN_API_URL + '/apps/bc-plan',
|
MODULES_API_URL + '/booking/site',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -35,11 +36,11 @@ export async function listBCPlan(params?: BCPlanParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加计划
|
* 添加
|
||||||
*/
|
*/
|
||||||
export async function addBCPlan(data: BCPlan) {
|
export async function addSite(data: Site) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-plan',
|
MODULES_API_URL + '/booking/site',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -49,11 +50,11 @@ export async function addBCPlan(data: BCPlan) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改计划
|
* 修改
|
||||||
*/
|
*/
|
||||||
export async function updateBCPlan(data: BCPlan) {
|
export async function updateSite(data: Site) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-plan',
|
MODULES_API_URL + '/booking/site',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -63,12 +64,11 @@ export async function updateBCPlan(data: BCPlan) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定计划
|
* 删除
|
||||||
*/
|
*/
|
||||||
export async function bindBCPlan(data: BCPlan) {
|
export async function removeSite(id?: number) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-plan/bind',
|
MODULES_API_URL + '/booking/site/' + id
|
||||||
data
|
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -77,24 +77,11 @@ export async function bindBCPlan(data: BCPlan) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除计划
|
* 批量删除
|
||||||
*/
|
*/
|
||||||
export async function removeBCPlan(id?: number) {
|
export async function removeBatchSite(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
OPEN_API_URL + '/apps/bc-plan/' + id
|
MODULES_API_URL + '/booking/site/batch',
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBatchBCPlan(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
OPEN_API_URL + '/apps/bc-plan/batch',
|
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -104,3 +91,16 @@ export async function removeBatchBCPlan(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getSite(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Site>>(
|
||||||
|
MODULES_API_URL + '/booking/site/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
47
modules/api/booking_____/site/model/index.ts
Normal file
47
modules/api/booking_____/site/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface Site {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 场地名称
|
||||||
|
name?: string;
|
||||||
|
// 封面图
|
||||||
|
thumb?: string;
|
||||||
|
// 每小时价格
|
||||||
|
price?: string;
|
||||||
|
// 营业时间
|
||||||
|
businessTime?: string;
|
||||||
|
// 场馆地址
|
||||||
|
address?: string;
|
||||||
|
// 场馆介绍
|
||||||
|
info?: string;
|
||||||
|
// 场馆电话
|
||||||
|
tel?: string;
|
||||||
|
// 排序
|
||||||
|
sortNumber?: number;
|
||||||
|
// 类型:1天,2小时
|
||||||
|
type?: string;
|
||||||
|
// 天数或小时
|
||||||
|
num?: string;
|
||||||
|
// 退款比率
|
||||||
|
proportion?: string;
|
||||||
|
// 退款规则组
|
||||||
|
moneyJson?: string;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: number;
|
||||||
|
// 更新时间
|
||||||
|
updateTime?: number;
|
||||||
|
// 周末活动订场开关:1开,0关
|
||||||
|
weekendOpen?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface SiteParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
modules/api/booking_____/user/index.ts
Normal file
106
modules/api/booking_____/user/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { User, UserParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageUser(params: UserParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<User>>>(
|
||||||
|
MODULES_API_URL + '/booking/user/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listUser(params?: UserParam) {
|
||||||
|
const res = await request.get<ApiResult<User[]>>(
|
||||||
|
MODULES_API_URL + '/booking/user',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addUser(data: User) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/user',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateUser(data: User) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/user',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeUser(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/user/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchUser(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/booking/user/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getUser(id: number) {
|
||||||
|
const res = await request.get<ApiResult<User>>(
|
||||||
|
MODULES_API_URL + '/booking/user/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
49
modules/api/booking_____/user/model/index.ts
Normal file
49
modules/api/booking_____/user/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface User {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 用户唯一小程序id
|
||||||
|
openId?: string;
|
||||||
|
// 小程序用户秘钥
|
||||||
|
sessionKey?: string;
|
||||||
|
// 用户名
|
||||||
|
username?: string;
|
||||||
|
// 头像地址
|
||||||
|
avatarUrl?: string;
|
||||||
|
// 1男,2女
|
||||||
|
gender?: string;
|
||||||
|
// 国家
|
||||||
|
country?: string;
|
||||||
|
// 省份
|
||||||
|
province?: string;
|
||||||
|
// 城市
|
||||||
|
city?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 积分
|
||||||
|
integral?: string;
|
||||||
|
// 余额
|
||||||
|
money?: string;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: number;
|
||||||
|
//
|
||||||
|
idcard?: string;
|
||||||
|
//
|
||||||
|
truename?: string;
|
||||||
|
// 是否管理员:1是;2否
|
||||||
|
isAdmin?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface UserParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ import type { Users, UsersParam } from './model';
|
|||||||
import { MODULES_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询用户
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageUsers(params: UsersParam) {
|
export async function pageUsers(params: UsersParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<Users>>>(
|
const res = await request.get<ApiResult<PageResult<Users>>>(
|
||||||
@@ -20,7 +20,7 @@ export async function pageUsers(params: UsersParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listUsers(params?: UsersParam) {
|
export async function listUsers(params?: UsersParam) {
|
||||||
const res = await request.get<ApiResult<Users[]>>(
|
const res = await request.get<ApiResult<Users[]>>(
|
||||||
@@ -36,7 +36,7 @@ export async function listUsers(params?: UsersParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加用户
|
* 添加
|
||||||
*/
|
*/
|
||||||
export async function addUsers(data: Users) {
|
export async function addUsers(data: Users) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
@@ -50,7 +50,7 @@ export async function addUsers(data: Users) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户
|
* 修改
|
||||||
*/
|
*/
|
||||||
export async function updateUsers(data: Users) {
|
export async function updateUsers(data: Users) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
@@ -64,7 +64,7 @@ export async function updateUsers(data: Users) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除用户
|
* 删除
|
||||||
*/
|
*/
|
||||||
export async function removeUsers(id?: number) {
|
export async function removeUsers(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
@@ -77,7 +77,7 @@ export async function removeUsers(id?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除用户
|
* 批量删除
|
||||||
*/
|
*/
|
||||||
export async function removeBatchUsers(data: (number | undefined)[]) {
|
export async function removeBatchUsers(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
@@ -93,7 +93,7 @@ export async function removeBatchUsers(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询用户
|
* 根据id查询
|
||||||
*/
|
*/
|
||||||
export async function getUsers(id: number) {
|
export async function getUsers(id: number) {
|
||||||
const res = await request.get<ApiResult<Users>>(
|
const res = await request.get<ApiResult<Users>>(
|
||||||
49
modules/api/booking_____/users/model/index.ts
Normal file
49
modules/api/booking_____/users/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface Users {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 用户唯一小程序id
|
||||||
|
openId?: string;
|
||||||
|
// 小程序用户秘钥
|
||||||
|
sessionKey?: string;
|
||||||
|
// 用户名
|
||||||
|
username?: string;
|
||||||
|
// 头像地址
|
||||||
|
avatarUrl?: string;
|
||||||
|
// 1男,2女
|
||||||
|
gender?: string;
|
||||||
|
// 国家
|
||||||
|
country?: string;
|
||||||
|
// 省份
|
||||||
|
province?: string;
|
||||||
|
// 城市
|
||||||
|
city?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 积分
|
||||||
|
integral?: string;
|
||||||
|
// 余额
|
||||||
|
money?: string;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: number;
|
||||||
|
//
|
||||||
|
idcard?: string;
|
||||||
|
//
|
||||||
|
truename?: string;
|
||||||
|
// 是否管理员:1是;2否
|
||||||
|
isAdmin?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface UsersParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<template>
|
<template>
|
||||||
<a-space :size="10" style="flex-wrap: wrap">
|
<a-space :size="10" style="flex-wrap: wrap">
|
||||||
<a-button type="primary" class="ele-btn-icon" @click="add">
|
<!-- <a-button type="primary" class="ele-btn-icon" @click="add">-->
|
||||||
<template #icon>
|
<!-- <template #icon>-->
|
||||||
<PlusOutlined />
|
<!-- <PlusOutlined />-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
<span>添加</span>
|
<!-- <span>添加</span>-->
|
||||||
</a-button>
|
<!-- </a-button>-->
|
||||||
<a-input-search
|
<a-input-search
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请输入关键词"
|
placeholder="请输入关键词"
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
@pressEnter="search"
|
@pressEnter="search"
|
||||||
@search="search"
|
@search="search"
|
||||||
/>
|
/>
|
||||||
<a-button @click="reset">重置</a-button>
|
<!-- <a-button @click="reset">重置</a-button>-->
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="ele-body">
|
<div class="ele-body">
|
||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
<a-card title="管理员列表" :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@@ -118,12 +118,6 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 90
|
width: 90
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '账号',
|
|
||||||
dataIndex: 'username',
|
|
||||||
key: 'username',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '手机号码',
|
title: '手机号码',
|
||||||
dataIndex: 'phone',
|
dataIndex: 'phone',
|
||||||
@@ -40,6 +40,13 @@
|
|||||||
v-model:value="form.goodsId"
|
v-model:value="form.goodsId"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="商品名称" name="name">
|
||||||
|
<a-input
|
||||||
|
allow-clear
|
||||||
|
placeholder="请输入商品名称"
|
||||||
|
v-model:value="form.name"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item label="商品规格" name="spec">
|
<a-form-item label="商品规格" name="spec">
|
||||||
<a-input
|
<a-input
|
||||||
allow-clear
|
allow-clear
|
||||||
@@ -96,6 +103,14 @@
|
|||||||
v-model:value="form.merchantId"
|
v-model:value="form.merchantId"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="备注" name="comments">
|
||||||
|
<a-textarea
|
||||||
|
:rows="4"
|
||||||
|
:maxlength="200"
|
||||||
|
placeholder="请输入描述"
|
||||||
|
v-model:value="form.comments"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item label="用户ID" name="userId">
|
<a-form-item label="用户ID" name="userId">
|
||||||
<a-input
|
<a-input
|
||||||
allow-clear
|
allow-clear
|
||||||
@@ -110,10 +125,10 @@
|
|||||||
v-model:value="form.cashierId"
|
v-model:value="form.cashierId"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="收银单分组ID" name="groupId">
|
<a-form-item label="分组取单" name="groupId">
|
||||||
<a-input
|
<a-input
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请输入收银单分组ID"
|
placeholder="请输入分组取单"
|
||||||
v-model:value="form.groupId"
|
v-model:value="form.groupId"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -132,8 +147,8 @@
|
|||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import { Form, message } from 'ant-design-vue';
|
import { Form, message } from 'ant-design-vue';
|
||||||
import { assignObject, uuid } from 'ele-admin-pro';
|
import { assignObject, uuid } from 'ele-admin-pro';
|
||||||
import { addCashier, updateCashier } from '@/api/shop/cashier';
|
import { addBookingCashier, updateBookingCashier } from '@/api/booking/bookingCashier';
|
||||||
import { Cashier } from '@/api/shop/cashier/model';
|
import { BookingCashier } from '@/api/booking/bookingCashier/model';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
||||||
@@ -151,7 +166,7 @@
|
|||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
// 修改回显的数据
|
// 修改回显的数据
|
||||||
data?: Cashier | null;
|
data?: BookingCashier | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -168,11 +183,12 @@
|
|||||||
const images = ref<ItemType[]>([]);
|
const images = ref<ItemType[]>([]);
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const form = reactive<Cashier>({
|
const form = reactive<BookingCashier>({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
code: undefined,
|
code: undefined,
|
||||||
goodsId: undefined,
|
goodsId: undefined,
|
||||||
|
name: undefined,
|
||||||
spec: undefined,
|
spec: undefined,
|
||||||
price: undefined,
|
price: undefined,
|
||||||
cartNum: undefined,
|
cartNum: undefined,
|
||||||
@@ -181,14 +197,15 @@
|
|||||||
isNew: undefined,
|
isNew: undefined,
|
||||||
selected: undefined,
|
selected: undefined,
|
||||||
merchantId: undefined,
|
merchantId: undefined,
|
||||||
|
comments: undefined,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
cashierId: undefined,
|
cashierId: undefined,
|
||||||
groupId: undefined,
|
groupId: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
cashierId: undefined,
|
bookingCashierId: undefined,
|
||||||
cashierName: '',
|
bookingCashierName: '',
|
||||||
status: 0,
|
status: 0,
|
||||||
comments: '',
|
comments: '',
|
||||||
sortNumber: 100
|
sortNumber: 100
|
||||||
@@ -201,7 +218,7 @@
|
|||||||
|
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
cashierName: [
|
bookingCashierName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -239,7 +256,7 @@
|
|||||||
const formData = {
|
const formData = {
|
||||||
...form
|
...form
|
||||||
};
|
};
|
||||||
const saveOrUpdate = isUpdate.value ? updateCashier : addCashier;
|
const saveOrUpdate = isUpdate.value ? updateBookingCashier : addBookingCashier;
|
||||||
saveOrUpdate(formData)
|
saveOrUpdate(formData)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
317
modules/views/bak/bookingCashier/index.vue
Normal file
317
modules/views/bak/bookingCashier/index.vue
Normal file
@@ -0,0 +1,317 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<div class="ele-body">
|
||||||
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
|
<ele-pro-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="bookingCashierId"
|
||||||
|
:columns="columns"
|
||||||
|
:datasource="datasource"
|
||||||
|
:customRow="customRow"
|
||||||
|
tool-class="ele-toolbar-form"
|
||||||
|
class="sys-org-table"
|
||||||
|
>
|
||||||
|
<template #toolbar>
|
||||||
|
<search
|
||||||
|
@search="reload"
|
||||||
|
:selection="selection"
|
||||||
|
@add="openEdit"
|
||||||
|
@remove="removeBatch"
|
||||||
|
@batchMove="openMove"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.key === 'image'">
|
||||||
|
<a-image :src="record.image" :width="50" />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'status'">
|
||||||
|
<a-tag v-if="record.status === 0" color="green">显示</a-tag>
|
||||||
|
<a-tag v-if="record.status === 1" color="red">隐藏</a-tag>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'action'">
|
||||||
|
<a-space>
|
||||||
|
<a @click="openEdit(record)">修改</a>
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<a-popconfirm
|
||||||
|
title="确定要删除此记录吗?"
|
||||||
|
@confirm="remove(record)"
|
||||||
|
>
|
||||||
|
<a class="ele-text-danger">删除</a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</ele-pro-table>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
<!-- 编辑弹窗 -->
|
||||||
|
<BookingCashierEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { createVNode, ref } from 'vue';
|
||||||
|
import { message, Modal } from 'ant-design-vue';
|
||||||
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
|
import { toDateString } from 'ele-admin-pro';
|
||||||
|
import type {
|
||||||
|
DatasourceFunction,
|
||||||
|
ColumnItem
|
||||||
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
|
import Search from './components/search.vue';
|
||||||
|
import BookingCashierEdit from './components/bookingCashierEdit.vue';
|
||||||
|
import { pageBookingCashier, removeBookingCashier, removeBatchBookingCashier } from '@/api/booking/bookingCashier';
|
||||||
|
import type { BookingCashier, BookingCashierParam } from '@/api/booking/bookingCashier/model';
|
||||||
|
|
||||||
|
// 表格实例
|
||||||
|
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||||
|
|
||||||
|
// 表格选中数据
|
||||||
|
const selection = ref<BookingCashier[]>([]);
|
||||||
|
// 当前编辑数据
|
||||||
|
const current = ref<BookingCashier | null>(null);
|
||||||
|
// 是否显示编辑弹窗
|
||||||
|
const showEdit = ref(false);
|
||||||
|
// 是否显示批量移动弹窗
|
||||||
|
const showMove = ref(false);
|
||||||
|
// 加载状态
|
||||||
|
const loading = ref(true);
|
||||||
|
|
||||||
|
// 表格数据源
|
||||||
|
const datasource: DatasourceFunction = ({
|
||||||
|
page,
|
||||||
|
limit,
|
||||||
|
where,
|
||||||
|
orders,
|
||||||
|
filters
|
||||||
|
}) => {
|
||||||
|
if (filters) {
|
||||||
|
where.status = filters.status;
|
||||||
|
}
|
||||||
|
return pageBookingCashier({
|
||||||
|
...where,
|
||||||
|
...orders,
|
||||||
|
page,
|
||||||
|
limit
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 表格列配置
|
||||||
|
const columns = ref<ColumnItem[]>([
|
||||||
|
{
|
||||||
|
title: '收银单ID',
|
||||||
|
dataIndex: 'id',
|
||||||
|
key: 'id',
|
||||||
|
align: 'center',
|
||||||
|
width: 90,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型 0商城 1外卖',
|
||||||
|
dataIndex: 'type',
|
||||||
|
key: 'type',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '唯一标识',
|
||||||
|
dataIndex: 'code',
|
||||||
|
key: 'code',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品ID',
|
||||||
|
dataIndex: 'goodsId',
|
||||||
|
key: 'goodsId',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品名称',
|
||||||
|
dataIndex: 'name',
|
||||||
|
key: 'name',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品规格',
|
||||||
|
dataIndex: 'spec',
|
||||||
|
key: 'spec',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品价格',
|
||||||
|
dataIndex: 'price',
|
||||||
|
key: 'price',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品数量',
|
||||||
|
dataIndex: 'cartNum',
|
||||||
|
key: 'cartNum',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '单商品合计',
|
||||||
|
dataIndex: 'totalPrice',
|
||||||
|
key: 'totalPrice',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '0 = 未购买 1 = 已购买',
|
||||||
|
dataIndex: 'isPay',
|
||||||
|
key: 'isPay',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否为立即购买',
|
||||||
|
dataIndex: 'isNew',
|
||||||
|
key: 'isNew',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否选中',
|
||||||
|
dataIndex: 'selected',
|
||||||
|
key: 'selected',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商户ID',
|
||||||
|
dataIndex: 'merchantId',
|
||||||
|
key: 'merchantId',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
dataIndex: 'comments',
|
||||||
|
key: 'comments',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '用户ID',
|
||||||
|
dataIndex: 'userId',
|
||||||
|
key: 'userId',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收银员ID',
|
||||||
|
dataIndex: 'cashierId',
|
||||||
|
key: 'cashierId',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '分组取单',
|
||||||
|
dataIndex: 'groupId',
|
||||||
|
key: 'groupId',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
key: 'createTime',
|
||||||
|
align: 'center',
|
||||||
|
sorter: true,
|
||||||
|
ellipsis: true,
|
||||||
|
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '修改时间',
|
||||||
|
dataIndex: 'updateTime',
|
||||||
|
key: 'updateTime',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
key: 'action',
|
||||||
|
width: 180,
|
||||||
|
fixed: 'right',
|
||||||
|
align: 'center',
|
||||||
|
hideInSetting: true
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
/* 搜索 */
|
||||||
|
const reload = (where?: BookingCashierParam) => {
|
||||||
|
selection.value = [];
|
||||||
|
tableRef?.value?.reload({ where: where });
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 打开编辑弹窗 */
|
||||||
|
const openEdit = (row?: BookingCashier) => {
|
||||||
|
current.value = row ?? null;
|
||||||
|
showEdit.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 打开批量移动弹窗 */
|
||||||
|
const openMove = () => {
|
||||||
|
showMove.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 删除单个 */
|
||||||
|
const remove = (row: BookingCashier) => {
|
||||||
|
const hide = message.loading('请求中..', 0);
|
||||||
|
removeBookingCashier(row.bookingCashierId)
|
||||||
|
.then((msg) => {
|
||||||
|
hide();
|
||||||
|
message.success(msg);
|
||||||
|
reload();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
hide();
|
||||||
|
message.error(e.message);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 批量删除 */
|
||||||
|
const removeBatch = () => {
|
||||||
|
if (!selection.value.length) {
|
||||||
|
message.error('请至少选择一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定要删除选中的记录吗?',
|
||||||
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
maskClosable: true,
|
||||||
|
onOk: () => {
|
||||||
|
const hide = message.loading('请求中..', 0);
|
||||||
|
removeBatchBookingCashier(selection.value.map((d) => d.bookingCashierId))
|
||||||
|
.then((msg) => {
|
||||||
|
hide();
|
||||||
|
message.success(msg);
|
||||||
|
reload();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
hide();
|
||||||
|
message.error(e.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 查询 */
|
||||||
|
const query = () => {
|
||||||
|
loading.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 自定义行属性 */
|
||||||
|
const customRow = (record: BookingCashier) => {
|
||||||
|
return {
|
||||||
|
// 行点击事件
|
||||||
|
onClick: () => {
|
||||||
|
// console.log(record);
|
||||||
|
},
|
||||||
|
// 行双击事件
|
||||||
|
onDblclick: () => {
|
||||||
|
openEdit(record);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
query();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
export default {
|
||||||
|
name: 'BookingCashier'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user