feat(credit): 添加客户导入功能并优化信用模块界面
- 在客户导入API中添加isCustomer参数标识 - 为信用相关页面集成公司ID刷新按钮组件 - 在竞争者、客户、外部、风险关系和供应商模块中添加刷新功能 - 配置开发环境变量注释API地址配置 - 统一信用模块工具栏组件导入和使用方式
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
VITE_APP_NAME=后台管理(开发环境)
|
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_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ export async function importCreditCompany(file: File) {
|
|||||||
export async function importCustomer(file: File) {
|
export async function importCustomer(file: File) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
formData.append('isCustomer', '1');
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-company/import',
|
'/credit/credit-company/import',
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
CloudDownloadOutlined,
|
CloudDownloadOutlined,
|
||||||
DeleteOutlined
|
DeleteOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
|
import RefreshCompanyIdButton from "@/views/credit/components/RefreshCompanyIdButton.vue";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-space class="flex">
|
<a-space class="flex">
|
||||||
|
<RefreshCompanyIdButton module="credit-competitor" @done="reload" />
|
||||||
<search
|
<search
|
||||||
@search="reload"
|
@search="reload"
|
||||||
:selection="selection"
|
:selection="selection"
|
||||||
@@ -81,6 +82,7 @@
|
|||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
|
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditCompetitorEdit from './components/creditCompetitorEdit.vue';
|
import CreditCompetitorEdit from './components/creditCompetitorEdit.vue';
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-space class="flex">
|
<a-space class="flex">
|
||||||
|
<RefreshCompanyIdButton module="credit-customer" @done="reload" />
|
||||||
<search
|
<search
|
||||||
@search="reload"
|
@search="reload"
|
||||||
:selection="selection"
|
:selection="selection"
|
||||||
@@ -81,6 +82,7 @@
|
|||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from './components/search.vue';
|
import Search from './components/search.vue';
|
||||||
|
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditCustomerEdit from './components/creditCustomerEdit.vue';
|
import CreditCustomerEdit from './components/creditCustomerEdit.vue';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-space class="flex">
|
<a-space class="flex">
|
||||||
|
<RefreshCompanyIdButton module="credit-external" @done="reload" />
|
||||||
<search
|
<search
|
||||||
@search="reload"
|
@search="reload"
|
||||||
:selection="selection"
|
:selection="selection"
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
|
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditExternalEdit from './components/creditExternalEdit.vue';
|
import CreditExternalEdit from './components/creditExternalEdit.vue';
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-space class="flex">
|
<a-space class="flex">
|
||||||
|
<RefreshCompanyIdButton module="credit-risk-relation" @done="reload" />
|
||||||
<search
|
<search
|
||||||
@search="reload"
|
@search="reload"
|
||||||
:selection="selection"
|
:selection="selection"
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
|
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditRiskRelationEdit from './components/creditRiskRelationEdit.vue';
|
import CreditRiskRelationEdit from './components/creditRiskRelationEdit.vue';
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-space class="flex">
|
<a-space class="flex">
|
||||||
|
<RefreshCompanyIdButton module="credit-supplier" @done="reload" />
|
||||||
<search
|
<search
|
||||||
@search="reload"
|
@search="reload"
|
||||||
:selection="selection"
|
:selection="selection"
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
import Search from '@/views/credit/components/CreditSearchToolbar2.vue';
|
||||||
|
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||||
import { exportCreditData } from '../utils/export';
|
import { exportCreditData } from '../utils/export';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditSupplierEdit from './components/creditSupplierEdit.vue';
|
import CreditSupplierEdit from './components/creditSupplierEdit.vue';
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-space class="flex">
|
<a-space class="flex">
|
||||||
|
<RefreshCompanyIdButton module="credit-user" @done="reload" />
|
||||||
<search
|
<search
|
||||||
@search="reload"
|
@search="reload"
|
||||||
:selection="selection"
|
:selection="selection"
|
||||||
@@ -78,6 +79,7 @@
|
|||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import { toDateString } from 'ele-admin-pro';
|
import { toDateString } from 'ele-admin-pro';
|
||||||
import Search from './components/search.vue';
|
import Search from './components/search.vue';
|
||||||
|
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||||
import { getPageTitle } from '@/utils/common';
|
import { getPageTitle } from '@/utils/common';
|
||||||
import CreditUserEdit from './components/creditUserEdit.vue';
|
import CreditUserEdit from './components/creditUserEdit.vue';
|
||||||
import CreditUserImport from './components/credit-user-import.vue';
|
import CreditUserImport from './components/credit-user-import.vue';
|
||||||
|
|||||||
Reference in New Issue
Block a user