Browse Source

增加管理员充值记录,及其他优化

程志平 3 years ago
parent
commit
7709e8da3c

+ 72 - 0
src/api/operationRecord.js

@@ -0,0 +1,72 @@
+import request from '@/utils/request'
+
+// 获取3个数据
+// export function getThreeData(forData) {
+// 	let data = new FormData()
+// 	if (typeof forData.name_card != 'undefined') {
+// 		data.append('name_card', forData.name_card)
+// 	}
+// 	if (typeof forData.start_time != 'undefined') {
+// 		data.append('start_time', forData.start_time)
+// 	}
+// 	if (typeof forData.end_time != 'undefined') {
+// 		data.append('end_time', forData.end_time)
+// 	}
+// 	if (typeof forData.state != 'undefined') {
+// 		data.append('state', forData.state)
+// 	}
+// 	// console.log(forData);
+// 	return request({
+// 		url: '/airManage/rechargequeryTongji.action',
+// 		method: 'post',
+// 		data
+// 	})
+// }
+
+// 获取充值记录,表格数据
+export function getTableData(forData) {
+	let data = new FormData()
+	data.append('page', forData.page)
+	data.append('rows', forData.rows)
+	if (typeof forData.name_card != 'undefined') {
+		data.append('name_card', forData.name_card)
+	}
+	if (typeof forData.start_time != 'undefined') {
+		data.append('start_time', forData.start_time)
+	}
+	if (typeof forData.end_time != 'undefined') {
+		data.append('end_time', forData.end_time)
+	}
+	if (typeof forData.re_state != 'undefined') {
+		data.append('re_state', forData.re_state)
+	}
+	return request({
+		url: '/airManage/rechargequeryPageRecord.action',
+		method: 'post',
+		data
+	})
+}
+
+
+// 下载
+// export function downloadExcel(forData) {
+// 	let data = new FormData()
+// 	if (typeof forData.name_card != 'undefined') {
+// 		data.append('name_card', forData.name_card)
+// 	}
+// 	if (typeof forData.start_time != 'undefined') {
+// 		data.append('start_time', forData.start_time)
+// 	}
+// 	if (typeof forData.end_time != 'undefined') {
+// 		data.append('end_time', forData.end_time)
+// 	}
+// 	if (typeof forData.state != 'undefined') {
+// 		data.append('state', forData.state)
+// 	}
+// 	// console.log(forData);
+// 	return request({
+// 		url: '/airManage/rechargetoExcel.action',
+// 		method: 'post',
+// 		data
+// 	})
+// }

+ 8 - 0
src/api/userMgr.js

@@ -70,4 +70,12 @@ export function getUserGrade() {
 		url: '/airManage/configquerynjlb.action',
 		url: '/airManage/configquerynjlb.action',
 		method: 'post'
 		method: 'post'
 	})
 	})
+}
+
+// 身份列表
+export function getRechargeClass() {
+	return request({
+		url: '/airManage/rechargequeryRelb.action',
+		method: 'post'
+	})
 }
 }

File diff suppressed because it is too large
+ 1 - 0
src/icons/svg/operationRecord.svg


+ 14 - 0
src/layout/components/Navbar.vue

@@ -89,6 +89,11 @@
 				this.getnewTime()
 				this.getnewTime()
 			}, 1000)
 			}, 1000)
 		},
 		},
