feat(credit): 添加企业信用模块功能
- 在应用配置中注册公司管理页面路由 - 实现首页轮播图组件优化,支持CSS尺寸转换和图片加载 - 新增企业ID修正API功能 - 实现信用模块数据权限控制工具 - 添加客户、联系人、数据查询等页面配置 - 完善行政许可、破产重整、分支机构等信用数据模型 - 实现各类信用数据的增删改查和导入导出接口 - 建立企业信用数据完整管理功能体系
This commit is contained in:
163
src/api/credit/creditDeliveryNotice/index.ts
Normal file
163
src/api/credit/creditDeliveryNotice/index.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
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: withCreditUserScope(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: withCreditUserScope(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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史送达公告司法大数据
|
||||
*/
|
||||
export async function importCreditDeliveryNoticeHistory(
|
||||
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/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditDeliveryNotice/model/index.ts
Normal file
59
src/api/credit/creditDeliveryNotice/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
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 {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user