From 97ae9c64cc0e45903844ea63e3f13dc98da61496 Mon Sep 17 00:00:00 2001 From: 13404089107 <puwei@sinata.cn> Date: 星期四, 20 三月 2025 17:03:51 +0800 Subject: [PATCH] 调试导入 --- src/views/placement-batch/index.vue | 42 +++++++++++++++++++++++++++++++++--------- 1 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/views/placement-batch/index.vue b/src/views/placement-batch/index.vue index f478432..42c2ea7 100644 --- a/src/views/placement-batch/index.vue +++ b/src/views/placement-batch/index.vue @@ -62,7 +62,7 @@ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> - <export-money-applay :visible.sync="dialogVisible" /> + <export-money-applay :visible.sync="dialogVisible" @importPrice="importPrice" /> <approval-dialog :visible.sync="approvalDialogVisible" /> </div> </template> @@ -70,9 +70,11 @@ <script> import ExportMoneyApplay from './components/exportMoneyApplay.vue' import ApprovalDialog from './components/ApprovalDialog.vue' +import { downLoad } from '@/utils' import { getPlacementBatchList, - downloadTemplate + deletePlacementBatch, + importPlacementBatch } from '@/api/placement-details' export default { @@ -87,6 +89,8 @@ loading: false, // 弹窗 dialogVisible: false, + // 审核弹窗 + approvalDialogVisible: false, // 总条数 total: 0, // 表格数据 @@ -95,7 +99,7 @@ queryParams: { pageNum: 1, pageSize: 10, - batchNo: undefined, + batchNumber: undefined, status: undefined }, dialogVisible: false @@ -110,7 +114,7 @@ this.loading = true getPlacementBatchList(this.queryParams).then(res => { this.tableData = res.data.records || [] - this.total = res.data.total + this.total = res.data.total || 0 this.loading = false }) @@ -132,15 +136,23 @@ /** 下载模板 */ handleExportTemplate() { // TODO: 实现下载模板逻辑 - downloadTemplate(3).then(res => { - window.open(res.data) - }) - - + downLoad('/placement-batch/download-template/3', '资金导入模版.xlsx') }, /** 下载临时安置模板 */ handleImportTemplate() { // TODO: 实现下载临时安置模板逻辑 + downLoad('/placement-batch/download-template/4', '购房信息表导入模版.xlsx') + }, + /** 导入资金批次 */ + importPrice(form) { + console.log('//////////////',form) + importPlacementBatch(form).then(res => { + if(res.code == 200) { + this.$message.success('导入成功') + this.dialogVisible = false + this.getList() + } + }) }, /** 查看详情按钮操作 */ handleView(row) { @@ -153,6 +165,18 @@ /** 删除按钮操作 */ handleDelete(row) { // TODO: 实现删除逻辑 + this.$confirm('确定删除该安置批次吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deletePlacementBatch({id: row.id}).then(res => { + if(res.code == 200) { + this.$message.success('删除成功') + this.getList() + } + }) + }) } } } -- Gitblit v1.7.1