Compare commits

..

12 Commits

Author SHA1 Message Date
3be4a42fe8 新增:批量导入商品功能 2025-12-31 09:55:31 +08:00
f4e6705f3f 新增:批量导入商品功能 2025-12-30 17:18:20 +08:00
a6cd0c3d52 251229 2025-12-29 10:45:01 +08:00
dc1af138e2 250418 2025-04-18 14:42:22 +08:00
07b1f341b3 241224 2024-12-24 20:31:47 +08:00
9e831de60b 241102 2024-11-02 11:57:43 +08:00
11ef915934 添加微信快递编码 2024-10-20 19:21:38 +08:00
ac0fe5fc84 241019 2024-10-19 10:51:09 +08:00
00759864ed 241019 2024-10-19 10:38:52 +08:00
713f24ca3e 1、新增首页轮播图切换效果
2、其他调整
2024-09-30 18:20:29 +08:00
7a180ee5a7 新增:产品管理模块 2024-09-27 21:08:57 +08:00
5e56c31300 修复已知问题 2024-09-27 14:17:12 +08:00
1100 changed files with 83243 additions and 6189 deletions

View File

@@ -1,11 +1,8 @@
VITE_APP_NAME=后台管理系统
VITE_SOCKET_URL=wss://server.gxwebsoft.com
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_SOCKET_URL=wss://shop-server-api.ggsxiangan.com
VITE_THINK_URL=https://server.websoft.top/api
#VITE_API_URL=https://clinic-api.websoft.top/api
#VITE_API_URL=/api
VITE_API_URL=http://127.0.0.1:9013/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
VITE_SERVER_URL=https://server.websoft.top/api

View File

@@ -1,5 +1,5 @@
VITE_APP_NAME=后台管理系统
VITE_SOCKET_URL=wss://server.gxwebsoft.com
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_SOCKET_URL=wss://clinic-api.websoft.top
VITE_THINK_URL=https://clinic-api.websoft.top/api
VITE_API_URL=https://clinic-api.websoft.top/api
VITE_SERVER_URL=https://server.websoft.top/api

View File

@@ -0,0 +1,34 @@
# 仅在你必须跨域直连接口(不做同源反代)时使用:
# 将以下内容放到 clinic-api.websoft.top 的 nginx server{} / location{} 中。
#
# 注意:
# - 建议把 allow-origin 固定到你的前端域名,避免使用 *。
# - 如果你使用 cookiewithCredentials还需要加 Access-Control-Allow-Credentials: true
# 并且 allow-origin 不能是 *。
location /api/ {
# 预检请求
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin https://clinic.websoft.top always;
add_header Access-Control-Allow-Methods "GET,POST,PUT,DELETE,PATCH,OPTIONS" always;
add_header Access-Control-Allow-Headers "Authorization,Content-Type,TenantId,X-Requested-With" always;
add_header Access-Control-Max-Age 86400 always;
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}
add_header Access-Control-Allow-Origin https://clinic.websoft.top always;
add_header Access-Control-Expose-Headers Authorization always;
add_header Vary Origin always;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# TODO: 替换为真实 upstream
proxy_pass http://127.0.0.1:9013;
}

View File

@@ -0,0 +1,37 @@
server {
listen 443 ssl;
server_name clinic.websoft.top;
# TODO: 替换为你自己的证书路径
# ssl_certificate /path/to/fullchain.pem;
# ssl_certificate_key /path/to/privkey.pem;
root /home/wwwroot/clinic-admin/dist;
index index.html;
# SPA history
location / {
try_files $uri $uri/ /index.html;
}
# 模块接口(对应 VITE_API_URL=/api、VITE_THINK_URL=/api
location /api/ {
proxy_http_version 1.1;
proxy_set_header Host clinic-api.websoft.top;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass https://clinic-api.websoft.top/api/;
}
# 主接口(对应 VITE_SERVER_URL=/server-api
location /server-api/ {
proxy_http_version 1.1;
proxy_set_header Host server.websoft.top;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass https://server.websoft.top/api/;
}
}

View File

@@ -19,6 +19,7 @@
"@bytemd/plugin-gfm": "^1.17.2",
"@bytemd/plugin-highlight": "^1.17.4",
"@bytemd/plugin-highlight-ssr": "^1.20.2",
"@cyhnkckali/vue3-color-picker": "^2.0.2",
"@wecom/jssdk": "^1.3.1",
"ali-oss": "^6.18.0",
"ant-design-vue": "^3.2.11",

6371
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

7
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,7 @@
ignoredBuiltDependencies:
- core-js
- es5-ext
- esbuild
- less
- vue-demi
- vue-echarts

BIN
public/goods-import.xlsx Normal file

