feat(app): 初始化项目配置和页面结构
- 添加 .dockerignore 和 .env.example 配置文件 - 添加 .gitignore 忽略规则配置 - 创建服务端代理API路由(_file、_modules、_server) - 集成 Ant Design Vue 组件库并配置SSR样式提取 - 定义API响应类型封装 - 创建基础布局组件(blank、console) - 实现应用中心页面和组件(AppsCenter) - 添加文章列表测试页面 - 配置控制台导航菜单结构 - 实现控制台头部组件 - 创建联系页面表单
This commit is contained in:
112
app/api/clinic/clinicPrescription/index.ts
Normal file
112
app/api/clinic/clinicPrescription/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
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));
|
||||
}
|
||||
57
app/api/clinic/clinicPrescription/model/index.ts
Normal file
57
app/api/clinic/clinicPrescription/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
搜索条件
|
||||
*/
|
||||
export interface ClinicPrescriptionParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user