初始化
This commit is contained in:
106
api/oa/oaAppRenew/index.ts
Normal file
106
api/oa/oaAppRenew/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAppRenew, OaAppRenewParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询续费管理
|
||||
*/
|
||||
export async function pageOaAppRenew(params: OaAppRenewParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAppRenew>>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询续费管理列表
|
||||
*/
|
||||
export async function listOaAppRenew(params?: OaAppRenewParam) {
|
||||
const res = await request.get<ApiResult<OaAppRenew[]>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加续费管理
|
||||
*/
|
||||
export async function addOaAppRenew(data: OaAppRenew) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改续费管理
|
||||
*/
|
||||
export async function updateOaAppRenew(data: OaAppRenew) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除续费管理
|
||||
*/
|
||||
export async function removeOaAppRenew(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除续费管理
|
||||
*/
|
||||
export async function removeBatchOaAppRenew(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询续费管理
|
||||
*/
|
||||
export async function getOaAppRenew(id: number) {
|
||||
const res = await request.get<ApiResult<OaAppRenew>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
41
api/oa/oaAppRenew/model/index.ts
Normal file
41
api/oa/oaAppRenew/model/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 续费管理
|
||||
*/
|
||||
export interface OaAppRenew {
|
||||
// 自增ID
|
||||
appRenewId?: number;
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 续费金额
|
||||
money?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 开始时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 付款凭证
|
||||
images?: string;
|
||||
// 用户姓名
|
||||
nickname?: string;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 续费管理搜索条件
|
||||
*/
|
||||
export interface OaAppRenewParam extends PageParam {
|
||||
appRenewId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user