From 2adda5537ed677cb5b3a5a0ff434f2da92e87bf3 Mon Sep 17 00:00:00 2001 From: pyt <626651354@qq.com> Date: 星期一, 24 三月 2025 16:36:09 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/chongzhouResettle --- src/views/placement-batch/index.vue | 71 ++++++++++++++++++++++++++++------- 1 files changed, 56 insertions(+), 15 deletions(-) diff --git a/src/views/placement-batch/index.vue b/src/views/placement-batch/index.vue index f53e50b..ff19cc9 100644 --- a/src/views/placement-batch/index.vue +++ b/src/views/placement-batch/index.vue @@ -22,9 +22,9 @@ <!-- 功能按钮区域 --> <div class="button-container"> - <el-button type="primary" size="small" @click="handleImportAll">新增资金批次</el-button> - <el-button type="success" size="small" @click="handleExportTemplate">下载资金导入模版</el-button> - <el-button type="success" size="small" @click="handleImportTemplate">下载购房信息表导入模版</el-button> + <el-button type="primary" size="small" v-permission="['placement-batch/add']" @click="handleImportAll">新增资金批次</el-button> + <el-button type="success" size="small" v-permission="['placement-batch/downLoad']" @click="handleExportTemplate">下载资金导入模版</el-button> + <el-button type="success" size="small" v-permission="['placement-batch/down']" @click="handleImportTemplate">下载购房信息表导入模版</el-button> </div> <!-- 表格区域 --> @@ -50,21 +50,25 @@ </el-table-column> <el-table-column label="操作" align="center" width="200"> <template slot-scope="scope"> - <el-button size="mini" type="text" @click="handleView(scope.row)">详情</el-button> - <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button> - <el-button size="mini" type="text" @click="handleApproval(scope.row)">审核</el-button> - <el-button size="mini" type="text" @click="handleDelete(scope.row)">删除</el-button> + <el-button size="mini" v-permission="['placement-batch/detail']" v-if="scope.row.status != '0'" type="text" @click="handleView(scope.row)">详情</el-button> + <el-button size="mini" v-permission="['placement-batch/view']" type="text" @click="handleViewDetail(scope.row)">查看</el-button> + <el-button size="mini" v-permission="['placement-batch/approval']" v-if="scope.row.status == '0'" type="text" @click="handleApproval(scope.row)">审核</el-button> + <el-button size="mini" v-permission="['placement-batch/del']" v-if="scope.row.status == '1'" type="text" @click="handleDelete(scope.row)">删除</el-button> </template> </el-table-column> </el-table> <!-- 分页区域 --> - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" - @pagination="getList" /> + <div class="pagination-container"> + <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" + :current-page="queryParams.pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="queryParams.pageSize" + layout="total, sizes, prev, pager, next, jumper" :total="total"> + </el-pagination> + </div> - <export-money-applay :visible.sync="dialogVisible" @importPrice="importPrice" /> - <approval-dialog :visible.sync="approvalDialogVisible" /> - </div> + <export-money-applay :visible.sync="dialogVisible" @importPrice="importPrice" @close="dialogVisible = false" /> + <approval-dialog :visible.sync="approvalDialogVisible" :type="type" @audit-submit="auditSubmit" :placementBatchId="placementBatchId" @close="approvalDialogVisible = false" /> + </div> </template> <script> @@ -74,7 +78,8 @@ import { getPlacementBatchList, deletePlacementBatch, - importPlacementBatch + importPlacementBatch, + auditPlacementBatch } from '@/api/placement-details' export default { @@ -95,6 +100,10 @@ total: 0, // 表格数据 tableData: [], + // 安置批次id + placementBatchId: 0, + // 审核类型 + type: 'audit', // 查询参数 queryParams: { pageNum: 1, @@ -135,6 +144,17 @@ } this.getList() }, + + /** 分页 */ + handleSizeChange(size) { + this.queryParams.pageSize = size + this.getList() + }, + /** 分页 */ + handleCurrentChange(page) { + this.queryParams.pageNum = page + this.getList() + }, /** 导入资金批次 */ handleImportAll() { // TODO: 实现导出逻辑 @@ -152,7 +172,6 @@ }, /** 导入资金批次 */ importPrice(form) { - console.log('//////////////', form) let formData = new FormData() formData.append('assetFile', form.assetFile) formData.append('householdFile', form.householdFile) @@ -168,11 +187,33 @@ /** 查看详情按钮操作 */ handleView(row) { // TODO: 实现查看详情逻辑 - this.$router.push('/placement/batch/personnel?id=' + row.id) + this.type = 'detail' + this.placementBatchId = row.id + this.approvalDialogVisible = true + }, + /** 查看详情按钮操作 */ + handleViewDetail(row) { + // TODO: 实现查看详情逻辑 + this.$router.push(`/placement/batch/personnel?id=${row.id}`) }, /** 审核按钮操作 */ handleApproval(row) { // TODO: 实现编辑逻辑 + this.type = 'audit' + this.placementBatchId = row.id + this.approvalDialogVisible = true + }, + /** 审核提交 */ + auditSubmit(data) { + // TODO: 实现审核提交逻辑 + auditPlacementBatch(data).then(res => { + if (res.code == 200) { + this.$message.success('审核成功') + this.placementBatchId = 0 + this.approvalDialogVisible = false + this.getList() + } + }) }, /** 删除按钮操作 */ handleDelete(row) { -- Gitblit v1.7.1