+		updated() {
+			if (typeof this.role == 'undefined' || this.role == '') {
+				this.autoLogout();
+			}
+		},
 		computed: {
 		computed: {
 			...mapGetters([
 			...mapGetters([
 				'sidebar',
 				'sidebar',
@@ -100,6 +105,15 @@
 			toggleSideBar() {
 			toggleSideBar() {
 				this.$store.dispatch('app/toggleSideBar')
 				this.$store.dispatch('app/toggleSideBar')
 			},
 			},
+			// 无用户名自动退出
+			autoLogout() {
+				this.$store.dispatch('user/logout')
+				this.$router.push(`/login?redirect=${this.$route.fullPath}`)
+				this.$message({
+					type: 'success',
+					message: '无用户名,已自动退出!请重新登录!'
+				});
+			},
 			// 退出登录
 			// 退出登录
 			async logout() {
 			async logout() {
 				await this.$confirm('即将退出登录, 是否继续?', '提示', {
 				await this.$confirm('即将退出登录, 是否继续?', '提示', {

+ 2 - 1
src/layout/components/Sidebar/Logo.vue

@@ -26,8 +26,9 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				// title: '共享空调运营管理平台',
+				title: '共享空调运营管理平台',
 				// logo: '../../../icons/images/index/title_icon.png'
 				// logo: '../../../icons/images/index/title_icon.png'
+				logo: ''
 			}
 			}
 		}
 		}
 	}
 	}

+ 14 - 0
src/router/index.js

@@ -162,6 +162,20 @@ export const constantRoutes = [{
 		}]
 		}]
 	},
 	},
 	
 	
+	{
+		path: '/operationRecord',
+		component: Layout,
+		redirect: '/operationRecord',
+		children: [{
+			path: 'operationRecord',
+			name: 'SystemSet',
+			component: () => import('@/views/operationRecord/index'),
+			meta: {
+				title: '操作记录',
+				icon: 'operationRecord'
+			}
+		}]
+	},
 	// 404页面 必须放在最后!!
 	// 404页面 必须放在最后!!
 	{
 	{
 		path: '*',
 		path: '*',

+ 507 - 0
src/views/operationRecord/index.vue

@@ -0,0 +1,507 @@
+<template>
+	<div class="app-container">
+		<el-row>
+			<el-col :span="24">
+				<div class="cell">
+					<div class="cell-title">
+						<div class="title-left">
+							<div class="title">操作记录</div>
+							<!-- <div class="title-detail">总余额:{{total_balance}}元</div>
+							<div class="title-detail">总充值:{{total_recharge}}元</div>
+							<div class="title-detail">总交易笔数:{{total_number}}笔</div> -->
+						</div>
+						<!-- <div class="title-right">
+							<el-button type="primary" @click="handler_download_excel">导出表单</el-button>
+						</div> -->
+					</div>
+					<div class="cell-body">
+						<el-form :inline="true" :model="formInline" class="demo-form-inline">
+							<el-form-item label="关键字:">
+								<el-input v-model="formInline.user" clearable placeholder="请输入姓名或身份证"></el-input>
+							</el-form-item>
+							<el-form-item>
+								<el-button type="warning" @click="btn_search">查询</el-button>
+							</el-form-item>
+							<el-form-item label="时间筛选:">
+								<el-date-picker v-model="search_datatime" type="datetimerange" align="right"
+									start-placeholder="开始日期" end-placeholder="结束日期" @change="search_datetime_change"
+									:default-time="['23:59:59', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss"
+									format="yyyy-MM-dd HH:mm:ss" clearable>
+								</el-date-picker>
+							</el-form-item>
+							<el-form-item label="">
+								<el-select v-model="formInline.re_state" clearable placeholder="请选择" @change="search_state_change">
+									<el-option label="补充" value="补充"></el-option>
+									<el-option label="赠送" value="赠送"></el-option>
+								</el-select>
+							</el-form-item>
+						</el-form>
+						<el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style"
+							v-loading="loading" :header-cell-style="header_cell_style">
+							<el-table-column label="序号" align="center" width="100">
+								<template slot-scope="scope">
+									<span>{{(pagination.currentPage - 1) * pagination.pageSize + scope.$index + 1}}</span>
+								</template>
+							</el-table-column>
+							<el-table-column label="姓名" align="center" width="100">
+								<template slot-scope="scope">
+									<span>{{ scope.row.user_name }}</span>
+								</template>
+							</el-table-column>
+							<el-table-column label="手机" align="center" width="180">
+								<template slot-scope="scope">
+									<span>{{ scope.row.phone }}</span>
+								</template>
+							</el-table-column>
+							<!-- <el-table-column label="身份证号" align="center" width="150">
+								<template slot-scope="scope">
+									{{scope.row.sfzh}}
+								</template>
+							</el-table-column> -->
+							<el-table-column label="充值金额(元)" align="center" width="200">
+								<template slot-scope="scope">
+									<span>{{ scope.row.account }}</span>
+								</template>
+							</el-table-column>
+							<el-table-column label="账户余额(元)" align="center" width="200">
+								<template slot-scope="scope">
+									<span>{{ scope.row.balance }}</span>
+								</template>
+							</el-table-column>
+							<el-table-column label="支付状态" align="center" width="150">
+								<template slot-scope="scope">
+									<span v-if="scope.row.re_state == '补充'" class="txt-cell-green">{{ scope.row.re_state }}</span>
+									<span v-else class="txt-cell-red">{{ scope.row.re_state }}</span>
+								</template>
+							</el-table-column>
+							<el-table-column label="交易流水号" align="center">
+								<template slot-scope="scope">
+									<span>{{ scope.row.order_num }}</span>
+								</template>
+							</el-table-column>
+							<el-table-column label="支付时间" align="center">
+								<template slot-scope="scope">
+									<span>{{ scope.row.time }}</span>
+								</template>
+							</el-table-column>
+						</el-table>
+						<div class="pagination-table">
+							<el-pagination @current-change="currentPageChange"
+								:current-page.sync="pagination.currentPage" :page-size="pagination.pageSize"
+								layout="prev, pager, next, jumper" :total="pagination.total">
+							</el-pagination>
+						</div>
+					</div>
+				</div>
+			</el-col>
+		</el-row>
+	</div>
+</template>
+
+<script>
+	import {
+		getThreeData,
+		getTableData,
+		downloadExcel
+	} from '@/api/operationRecord'
+	export default {
+		data() {
+			return {
+				// total_balance: 0.0.toFixed(2), // 总余额
+				// total_recharge: 0.0.toFixed(2), // 总充值
+				// total_number: 0, // 总交易笔数
+				formLabelWidth: '120px',
+				// 表格单元格样式
+				cell_style: {
+					color: '#1A202B',
+					'font-size': '14px',
+					'font-family': 'Microsoft YaHei-3970(82674968)'
+				},
+				// 表格头部样式
+				header_cell_style: {
+					background: '#E6ECFE',
+					color: '#1A202B',
+					'font-size': '16px',
+					'font-family': 'Microsoft YaHei-3970(82674968)'
+				},
+				search_datatime: '',
+				// 表单数据
+				formInline: {
+					user: '',
+					startTime: '',
+					endTime: '',
+					re_state: ''
+				},
+				tableData: [],
+				cond_data: {},
+				// 分页参数
+				pagination: {
+					currentPage: 1,
+					pageSize: 9,
+					total: 0
+				},
+				loading: true
+			}
+		},
+		created() {
+			// 获取3个数据
+			// this.get_three_data()
+			// 获取消费记录,表格数据
+			this.get_table_data('list')
+		},
+		mounted() {
+			document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
+		},
+		methods: {
+			/**
+			 * 下载Excel表格
+			 */
+			// handler_download_excel() {
+			// 	this.get_condtion();
+			// 	// 开始发送请求,获取配置数据
+			// 	downloadExcel(this.cond_data).then((res) => {
+			// 		// console.log(res);
+			// 		if (typeof res.code == 'undefined' || res.code == '') {
+			// 			this.$message.error('返回数据格式问题,code未获取到!')
+			// 			return
+			// 		}
+
+			// 		if (res.code == 200) {
+			// 			this.$message.success('下载成功!')
+			// 			let xls = 'https://chtech.ncjti.edu.cn/air-conditioner-control/' + res.downurl
+			// 			window.open(xls)
+			// 		} else {
+			// 			this.$message.error(res.message)
+			// 		}
+			// 	}).catch((err) => {
+			// 		// console.log(err);
+			// 		this.$message.error(err.message)
+			// 	})
+			// },
+			/**
+			 * 选取的时间进行格式化,赋值给formInline
+			 */
+			search_datetime_change() {
+				// console.log(this.search_datatime);
+				if (this.search_datatime == null) {
+					this.formInline.startTime = ''
+					this.formInline.endTime = ''
+				} else {
+					this.formInline.startTime = this.search_datatime[0]
+					this.formInline.endTime = this.search_datatime[1]
+				}
+				// 刷新列表
+				this.get_table_data('search')
+			},
+			/**
+			 * 搜索状态
+			 */
+			search_state_change() {
+				// 刷新列表
+				this.get_table_data('search')
+			},
+			/**
+			 * 获取3个数据
+			 */
+			// get_three_data() {
+			// 	this.get_condtion();
+				
+			// 	getThreeData(this.cond_data).then((res) => {
+			// 		// console.log(res);
+			// 		if (res.code == 200) {
+			// 			this.total_balance = res.TotalYe.toFixed(2) // 总余额
+			// 			this.total_recharge = res.zongRecharge.toFixed(2) // 总消费
+			// 			this.total_number = res.zongRecord // 总交易笔数
+			// 		} else {
+			// 			this.$message.error(res.message)
+			// 		}
+			// 	}).catch((err) => {
+			// 		// console.log(err);
+			// 		this.$message.error(err.message)
+			// 	})
+			// },
+			/**
+			 * 获取消费记录,表格数据
+			 */
+			get_table_data(param) {
+				this.loading = true
+				this.get_condtion();
+				
+				let data = this.cond_data;
+				if (param == 'search') {
+					data.page = 1
+					this.pagination.currentPage = 1
+				}
+				console.log(data);
+				getTableData(data).then((res) => {
+					console.log(res);
+					if (typeof res.rows !== 'undefined' && res.rows !== '') {
+						this.pagination.total = res.total
+						this.tableData = []
+						for (var i = 0; i < res.rows.length; i++) {
+							this.tableData.push(res.rows[i])
+						}
+					} else {
+						this.tableData = []
+						this.$message.warning('没有符合条件的数据!')
+					}
+				}).catch((err) => {
+					// console.log(err);
+					this.$message.error(err.message)
+				});
+				this.loading = false;
+
+				// if (param == 'search') {
+				// 	this.get_three_data();
+				// }
+			},
+			/**
+			 * 条件
+			 */
+			get_condtion() {
+				let data = {
+					page: this.pagination.currentPage,
+					rows: this.pagination.pageSize
+				}
+				if (this.formInline.user !== '') {
+					data.name_card = this.formInline.user
+				}
+				if (this.formInline.startTime !== '') {
+					data.start_time = this.formInline.startTime
+				}
+				if (this.formInline.endTime !== '') {
+					data.end_time = this.formInline.endTime
+				}
+				if (this.formInline.re_state !== '') {
+					data.re_state = this.formInline.re_state
+				}
+				
+				this.cond_data = data;
+			},
+			/**
+			 * 搜索
+			 */
+			btn_search() {
+				this.get_table_data('search')
+			},
+			/**
+			 * currentPage 改变时会触发
+			 * @param {Object} val
+			 */
+			currentPageChange(val) {
+				this.pagination.currentPage = val
+				this.get_table_data('pages')
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.app-container {
+		background-color: #EFF2F7;
+		padding: 10px;
+
+		.el-row {
+
+			.el-col {
+				padding: 10px;
+
+				.cell {
+					padding: 30px;
+					border-radius: 10px;
+					background-color: #FFFFFF;
+					// box-shadow: 5px 5px 15px #979797;
+					box-shadow: 0px 3px 21px 0px rgba(60, 108, 254, 0.16);
+
+					.cell-title {
+						display: flex;
+						justify-content: space-between;
+						align-items: center;
+						margin-bottom: 30px;
+						padding-bottom: 30px;
+						border-bottom: 1px solid #CCCCCC;
+
+						.title-left {
+							display: flex;
+							align-items: center;
+
+							.title {
+								font-size: 22px;
+								font-family: Microsoft YaHei-3970(82674968);
+								font-weight: bold;
+								color: #1A202B;
+							}
+
+							.title-detail {
+								margin-left: 50px;
+								font-size: 18px;
+								font-family: Microsoft YaHei-3970(82674968);
+								color: #1A202B;
+							}
+						}
+
+						.title-right {
+							display: flex;
+							justify-content: space-between;
+							align-items: center;
+
+							.el-button {
+								width: 110px;
+								height: 46px;
+								background: #2B4CFE;
+								font-size: 18px;
+								color: #FFFFFF;
+								font-family: Microsoft YaHei-3970(82674968);
+								border-radius: 5px;
+							}
+
+							.el-button--warning {
+								background: #F88A64;
+							}
+						}
+					}
+
+					.cell-body {
+
+						.el-form {
+							display: flex;
+							flex-wrap: wrap;
+							align-items: center;
+
+							.el-button--warning {
+								background: #F88A64;
+							}
+
+							.el-date-editor--datetimerange {
+								padding: 3px 8px;
+								width: 370px;
+							}
+
+							.el-select {
+								width: 130px;
+							}
+						}
+
+						.btn-cell-blue {
+							color: #2B4CFE;
+							border: none;
+							font-size: 18px;
+						}
+
+						.btn-cell-black {
+							color: #53575A;
+							border: none;
+							font-size: 18px;
+						}
+
+						.txt-cell-green {
+							color: #67C23A;
+						}
+
+						.txt-cell-red {
+							color: #F56C6C;
+							font-size: 16px;
+						}
+
+						.pagination-table {
+							display: flex;
+							justify-content: flex-end;
+							align-items: center;
+							height: 30px;
+							margin-top: 20px;
+							padding-right: 100px;
+
+							::v-deep .el-pagination {
+								display: flex;
+								justify-content: flex-end;
+								align-items: center;
+							}
+
+							::v-deep .el-pagination ul {
+								display: flex;
+
+							}
+
+							::v-deep .el-pagination button,
+							::v-deep .el-pagination li {
+								display: flex;
+								justify-content: center;
+								align-items: center;
+								width: 50px;
+								height: 36px;
+								border: 1px solid #626262;
+								border-radius: 3px;
+								font-size: 14px;
+								margin: 0 5px;
+							}
+
+							::v-deep .el-pagination span {
+								margin-left: 10px;
+							}
+
+							::v-deep .el-pagination .el-pagination__jump {
+								font-size: 16px;
+							}
+
+							::v-deep .el-pagination .el-pagination__editor {
+								width: 50px;
+								height: 36px;
+								margin: 0 5px;
+							}
+
+							::v-deep .el-pagination .el-input__inner {
+								width: 50px;
+								height: 36px;
+								border: 1px solid #626262;
+								margin: -4px 0 0 0;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		::v-deep .el-dialog {
+			margin: 0 !important;
+			width: 400px;
+			height: 320px;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 13px 0px rgba(0, 0, 0, 0.29);
+			border-radius: 10px;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+
+			.el-dialog__header {
+				display: flex;
+				align-items: center;
+				width: 100%;
+				height: 58px;
+				padding: 30px;
+				background: #E6EBFE;
+				border-radius: 10px 10px 0px 0px;
+				font-weight: bold;
+			}
+
+			.el-dialog__body {
+				padding-bottom: 0;
+
+				.el-form-item {
+					margin-bottom: 0;
+
+					.el-form-item__label,
+					.el-form-item__content {
+						font-size: 16px;
+						font-family: Microsoft YaHei-3970(82674968);
+						color: #53575A;
+					}
+
+					.el-input__inner {
+						width: 100px;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 14 - 8
src/views/serveAC/index.vue

@@ -473,7 +473,7 @@
 			</div>
 			</div>
 		</el-dialog>
 		</el-dialog>
 		<!-- 添加空调设备 -->
 		<!-- 添加空调设备 -->
-		<el-dialog :title="currentData.addDevice + '房间 添加设备'" custom-class="el-dialog-add-device"
+		<el-dialog :title="currentData.addDevice + ' 添加设备'" custom-class="el-dialog-add-device"
 			:visible.sync="dialog_add_device" :close-on-click-modal="false" :close-on-press-escape="false"
 			:visible.sync="dialog_add_device" :close-on-click-modal="false" :close-on-press-escape="false"
 			@close="dialog_close('form_add_device')">
 			@close="dialog_close('form_add_device')">
 			<el-form :model="form_add_device" ref="add_device_form" :rules="form_add_device_rules">
 			<el-form :model="form_add_device" ref="add_device_form" :rules="form_add_device_rules">
@@ -499,7 +499,7 @@
 					</el-input>
 					</el-input>
 				</el-form-item>
 				</el-form-item>
 				<el-form-item label="设备类型:" :label-width="formLabelWidth" prop="checkedDevice" :required="true">
 				<el-form-item label="设备类型:" :label-width="formLabelWidth" prop="checkedDevice" :required="true">
-					<el-checkbox-group v-model="form_add_device.checkedDevice" :min="0" :max="1">
+					<el-checkbox-group v-model="form_add_device.checkedDevice" :min="0" :max="1" style="width: 380px;">
 						<el-checkbox v-for="(device, index) in form_add_device.devices" :label="device" :key="index">
 						<el-checkbox v-for="(device, index) in form_add_device.devices" :label="device" :key="index">
 							{{device}}
 							{{device}}
 						</el-checkbox>
 						</el-checkbox>
@@ -541,7 +541,7 @@
 			:close-on-press-escape="false" :show-close="false">
 			:close-on-press-escape="false" :show-close="false">
 			<div slot="" class="del-air-body">
 			<div slot="" class="del-air-body">
 				<img src="../../icons/serveAC/del_warning.png" alt="">
 				<img src="../../icons/serveAC/del_warning.png" alt="">
-				<div class="del-air-body-txt">是否确定将该房间【{{ show_delete_room }}】从列表中移除?</div>
+				<div class="del-air-body-txt">是否确定删除房间【{{ show_delete_room }}】?</div>
 			</div>
 			</div>
 			<div slot="footer" class="dialog-footer">
 			<div slot="footer" class="dialog-footer">
 				<el-button @click="dialog_delete_room = false"> 否 </el-button>
 				<el-button @click="dialog_delete_room = false"> 否 </el-button>
@@ -2516,6 +2516,7 @@
 						font-size: 18px;
 						font-size: 18px;
 						font-family: Microsoft YaHei-3970(82674968);
 						font-family: Microsoft YaHei-3970(82674968);
 						color: #333333;
 						color: #333333;
+						white-space: nowrap;
 					}
 					}
 				}
 				}
 			}
 			}
@@ -2571,17 +2572,22 @@
 	}
 	}
 
 
 	.el-dialog-delete-room {
 	.el-dialog-delete-room {
-		height: 300px !important;
-		width: 500px !important;
+		height: fit-content !important;
+		width: fit-content !important;
 	}
 	}
 
 
 	.el-dialog-add-device {
 	.el-dialog-add-device {
-		height: 590px !important;
-		width: 500px !important;
+		height: fit-content !important;
+		width: fit-content !important;
 	}
 	}
 
 
 	.el-dialog-delete-air {
 	.el-dialog-delete-air {
-		height: 300px !important;
+		height: fit-content !important;
+		width: fit-content !important;
+	}
+	
+	.dialog-footer {
+		height: 68px !important;
 	}
 	}
 
 
 	.el-dialog-delete-room .el-dialog__header,
 	.el-dialog-delete-room .el-dialog__header,

+ 57 - 14
src/views/userMgr/index.vue

@@ -137,6 +137,12 @@
 				<el-form-item label="充值金额:" :label-width="formLabelWidth" :required="true" prop="amount">
 				<el-form-item label="充值金额:" :label-width="formLabelWidth" :required="true" prop="amount">
 					<el-input v-model="form.amount" autocomplete="off" maxlength="3" ref="amount_focus"></el-input>
 					<el-input v-model="form.amount" autocomplete="off" maxlength="3" ref="amount_focus"></el-input>
 				</el-form-item>
 				</el-form-item>
+				<el-form-item label="充值类别:" :label-width="formLabelWidth" :required="true">
+					<el-select v-model="form.lb" placeholder="充值类别">
+						<el-option v-for="item in form.options_lb" :key="item.id" :label="item.lb" :value="item.lb">
+						</el-option>
+					</el-select>
+				</el-form-item>
 				<el-form-item label="备  注:" :label-width="formLabelWidth">
 				<el-form-item label="备  注:" :label-width="formLabelWidth">
 					<el-input type="textarea" resize="none" :rows="4" placeholder="请输入内容" v-model="form.desc"
 					<el-input type="textarea" resize="none" :rows="4" placeholder="请输入内容" v-model="form.desc"
 						maxlength="100" show-word-limit></el-input>
 						maxlength="100" show-word-limit></el-input>
@@ -160,8 +166,12 @@
 		chongzhi,
 		chongzhi,
 		downloadExcel,
 		downloadExcel,
 		getUserClass,
 		getUserClass,
-		getUserGrade
+		getUserGrade,
+		getRechargeClass
 	} from '@/api/userMgr';
 	} from '@/api/userMgr';
+	import {
+		option
+	} from 'runjs';
 	export default {
 	export default {
 		data() {
 		data() {
 			var checkUserName = (rule, value, callback) => {
 			var checkUserName = (rule, value, callback) => {
@@ -176,7 +186,7 @@
 						callback();
 						callback();
 					}
 					}
 				}, 100);
 				}, 100);
-			}
+			};
 			var checkPhone = (rule, value, callback) => {
 			var checkPhone = (rule, value, callback) => {
 				if (!value) {
 				if (!value) {
 					return callback(new Error('请输入手机号'));
 					return callback(new Error('请输入手机号'));
@@ -189,7 +199,7 @@
 						callback();
 						callback();
 					}
 					}
 				}, 100);
 				}, 100);
-			}
+			};
 			var checkIdCard = (rule, value, callback) => {
 			var checkIdCard = (rule, value, callback) => {
 				if (!value) {
 				if (!value) {
 					return callback(new Error('请输入身份证'));
 					return callback(new Error('请输入身份证'));
@@ -203,7 +213,7 @@
 						callback();
 						callback();
 					}
 					}
 				}, 100);
 				}, 100);
