昨天 bf2dcbac4b70a150827645f6c822d0bd7bd71cc8
feat(invoice): 添加开票登记导出功能

- 在开票登记页面添加导出按钮
- 实现选中数据导出和全部数据导出功能
- 添加导出前确认弹窗提示
- 更新开发环境后端接口地址为 localhost
- 修改 .gitignore 文件忽略 Claude 和 Playwright 相关文件
已修改3个文件
15 ■■■■ 文件已修改
.gitignore 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceRegistration/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -18,6 +18,8 @@
*.njsproj
*.sln
*.local
.claude
.playwright-mcp
package-lock.json
yarn.lock
src/views/salesManagement/invoiceRegistration/index.vue
@@ -42,6 +42,7 @@
        <el-form-item>
          <el-button type="primary" @click="handleQuery"> 搜索 </el-button>
          <el-button @click="resetForm"> 重置 </el-button>
          <el-button @click="handleOut" type="primary">导出</el-button>
        </el-form-item>
      </el-form>
    </div>
@@ -613,13 +614,19 @@
};
// 导出
const handleOut = () => {
  ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
  const exportIds = selectedRows.value.map((item) => item.id);
  const confirmMsg = exportIds.length
    ? `已选中 ${exportIds.length} 条数据,将导出选中内容,是否确认?`
    : "未选中数据,将导出全部数据,是否确认?";
  ElMessageBox.confirm(confirmMsg, "导出", {
    confirmButtonText: "确认",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(() => {
      proxy.download("/invoiceRegistration/export", {}, "开票登记信息.xlsx");
      // 勾选则导出选中行,未勾选导出全部
      const params = exportIds.length ? { ids: exportIds } : {};
      proxy.download("/invoiceRegistration/export", params, "开票登记信息.xlsx");
    })
    .catch(() => {
      proxy.$modal.msg("已取消");
vite.config.js
@@ -8,7 +8,7 @@
  const { VITE_APP_ENV } = env;
  const baseUrl =
    VITE_APP_ENV == "development"
      ? "http://192.168.0.226:7003" // 开发环境后端接口
      ? "http://localhost:7003" // 开发环境后端接口
      : "http://114.132.189.42:7003"; // 生产环境后端接口
  return {