feat(api): 添加百色中学和诊所相关API接口
- 新增百色中学报名记录相关接口和数据模型 - 新增百色中学分部、班级、年代、年级管理接口 - 新增百色中学捐款记录和排行相关接口 - 新增诊所挂号和医生入驻申请接口 - 添加相应的数据传输对象和搜索参数模型 - 实现分页查询、增删改查等基础操作接口 - 集成请求处理和错误处理机制
This commit is contained in:
106
src/api/bszx/bszxBm/index.ts
Normal file
106
src/api/bszx/bszxBm/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BszxBm, BszxBmParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-报名记录
|
||||||
|
*/
|
||||||
|
export async function pageBszxBm(params: BszxBmParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BszxBm>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-bm/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询百色中学-报名记录列表
|
||||||
|
*/
|
||||||
|
export async function listBszxBm(params?: BszxBmParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxBm[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-bm',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加百色中学-报名记录
|
||||||
|
*/
|
||||||
|
export async function addBszxBm(data: BszxBm) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-bm',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改百色中学-报名记录
|
||||||
|
*/
|
||||||
|
export async function updateBszxBm(data: BszxBm) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-bm',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除百色中学-报名记录
|
||||||
|
*/
|
||||||
|
export async function removeBszxBm(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-bm/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除百色中学-报名记录
|
||||||
|
*/
|
||||||
|
export async function removeBatchBszxBm(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-bm/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询百色中学-报名记录
|
||||||
|
*/
|
||||||
|
export async function getBszxBm(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BszxBm>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-bm/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
78
src/api/bszx/bszxBm/model/index.ts
Normal file
78
src/api/bszx/bszxBm/model/index.ts
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-报名记录
|
||||||
|
*/
|
||||||
|
export interface BszxBm {
|
||||||
|
// 自增ID
|
||||||
|
id?: number;
|
||||||
|
// 订单编号
|
||||||
|
orderNo?: string;
|
||||||
|
// 姓名
|
||||||
|
name?: string;
|
||||||
|
// 性别 1男 2女
|
||||||
|
sex?: number;
|
||||||
|
sexName?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 手机号码(脱敏)
|
||||||
|
mobile?: string;
|
||||||
|
// 捐款金额
|
||||||
|
price?: string;
|
||||||
|
// 分部ID
|
||||||
|
branchId?: number;
|
||||||
|
// 班级ID
|
||||||
|
classId?: number;
|
||||||
|
// 班级
|
||||||
|
className?: string;
|
||||||
|
// 年级
|
||||||
|
gradeName?: string;
|
||||||
|
// 居住地址
|
||||||
|
address?: string;
|
||||||
|
// 工作单位
|
||||||
|
workUnit?: string;
|
||||||
|
// 职务
|
||||||
|
position?: string;
|
||||||
|
// 是否能到场
|
||||||
|
present?: string;
|
||||||
|
// 年龄
|
||||||
|
age?: number;
|
||||||
|
// 人数
|
||||||
|
number?: number;
|
||||||
|
// 额外信息
|
||||||
|
extra?: string;
|
||||||
|
// 生成的邀请函存放路径
|
||||||
|
certificate?: string;
|
||||||
|
// 预定日期
|
||||||
|
dateTime?: string;
|
||||||
|
// 表单数据
|
||||||
|
formData?: string;
|
||||||
|
// 表单ID
|
||||||
|
formId?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-报名记录搜索条件
|
||||||
|
*/
|
||||||
|
export interface BszxBmParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
branchId?: number;
|
||||||
|
gradeName?: string;
|
||||||
|
className?: string;
|
||||||
|
classId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/bszx/bszxBranch/index.ts
Normal file
106
src/api/bszx/bszxBranch/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BszxBranch, BszxBranchParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-分部
|
||||||
|
*/
|
||||||
|
export async function pageBszxBranch(params: BszxBranchParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BszxBranch>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-branch/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询百色中学-分部列表
|
||||||
|
*/
|
||||||
|
export async function listBszxBranch(params?: BszxBranchParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxBranch[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-branch',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加百色中学-分部
|
||||||
|
*/
|
||||||
|
export async function addBszxBranch(data: BszxBranch) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-branch',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改百色中学-分部
|
||||||
|
*/
|
||||||
|
export async function updateBszxBranch(data: BszxBranch) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-branch',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除百色中学-分部
|
||||||
|
*/
|
||||||
|
export async function removeBszxBranch(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-branch/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除百色中学-分部
|
||||||
|
*/
|
||||||
|
export async function removeBatchBszxBranch(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-branch/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询百色中学-分部
|
||||||
|
*/
|
||||||
|
export async function getBszxBranch(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BszxBranch>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-branch/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
23
src/api/bszx/bszxBranch/model/index.ts
Normal file
23
src/api/bszx/bszxBranch/model/index.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-分部
|
||||||
|
*/
|
||||||
|
export interface BszxBranch {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 分部名称
|
||||||
|
name?: string;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-分部搜索条件
|
||||||
|
*/
|
||||||
|
export interface BszxBranchParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/bszx/bszxClass/index.ts
Normal file
106
src/api/bszx/bszxClass/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BszxClass, BszxClassParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-班级
|
||||||
|
*/
|
||||||
|
export async function pageBszxClass(params: BszxClassParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BszxClass>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-class/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询百色中学-班级列表
|
||||||
|
*/
|
||||||
|
export async function listBszxClass(params?: BszxClassParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxClass[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-class',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加百色中学-班级
|
||||||
|
*/
|
||||||
|
export async function addBszxClass(data: BszxClass) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-class',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改百色中学-班级
|
||||||
|
*/
|
||||||
|
export async function updateBszxClass(data: BszxClass) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-class',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除百色中学-班级
|
||||||
|
*/
|
||||||
|
export async function removeBszxClass(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-class/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除百色中学-班级
|
||||||
|
*/
|
||||||
|
export async function removeBatchBszxClass(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-class/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询百色中学-班级
|
||||||
|
*/
|
||||||
|
export async function getBszxClass(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BszxClass>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-class/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
48
src/api/bszx/bszxClass/model/index.ts
Normal file
48
src/api/bszx/bszxClass/model/index.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-班级
|
||||||
|
*/
|
||||||
|
export interface BszxClass {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 时代ID
|
||||||
|
eraId?: number;
|
||||||
|
// 年级ID
|
||||||
|
gradeId?: number;
|
||||||
|
// 年级
|
||||||
|
gradeName?: string;
|
||||||
|
// 班级
|
||||||
|
className?: string;
|
||||||
|
// 分部
|
||||||
|
branch?: number;
|
||||||
|
// 班级
|
||||||
|
name?: string;
|
||||||
|
// 累计捐款总金额
|
||||||
|
totalMoney?: string;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
value?: number;
|
||||||
|
label?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-班级搜索条件
|
||||||
|
*/
|
||||||
|
export interface BszxClassParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
gradeId?: number;
|
||||||
|
eraId?: number;
|
||||||
|
branch?: number;
|
||||||
|
name?: string;
|
||||||
|
className?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/bszx/bszxEra/index.ts
Normal file
106
src/api/bszx/bszxEra/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BszxEra, BszxEraParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-年代
|
||||||
|
*/
|
||||||
|
export async function pageBszxEra(params: BszxEraParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BszxEra>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-era/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询百色中学-年代列表
|
||||||
|
*/
|
||||||
|
export async function listBszxEra(params?: BszxEraParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxEra[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-era',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加百色中学-年代
|
||||||
|
*/
|
||||||
|
export async function addBszxEra(data: BszxEra) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-era',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改百色中学-年代
|
||||||
|
*/
|
||||||
|
export async function updateBszxEra(data: BszxEra) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-era',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除百色中学-年代
|
||||||
|
*/
|
||||||
|
export async function removeBszxEra(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-era/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除百色中学-年代
|
||||||
|
*/
|
||||||
|
export async function removeBatchBszxEra(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-era/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询百色中学-年代
|
||||||
|
*/
|
||||||
|
export async function getBszxEra(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BszxEra>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-era/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
21
src/api/bszx/bszxEra/model/index.ts
Normal file
21
src/api/bszx/bszxEra/model/index.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-年代
|
||||||
|
*/
|
||||||
|
export interface BszxEra {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 年代
|
||||||
|
name?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-年代搜索条件
|
||||||
|
*/
|
||||||
|
export interface BszxEraParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/bszx/bszxGrade/index.ts
Normal file
106
src/api/bszx/bszxGrade/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BszxGrade, BszxGradeParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-年级
|
||||||
|
*/
|
||||||
|
export async function pageBszxGrade(params: BszxGradeParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BszxGrade>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-grade/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询百色中学-年级列表
|
||||||
|
*/
|
||||||
|
export async function listBszxGrade(params?: BszxGradeParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxGrade[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-grade',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加百色中学-年级
|
||||||
|
*/
|
||||||
|
export async function addBszxGrade(data: BszxGrade) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-grade',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改百色中学-年级
|
||||||
|
*/
|
||||||
|
export async function updateBszxGrade(data: BszxGrade) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-grade',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除百色中学-年级
|
||||||
|
*/
|
||||||
|
export async function removeBszxGrade(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-grade/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除百色中学-年级
|
||||||
|
*/
|
||||||
|
export async function removeBatchBszxGrade(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-grade/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询百色中学-年级
|
||||||
|
*/
|
||||||
|
export async function getBszxGrade(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BszxGrade>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-grade/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
37
src/api/bszx/bszxGrade/model/index.ts
Normal file
37
src/api/bszx/bszxGrade/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-年级
|
||||||
|
*/
|
||||||
|
export interface BszxGrade {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 年级
|
||||||
|
name?: string;
|
||||||
|
// 年代
|
||||||
|
eraId?: number;
|
||||||
|
// 分部
|
||||||
|
branch?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
value?: number;
|
||||||
|
label?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-年级搜索条件
|
||||||
|
*/
|
||||||
|
export interface BszxGradeParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
branch?: number;
|
||||||
|
gradeId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
37
src/api/bszx/bszxOrder/index.ts
Normal file
37
src/api/bszx/bszxOrder/index.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export async function pageBszxOrder(params: ShopOrderParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ShopOrder>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-order/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计订单总金额(只统计有效订单)
|
||||||
|
*/
|
||||||
|
export async function bszxOrderTotal(params?: ShopOrderParam) {
|
||||||
|
const res = await request.get<ApiResult<ShopOrder[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-order/total',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
121
src/api/bszx/bszxPay/index.ts
Normal file
121
src/api/bszx/bszxPay/index.ts
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BszxPay, BszxPayParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
import {ShopOrder} from "@/api/shop/shopOrder/model";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export async function pageBszxPay(params: BszxPayParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BszxPay>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询百色中学-捐款记录列表
|
||||||
|
*/
|
||||||
|
export async function listBszxPay(params?: BszxPayParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxPay[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export async function addBszxPay(data: BszxPay) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export async function updateBszxPay(data: BszxPay) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export async function removeBszxPay(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export async function removeBatchBszxPay(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export async function getBszxPay(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BszxPay>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单
|
||||||
|
*/
|
||||||
|
export async function repairOrder(data: ShopOrder) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay/repair',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
69
src/api/bszx/bszxPay/model/index.ts
Normal file
69
src/api/bszx/bszxPay/model/index.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-捐款记录
|
||||||
|
*/
|
||||||
|
export interface BszxPay {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 年龄
|
||||||
|
age?: number;
|
||||||
|
// 姓名
|
||||||
|
name?: string;
|
||||||
|
// 性别 1男 2女
|
||||||
|
sex?: number;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 班级
|
||||||
|
className?: string;
|
||||||
|
// 年级
|
||||||
|
gradeName?: string;
|
||||||
|
// 居住地址
|
||||||
|
address?: string;
|
||||||
|
// 工作单位
|
||||||
|
workUnit?: string;
|
||||||
|
// 职务
|
||||||
|
position?: string;
|
||||||
|
// 数量
|
||||||
|
number?: number;
|
||||||
|
// 付费金额
|
||||||
|
price?: string;
|
||||||
|
// 额外信息
|
||||||
|
extra?: string;
|
||||||
|
// 订单编号
|
||||||
|
orderNo?: string;
|
||||||
|
// 预定日期
|
||||||
|
dateTime?: string;
|
||||||
|
// 捐赠证书
|
||||||
|
certificate?: string;
|
||||||
|
// 表单数据
|
||||||
|
formData?: string;
|
||||||
|
// 来源表ID
|
||||||
|
formId?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-捐款记录搜索条件
|
||||||
|
*/
|
||||||
|
export interface BszxPayParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
orderId?: number;
|
||||||
|
orderNo?: string;
|
||||||
|
gradeName?: string;
|
||||||
|
className?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
135
src/api/bszx/bszxPayRanking/index.ts
Normal file
135
src/api/bszx/bszxPayRanking/index.ts
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { BszxPayRanking, BszxPayRankingParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
import {BszxClass, BszxClassParam} from "@/api/bszx/bszxClass/model";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询百色中学-捐款排行
|
||||||
|
*/
|
||||||
|
export async function pageBszxPayRanking(params: BszxPayRankingParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<BszxPayRanking>>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询百色中学-捐款排行列表
|
||||||
|
*/
|
||||||
|
export async function listBszxPayRanking(params?: BszxPayRankingParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxPayRanking[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function ranking(params?: BszxPayRankingParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxPayRanking[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking/ranking',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function ranking2(params?: BszxClassParam) {
|
||||||
|
const res = await request.get<ApiResult<BszxClass[]>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking/ranking2',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加百色中学-捐款排行
|
||||||
|
*/
|
||||||
|
export async function addBszxPayRanking(data: BszxPayRanking) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改百色中学-捐款排行
|
||||||
|
*/
|
||||||
|
export async function updateBszxPayRanking(data: BszxPayRanking) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除百色中学-捐款排行
|
||||||
|
*/
|
||||||
|
export async function removeBszxPayRanking(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除百色中学-捐款排行
|
||||||
|
*/
|
||||||
|
export async function removeBatchBszxPayRanking(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询百色中学-捐款排行
|
||||||
|
*/
|
||||||
|
export async function getBszxPayRanking(id: number) {
|
||||||
|
const res = await request.get<ApiResult<BszxPayRanking>>(
|
||||||
|
MODULES_API_URL + '/bszx/bszx-pay-ranking/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
35
src/api/bszx/bszxPayRanking/model/index.ts
Normal file
35
src/api/bszx/bszxPayRanking/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-捐款排行
|
||||||
|
*/
|
||||||
|
export interface BszxPayRanking {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 来源表ID(项目名称)
|
||||||
|
formId?: number;
|
||||||
|
// 数量
|
||||||
|
number?: number;
|
||||||
|
// 获得捐款总金额
|
||||||
|
totalPrice?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百色中学-捐款排行搜索条件
|
||||||
|
*/
|
||||||
|
export interface BszxPayRankingParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicAppointment/index.ts
Normal file
105
src/api/clinic/clinicAppointment/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
47
src/api/clinic/clinicAppointment/model/index.ts
Normal file
47
src/api/clinic/clinicAppointment/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicDoctorApply/index.ts
Normal file
105
src/api/clinic/clinicDoctorApply/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
75
src/api/clinic/clinicDoctorApply/model/index.ts
Normal file
75
src/api/clinic/clinicDoctorApply/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicDoctorMedicalRecord/index.ts
Normal file
105
src/api/clinic/clinicDoctorMedicalRecord/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
61
src/api/clinic/clinicDoctorMedicalRecord/model/index.ts
Normal file
61
src/api/clinic/clinicDoctorMedicalRecord/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicDoctorUser/index.ts
Normal file
105
src/api/clinic/clinicDoctorUser/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
55
src/api/clinic/clinicDoctorUser/model/index.ts
Normal file
55
src/api/clinic/clinicDoctorUser/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicMedicalHistory/index.ts
Normal file
105
src/api/clinic/clinicMedicalHistory/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
61
src/api/clinic/clinicMedicalHistory/model/index.ts
Normal file
61
src/api/clinic/clinicMedicalHistory/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicMedicine/index.ts
Normal file
105
src/api/clinic/clinicMedicine/index.ts
Normal 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));
|
||||||
|
}
|
||||||
43
src/api/clinic/clinicMedicine/model/index.ts
Normal file
43
src/api/clinic/clinicMedicine/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicMedicineInout/index.ts
Normal file
105
src/api/clinic/clinicMedicineInout/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
61
src/api/clinic/clinicMedicineInout/model/index.ts
Normal file
61
src/api/clinic/clinicMedicineInout/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicMedicineStock/index.ts
Normal file
105
src/api/clinic/clinicMedicineStock/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
35
src/api/clinic/clinicMedicineStock/model/index.ts
Normal file
35
src/api/clinic/clinicMedicineStock/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicOrder/index.ts
Normal file
105
src/api/clinic/clinicOrder/index.ts
Normal 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));
|
||||||
|
}
|
||||||
167
src/api/clinic/clinicOrder/model/index.ts
Normal file
167
src/api/clinic/clinicOrder/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicPatientUser/index.ts
Normal file
105
src/api/clinic/clinicPatientUser/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
49
src/api/clinic/clinicPatientUser/model/index.ts
Normal file
49
src/api/clinic/clinicPatientUser/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
112
src/api/clinic/clinicPrescription/index.ts
Normal file
112
src/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
src/api/clinic/clinicPrescription/model/index.ts
Normal file
57
src/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;
|
||||||
|
}
|
||||||
112
src/api/clinic/clinicPrescriptionItem/index.ts
Normal file
112
src/api/clinic/clinicPrescriptionItem/index.ts
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
49
src/api/clinic/clinicPrescriptionItem/model/index.ts
Normal file
49
src/api/clinic/clinicPrescriptionItem/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicReport/index.ts
Normal file
105
src/api/clinic/clinicReport/index.ts
Normal 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));
|
||||||
|
}
|
||||||
61
src/api/clinic/clinicReport/model/index.ts
Normal file
61
src/api/clinic/clinicReport/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/clinic/clinicVisitRecord/index.ts
Normal file
105
src/api/clinic/clinicVisitRecord/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
61
src/api/clinic/clinicVisitRecord/model/index.ts
Normal file
61
src/api/clinic/clinicVisitRecord/model/index.ts
Normal 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;
|
||||||
|
}
|
||||||
105
src/api/credit/creditAdministrativeLicense/index.ts
Normal file
105
src/api/credit/creditAdministrativeLicense/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditAdministrativeLicense, CreditAdministrativeLicenseParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询行政许可
|
||||||
|
*/
|
||||||
|
export async function pageCreditAdministrativeLicense(params: CreditAdministrativeLicenseParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditAdministrativeLicense>>>(
|
||||||
|
'/credit/credit-administrative-license/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行政许可列表
|
||||||
|
*/
|
||||||
|
export async function listCreditAdministrativeLicense(params?: CreditAdministrativeLicenseParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditAdministrativeLicense[]>>(
|
||||||
|
'/credit/credit-administrative-license',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加行政许可
|
||||||
|
*/
|
||||||
|
export async function addCreditAdministrativeLicense(data: CreditAdministrativeLicense) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-administrative-license',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行政许可
|
||||||
|
*/
|
||||||
|
export async function updateCreditAdministrativeLicense(data: CreditAdministrativeLicense) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-administrative-license',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行政许可
|
||||||
|
*/
|
||||||
|
export async function removeCreditAdministrativeLicense(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-administrative-license/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除行政许可
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditAdministrativeLicense(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-administrative-license/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询行政许可
|
||||||
|
*/
|
||||||
|
export async function getCreditAdministrativeLicense(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditAdministrativeLicense>>(
|
||||||
|
'/credit/credit-administrative-license/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
58
src/api/credit/creditAdministrativeLicense/model/index.ts
Normal file
58
src/api/credit/creditAdministrativeLicense/model/index.ts
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政许可
|
||||||
|
*/
|
||||||
|
export interface CreditAdministrativeLicense {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 决定文书/许可编号
|
||||||
|
code?: string;
|
||||||
|
// 决定文书/许可证名称
|
||||||
|
name?: string;
|
||||||
|
// 许可状态
|
||||||
|
statusText?: string;
|
||||||
|
// 许可类型
|
||||||
|
type?: string;
|
||||||
|
// 链接
|
||||||
|
url?: string;
|
||||||
|
// 有效期自
|
||||||
|
validityStart?: string;
|
||||||
|
// 有效期至
|
||||||
|
validityEnd?: string;
|
||||||
|
// 许可机关
|
||||||
|
licensingAuthority?: string;
|
||||||
|
@TableField("License_content")
|
||||||
|
// 许可内容
|
||||||
|
licenseContent?: string;
|
||||||
|
// 数据来源单位
|
||||||
|
dataSourceUnit?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 企业ID
|
||||||
|
companyId?: number;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政许可搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditAdministrativeLicenseParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
105
src/api/credit/creditBankruptcy/index.ts
Normal file
105
src/api/credit/creditBankruptcy/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditBankruptcy, CreditBankruptcyParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询破产重整
|
||||||
|
*/
|
||||||
|
export async function pageCreditBankruptcy(params: CreditBankruptcyParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditBankruptcy>>>(
|
||||||
|
'/credit/credit-bankruptcy/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询破产重整列表
|
||||||
|
*/
|
||||||
|
export async function listCreditBankruptcy(params?: CreditBankruptcyParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditBankruptcy[]>>(
|
||||||
|
'/credit/credit-bankruptcy',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加破产重整
|
||||||
|
*/
|
||||||
|
export async function addCreditBankruptcy(data: CreditBankruptcy) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-bankruptcy',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改破产重整
|
||||||
|
*/
|
||||||
|
export async function updateCreditBankruptcy(data: CreditBankruptcy) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-bankruptcy',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除破产重整
|
||||||
|
*/
|
||||||
|
export async function removeCreditBankruptcy(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-bankruptcy/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除破产重整
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditBankruptcy(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-bankruptcy/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询破产重整
|
||||||
|
*/
|
||||||
|
export async function getCreditBankruptcy(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditBankruptcy>>(
|
||||||
|
'/credit/credit-bankruptcy/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
49
src/api/credit/creditBankruptcy/model/index.ts
Normal file
49
src/api/credit/creditBankruptcy/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 破产重整
|
||||||
|
*/
|
||||||
|
export interface CreditBankruptcy {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 案号
|
||||||
|
code?: string;
|
||||||
|
// 案件类型
|
||||||
|
type?: string;
|
||||||
|
// 当事人
|
||||||
|
party?: string;
|
||||||
|
// 链接
|
||||||
|
url?: string;
|
||||||
|
// 经办法院
|
||||||
|
court?: string;
|
||||||
|
// 公开日期
|
||||||
|
publicDate?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 企业ID
|
||||||
|
companyId?: number;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 破产重整搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditBankruptcyParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
105
src/api/credit/creditBranch/index.ts
Normal file
105
src/api/credit/creditBranch/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditBranch, CreditBranchParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询分支机构
|
||||||
|
*/
|
||||||
|
export async function pageCreditBranch(params: CreditBranchParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditBranch>>>(
|
||||||
|
'/credit/credit-branch/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分支机构列表
|
||||||
|
*/
|
||||||
|
export async function listCreditBranch(params?: CreditBranchParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditBranch[]>>(
|
||||||
|
'/credit/credit-branch',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加分支机构
|
||||||
|
*/
|
||||||
|
export async function addCreditBranch(data: CreditBranch) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-branch',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分支机构
|
||||||
|
*/
|
||||||
|
export async function updateCreditBranch(data: CreditBranch) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-branch',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分支机构
|
||||||
|
*/
|
||||||
|
export async function removeCreditBranch(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-branch/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除分支机构
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditBranch(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-branch/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询分支机构
|
||||||
|
*/
|
||||||
|
export async function getCreditBranch(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditBranch>>(
|
||||||
|
'/credit/credit-branch/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
49
src/api/credit/creditBranch/model/index.ts
Normal file
49
src/api/credit/creditBranch/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分支机构
|
||||||
|
*/
|
||||||
|
export interface CreditBranch {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 分支机构名称
|
||||||
|
name?: string;
|
||||||
|
// 负责人
|
||||||
|
curator?: string;
|
||||||
|
// 地区
|
||||||
|
region?: string;
|
||||||
|
// 链接
|
||||||
|
url?: string;
|
||||||
|
// 成立日期
|
||||||
|
establishDate?: string;
|
||||||
|
// 状态
|
||||||
|
statusText?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 企业ID
|
||||||
|
companyId?: number;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分支机构搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditBranchParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditBreachOfTrust/index.ts
Normal file
129
src/api/credit/creditBreachOfTrust/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditBreachOfTrust, CreditBreachOfTrustParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询失信被执行人
|
||||||
|
*/
|
||||||
|
export async function pageCreditBreachOfTrust(params: CreditBreachOfTrustParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditBreachOfTrust>>>(
|
||||||
|
'/credit/credit-breach-of-trust/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询失信被执行人列表
|
||||||
|
*/
|
||||||
|
export async function listCreditBreachOfTrust(params?: CreditBreachOfTrustParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditBreachOfTrust[]>>(
|
||||||
|
'/credit/credit-breach-of-trust',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加失信被执行人
|
||||||
|
*/
|
||||||
|
export async function addCreditBreachOfTrust(data: CreditBreachOfTrust) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-breach-of-trust',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改失信被执行人
|
||||||
|
*/
|
||||||
|
export async function updateCreditBreachOfTrust(data: CreditBreachOfTrust) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-breach-of-trust',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除失信被执行人
|
||||||
|
*/
|
||||||
|
export async function removeCreditBreachOfTrust(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-breach-of-trust/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除失信被执行人
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditBreachOfTrust(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-breach-of-trust/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询失信被执行人
|
||||||
|
*/
|
||||||
|
export async function getCreditBreachOfTrust(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditBreachOfTrust>>(
|
||||||
|
'/credit/credit-breach-of-trust/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入失信被执行人
|
||||||
|
*/
|
||||||
|
export async function importCreditBreachOfTrust(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-breach-of-trust/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditBreachOfTrust/model/index.ts
Normal file
57
src/api/credit/creditBreachOfTrust/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失信被执行人
|
||||||
|
*/
|
||||||
|
export interface CreditBreachOfTrust {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失信被执行人搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditBreachOfTrustParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditCaseFiling/index.ts
Normal file
129
src/api/credit/creditCaseFiling/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditCaseFiling, CreditCaseFilingParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询司法大数据
|
||||||
|
*/
|
||||||
|
export async function pageCreditCaseFiling(params: CreditCaseFilingParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditCaseFiling>>>(
|
||||||
|
'/credit/credit-case-filing/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询司法大数据列表
|
||||||
|
*/
|
||||||
|
export async function listCreditCaseFiling(params?: CreditCaseFilingParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditCaseFiling[]>>(
|
||||||
|
'/credit/credit-case-filing',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加司法大数据
|
||||||
|
*/
|
||||||
|
export async function addCreditCaseFiling(data: CreditCaseFiling) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-case-filing',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改司法大数据
|
||||||
|
*/
|
||||||
|
export async function updateCreditCaseFiling(data: CreditCaseFiling) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-case-filing',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeCreditCaseFiling(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-case-filing/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditCaseFiling(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-case-filing/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询司法大数据
|
||||||
|
*/
|
||||||
|
export async function getCreditCaseFiling(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditCaseFiling>>(
|
||||||
|
'/credit/credit-case-filing/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入司法大数据
|
||||||
|
*/
|
||||||
|
export async function importCreditCaseFiling(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-case-filing/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditCaseFiling/model/index.ts
Normal file
57
src/api/credit/creditCaseFiling/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司法大数据
|
||||||
|
*/
|
||||||
|
export interface CreditCaseFiling {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司法大数据搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditCaseFilingParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
142
src/api/credit/creditCompany/index.ts
Normal file
142
src/api/credit/creditCompany/index.ts
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditCompany, CreditCompanyParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询企业
|
||||||
|
*/
|
||||||
|
export async function pageCreditCompany(params: CreditCompanyParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditCompany>>>(
|
||||||
|
'/credit/credit-company/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业列表
|
||||||
|
*/
|
||||||
|
export async function listCreditCompany(params?: CreditCompanyParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditCompany[]>>(
|
||||||
|
'/credit/credit-company',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加企业
|
||||||
|
*/
|
||||||
|
export async function addCreditCompany(data: CreditCompany) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-company',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改企业
|
||||||
|
*/
|
||||||
|
export async function updateCreditCompany(data: CreditCompany) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-company',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除企业
|
||||||
|
*/
|
||||||
|
export async function removeCreditCompany(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-company/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除企业
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditCompany(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-company/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询企业
|
||||||
|
*/
|
||||||
|
export async function getCreditCompany(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditCompany>>(
|
||||||
|
'/credit/credit-company/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入企业
|
||||||
|
*/
|
||||||
|
export async function importCreditCompany(file: File) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-company/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据企业匹配名称查询关联信息
|
||||||
|
*/
|
||||||
|
export async function getCompanyRelatedInfo(params: CreditCompanyParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditCompany>>(
|
||||||
|
'/credit/credit-company/related',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
137
src/api/credit/creditCompany/model/index.ts
Normal file
137
src/api/credit/creditCompany/model/index.ts
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业
|
||||||
|
*/
|
||||||
|
export interface CreditCompany {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 原文件导入名称
|
||||||
|
name?: string;
|
||||||
|
// 系统匹配企业名称
|
||||||
|
matchName?: string;
|
||||||
|
// 统一社会信用代码
|
||||||
|
code?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 类型
|
||||||
|
type?: number;
|
||||||
|
// 上级id, 0是顶级
|
||||||
|
parentId?: number;
|
||||||
|
// 登记状态
|
||||||
|
registrationStatus?: string;
|
||||||
|
// 法定代表人
|
||||||
|
legalPerson?: string;
|
||||||
|
// 注册资本
|
||||||
|
registeredCapital?: string;
|
||||||
|
// 实缴资本
|
||||||
|
paidinCapital?: string;
|
||||||
|
// 成立日期
|
||||||
|
establishDate?: string;
|
||||||
|
// 企业地址
|
||||||
|
address?: string;
|
||||||
|
// 电话
|
||||||
|
tel?: string;
|
||||||
|
// 更多电话
|
||||||
|
moreTel?: string;
|
||||||
|
// 邮箱
|
||||||
|
email?: string;
|
||||||
|
// 更多邮箱
|
||||||
|
moreEmail?: string;
|
||||||
|
// 所在国家
|
||||||
|
country?: string;
|
||||||
|
// 所属省份
|
||||||
|
province?: string;
|
||||||
|
// 所属城市
|
||||||
|
city?: string;
|
||||||
|
// 所属区县
|
||||||
|
region?: string;
|
||||||
|
// 企业(机构)类型
|
||||||
|
institutionType?: string;
|
||||||
|
// 纳税人识别号
|
||||||
|
taxpayerCode?: string;
|
||||||
|
// 注册号
|
||||||
|
registrationNumber?: string;
|
||||||
|
// 组织机构代码
|
||||||
|
organizationalCode?: string;
|
||||||
|
// 参保人数
|
||||||
|
numberOfInsuredPersons?: string;
|
||||||
|
// 参保人数所属年报
|
||||||
|
annualReport?: string;
|
||||||
|
// 营业期限
|
||||||
|
businessTerm?: string;
|
||||||
|
// 国标行业门类
|
||||||
|
nationalStandardIndustryCategories?: string;
|
||||||
|
// 国标行业大类
|
||||||
|
nationalStandardIndustryCategories2?: string;
|
||||||
|
// 国标行业中类
|
||||||
|
nationalStandardIndustryCategories3?: string;
|
||||||
|
// 国标行业小类
|
||||||
|
nationalStandardIndustryCategories4?: string;
|
||||||
|
// 企查查行业门类
|
||||||
|
nationalStandardIndustryCategories5?: string;
|
||||||
|
// 企查查行业大类
|
||||||
|
nationalStandardIndustryCategories6?: string;
|
||||||
|
// 企查查行业中类
|
||||||
|
nationalStandardIndustryCategories7?: string;
|
||||||
|
// 企查查行业小类
|
||||||
|
nationalStandardIndustryCategories8?: string;
|
||||||
|
// 企业规模
|
||||||
|
companySize?: string;
|
||||||
|
// 曾用名
|
||||||
|
formerName?: string;
|
||||||
|
// 英文名
|
||||||
|
englishName?: string;
|
||||||
|
// 官网
|
||||||
|
domain?: string;
|
||||||
|
// 通信地址
|
||||||
|
mailingAddress?: string;
|
||||||
|
// 企业简介
|
||||||
|
companyProfile?: string;
|
||||||
|
// 经营范围
|
||||||
|
natureOfBusiness?: string;
|
||||||
|
// 登记机关
|
||||||
|
registrationAuthority?: string;
|
||||||
|
// 纳税人资质
|
||||||
|
taxpayerQualification?: string;
|
||||||
|
// 最新年报年份
|
||||||
|
latestAnnualReportYear?: string;
|
||||||
|
// 最新年报营业收入
|
||||||
|
latestAnnualReportOnOperatingRevenue?: string;
|
||||||
|
// 企查分
|
||||||
|
enterpriseScoreCheck?: string;
|
||||||
|
// 信用等级
|
||||||
|
creditRating?: string;
|
||||||
|
// 科创分
|
||||||
|
cechnologyScore?: string;
|
||||||
|
// 科创等级
|
||||||
|
cechnologyLevel?: string;
|
||||||
|
// 是否小微企业
|
||||||
|
smallEnterprise?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditCompanyParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditCompetitor/index.ts
Normal file
129
src/api/credit/creditCompetitor/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditCompetitor, CreditCompetitorParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询竞争对手
|
||||||
|
*/
|
||||||
|
export async function pageCreditCompetitor(params: CreditCompetitorParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditCompetitor>>>(
|
||||||
|
'/credit/credit-competitor/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询竞争对手列表
|
||||||
|
*/
|
||||||
|
export async function listCreditCompetitor(params?: CreditCompetitorParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditCompetitor[]>>(
|
||||||
|
'/credit/credit-competitor',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加竞争对手
|
||||||
|
*/
|
||||||
|
export async function addCreditCompetitor(data: CreditCompetitor) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-competitor',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改竞争对手
|
||||||
|
*/
|
||||||
|
export async function updateCreditCompetitor(data: CreditCompetitor) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-competitor',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除竞争对手
|
||||||
|
*/
|
||||||
|
export async function removeCreditCompetitor(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-competitor/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除竞争对手
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditCompetitor(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-competitor/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询竞争对手
|
||||||
|
*/
|
||||||
|
export async function getCreditCompetitor(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditCompetitor>>(
|
||||||
|
'/credit/credit-competitor/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入竞争对手
|
||||||
|
*/
|
||||||
|
export async function importCreditCompetitor(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-competitor/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
51
src/api/credit/creditCompetitor/model/index.ts
Normal file
51
src/api/credit/creditCompetitor/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞争对手
|
||||||
|
*/
|
||||||
|
export interface CreditCompetitor {
|
||||||
|
// 序号
|
||||||
|
id?: number;
|
||||||
|
// 企业名称
|
||||||
|
companyName?: string;
|
||||||
|
// 法定代表人
|
||||||
|
legalRepresentative?: string;
|
||||||
|
// 注册资本
|
||||||
|
registeredCapital?: string;
|
||||||
|
// 成立日期
|
||||||
|
establishmentDate?: string;
|
||||||
|
// 登记状态
|
||||||
|
registrationStatus?: string;
|
||||||
|
// 所属行业
|
||||||
|
industry?: string;
|
||||||
|
// 所属省份
|
||||||
|
province?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞争对手搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditCompetitorParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditCourtAnnouncement/index.ts
Normal file
129
src/api/credit/creditCourtAnnouncement/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditCourtAnnouncement, CreditCourtAnnouncementParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function pageCreditCourtAnnouncement(params: CreditCourtAnnouncementParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditCourtAnnouncement>>>(
|
||||||
|
'/credit/credit-court-announcement/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询法院公告司法大数据列表
|
||||||
|
*/
|
||||||
|
export async function listCreditCourtAnnouncement(params?: CreditCourtAnnouncementParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditCourtAnnouncement[]>>(
|
||||||
|
'/credit/credit-court-announcement',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function addCreditCourtAnnouncement(data: CreditCourtAnnouncement) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-announcement',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function updateCreditCourtAnnouncement(data: CreditCourtAnnouncement) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-announcement',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeCreditCourtAnnouncement(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-announcement/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditCourtAnnouncement(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-announcement/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function getCreditCourtAnnouncement(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditCourtAnnouncement>>(
|
||||||
|
'/credit/credit-court-announcement/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function importCreditCourtAnnouncement(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-announcement/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditCourtAnnouncement/model/index.ts
Normal file
57
src/api/credit/creditCourtAnnouncement/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法院公告司法大数据
|
||||||
|
*/
|
||||||
|
export interface CreditCourtAnnouncement {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法院公告司法大数据搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditCourtAnnouncementParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditCourtSession/index.ts
Normal file
129
src/api/credit/creditCourtSession/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditCourtSession, CreditCourtSessionParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function pageCreditCourtSession(params: CreditCourtSessionParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditCourtSession>>>(
|
||||||
|
'/credit/credit-court-session/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询开庭公告司法大数据列表
|
||||||
|
*/
|
||||||
|
export async function listCreditCourtSession(params?: CreditCourtSessionParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditCourtSession[]>>(
|
||||||
|
'/credit/credit-court-session',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function addCreditCourtSession(data: CreditCourtSession) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-session',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function updateCreditCourtSession(data: CreditCourtSession) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-session',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeCreditCourtSession(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-session/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditCourtSession(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-session/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function getCreditCourtSession(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditCourtSession>>(
|
||||||
|
'/credit/credit-court-session/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function importCreditCourtSession(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-court-session/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditCourtSession/model/index.ts
Normal file
57
src/api/credit/creditCourtSession/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开庭公告司法大数据
|
||||||
|
*/
|
||||||
|
export interface CreditCourtSession {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开庭公告司法大数据搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditCourtSessionParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditCustomer/index.ts
Normal file
129
src/api/credit/creditCustomer/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditCustomer, CreditCustomerParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询客户
|
||||||
|
*/
|
||||||
|
export async function pageCreditCustomer(params: CreditCustomerParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditCustomer>>>(
|
||||||
|
'/credit/credit-customer/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户列表
|
||||||
|
*/
|
||||||
|
export async function listCreditCustomer(params?: CreditCustomerParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditCustomer[]>>(
|
||||||
|
'/credit/credit-customer',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加客户
|
||||||
|
*/
|
||||||
|
export async function addCreditCustomer(data: CreditCustomer) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-customer',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改客户
|
||||||
|
*/
|
||||||
|
export async function updateCreditCustomer(data: CreditCustomer) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-customer',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除客户
|
||||||
|
*/
|
||||||
|
export async function removeCreditCustomer(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-customer/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除客户
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditCustomer(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-customer/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询客户
|
||||||
|
*/
|
||||||
|
export async function getCreditCustomer(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditCustomer>>(
|
||||||
|
'/credit/credit-customer/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入客户
|
||||||
|
*/
|
||||||
|
export async function importCreditCustomer(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-customer/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
47
src/api/credit/creditCustomer/model/index.ts
Normal file
47
src/api/credit/creditCustomer/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户
|
||||||
|
*/
|
||||||
|
export interface CreditCustomer {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 客户
|
||||||
|
name?: string;
|
||||||
|
// 状态
|
||||||
|
statusTxt?: string;
|
||||||
|
// 销售金额(万元)
|
||||||
|
price?: string;
|
||||||
|
// 公开日期
|
||||||
|
publicDate?: string;
|
||||||
|
// 数据来源
|
||||||
|
dataSource?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditCustomerParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditDeliveryNotice/index.ts
Normal file
129
src/api/credit/creditDeliveryNotice/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditDeliveryNotice, CreditDeliveryNoticeParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function pageCreditDeliveryNotice(params: CreditDeliveryNoticeParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditDeliveryNotice>>>(
|
||||||
|
'/credit/credit-delivery-notice/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询送达公告司法大数据列表
|
||||||
|
*/
|
||||||
|
export async function listCreditDeliveryNotice(params?: CreditDeliveryNoticeParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditDeliveryNotice[]>>(
|
||||||
|
'/credit/credit-delivery-notice',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function addCreditDeliveryNotice(data: CreditDeliveryNotice) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-delivery-notice',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function updateCreditDeliveryNotice(data: CreditDeliveryNotice) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-delivery-notice',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeCreditDeliveryNotice(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-delivery-notice/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditDeliveryNotice(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-delivery-notice/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function getCreditDeliveryNotice(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditDeliveryNotice>>(
|
||||||
|
'/credit/credit-delivery-notice/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export async function importCreditDeliveryNotice(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-delivery-notice/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditDeliveryNotice/model/index.ts
Normal file
57
src/api/credit/creditDeliveryNotice/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 送达公告司法大数据
|
||||||
|
*/
|
||||||
|
export interface CreditDeliveryNotice {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 送达公告司法大数据搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditDeliveryNoticeParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditExternal/index.ts
Normal file
129
src/api/credit/creditExternal/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditExternal, CreditExternalParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询对外投资
|
||||||
|
*/
|
||||||
|
export async function pageCreditExternal(params: CreditExternalParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditExternal>>>(
|
||||||
|
'/credit/credit-external/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询对外投资列表
|
||||||
|
*/
|
||||||
|
export async function listCreditExternal(params?: CreditExternalParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditExternal[]>>(
|
||||||
|
'/credit/credit-external',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加对外投资
|
||||||
|
*/
|
||||||
|
export async function addCreditExternal(data: CreditExternal) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-external',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改对外投资
|
||||||
|
*/
|
||||||
|
export async function updateCreditExternal(data: CreditExternal) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-external',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除对外投资
|
||||||
|
*/
|
||||||
|
export async function removeCreditExternal(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-external/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除对外投资
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditExternal(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-external/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询对外投资
|
||||||
|
*/
|
||||||
|
export async function getCreditExternal(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditExternal>>(
|
||||||
|
'/credit/credit-external/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入对外投资
|
||||||
|
*/
|
||||||
|
export async function importCreditExternal(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-external/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
65
src/api/credit/creditExternal/model/index.ts
Normal file
65
src/api/credit/creditExternal/model/index.ts
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外投资
|
||||||
|
*/
|
||||||
|
export interface CreditExternal {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 被投资企业名称
|
||||||
|
name?: string;
|
||||||
|
// 企业状态(如存续、注销等)
|
||||||
|
statusTxt?: string;
|
||||||
|
// 法定代表人姓名
|
||||||
|
legalRepresentative?: string;
|
||||||
|
// 注册资本(金额)
|
||||||
|
registeredCapital?: string;
|
||||||
|
// 成立日期
|
||||||
|
establishmentDate?: string;
|
||||||
|
// 持股比例
|
||||||
|
shareholdingRatio?: string;
|
||||||
|
// 认缴出资额
|
||||||
|
subscribedInvestmentAmount?: string;
|
||||||
|
// 认缴出资日期
|
||||||
|
subscribedInvestmentDate?: string;
|
||||||
|
// 间接持股比例
|
||||||
|
indirectShareholdingRatio?: string;
|
||||||
|
// 投资日期
|
||||||
|
investmentDate?: string;
|
||||||
|
// 所属地区
|
||||||
|
region?: string;
|
||||||
|
// 所属行业
|
||||||
|
industry?: string;
|
||||||
|
// 投资数量
|
||||||
|
investmentCount?: number;
|
||||||
|
// 关联产品/机构
|
||||||
|
relatedProductsInstitutions?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外投资搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditExternalParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditFinalVersion/index.ts
Normal file
129
src/api/credit/creditFinalVersion/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditFinalVersion, CreditFinalVersionParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询终本案件
|
||||||
|
*/
|
||||||
|
export async function pageCreditFinalVersion(params: CreditFinalVersionParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditFinalVersion>>>(
|
||||||
|
'/credit/credit-final-version/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询终本案件列表
|
||||||
|
*/
|
||||||
|
export async function listCreditFinalVersion(params?: CreditFinalVersionParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditFinalVersion[]>>(
|
||||||
|
'/credit/credit-final-version',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加终本案件
|
||||||
|
*/
|
||||||
|
export async function addCreditFinalVersion(data: CreditFinalVersion) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-final-version',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改终本案件
|
||||||
|
*/
|
||||||
|
export async function updateCreditFinalVersion(data: CreditFinalVersion) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-final-version',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除终本案件
|
||||||
|
*/
|
||||||
|
export async function removeCreditFinalVersion(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-final-version/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除终本案件
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditFinalVersion(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-final-version/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询终本案件
|
||||||
|
*/
|
||||||
|
export async function getCreditFinalVersion(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditFinalVersion>>(
|
||||||
|
'/credit/credit-final-version/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入终本案件
|
||||||
|
*/
|
||||||
|
export async function importCreditFinalVersion(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-final-version/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditFinalVersion/model/index.ts
Normal file
57
src/api/credit/creditFinalVersion/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终本案件
|
||||||
|
*/
|
||||||
|
export interface CreditFinalVersion {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终本案件搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditFinalVersionParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditGqdj/index.ts
Normal file
129
src/api/credit/creditGqdj/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditGqdj, CreditGqdjParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询股权冻结
|
||||||
|
*/
|
||||||
|
export async function pageCreditGqdj(params: CreditGqdjParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditGqdj>>>(
|
||||||
|
'/credit/credit-gqdj/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询股权冻结列表
|
||||||
|
*/
|
||||||
|
export async function listCreditGqdj(params?: CreditGqdjParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditGqdj[]>>(
|
||||||
|
'/credit/credit-gqdj',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加股权冻结
|
||||||
|
*/
|
||||||
|
export async function addCreditGqdj(data: CreditGqdj) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-gqdj',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改股权冻结
|
||||||
|
*/
|
||||||
|
export async function updateCreditGqdj(data: CreditGqdj) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-gqdj',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除股权冻结
|
||||||
|
*/
|
||||||
|
export async function removeCreditGqdj(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-gqdj/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除股权冻结
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditGqdj(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-gqdj/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询股权冻结
|
||||||
|
*/
|
||||||
|
export async function getCreditGqdj(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditGqdj>>(
|
||||||
|
'/credit/credit-gqdj/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入股权冻结
|
||||||
|
*/
|
||||||
|
export async function importCreditGqdj(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-gqdj/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditGqdj/model/index.ts
Normal file
57
src/api/credit/creditGqdj/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 股权冻结
|
||||||
|
*/
|
||||||
|
export interface CreditGqdj {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 股权冻结搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditGqdjParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
105
src/api/credit/creditHistoricalLegalPerson/index.ts
Normal file
105
src/api/credit/creditHistoricalLegalPerson/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditHistoricalLegalPerson, CreditHistoricalLegalPersonParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询历史法定代表人
|
||||||
|
*/
|
||||||
|
export async function pageCreditHistoricalLegalPerson(params: CreditHistoricalLegalPersonParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditHistoricalLegalPerson>>>(
|
||||||
|
'/credit/credit-historical-legal-person/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询历史法定代表人列表
|
||||||
|
*/
|
||||||
|
export async function listCreditHistoricalLegalPerson(params?: CreditHistoricalLegalPersonParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditHistoricalLegalPerson[]>>(
|
||||||
|
'/credit/credit-historical-legal-person',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加历史法定代表人
|
||||||
|
*/
|
||||||
|
export async function addCreditHistoricalLegalPerson(data: CreditHistoricalLegalPerson) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-historical-legal-person',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改历史法定代表人
|
||||||
|
*/
|
||||||
|
export async function updateCreditHistoricalLegalPerson(data: CreditHistoricalLegalPerson) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-historical-legal-person',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除历史法定代表人
|
||||||
|
*/
|
||||||
|
export async function removeCreditHistoricalLegalPerson(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-historical-legal-person/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除历史法定代表人
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditHistoricalLegalPerson(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-historical-legal-person/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询历史法定代表人
|
||||||
|
*/
|
||||||
|
export async function getCreditHistoricalLegalPerson(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditHistoricalLegalPerson>>(
|
||||||
|
'/credit/credit-historical-legal-person/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
45
src/api/credit/creditHistoricalLegalPerson/model/index.ts
Normal file
45
src/api/credit/creditHistoricalLegalPerson/model/index.ts
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史法定代表人
|
||||||
|
*/
|
||||||
|
export interface CreditHistoricalLegalPerson {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 名称
|
||||||
|
name?: string;
|
||||||
|
// 任职日期
|
||||||
|
registerDate?: string;
|
||||||
|
// 卸任日期
|
||||||
|
publicDate?: string;
|
||||||
|
// 链接
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 企业ID
|
||||||
|
companyId?: number;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史法定代表人搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditHistoricalLegalPersonParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditJudgmentDebtor/index.ts
Normal file
129
src/api/credit/creditJudgmentDebtor/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditJudgmentDebtor, CreditJudgmentDebtorParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询被执行人
|
||||||
|
*/
|
||||||
|
export async function pageCreditJudgmentDebtor(params: CreditJudgmentDebtorParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditJudgmentDebtor>>>(
|
||||||
|
'/credit/credit-judgment-debtor/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询被执行人列表
|
||||||
|
*/
|
||||||
|
export async function listCreditJudgmentDebtor(params?: CreditJudgmentDebtorParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditJudgmentDebtor[]>>(
|
||||||
|
'/credit/credit-judgment-debtor',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加被执行人
|
||||||
|
*/
|
||||||
|
export async function addCreditJudgmentDebtor(data: CreditJudgmentDebtor) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judgment-debtor',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改被执行人
|
||||||
|
*/
|
||||||
|
export async function updateCreditJudgmentDebtor(data: CreditJudgmentDebtor) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judgment-debtor',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除被执行人
|
||||||
|
*/
|
||||||
|
export async function removeCreditJudgmentDebtor(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judgment-debtor/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除被执行人
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditJudgmentDebtor(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judgment-debtor/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询被执行人
|
||||||
|
*/
|
||||||
|
export async function getCreditJudgmentDebtor(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditJudgmentDebtor>>(
|
||||||
|
'/credit/credit-judgment-debtor/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入被执行人
|
||||||
|
*/
|
||||||
|
export async function importCreditJudgmentDebtor(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judgment-debtor/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
51
src/api/credit/creditJudgmentDebtor/model/index.ts
Normal file
51
src/api/credit/creditJudgmentDebtor/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被执行人
|
||||||
|
*/
|
||||||
|
export interface CreditJudgmentDebtor {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 被执行人名称
|
||||||
|
name?: string;
|
||||||
|
// 证件号/组织机构代码
|
||||||
|
code?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 立案日期
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 执行标的(元)
|
||||||
|
amount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被执行人搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditJudgmentDebtorParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditJudicialDocument/index.ts
Normal file
129
src/api/credit/creditJudicialDocument/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditJudicialDocument, CreditJudicialDocumentParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export async function pageCreditJudicialDocument(params: CreditJudicialDocumentParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditJudicialDocument>>>(
|
||||||
|
'/credit/credit-judicial-document/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询裁判文书司法大数据列表
|
||||||
|
*/
|
||||||
|
export async function listCreditJudicialDocument(params?: CreditJudicialDocumentParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditJudicialDocument[]>>(
|
||||||
|
'/credit/credit-judicial-document',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export async function addCreditJudicialDocument(data: CreditJudicialDocument) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judicial-document',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export async function updateCreditJudicialDocument(data: CreditJudicialDocument) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judicial-document',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeCreditJudicialDocument(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judicial-document/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditJudicialDocument(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judicial-document/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export async function getCreditJudicialDocument(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditJudicialDocument>>(
|
||||||
|
'/credit/credit-judicial-document/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export async function importCreditJudicialDocument(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judicial-document/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditJudicialDocument/model/index.ts
Normal file
57
src/api/credit/creditJudicialDocument/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 裁判文书司法大数据
|
||||||
|
*/
|
||||||
|
export interface CreditJudicialDocument {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 裁判文书司法大数据搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditJudicialDocumentParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditJudiciary/index.ts
Normal file
129
src/api/credit/creditJudiciary/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditJudiciary, CreditJudiciaryParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询司法案件
|
||||||
|
*/
|
||||||
|
export async function pageCreditJudiciary(params: CreditJudiciaryParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditJudiciary>>>(
|
||||||
|
'/credit/credit-judiciary/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询司法案件列表
|
||||||
|
*/
|
||||||
|
export async function listCreditJudiciary(params?: CreditJudiciaryParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditJudiciary[]>>(
|
||||||
|
'/credit/credit-judiciary',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加司法案件
|
||||||
|
*/
|
||||||
|
export async function addCreditJudiciary(data: CreditJudiciary) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judiciary',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改司法案件
|
||||||
|
*/
|
||||||
|
export async function updateCreditJudiciary(data: CreditJudiciary) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judiciary',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除司法案件
|
||||||
|
*/
|
||||||
|
export async function removeCreditJudiciary(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judiciary/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除司法案件
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditJudiciary(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judiciary/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询司法案件
|
||||||
|
*/
|
||||||
|
export async function getCreditJudiciary(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditJudiciary>>(
|
||||||
|
'/credit/credit-judiciary/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入司法案件
|
||||||
|
*/
|
||||||
|
export async function importCreditJudiciaries(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-judiciary/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
71
src/api/credit/creditJudiciary/model/index.ts
Normal file
71
src/api/credit/creditJudiciary/model/index.ts
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司法案件
|
||||||
|
*/
|
||||||
|
export interface CreditJudiciary {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 案件名称
|
||||||
|
name?: string;
|
||||||
|
// 案号
|
||||||
|
code?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 类型, 0普通用户, 1招投标
|
||||||
|
type?: number;
|
||||||
|
// 案由
|
||||||
|
reason?: string;
|
||||||
|
// 上级id, 0是顶级
|
||||||
|
parentId?: number;
|
||||||
|
// 案件类型
|
||||||
|
infoType?: string;
|
||||||
|
// 所在国家
|
||||||
|
country?: string;
|
||||||
|
// 所在省份
|
||||||
|
province?: string;
|
||||||
|
// 所在城市
|
||||||
|
city?: string;
|
||||||
|
// 所在辖区
|
||||||
|
region?: string;
|
||||||
|
// 街道地址
|
||||||
|
address?: string;
|
||||||
|
// 案件进程
|
||||||
|
caseProgress?: string;
|
||||||
|
// 案件身份
|
||||||
|
caseIdentity?: string;
|
||||||
|
// 法院
|
||||||
|
court?: string;
|
||||||
|
// 进程日期
|
||||||
|
processDate?: string;
|
||||||
|
// 案件金额(元)
|
||||||
|
caseAmount?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 到期时间
|
||||||
|
expirationTime?: string;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司法案件搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditJudiciaryParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditMediation/index.ts
Normal file
129
src/api/credit/creditMediation/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditMediation, CreditMediationParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export async function pageCreditMediation(params: CreditMediationParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditMediation>>>(
|
||||||
|
'/credit/credit-mediation/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询诉前调解司法大数据列表
|
||||||
|
*/
|
||||||
|
export async function listCreditMediation(params?: CreditMediationParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditMediation[]>>(
|
||||||
|
'/credit/credit-mediation',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export async function addCreditMediation(data: CreditMediation) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-mediation',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export async function updateCreditMediation(data: CreditMediation) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-mediation',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeCreditMediation(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-mediation/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditMediation(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-mediation/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export async function getCreditMediation(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditMediation>>(
|
||||||
|
'/credit/credit-mediation/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export async function importCreditMediation(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-mediation/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditMediation/model/index.ts
Normal file
57
src/api/credit/creditMediation/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诉前调解司法大数据
|
||||||
|
*/
|
||||||
|
export interface CreditMediation {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诉前调解司法大数据搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditMediationParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
105
src/api/credit/creditNearbyCompany/index.ts
Normal file
105
src/api/credit/creditNearbyCompany/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditNearbyCompany, CreditNearbyCompanyParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询附近企业
|
||||||
|
*/
|
||||||
|
export async function pageCreditNearbyCompany(params: CreditNearbyCompanyParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditNearbyCompany>>>(
|
||||||
|
'/credit/credit-nearby-company/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询附近企业列表
|
||||||
|
*/
|
||||||
|
export async function listCreditNearbyCompany(params?: CreditNearbyCompanyParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditNearbyCompany[]>>(
|
||||||
|
'/credit/credit-nearby-company',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加附近企业
|
||||||
|
*/
|
||||||
|
export async function addCreditNearbyCompany(data: CreditNearbyCompany) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-nearby-company',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改附近企业
|
||||||
|
*/
|
||||||
|
export async function updateCreditNearbyCompany(data: CreditNearbyCompany) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-nearby-company',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除附近企业
|
||||||
|
*/
|
||||||
|
export async function removeCreditNearbyCompany(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-nearby-company/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除附近企业
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditNearbyCompany(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-nearby-company/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询附近企业
|
||||||
|
*/
|
||||||
|
export async function getCreditNearbyCompany(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditNearbyCompany>>(
|
||||||
|
'/credit/credit-nearby-company/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
141
src/api/credit/creditNearbyCompany/model/index.ts
Normal file
141
src/api/credit/creditNearbyCompany/model/index.ts
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附近企业
|
||||||
|
*/
|
||||||
|
export interface CreditNearbyCompany {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 企业名称
|
||||||
|
name?: string;
|
||||||
|
// 登记状态
|
||||||
|
registrationStatus?: string;
|
||||||
|
// 法定代表人
|
||||||
|
legalPerson?: string;
|
||||||
|
// 注册资本
|
||||||
|
registeredCapital?: string;
|
||||||
|
// 成立日期
|
||||||
|
establishDate?: string;
|
||||||
|
// 统一社会信用代码
|
||||||
|
code?: string;
|
||||||
|
// 注册地址
|
||||||
|
address?: string;
|
||||||
|
// 注册地址邮编
|
||||||
|
postalCode?: string;
|
||||||
|
// 有效手机号
|
||||||
|
phone?: string;
|
||||||
|
// 更多电话
|
||||||
|
moreTel?: string;
|
||||||
|
// 邮箱
|
||||||
|
email?: string;
|
||||||
|
// 邮箱
|
||||||
|
moreEmail?: string;
|
||||||
|
// 所在国家
|
||||||
|
country?: string;
|
||||||
|
// 所属省份
|
||||||
|
province?: string;
|
||||||
|
// 所属城市
|
||||||
|
city?: string;
|
||||||
|
// 所属区县
|
||||||
|
region?: string;
|
||||||
|
// 纳税人识别号
|
||||||
|
taxpayerCode?: string;
|
||||||
|
// 注册号
|
||||||
|
registrationNumber?: string;
|
||||||
|
// 组织机构代码
|
||||||
|
organizationalCode?: string;
|
||||||
|
// 参保人数
|
||||||
|
numberOfInsuredPersons?: string;
|
||||||
|
// 参保人数所属年报
|
||||||
|
annualReport?: string;
|
||||||
|
// 企业(机构)类型
|
||||||
|
institutionType?: string;
|
||||||
|
// 企业规模
|
||||||
|
companySize?: string;
|
||||||
|
// 营业期限
|
||||||
|
businessTerm?: string;
|
||||||
|
// 国标行业门类
|
||||||
|
nationalStandardIndustryCategories?: string;
|
||||||
|
// 国标行业大类
|
||||||
|
nationalStandardIndustryCategories2?: string;
|
||||||
|
// 国标行业中类
|
||||||
|
nationalStandardIndustryCategories3?: string;
|
||||||
|
// 国标行业小类
|
||||||
|
nationalStandardIndustryCategories4?: string;
|
||||||
|
// 曾用名
|
||||||
|
formerName?: string;
|
||||||
|
// 英文名
|
||||||
|
englishName?: string;
|
||||||
|
// 官网网址
|
||||||
|
domain?: string;
|
||||||
|
// 通信地址
|
||||||
|
mailingAddress?: string;
|
||||||
|
// 通信地址邮箱
|
||||||
|
mailingEmail?: string;
|
||||||
|
// 企业简介
|
||||||
|
companyProfile?: string;
|
||||||
|
// 经营范围
|
||||||
|
natureOfBusiness?: string;
|
||||||
|
// 电话
|
||||||
|
tel?: string;
|
||||||
|
// 企查查行业门类
|
||||||
|
nationalStandardIndustryCategories5?: string;
|
||||||
|
// 企查查行业大类
|
||||||
|
nationalStandardIndustryCategories6?: string;
|
||||||
|
// 企查查行业中类
|
||||||
|
nationalStandardIndustryCategories7?: string;
|
||||||
|
// 企查查行业小类
|
||||||
|
nationalStandardIndustryCategories8?: string;
|
||||||
|
// 链接
|
||||||
|
url?: string;
|
||||||
|
// 类型
|
||||||
|
type?: number;
|
||||||
|
// 上级id, 0是顶级
|
||||||
|
parentId?: number;
|
||||||
|
// 实缴资本
|
||||||
|
paidinCapital?: string;
|
||||||
|
// 登记机关
|
||||||
|
registrationAuthority?: string;
|
||||||
|
// 纳税人资质
|
||||||
|
taxpayerQualification?: string;
|
||||||
|
// 最新年报年份
|
||||||
|
latestAnnualReportYear?: string;
|
||||||
|
// 最新年报营业收入
|
||||||
|
latestAnnualReportOnOperatingRevenue?: string;
|
||||||
|
// 企查分
|
||||||
|
enterpriseScoreCheck?: string;
|
||||||
|
// 信用等级
|
||||||
|
creditRating?: string;
|
||||||
|
// 科创分
|
||||||
|
cechnologyScore?: string;
|
||||||
|
// 科创等级
|
||||||
|
cechnologyLevel?: string;
|
||||||
|
// 是否小微企业
|
||||||
|
smallEnterprise?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附近企业搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditNearbyCompanyParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
105
src/api/credit/creditPatent/index.ts
Normal file
105
src/api/credit/creditPatent/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditPatent, CreditPatentParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询专利
|
||||||
|
*/
|
||||||
|
export async function pageCreditPatent(params: CreditPatentParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditPatent>>>(
|
||||||
|
'/credit/credit-patent/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询专利列表
|
||||||
|
*/
|
||||||
|
export async function listCreditPatent(params?: CreditPatentParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditPatent[]>>(
|
||||||
|
'/credit/credit-patent',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加专利
|
||||||
|
*/
|
||||||
|
export async function addCreditPatent(data: CreditPatent) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-patent',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改专利
|
||||||
|
*/
|
||||||
|
export async function updateCreditPatent(data: CreditPatent) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-patent',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除专利
|
||||||
|
*/
|
||||||
|
export async function removeCreditPatent(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-patent/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除专利
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditPatent(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-patent/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询专利
|
||||||
|
*/
|
||||||
|
export async function getCreditPatent(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditPatent>>(
|
||||||
|
'/credit/credit-patent/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditPatent/model/index.ts
Normal file
57
src/api/credit/creditPatent/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专利
|
||||||
|
*/
|
||||||
|
export interface CreditPatent {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 发明名称
|
||||||
|
name?: string;
|
||||||
|
// 专利类型
|
||||||
|
type?: string;
|
||||||
|
// 法律状态
|
||||||
|
statusText?: string;
|
||||||
|
// 申请号
|
||||||
|
registerNo?: string;
|
||||||
|
// 申请日
|
||||||
|
registerDate?: string;
|
||||||
|
// 公开(公告)号
|
||||||
|
publicNo?: string;
|
||||||
|
// 公开(公告)日期
|
||||||
|
publicDate?: string;
|
||||||
|
// 发明人
|
||||||
|
inventor?: string;
|
||||||
|
// 申请(专利权)人
|
||||||
|
patentApplicant?: string;
|
||||||
|
// 链接
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 企业ID
|
||||||
|
companyId?: number;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专利搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditPatentParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditProject/index.ts
Normal file
129
src/api/credit/creditProject/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditProject, CreditProjectParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询招投标
|
||||||
|
*/
|
||||||
|
export async function pageCreditProject(params: CreditProjectParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditProject>>>(
|
||||||
|
'/credit/credit-project/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询招投标列表
|
||||||
|
*/
|
||||||
|
export async function listCreditProject(params?: CreditProjectParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditProject[]>>(
|
||||||
|
'/credit/credit-project',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加招投标
|
||||||
|
*/
|
||||||
|
export async function addCreditProject(data: CreditProject) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-project',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改招投标
|
||||||
|
*/
|
||||||
|
export async function updateCreditProject(data: CreditProject) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-project',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除招投标
|
||||||
|
*/
|
||||||
|
export async function removeCreditProject(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-project/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除招投标
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditProject(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-project/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询招投标
|
||||||
|
*/
|
||||||
|
export async function getCreditProject(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditProject>>(
|
||||||
|
'/credit/credit-project/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入招投标
|
||||||
|
*/
|
||||||
|
export async function importCreditProject(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-project/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
69
src/api/credit/creditProject/model/index.ts
Normal file
69
src/api/credit/creditProject/model/index.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招投标
|
||||||
|
*/
|
||||||
|
export interface CreditProject {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 项目名称
|
||||||
|
name?: string;
|
||||||
|
// 唯一标识
|
||||||
|
code?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 类型, 0普通用户, 1招投标
|
||||||
|
type?: number;
|
||||||
|
// 企业角色
|
||||||
|
role?: string;
|
||||||
|
// 上级id, 0是顶级
|
||||||
|
parentId?: number;
|
||||||
|
// 信息类型
|
||||||
|
infoType?: string;
|
||||||
|
// 所在国家
|
||||||
|
country?: string;
|
||||||
|
// 所在省份
|
||||||
|
province?: string;
|
||||||
|
// 所在城市
|
||||||
|
city?: string;
|
||||||
|
// 所在辖区
|
||||||
|
region?: string;
|
||||||
|
// 街道地址
|
||||||
|
address?: string;
|
||||||
|
// 招采单位名称
|
||||||
|
procurementName?: string;
|
||||||
|
// 中标单位名称
|
||||||
|
winningName?: string;
|
||||||
|
// 中标金额
|
||||||
|
winningPrice?: string;
|
||||||
|
// 发布日期
|
||||||
|
releaseDate?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 到期时间
|
||||||
|
expirationTime?: string;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招投标搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditProjectParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditRiskRelation/index.ts
Normal file
129
src/api/credit/creditRiskRelation/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditRiskRelation, CreditRiskRelationParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询风险关系表
|
||||||
|
*/
|
||||||
|
export async function pageCreditRiskRelation(params: CreditRiskRelationParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditRiskRelation>>>(
|
||||||
|
'/credit/credit-risk-relation/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询风险关系表列表
|
||||||
|
*/
|
||||||
|
export async function listCreditRiskRelation(params?: CreditRiskRelationParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditRiskRelation[]>>(
|
||||||
|
'/credit/credit-risk-relation',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加风险关系表
|
||||||
|
*/
|
||||||
|
export async function addCreditRiskRelation(data: CreditRiskRelation) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-risk-relation',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改风险关系表
|
||||||
|
*/
|
||||||
|
export async function updateCreditRiskRelation(data: CreditRiskRelation) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-risk-relation',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除风险关系表
|
||||||
|
*/
|
||||||
|
export async function removeCreditRiskRelation(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-risk-relation/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除风险关系表
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditRiskRelation(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-risk-relation/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询风险关系表
|
||||||
|
*/
|
||||||
|
export async function getCreditRiskRelation(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditRiskRelation>>(
|
||||||
|
'/credit/credit-risk-relation/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入风险关系表
|
||||||
|
*/
|
||||||
|
export async function importCreditRiskRelation(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-risk-relation/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
49
src/api/credit/creditRiskRelation/model/index.ts
Normal file
49
src/api/credit/creditRiskRelation/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 风险关系表
|
||||||
|
*/
|
||||||
|
export interface CreditRiskRelation {
|
||||||
|
// 序号
|
||||||
|
id?: number;
|
||||||
|
// 主体名称
|
||||||
|
mainBodyName?: string;
|
||||||
|
// 登记状态
|
||||||
|
registrationStatus?: string;
|
||||||
|
// 注册资本
|
||||||
|
registeredCapital?: string;
|
||||||
|
// 省份地区
|
||||||
|
provinceRegion?: string;
|
||||||
|
// 关联关系
|
||||||
|
associatedRelation?: string;
|
||||||
|
// 风险关系
|
||||||
|
riskRelation?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 风险关系表搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditRiskRelationParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
129
src/api/credit/creditSupplier/index.ts
Normal file
129
src/api/credit/creditSupplier/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditSupplier, CreditSupplierParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询供应商
|
||||||
|
*/
|
||||||
|
export async function pageCreditSupplier(params: CreditSupplierParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditSupplier>>>(
|
||||||
|
'/credit/credit-supplier/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询供应商列表
|
||||||
|
*/
|
||||||
|
export async function listCreditSupplier(params?: CreditSupplierParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditSupplier[]>>(
|
||||||
|
'/credit/credit-supplier',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加供应商
|
||||||
|
*/
|
||||||
|
export async function addCreditSupplier(data: CreditSupplier) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-supplier',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改供应商
|
||||||
|
*/
|
||||||
|
export async function updateCreditSupplier(data: CreditSupplier) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-supplier',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除供应商
|
||||||
|
*/
|
||||||
|
export async function removeCreditSupplier(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-supplier/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除供应商
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditSupplier(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-supplier/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询供应商
|
||||||
|
*/
|
||||||
|
export async function getCreditSupplier(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditSupplier>>(
|
||||||
|
'/credit/credit-supplier/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入供应商
|
||||||
|
*/
|
||||||
|
export async function importCreditSupplier(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-supplier/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
47
src/api/credit/creditSupplier/model/index.ts
Normal file
47
src/api/credit/creditSupplier/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商
|
||||||
|
*/
|
||||||
|
export interface CreditSupplier {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 供应商
|
||||||
|
supplier?: string;
|
||||||
|
// 状态
|
||||||
|
statusTxt?: string;
|
||||||
|
// 采购金额(万元)
|
||||||
|
purchaseAmount?: string;
|
||||||
|
// 公开日期
|
||||||
|
publicDate?: string;
|
||||||
|
// 数据来源
|
||||||
|
dataSource?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditSupplierParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
105
src/api/credit/creditSuspectedRelationship/index.ts
Normal file
105
src/api/credit/creditSuspectedRelationship/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditSuspectedRelationship, CreditSuspectedRelationshipParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询疑似关系
|
||||||
|
*/
|
||||||
|
export async function pageCreditSuspectedRelationship(params: CreditSuspectedRelationshipParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditSuspectedRelationship>>>(
|
||||||
|
'/credit/credit-suspected-relationship/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询疑似关系列表
|
||||||
|
*/
|
||||||
|
export async function listCreditSuspectedRelationship(params?: CreditSuspectedRelationshipParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditSuspectedRelationship[]>>(
|
||||||
|
'/credit/credit-suspected-relationship',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加疑似关系
|
||||||
|
*/
|
||||||
|
export async function addCreditSuspectedRelationship(data: CreditSuspectedRelationship) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-suspected-relationship',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改疑似关系
|
||||||
|
*/
|
||||||
|
export async function updateCreditSuspectedRelationship(data: CreditSuspectedRelationship) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-suspected-relationship',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除疑似关系
|
||||||
|
*/
|
||||||
|
export async function removeCreditSuspectedRelationship(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-suspected-relationship/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除疑似关系
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditSuspectedRelationship(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-suspected-relationship/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询疑似关系
|
||||||
|
*/
|
||||||
|
export async function getCreditSuspectedRelationship(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditSuspectedRelationship>>(
|
||||||
|
'/credit/credit-suspected-relationship/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
55
src/api/credit/creditSuspectedRelationship/model/index.ts
Normal file
55
src/api/credit/creditSuspectedRelationship/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 疑似关系
|
||||||
|
*/
|
||||||
|
export interface CreditSuspectedRelationship {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 企业名称
|
||||||
|
name?: string;
|
||||||
|
// 状态
|
||||||
|
statusText?: string;
|
||||||
|
// 法定代表人
|
||||||
|
legalPerson?: string;
|
||||||
|
// 注册资本
|
||||||
|
registeredCapital?: string;
|
||||||
|
// 成立日期
|
||||||
|
createDate?: string;
|
||||||
|
// 关联方
|
||||||
|
relatedParty?: string;
|
||||||
|
// 疑似关系类型
|
||||||
|
type?: string;
|
||||||
|
// 疑似关系详情
|
||||||
|
detail?: string;
|
||||||
|
// 链接
|
||||||
|
url?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 企业ID
|
||||||
|
companyId?: number;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 疑似关系搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditSuspectedRelationshipParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -107,9 +107,12 @@ export async function getCreditUser(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入招投标
|
* 导入招投标
|
||||||
*/
|
*/
|
||||||
export async function importCreditUsers(file: File) {
|
export async function importCreditUsers(file: File, companyId?: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-user/import',
|
'/credit/credit-user/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ export interface CreditUser {
|
|||||||
name?: string;
|
name?: string;
|
||||||
// 唯一标识
|
// 唯一标识
|
||||||
code?: string;
|
code?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
// 类型, 0普通用户, 1招投标
|
// 类型, 0普通用户, 1招投标
|
||||||
type?: number;
|
type?: number;
|
||||||
// 企业角色
|
// 企业角色
|
||||||
|
|||||||
129
src/api/credit/creditXgxf/index.ts
Normal file
129
src/api/credit/creditXgxf/index.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CreditXgxf, CreditXgxfParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询限制高消费
|
||||||
|
*/
|
||||||
|
export async function pageCreditXgxf(params: CreditXgxfParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CreditXgxf>>>(
|
||||||
|
'/credit/credit-xgxf/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询限制高消费列表
|
||||||
|
*/
|
||||||
|
export async function listCreditXgxf(params?: CreditXgxfParam) {
|
||||||
|
const res = await request.get<ApiResult<CreditXgxf[]>>(
|
||||||
|
'/credit/credit-xgxf',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加限制高消费
|
||||||
|
*/
|
||||||
|
export async function addCreditXgxf(data: CreditXgxf) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-xgxf',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改限制高消费
|
||||||
|
*/
|
||||||
|
export async function updateCreditXgxf(data: CreditXgxf) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-xgxf',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除限制高消费
|
||||||
|
*/
|
||||||
|
export async function removeCreditXgxf(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-xgxf/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除限制高消费
|
||||||
|
*/
|
||||||
|
export async function removeBatchCreditXgxf(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-xgxf/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询限制高消费
|
||||||
|
*/
|
||||||
|
export async function getCreditXgxf(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CreditXgxf>>(
|
||||||
|
'/credit/credit-xgxf/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入限制高消费
|
||||||
|
*/
|
||||||
|
export async function importCreditXgxf(file: File, companyId?: number) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
if (companyId != null) {
|
||||||
|
formData.append('companyId', String(companyId));
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/credit/credit-xgxf/import',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/credit/creditXgxf/model/index.ts
Normal file
57
src/api/credit/creditXgxf/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限制高消费
|
||||||
|
*/
|
||||||
|
export interface CreditXgxf {
|
||||||
|
// ID
|
||||||
|
id?: number;
|
||||||
|
// 数据类型
|
||||||
|
dataType?: string;
|
||||||
|
// 原告/上诉人
|
||||||
|
plaintiffAppellant?: string;
|
||||||
|
// 被告/被上诉人
|
||||||
|
appellee?: string;
|
||||||
|
// 链接地址
|
||||||
|
url?: string;
|
||||||
|
// 其他当事人/第三人
|
||||||
|
otherPartiesThirdParty?: string;
|
||||||
|
// 发生时间
|
||||||
|
occurrenceTime?: string;
|
||||||
|
// 案号
|
||||||
|
caseNumber?: string;
|
||||||
|
// 案由
|
||||||
|
causeOfAction?: string;
|
||||||
|
// 涉案金额
|
||||||
|
involvedAmount?: string;
|
||||||
|
// 法院
|
||||||
|
courtName?: string;
|
||||||
|
// 数据状态
|
||||||
|
dataStatus?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限制高消费搜索条件
|
||||||
|
*/
|
||||||
|
export interface CreditXgxfParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/dormitory/dormitoryApply/index.ts
Normal file
106
src/api/dormitory/dormitoryApply/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { DormitoryApply, DormitoryApplyParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询审批管理
|
||||||
|
*/
|
||||||
|
export async function pageDormitoryApply(params: DormitoryApplyParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<DormitoryApply>>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-apply/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询审批管理列表
|
||||||
|
*/
|
||||||
|
export async function listDormitoryApply(params?: DormitoryApplyParam) {
|
||||||
|
const res = await request.get<ApiResult<DormitoryApply[]>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-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 addDormitoryApply(data: DormitoryApply) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-apply',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改审批管理
|
||||||
|
*/
|
||||||
|
export async function updateDormitoryApply(data: DormitoryApply) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-apply',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除审批管理
|
||||||
|
*/
|
||||||
|
export async function removeDormitoryApply(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-apply/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除审批管理
|
||||||
|
*/
|
||||||
|
export async function removeBatchDormitoryApply(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-apply/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询审批管理
|
||||||
|
*/
|
||||||
|
export async function getDormitoryApply(id: number) {
|
||||||
|
const res = await request.get<ApiResult<DormitoryApply>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-apply/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
57
src/api/dormitory/dormitoryApply/model/index.ts
Normal file
57
src/api/dormitory/dormitoryApply/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批管理
|
||||||
|
*/
|
||||||
|
export interface DormitoryApply {
|
||||||
|
// 主键ID
|
||||||
|
id?: number;
|
||||||
|
// 类型
|
||||||
|
type?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 姓名
|
||||||
|
realName?: string;
|
||||||
|
// 手机号
|
||||||
|
mobile?: string;
|
||||||
|
// 客户名称
|
||||||
|
dealerName?: string;
|
||||||
|
// 客户编号
|
||||||
|
dealerCode?: 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 DormitoryApplyParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/dormitory/dormitoryBed/index.ts
Normal file
106
src/api/dormitory/dormitoryBed/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { DormitoryBed, DormitoryBedParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询宿舍床铺
|
||||||
|
*/
|
||||||
|
export async function pageDormitoryBed(params: DormitoryBedParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<DormitoryBed>>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-bed/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询宿舍床铺列表
|
||||||
|
*/
|
||||||
|
export async function listDormitoryBed(params?: DormitoryBedParam) {
|
||||||
|
const res = await request.get<ApiResult<DormitoryBed[]>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-bed',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加宿舍床铺
|
||||||
|
*/
|
||||||
|
export async function addDormitoryBed(data: DormitoryBed) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-bed',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改宿舍床铺
|
||||||
|
*/
|
||||||
|
export async function updateDormitoryBed(data: DormitoryBed) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-bed',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除宿舍床铺
|
||||||
|
*/
|
||||||
|
export async function removeDormitoryBed(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-bed/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除宿舍床铺
|
||||||
|
*/
|
||||||
|
export async function removeBatchDormitoryBed(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-bed/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询宿舍床铺
|
||||||
|
*/
|
||||||
|
export async function getDormitoryBed(id: number) {
|
||||||
|
const res = await request.get<ApiResult<DormitoryBed>>(
|
||||||
|
MODULES_API_URL + '/dormitory/dormitory-bed/' + 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
Reference in New Issue
Block a user