-			}
+			};
 			var checkClassfy = (rule, value, callback) => {
 			var checkClassfy = (rule, value, callback) => {
 				if (!value) {
 				if (!value) {
 					return callback(new Error('请选择类别'));
 					return callback(new Error('请选择类别'));
@@ -216,7 +226,7 @@
 					return callback(new Error('类型与年级不一致'));
 					return callback(new Error('类型与年级不一致'));
 				}
 				}
 				callback();
 				callback();
-			}
+			};
 			var checkBj = (rule, value, callback) => {
 			var checkBj = (rule, value, callback) => {
 				if (!value) {
 				if (!value) {
 					return callback(new Error('请选择年级'));
 					return callback(new Error('请选择年级'));
@@ -229,7 +239,7 @@
 					return callback(new Error('类型与年级不一致'));
 					return callback(new Error('类型与年级不一致'));
 				}
 				}
 				callback();
 				callback();
-			}
+			};
 			var checkMoney = (rule, value, callback) => {
 			var checkMoney = (rule, value, callback) => {
 				if (!value) {
 				if (!value) {
 					return callback(new Error('金额不能为空'));
 					return callback(new Error('金额不能为空'));
@@ -244,7 +254,7 @@
 						callback();
 						callback();
 					}
 					}
 				}, 100);
 				}, 100);