Binary file not shown.

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingCashier, BookingCashierParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import type { CashierParam, CashierVo } from "@/api/shop/cashier/model";
import type { CashierParam, CashierVo } from '@/api/shop/cashier/model';
/**
* 分页查询收银

View File

@@ -79,7 +79,9 @@ export async function removeBookingCooperate(id?: number) {
/**
* 批量删除商务合作
*/
export async function removeBatchBookingCooperate(data: (number | undefined)[]) {
export async function removeBatchBookingCooperate(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商务合作留言记录
*/
export async function pageBookingCooperateLog(params: BookingCooperateLogParam) {
export async function pageBookingCooperateLog(
params: BookingCooperateLogParam
) {
const res = await request.get<ApiResult<PageResult<BookingCooperateLog>>>(
MODULES_API_URL + '/booking/booking-cooperate-log/page',
{
@@ -22,7 +24,9 @@ export async function pageBookingCooperateLog(params: BookingCooperateLogParam)
/**
* 查询商务合作留言记录列表
*/
export async function listBookingCooperateLog(params?: BookingCooperateLogParam) {
export async function listBookingCooperateLog(
params?: BookingCooperateLogParam
) {
const res = await request.get<ApiResult<BookingCooperateLog[]>>(
MODULES_API_URL + '/booking/booking-cooperate-log',
{
@@ -79,7 +83,9 @@ export async function removeBookingCooperateLog(id?: number) {
/**
* 批量删除商务合作留言记录
*/
export async function removeBatchBookingCooperateLog(data: (number | undefined)[]) {
export async function removeBatchBookingCooperateLog(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate-log/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeBookingEmergency(id?: number) {
/**
* 批量删除紧急联系人管理
*/
export async function removeBatchBookingEmergency(data: (number | undefined)[]) {
export async function removeBatchBookingEmergency(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-emergency/batch',
{

View File

@@ -1,10 +1,10 @@
import type { PageParam } from '@/api';
/**
*
*
*/
export interface BookingField {
//
//
id?: number;
// 场地名称
name?: string;

View File

@@ -1,10 +1,10 @@
import type { PageParam } from '@/api';
/**
*
*
*/
export interface BookingIntegral {
//
//
id?: number;
// 用户id
uid?: number;

View File

@@ -79,7 +79,9 @@ export async function removeBookingIntegralLog(id?: number) {
/**
* 批量删除
*/
export async function removeBatchBookingIntegralLog(data: (number | undefined)[]) {
export async function removeBatchBookingIntegralLog(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral-log/batch',
{

View File

@@ -1,10 +1,10 @@
import type { PageParam } from '@/api';
/**
*
*
*/
export interface BookingIntegralLog {
//
//
id?: number;
// 场馆订单号
orderNum?: string;

View File

@@ -79,7 +79,9 @@ export async function removeBookingOrderInfo(id?: number) {
/**
* 批量删除
*/
export async function removeBatchBookingOrderInfo(data: (number | undefined)[]) {
export async function removeBatchBookingOrderInfo(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order-info/batch',
{

View File

@@ -1,10 +1,10 @@
import type { PageParam } from '@/api';
/**
*
*
*/
export interface BookingPeriod {
//
//
id?: number;
// 时段
timePeriod?: string;
@@ -32,7 +32,7 @@ export interface BookingPeriod {
startTime?: string;
// 儿童价
createTime?: number;
//
//
updateTime?: number;
// 租户id
tenantId?: number;

View File

@@ -79,7 +79,9 @@ export async function removeBookingUserCoupon(id?: number) {
/**
* 批量删除我的优惠券
*/
export async function removeBatchBookingUserCoupon(data: (number | undefined)[]) {
export async function removeBatchBookingUserCoupon(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-coupon/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询紧急联系人表
*/
export async function pageBookingUserEmergency(params: BookingUserEmergencyParam) {
export async function pageBookingUserEmergency(
params: BookingUserEmergencyParam
) {
const res = await request.get<ApiResult<PageResult<BookingUserEmergency>>>(
MODULES_API_URL + '/booking/booking-user-emergency/page',
{
@@ -22,7 +24,9 @@ export async function pageBookingUserEmergency(params: BookingUserEmergencyParam
/**
* 查询紧急联系人表列表
*/
export async function listBookingUserEmergency(params?: BookingUserEmergencyParam) {
export async function listBookingUserEmergency(
params?: BookingUserEmergencyParam
) {
const res = await request.get<ApiResult<BookingUserEmergency[]>>(
MODULES_API_URL + '/booking/booking-user-emergency',
{
@@ -79,7 +83,9 @@ export async function removeBookingUserEmergency(id?: number) {
/**
* 批量删除紧急联系人表
*/
export async function removeBatchBookingUserEmergency(data: (number | undefined)[]) {
export async function removeBatchBookingUserEmergency(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-emergency/batch',
{

View File

@@ -4,7 +4,7 @@ import type { PageParam } from '@/api';
* 紧急联系人表
*/
export interface BookingUserEmergency {
//
//
id?: number;
// 用户id
uid?: number;

View File

@@ -79,7 +79,9 @@ export async function removeBookingUserInvoice(id?: number) {
/**
* 批量删除发票
*/
export async function removeBatchBookingUserInvoice(data: (number | undefined)[]) {
export async function removeBatchBookingUserInvoice(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-invoice/batch',
{

View File

@@ -1,10 +1,10 @@
import type { PageParam } from '@/api';
/**
*
*
*/
export interface BookingVip {
//
//
id?: number;
// sid场馆id集合适用的场馆
sid?: string;
@@ -42,9 +42,9 @@ export interface BookingVip {
prices?: string;
// 是否赠送积分1赠送2不赠送
isIntegral?: string;
//
//
createTime?: number;
//
//
updateTime?: number;
// 是否有效1是0否
isUse?: string;

View File

@@ -1,5 +1,5 @@
import type { PageParam } from '@/api';
import { OrderInfo } from "@/api/shop/orderInfo/model";
import { OrderInfo } from '@/api/shop/orderInfo/model';
/**
* 场馆场地

View File

@@ -1,10 +1,10 @@
import type { PageParam } from '@/api';
/**
*
*
*/
export interface Order {
//
//
orderId?: number;
// 订单类型0商城订单 1预定订单 2会员卡
type?: number;
@@ -76,7 +76,7 @@ export interface Order {
isInvoice?: string;
// 下单时间
createTime?: number;
//
//
updateTime?: number;
// 付款时间
payTime?: number;

View File

@@ -1,10 +1,10 @@
import type { PageParam } from '@/api';
/**
*
*
*/
export interface OrderInfo {
//
//
id?: number;
// 关联订单表id
oid?: number;

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Case, CaseParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询病例列表
*/
export async function pageCase(params: CaseParam) {
const res = await request.get<ApiResult<PageResult<Case>>>(
MODULES_API_URL + '/clinic/case/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询病例列表列表
*/
export async function listCase(params?: CaseParam) {
const res = await request.get<ApiResult<Case[]>>(
MODULES_API_URL + '/clinic/case',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加病例列表
*/
export async function addCase(data: Case) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/case',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改病例列表
*/
export async function updateCase(data: Case) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/case',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除病例列表
*/
export async function removeCase(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/case/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除病例列表
*/
export async function removeBatchCase(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/case/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询病例列表
*/
export async function getCase(id: number) {
const res = await request.get<ApiResult<Case>>(
MODULES_API_URL + '/clinic/case/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,47 @@
import type { PageParam } from '@/api';
/**
* 病例列表
*/
export interface Case {
//
id?: number;
//
userId?: number;
// 医生用户id
doctorUserId?: number;
// 病情主诉
patientCondition?: string;
// 既往史
pastHistory?: string;
// 过敏史
allergyHistory?: string;
// 诊断
diagnostic?: string;
// 治疗方案
plan?: string;
// 照片
photoList?: string;
// 0待审核 1通过 2拒绝
status?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 修改时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 病例列表搜索条件
*/
export interface CaseParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,107 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicAppointment, ClinicAppointmentParam } from './model';
/**
* 分页查询挂号
*/
export async function pageClinicAppointment(params: ClinicAppointmentParam) {
const res = await request.get<ApiResult<PageResult<ClinicAppointment>>>(
'/clinic/clinic-appointment/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询挂号列表
*/
export async function listClinicAppointment(params?: ClinicAppointmentParam) {
const res = await request.get<ApiResult<ClinicAppointment[]>>(
'/clinic/clinic-appointment',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加挂号
*/
export async function addClinicAppointment(data: ClinicAppointment) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-appointment',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改挂号
*/
export async function updateClinicAppointment(data: ClinicAppointment) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-appointment',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除挂号
*/
export async function removeClinicAppointment(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-appointment/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除挂号
*/
export async function removeBatchClinicAppointment(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-appointment/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询挂号
*/
export async function getClinicAppointment(id: number) {
const res = await request.get<ApiResult<ClinicAppointment>>(
'/clinic/clinic-appointment/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,47 @@
import type { PageParam } from '@/api';
/**
* 挂号
*/
export interface ClinicAppointment {
// 主键ID
id?: number;
// 类型
type?: number;
// 就诊原因
reason?: string;
// 挂号时间
evaluateTime?: string;
// 医生
doctorId?: number;
// 医生名称
doctorName?: string;
// 医生职位
doctorPosition?: string;
// 患者
userId?: number;
// 患者名称
nickname?: string;
// 患者联系电话
phone?: string;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除
isDelete?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 挂号搜索条件
*/
export interface ClinicAppointmentParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicCase, ClinicCaseParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询病例列表
*/
export async function pageClinicCase(params: ClinicCaseParam) {
const res = await request.get<ApiResult<PageResult<ClinicCase>>>(
MODULES_API_URL + '/clinic/clinic-case/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询病例列表列表
*/
export async function listClinicCase(params?: ClinicCaseParam) {
const res = await request.get<ApiResult<ClinicCase[]>>(
MODULES_API_URL + '/clinic/clinic-case',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加病例列表
*/
export async function addClinicCase(data: ClinicCase) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-case',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改病例列表
*/
export async function updateClinicCase(data: ClinicCase) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-case',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除病例列表
*/
export async function removeClinicCase(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-case/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除病例列表
*/
export async function removeBatchClinicCase(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-case/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询病例列表
*/
export async function getClinicCase(id: number) {
const res = await request.get<ApiResult<ClinicCase>>(
MODULES_API_URL + '/clinic/clinic-case/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,47 @@
import type { PageParam } from '@/api';
/**
* 病例列表
*/
export interface ClinicCase {
//
id?: number;
//
userId?: number;
// 医生用户id
doctorUserId?: number;
// 病情主诉
patientCondition?: string;
// 既往史
pastHistory?: string;
// 过敏史
allergyHistory?: string;
// 诊断
diagnostic?: string;
// 治疗方案
plan?: string;
// 照片
photoList?: string;
// 0待审核 1通过 2拒绝
status?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 修改时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 病例列表搜索条件
*/
export interface ClinicCaseParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,107 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicDoctorApply, ClinicDoctorApplyParam } from './model';
/**
* 分页查询医生入驻申请
*/
export async function pageClinicDoctorApply(params: ClinicDoctorApplyParam) {
const res = await request.get<ApiResult<PageResult<ClinicDoctorApply>>>(
'/clinic/clinic-doctor-apply/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询医生入驻申请列表
*/
export async function listClinicDoctorApply(params?: ClinicDoctorApplyParam) {
const res = await request.get<ApiResult<ClinicDoctorApply[]>>(
'/clinic/clinic-doctor-apply',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加医生入驻申请
*/
export async function addClinicDoctorApply(data: ClinicDoctorApply) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-doctor-apply',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改医生入驻申请
*/
export async function updateClinicDoctorApply(data: ClinicDoctorApply) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-doctor-apply',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除医生入驻申请
*/
export async function removeClinicDoctorApply(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-apply/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除医生入驻申请
*/
export async function removeBatchClinicDoctorApply(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-apply/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询医生入驻申请
*/
export async function getClinicDoctorApply(id: number) {
const res = await request.get<ApiResult<ClinicDoctorApply>>(
'/clinic/clinic-doctor-apply/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,75 @@
import type { PageParam } from '@/api';
/**
* 医生入驻申请
*/
export interface ClinicDoctorApply {
// 主键ID
applyId?: number;
// 类型 0医生
type?: number;
// 用户ID
userId?: number;
// 姓名
realName?: string;
// 性别 1男 2女
gender?: number;
// 手机号
mobile?: string;
// 客户名称
dealerName?: string;
// 证件号码
idCard?: string;
// 生日
birthDate?: string;
// 区分职称等级(如主治医师、副主任医师)
professionalTitle?: string;
// 工作单位
workUnit?: string;
// 执业资格核心凭证
practiceLicense?: string;
// 限定可执业科室或疾病类型
practiceScope?: string;
// 开始工作时间
startWorkDate?: string;
// 简历
resume?: string;
// 使用 JSON 存储多个证件文件路径(如执业证、学历证)
certificationFiles?: string;
// 详细地址
address?: string;
// 签约价格
money?: string;
// 推荐人用户ID
refereeId?: number;
// 申请方式(10需后台审核 20无需审核)
applyType?: number;
// 审核状态 (10待审核 20审核通过 30驳回)
applyStatus?: number;
// 申请时间
applyTime?: string;
// 审核时间
auditTime?: string;
// 合同时间
contractTime?: string;
// 过期时间
expirationTime?: string;
// 驳回原因
rejectReason?: string;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 医生入驻申请搜索条件
*/
export interface ClinicDoctorApplyParam extends PageParam {
applyId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,117 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type {
ClinicDoctorMedicalRecord,
ClinicDoctorMedicalRecordParam
} from './model';
/**
* 分页查询医疗记录
*/
export async function pageClinicDoctorMedicalRecord(
params: ClinicDoctorMedicalRecordParam
) {
const res = await request.get<
ApiResult<PageResult<ClinicDoctorMedicalRecord>>
>('/clinic/clinic-doctor-medical-record/page', {
params
});
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询医疗记录列表
*/
export async function listClinicDoctorMedicalRecord(
params?: ClinicDoctorMedicalRecordParam
) {
const res = await request.get<ApiResult<ClinicDoctorMedicalRecord[]>>(
'/clinic/clinic-doctor-medical-record',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加医疗记录
*/
export async function addClinicDoctorMedicalRecord(
data: ClinicDoctorMedicalRecord
) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-doctor-medical-record',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改医疗记录
*/
export async function updateClinicDoctorMedicalRecord(
data: ClinicDoctorMedicalRecord
) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-doctor-medical-record',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除医疗记录
*/
export async function removeClinicDoctorMedicalRecord(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-medical-record/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除医疗记录
*/
export async function removeBatchClinicDoctorMedicalRecord(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-medical-record/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询医疗记录
*/
export async function getClinicDoctorMedicalRecord(id: number) {
const res = await request.get<ApiResult<ClinicDoctorMedicalRecord>>(
'/clinic/clinic-doctor-medical-record/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,61 @@
import type { PageParam } from '@/api';
/**
* 医疗记录
*/
export interface ClinicDoctorMedicalRecord {
// 主键ID
id?: number;
// 买家用户ID
userId?: number;
// 订单编号
orderNo?: string;
// 分销商用户id(一级)
firstUserId?: number;
// 分销商用户id(二级)
secondUserId?: number;
// 分销商用户id(三级)
thirdUserId?: number;
// 分销佣金(一级)
firstMoney?: string;
// 分销佣金(二级)
secondMoney?: string;
// 分销佣金(三级)
thirdMoney?: string;
// 单价
price?: string;
// 订单总金额
orderPrice?: string;
// 结算金额
settledPrice?: string;
// 换算成度
degreePrice?: string;
// 实发金额
payPrice?: string;
// 税率
rate?: string;
// 结算月份
month?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 佣金结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: string;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 医疗记录搜索条件
*/
export interface ClinicDoctorMedicalRecordParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,107 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicDoctorUser, ClinicDoctorUserParam } from './model';
/**
* 分页查询分销商用户记录表
*/
export async function pageClinicDoctorUser(params: ClinicDoctorUserParam) {
const res = await request.get<ApiResult<PageResult<ClinicDoctorUser>>>(
'/clinic/clinic-doctor-user/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商用户记录表列表
*/
export async function listClinicDoctorUser(params?: ClinicDoctorUserParam) {
const res = await request.get<ApiResult<ClinicDoctorUser[]>>(
'/clinic/clinic-doctor-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 addClinicDoctorUser(data: ClinicDoctorUser) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-doctor-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商用户记录表
*/
export async function updateClinicDoctorUser(data: ClinicDoctorUser) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-doctor-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商用户记录表
*/
export async function removeClinicDoctorUser(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-user/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商用户记录表
*/
export async function removeBatchClinicDoctorUser(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-user/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商用户记录表
*/
export async function getClinicDoctorUser(id: number) {
const res = await request.get<ApiResult<ClinicDoctorUser>>(
'/clinic/clinic-doctor-user/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,55 @@
import type { PageParam } from '@/api';
/**
* 分销商用户记录表
*/
export interface ClinicDoctorUser {
// 主键ID
id?: number;
// 类型 0经销商 1企业 2集团
type?: number;
// 自增ID
userId?: number;
// 姓名
realName?: string;
// 手机号
phone?: string;
// 部门
departmentId?: number;
// 专业领域
specialty?: string;
// 职务级别
position?: string;
// 执业资格
qualification?: string;
// 医生简介
introduction?: string;
// 挂号费
consultationFee?: string;
// 工作年限
workYears?: number;
// 问诊人数
consultationCount?: number;
// 专属二维码
qrcode?: string;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除
isDelete?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 分销商用户记录表搜索条件
*/
export interface ClinicDoctorUserParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicList, ClinicListParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询诊所列表
*/
export async function pageClinicList(params: ClinicListParam) {
const res = await request.get<ApiResult<PageResult<ClinicList>>>(
MODULES_API_URL + '/clinic/clinic-list/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询诊所列表列表
*/
export async function listClinicList(params?: ClinicListParam) {
const res = await request.get<ApiResult<ClinicList[]>>(
MODULES_API_URL + '/clinic/clinic-list',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加诊所列表
*/
export async function addClinicList(data: ClinicList) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-list',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改诊所列表
*/
export async function updateClinicList(data: ClinicList) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-list',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除诊所列表
*/
export async function removeClinicList(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-list/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除诊所列表
*/
export async function removeBatchClinicList(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/clinic-list/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询诊所列表
*/
export async function getClinicList(id: number) {
const res = await request.get<ApiResult<ClinicList>>(
MODULES_API_URL + '/clinic/clinic-list/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,53 @@
import type { PageParam } from '@/api';
/**
* 诊所列表
*/
export interface ClinicList {
//
id?: number;
// 名称
name?: string;
// 省份id
provinceId?: number;
// 城市id
cityId?: number;
// 区域id
regionId?: number;
// 管理员id
userId?: number;
// 详细地址
address?: string;
// 联系方式
contact?: string;
// logo
logo?: string;
// 资质
qualify?: string;
// 0待审核 1通过 2拒绝
status?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 修改时间
updateTime?: string;
// 创建时间
createTime?: string;
//
lat?: string;
//
lng?: string;
}
/**
* 诊所列表搜索条件
*/
export interface ClinicListParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,111 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicMedicalHistory, ClinicMedicalHistoryParam } from './model';
/**
* 分页查询病例
*/
export async function pageClinicMedicalHistory(
params: ClinicMedicalHistoryParam
) {
const res = await request.get<ApiResult<PageResult<ClinicMedicalHistory>>>(
'/clinic/clinic-medical-history/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询病例列表
*/
export async function listClinicMedicalHistory(
params?: ClinicMedicalHistoryParam
) {
const res = await request.get<ApiResult<ClinicMedicalHistory[]>>(
'/clinic/clinic-medical-history',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加病例
*/
export async function addClinicMedicalHistory(data: ClinicMedicalHistory) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-medical-history',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改病例
*/
export async function updateClinicMedicalHistory(data: ClinicMedicalHistory) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-medical-history',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除病例
*/
export async function removeClinicMedicalHistory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medical-history/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除病例
*/
export async function removeBatchClinicMedicalHistory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medical-history/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询病例
*/
export async function getClinicMedicalHistory(id: number) {
const res = await request.get<ApiResult<ClinicMedicalHistory>>(
'/clinic/clinic-medical-history/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,61 @@
import type { PageParam } from '@/api';
/**
* 病例
*/
export interface ClinicMedicalHistory {
// 主键ID
id?: number;
// 买家用户ID
userId?: number;
// 订单编号
orderNo?: string;
// 分销商用户id(一级)
firstUserId?: number;
// 分销商用户id(二级)
secondUserId?: number;
// 分销商用户id(三级)
thirdUserId?: number;
// 分销佣金(一级)
firstMoney?: string;
// 分销佣金(二级)
secondMoney?: string;
// 分销佣金(三级)
thirdMoney?: string;
// 单价
price?: string;
// 订单总金额
orderPrice?: string;
// 结算金额
settledPrice?: string;
// 换算成度
degreePrice?: string;
// 实发金额
payPrice?: string;
// 税率
rate?: string;
// 结算月份
month?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 佣金结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: string;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 病例搜索条件
*/
export interface ClinicMedicalHistoryParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,105 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicMedicine, ClinicMedicineParam } from './model';
/**
* 分页查询药品库
*/
export async function pageClinicMedicine(params: ClinicMedicineParam) {
const res = await request.get<ApiResult<PageResult<ClinicMedicine>>>(
'/clinic/clinic-medicine/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询药品库列表
*/
export async function listClinicMedicine(params?: ClinicMedicineParam) {
const res = await request.get<ApiResult<ClinicMedicine[]>>(
'/clinic/clinic-medicine',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加药品库
*/
export async function addClinicMedicine(data: ClinicMedicine) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-medicine',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改药品库
*/
export async function updateClinicMedicine(data: ClinicMedicine) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-medicine',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除药品库
*/
export async function removeClinicMedicine(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除药品库
*/
export async function removeBatchClinicMedicine(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询药品库
*/
export async function getClinicMedicine(id: number) {
const res = await request.get<ApiResult<ClinicMedicine>>(
'/clinic/clinic-medicine/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,43 @@
import type { PageParam } from '@/api';
/**
* 药品库
*/
export interface ClinicMedicine {
// 主键ID
id?: number;
// 药名
name?: string;
// 拼音
pinyin?: string;
// 分类(如“清热解毒”、“补气养血”)
category?: string;
// 规格(如“饮片”、“颗粒”)
specification?: string;
// 单位(如“克”、“袋”)
unit?: string;
// 描述
content?: string;
// 单价
pricePerUnit?: string;
// 是否活跃
isActive?: number;
// 买家用户ID
userId?: number;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 药品库搜索条件
*/
export interface ClinicMedicineParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,111 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicMedicineInout, ClinicMedicineInoutParam } from './model';
/**
* 分页查询出入库
*/
export async function pageClinicMedicineInout(
params: ClinicMedicineInoutParam
) {
const res = await request.get<ApiResult<PageResult<ClinicMedicineInout>>>(
'/clinic/clinic-medicine-inout/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询出入库列表
*/
export async function listClinicMedicineInout(
params?: ClinicMedicineInoutParam
) {
const res = await request.get<ApiResult<ClinicMedicineInout[]>>(
'/clinic/clinic-medicine-inout',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加出入库
*/
export async function addClinicMedicineInout(data: ClinicMedicineInout) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-medicine-inout',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改出入库
*/
export async function updateClinicMedicineInout(data: ClinicMedicineInout) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-medicine-inout',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除出入库
*/
export async function removeClinicMedicineInout(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine-inout/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除出入库
*/
export async function removeBatchClinicMedicineInout(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine-inout/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询出入库
*/
export async function getClinicMedicineInout(id: number) {
const res = await request.get<ApiResult<ClinicMedicineInout>>(
'/clinic/clinic-medicine-inout/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,61 @@
import type { PageParam } from '@/api';
/**
* 出入库
*/
export interface ClinicMedicineInout {
// 主键ID
id?: number;
// 买家用户ID
userId?: number;
// 订单编号
orderNo?: string;
// 分销商用户id(一级)
firstUserId?: number;
// 分销商用户id(二级)
secondUserId?: number;
// 分销商用户id(三级)
thirdUserId?: number;
// 分销佣金(一级)
firstMoney?: string;
// 分销佣金(二级)
secondMoney?: string;
// 分销佣金(三级)
thirdMoney?: string;
// 单价
price?: string;
// 订单总金额
orderPrice?: string;
// 结算金额
settledPrice?: string;
// 换算成度
degreePrice?: string;
// 实发金额
payPrice?: string;
// 税率
rate?: string;
// 结算月份
month?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 佣金结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: string;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 出入库搜索条件
*/
export interface ClinicMedicineInoutParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,111 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicMedicineStock, ClinicMedicineStockParam } from './model';
/**
* 分页查询药品库存
*/
export async function pageClinicMedicineStock(
params: ClinicMedicineStockParam
) {
const res = await request.get<ApiResult<PageResult<ClinicMedicineStock>>>(
'/clinic/clinic-medicine-stock/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询药品库存列表
*/
export async function listClinicMedicineStock(
params?: ClinicMedicineStockParam
) {
const res = await request.get<ApiResult<ClinicMedicineStock[]>>(
'/clinic/clinic-medicine-stock',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加药品库存
*/
export async function addClinicMedicineStock(data: ClinicMedicineStock) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-medicine-stock',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改药品库存
*/
export async function updateClinicMedicineStock(data: ClinicMedicineStock) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-medicine-stock',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除药品库存
*/
export async function removeClinicMedicineStock(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine-stock/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除药品库存
*/
export async function removeBatchClinicMedicineStock(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine-stock/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询药品库存
*/
export async function getClinicMedicineStock(id: number) {
const res = await request.get<ApiResult<ClinicMedicineStock>>(
'/clinic/clinic-medicine-stock/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,35 @@
import type { PageParam } from '@/api';
/**
* 药品库存
*/
export interface ClinicMedicineStock {
// 主键ID
id?: number;
// 药品
medicineId?: number;
// 库存数量
stockQuantity?: number;
// 最小库存预警
minStockLevel?: number;
// 上次更新时间
lastUpdated?: string;
// 买家用户ID
userId?: number;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 药品库存搜索条件
*/
export interface ClinicMedicineStockParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,105 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicOrder, ClinicOrderParam } from './model';
/**
* 分页查询处方订单
*/
export async function pageClinicOrder(params: ClinicOrderParam) {
const res = await request.get<ApiResult<PageResult<ClinicOrder>>>(
'/clinic/clinic-order/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询处方订单列表
*/
export async function listClinicOrder(params?: ClinicOrderParam) {
const res = await request.get<ApiResult<ClinicOrder[]>>(
'/clinic/clinic-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 addClinicOrder(data: ClinicOrder) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改处方订单
*/
export async function updateClinicOrder(data: ClinicOrder) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除处方订单
*/
export async function removeClinicOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-order/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除处方订单
*/
export async function removeBatchClinicOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-order/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询处方订单
*/
export async function getClinicOrder(id: number) {
const res = await request.get<ApiResult<ClinicOrder>>(
'/clinic/clinic-order/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,167 @@
import type { PageParam } from '@/api';
/**
* 处方订单
*/
export interface ClinicOrder {
// 订单号
orderId?: number;
// 订单编号
orderNo?: string;
// 订单类型0商城订单 1预定订单/外卖 2会员卡
type?: number;
// 订单标题
title?: string;
// 快递/自提
deliveryType?: number;
// 下单渠道0小程序预定 1俱乐部训练场 3活动订场
channel?: number;
// 微信支付交易号号
transactionId?: string;
// 微信退款订单号
refundOrder?: string;
// 商户ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 商户编号
merchantCode?: string;
// 使用的优惠券id
couponId?: number;
// 使用的会员卡id
cardId?: string;
// 关联管理员id
adminId?: number;
// 核销管理员id
confirmId?: number;
// IC卡号
icCard?: string;
// 真实姓名
realName?: string;
// 关联收货地址
addressId?: number;
// 收货地址
address?: string;
//
addressLat?: string;
//
addressLng?: string;
// 买家留言
buyerRemarks?: string;
// 自提店铺id
selfTakeMerchantId?: number;
// 自提店铺
selfTakeMerchantName?: string;
// 配送开始时间
sendStartTime?: string;
// 配送结束时间
sendEndTime?: string;
// 发货店铺id
expressMerchantId?: number;
// 发货店铺
expressMerchantName?: string;
// 订单总额
totalPrice?: string;
// 减少的金额使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
reducePrice?: string;
// 实际付款
payPrice?: string;
// 用于统计
price?: string;
// 价钱,用于积分赠送
money?: string;
// 取消时间
cancelTime?: string;
// 取消原因
cancelReason?: string;
// 退款金额
refundMoney?: string;
// 教练价格
coachPrice?: string;
// 购买数量
totalNum?: number;
// 教练id
coachId?: number;
// 商品ID
formId?: number;
// 支付的用户id
payUserId?: number;
// 0余额支付1微信支付2支付宝支付3银联支付4现金支付5POS机支付6免费7积分支付
payType?: number;
// 微信支付子类型JSAPI小程序支付NATIVE扫码支付
wechatPayType?: string;
// 0余额支付1微信支付2支付宝支付3银联支付4现金支付5POS机支付6免费7积分支付
friendPayType?: number;
// 0未付款1已付款
payStatus?: string;
// 0未使用1已完成2已取消3取消中4退款申请中5退款被拒绝6退款成功7客户端申请退款
orderStatus?: number;
// 发货状态(10未发货 20已发货 30部分发货)
deliveryStatus?: number;
// 无需发货备注
deliveryNote?: string;
// 发货时间
deliveryTime?: string;
// 评价状态(0未评价 1已评价)
evaluateStatus?: number;
// 评价时间
evaluateTime?: string;
// 优惠类型0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
couponType?: number;
// 优惠说明
couponDesc?: string;
// 二维码地址,保存订单号,支付成功后才生成
qrcode?: string;
// vip月卡年卡、ic月卡年卡回退次数
returnNum?: number;
// vip充值回退金额
returnMoney?: string;
// 预约详情开始时间数组
startTime?: string;
// 是否已开具发票0未开发票1已开发票2不能开具发票
isInvoice?: string;
// 发票流水号
invoiceNo?: string;
// 商家留言
merchantRemarks?: string;
// 支付时间
payTime?: string;
// 退款时间
refundTime?: string;
// 申请退款时间
refundApplyTime?: string;
// 过期时间
expirationTime?: string;
// 自提码
selfTakeCode?: string;
// 是否已收到赠品
hasTakeGift?: string;
// 对账情况0=未对账1=已对账3=已对账金额对不上4=未查询到该订单
checkBill?: number;
// 订单是否已结算(0未结算 1已结算)
isSettled?: number;
// 系统版本号 0当前版本 value=其他版本
version?: number;
// 用户id
userId?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 修改时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 处方订单搜索条件
*/
export interface ClinicOrderParam extends PageParam {
orderId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,107 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicPatientUser, ClinicPatientUserParam } from './model';
/**
* 分页查询患者
*/
export async function pageClinicPatientUser(params: ClinicPatientUserParam) {
const res = await request.get<ApiResult<PageResult<ClinicPatientUser>>>(
'/clinic/clinic-patient-user/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询患者列表
*/
export async function listClinicPatientUser(params?: ClinicPatientUserParam) {
const res = await request.get<ApiResult<ClinicPatientUser[]>>(
'/clinic/clinic-patient-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 addClinicPatientUser(data: ClinicPatientUser) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-patient-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改患者
*/
export async function updateClinicPatientUser(data: ClinicPatientUser) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-patient-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除患者
*/
export async function removeClinicPatientUser(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-patient-user/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除患者
*/
export async function removeBatchClinicPatientUser(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-patient-user/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询患者
*/
export async function getClinicPatientUser(id: number) {
const res = await request.get<ApiResult<ClinicPatientUser>>(
'/clinic/clinic-patient-user/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,49 @@
import type { PageParam } from '@/api';
/**
* 患者
*/
export interface ClinicPatientUser {
// 主键ID
id?: number;
// 类型 0经销商 1企业 2集团
type?: number;
// 自增ID
userId?: number;
// 姓名
realName?: string;
// 性别
sex?: string;
// 手机号
phone?: string;
// 年龄
age?: number;
// 身高
height?: number;
// 体重
weight?: number;
// 过敏史
allergyHistory?: string;
// 专属二维码
qrcode?: string;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除
isDelete?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 患者搜索条件
*/
export interface ClinicPatientUserParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,114 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicPrescription, ClinicPrescriptionParam } from './model';
/**
* 分页查询处方主表
*/
export async function pageClinicPrescription(params: ClinicPrescriptionParam) {
const res = await request.get<ApiResult<PageResult<ClinicPrescription>>>(
'/clinic/clinic-prescription/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询处方主表
列表
*/
export async function listClinicPrescription(params?: ClinicPrescriptionParam) {
const res = await request.get<ApiResult<ClinicPrescription[]>>(
'/clinic/clinic-prescription',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加处方主表
*/
export async function addClinicPrescription(data: ClinicPrescription) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-prescription',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改处方主表
*/
export async function updateClinicPrescription(data: ClinicPrescription) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-prescription',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除处方主表
*/
export async function removeClinicPrescription(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-prescription/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除处方主表
*/
export async function removeBatchClinicPrescription(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-prescription/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询处方主表
*/
export async function getClinicPrescription(id: number) {
const res = await request.get<ApiResult<ClinicPrescription>>(
'/clinic/clinic-prescription/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,60 @@
import type { PageParam } from '@/api';
import type { ClinicPrescriptionItem } from '../../clinicPrescriptionItem/model';
/**
* 处方主表
*/
export interface ClinicPrescription {
// 主键ID
id?: number;
// 患者
userId?: number;
// 医生
doctorId?: number;
// 订单编号
orderNo?: string;
// 关联就诊表
visitRecordId?: number;
// 处方类型 0中药 1西药
prescriptionType?: number;
// 诊断结果
diagnosis?: string;
// 治疗方案
treatmentPlan?: string;
// 煎药说明
decoctionInstructions?: string;
// 订单总金额
orderPrice?: string;
// 单价
price?: string;
// 实付金额
payPrice?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: string;
// 状态, 0正常, 1已完成2已支付3已取消
status?: number;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
// 处方药品
items?: ClinicPrescriptionItem[];
}
/**
* 处方主表
搜索条件
*/
export interface ClinicPrescriptionParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,123 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type {
ClinicPrescriptionItem,
ClinicPrescriptionItemParam
} from './model';
/**
* 分页查询处方明细表
*/
export async function pageClinicPrescriptionItem(
params: ClinicPrescriptionItemParam
) {
const res = await request.get<ApiResult<PageResult<ClinicPrescriptionItem>>>(
'/clinic/clinic-prescription-item/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询处方明细表
列表
*/
export async function listClinicPrescriptionItem(
params?: ClinicPrescriptionItemParam
) {
const res = await request.get<ApiResult<ClinicPrescriptionItem[]>>(
'/clinic/clinic-prescription-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 addClinicPrescriptionItem(data: ClinicPrescriptionItem) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-prescription-item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改处方明细表
*/
export async function updateClinicPrescriptionItem(
data: ClinicPrescriptionItem
) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-prescription-item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除处方明细表
*/
export async function removeClinicPrescriptionItem(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-prescription-item/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除处方明细表
*/
export async function removeBatchClinicPrescriptionItem(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-prescription-item/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询处方明细表
*/
export async function getClinicPrescriptionItem(id: number) {
const res = await request.get<ApiResult<ClinicPrescriptionItem>>(
'/clinic/clinic-prescription-item/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,49 @@
import type { PageParam } from '@/api';
/**
* 处方明细表
*/
export interface ClinicPrescriptionItem {
// 自增ID
id?: number;
// 关联处方
prescriptionId?: number;
// 订单编号
prescriptionNo?: string;
// 关联药品
medicineId?: number;
// 剂量如“10g”
dosage?: string;
// 用法频率(如“每日三次”)
usageFrequency?: string;
// 服用天数
days?: number;
// 购买数量
amount?: number;
// 单价
unitPrice?: string;
// 数量
quantity?: number;
// 排序号
sortNumber?: number;
// 备注
comments?: string;
// 用户id
userId?: number;
// 租户id
tenantId?: number;
// 更新时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 处方明细表
搜索条件
*/
export interface ClinicPrescriptionItemParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,105 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicReport, ClinicReportParam } from './model';
/**
* 分页查询报告
*/
export async function pageClinicReport(params: ClinicReportParam) {
const res = await request.get<ApiResult<PageResult<ClinicReport>>>(
'/clinic/clinic-report/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询报告列表
*/
export async function listClinicReport(params?: ClinicReportParam) {
const res = await request.get<ApiResult<ClinicReport[]>>(
'/clinic/clinic-report',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加报告
*/
export async function addClinicReport(data: ClinicReport) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-report',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改报告
*/
export async function updateClinicReport(data: ClinicReport) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-report',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除报告
*/
export async function removeClinicReport(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-report/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除报告
*/
export async function removeBatchClinicReport(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-report/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询报告
*/
export async function getClinicReport(id: number) {
const res = await request.get<ApiResult<ClinicReport>>(
'/clinic/clinic-report/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,61 @@
import type { PageParam } from '@/api';
/**
* 报告
*/
export interface ClinicReport {
// 主键ID
id?: number;
// 买家用户ID
userId?: number;
// 订单编号
orderNo?: string;
// 分销商用户id(一级)
firstUserId?: number;
// 分销商用户id(二级)
secondUserId?: number;
// 分销商用户id(三级)
thirdUserId?: number;
// 分销佣金(一级)
firstMoney?: string;
// 分销佣金(二级)
secondMoney?: string;
// 分销佣金(三级)
thirdMoney?: string;
// 单价
price?: string;
// 订单总金额
orderPrice?: string;
// 结算金额
settledPrice?: string;
// 换算成度
degreePrice?: string;
// 实发金额
payPrice?: string;
// 税率
rate?: string;
// 结算月份
month?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 佣金结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: string;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 报告搜索条件
*/
export interface ClinicReportParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,107 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicVisitRecord, ClinicVisitRecordParam } from './model';
/**
* 分页查询病例
*/
export async function pageClinicVisitRecord(params: ClinicVisitRecordParam) {
const res = await request.get<ApiResult<PageResult<ClinicVisitRecord>>>(
'/clinic/clinic-visit-record/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询病例列表
*/
export async function listClinicVisitRecord(params?: ClinicVisitRecordParam) {
const res = await request.get<ApiResult<ClinicVisitRecord[]>>(
'/clinic/clinic-visit-record',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加病例
*/
export async function addClinicVisitRecord(data: ClinicVisitRecord) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-visit-record',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改病例
*/
export async function updateClinicVisitRecord(data: ClinicVisitRecord) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-visit-record',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除病例
*/
export async function removeClinicVisitRecord(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-visit-record/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除病例
*/
export async function removeBatchClinicVisitRecord(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-visit-record/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询病例
*/
export async function getClinicVisitRecord(id: number) {
const res = await request.get<ApiResult<ClinicVisitRecord>>(
'/clinic/clinic-visit-record/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,61 @@
import type { PageParam } from '@/api';
/**
* 病例
*/
export interface ClinicVisitRecord {
// 主键ID
id?: number;
// 买家用户ID
userId?: number;
// 订单编号
orderNo?: string;
// 分销商用户id(一级)
firstUserId?: number;
// 分销商用户id(二级)
secondUserId?: number;
// 分销商用户id(三级)
thirdUserId?: number;
// 分销佣金(一级)
firstMoney?: string;
// 分销佣金(二级)
secondMoney?: string;
// 分销佣金(三级)
thirdMoney?: string;
// 单价
price?: string;
// 订单总金额
orderPrice?: string;
// 结算金额
settledPrice?: string;
// 换算成度
degreePrice?: string;
// 实发金额
payPrice?: string;
// 税率
rate?: string;
// 结算月份
month?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 佣金结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: string;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 病例搜索条件
*/
export interface ClinicVisitRecordParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,115 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { PrescriptionOrder, PrescriptionOrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询处方主表
*/
export async function pagePrescriptionOrder(params: PrescriptionOrderParam) {
const res = await request.get<ApiResult<PageResult<PrescriptionOrder>>>(
MODULES_API_URL + '/clinic/prescription-order/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询处方主表
列表
*/
export async function listPrescriptionOrder(params?: PrescriptionOrderParam) {
const res = await request.get<ApiResult<PrescriptionOrder[]>>(
MODULES_API_URL + '/clinic/prescription-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 addPrescriptionOrder(data: PrescriptionOrder) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改处方主表
*/
export async function updatePrescriptionOrder(data: PrescriptionOrder) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除处方主表
*/
export async function removePrescriptionOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除处方主表
*/
export async function removeBatchPrescriptionOrder(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询处方主表
*/
export async function getPrescriptionOrder(id: number) {
const res = await request.get<ApiResult<PrescriptionOrder>>(
MODULES_API_URL + '/clinic/prescription-order/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,65 @@
import type { PageParam } from '@/api';
/**
* 处方主表
*/
export interface PrescriptionOrder {
// 主键ID
id?: number;
//
clinicId?: number;
// 患者
userId?: number;
// 医生
doctorId?: number;
//
orderId?: number;
// 订单编号
orderNo?: string;
// 关联就诊表
visitRecordId?: number;
// 处方类型 0中药 1西药
prescriptionType?: number;
// 诊断结果
diagnosis?: string;
// 治疗方案
treatmentPlan?: string;
// 煎药说明
decoctionInstructions?: string;
// 上传照片
image?: string;
// 订单总金额
orderPrice?: string;
// 单价
price?: string;
// 实付金额
payPrice?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: string;
// 排序号
sortNumber?: number;
// 状态, 0正常, 1已完成2已支付3已取消
status?: number;
// 备注
comments?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 处方主表
搜索条件
*/
export interface PrescriptionOrderParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,122 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type {
PrescriptionOrderItem,
PrescriptionOrderItemParam
} from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询处方明细表
*/
export async function pagePrescriptionOrderItem(
params: PrescriptionOrderItemParam
) {
const res = await request.get<ApiResult<PageResult<PrescriptionOrderItem>>>(
MODULES_API_URL + '/clinic/prescription-order-item/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询处方明细表
列表
*/
export async function listPrescriptionOrderItem(
params?: PrescriptionOrderItemParam
) {
const res = await request.get<ApiResult<PrescriptionOrderItem[]>>(
MODULES_API_URL + '/clinic/prescription-order-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 addPrescriptionOrderItem(data: PrescriptionOrderItem) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order-item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改处方明细表
*/
export async function updatePrescriptionOrderItem(data: PrescriptionOrderItem) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order-item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除处方明细表
*/
export async function removePrescriptionOrderItem(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order-item/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除处方明细表
*/
export async function removeBatchPrescriptionOrderItem(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order-item/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询处方明细表
*/
export async function getPrescriptionOrderItem(id: number) {
const res = await request.get<ApiResult<PrescriptionOrderItem>>(
MODULES_API_URL + '/clinic/prescription-order-item/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,49 @@
import type { PageParam } from '@/api';
/**
* 处方明细表
*/
export interface PrescriptionOrderItem {
// 自增ID
id?: number;
// 关联处方
prescriptionId?: number;
// 订单编号
prescriptionNo?: string;
// 关联药品
medicineId?: number;
// 剂量如“10g”
dosage?: string;
// 用法频率(如“每日三次”)
usageFrequency?: string;
// 服用天数
days?: number;
// 购买数量
amount?: number;
// 单价
unitPrice?: string;
// 数量
quantity?: number;
// 排序号
sortNumber?: number;
// 备注
comments?: string;
// 用户id
userId?: number;
// 租户id
tenantId?: number;
// 更新时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 处方明细表
搜索条件
*/
export interface PrescriptionOrderItemParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -13,6 +13,7 @@ export interface Ad {
path?: string;
images?: string;
userId?: number;
merchantId?: number;
sortNumber?: number;
comments?: string;
status?: number;
@@ -29,6 +30,7 @@ export interface AdParam extends PageParam {
adId?: string;
name?: number;
type?: number;
merchantId?: number;
adType?: string;
userId?: number;
}

View File

@@ -18,6 +18,8 @@ export interface Article {
categoryName?: string;
// 封面图
image?: string;
imageWidth?: number;
imageHeight?: number;
// 附件
files?: string;
// 缩列图

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ArticleCheck, ArticleCheckParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageArticleCheck(params: ArticleCheckParam) {
const res = await request.get<ApiResult<PageResult<ArticleCheck>>>(
MODULES_API_URL + '/cms/article-check/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listArticleCheck(params?: ArticleCheckParam) {
const res = await request.get<ApiResult<ArticleCheck[]>>(
MODULES_API_URL + '/cms/article-check',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addArticleCheck(data: ArticleCheck) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-check',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateArticleCheck(data: ArticleCheck) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-check',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeArticleCheck(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-check/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchArticleCheck(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-check/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getArticleCheck(id: number) {
const res = await request.get<ApiResult<ArticleCheck>>(
MODULES_API_URL + '/cms/article-check/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,35 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface ArticleCheck {
//
id?: number;
// 文章ID
articleId?: number;
//
userId?: number;
// 0待审核1通过2拒绝
status?: string;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 搜索条件
*/
export interface ArticleCheckParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -2,6 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsArticle, CmsArticleParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
import type { ArticleParam } from '@/api/cms/article/model';
/**
* 分页查询文章
@@ -104,3 +105,13 @@ export async function getCmsArticle(id: number) {
}
return Promise.reject(new Error(res.data.message));
}
export async function getCount(params: ArticleParam) {
const res = await request.get(SERVER_API_URL + '/cms/cms-article/data', {
params
});
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsArticleCategory, CmsArticleCategoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { SERVER_API_URL } from '@/config/setting';
/**
* 分页查询文章分类表
*/
export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<PageResult<CmsArticleCategory>>>(
MODULES_API_URL + '/cms/cms-article-category/page',
'/cms/cms-article-category/page',
{
params
}
@@ -24,7 +24,7 @@ export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
*/
export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<CmsArticleCategory[]>>(
MODULES_API_URL + '/cms/cms-article-category',
'/cms/cms-article-category',
{
params
}
@@ -40,7 +40,7 @@ export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
*/
export async function addCmsArticleCategory(data: CmsArticleCategory) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category',
SERVER_API_URL + '/cms/cms-article-category',
data
);
if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addCmsArticleCategory(data: CmsArticleCategory) {
*/
export async function updateCmsArticleCategory(data: CmsArticleCategory) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category',
SERVER_API_URL + '/cms/cms-article-category',
data
);
if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateCmsArticleCategory(data: CmsArticleCategory) {
*/
export async function removeCmsArticleCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category/' + id
SERVER_API_URL + '/cms/cms-article-category/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -79,9 +79,11 @@ export async function removeCmsArticleCategory(id?: number) {
/**
* 批量删除文章分类表
*/
export async function removeBatchCmsArticleCategory(data: (number | undefined)[]) {
export async function removeBatchCmsArticleCategory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category/batch',
SERVER_API_URL + '/cms/cms-article-category/batch',
{
data
}
@@ -97,7 +99,7 @@ export async function removeBatchCmsArticleCategory(data: (number | undefined)[]
*/
export async function getCmsArticleCategory(id: number) {
const res = await request.get<ApiResult<CmsArticleCategory>>(
MODULES_API_URL + '/cms/cms-article-category/' + id
SERVER_API_URL + '/cms/cms-article-category/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;

View File

@@ -46,6 +46,8 @@ export interface CmsArticleCategory {
createTime?: string;
// 修改时间
updateTime?: string;
value?: number;
label?: string;
}
/**

View File

@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
*/
export async function pageCmsArticleComment(params: CmsArticleCommentParam) {
const res = await request.get<ApiResult<PageResult<CmsArticleComment>>>(
MODULES_API_URL + '/cms/cms-article-comment/page',
MODULES_API_URL + '/cms/article-comment/page',
{
params
}
@@ -24,7 +24,7 @@ export async function pageCmsArticleComment(params: CmsArticleCommentParam) {
*/
export async function listCmsArticleComment(params?: CmsArticleCommentParam) {
const res = await request.get<ApiResult<CmsArticleComment[]>>(
MODULES_API_URL + '/cms/cms-article-comment',
MODULES_API_URL + '/cms/article-comment',
{
params
}
@@ -40,7 +40,7 @@ export async function listCmsArticleComment(params?: CmsArticleCommentParam) {
*/
export async function addCmsArticleComment(data: CmsArticleComment) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-comment',
MODULES_API_URL + '/cms/article-comment',
data
);
if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addCmsArticleComment(data: CmsArticleComment) {
*/
export async function updateCmsArticleComment(data: CmsArticleComment) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-comment',
MODULES_API_URL + '/cms/article-comment',
data
);
if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateCmsArticleComment(data: CmsArticleComment) {
*/
export async function removeCmsArticleComment(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-comment/' + id
MODULES_API_URL + '/cms/article-comment/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -79,9 +79,11 @@ export async function removeCmsArticleComment(id?: number) {
/**
* 批量删除文章评论表
*/
export async function removeBatchCmsArticleComment(data: (number | undefined)[]) {
export async function removeBatchCmsArticleComment(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-comment/batch',
MODULES_API_URL + '/cms/article-comment/batch',
{
data
}
@@ -97,7 +99,7 @@ export async function removeBatchCmsArticleComment(data: (number | undefined)[])
*/
export async function getCmsArticleComment(id: number) {
const res = await request.get<ApiResult<CmsArticleComment>>(
MODULES_API_URL + '/cms/cms-article-comment/' + id
MODULES_API_URL + '/cms/article-comment/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;

View File

@@ -43,5 +43,6 @@ export interface CmsArticleComment {
*/
export interface CmsArticleCommentParam extends PageParam {
commentId?: number;
articleId?: number;
keywords?: string;
}

View File

@@ -79,7 +79,9 @@ export async function removeCmsArticleContent(id?: number) {
/**
* 批量删除文章记录表
*/
export async function removeBatchCmsArticleContent(data: (number | undefined)[]) {
export async function removeBatchCmsArticleContent(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-content/batch',
{

View File

@@ -4,7 +4,7 @@ import type { PageParam } from '@/api';
* 文章记录表
*/
export interface CmsArticleContent {
//
//
id?: number;
// 文章ID
articleId?: number;

View File

@@ -4,46 +4,51 @@ import type { PageParam } from '@/api';
* 页面管理记录表
*/
export interface CmsDesign {
// ID
pageId?: number;
// 页面标题
name?: string;
// 所属栏目ID
categoryId?: number;
// 页面关键词
keywords?: string;
// 页面描述
description?: string;
// 缩列图
path?: string;
component?: string;
photo?: string;
// 购买链接
buyUrl?: string;
content?: string;
// 类型
type?: string;
categoryId?: number;
// 宽
width?: string;
// 高
height?: string;
// 页面样式
style?: string;
// 页面内容
content?: string;
// 是否开启布局
showLayout?: number;
// 页面布局
layout?: string;
// 上级id, 0是顶级
parentId?: number;
// 附件
images?: string;
// 用户ID
userId?: number;
// 设为首页
home?: number;
// 排序(数字越小越靠前)
// 排序
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0正常, 1冻结
// 状态
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 更新时间
updateTime?: string;
// 页面布局
layout?: string;
backgroundColor?: string;
// 关联网站导航ID
navigationId?: number;
showLayout?: boolean;
btn?: any[];
showBanner?: boolean;
buyUrl?: string;
demoUrl?: string;
account?: string;
docUrl?: string;
}
/**

View File

@@ -6,7 +6,7 @@ import type { PageParam } from '@/api';
export interface CmsDomain {
// ID
id?: number;
// 类型 0赠送域名 1绑定域名
// 类型 0赠送域名 1绑定域名
type?: number;
// 域名
domain?: string;

View File

@@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsNavigation, CmsNavigationParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
import type { Navigation, NavigationParam } from '@/api/cms/navigation/model';
/**
* 分页查询网站导航记录表
*/
export async function pageCmsNavigation(params: CmsNavigationParam) {
const res = await request.get<ApiResult<PageResult<CmsNavigation>>>(
SERVER_API_URL + '/cms/cms-navigation/page',
'https://cms-api.websoft.top/api/cms/cms-navigation/page',
{
params
}
@@ -24,7 +24,7 @@ export async function pageCmsNavigation(params: CmsNavigationParam) {
*/
export async function listCmsNavigation(params?: CmsNavigationParam) {
const res = await request.get<ApiResult<CmsNavigation[]>>(
SERVER_API_URL + '/cms/cms-navigation',
'https://cms-api.websoft.top/api/cms/cms-navigation',
{
params
}
@@ -35,12 +35,27 @@ export async function listCmsNavigation(params?: CmsNavigationParam) {
return Promise.reject(new Error(res.data.message));
}
/**
* 查询导航列表(树形结构)
*/
export async function treeNavigation(params?: NavigationParam) {
const res = await request.get<ApiResult<Navigation[]>>(
'https://cms-api.websoft.top/api/cms/cms-navigation/tree',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加网站导航记录表
*/
export async function addCmsNavigation(data: CmsNavigation) {
const res = await request.post<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation',
'https://cms-api.websoft.top/api/cms/cms-navigation',
data
);
if (res.data.code === 0) {
@@ -54,7 +69,7 @@ export async function addCmsNavigation(data: CmsNavigation) {
*/
export async function updateCmsNavigation(data: CmsNavigation) {
const res = await request.put<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation',
'https://cms-api.websoft.top/api/cms/cms-navigation',
data
);
if (res.data.code === 0) {
@@ -68,7 +83,7 @@ export async function updateCmsNavigation(data: CmsNavigation) {
*/
export async function removeCmsNavigation(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation/' + id
'/cms/cms-navigation/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -81,7 +96,7 @@ export async function removeCmsNavigation(id?: number) {
*/
export async function removeBatchCmsNavigation(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation/batch',
'https://cms-api.websoft.top/api/cms/cms-navigation/batch',
{
data
}
@@ -97,7 +112,7 @@ export async function removeBatchCmsNavigation(data: (number | undefined)[]) {
*/
export async function getCmsNavigation(id: number) {
const res = await request.get<ApiResult<CmsNavigation>>(
SERVER_API_URL + '/cms/cms-navigation/' + id
'https://cms-api.websoft.top/api/cms/cms-navigation/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;

View File

@@ -18,6 +18,7 @@ export interface CmsNavigation {
path?: string;
// 菜单组件地址, 目录可为空
component?: string;
componentPath?: string;
// 打开位置
target?: string;
// 菜单图标

View File

@@ -0,0 +1,117 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProduct, CmsProductParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
import type { ArticleParam } from '@/api/cms/article/model';
/**
* 分页查询产品
*/
export async function pageCmsProduct(params: CmsProductParam) {
const res = await request.get<ApiResult<PageResult<CmsProduct>>>(
SERVER_API_URL + '/cms/cms-product/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询产品列表
*/
export async function listCmsProduct(params?: CmsProductParam) {
const res = await request.get<ApiResult<CmsProduct[]>>(
SERVER_API_URL + '/cms/cms-product',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加产品
*/
export async function addCmsProduct(data: CmsProduct) {
const res = await request.post<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-product',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改产品
*/
export async function updateCmsProduct(data: CmsProduct) {
const res = await request.put<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-product',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除产品
*/
export async function removeCmsProduct(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-product/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除产品
*/
export async function removeBatchCmsProduct(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-product/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询产品
*/
export async function getCmsProduct(id: number) {
const res = await request.get<ApiResult<CmsProduct>>(
SERVER_API_URL + '/cms/cms-product/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
export async function getCount(params: ArticleParam) {
const res = await request.get(SERVER_API_URL + '/cms/cms-product/data', {
params
});
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,74 @@
import type { PageParam } from '@/api';
/**
* 产品
*/
export interface CmsProduct {
// 自增ID
productId?: number;
// 类型 0软件产品 1实物商品 2虚拟商品
type?: number;
// 产品编码
code?: string;
// 产品标题
title?: string;
// 封面图
image?: string;
// 产品详情
content?: string;
// 父级分类ID
parentId?: number;
// 产品分类ID
categoryId?: number;
// 产品规格 0单规格 1多规格
specs?: number;
// 货架
position?: string;
// 单位名称 (个)
unitName?: string;
// 进货价格
price?: string;
// 销售价格
salePrice?: string;
// 库存计算方式(10下单减库存 20付款减库存)
deductStockType?: number;
// 轮播图
files?: string;
// 销量
sales?: number;
// 库存
stock?: number;
// 消费赚取积分
gainIntegral?: string;
// 推荐
recommend?: number;
// 商户ID
merchantId?: number;
// 状态0未上架1上架
isShow?: string;
// 状态, 0上架 1待上架 2待审核 3审核不通过
status?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 用户ID
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 产品搜索条件
*/
export interface CmsProductParam extends PageParam {
productId?: number;
status?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProductSpec, CmsProductSpecParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询规格
*/
export async function pageCmsProductSpec(params: CmsProductSpecParam) {
const res = await request.get<ApiResult<PageResult<CmsProductSpec>>>(
MODULES_API_URL + '/cms/cms-product-spec/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询规格列表
*/
export async function listCmsProductSpec(params?: CmsProductSpecParam) {
const res = await request.get<ApiResult<CmsProductSpec[]>>(
MODULES_API_URL + '/cms/cms-product-spec',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加规格
*/
export async function addCmsProductSpec(data: CmsProductSpec) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改规格
*/
export async function updateCmsProductSpec(data: CmsProductSpec) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除规格
*/
export async function removeCmsProductSpec(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除规格
*/
export async function removeBatchCmsProductSpec(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询规格
*/
export async function getCmsProductSpec(id: number) {
const res = await request.get<ApiResult<CmsProductSpec>>(
MODULES_API_URL + '/cms/cms-product-spec/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,35 @@
import type { PageParam } from '@/api';
/**
* 规格
*/
export interface CmsProductSpec {
// 规格ID
specId?: number;
// 规格名称
specName?: string;
// 规格值
specValue?: string;
// 创建用户
userId?: number;
// 更新者
updater?: number;
// 备注
comments?: string;
// 状态, 0正常, 1待修,2异常已修3异常未修
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 规格搜索条件
*/
export interface CmsProductSpecParam extends PageParam {
specId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,112 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProductSpecValue, CmsProductSpecValueParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询规格值
*/
export async function pageCmsProductSpecValue(
params: CmsProductSpecValueParam
) {
const res = await request.get<ApiResult<PageResult<CmsProductSpecValue>>>(
MODULES_API_URL + '/cms/cms-product-spec-value/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询规格值列表
*/
export async function listCmsProductSpecValue(
params?: CmsProductSpecValueParam
) {
const res = await request.get<ApiResult<CmsProductSpecValue[]>>(
MODULES_API_URL + '/cms/cms-product-spec-value',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加规格值
*/
export async function addCmsProductSpecValue(data: CmsProductSpecValue) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec-value',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改规格值
*/
export async function updateCmsProductSpecValue(data: CmsProductSpecValue) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec-value',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除规格值
*/
export async function removeCmsProductSpecValue(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec-value/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除规格值
*/
export async function removeBatchCmsProductSpecValue(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec-value/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询规格值
*/
export async function getCmsProductSpecValue(id: number) {
const res = await request.get<ApiResult<CmsProductSpecValue>>(
MODULES_API_URL + '/cms/cms-product-spec-value/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,29 @@
import type { PageParam } from '@/api';
/**
* 规格值
*/
export interface CmsProductSpecValue {
// 规格值ID
specValueId?: number;
// 规格组ID
specId?: number;
// 规格值
specValue?: string;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 规格值搜索条件
*/
export interface CmsProductSpecValueParam extends PageParam {
specValueId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProductUrl, CmsProductUrlParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询域名
*/
export async function pageCmsProductUrl(params: CmsProductUrlParam) {
const res = await request.get<ApiResult<PageResult<CmsProductUrl>>>(
MODULES_API_URL + '/cms/cms-product-url/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询域名列表
*/
export async function listCmsProductUrl(params?: CmsProductUrlParam) {
const res = await request.get<ApiResult<CmsProductUrl[]>>(
MODULES_API_URL + '/cms/cms-product-url',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加域名
*/
export async function addCmsProductUrl(data: CmsProductUrl) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-url',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改域名
*/
export async function updateCmsProductUrl(data: CmsProductUrl) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-url',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除域名
*/
export async function removeCmsProductUrl(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-url/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除域名
*/
export async function removeBatchCmsProductUrl(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-url/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询域名
*/
export async function getCmsProductUrl(id: number) {
const res = await request.get<ApiResult<CmsProductUrl>>(
MODULES_API_URL + '/cms/cms-product-url/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,39 @@
import type { PageParam } from '@/api';
/**
* 域名
*/
export interface CmsProductUrl {
// 自增ID
id?: number;
// 产品ID
productId?: number;
// 域名类型
type?: string;
// 域名
domain?: string;
// 账号
account?: string;
// 密码
password?: string;
// 商户ID
merchantId?: number;
// 备注
comments?: string;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0正常, 1待确认
status?: number;
// 创建时间
createTime?: string;
// 租户id
tenantId?: number;
}
/**
* 域名搜索条件
*/
export interface CmsProductUrlParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsWebsite, CmsWebsiteParam } from './model';
import { MODULES_API_URL, SERVER_API_URL } from '@/config/setting';
import { SERVER_API_URL } from '@/config/setting';
/**
* 分页查询网站信息记录表

View File

@@ -93,5 +93,6 @@ export interface CmsWebsite {
*/
export interface CmsWebsiteParam extends PageParam {
websiteId?: number;
status?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DesignCategory, DesignCategoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询设计征集报名分类
*/
export async function pageDesignCategory(params: DesignCategoryParam) {
const res = await request.get<ApiResult<PageResult<DesignCategory>>>(
MODULES_API_URL + '/cms/design-category/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询设计征集报名分类列表
*/
export async function listDesignCategory(params?: DesignCategoryParam) {
const res = await request.get<ApiResult<DesignCategory[]>>(
MODULES_API_URL + '/cms/design-category',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加设计征集报名分类
*/
export async function addDesignCategory(data: DesignCategory) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改设计征集报名分类
*/
export async function updateDesignCategory(data: DesignCategory) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除设计征集报名分类
*/
export async function removeDesignCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-category/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除设计征集报名分类
*/
export async function removeBatchDesignCategory(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-category/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询设计征集报名分类
*/
export async function getDesignCategory(id: number) {
const res = await request.get<ApiResult<DesignCategory>>(
MODULES_API_URL + '/cms/design-category/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,35 @@
import type { PageParam } from '@/api';
/**
* 设计征集报名分类
*/
export interface DesignCategory {
//
id?: number;
//
title?: string;
// 用户ID
userId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 设计征集报名分类搜索条件
*/
export interface DesignCategoryParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DesignCollect, DesignCollectParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询设计征集
*/
export async function pageDesignCollect(params: DesignCollectParam) {
const res = await request.get<ApiResult<PageResult<DesignCollect>>>(
MODULES_API_URL + '/cms/design-collect/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询设计征集列表
*/
export async function listDesignCollect(params?: DesignCollectParam) {
const res = await request.get<ApiResult<DesignCollect[]>>(
MODULES_API_URL + '/cms/design-collect',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加设计征集
*/
export async function addDesignCollect(data: DesignCollect) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-collect',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改设计征集
*/
export async function updateDesignCollect(data: DesignCollect) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-collect',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除设计征集
*/
export async function removeDesignCollect(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-collect/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除设计征集
*/
export async function removeBatchDesignCollect(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-collect/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询设计征集
*/
export async function getDesignCollect(id: number) {
const res = await request.get<ApiResult<DesignCollect>>(
MODULES_API_URL + '/cms/design-collect/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,40 @@
import type { PageParam } from '@/api';
/**
* 设计征集
*/
export interface DesignCollect {
//
id?: number;
categoryId?: number;
//
title?: string;
//
content?: string;
//
image?: string;
// 用户ID
userId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 设计征集搜索条件
*/
export interface DesignCollectParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { DesignSignUp, DesignSignUpParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询设计征集报名
*/
export async function pageDesignSignUp(params: DesignSignUpParam) {
const res = await request.get<ApiResult<PageResult<DesignSignUp>>>(
MODULES_API_URL + '/cms/design-sign-up/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询设计征集报名列表
*/
export async function listDesignSignUp(params?: DesignSignUpParam) {
const res = await request.get<ApiResult<DesignSignUp[]>>(
MODULES_API_URL + '/cms/design-sign-up',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加设计征集报名
*/
export async function addDesignSignUp(data: DesignSignUp) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-sign-up',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改设计征集报名
*/
export async function updateDesignSignUp(data: DesignSignUp) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-sign-up',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除设计征集报名
*/
export async function removeDesignSignUp(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-sign-up/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除设计征集报名
*/
export async function removeBatchDesignSignUp(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/design-sign-up/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询设计征集报名
*/
export async function getDesignSignUp(id: number) {
const res = await request.get<ApiResult<DesignSignUp>>(
MODULES_API_URL + '/cms/design-sign-up/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,42 @@
import type { PageParam } from '@/api';
/**
* 设计征集报名
*/
export interface DesignSignUp {
//
id?: number;
//
designId?: number;
//
name?: string;
//
phone?: string;
//
content?: string;
// 用户ID
userId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 设计征集报名搜索条件
*/
export interface DesignSignUpParam extends PageParam {
id?: number;
designId?: number;
keywords?: string;
}

106
src/api/cms/follow/index.ts Normal file
View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Follow, FollowParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询关注
*/
export async function pageFollow(params: FollowParam) {
const res = await request.get<ApiResult<PageResult<Follow>>>(
MODULES_API_URL + '/cms/follow/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询关注列表
*/
export async function listFollow(params?: FollowParam) {
const res = await request.get<ApiResult<Follow[]>>(
MODULES_API_URL + '/cms/follow',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加关注
*/
export async function addFollow(data: Follow) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/follow',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改关注
*/
export async function updateFollow(data: Follow) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/follow',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除关注
*/
export async function removeFollow(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/follow/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除关注
*/
export async function removeBatchFollow(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/follow/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询关注
*/
export async function getFollow(id: number) {
const res = await request.get<ApiResult<Follow>>(
MODULES_API_URL + '/cms/follow/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,35 @@
import type { PageParam } from '@/api';
/**
* 关注
*/
export interface Follow {
//
id?: number;
//
userId?: number;
//
followUserId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 关注搜索条件
*/
export interface FollowParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -20,6 +20,7 @@ export interface MpAd {
height?: string;
// 广告图片
images?: string;
colors?: string;
// 路由/链接地址
path?: string;
// 用户ID

View File

@@ -35,6 +35,22 @@ export async function listNavigation(params?: NavigationParam) {
return Promise.reject(new Error(res.data.message));
}
/**
* 查询导航列表(树形结构)
*/
export async function treeNavigation(params?: NavigationParam) {
const res = await request.get<ApiResult<Navigation[]>>(
MODULES_API_URL + '/cms/navigation/tree',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加导航
*/
@@ -95,7 +111,10 @@ export async function removeBatchNavigation(data: (number | undefined)[]) {
/**
* 修改用户状态
*/
export async function updateNavigationStatus(navigationId?: number, status?: number) {
export async function updateNavigationStatus(
navigationId?: number,
status?: number
) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/navigation/status',
{

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopBrand, ShopBrandParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询品牌
*/
export async function pageShopBrand(params: ShopBrandParam) {
const res = await request.get<ApiResult<PageResult<ShopBrand>>>(
MODULES_API_URL + '/mall/shop-brand/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询品牌列表
*/
export async function listShopBrand(params?: ShopBrandParam) {
const res = await request.get<ApiResult<ShopBrand[]>>(
MODULES_API_URL + '/mall/shop-brand',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加品牌
*/
export async function addShopBrand(data: ShopBrand) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改品牌
*/
export async function updateShopBrand(data: ShopBrand) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除品牌
*/
export async function removeShopBrand(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除品牌
*/
export async function removeBatchShopBrand(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询品牌
*/
export async function getShopBrand(id: number) {
const res = await request.get<ApiResult<ShopBrand>>(
MODULES_API_URL + '/mall/shop-brand/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

Some files were not shown because too many files have changed in this diff Show More