From db905ecd14f63dba9337b4f4715584ef2d7e8c7e Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期五, 07 三月 2025 14:45:00 +0800 Subject: [PATCH] 修改 --- src/views/specialOperationsPay/coalPay/index.vue | 35 ++++++++++++++++++++--------------- 1 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/views/specialOperationsPay/coalPay/index.vue b/src/views/specialOperationsPay/coalPay/index.vue index bcf75cb..8a3393f 100644 --- a/src/views/specialOperationsPay/coalPay/index.vue +++ b/src/views/specialOperationsPay/coalPay/index.vue @@ -2,7 +2,6 @@ <div class="app-container"> <div> <el-button - size="medium" style="margin-bottom: 10px;background-color: #0FC7F0;color: white" @click="handleAdd('add',{})" v-if="isAhthority" @@ -10,7 +9,6 @@ </el-button> <el-date-picker style="margin-left: 30px;width: 300px" - size="small" v-model="dateValue" @change="changeDate" type="daterange" @@ -20,16 +18,14 @@ start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker> - <el-cascader v-model="queryParams.deptId" size="small" style="margin-left: 15px" :options="deptOptions" placeholder="组织架构" :props="{ expandTrigger: 'hover',checkStrictly: true,emitPath: false,value: 'id' }"></el-cascader> + <el-cascader v-model="queryParams.deptId" style="margin-left: 15px" :options="deptOptions" placeholder="组织架构" :props="{ expandTrigger: 'hover',checkStrictly: true,emitPath: false,value: 'id' }"></el-cascader> <el-button - size="small" type="primary" style="margin-bottom: 10px;margin-left: 20px" @click="handleQuery()" >查询 </el-button> <el-button - size="small" type="primary" style="margin-bottom: 10px" @click="resetQuery()" @@ -53,17 +49,17 @@ <span>{{scope.row.havePayNum}}</span>/{{scope.row.totalNum}} </template> </el-table-column> - <el-table-column label="学员个人缴费" align="center" prop="batchName"> + <el-table-column label="缴费形式" align="center" prop="batchName"> <template #default="scope"> - <span v-if="scope.row.payPersonType == 1">已开启</span> - <span v-if="scope.row.payPersonType == 2" style="color:red">已关闭</span> - <el-button type="text" style="color:lightcoral" @click="updatePayType(scope.row)" v-if="scope.row.payPersonType == 1">关闭</el-button> + <el-tag type="success" v-if="scope.row.payPersonType == 1">个人</el-tag> + <el-tag v-if="scope.row.payPersonType == 2">批量</el-tag> + <el-button type="text" style="color:lightcoral;margin-left: 5px" size="small" @click="updatePayType(scope.row)" v-if="scope.row.payPersonType == 1">转批量</el-button> </template> </el-table-column> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px"> <template #default="scope"> <el-button v-if="isAhthority" size="mini" type="text" style="color: #1890ff" @click="handleViewStu(scope.row)">学员管理</el-button> -<!-- <el-button v-if="isAhthority" size="mini" type="text" style="color: #1890ff" @click="handleBatchPay(scope.row,'')">批量缴费</el-button>--> + <el-button v-if="isAhthority && scope.row.payPersonType == 2 && (scope.row.havePayNum < scope.row.totalNum)" size="mini" type="text" style="color: #1890ff" @click="handleBatchPay(scope.row,'add')">批量缴费</el-button> <el-button v-if="isAhthority" size="mini" type="text" style="color:lightcoral" @click="handleDelete(scope.row)">删除</el-button> </template> </el-table-column> @@ -132,12 +128,14 @@ }, methods: { getList() { + this.loading = true this.queryParams.minDate = this.dateValue[0]?this.dateValue[0] + ' 00:00:00':'' this.queryParams.maxDate = this.dateValue[1]?this.dateValue[1] + ' 23:59:59':'' getCoalPayList( this.queryParams).then((res) => { if (res.code == 200) { this.payList = res.rows this.total = res.total + this.loading = false } }) }, @@ -168,8 +166,8 @@ handleViewStu(val) { this.$refs.stuDialogRef.openDialog(val) }, - handleBatchPay(val) { - this.$refs.batchPayRef.openDialog(val); + handleBatchPay(val,type) { + this.$refs.batchPayRef.openDialog(val,type); }, handleQuery() { this.getList(); @@ -186,6 +184,13 @@ this.getList() }, updatePayType(row){ + if(row.totalNum < 2){ + this.$message({ + type: 'warning', + message: '批量缴费人数不能小于二人' + }) + return + } this.$confirm('一旦关闭则无法重新开启个人缴费,必须批量缴完剩余所有学员。是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -196,17 +201,17 @@ this.$message({ type: 'success', message: '删除成功!' - }); + }) await this.getList() }else{ this.$message({ type: 'warning', message: res.msg - }); + }) } }).catch(() => { - }); + }) }, handleDelete(row){ -- Gitblit v1.9.2