feat(invoice): 添加开票登记导出功能
- 在开票登记页面添加导出按钮
- 实现选中数据导出和全部数据导出功能
- 添加导出前确认弹窗提示
- 更新开发环境后端接口地址为 localhost
- 修改 .gitignore 文件忽略 Claude 和 Playwright 相关文件
| | |
| | | *.njsproj |
| | | *.sln |
| | | *.local |
| | | .claude |
| | | .playwright-mcp |
| | | |
| | | package-lock.json |
| | | yarn.lock |
| | |
| | | <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> |
| | |
| | | }; |
| | | // 导出 |
| | | 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("已取消"); |
| | |
| | | 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 {
|