feat(app): 初始化项目配置和页面结构
- 添加 .dockerignore 和 .env.example 配置文件 - 添加 .gitignore 忽略规则配置 - 创建服务端代理API路由(_file、_modules、_server) - 集成 Ant Design Vue 组件库并配置SSR样式提取 - 定义API响应类型封装 - 创建基础布局组件(blank、console) - 实现应用中心页面和组件(AppsCenter) - 添加文章列表测试页面 - 配置控制台导航菜单结构 - 实现控制台头部组件 - 创建联系页面表单
This commit is contained in:
142
app/api/credit/creditCompany/index.ts
Normal file
142
app/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));
|
||||
}
|
||||
135
app/api/credit/creditCompany/model/index.ts
Normal file
135
app/api/credit/creditCompany/model/index.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 企业
|
||||
*/
|
||||
export interface CreditCompany {
|
||||
// ID
|
||||
id?: number;
|
||||
// 原文件导入名称
|
||||
name?: string;
|
||||
// 系统匹配企业名称
|
||||
matchName?: string;
|
||||
// 统一社会信用代码
|
||||
code?: 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;
|
||||
}
|
||||
Reference in New Issue
Block a user