-			}
+			};
 			return {
 			return {
 				// 当前用户的权限
 				// 当前用户的权限
 				currentUserLevel: this.$store.state.user.level,
 				currentUserLevel: this.$store.state.user.level,
@@ -256,8 +266,10 @@
 					user_name: '',
 					user_name: '',
 					amount: '',
 					amount: '',
 					remark: '',
 					remark: '',
+					options_lb: [],
+					lb: '',
 					admin_name: this.$store.state.user.name,
 					admin_name: this.$store.state.user.name,
-					password: this.$store.state.user.pwd
+					password: this.$store.state.user.pwd,
 				},
 				},
 				chongzhiRules: {
 				chongzhiRules: {
 					amount: [{
 					amount: [{
@@ -331,12 +343,38 @@
 			this.get_user_class()
 			this.get_user_class()
 			// 获取年级类别列表
 			// 获取年级类别列表
 			this.get_user_grade()
 			this.get_user_grade()
+			// 获取充值类别
+			this.get_recharge_class()
 		},
 		},
 		mounted() {
 		mounted() {
 			document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
 			document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
 		},
 		},
 		methods: {
 		methods: {
 			/**
 			/**
+			 * 充值类别
+			 */
+			get_recharge_class() {
+				getRechargeClass().then((res) => {
+					// console.log(res);
+					if (typeof res.code == 'undefined' || res.code == '') {
+						this.$message.error('返回数据格式问题,code未获取到!')
+						return
+					}
+
+					if (res.code == 200) {
+						// console.log(res.data);
+						let options = res.data.sort((a, b) => a.lb.localeCompare(b.lb))
+						this.form.options_lb = options
+						this.form.lb = this.form.options_lb[0].lb
+					} else {
+						this.$message.error(res.message)
+					}
+				}).catch((err) => {
+					// console.log(err);
+					this.$message.error(err.message)
+				})
+			},
+			/**
 			 * 获取用户类别列表数据
 			 * 获取用户类别列表数据
 			 */
 			 */
 			get_user_class() {
 			get_user_class() {
@@ -390,7 +428,7 @@
 			 */
 			 */
 			handler_download_excel() {
 			handler_download_excel() {
 				this.get_condition();
 				this.get_condition();
-				
+
 				// 开始发送请求,获取配置数据
 				// 开始发送请求,获取配置数据
 				downloadExcel(this.cond_data).then((res) => {
 				downloadExcel(this.cond_data).then((res) => {
 					// console.log(res);
 					// console.log(res);
@@ -420,10 +458,10 @@
 						let params = {
 						let params = {
 							id: this.form.id,
 							id: this.form.id,
 							balance: this.form.amount,
 							balance: this.form.amount,
+							re_state: this.form.lb,
 							admin_name: this.form.admin_name,
 							admin_name: this.form.admin_name,
 							password: this.form.password
 							password: this.form.password
 						}
 						}
-						// console.log(params);
 						// 开始发送请求,获取配置数据
 						// 开始发送请求,获取配置数据
 						chongzhi(params).then((res) => {
 						chongzhi(params).then((res) => {
 							// console.log(res);
 							// console.log(res);
@@ -508,7 +546,7 @@
 			get_user_list(param) {
 			get_user_list(param) {
 				this.loading = true
 				this.loading = true
 				this.get_condition();
 				this.get_condition();
-				
+
 				let data = this.cond_data;
 				let data = this.cond_data;
 				if (param == 'search') {
 				if (param == 'search') {
 					data.page = 1;
 					data.page = 1;
@@ -548,7 +586,7 @@
 				if (this.formInline.category !== '') {
 				if (this.formInline.category !== '') {
 					data.classfy = this.formInline.category;
 					data.classfy = this.formInline.category;
 				}
 				}
-				
+
 				this.cond_data = data;
 				this.cond_data = data;
 			},
 			},
 			/**
 			/**
@@ -599,6 +637,7 @@
 					this.form.sfzh = ''
 					this.form.sfzh = ''
 					this.form.user_name = ''
 					this.form.user_name = ''
 					this.form.amount = ''
 					this.form.amount = ''
+					this.form.recharge_class = ''
 					this.form.remark = ''
 					this.form.remark = ''
 				}
 				}
 			}
 			}
@@ -798,10 +837,14 @@
 
 
 <style>
 <style>
 	.add-user-dialog {
 	.add-user-dialog {
-		height: 600px !important;
+		height: fit-content !important;
 	}
 	}
 
 
 	.chongzhi-dialog {
 	.chongzhi-dialog {
-		height: 500px !important;
+		height: fit-content !important;
+	}
+
+	.dialog-footer {
+		height: 68px !important;
 	}
 	}
 </style>
 </style>