From c594eef54b6a7ae813ac3aede5ff6207d60b92e7 Mon Sep 17 00:00:00 2001 From: pyt <626651354@qq.com> Date: 星期四, 20 三月 2025 14:35:03 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/chongzhouResettle --- src/views/applicationBatchList/list.vue | 294 +++++++++++++++++++++++----------------------------------- 1 files changed, 115 insertions(+), 179 deletions(-) diff --git a/src/views/applicationBatchList/list.vue b/src/views/applicationBatchList/list.vue index 921d46f..2bc8093 100644 --- a/src/views/applicationBatchList/list.vue +++ b/src/views/applicationBatchList/list.vue @@ -5,19 +5,26 @@ <el-form :inline="true" :model="queryParams" class="search-form"> <el-form-item label="批次号"> <el-input - v-model="queryParams.batchNo" + v-model="queryParams.batchNumber" placeholder="请输入" clearable size="small" /> </el-form-item> <el-form-item label="状态"> - <el-input + <el-select v-model="queryParams.status" - placeholder="请输入" + placeholder="请选择" clearable size="small" - /> + > + <el-option + v-for="dict in statusOptions" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> </el-form-item> <el-form-item> <el-button type="default" @click="resetQuery">重置</el-button> @@ -30,61 +37,100 @@ <div class="action-buttons"> <el-button type="primary" @click="handleAdd">新增申请批次</el-button> <el-button type="success" @click="handleImport">下载导入模板</el-button> - <el-button type="primary" @click="handleBatchImport">批量导入</el-button> </div> <!-- 表格区域 --> - <el-table - v-loading="loading" - :data="tableData" - border - style="width: 100%" - > + <el-table v-loading="loading" :data="tableData" border style="width: 100%"> <el-table-column type="index" label="序号" width="60" align="center" /> - <el-table-column prop="batchNo" label="批次号" min-width="120" align="center" /> - <el-table-column prop="totalApplications" label="申请总数" min-width="100" align="center" /> - <el-table-column prop="totalApplicants" label="申请总人数" min-width="100" align="center" /> - <el-table-column prop="compensationAmount" label="补偿金总额(万元)" min-width="150" align="center" /> - <el-table-column prop="quarterlyAmount" label="25%暂付款(万元)" min-width="150" align="center" /> - <el-table-column prop="quarterlyPaymentStatus" label="每季度发放支付情况(万元)" min-width="180" align="center" /> - <el-table-column prop="transitionalAmount" label="过渡补助(万元)" min-width="150" align="center" /> - + <el-table-column + prop="batchNumber" + label="批次号" + min-width="120" + align="center" + /> + <el-table-column + prop="householdsNum" + label="申请总户数" + min-width="100" + align="center" + /> + <el-table-column + prop="personNum" + label="申请总人数" + min-width="100" + align="center" + /> + <el-table-column + prop="totalAmount" + label="补偿资金总额(万元)" + min-width="150" + align="center" + /> + <el-table-column + prop="downPaymentAmount" + label="25%暂付款(万元)" + min-width="150" + align="center" + /> + <el-table-column + prop="quarterPayAmount" + label="每季度发放支付情况(万元)" + min-width="180" + align="center" + /> + <el-table-column + prop="subsidyAmount" + label="过渡补助(万元)" + min-width="150" + align="center" + /> + <el-table-column label="状态" width="100" align="center"> <template slot-scope="scope"> <el-tag - :type="scope.row.status === '待审核' ? 'warning' : scope.row.status === '已通过' ? 'success' : 'info'" - >{{ scope.row.status }}</el-tag> + :type=" + scope.row.status === 0 + ? 'warning' + : scope.row.status === 1 + ? 'success' + : 'info' + " + >{{ statusMap[scope.row.status] }}</el-tag + > </template> </el-table-column> - + <el-table-column label="操作" width="180" align="center" fixed="right"> <template slot-scope="scope"> - <!-- 待审核状态 --> - <template v-if="scope.row.status === '待审核'"> + <!-- 已审核状态 --> + <template> <el-button size="mini" type="text" + v-if="scope.row.status === 0" @click="handleView(scope.row, 'audit')" - >审核</el-button> + >审核</el-button + > <el-button size="mini" type="text" @click="handleView(scope.row, 'view')" - >查看</el-button> - </template> - - <!-- 已审核状态 --> - <template v-else> + >查看</el-button + > <el-button size="mini" type="text" + v-if="scope.row.status != 0" @click="handleView(scope.row, 'detail')" - >详情</el-button> + >详情</el-button + > <el-button size="mini" type="text" @click="handleDelete(scope.row)" - >删除</el-button> + v-if="scope.row.status != 0" + >删除</el-button + > </template> </template> </el-table-column> @@ -118,7 +164,6 @@ <upload-dialog ref="uploadDialog" :visible.sync="uploadDialogVisible" - :type="uploadType" @success="handleUploadSuccess" /> </div> @@ -128,6 +173,7 @@ import Pagination from "@/components/Pagination"; import UploadDialog from "./components/UploadDialog"; import ApprovalDialog from "./components/ApprovalDialog"; +import { geTabletList } from "@/api/application-batch"; export default { name: "ApplicationBatchList", @@ -144,144 +190,29 @@ total: 4, // 状态数据字典 statusOptions: [ - { value: "待审核", label: "待审核" }, - { value: "已通过", label: "已通过" }, - { value: "已驳回", label: "已驳回" }, + { value: 0, label: "待审核" }, + { value: 1, label: "已通过" }, + { value: 2, label: "已驳回" }, ], + // 状态映射 + statusMap: { + 0: "待审核", + 1: "已通过", + 2: "已驳回", + }, // 审核相关 approvalDialogVisible: false, approvalType: "audit", // 'audit' 或 'detail' currentRow: {}, // 上传相关 uploadDialogVisible: false, - uploadType: "add", // 'add' 或 'batch' // 表格数据 - tableData: [ - { - projectName: "白鹤镇和平街道改造", - projectCompleteTime: "2024-07-27", - town: "白鹤镇", - village: "白鹤村", - group: "3组", - owner: "陈向荣", - ownerIdCard: "123456789012345678", - relationship: "户主", - personType: "集体", - idCard: "123456789012345678", - name: "陈向荣", - age: "25岁", - remark1: "事实", - birthDate: "2024-01-05", - resettlementType: "货币补偿", - firstDeliveryDate: "2024-07-16", - secondDeliveryDate: "2025-07-23", - thirdDeliveryDate: "2025-11-21", - thirdDeliveryRemark: "未完善", - resettlementArea: "6", - previousTotalAmount: "4", - previousPaid: "19612348970", - previousUnpaid: "", - accountNumber: "19612348970", - contact: "19612348970", - remark: "", - status: "待审核", - }, - { - projectName: "白鹤镇和平街道改造", - projectCompleteTime: "2024-08-10", - town: "白鹤镇", - village: "白鹤村", - group: "3组", - owner: "席娟", - ownerIdCard: "123456789012345678", - relationship: "妻", - personType: "集体", - idCard: "330105197803120987", - name: "李女士", - age: "25岁", - remark1: "事实", - birthDate: "2024-01-22", - resettlementType: "货币补偿", - firstDeliveryDate: "2025-09-22", - secondDeliveryDate: "2025-07-19", - thirdDeliveryDate: "2025-04-22", - thirdDeliveryRemark: "未完善", - resettlementArea: "90", - previousTotalAmount: "45", - previousPaid: "19323312231", - previousUnpaid: "", - accountNumber: "19323312231", - contact: "19323312231", - remark: "", - status: "待审核", - }, - { - projectName: "白鹤镇和平街道改造", - projectCompleteTime: "2024-06-20", - town: "白鹤镇", - village: "白鹤村", - group: "3组", - owner: "梁小小", - ownerIdCard: "123456789012345678", - relationship: "子", - personType: "北城集", - idCard: "123456789012345678", - name: "梁家辉", - age: "25岁", - remark1: "事实", - birthDate: "2025-08-08", - resettlementType: "货币补偿", - firstDeliveryDate: "2024-07-04", - secondDeliveryDate: "2024-12-20", - thirdDeliveryDate: "2025-12-03", - thirdDeliveryRemark: "未完善", - resettlementArea: "65", - previousTotalAmount: "90", - previousPaid: "19876782134", - previousUnpaid: "", - accountNumber: "19876782134", - contact: "19876782134", - remark: "", - status: "已驳回", - }, - { - projectName: "白鹤镇和平街道改造", - projectCompleteTime: "2024-07-19", - town: "白鹤镇", - village: "白鹤村", - group: "3组", - owner: "王开莱", - ownerIdCard: "123456789012345678", - relationship: "兄", - personType: "北城集", - idCard: "123456789012345678", - name: "王中山", - age: "25岁", - remark1: "事实", - birthDate: "2024-06-09", - resettlementType: "货币补偿", - firstDeliveryDate: "2025-01-11", - secondDeliveryDate: "2024-09-21", - thirdDeliveryDate: "2024-12-12", - thirdDeliveryRemark: "未完善", - resettlementArea: "34", - previousTotalAmount: "62", - previousPaid: "19113212388", - previousUnpaid: "", - accountNumber: "19113212388", - contact: "19113212388", - remark: "", - status: "已通过", - }, - ], + tableData: [], // 查询参数 queryParams: { pageNum: 1, pageSize: 10, projectName: undefined, - town: undefined, - owner: undefined, - idCard: undefined, status: undefined, }, }; @@ -296,6 +227,10 @@ // 这里添加实际的API调用 setTimeout(() => { this.loading = false; + geTabletList({ ...this.queryParams }).then((res) => { + this.tableData = res.data.records; + this.total = res.data.total; + }); }, 500); }, /** 搜索按钮操作 */ @@ -309,36 +244,37 @@ pageNum: 1, pageSize: 10, projectName: undefined, - town: undefined, - owner: undefined, - idCard: undefined, status: undefined, }; this.handleQuery(); }, /** 新增按钮操作 */ handleAdd() { - this.uploadType = "add"; this.uploadDialogVisible = true; }, /** 导入模板下载操作 */ handleImport() { // 实现下载逻辑 }, - /** 批量导入按钮操作 */ - handleBatchImport() { - this.uploadType = "batch"; - this.uploadDialogVisible = true; - }, /** 统一的查看/详情按钮操作 */ handleView(row, type) { - this.$router.push({ - path: "/applicationBatchList/detail", - query: { - batchNo: row.batchNo, - type: type // 'audit'/'view'/'detail' - }, - }); + this.currentRow = row; + if (type === "audit" || type === "detail") { + this.approvalType = type; + this.approvalDialogVisible = true; + } else if (type === "view") { + this.$router.push({ + path: "/applicationBatchList/detail", + query: { + id: row.id, + batchNumber: row.batchNumber, + waitFamilyArea: row.waitFamilyArea || 0, + personNum: row.personNum, + totalAmount: row.totalAmount, + status: row.status, //0待审核 1已通过 2已驳回 + }, + }); + } }, /** 审核提交处理 */ handleApprovalSubmit(data) { @@ -374,7 +310,7 @@ this.getList(); this.$message({ type: "success", - message: this.uploadType === "add" ? "新增成功!" : "批量导入成功!", + message:"新增成功!" , }); }, }, @@ -395,7 +331,7 @@ .search-form { display: flex; align-items: center; - + .el-form-item { margin-bottom: 0; margin-right: 20px; @@ -405,7 +341,7 @@ .action-buttons { margin-bottom: 20px; - + .el-button { margin-right: 10px; } @@ -413,10 +349,10 @@ .el-table { margin-bottom: 20px; - + .el-button--text { padding: 0 8px; - + &:not(:last-child) { border-right: 1px solid #dcdfe6; } -- Gitblit v1.7.1