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