|
@@ -1,24 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
- <!-- <el-form-item label="充值设备编码" prop="rechargeEquipmentCode">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.rechargeEquipmentCode"-->
|
|
|
- <!-- placeholder="请输入充值设备编码"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- size="small"-->
|
|
|
- <!-- @keyup.enter.native="handleQuery"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="充值设备名称" prop="rechargeEquipmentName">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.rechargeEquipmentName"-->
|
|
|
- <!-- placeholder="请输入充值设备名称"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- size="small"-->
|
|
|
- <!-- @keyup.enter.native="handleQuery"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
|
|
|
<el-form-item label="用户编码" prop="loginName">
|
|
|
<el-input
|
|
|
v-model="queryParams.loginName"
|
|
@@ -43,36 +25,27 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
- <!-- <el-row :gutter="10" class="mb8">-->
|
|
|
- <!-- <el-col :span="1.5">-->
|
|
|
- <!-- <el-button-->
|
|
|
- <!-- type="danger"-->
|
|
|
- <!-- plain-->
|
|
|
- <!-- icon="el-icon-delete"-->
|
|
|
- <!-- size="mini"-->
|
|
|
- <!-- :disabled="multiple"-->
|
|
|
- <!-- @click="handleReturnPoints"-->
|
|
|
- <!-- v-hasPermi="['pns:integral:returnPoints']"-->
|
|
|
- <!-- >退还</el-button>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
|
|
- <!-- </el-row>-->
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ :loading="exportLoading"
|
|
|
+ @click="handleExport"
|
|
|
+ >导出
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="integralList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
- <!-- <el-table-column label="金额类型" align="center" prop="moneyType" :formatter="typeFormat"/>-->
|
|
|
<el-table-column label="用户编码" align="center" prop="loginName" width="200px"/>
|
|
|
<el-table-column label="用户名称" align="center" prop="nickName" width="200px"/>
|
|
|
- <!-- <el-table-column label="卡片编号" align="center" prop="cardNumber" />-->
|
|
|
- <!-- <el-table-column label="卡片名称" align="center" prop="cardName" />-->
|
|
|
+ <el-table-column label="手机号" align="center" prop="phonenumber" width="200px"/>
|
|
|
<el-table-column label="当前余额" align="center" prop="rechargeIntegral"/>
|
|
|
- <!-- <el-table-column label="充值设备编码" align="center" prop="rechargeEquipmentCode" />-->
|
|
|
- <!-- <el-table-column label="充值设备名称" align="center" prop="rechargeEquipmentName" />-->
|
|
|
- <!-- <el-table-column label="所属机构" align="center" prop="organizationCode" >-->
|
|
|
- <!-- <template slot-scope="scope">-->
|
|
|
- <!-- {{ orgFormatter(scope.row.organizationCode) }}-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
@@ -89,14 +62,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {doReturnPoints, integralGroupList} from "@/api/integral/integral";
|
|
|
-import user from "@/store/modules/user";
|
|
|
-
|
|
|
+import { doReturnPoints, integralGroupList, importGroupList } from '@/api/integral/integral'
|
|
|
+import user from '@/store/modules/user'
|
|
|
|
|
|
export default {
|
|
|
- name: "Refund",
|
|
|
+ name: 'Refund',
|
|
|
data() {
|
|
|
return {
|
|
|
+ exportLoading: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
@@ -109,7 +82,7 @@ export default {
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
// 积分管理表格数据
|
|
@@ -119,40 +92,33 @@ export default {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- moneyType: null,
|
|
|
- rechargeEquipmentCode: null,
|
|
|
- rechargeEquipmentName: null,
|
|
|
loginName: null,
|
|
|
- nickName: null,
|
|
|
- cardNumber: null,
|
|
|
- cardName: null,
|
|
|
- organizationCode: null,
|
|
|
- organizations: []
|
|
|
+ nickName: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {
|
|
|
nickName: ''
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询积分管理列表 */
|
|
|
getList() {
|
|
|
- this.queryParams.organizationCode = user.state.organ;
|
|
|
- this.loading = true;
|
|
|
+ this.queryParams.organizationCode = user.state.organ
|
|
|
+ this.loading = true
|
|
|
integralGroupList(this.queryParams).then(response => {
|
|
|
- this.integralList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.integralList = response.rows
|
|
|
+ this.total = response.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
+ this.open = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
@@ -169,18 +135,30 @@ export default {
|
|
|
organizationCode: null,
|
|
|
rechargeId: null,
|
|
|
updateTime: null
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
+ }
|
|
|
+ this.resetForm('form')
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ const queryParams = this.queryParams
|
|
|
+ this.$modal.confirm('是否确认导出所有用户余额数据?').then(() => {
|
|
|
+ this.exportLoading = true
|
|
|
+ return importGroupList(queryParams)
|
|
|
+ }).then(response => {
|
|
|
+ this.$download.name(response.msg)
|
|
|
+ this.exportLoading = false
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
@@ -190,41 +168,41 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleReturnPoints(row) {
|
|
|
- const submitArray = this.submitArray;
|
|
|
- const loginName = this.uniqueLoginName(this.submitArray);
|
|
|
- this.$modal.confirm('是否确认退还积分管理用户编码为"' + loginName + '"的数据项?').then(function () {
|
|
|
- return doReturnPoints(submitArray);
|
|
|
+ const submitArray = this.submitArray
|
|
|
+ const loginName = this.uniqueLoginName(this.submitArray)
|
|
|
+ this.$modal.confirm('是否确认退还积分管理用户编码为"' + loginName + '"的数据项?').then(function() {
|
|
|
+ return doReturnPoints(submitArray)
|
|
|
}).then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("退还成功");
|
|
|
+ this.getList()
|
|
|
+ this.$modal.msgSuccess('退还成功')
|
|
|
}).catch(() => {
|
|
|
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
typeFormat(row) {
|
|
|
if (row.moneyType === 1) {
|
|
|
- return '押金';
|
|
|
+ return '押金'
|
|
|
} else if (row.moneyType !== 1) {
|
|
|
return '余额'
|
|
|
} else {
|
|
|
- return '';
|
|
|
+ return ''
|
|
|
}
|
|
|
},
|
|
|
|
|
|
uniqueLoginName(arr) {
|
|
|
const res = new Map()
|
|
|
- return arr.filter(item => !res.has(arr.loginName) && res.set(arr.loginName, 1)).map(e => e.loginName);
|
|
|
+ return arr.filter(item => !res.has(arr.loginName) && res.set(arr.loginName, 1)).map(e => e.loginName)
|
|
|
},
|
|
|
|
|
|
orgFormatter(val) {
|
|
|
- let name = '';
|
|
|
+ let name = ''
|
|
|
user.state.organDicts.forEach(item => {
|
|
|
if (item.deptCode == val) {
|
|
|
- name = item.deptName;
|
|
|
+ name = item.deptName
|
|
|
}
|
|
|
})
|
|
|
- return name;
|
|
|
+ return name
|
|
|
}
|
|
|
}
|
|
|
}
|