Compare commits
54 Commits
9dd5589330
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 147c34f4f9 | |||
| ce3f22f4ae | |||
| 54827a9876 | |||
| a0a4cc7a8d | |||
| 56063e9bcd | |||
| 72c431967d | |||
| 1b115edabe | |||
| 41a1fcb4ed | |||
| c79c68e7a1 | |||
| 5182112b72 | |||
| a9d008fb90 | |||
| 6827855b78 | |||
| 3f2ab2cc40 | |||
| a0170f820e | |||
| a9d513fca4 | |||
| fe20f0f0b3 | |||
| b1147f7a3d | |||
| c29daa5293 | |||
| b4f3dcbb18 | |||
| ddb311b82f | |||
| 6a9be80811 | |||
| 75d31dd09e | |||
| d3345d14d6 | |||
| ff186910da | |||
| 338a2b9d72 | |||
| 36806bac58 | |||
| 952a082752 | |||
| 9febd8016c | |||
| f01e3359ec | |||
| 8d1d9d9de9 | |||
| c16b857505 | |||
| d97d279670 | |||
| c18120fe81 | |||
| 2d7e44e0ad | |||
| c5908f4376 | |||
| f78aa97bd1 | |||
| 17487cce2b | |||
| 6b21547b09 | |||
| fa188f482b | |||
| d5e2c43f4e | |||
| a36cafa77a | |||
| 4ee9a90ab3 | |||
| c711c3dfe6 | |||
| 183967ea4a | |||
| 7890ec07d8 | |||
| 67f649620a | |||
| ec465ecc5a | |||
| 8e76658ce0 | |||
| 8fd96fb05c | |||
| 882287c98b | |||
| cb5569a7e0 | |||
| 6f51efe47b | |||
| 1031ed9199 | |||
| 463636578d |
@@ -1,6 +1,7 @@
|
||||
VITE_APP_NAME=后台管理(开发环境)
|
||||
#VITE_API_URL=http://127.0.0.1:9200/api
|
||||
VITE_API_URL=http://127.0.0.1:9200/api
|
||||
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||
|
||||
|
||||
#VITE_API_URL=https://cms-api.s209.websoft.top/api
|
||||
#VITE_API_URL=https://ysb-api.websoft.top/api
|
||||
#VITE_SERVER_API_URL=https://server.websoft.top/api
|
||||
|
||||
62
a.html
Normal file
62
a.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<p><strong>桂乐淘后台管理手册</strong></p>
|
||||
<p><strong>后台登录信息:</strong></p>
|
||||
<p><strong>地址:</strong><a href="login"><strong>https://glt.websoft.top/login</strong></a><strong><br /></strong><strong>账号:13800010584</strong><strong><br /></strong><strong>验证码:183911</strong></p>
|
||||
<p><strong>一、创建管理员账号</strong></p>
|
||||
<p>(一)创建流程</p>
|
||||
<p>主页-用户管理-设置手机号-角色设置(将该手机号设置为对应的角色权限)-打开管理员开关,即可创建管理员账号-搜索到对应管理员手机号-勾选该账号-重置密码-复制密码给管理员-打开后台登录地址-使用手机号+登录密码+核验码进行登录-登录成功后再自行修改登录密码。</p>
|
||||
<p><strong> <img src="https://oss.wsdns.cn/20260306/4ce09bd61eb549a3b955490ba2b489d8.png" /></strong></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/a2814cc44e5c41909a513b53b13e2918.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/205744c621a045b5a2557456dabd25de.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/f151c0a2571540f1bb54f73e0009db07.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/fcc150c5e8294b9d990c0eb7db51eed4.png" /></p>
|
||||
<p> </p>
|
||||
<p>(二)角色管理</p>
|
||||
<p>新建或修改角色-分配权限(按角色需要勾选权限)</p>
|
||||
<p>1.角色设置</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/44dcfdd7e424434788c52a5e3b129b05.png" /></p>
|
||||
<p>2.角色名称</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/d7405372b30647f99042a1667fba1713.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/406cb1aab12c45d4ac6aa550bb76b0c2.png" /></p>
|
||||
<p><strong> </strong></p>
|
||||
<p><strong>二、业务管理(创建商品-创建水票-配送)</strong></p>
|
||||
<p>(一)商品创建流程</p>
|
||||
<p>新增或编辑商品,按字段填写或上传商品信息,保存后即可(可自主管理上下架及商品排序),在商品管理模块添加的是普通的快递商品,不属于水票套票</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/9547293d358c4de0834f39301a68967a.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/8f7fd971e3bf48c8bf57ee8ff88dc6b0.png" /></p>
|
||||
<p> </p>
|
||||
<p>(二)水票套票创建及配送</p>
|
||||
<p>基于商品管理里的商品信息,进入水票-模板管理-填写模板规则</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/72f6691aacab43d5accacc3d585b2c57.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/62a4c06e5d7c4f35980eeb4f661fb7a2.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/4e6a9764ffe24079ae90701254d695ea.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/0528a0acf7a9483b973a521f8255e6a9.png" /></p>
|
||||
<p>(三)配送</p>
|
||||
<p>用户购买水票后,系统自动释放水票模板的首期水票,并自动生成配送订单到用户指定地址(须在电子围栏内)</p>
|
||||
<p>配送员添加:接单-配送员管理-新增/修改配送员信息</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/853717ca88a046b7bd11f82a7dd1a17d.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/9d5b41ccbc7243629b98bd1b5e96d000.png" /></p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/5bdaadaa39e14046bf1d08c34d745bc3.png" /></p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p><strong> </strong></p>
|
||||
<p><strong>三、分销</strong></p>
|
||||
<p>(一)分销用户</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/964092d296074f0a9df2b9f46d7ef9f4.png" /></p>
|
||||
<p>(二)推荐关系</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/f299eb173590496c84cd545425c82438.png" /></p>
|
||||
<p>(三)分销订单</p>
|
||||
<p><strong><img src="https://oss.wsdns.cn/20260306/ddf51b18abee477eabc3335d5535e9c4.png" /></strong></p>
|
||||
<p><strong>用户操作手册</strong></p>
|
||||
<p><strong>一、水票购买</strong></p>
|
||||
<p>用户可按指引购买水票,选择地址时,如不在电子围栏范围内,无法付款配送。</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/880543fbd60a44d98f79445df0f45115.png" /> <img src="https://oss.wsdns.cn/20260306/f7f628046e384e51a3df99caa320a8a8.png" /><img src="https://oss.wsdns.cn/20260306/515f0893e8d24e0c8ba4a2288f3b67f9.png" /></p>
|
||||
<p><strong>二、我的水票</strong></p>
|
||||
<p>用户查看自己购买过的水票明细及使用、释放情况等</p>
|
||||
<p><img src="https://oss.wsdns.cn/20260306/a482517619654972a713a628109f2cf7.png" /></p>
|
||||
<p><strong> </strong></p>
|
||||
<p><strong>三</strong><strong>、</strong><strong>立即送水</strong></p>
|
||||
<p>用户查看自己购买过的水票明细及使用、释放情况等</p>
|
||||
<p> <img src="https://oss.wsdns.cn/20260306/66a9645153d94ca6b598ae9813516179.png" /><img src="https://oss.wsdns.cn/20260306/06ecf42a53f8411a88ade40e797ed9e9.png" /></p>
|
||||
<p><strong>三、</strong><strong>分享中心</strong></p>
|
||||
<p>用户查看自己的推广佣金情况、推广的用户列表,申请提现等</p>
|
||||
<p> <img src="https://oss.wsdns.cn/20260306/eb6d0d4240374549945a14f6c6b3e179.png" /><img src="https://oss.wsdns.cn/20260306/6036ca3fe4a0438baa3a680a62d2da7b.png" /></p>
|
||||
28
src/api/credit/companyId.ts
Normal file
28
src/api/credit/companyId.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult } from '@/api';
|
||||
|
||||
/**
|
||||
* 修正某个信用模块数据的主体企业归属(按名称匹配回填 companyId)
|
||||
*
|
||||
* 后端约定: POST /api/credit/{module}/company-id/refresh
|
||||
* 例如: module = "credit-judgment-debtor"
|
||||
*/
|
||||
export async function refreshCreditCompanyId(
|
||||
module: string,
|
||||
params?: {
|
||||
onlyNull?: boolean;
|
||||
limit?: number;
|
||||
}
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
`/credit/${module}/company-id/refresh`,
|
||||
undefined,
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditAdministrativeLicense,
|
||||
@@ -14,7 +16,7 @@ export async function pageCreditAdministrativeLicense(
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<CreditAdministrativeLicense>>
|
||||
>('/credit/credit-administrative-license/page', {
|
||||
params
|
||||
params: withCreditUserScope(params)
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -30,9 +32,7 @@ export async function listCreditAdministrativeLicense(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditAdministrativeLicense[]>>(
|
||||
'/credit/credit-administrative-license',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -142,3 +142,30 @@ export async function importCreditAdministrativeLicense(
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史行政许可
|
||||
*/
|
||||
export async function importCreditAdministrativeLicenseHistory(
|
||||
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-administrative-license/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));
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ export interface CreditAdministrativeLicense {
|
||||
validityEnd?: string;
|
||||
// 许可机关
|
||||
licensingAuthority?: string;
|
||||
@TableField("License_content")
|
||||
// 许可内容
|
||||
licenseContent?: string;
|
||||
// 数据来源单位
|
||||
@@ -53,6 +52,8 @@ export interface CreditAdministrativeLicense {
|
||||
* 行政许可搜索条件
|
||||
*/
|
||||
export interface CreditAdministrativeLicenseParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditBankruptcy, CreditBankruptcyParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditBankruptcy(params: CreditBankruptcyParam) {
|
||||
export async function listCreditBankruptcy(params?: CreditBankruptcyParam) {
|
||||
const res = await request.get<ApiResult<CreditBankruptcy[]>>(
|
||||
'/credit/credit-bankruptcy',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -129,3 +127,30 @@ export async function importCreditBankruptcy(file: File, companyId?: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史破产重整
|
||||
*/
|
||||
export async function importCreditBankruptcyHistory(
|
||||
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-bankruptcy/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));
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ export interface CreditBankruptcy {
|
||||
* 破产重整搜索条件
|
||||
*/
|
||||
export interface CreditBankruptcyParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditBranch, CreditBranchParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditBranch(params: CreditBranchParam) {
|
||||
export async function listCreditBranch(params?: CreditBranchParam) {
|
||||
const res = await request.get<ApiResult<CreditBranch[]>>(
|
||||
'/credit/credit-branch',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -44,6 +44,8 @@ export interface CreditBranch {
|
||||
* 分支机构搜索条件
|
||||
*/
|
||||
export interface CreditBranchParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditBreachOfTrust, CreditBreachOfTrustParam } from './model';
|
||||
|
||||
@@ -10,9 +12,7 @@ export async function pageCreditBreachOfTrust(
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditBreachOfTrust>>>(
|
||||
'/credit/credit-breach-of-trust/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -28,9 +28,7 @@ export async function listCreditBreachOfTrust(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditBreachOfTrust[]>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -136,3 +134,30 @@ export async function importCreditBreachOfTrust(
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史失信被执行人
|
||||
*/
|
||||
export async function importCreditBreachOfTrustHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface CreditBreachOfTrust {
|
||||
* 失信被执行人搜索条件
|
||||
*/
|
||||
export interface CreditBreachOfTrustParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCaseFiling, CreditCaseFilingParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditCaseFiling(params: CreditCaseFilingParam) {
|
||||
export async function listCreditCaseFiling(params?: CreditCaseFilingParam) {
|
||||
const res = await request.get<ApiResult<CreditCaseFiling[]>>(
|
||||
'/credit/credit-case-filing',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -129,3 +127,30 @@ export async function importCreditCaseFiling(file: File, companyId?: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史立案信息司法大数据
|
||||
*/
|
||||
export async function importCreditCaseFilingHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface CreditCaseFiling {
|
||||
* 司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCaseFilingParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCompany, CreditCompanyParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditCompany(params: CreditCompanyParam) {
|
||||
export async function listCreditCompany(params?: CreditCompanyParam) {
|
||||
const res = await request.get<ApiResult<CreditCompany[]>>(
|
||||
'/credit/credit-company',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -125,15 +123,35 @@ export async function importCreditCompany(file: File) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入客户
|
||||
*/
|
||||
export async function importCustomer(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
formData.append('isCustomer', '1');
|
||||
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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -108,6 +108,56 @@ export interface CreditCompany {
|
||||
cechnologyLevel?: string;
|
||||
// 是否小微企业
|
||||
smallEnterprise?: string;
|
||||
// 记录数
|
||||
creditAdministrativeLicense?: number;
|
||||
// 记录数
|
||||
creditBankruptcy?: number;
|
||||
// 记录数
|
||||
creditBranch?: number;
|
||||
// 记录数
|
||||
creditBreachOfTrust?: number;
|
||||
// 记录数
|
||||
creditCaseFiling?: number;
|
||||
// 记录数
|
||||
creditCompetitor?: number;
|
||||
// 记录数
|
||||
creditCourtAnnouncement?: number;
|
||||
// 记录数
|
||||
creditCourtSession?: number;
|
||||
// 记录数
|
||||
creditCustomer?: number;
|
||||
// 记录数
|
||||
creditDeliveryNotice?: number;
|
||||
// 记录数
|
||||
creditExternal?: number;
|
||||
// 记录数
|
||||
creditFinalVersion?: number;
|
||||
// 记录数
|
||||
creditGqdj?: number;
|
||||
// 记录数
|
||||
creditHistoricalLegalPerson?: number;
|
||||
// 记录数
|
||||
creditJudgmentDebtor?: number;
|
||||
// 记录数
|
||||
creditJudicialDocument?: number;
|
||||
// 记录数
|
||||
creditJudiciary?: number;
|
||||
// 记录数
|
||||
creditMediation?: number;
|
||||
// 记录数
|
||||
creditNearbyCompany?: number;
|
||||
// 记录数
|
||||
creditPatent?: number;
|
||||
// 记录数
|
||||
creditRiskRelation?: number;
|
||||
// 记录数
|
||||
creditSupplier?: number;
|
||||
// 记录数
|
||||
creditSuspectedRelationship?: number;
|
||||
// 记录数
|
||||
creditUser?: number;
|
||||
// 记录数
|
||||
creditXgxf?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
@@ -132,6 +182,9 @@ export interface CreditCompany {
|
||||
* 企业搜索条件
|
||||
*/
|
||||
export interface CreditCompanyParam extends PageParam {
|
||||
userId?: number;
|
||||
type?: number;
|
||||
isCustomer?: number;
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCompetitor, CreditCompetitorParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditCompetitor(params: CreditCompetitorParam) {
|
||||
export async function listCreditCompetitor(params?: CreditCompetitorParam) {
|
||||
const res = await request.get<ApiResult<CreditCompetitor[]>>(
|
||||
'/credit/credit-competitor',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface CreditCompetitor {
|
||||
// 序号
|
||||
id?: number;
|
||||
// 企业名称
|
||||
companyName?: string;
|
||||
name?: string;
|
||||
// 法定代表人
|
||||
legalRepresentative?: string;
|
||||
// 注册资本
|
||||
@@ -46,6 +46,8 @@ export interface CreditCompetitor {
|
||||
* 竞争对手搜索条件
|
||||
*/
|
||||
export interface CreditCompetitorParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditCourtAnnouncement,
|
||||
@@ -13,9 +15,7 @@ export async function pageCreditCourtAnnouncement(
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCourtAnnouncement>>>(
|
||||
'/credit/credit-court-announcement/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -31,9 +31,7 @@ export async function listCreditCourtAnnouncement(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditCourtAnnouncement[]>>(
|
||||
'/credit/credit-court-announcement',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -143,3 +141,30 @@ export async function importCreditCourtAnnouncement(
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史开庭公告
|
||||
*/
|
||||
export async function importCreditCourtAnnouncementHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface CreditCourtAnnouncement {
|
||||
* 法院公告司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCourtAnnouncementParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCourtSession, CreditCourtSessionParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditCourtSession(params: CreditCourtSessionParam) {
|
||||
export async function listCreditCourtSession(params?: CreditCourtSessionParam) {
|
||||
const res = await request.get<ApiResult<CreditCourtSession[]>>(
|
||||
'/credit/credit-court-session',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -129,3 +127,30 @@ export async function importCreditCourtSession(file: File, companyId?: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史开庭公告司法大数据
|
||||
*/
|
||||
export async function importCreditCourtSessionHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
@@ -6,28 +6,28 @@ 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;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 数据类型
|
||||
// dataType?: string;
|
||||
// 原告/上诉人
|
||||
// plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
// appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 涉案金额
|
||||
// involvedAmount?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
@@ -52,6 +52,8 @@ export interface CreditCourtSession {
|
||||
* 开庭公告司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCourtSessionParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCustomer, CreditCustomerParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditCustomer(params: CreditCustomerParam) {
|
||||
export async function listCreditCustomer(params?: CreditCustomerParam) {
|
||||
const res = await request.get<ApiResult<CreditCustomer[]>>(
|
||||
'/credit/credit-customer',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -42,6 +42,8 @@ export interface CreditCustomer {
|
||||
* 客户搜索条件
|
||||
*/
|
||||
export interface CreditCustomerParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
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';
|
||||
|
||||
@@ -10,9 +12,7 @@ export async function pageCreditDeliveryNotice(
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditDeliveryNotice>>>(
|
||||
'/credit/credit-delivery-notice/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -28,9 +28,7 @@ export async function listCreditDeliveryNotice(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditDeliveryNotice[]>>(
|
||||
'/credit/credit-delivery-notice',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -136,3 +134,30 @@ export async function importCreditDeliveryNotice(
|
||||
}
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface CreditDeliveryNotice {
|
||||
* 送达公告司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditDeliveryNoticeParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditExternal, CreditExternalParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditExternal(params: CreditExternalParam) {
|
||||
export async function listCreditExternal(params?: CreditExternalParam) {
|
||||
const res = await request.get<ApiResult<CreditExternal[]>>(
|
||||
'/credit/credit-external',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -60,6 +60,8 @@ export interface CreditExternal {
|
||||
* 对外投资搜索条件
|
||||
*/
|
||||
export interface CreditExternalParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditFinalVersion, CreditFinalVersionParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditFinalVersion(params: CreditFinalVersionParam) {
|
||||
export async function listCreditFinalVersion(params?: CreditFinalVersionParam) {
|
||||
const res = await request.get<ApiResult<CreditFinalVersion[]>>(
|
||||
'/credit/credit-final-version',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -129,3 +127,30 @@ export async function importCreditFinalVersion(file: File, companyId?: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史终本案件
|
||||
*/
|
||||
export async function importCreditFinalVersionHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
@@ -6,28 +6,17 @@ 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;
|
||||
// 涉案金额
|
||||
appellee?: string;
|
||||
plaintiffAppellant?: string;
|
||||
unfulfilledAmount?: string;
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
occurrenceTime?: string;
|
||||
finalDate?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
@@ -52,6 +41,8 @@ export interface CreditFinalVersion {
|
||||
* 终本案件搜索条件
|
||||
*/
|
||||
export interface CreditFinalVersionParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditGqdj, CreditGqdjParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditGqdj(params: CreditGqdjParam) {
|
||||
export async function listCreditGqdj(params?: CreditGqdjParam) {
|
||||
const res = await request.get<ApiResult<CreditGqdj[]>>(
|
||||
'/credit/credit-gqdj',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -127,3 +125,27 @@ export async function importCreditGqdj(file: File, companyId?: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史股权冻结
|
||||
*/
|
||||
export async function importCreditGqdjHistory(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/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));
|
||||
}
|
||||
|
||||
@@ -6,28 +6,34 @@ import type { PageParam } from '@/api';
|
||||
export interface CreditGqdj {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
// 执行通知文书号
|
||||
caseNumber?: string;
|
||||
// 被执行人
|
||||
appellee?: string;
|
||||
// 冻结股权标的企业
|
||||
plaintiffAppellant?: string;
|
||||
// 被执行人持有股权、其他投资权益数额
|
||||
involvedAmount?: string;
|
||||
// 执行法院
|
||||
courtName?: string;
|
||||
// 类型
|
||||
dataType?: string;
|
||||
// 状态
|
||||
dataStatus?: string;
|
||||
// 冻结日期自
|
||||
freezeDateStart?: string;
|
||||
// 冻结日期至
|
||||
freezeDateEnd?: string;
|
||||
// 公示日期
|
||||
publicDate?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
@@ -52,6 +58,8 @@ export interface CreditGqdj {
|
||||
* 股权冻结搜索条件
|
||||
*/
|
||||
export interface CreditGqdjParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditHistoricalLegalPerson,
|
||||
@@ -14,7 +16,7 @@ export async function pageCreditHistoricalLegalPerson(
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<CreditHistoricalLegalPerson>>
|
||||
>('/credit/credit-historical-legal-person/page', {
|
||||
params
|
||||
params: withCreditUserScope(params)
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -30,9 +32,7 @@ export async function listCreditHistoricalLegalPerson(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditHistoricalLegalPerson[]>>(
|
||||
'/credit/credit-historical-legal-person',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -40,6 +40,8 @@ export interface CreditHistoricalLegalPerson {
|
||||
* 历史法定代表人搜索条件
|
||||
*/
|
||||
export interface CreditHistoricalLegalPersonParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditJudgmentDebtor, CreditJudgmentDebtorParam } from './model';
|
||||
|
||||
@@ -10,9 +12,7 @@ export async function pageCreditJudgmentDebtor(
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditJudgmentDebtor>>>(
|
||||
'/credit/credit-judgment-debtor/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -28,9 +28,7 @@ export async function listCreditJudgmentDebtor(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditJudgmentDebtor[]>>(
|
||||
'/credit/credit-judgment-debtor',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -136,3 +134,52 @@ export async function importCreditJudgmentDebtor(
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史被执行人
|
||||
*/
|
||||
export async function importCreditJudgmentDebtorHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修正被执行人主体企业归属(按企业名称匹配回填 companyId)
|
||||
*
|
||||
* 后端: POST /api/credit/credit-judgment-debtor/company-id/refresh
|
||||
* - onlyNull: 默认 true,仅更新 companyId 为空的数据
|
||||
* - limit: 可选,限制处理条数
|
||||
*/
|
||||
export async function refreshCreditJudgmentDebtorCompanyId(params?: {
|
||||
onlyNull?: boolean;
|
||||
limit?: number;
|
||||
}) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/company-id/refresh',
|
||||
undefined,
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export interface CreditJudgmentDebtor {
|
||||
id?: number;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 被执行人名称
|
||||
//
|
||||
name?: string;
|
||||
// 证件号/组织机构代码
|
||||
code?: string;
|
||||
@@ -34,6 +34,8 @@ export interface CreditJudgmentDebtor {
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
@@ -42,12 +44,22 @@ export interface CreditJudgmentDebtor {
|
||||
updateTime?: string;
|
||||
// 历史ID
|
||||
historyId?: number;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 被执行人名称
|
||||
name1?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 被执行人搜索条件
|
||||
*/
|
||||
export interface CreditJudgmentDebtorParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditJudgmentDebtorHistory,
|
||||
CreditJudgmentDebtorHistoryParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询被执行人
|
||||
*/
|
||||
export async function pageCreditJudgmentDebtorHistory(
|
||||
params: CreditJudgmentDebtorHistoryParam
|
||||
) {
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<CreditJudgmentDebtorHistory>>
|
||||
>('/credit/credit-judgment-debtor-history/page', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询被执行人列表
|
||||
*/
|
||||
export async function listCreditJudgmentDebtorHistory(
|
||||
params?: CreditJudgmentDebtorHistoryParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditJudgmentDebtorHistory[]>>(
|
||||
'/credit/credit-judgment-debtor-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 addCreditJudgmentDebtorHistory(
|
||||
data: CreditJudgmentDebtorHistory
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor-history',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改被执行人
|
||||
*/
|
||||
export async function updateCreditJudgmentDebtorHistory(
|
||||
data: CreditJudgmentDebtorHistory
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor-history',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除被执行人
|
||||
*/
|
||||
export async function removeCreditJudgmentDebtorHistory(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor-history/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除被执行人
|
||||
*/
|
||||
export async function removeBatchCreditJudgmentDebtorHistory(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor-history/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询被执行人
|
||||
*/
|
||||
export async function getCreditJudgmentDebtorHistory(id: number) {
|
||||
const res = await request.get<ApiResult<CreditJudgmentDebtorHistory>>(
|
||||
'/credit/credit-judgment-debtor-history/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史被执行人
|
||||
*/
|
||||
export async function importCreditJudgmentDebtorHistory(
|
||||
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-history/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));
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 被执行人
|
||||
*/
|
||||
export interface CreditJudgmentDebtorHistory {
|
||||
// ID
|
||||
id?: number;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 被执行人名称
|
||||
name?: string;
|
||||
// 被执行人
|
||||
name1?: string;
|
||||
// 证件号/组织机构代码
|
||||
code?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 是否多企业
|
||||
type?: number;
|
||||
// 立案日期
|
||||
occurrenceTime?: string;
|
||||
// 执行标的(元)
|
||||
amount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 备注
|
||||
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 CreditJudgmentDebtorHistoryParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditJudicialDocument,
|
||||
@@ -13,9 +15,7 @@ export async function pageCreditJudicialDocument(
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditJudicialDocument>>>(
|
||||
'/credit/credit-judicial-document/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -31,9 +31,7 @@ export async function listCreditJudicialDocument(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditJudicialDocument[]>>(
|
||||
'/credit/credit-judicial-document',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -141,3 +139,30 @@ export async function importCreditJudicialDocument(
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史裁判文书
|
||||
*/
|
||||
export async function importCreditJudicialDocumentHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ import type { PageParam } from '@/api';
|
||||
export interface CreditJudicialDocument {
|
||||
// ID
|
||||
id?: number;
|
||||
// 文书标题
|
||||
title?: string;
|
||||
// 文书类型
|
||||
documentType?: string;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
@@ -18,6 +22,8 @@ export interface CreditJudicialDocument {
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 发布日期
|
||||
releaseDate?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
@@ -54,6 +60,8 @@ export interface CreditJudicialDocument {
|
||||
* 裁判文书司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditJudicialDocumentParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditJudiciary, CreditJudiciaryParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditJudiciary(params: CreditJudiciaryParam) {
|
||||
export async function listCreditJudiciary(params?: CreditJudiciaryParam) {
|
||||
const res = await request.get<ApiResult<CreditJudiciary[]>>(
|
||||
'/credit/credit-judiciary',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -66,6 +66,8 @@ export interface CreditJudiciary {
|
||||
* 司法案件搜索条件
|
||||
*/
|
||||
export interface CreditJudiciaryParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditMediation, CreditMediationParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditMediation(params: CreditMediationParam) {
|
||||
export async function listCreditMediation(params?: CreditMediationParam) {
|
||||
const res = await request.get<ApiResult<CreditMediation[]>>(
|
||||
'/credit/credit-mediation',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -127,3 +125,30 @@ export async function importCreditMediation(file: File, companyId?: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史诉前调解司法大数据
|
||||
*/
|
||||
export async function importCreditMediationHistory(
|
||||
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/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));
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface CreditMediation {
|
||||
* 诉前调解司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditMediationParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
105
src/api/credit/creditMpCustomer/index.ts
Normal file
105
src/api/credit/creditMpCustomer/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditMpCustomer, CreditMpCustomerParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询小程序端客户
|
||||
*/
|
||||
export async function pageCreditMpCustomer(params: CreditMpCustomerParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditMpCustomer>>>(
|
||||
'/credit/credit-mp-customer/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询小程序端客户列表
|
||||
*/
|
||||
export async function listCreditMpCustomer(params?: CreditMpCustomerParam) {
|
||||
const res = await request.get<ApiResult<CreditMpCustomer[]>>(
|
||||
'/credit/credit-mp-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 addCreditMpCustomer(data: CreditMpCustomer) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-mp-customer',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改小程序端客户
|
||||
*/
|
||||
export async function updateCreditMpCustomer(data: CreditMpCustomer) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-mp-customer',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小程序端客户
|
||||
*/
|
||||
export async function removeCreditMpCustomer(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-mp-customer/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除小程序端客户
|
||||
*/
|
||||
export async function removeBatchCreditMpCustomer(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-mp-customer/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询小程序端客户
|
||||
*/
|
||||
export async function getCreditMpCustomer(id: number) {
|
||||
const res = await request.get<ApiResult<CreditMpCustomer>>(
|
||||
'/credit/credit-mp-customer/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
66
src/api/credit/creditMpCustomer/model/index.ts
Normal file
66
src/api/credit/creditMpCustomer/model/index.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 小程序端客户
|
||||
*/
|
||||
export interface CreditMpCustomer {
|
||||
// ID
|
||||
id?: number;
|
||||
// 拖欠方
|
||||
toUser?: string;
|
||||
// 拖欠金额
|
||||
price?: string;
|
||||
// 拖欠年数
|
||||
years?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 状态
|
||||
statusTxt?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 文件路径
|
||||
files?: string;
|
||||
// 步骤, 0未受理1已受理2材料提交3合同签订4执行回款5完结
|
||||
step?: number;
|
||||
// 是否有数据
|
||||
hasData?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 昵称
|
||||
nickname?: string;
|
||||
// 头像
|
||||
avatar?: string;
|
||||
// 手机号
|
||||
phone?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序端客户搜索条件
|
||||
*/
|
||||
export interface CreditMpCustomerParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
step?: number;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditNearbyCompany, CreditNearbyCompanyParam } from './model';
|
||||
|
||||
@@ -10,9 +12,7 @@ export async function pageCreditNearbyCompany(
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditNearbyCompany>>>(
|
||||
'/credit/credit-nearby-company/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -28,9 +28,7 @@ export async function listCreditNearbyCompany(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditNearbyCompany[]>>(
|
||||
'/credit/credit-nearby-company',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -117,11 +115,7 @@ export async function importCreditNearbyCompany(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const formData = buildImportFormData(file, companyId);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-company/import',
|
||||
formData,
|
||||
@@ -136,3 +130,104 @@ export async function importCreditNearbyCompany(
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入附近企业(多文件,同一次请求)
|
||||
*
|
||||
* 约定:后端需支持 multipart 同名字段 `file` 多次出现(常见于 MultipartFile[] file)
|
||||
*/
|
||||
export async function importCreditNearbyCompanyMulti(
|
||||
files: File[] | FileList,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = buildImportFormData(files, companyId);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-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));
|
||||
}
|
||||
|
||||
function buildImportFormData(
|
||||
fileOrFiles: File | File[] | FileList,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
if (Array.isArray(fileOrFiles)) {
|
||||
fileOrFiles.forEach((f) => formData.append('file', f));
|
||||
} else if (fileOrFiles instanceof FileList) {
|
||||
Array.from(fileOrFiles).forEach((f) => formData.append('file', f));
|
||||
} else {
|
||||
formData.append('file', fileOrFiles);
|
||||
}
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
return formData;
|
||||
}
|
||||
|
||||
export interface ImportBatchCreditNearbyCompanyItem {
|
||||
fileName: string;
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ImportBatchCreditNearbyCompanyResult {
|
||||
total: number;
|
||||
success: number;
|
||||
failure: number;
|
||||
items: ImportBatchCreditNearbyCompanyItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入附近企业(多文件)
|
||||
*
|
||||
* 说明:
|
||||
* - 目前复用单文件导入接口,前端循环调用实现“多文件导入”
|
||||
* - 不会在有失败时 reject(便于上层展示部分成功/失败明细)
|
||||
*/
|
||||
export async function importBatchCreditNearbyCompany(
|
||||
files: File[] | FileList,
|
||||
companyId?: number,
|
||||
options?: {
|
||||
/** 遇到失败是否立即停止,默认 false(继续导入后续文件) */
|
||||
stopOnError?: boolean;
|
||||
}
|
||||
): Promise<ImportBatchCreditNearbyCompanyResult> {
|
||||
const list = Array.isArray(files) ? files : Array.from(files);
|
||||
const items: ImportBatchCreditNearbyCompanyItem[] = [];
|
||||
const stopOnError = options?.stopOnError ?? false;
|
||||
|
||||
for (const file of list) {
|
||||
try {
|
||||
const msg = await importCreditNearbyCompany(file, companyId);
|
||||
items.push({ fileName: file.name, success: true, message: msg });
|
||||
} catch (e: unknown) {
|
||||
items.push({
|
||||
fileName: file.name,
|
||||
success: false,
|
||||
message: e instanceof Error ? e.message : String(e)
|
||||
});
|
||||
if (stopOnError) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const success = items.filter((d) => d.success).length;
|
||||
const failure = items.length - success;
|
||||
return {
|
||||
total: list.length,
|
||||
success,
|
||||
failure,
|
||||
items
|
||||
};
|
||||
}
|
||||
|
||||
@@ -136,6 +136,8 @@ export interface CreditNearbyCompany {
|
||||
* 附近企业搜索条件
|
||||
*/
|
||||
export interface CreditNearbyCompanyParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditPatent, CreditPatentParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditPatent(params: CreditPatentParam) {
|
||||
export async function listCreditPatent(params?: CreditPatentParam) {
|
||||
const res = await request.get<ApiResult<CreditPatent[]>>(
|
||||
'/credit/credit-patent',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface CreditPatent {
|
||||
* 专利搜索条件
|
||||
*/
|
||||
export interface CreditPatentParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditProject, CreditProjectParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditProject(params: CreditProjectParam) {
|
||||
export async function listCreditProject(params?: CreditProjectParam) {
|
||||
const res = await request.get<ApiResult<CreditProject[]>>(
|
||||
'/credit/credit-project',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -64,6 +64,8 @@ export interface CreditProject {
|
||||
* 招投标搜索条件
|
||||
*/
|
||||
export interface CreditProjectParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditRiskRelation, CreditRiskRelationParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditRiskRelation(params: CreditRiskRelationParam) {
|
||||
export async function listCreditRiskRelation(params?: CreditRiskRelationParam) {
|
||||
const res = await request.get<ApiResult<CreditRiskRelation[]>>(
|
||||
'/credit/credit-risk-relation',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -44,6 +44,8 @@ export interface CreditRiskRelation {
|
||||
* 风险关系表搜索条件
|
||||
*/
|
||||
export interface CreditRiskRelationParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditSupplier, CreditSupplierParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditSupplier(params: CreditSupplierParam) {
|
||||
export async function listCreditSupplier(params?: CreditSupplierParam) {
|
||||
const res = await request.get<ApiResult<CreditSupplier[]>>(
|
||||
'/credit/credit-supplier',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -42,6 +42,8 @@ export interface CreditSupplier {
|
||||
* 供应商搜索条件
|
||||
*/
|
||||
export interface CreditSupplierParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditSuspectedRelationship,
|
||||
@@ -14,7 +16,7 @@ export async function pageCreditSuspectedRelationship(
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<CreditSuspectedRelationship>>
|
||||
>('/credit/credit-suspected-relationship/page', {
|
||||
params
|
||||
params: withCreditUserScope(params)
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -30,9 +32,7 @@ export async function listCreditSuspectedRelationship(
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditSuspectedRelationship[]>>(
|
||||
'/credit/credit-suspected-relationship',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -50,6 +50,8 @@ export interface CreditSuspectedRelationship {
|
||||
* 疑似关系搜索条件
|
||||
*/
|
||||
export interface CreditSuspectedRelationshipParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditUser, CreditUserParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ import type { CreditUser, CreditUserParam } from './model';
|
||||
export async function pageCreditUser(params: CreditUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditUser>>>(
|
||||
'/credit/credit-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditUser(params: CreditUserParam) {
|
||||
export async function listCreditUser(params?: CreditUserParam) {
|
||||
const res = await request.get<ApiResult<CreditUser[]>>(
|
||||
'/credit/credit-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -64,6 +64,8 @@ export interface CreditUser {
|
||||
* 招投标信息表搜索条件
|
||||
*/
|
||||
export interface CreditUserParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditXgxf, CreditXgxfParam } from './model';
|
||||
|
||||
@@ -8,9 +10,7 @@ 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
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
@@ -24,9 +24,7 @@ export async function pageCreditXgxf(params: CreditXgxfParam) {
|
||||
export async function listCreditXgxf(params?: CreditXgxfParam) {
|
||||
const res = await request.get<ApiResult<CreditXgxf[]>>(
|
||||
'/credit/credit-xgxf',
|
||||
{
|
||||
params
|
||||
}
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -127,3 +125,27 @@ export async function importCreditXgxf(file: File, companyId?: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史限制高消费
|
||||
*/
|
||||
export async function importCreditXgxfHistory(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/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));
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface CreditXgxf {
|
||||
* 限制高消费搜索条件
|
||||
*/
|
||||
export interface CreditXgxfParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
49
src/api/credit/utils/data-scope.ts
Normal file
49
src/api/credit/utils/data-scope.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { hasRole } from '@/utils/permission';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
|
||||
function isSuperAdmin(): boolean {
|
||||
try {
|
||||
return hasRole('superAdmin');
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrentUserId(): number | undefined {
|
||||
try {
|
||||
const store = useUserStore();
|
||||
const id = store?.info?.userId;
|
||||
if (typeof id === 'number' && Number.isFinite(id) && id > 0) {
|
||||
return id;
|
||||
}
|
||||
} catch {
|
||||
// Pinia may not be active in some early-init code paths.
|
||||
}
|
||||
const raw = localStorage.getItem('UserId');
|
||||
if (!raw) {
|
||||
return undefined;
|
||||
}
|
||||
const n = Number(raw);
|
||||
return Number.isFinite(n) && n > 0 ? n : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Credit module data scope:
|
||||
* - superAdmin: see all data
|
||||
* - others: only see data published by themselves (userId)
|
||||
*/
|
||||
export function withCreditUserScope<T extends Record<string, any> | undefined>(
|
||||
params: T
|
||||
): T {
|
||||
if (isSuperAdmin()) {
|
||||
return params;
|
||||
}
|
||||
const userId = getCurrentUserId();
|
||||
if (!userId) {
|
||||
return params;
|
||||
}
|
||||
if (!params) {
|
||||
return { userId } as T;
|
||||
}
|
||||
return { ...(params as any), userId } as T;
|
||||
}
|
||||
105
src/api/shop/shopCommunity/index.ts
Normal file
105
src/api/shop/shopCommunity/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopCommunity, ShopCommunityParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询小区
|
||||
*/
|
||||
export async function pageShopCommunity(params: ShopCommunityParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopCommunity>>>(
|
||||
'/shop/shop-community/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询小区列表
|
||||
*/
|
||||
export async function listShopCommunity(params?: ShopCommunityParam) {
|
||||
const res = await request.get<ApiResult<ShopCommunity[]>>(
|
||||
'/shop/shop-community',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加小区
|
||||
*/
|
||||
export async function addShopCommunity(data: ShopCommunity) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-community',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改小区
|
||||
*/
|
||||
export async function updateShopCommunity(data: ShopCommunity) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-community',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小区
|
||||
*/
|
||||
export async function removeShopCommunity(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-community/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除小区
|
||||
*/
|
||||
export async function removeBatchShopCommunity(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-community/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询小区
|
||||
*/
|
||||
export async function getShopCommunity(id: number) {
|
||||
const res = await request.get<ApiResult<ShopCommunity>>(
|
||||
'/shop/shop-community/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
src/api/shop/shopCommunity/model/index.ts
Normal file
35
src/api/shop/shopCommunity/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 小区
|
||||
*/
|
||||
export interface ShopCommunity {
|
||||
// ID
|
||||
id?: number;
|
||||
// 小区名称
|
||||
name?: string;
|
||||
// 小区编号
|
||||
code?: string;
|
||||
// 详细地址
|
||||
address?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 小区搜索条件
|
||||
*/
|
||||
export interface ShopCommunityParam extends PageParam {
|
||||
id?: number;
|
||||
name?: string;
|
||||
code?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -8,6 +8,8 @@ export interface ShopDealerCapital {
|
||||
id?: number;
|
||||
// 分销商用户ID
|
||||
userId?: number;
|
||||
// 分销商昵称
|
||||
nickName?: string;
|
||||
// 订单ID
|
||||
orderId?: number;
|
||||
// 订单编号
|
||||
|
||||
@@ -12,6 +12,8 @@ export interface ShopDealerOrder {
|
||||
title?: string;
|
||||
// 买家用户昵称
|
||||
nickname?: string;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 订单总金额(不含运费)
|
||||
@@ -52,6 +54,10 @@ export interface ShopDealerOrder {
|
||||
isSettled?: number;
|
||||
// 结算时间
|
||||
settleTime?: number;
|
||||
// 是否解冻(0否 1是)
|
||||
isUnfreeze?: number;
|
||||
// 解冻时间
|
||||
unfreezeTime?: number;
|
||||
// 订单备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
|
||||
@@ -6,8 +6,16 @@ import type { PageParam } from '@/api';
|
||||
export interface ShopDealerUser {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 类型 0经销商 1企业 2集团
|
||||
type?: number;
|
||||
// 自增ID
|
||||
userId?: number;
|
||||
// 头像
|
||||
avatar?: string;
|
||||
// 店铺名称
|
||||
dealerName?: string;
|
||||
// 小区名称
|
||||
community?: string;
|
||||
// 姓名
|
||||
realName?: string;
|
||||
// 手机号
|
||||
@@ -34,6 +42,8 @@ export interface ShopDealerUser {
|
||||
thirdNum?: number;
|
||||
// 专属二维码
|
||||
qrcode?: string;
|
||||
// 配送员所属门店
|
||||
shopName?: string;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
@@ -56,5 +66,7 @@ export interface ShopDealerUser {
|
||||
*/
|
||||
export interface ShopDealerUserParam extends PageParam {
|
||||
id?: number;
|
||||
realName?: string;
|
||||
mobile?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ export interface ShopGoods {
|
||||
supplierMerchantId?: number;
|
||||
supplierName?: string;
|
||||
// 状态(0:未上架,1:上架)
|
||||
isShow?: number;
|
||||
isShow?: boolean;
|
||||
// 状态, 0上架 1待上架 2待审核 3审核不通过
|
||||
status?: number;
|
||||
// 备注
|
||||
@@ -124,6 +124,21 @@ export interface ShopGoods {
|
||||
canUseDate?: string;
|
||||
ensureTag?: string;
|
||||
expiredDay?: number;
|
||||
|
||||
// --- 分销/佣金(新字段,后端保持 snake_case)---
|
||||
// 是否开启分销佣金:0关闭 1开启
|
||||
isOpenCommission?: number;
|
||||
// 分佣类型:10固定金额 20百分比
|
||||
commissionType?: number;
|
||||
// 一级/二级/三级分销佣金(单位以服务端为准)
|
||||
firstMoney?: number;
|
||||
secondMoney?: number;
|
||||
thirdMoney?: number;
|
||||
// 一级/二级分红(单位以服务端为准)
|
||||
firstDividend?: number;
|
||||
secondDividend?: number;
|
||||
// 配送奖金
|
||||
deliveryMoney?: number;
|
||||
}
|
||||
|
||||
export interface BathSet {
|
||||
|
||||
@@ -135,3 +135,18 @@ export async function shopOrderTotal(params?: ShopOrderParam) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 申请|同意退款
|
||||
*/
|
||||
export async function refundShopOrder(data: ShopOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-order/refund',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ export interface ShopOrder {
|
||||
icCard?: string;
|
||||
// 头像
|
||||
avatar?: string;
|
||||
// 昵称(部分接口会返回)
|
||||
nickname?: string;
|
||||
// 兼容字段:部分接口可能返回 name
|
||||
name?: string;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 手机号码
|
||||
@@ -99,6 +103,8 @@ export interface ShopOrder {
|
||||
expressId?: number;
|
||||
// 快递公司名称
|
||||
expressName?: string;
|
||||
// 物流单号
|
||||
expressNo?: string;
|
||||
// 发货人
|
||||
sendName?: string;
|
||||
// 发货人联系方式
|
||||
|
||||
105
src/api/shop/shopStore/index.ts
Normal file
105
src/api/shop/shopStore/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopStore, ShopStoreParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询门店
|
||||
*/
|
||||
export async function pageShopStore(params: ShopStoreParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopStore>>>(
|
||||
'/shop/shop-store/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询门店列表
|
||||
*/
|
||||
export async function listShopStore(params?: ShopStoreParam) {
|
||||
const res = await request.get<ApiResult<ShopStore[]>>(
|
||||
'/shop/shop-store',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加门店
|
||||
*/
|
||||
export async function addShopStore(data: ShopStore) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-store',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改门店
|
||||
*/
|
||||
export async function updateShopStore(data: ShopStore) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-store',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除门店
|
||||
*/
|
||||
export async function removeShopStore(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除门店
|
||||
*/
|
||||
export async function removeBatchShopStore(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询门店
|
||||
*/
|
||||
export async function getShopStore(id: number) {
|
||||
const res = await request.get<ApiResult<ShopStore>>(
|
||||
'/shop/shop-store/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/shop/shopStore/model/index.ts
Normal file
59
src/api/shop/shopStore/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 门店
|
||||
*/
|
||||
export interface ShopStore {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 店铺名称
|
||||
name?: string;
|
||||
// 门店地址
|
||||
address?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 邮箱
|
||||
email?: string;
|
||||
// 门店经理
|
||||
managerName?: string;
|
||||
// 门店banner
|
||||
shopBanner?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 经度和纬度
|
||||
lngAndLat?: string;
|
||||
// 位置
|
||||
location?:string;
|
||||
// 区域
|
||||
district?: string;
|
||||
// 轮廓
|
||||
points?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店搜索条件
|
||||
*/
|
||||
export interface ShopStoreParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
src/api/shop/shopStoreFence/index.ts
Normal file
105
src/api/shop/shopStoreFence/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopStoreFence, ShopStoreFenceParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询黄家明_电子围栏
|
||||
*/
|
||||
export async function pageShopStoreFence(params: ShopStoreFenceParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopStoreFence>>>(
|
||||
'/shop/shop-store-fence/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询黄家明_电子围栏列表
|
||||
*/
|
||||
export async function listShopStoreFence(params?: ShopStoreFenceParam) {
|
||||
const res = await request.get<ApiResult<ShopStoreFence[]>>(
|
||||
'/shop/shop-store-fence',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加黄家明_电子围栏
|
||||
*/
|
||||
export async function addShopStoreFence(data: ShopStoreFence) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-store-fence',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改黄家明_电子围栏
|
||||
*/
|
||||
export async function updateShopStoreFence(data: ShopStoreFence) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-store-fence',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除黄家明_电子围栏
|
||||
*/
|
||||
export async function removeShopStoreFence(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-fence/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除黄家明_电子围栏
|
||||
*/
|
||||
export async function removeBatchShopStoreFence(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-fence/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询黄家明_电子围栏
|
||||
*/
|
||||
export async function getShopStoreFence(id: number) {
|
||||
const res = await request.get<ApiResult<ShopStoreFence>>(
|
||||
'/shop/shop-store-fence/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
43
src/api/shop/shopStoreFence/model/index.ts
Normal file
43
src/api/shop/shopStoreFence/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 黄家明_电子围栏
|
||||
*/
|
||||
export interface ShopStoreFence {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 围栏名称
|
||||
name?: string;
|
||||
// 类型 0圆形 1方形
|
||||
type?: number;
|
||||
// 定位
|
||||
location?: string;
|
||||
// 经度
|
||||
longitude?: string;
|
||||
// 纬度
|
||||
latitude?: string;
|
||||
// 区域
|
||||
district?: string;
|
||||
// 电子围栏轮廓
|
||||
points?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 黄家明_电子围栏搜索条件
|
||||
*/
|
||||
export interface ShopStoreFenceParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
src/api/shop/shopStoreRider/index.ts
Normal file
105
src/api/shop/shopStoreRider/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopStoreRider, ShopStoreRiderParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询配送员
|
||||
*/
|
||||
export async function pageShopStoreRider(params: ShopStoreRiderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopStoreRider>>>(
|
||||
'/shop/shop-store-rider/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配送员列表
|
||||
*/
|
||||
export async function listShopStoreRider(params?: ShopStoreRiderParam) {
|
||||
const res = await request.get<ApiResult<ShopStoreRider[]>>(
|
||||
'/shop/shop-store-rider',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加配送员
|
||||
*/
|
||||
export async function addShopStoreRider(data: ShopStoreRider) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-store-rider',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配送员
|
||||
*/
|
||||
export async function updateShopStoreRider(data: ShopStoreRider) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-store-rider',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配送员
|
||||
*/
|
||||
export async function removeShopStoreRider(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-rider/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配送员
|
||||
*/
|
||||
export async function removeBatchShopStoreRider(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-rider/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询配送员
|
||||
*/
|
||||
export async function getShopStoreRider(id: number) {
|
||||
const res = await request.get<ApiResult<ShopStoreRider>>(
|
||||
'/shop/shop-store-rider/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
65
src/api/shop/shopStoreRider/model/index.ts
Normal file
65
src/api/shop/shopStoreRider/model/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 配送员
|
||||
*/
|
||||
export interface ShopStoreRider {
|
||||
// 主键ID
|
||||
id?: string;
|
||||
// 门店ID(shop_store.id)
|
||||
storeId?: number;
|
||||
// 门店名称(后端联表返回,提交时可不传)
|
||||
storeName?: string;
|
||||
// 配送点ID(shop_dealer.id)
|
||||
dealerId?: number;
|
||||
// 骑手编号(可选)
|
||||
riderNo?: string;
|
||||
// 姓名
|
||||
realName?: string;
|
||||
// 手机号
|
||||
mobile?: string;
|
||||
// 头像
|
||||
avatar?: string;
|
||||
// 身份证号(可选)
|
||||
idCardNo?: string;
|
||||
// 状态:1启用;0禁用
|
||||
status?: number;
|
||||
// 接单状态:0休息/下线;1在线;2忙碌
|
||||
workStatus?: number;
|
||||
// 是否开启自动派单:1是;0否
|
||||
autoDispatchEnabled?: number;
|
||||
// 派单优先级(同小区多骑手时可用,值越大越优先)
|
||||
dispatchPriority?: number;
|
||||
// 最大同时配送单数(0表示不限制)
|
||||
maxOnhandOrders?: number;
|
||||
// 是否计算工资(提成):1计算;0不计算(如三方配送点可设0)
|
||||
commissionCalcEnabled?: number;
|
||||
// 水每桶提成金额(元/桶)
|
||||
waterBucketUnitFee?: string;
|
||||
// 其他商品提成方式:1按订单固定金额;2按订单金额比例;3按商品规则(另表)
|
||||
otherGoodsCommissionType?: number;
|
||||
// 其他商品提成值:固定金额(元)或比例(%)
|
||||
otherGoodsCommissionValue?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配送员搜索条件
|
||||
*/
|
||||
export interface ShopStoreRiderParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
src/api/shop/shopStoreUser/index.ts
Normal file
105
src/api/shop/shopStoreUser/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopStoreUser, ShopStoreUserParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询店员
|
||||
*/
|
||||
export async function pageShopStoreUser(params: ShopStoreUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopStoreUser>>>(
|
||||
'/shop/shop-store-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
export async function listShopStoreUser(params?: ShopStoreUserParam) {
|
||||
const res = await request.get<ApiResult<ShopStoreUser[]>>(
|
||||
'/shop/shop-store-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 addShopStoreUser(data: ShopStoreUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-store-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员
|
||||
*/
|
||||
export async function updateShopStoreUser(data: ShopStoreUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-store-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员
|
||||
*/
|
||||
export async function removeShopStoreUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员
|
||||
*/
|
||||
export async function removeBatchShopStoreUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询店员
|
||||
*/
|
||||
export async function getShopStoreUser(id: number) {
|
||||
const res = await request.get<ApiResult<ShopStoreUser>>(
|
||||
'/shop/shop-store-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
33
src/api/shop/shopStoreUser/model/index.ts
Normal file
33
src/api/shop/shopStoreUser/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 店员
|
||||
*/
|
||||
export interface ShopStoreUser {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 配送点ID(shop_dealer.id)
|
||||
storeId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员搜索条件
|
||||
*/
|
||||
export interface ShopStoreUserParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
src/api/shop/shopStoreWarehouse/index.ts
Normal file
105
src/api/shop/shopStoreWarehouse/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopStoreWarehouse, ShopStoreWarehouseParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询仓库
|
||||
*/
|
||||
export async function pageShopStoreWarehouse(params: ShopStoreWarehouseParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopStoreWarehouse>>>(
|
||||
'/shop/shop-store-warehouse/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询仓库列表
|
||||
*/
|
||||
export async function listShopStoreWarehouse(params?: ShopStoreWarehouseParam) {
|
||||
const res = await request.get<ApiResult<ShopStoreWarehouse[]>>(
|
||||
'/shop/shop-store-warehouse',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加仓库
|
||||
*/
|
||||
export async function addShopStoreWarehouse(data: ShopStoreWarehouse) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-store-warehouse',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仓库
|
||||
*/
|
||||
export async function updateShopStoreWarehouse(data: ShopStoreWarehouse) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-store-warehouse',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仓库
|
||||
*/
|
||||
export async function removeShopStoreWarehouse(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-warehouse/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除仓库
|
||||
*/
|
||||
export async function removeBatchShopStoreWarehouse(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-store-warehouse/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询仓库
|
||||
*/
|
||||
export async function getShopStoreWarehouse(id: number) {
|
||||
const res = await request.get<ApiResult<ShopStoreWarehouse>>(
|
||||
'/shop/shop-store-warehouse/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
51
src/api/shop/shopStoreWarehouse/model/index.ts
Normal file
51
src/api/shop/shopStoreWarehouse/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 仓库
|
||||
*/
|
||||
export interface ShopStoreWarehouse {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 仓库名称
|
||||
name?: string;
|
||||
// 唯一标识
|
||||
code?: string;
|
||||
// 类型 中心仓,区域仓,门店仓
|
||||
type?: string;
|
||||
// 仓库地址
|
||||
address?: string;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 联系电话
|
||||
phone?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 经纬度
|
||||
lngAndLat?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 仓库搜索条件
|
||||
*/
|
||||
export interface ShopStoreWarehouseParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
126
src/components/SelectCommunity/components/select-data.vue
Normal file
126
src/components/SelectCommunity/components/select-data.vue
Normal file
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<ele-modal
|
||||
:width="750"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
:title="title"
|
||||
:footer="null"
|
||||
:body-style="{ paddingBottom: '28px' }"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<ele-pro-table
|
||||
ref="tableRef"
|
||||
row-key="userId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #toolbar>
|
||||
<a-space>
|
||||
<a-input-search
|
||||
allow-clear
|
||||
v-model:value="where.keywords"
|
||||
placeholder="请输入搜索关键词"
|
||||
style="width: 200px"
|
||||
@search="reload"
|
||||
@pressEnter="reload"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'roles'">
|
||||
<a-tag v-for="(item, index) in record.roles" :key="index">{{
|
||||
item.roleName
|
||||
}}</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a-button type="primary" @click="done(record)">选择</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import {
|
||||
ColumnItem,
|
||||
DatasourceFunction
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import useSearch from '@/utils/use-search';
|
||||
import { pageShopCommunity } from "@/api/shop/shopCommunity";
|
||||
import { ShopDealerUser } from "@/api/shop/shopDealerUser/model";
|
||||
import {ShopCommunityParam} from "@/api/shop/shopCommunity/model";
|
||||
|
||||
defineProps<{
|
||||
// 弹窗是否打开
|
||||
visible: boolean;
|
||||
title?: string;
|
||||
// 修改回显的数据
|
||||
data?: ShopDealerUser | null;
|
||||
type?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done', data: ShopDealerUser): void;
|
||||
(e: 'update:visible', visible: boolean): void;
|
||||
}>();
|
||||
|
||||
/* 更新visible */
|
||||
const updateVisible = (value: boolean) => {
|
||||
emit('update:visible', value);
|
||||
};
|
||||
|
||||
// 表单数据
|
||||
const { where } = useSearch<ShopCommunityParam>({
|
||||
userId: undefined,
|
||||
name: undefined,
|
||||
keywords: ''
|
||||
});
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
|
||||
// 表格配置
|
||||
const columns = ref<ColumnItem[]>([
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'id'
|
||||
},
|
||||
{
|
||||
title: '小区名称',
|
||||
dataIndex: 'name'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
}
|
||||
]);
|
||||
|
||||
// 表格数据源
|
||||
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
|
||||
where.type = 1;
|
||||
return pageShopCommunity({
|
||||
...where,
|
||||
...orders,
|
||||
page,
|
||||
limit
|
||||
});
|
||||
};
|
||||
|
||||
/* 搜索 */
|
||||
const reload = () => {
|
||||
tableRef?.value?.reload({ page: 1, where });
|
||||
};
|
||||
|
||||
const done = (record: ShopDealerUser) => {
|
||||
updateVisible(false);
|
||||
emit('done', record);
|
||||
};
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
71
src/components/SelectCommunity/index.vue
Normal file
71
src/components/SelectCommunity/index.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-input-group compact>
|
||||
<a-input
|
||||
disabled
|
||||
style="width: calc(100% - 32px)"
|
||||
v-model:value="content"
|
||||
:placeholder="placeholder"
|
||||
/>
|
||||
<a-button @click="openEdit">
|
||||
<template #icon><BulbOutlined class="ele-text-warning" /></template>
|
||||
</a-button>
|
||||
</a-input-group>
|
||||
<!-- 选择弹窗 -->
|
||||
<select-data
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
:title="placeholder"
|
||||
:type="type"
|
||||
@done="onChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||
import { ref } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import { User } from '@/api/system/user/model';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
value?: any;
|
||||
placeholder?: string;
|
||||
index?: number;
|
||||
type?: string;
|
||||
}>(),
|
||||
{
|
||||
placeholder: '请选择'
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done', User): void;
|
||||
(e: 'clear'): void;
|
||||
}>();
|
||||
|
||||
// 是否显示编辑弹窗
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<User | null>(null);
|
||||
const content = ref<any>();
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: User) => {
|
||||
current.value = row ?? null;
|
||||
showEdit.value = true;
|
||||
};
|
||||
|
||||
const onChange = (row) => {
|
||||
console.log(row,'sdfsd111')
|
||||
row.index = Number(props.index);
|
||||
emit('done', row);
|
||||
};
|
||||
|
||||
if (props.value) {
|
||||
content.value = props.value;
|
||||
}
|
||||
// 查询租户列表
|
||||
// const appList = ref<App[] | undefined>([]);
|
||||
</script>
|
||||
@@ -34,9 +34,9 @@
|
||||
</a-button>
|
||||
</a-upload>
|
||||
<a-upload
|
||||
v-else
|
||||
v-else-if="type == 'image'"
|
||||
:show-upload-list="false"
|
||||
:accept="'image/*,application/*'"
|
||||
:accept="'image/*'"
|
||||
:customRequest="onUpload"
|
||||
>
|
||||
<a-button type="primary" class="ele-btn-icon">
|
||||
@@ -46,6 +46,19 @@
|
||||
<span>上传图片</span>
|
||||
</a-button>
|
||||
</a-upload>
|
||||
<a-upload
|
||||
v-else
|
||||
:show-upload-list="false"
|
||||
:accept="'image/*,application/*,text/*'"
|
||||
:customRequest="onUpload"
|
||||
>
|
||||
<a-button type="primary" class="ele-btn-icon">
|
||||
<template #icon>
|
||||
<UploadOutlined />
|
||||
</template>
|
||||
<span>上传文件</span>
|
||||
</a-button>
|
||||
</a-upload>
|
||||
<a-select
|
||||
show-search
|
||||
allow-clear
|
||||
@@ -274,16 +287,36 @@
|
||||
// 上传文件
|
||||
const onUpload = (item) => {
|
||||
const { file } = item;
|
||||
if (!file.type.startsWith('image') && props.type != 'video') {
|
||||
message.error('只能选择图片');
|
||||
if (props.type == 'video') {
|
||||
if (!file.type.startsWith('video')) {
|
||||
message.error('只能选择视频');
|
||||
return;
|
||||
}
|
||||
if (props.type == 'video') {
|
||||
if (file.size / 1024 / 1024 > 100) {
|
||||
message.error('大小不能超过 100MB');
|
||||
return;
|
||||
}
|
||||
} else if (props.type == 'image') {
|
||||
if (!file.type.startsWith('image')) {
|
||||
message.error('只能选择图片');
|
||||
return;
|
||||
}
|
||||
if (file.size / 1024 / 1024 > 10) {
|
||||
message.error('大小不能超过 10MB');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// 默认:允许图片/文档等附件
|
||||
const isAllowed =
|
||||
file.type.startsWith('image') ||
|
||||
file.type.startsWith('application') ||
|
||||
file.type.startsWith('text') ||
|
||||
file.type === 'application/octet-stream' ||
|
||||
file.type === '';
|
||||
if (!isAllowed) {
|
||||
message.error('只能选择图片或文件');
|
||||
return;
|
||||
}
|
||||
if (file.size / 1024 / 1024 > 10) {
|
||||
message.error('大小不能超过 10MB');
|
||||
return;
|
||||
|
||||
@@ -16,7 +16,16 @@
|
||||
</a>
|
||||
</div>
|
||||
<div v-else class="image-upload-item">
|
||||
<YoutubeOutlined />
|
||||
<a
|
||||
class="file-item"
|
||||
:href="stripOssImageProcess(item.url)"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
:style="{ width: width + 'px', height: height + 'px' }"
|
||||
>
|
||||
<FileOutlined />
|
||||
<span class="file-name">{{ item.name || guessNameFromUrl(item.url) }}</span>
|
||||
</a>
|
||||
<a class="image-upload-close" @click="onDeleteItem(index)">
|
||||
<CloseOutlined />
|
||||
</a>
|
||||
@@ -47,12 +56,12 @@
|
||||
import {
|
||||
PlusOutlined,
|
||||
CloseOutlined,
|
||||
YoutubeOutlined
|
||||
FileOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import { ref } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import { FileRecord } from '@/api/system/file/model';
|
||||
import { isImage } from '@/utils/common';
|
||||
import { isImage, stripOssImageProcess } from '@/utils/common';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -98,6 +107,16 @@
|
||||
const onDeleteItem = (index: number) => {
|
||||
emit('del', index);
|
||||
};
|
||||
|
||||
const guessNameFromUrl = (url: string) => {
|
||||
const cleanUrl = (url?.split('?')[0] ?? '').trim();
|
||||
const last = cleanUrl.split('/').pop() || '';
|
||||
try {
|
||||
return decodeURIComponent(last) || url;
|
||||
} catch {
|
||||
return last || url;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.select-picture-btn {
|
||||
@@ -112,6 +131,21 @@
|
||||
.image-upload-item {
|
||||
position: relative;
|
||||
}
|
||||
.file-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
border: 1px dashed var(--grey-7);
|
||||
padding: 0 10px;
|
||||
border-radius: 4px;
|
||||
max-width: 240px;
|
||||
color: inherit;
|
||||
}
|
||||
.file-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.image-upload-close {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
|
||||
106
src/components/SelectShopStore/components/select-data.vue
Normal file
106
src/components/SelectShopStore/components/select-data.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<ele-modal
|
||||
:width="800"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
:title="title"
|
||||
:footer="null"
|
||||
:body-style="{ paddingBottom: '28px' }"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<ele-pro-table
|
||||
ref="tableRef"
|
||||
row-key="id"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #toolbar>
|
||||
<a-space>
|
||||
<a-input-search
|
||||
allow-clear
|
||||
v-model:value="where.keywords"
|
||||
placeholder="请输入门店关键词"
|
||||
style="width: 240px"
|
||||
@search="reload"
|
||||
@pressEnter="reload"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a-button type="primary" @click="done(record)">选择</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import type {
|
||||
ColumnItem,
|
||||
DatasourceFunction
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { EleProTable } from 'ele-admin-pro';
|
||||
import useSearch from '@/utils/use-search';
|
||||
import { pageShopStore } from '@/api/shop/shopStore';
|
||||
import type { ShopStoreParam } from '@/api/shop/shopStore/model';
|
||||
import type { ShopStore } from '@/api/shop/shopStore/model';
|
||||
|
||||
defineProps<{
|
||||
visible: boolean;
|
||||
title?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done', data: ShopStore): void;
|
||||
(e: 'update:visible', visible: boolean): void;
|
||||
}>();
|
||||
|
||||
const updateVisible = (value: boolean) => {
|
||||
emit('update:visible', value);
|
||||
};
|
||||
|
||||
const { where } = useSearch<ShopStoreParam>({
|
||||
id: undefined,
|
||||
keywords: ''
|
||||
});
|
||||
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
|
||||
const columns = ref<ColumnItem[]>([
|
||||
{ title: 'ID', dataIndex: 'id', width: 90 },
|
||||
{ title: '门店名称', dataIndex: 'name' },
|
||||
{ title: '电话', dataIndex: 'phone', width: 160 },
|
||||
{ title: '地址', dataIndex: 'address' },
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
}
|
||||
]);
|
||||
|
||||
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
|
||||
return pageShopStore({
|
||||
...where,
|
||||
...orders,
|
||||
page,
|
||||
limit
|
||||
});
|
||||
};
|
||||
|
||||
const reload = () => {
|
||||
tableRef?.value?.reload({ page: 1, where: where as ShopStoreParam });
|
||||
};
|
||||
|
||||
const done = (record: ShopStore) => {
|
||||
updateVisible(false);
|
||||
emit('done', record);
|
||||
};
|
||||
</script>
|
||||
|
||||
63
src/components/SelectShopStore/index.vue
Normal file
63
src/components/SelectShopStore/index.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-input-group compact>
|
||||
<a-input
|
||||
disabled
|
||||
style="width: calc(100% - 32px)"
|
||||
v-model:value="content"
|
||||
:placeholder="placeholder"
|
||||
/>
|
||||
<a-button @click="openEdit">
|
||||
<template #icon><BulbOutlined class="ele-text-warning" /></template>
|
||||
</a-button>
|
||||
</a-input-group>
|
||||
<!-- 选择弹窗 -->
|
||||
<SelectData
|
||||
v-model:visible="showEdit"
|
||||
:title="placeholder"
|
||||
@done="onChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import type { ShopStore } from '@/api/shop/shopStore/model';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
value?: string;
|
||||
placeholder?: string;
|
||||
}>(),
|
||||
{
|
||||
placeholder: '选择门店'
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done', data?: ShopStore): void;
|
||||
(e: 'clear'): void;
|
||||
}>();
|
||||
|
||||
const showEdit = ref(false);
|
||||
const content = ref<string>(props.value ?? '');
|
||||
|
||||
const openEdit = () => {
|
||||
showEdit.value = true;
|
||||
};
|
||||
|
||||
const onChange = (row?: ShopStore) => {
|
||||
showEdit.value = false;
|
||||
emit('done', row);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
(v) => {
|
||||
content.value = v ?? '';
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -444,6 +444,24 @@ export const isImage = (fileName) => {
|
||||
});
|
||||
};
|
||||
|
||||
// 移除 OSS 图片处理参数(非图片文件拼接该参数会导致访问失败)
|
||||
export const stripOssImageProcess = (url?: string) => {
|
||||
if (!url) return url;
|
||||
const hashIndex = url.indexOf('#');
|
||||
const withNoHash = hashIndex >= 0 ? url.slice(0, hashIndex) : url;
|
||||
const hash = hashIndex >= 0 ? url.slice(hashIndex) : '';
|
||||
const queryIndex = withNoHash.indexOf('?');
|
||||
if (queryIndex < 0) return url;
|
||||
const base = withNoHash.slice(0, queryIndex);
|
||||
const query = withNoHash.slice(queryIndex + 1);
|
||||
const kept = query
|
||||
.split('&')
|
||||
.filter(Boolean)
|
||||
.filter((p) => p !== 'x-oss-process' && !p.startsWith('x-oss-process='));
|
||||
const rebuilt = kept.length ? `${base}?${kept.join('&')}` : base;
|
||||
return `${rebuilt}${hash}`;
|
||||
};
|
||||
|
||||
export const getWeek = (text) => {
|
||||
const week = [
|
||||
'星期日',
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<!-- 信用模块通用工具栏 -->
|
||||
<template>
|
||||
<a-space :size="10" style="flex-wrap: wrap">
|
||||
<a-button type="primary" class="ele-btn-icon" @click="add">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
<span>添加</span>
|
||||
</a-button>
|
||||
<!-- <a-button type="primary" class="ele-btn-icon" @click="add">-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <PlusOutlined />-->
|
||||
<!-- </template>-->
|
||||
<!-- <span>添加</span>-->
|
||||
<!-- </a-button>-->
|
||||
<a-button class="ele-btn-icon" @click="openImport">
|
||||
<template #icon>
|
||||
<CloudUploadOutlined />
|
||||
@@ -19,6 +19,7 @@
|
||||
</template>
|
||||
<span>导出</span>
|
||||
</a-button>
|
||||
<RefreshCompanyIdButton :module="props.module" @done="reload" />
|
||||
<a-button
|
||||
danger
|
||||
class="ele-btn-icon"
|
||||
@@ -44,14 +45,16 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import {
|
||||
PlusOutlined,
|
||||
CloudUploadOutlined,
|
||||
CloudDownloadOutlined,
|
||||
DeleteOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 后端模块路径片段,如: credit-breach-of-trust */
|
||||
module: string;
|
||||
selection?: any[];
|
||||
}>(),
|
||||
{
|
||||
@@ -71,16 +74,16 @@
|
||||
const keywords = ref('');
|
||||
const selection = computed(() => props.selection || []);
|
||||
|
||||
// 新增
|
||||
const add = () => {
|
||||
emit('add');
|
||||
};
|
||||
|
||||
// 搜索
|
||||
const handleSearch = () => {
|
||||
emit('search', { keywords: keywords.value });
|
||||
};
|
||||
|
||||
// 刷新 companyId 后,保持当前条件并触发父级 reload
|
||||
const reload = () => {
|
||||
emit('search', { keywords: keywords.value });
|
||||
};
|
||||
|
||||
// 导入
|
||||
const openImport = () => {
|
||||
emit('importData');
|
||||
|
||||
87
src/views/credit/components/CreditSearchToolbar2.vue
Normal file
87
src/views/credit/components/CreditSearchToolbar2.vue
Normal file
@@ -0,0 +1,87 @@
|
||||
<!-- 信用模块通用工具栏 -->
|
||||
<template>
|
||||
<a-space :size="10" style="flex-wrap: wrap">
|
||||
<a-button class="ele-btn-icon" @click="exportData">
|
||||
<template #icon>
|
||||
<CloudDownloadOutlined />
|
||||
</template>
|
||||
<span>导出</span>
|
||||
</a-button>
|
||||
<a-button
|
||||
danger
|
||||
class="ele-btn-icon"
|
||||
:disabled="!selection?.length"
|
||||
@click="remove"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
<span>批量删除</span>
|
||||
</a-button>
|
||||
<a-input-search
|
||||
allow-clear
|
||||
v-model:value="keywords"
|
||||
placeholder="请输入关键词"
|
||||
style="width: 220px"
|
||||
@search="handleSearch"
|
||||
@pressEnter="handleSearch"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import {
|
||||
PlusOutlined,
|
||||
CloudUploadOutlined,
|
||||
CloudDownloadOutlined,
|
||||
DeleteOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import RefreshCompanyIdButton from "@/views/credit/components/RefreshCompanyIdButton.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
selection?: any[];
|
||||
}>(),
|
||||
{
|
||||
selection: () => []
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'search', where?: { keywords?: string }): void;
|
||||
(e: 'add'): void;
|
||||
(e: 'remove'): void;
|
||||
(e: 'batchMove'): void;
|
||||
(e: 'importData'): void;
|
||||
(e: 'exportData'): void;
|
||||
}>();
|
||||
|
||||
const keywords = ref('');
|
||||
const selection = computed(() => props.selection || []);
|
||||
|
||||
// 新增
|
||||
const add = () => {
|
||||
emit('add');
|
||||
};
|
||||
|
||||
// 搜索
|
||||
const handleSearch = () => {
|
||||
emit('search', { keywords: keywords.value });
|
||||
};
|
||||
|
||||
// 导入
|
||||
const openImport = () => {
|
||||
emit('importData');
|
||||
};
|
||||
|
||||
// 导出
|
||||
const exportData = () => {
|
||||
emit('exportData');
|
||||
};
|
||||
|
||||
// 批量删除
|
||||
const remove = () => {
|
||||
emit('remove');
|
||||
};
|
||||
</script>
|
||||
59
src/views/credit/components/RefreshCompanyIdButton.vue
Normal file
59
src/views/credit/components/RefreshCompanyIdButton.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<a-button class="ele-btn-icon" @click="confirmRefresh">
|
||||
修正主体企业归属
|
||||
</a-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { createVNode } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { refreshCreditCompanyId } from '@/api/credit/companyId';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 后端模块路径片段,如: credit-breach-of-trust */
|
||||
module: string;
|
||||
/** 默认 true,仅更新 companyId 为空/0 的数据(由后端实现决定) */
|
||||
onlyNull?: boolean;
|
||||
/** 可选,限制处理条数 */
|
||||
limit?: number;
|
||||
/** 确认弹窗文案 */
|
||||
content?: string;
|
||||
}>(),
|
||||
{
|
||||
onlyNull: true,
|
||||
content:
|
||||
'将按记录名称匹配企业名称并回填 companyId(默认仅更新 companyId 为0的数据)确定要执行吗?'
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done'): void;
|
||||
}>();
|
||||
|
||||
const confirmRefresh = () => {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: props.content,
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
maskClosable: true,
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
return refreshCreditCompanyId(props.module, {
|
||||
onlyNull: props.onlyNull,
|
||||
limit: props.limit
|
||||
})
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg || '操作成功');
|
||||
emit('done');
|
||||
})
|
||||
.catch((e) => {
|
||||
hide();
|
||||
message.error(e.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,97 @@
|
||||
<!-- 历史行政许可导入弹窗 -->
|
||||
<template>
|
||||
<ele-modal
|
||||
:width="520"
|
||||
:footer="null"
|
||||
title="历史行政许可批量导入"
|
||||
:visible="visible"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<a-spin :spinning="loading">
|
||||
<a-upload-dragger
|
||||
accept=".xls,.xlsx"
|
||||
:show-upload-list="false"
|
||||
:customRequest="doUpload"
|
||||
style="padding: 24px 0; margin-bottom: 16px"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
<cloud-upload-outlined />
|
||||
</p>
|
||||
<p class="ant-upload-hint">将文件拖到此处,或点击上传</p>
|
||||
</a-upload-dragger>
|
||||
</a-spin>
|
||||
<div class="ele-text-center">
|
||||
<span>只能上传xls、xlsx文件,</span>
|
||||
<a :href="templateUrl" download="历史行政许可导入模板.xlsx">
|
||||
下载导入模板
|
||||
</a>
|
||||
</div>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import { CloudUploadOutlined } from '@ant-design/icons-vue';
|
||||
import { importCreditAdministrativeLicenseHistory } from '@/api/credit/creditAdministrativeLicense';
|
||||
import { API_BASE_URL } from '@/config/setting';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done'): void;
|
||||
(e: 'update:visible', visible: boolean): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<{
|
||||
// 是否打开弹窗
|
||||
visible: boolean;
|
||||
// 关联企业ID(企业详情下导入时需要)
|
||||
companyId?: number;
|
||||
}>();
|
||||
|
||||
// 导入请求状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 模板下载地址,保持与当前接口域名一致
|
||||
const templateUrl = computed(() => {
|
||||
const base = (localStorage.getItem('ApiUrl') || API_BASE_URL || '').replace(
|
||||
/\/$/,
|
||||
''
|
||||
);
|
||||
return `${base}/credit/credit-administrative-license/import/history/template`;
|
||||
});
|
||||
|
||||
/* 上传 */
|
||||
const doUpload = ({ file }) => {
|
||||
if (
|
||||
![
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
].includes(file.type)
|
||||
) {
|
||||
message.error('只能选择 excel 文件');
|
||||
return false;
|
||||
}
|
||||
if (file.size / 1024 / 1024 > 10) {
|
||||
message.error('大小不能超过 10MB');
|
||||
return false;
|
||||
}
|
||||
loading.value = true;
|
||||
importCreditAdministrativeLicenseHistory(file, props.companyId)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
message.success(msg);
|
||||
updateVisible(false);
|
||||
emit('done');
|
||||
})
|
||||
.catch((e) => {
|
||||
loading.value = false;
|
||||
message.error(e.message);
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
/* 更新 visible */
|
||||
const updateVisible = (value: boolean) => {
|
||||
emit('update:visible', value);
|
||||
};
|
||||
</script>
|
||||
@@ -1,13 +1,14 @@
|
||||
<!-- 编辑弹窗 -->
|
||||
<template>
|
||||
<ele-modal
|
||||
:width="800"
|
||||
width="70%"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
:maxable="maxable"
|
||||
:title="isUpdate ? '编辑行政许可' : '添加行政许可'"
|
||||
:title="isUpdate ? '行政许可详情' : '添加行政许可'"
|
||||
:body-style="{ paddingBottom: '28px' }"
|
||||
@update:visible="updateVisible"
|
||||
:footer="null"
|
||||
@ok="save"
|
||||
>
|
||||
<a-form
|
||||
@@ -47,13 +48,6 @@
|
||||
v-model:value="form.type"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="链接" name="url">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入链接"
|
||||
v-model:value="form.url"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="有效期自" name="validityStart">
|
||||
<a-input
|
||||
allow-clear
|
||||
@@ -89,64 +83,6 @@
|
||||
v-model:value="form.dataSourceUnit"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="备注" name="comments">
|
||||
<a-textarea
|
||||
:rows="4"
|
||||
:maxlength="200"
|
||||
placeholder="请输入描述"
|
||||
v-model:value="form.comments"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="企业ID" name="companyId">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入企业ID"
|
||||
v-model:value="form.companyId"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="是否推荐" name="recommend">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入是否推荐"
|
||||
v-model:value="form.recommend"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="排序(数字越小越靠前)" name="sortNumber">
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:max="9999"
|
||||
class="ele-fluid"
|
||||
placeholder="请输入排序号"
|
||||
v-model:value="form.sortNumber"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="状态, 0正常, 1冻结" name="status">
|
||||
<a-radio-group v-model:value="form.status">
|
||||
<a-radio :value="0">显示</a-radio>
|
||||
<a-radio :value="1">隐藏</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="是否删除, 0否, 1是" name="deleted">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入是否删除, 0否, 1是"
|
||||
v-model:value="form.deleted"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="用户ID" name="userId">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入用户ID"
|
||||
v-model:value="form.userId"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="修改时间" name="updateTime">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入修改时间"
|
||||
v-model:value="form.updateTime"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
@@ -7,10 +7,17 @@
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:customRow="customRow"
|
||||
v-model:selection="selection"
|
||||
:scroll="{ x: 2400 }"
|
||||
tool-class="ele-toolbar-form"
|
||||
class="sys-org-table"
|
||||
>
|
||||
<template #toolbar>
|
||||
<a-space class="flex">
|
||||
<RefreshCompanyIdButton
|
||||
module="credit-administrative-license"
|
||||
@done="reload"
|
||||
/>
|
||||
<search
|
||||
@search="reload"
|
||||
:selection="selection"
|
||||
@@ -20,8 +27,12 @@
|
||||
@importData="openImport"
|
||||
@exportData="exportData"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'companyName'">
|
||||
{{ record.companyName || '-' }}
|
||||
</template>
|
||||
<template v-if="column.key === 'image'">
|
||||
<a-image :src="record.image" :width="50" />
|
||||
</template>
|
||||
@@ -77,7 +88,8 @@
|
||||
DatasourceFunction,
|
||||
ColumnItem
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
||||
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||
import { exportCreditData } from '../utils/export';
|
||||
import { getPageTitle } from '@/utils/common';
|
||||
import CreditAdministrativeLicenseEdit from './components/creditAdministrativeLicenseEdit.vue';
|
||||
@@ -142,47 +154,45 @@
|
||||
key: 'id',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '主体企业',
|
||||
dataIndex: 'companyName',
|
||||
key: 'companyName'
|
||||
},
|
||||
{
|
||||
title: '决定文书/许可编号',
|
||||
dataIndex: 'code',
|
||||
key: 'code',
|
||||
ellipsis: true
|
||||
key: 'code'
|
||||
},
|
||||
{
|
||||
title: '决定文书/许可证名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
ellipsis: true
|
||||
key: 'name'
|
||||
},
|
||||
{
|
||||
title: '许可状态',
|
||||
dataIndex: 'statusText',
|
||||
key: 'statusText',
|
||||
ellipsis: true
|
||||
key: 'statusText'
|
||||
},
|
||||
{
|
||||
title: '许可类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
ellipsis: true
|
||||
key: 'type'
|
||||
},
|
||||
{
|
||||
title: '有效期自',
|
||||
dataIndex: 'validityStart',
|
||||
key: 'validityStart',
|
||||
ellipsis: true
|
||||
key: 'validityStart'
|
||||
},
|
||||
{
|
||||
title: '有效期至',
|
||||
dataIndex: 'validityEnd',
|
||||
key: 'validityEnd',
|
||||
ellipsis: true
|
||||
key: 'validityEnd'
|
||||
},
|
||||
{
|
||||
title: '许可机关',
|
||||
dataIndex: 'licensingAuthority',
|
||||
key: 'licensingAuthority',
|
||||
ellipsis: true
|
||||
key: 'licensingAuthority'
|
||||
},
|
||||
{
|
||||
title: '许可内容',
|
||||
@@ -193,8 +203,14 @@
|
||||
{
|
||||
title: '数据来源单位',
|
||||
dataIndex: 'dataSourceUnit',
|
||||
key: 'dataSourceUnit',
|
||||
ellipsis: true
|
||||
key: 'dataSourceUnit'
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName',
|
||||
width: 90,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -205,15 +221,15 @@
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// width: 180,
|
||||
// fixed: 'right',
|
||||
// align: 'center',
|
||||
// hideInSetting: true
|
||||
// }
|
||||
]);
|
||||
|
||||
/* 搜索 */
|
||||
@@ -251,21 +267,12 @@
|
||||
{ title: '决定文书/许可编号', dataIndex: 'code' },
|
||||
{ title: '决定文书/许可证名称', dataIndex: 'name' },
|
||||
{ title: '许可状态', dataIndex: 'statusText' },
|
||||
{ title: '许可类型', dataIndex: 'type' },
|
||||
{ title: '许可类别', dataIndex: 'type' },
|
||||
{ title: '有效期自', dataIndex: 'validityStart' },
|
||||
{ title: '有效期至', dataIndex: 'validityEnd' },
|
||||
{ title: '许可机关', dataIndex: 'licensingAuthority' },
|
||||
{ title: '许可内容', dataIndex: 'licenseContent' },
|
||||
{ title: '数据来源单位', dataIndex: 'dataSourceUnit' },
|
||||
{ title: '备注', dataIndex: 'comments' },
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
formatter: (record: CreditAdministrativeLicense) =>
|
||||
record.createTime
|
||||
? toDateString(record.createTime, 'yyyy-MM-dd HH:mm:ss')
|
||||
: ''
|
||||
}
|
||||
{ title: '数据来源单位', dataIndex: 'dataSourceUnit' }
|
||||
],
|
||||
fetchData: () =>
|
||||
listCreditAdministrativeLicense({
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<!-- 历史破产重整导入弹窗 -->
|
||||
<template>
|
||||
<ele-modal
|
||||
:width="520"
|
||||
:footer="null"
|
||||
title="历史破产重整批量导入"
|
||||
:visible="visible"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<a-spin :spinning="loading">
|
||||
<a-upload-dragger
|
||||
accept=".xls,.xlsx"
|
||||
:show-upload-list="false"
|
||||
:customRequest="doUpload"
|
||||
style="padding: 24px 0; margin-bottom: 16px"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
<cloud-upload-outlined />
|
||||
</p>
|
||||
<p class="ant-upload-hint">将文件拖到此处,或点击上传</p>
|
||||
</a-upload-dragger>
|
||||
</a-spin>
|
||||
<div class="ele-text-center">
|
||||
<span>只能上传xls、xlsx文件,</span>
|
||||
<a :href="templateUrl" download="历史破产重整导入模板.xlsx">
|
||||
下载导入模板
|
||||
</a>
|
||||
</div>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import { CloudUploadOutlined } from '@ant-design/icons-vue';
|
||||
import { importCreditBankruptcyHistory } from '@/api/credit/creditBankruptcy';
|
||||
import { API_BASE_URL } from '@/config/setting';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done'): void;
|
||||
(e: 'update:visible', visible: boolean): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<{
|
||||
// 是否打开弹窗
|
||||
visible: boolean;
|
||||
// 关联企业ID(企业详情下导入时需要)
|
||||
companyId?: number;
|
||||
}>();
|
||||
|
||||
// 导入请求状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 模板下载地址,保持与当前接口域名一致
|
||||
const templateUrl = computed(() => {
|
||||
const base = (localStorage.getItem('ApiUrl') || API_BASE_URL || '').replace(
|
||||
/\/$/,
|
||||
''
|
||||
);
|
||||
return `${base}/credit/credit-bankruptcy/import/history/template`;
|
||||
});
|
||||
|
||||
/* 上传 */
|
||||
const doUpload = ({ file }) => {
|
||||
if (
|
||||
![
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
].includes(file.type)
|
||||
) {
|
||||
message.error('只能选择 excel 文件');
|
||||
return false;
|
||||
}
|
||||
if (file.size / 1024 / 1024 > 10) {
|
||||
message.error('大小不能超过 10MB');
|
||||
return false;
|
||||
}
|
||||
loading.value = true;
|
||||
importCreditBankruptcyHistory(file, props.companyId)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
message.success(msg);
|
||||
updateVisible(false);
|
||||
emit('done');
|
||||
})
|
||||
.catch((e) => {
|
||||
loading.value = false;
|
||||
message.error(e.message);
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
/* 更新 visible */
|
||||
const updateVisible = (value: boolean) => {
|
||||
emit('update:visible', value);
|
||||
};
|
||||
</script>
|
||||
@@ -7,10 +7,13 @@
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:customRow="customRow"
|
||||
v-model:selection="selection"
|
||||
tool-class="ele-toolbar-form"
|
||||
class="sys-org-table"
|
||||
>
|
||||
<template #toolbar>
|
||||
<a-space class="flex">
|
||||
<RefreshCompanyIdButton module="credit-bankruptcy" @done="reload" />
|
||||
<search
|
||||
@search="reload"
|
||||
:selection="selection"
|
||||
@@ -20,8 +23,12 @@
|
||||
@importData="openImport"
|
||||
@exportData="exportData"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'companyName'">
|
||||
{{ record.companyName || '-' }}
|
||||
</template>
|
||||
<template v-if="column.key === 'image'">
|
||||
<a-image :src="record.image" :width="50" />
|
||||
</template>
|
||||
@@ -74,7 +81,8 @@
|
||||
DatasourceFunction,
|
||||
ColumnItem
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
||||
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||
import { exportCreditData } from '../utils/export';
|
||||
import { getPageTitle } from '@/utils/common';
|
||||
import CreditBankruptcyEdit from './components/creditBankruptcyEdit.vue';
|
||||
@@ -139,35 +147,42 @@
|
||||
key: 'id',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '主体企业',
|
||||
dataIndex: 'companyName',
|
||||
key: 'companyName'
|
||||
},
|
||||
{
|
||||
title: '案号',
|
||||
dataIndex: 'code',
|
||||
key: 'code',
|
||||
ellipsis: true
|
||||
key: 'code'
|
||||
},
|
||||
{
|
||||
title: '案件类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
ellipsis: true
|
||||
key: 'type'
|
||||
},
|
||||
{
|
||||
title: '当事人',
|
||||
dataIndex: 'party',
|
||||
key: 'party',
|
||||
ellipsis: true
|
||||
key: 'party'
|
||||
},
|
||||
{
|
||||
title: '经办法院',
|
||||
dataIndex: 'court',
|
||||
key: 'court',
|
||||
ellipsis: true
|
||||
key: 'court'
|
||||
},
|
||||
{
|
||||
title: '公开日期',
|
||||
dataIndex: 'publicDate',
|
||||
key: 'publicDate',
|
||||
ellipsis: true
|
||||
key: 'publicDate'
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName',
|
||||
width: 90,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -178,15 +193,15 @@
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// width: 180,
|
||||
// fixed: 'right',
|
||||
// align: 'center',
|
||||
// hideInSetting: true
|
||||
// }
|
||||
]);
|
||||
|
||||
/* 搜索 */
|
||||
@@ -299,7 +314,7 @@
|
||||
},
|
||||
// 行双击事件
|
||||
onDblclick: () => {
|
||||
openEdit(record);
|
||||
// openEdit(record);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -7,10 +7,13 @@
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:customRow="customRow"
|
||||
v-model:selection="selection"
|
||||
tool-class="ele-toolbar-form"
|
||||
class="sys-org-table"
|
||||
>
|
||||
<template #toolbar>
|
||||
<a-space class="flex">
|
||||
<RefreshCompanyIdButton module="credit-branch" @done="reload" />
|
||||
<search
|
||||
@search="reload"
|
||||
:selection="selection"
|
||||
@@ -20,8 +23,12 @@
|
||||
@importData="openImport"
|
||||
@exportData="exportData"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'companyName'">
|
||||
{{ record.companyName || '-' }}
|
||||
</template>
|
||||
<template v-if="column.key === 'image'">
|
||||
<a-image :src="record.image" :width="50" />
|
||||
</template>
|
||||
@@ -74,7 +81,8 @@
|
||||
DatasourceFunction,
|
||||
ColumnItem
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from '@/views/credit/components/CreditSearchToolbar.vue';
|
||||
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||
import { exportCreditData } from '../utils/export';
|
||||
import { getPageTitle } from '@/utils/common';
|
||||
import CreditBranchEdit from './components/creditBranchEdit.vue';
|
||||
@@ -139,11 +147,15 @@
|
||||
key: 'id',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '主体企业',
|
||||
dataIndex: 'companyName',
|
||||
key: 'companyName'
|
||||
},
|
||||
{
|
||||
title: '分支机构名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
ellipsis: true
|
||||
key: 'name'
|
||||
},
|
||||
{
|
||||
title: '负责人',
|
||||
@@ -169,6 +181,13 @@
|
||||
key: 'statusText',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName',
|
||||
width: 90,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
@@ -178,15 +197,15 @@
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// width: 180,
|
||||
// fixed: 'right',
|
||||
// align: 'center',
|
||||
// hideInSetting: true
|
||||
// }
|
||||
]);
|
||||
|
||||
/* 搜索 */
|
||||
@@ -226,7 +245,6 @@
|
||||
{ title: '地区', dataIndex: 'region' },
|
||||
{ title: '成立日期', dataIndex: 'establishDate' },
|
||||
{ title: '状态', dataIndex: 'statusText' },
|
||||
{ title: '备注', dataIndex: 'comments' },
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
@@ -299,7 +317,7 @@
|
||||
},
|
||||
// 行双击事件
|
||||
onDblclick: () => {
|
||||
openEdit(record);
|
||||
// openEdit(record);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<!-- 历史失信被执行人导入弹窗 -->
|
||||
<template>
|
||||
<ele-modal
|
||||
:width="520"
|
||||
:footer="null"
|
||||
title="历史失信被执行人批量导入"
|
||||
:visible="visible"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<a-spin :spinning="loading">
|
||||
<a-upload-dragger
|
||||
accept=".xls,.xlsx"
|
||||
:show-upload-list="false"
|
||||
:customRequest="doUpload"
|
||||
style="padding: 24px 0; margin-bottom: 16px"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
<cloud-upload-outlined />
|
||||
</p>
|
||||
<p class="ant-upload-hint">将文件拖到此处,或点击上传</p>
|
||||
</a-upload-dragger>
|
||||
</a-spin>
|
||||
<div class="ele-text-center">
|
||||
<span>只能上传xls、xlsx文件,</span>
|
||||
<a :href="templateUrl" download="历史失信被执行人导入模板.xlsx">
|
||||
下载导入模板
|
||||
</a>
|
||||
</div>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import { CloudUploadOutlined } from '@ant-design/icons-vue';
|
||||
import { importCreditBreachOfTrustHistory } from '@/api/credit/creditBreachOfTrust';
|
||||
import { API_BASE_URL } from '@/config/setting';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done'): void;
|
||||
(e: 'update:visible', visible: boolean): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<{
|
||||
// 是否打开弹窗
|
||||
visible: boolean;
|
||||
// 关联企业ID(企业详情下导入时需要)
|
||||
companyId?: number;
|
||||
}>();
|
||||
|
||||
// 导入请求状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 模板下载地址,保持与当前接口域名一致
|
||||
const templateUrl = computed(() => {
|
||||
const base = (localStorage.getItem('ApiUrl') || API_BASE_URL || '').replace(
|
||||
/\/$/,
|
||||
''
|
||||
);
|
||||
return `${base}/credit/credit-breach-of-trust/import/history/template`;
|
||||
});
|
||||
|
||||
/* 上传 */
|
||||
const doUpload = ({ file }) => {
|
||||
if (
|
||||
![
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
].includes(file.type)
|
||||
) {
|
||||
message.error('只能选择 excel 文件');
|
||||
return false;
|
||||
}
|
||||
if (file.size / 1024 / 1024 > 10) {
|
||||
message.error('大小不能超过 10MB');
|
||||
return false;
|
||||
}
|
||||
loading.value = true;
|
||||
importCreditBreachOfTrustHistory(file, props.companyId)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
message.success(msg);
|
||||
updateVisible(false);
|
||||
emit('done');
|
||||
})
|
||||
.catch((e) => {
|
||||
loading.value = false;
|
||||
message.error(e.message);
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
/* 更新 visible */
|
||||
const updateVisible = (value: boolean) => {
|
||||
emit('update:visible', value);
|
||||
};
|
||||
</script>
|
||||
@@ -7,12 +7,15 @@
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:customRow="customRow"
|
||||
v-model:selection="selection"
|
||||
tool-class="ele-toolbar-form"
|
||||
class="sys-org-table"
|
||||
>
|
||||
<template #toolbar>
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-breach-of-trust"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
@@ -20,8 +23,12 @@
|
||||
@importData="openImport"
|
||||
@exportData="exportData"
|
||||
/>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'companyName'">
|
||||
{{ record.companyName || '-' }}
|
||||
</template>
|
||||
<template v-if="column.key === 'image'">
|
||||
<a-image :src="record.image" :width="50" />
|
||||
</template>
|
||||
@@ -140,52 +147,57 @@
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '数据类型',
|
||||
dataIndex: 'dataType',
|
||||
key: 'dataType',
|
||||
ellipsis: true
|
||||
title: '主体企业',
|
||||
dataIndex: 'companyName',
|
||||
key: 'companyName'
|
||||
},
|
||||
{
|
||||
title: '原告/上诉人',
|
||||
dataIndex: 'appellee',
|
||||
key: 'appellee'
|
||||
},
|
||||
{
|
||||
title: '被告/被上诉人',
|
||||
dataIndex: 'plaintiffAppellant',
|
||||
key: 'plaintiffAppellant',
|
||||
ellipsis: true
|
||||
key: 'plaintiffAppellant'
|
||||
},
|
||||
{
|
||||
title: '其他当事人/第三人',
|
||||
dataIndex: 'otherPartiesThirdParty',
|
||||
key: 'otherPartiesThirdParty'
|
||||
},
|
||||
{
|
||||
title: '发生时间',
|
||||
dataIndex: 'occurrenceTime',
|
||||
key: 'occurrenceTime',
|
||||
dataIndex: 'releaseDate',
|
||||
key: 'releaseDate',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '案号',
|
||||
dataIndex: 'caseNumber',
|
||||
key: 'caseNumber',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '案由',
|
||||
dataIndex: 'causeOfAction',
|
||||
key: 'causeOfAction',
|
||||
ellipsis: true
|
||||
key: 'caseNumber'
|
||||
},
|
||||
{
|
||||
title: '涉案金额',
|
||||
dataIndex: 'involvedAmount',
|
||||
key: 'involvedAmount',
|
||||
width: 120
|
||||
key: 'involvedAmount'
|
||||
},
|
||||
{
|
||||
title: '法院',
|
||||
dataIndex: 'courtName',
|
||||
key: 'courtName',
|
||||
ellipsis: true
|
||||
key: 'courtName'
|
||||
},
|
||||
{
|
||||
title: '数据状态',
|
||||
dataIndex: 'dataStatus',
|
||||
key: 'dataStatus',
|
||||
ellipsis: true
|
||||
key: 'dataStatus'
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName',
|
||||
width: 90,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -193,17 +205,18 @@
|
||||
key: 'createTime',
|
||||
width: 180,
|
||||
align: 'center',
|
||||
sorter: true,
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// width: 160,
|
||||
// fixed: 'right',
|
||||
// align: 'center',
|
||||
// hideInSetting: true
|
||||
// }
|
||||
]);
|
||||
|
||||
/* 搜索 */
|
||||
@@ -318,7 +331,7 @@
|
||||
},
|
||||
// 行双击事件
|
||||
onDblclick: () => {
|
||||
openEdit(record);
|
||||
// openEdit(record);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<!-- 历史立案信息导入弹窗 -->
|
||||
<template>
|
||||
<ele-modal
|
||||
:width="520"
|
||||
:footer="null"
|
||||
title="历史立案信息批量导入"
|
||||
:visible="visible"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<a-spin :spinning="loading">
|
||||
<a-upload-dragger
|
||||
accept=".xls,.xlsx"
|
||||
:show-upload-list="false"
|
||||
:customRequest="doUpload"
|
||||
style="padding: 24px 0; margin-bottom: 16px"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
<cloud-upload-outlined />
|
||||
</p>
|
||||
<p class="ant-upload-hint">将文件拖到此处,或点击上传</p>
|
||||
</a-upload-dragger>
|
||||
</a-spin>
|
||||
<div class="ele-text-center">
|
||||
<span>只能上传xls、xlsx文件,</span>
|
||||
<a :href="templateUrl" download="历史立案信息导入模板.xlsx">
|
||||
下载导入模板
|
||||
</a>
|
||||
</div>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import { CloudUploadOutlined } from '@ant-design/icons-vue';
|
||||
import { importCreditCaseFilingHistory } from '@/api/credit/creditCaseFiling';
|
||||
import { API_BASE_URL } from '@/config/setting';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done'): void;
|
||||
(e: 'update:visible', visible: boolean): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<{
|
||||
// 是否打开弹窗
|
||||
visible: boolean;
|
||||
// 关联企业ID(企业详情下导入时需要)
|
||||
companyId?: number;
|
||||
}>();
|
||||
|
||||
// 导入请求状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 模板下载地址,保持与当前接口域名一致
|
||||
const templateUrl = computed(() => {
|
||||
const base = (localStorage.getItem('ApiUrl') || API_BASE_URL || '').replace(
|
||||
/\/$/,
|
||||
''
|
||||
);
|
||||
return `${base}/credit/credit-case-filing/import/history/template`;
|
||||
});
|
||||
|
||||
/* 上传 */
|
||||
const doUpload = ({ file }) => {
|
||||
if (
|
||||
![
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
].includes(file.type)
|
||||
) {
|
||||
message.error('只能选择 excel 文件');
|
||||
return false;
|
||||
}
|
||||
if (file.size / 1024 / 1024 > 10) {
|
||||
message.error('大小不能超过 10MB');
|
||||
return false;
|
||||
}
|
||||
loading.value = true;
|
||||
importCreditCaseFilingHistory(file, props.companyId)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
message.success(msg);
|
||||
updateVisible(false);
|
||||
emit('done');
|
||||
})
|
||||
.catch((e) => {
|
||||
loading.value = false;
|
||||
message.error(e.message);
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
/* 更新 visible */
|
||||
const updateVisible = (value: boolean) => {
|
||||
emit('update:visible', value);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
</a-spin>
|
||||
<div class="ele-text-center">
|
||||
<span>只能上传xls、xlsx文件,</span>
|
||||
<a :href="templateUrl" download="立案信息导入模板.xlsx">
|
||||
下载导入模板
|
||||
</a>
|
||||
<a :href="templateUrl" download="立案信息导入模板.xlsx"> 下载导入模板 </a>
|
||||
</div>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user