feat(credit): 添加赊账客户导入功能

- 新增 importCreditUsers API 接口用于导入赊账客户数据
- 在信用用户管理页面增加导入按钮和导入弹窗组件
- 实现拖拽上传和文件校验逻辑
- 添加导入模板下载链接
- 支持 Excel 文件格式(.xls/.xlsx)导入
- 实现批量导入数据处理和错误提示
- 更新搜索组件支持关键词搜索功能
- 优化表格数据加载逻辑,支持搜索参数传递
- 移除冗余的查询相关代码和状态变量
- 完善导入弹窗的 loading 状态管理和关闭逻辑
This commit is contained in:
2025-12-15 14:43:49 +08:00
parent 1856a611ce
commit 0e489ec35f
13 changed files with 1379 additions and 65 deletions

View File

@@ -0,0 +1,68 @@
<template>
<a-table :columns="columns" :data-source="data" :pagination="false">
<template #bodyCell="{ column, text }">
</template>
<template #footer>
<div class="text-red-500 gap-3">
<div>登录账号u_{{ loginUser.userId }}</div>
<div>初始密码123456</div>
</div>
</template>
</a-table>
</template>
<script lang="ts" setup>
import {computed, ref} from 'vue';
import {useUserStore} from "@/store/modules/user";
import {CmsWebsite} from "@/api/cms/cmsWebsite/model";
import {getSiteInfo} from "@/api/layout";
const userStore = useUserStore();// 当前用户信息
const loginUser = computed(() => userStore.info ?? {});
const website = ref<CmsWebsite>()
const columns = [
{
title: '仓库名称',
dataIndex: 'name',
key: 'name',
},
{
title: '仓库地址',
className: 'column-money',
dataIndex: 'url',
key: 'url',
},
{
title: '备注',
dataIndex: 'comments',
},
];
const data = [
{
key: '1',
name: '服务端',
url: 'https://git.websoft.top/gxwebsoft/mp-java.git',
comments: '基于 Spring Boot + MyBatis Plus 的企业级后端API服务',
},
{
key: '2',
name: '管理端',
url: 'https://code.websoft.top/gxwebsoft/mp-vue.git',
comments: '基于 Vue 3 + Ant Design Vue 的企业级后台管理系统',
},
{
key: '3',
name: '应用端',
url: 'https://git.websoft.top/gxwebsoft/template-10559.git',
comments: '基于 Taro + React + TypeScript 的跨平台小程序应用',
},
];
const reload = async () => {
website.value = await getSiteInfo();
};
reload()
</script>