|
|
@@ -1,18 +1,16 @@
|
|
|
<template>
|
|
|
<div class="context">
|
|
|
<div class="panel">
|
|
|
- <h5>绑定记录</h5>
|
|
|
- <div class="panel-body" v-if="false">
|
|
|
+ <el-page-header @back="goBack" content="绑定记录">
|
|
|
+ </el-page-header>
|
|
|
+ <h5></h5>
|
|
|
+ <div class="panel-body" v-if="true">
|
|
|
<div class="panel_control">
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="4">
|
|
|
- <em>姓名:</em>
|
|
|
- <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <em>手机号:</em>
|
|
|
- <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
|
|
|
- </el-col>
|
|
|
+ <!--<el-col :span="4">-->
|
|
|
+ <!--<em>心率带ID:</em>-->
|
|
|
+ <!--<el-input v-model="panel.hrId" placeholder="请输入心率带ID"></el-input>-->
|
|
|
+ <!--</el-col>-->
|
|
|
<el-col :span="7">
|
|
|
<em>日期:</em>
|
|
|
<el-date-picker
|
|
|
@@ -23,17 +21,6 @@
|
|
|
end-placeholder="结束日期">
|
|
|
</el-date-picker>
|
|
|
</el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <em>状态:</em>
|
|
|
- <el-select v-model="panel.classId">
|
|
|
- <el-option
|
|
|
- v-for="item in panel.options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
|
|
|
</el-button>
|
|
|
@@ -62,19 +49,18 @@
|
|
|
width="50">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Name"
|
|
|
+ prop="UserName"
|
|
|
label="绑定用户"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="sn"
|
|
|
+ prop="Sn"
|
|
|
label="序列号"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="ClassName"
|
|
|
label="课程"
|
|
|
- width="110"
|
|
|
sortable
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -83,7 +69,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="CreatedAt"
|
|
|
+ prop="Base.CreatedAt"
|
|
|
label="绑定时间"
|
|
|
width="180"
|
|
|
:formatter="filterFmtDate"
|
|
|
@@ -91,13 +77,31 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="CreatedAt"
|
|
|
+ prop="Base.UpdatedAt"
|
|
|
label="解绑时间"
|
|
|
width="180"
|
|
|
:formatter="filterFmtDate"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="IsPrivate"
|
|
|
+ label="是否私有"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.IsPrivate == 1">私有</span>
|
|
|
+ <span v-if="scope.row.IsPrivate == 2">公共</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!--<el-table-column-->
|
|
|
+ <!--prop="BindStatus"-->
|
|
|
+ <!--label="绑定状态"-->
|
|
|
+ <!-->-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--<span v-if="scope.row.BindStatus == 1" style="color: greenyellow">绑定</span>-->
|
|
|
+ <!--<span v-if="scope.row.BindStatus == 2" style="color:red;">解绑</span>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
</el-table>
|
|
|
<br>
|
|
|
<el-pagination
|
|
|
@@ -113,10 +117,7 @@
|
|
|
<script>
|
|
|
import Global from '../Global.js'
|
|
|
import {
|
|
|
- VipUserConsumeListQuery,
|
|
|
- testTable,
|
|
|
- testSelect,
|
|
|
- ClassListQuery,
|
|
|
+ HrSensorsBindHistory,
|
|
|
} from "../api/getApiRes";
|
|
|
|
|
|
let qs = require('qs');
|
|
|
@@ -134,12 +135,12 @@
|
|
|
dialogValue: [],
|
|
|
// panel 配置项目
|
|
|
panel: {
|
|
|
- name: '',
|
|
|
+ hrId: this.$route.query.hrId,
|
|
|
phone: '',
|
|
|
classId: '',
|
|
|
usercode: '',
|
|
|
username: '',
|
|
|
- timeScope: globalBt2(30),
|
|
|
+ timeScope: globalBt2(3),
|
|
|
compname: '',
|
|
|
keyword: '',
|
|
|
USERCODE: '',
|
|
|
@@ -187,95 +188,12 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.panelSelect();
|
|
|
this.getTableQuery();
|
|
|
},
|
|
|
methods: {
|
|
|
- // 编辑
|
|
|
- editMember(row) {
|
|
|
- let that = this;
|
|
|
- this.clearForm();
|
|
|
-
|
|
|
- this.form.userCode = row.userCode;
|
|
|
- this.form.name = row.name;
|
|
|
- this.form.memberType = row.vipType;
|
|
|
- this.form.lesson = row.Recovered;
|
|
|
- this.form.gift = row.Recovered;
|
|
|
- this.form.memo = row.memo;
|
|
|
- this.form.btnType = 1;
|
|
|
-
|
|
|
- this.form.shopId = row.Id;
|
|
|
- this.dialogMemberVisible = true
|
|
|
- this.dialogTitle = '编辑会员'
|
|
|
- },
|
|
|
- // 禁用
|
|
|
- pauseRow(row) {
|
|
|
- let that = this;
|
|
|
- this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- Id: row.Id,
|
|
|
- status: 0,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testTable(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: row.name + '禁用成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- // table 重载
|
|
|
- that.getTableQuery();
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消禁用'
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // 启用
|
|
|
- runRow(row) {
|
|
|
- let that = this;
|
|
|
- this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- Id: row.Id,
|
|
|
- status: 1,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testTable(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: row.name + '启用成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- // table 重载
|
|
|
- that.getTableQuery();
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消启用'
|
|
|
- });
|
|
|
+ goBack(){
|
|
|
+ this.$router.push({
|
|
|
+ path: '/heartEquip', query: {}
|
|
|
});
|
|
|
},
|
|
|
// 表格合计
|
|
|
@@ -306,431 +224,6 @@
|
|
|
return sums;
|
|
|
},
|
|
|
// 关闭所有
|
|
|
- allDialogClose() {
|
|
|
- this.dialogVisible = false;
|
|
|
- this.dialogGift = false;
|
|
|
- this.dialogLesson = false;
|
|
|
- this.dialogExpTime = false;
|
|
|
- this.dialogLessonTable = false;
|
|
|
- },
|
|
|
- // 用户禁用 todo
|
|
|
- // 用户启用 todo
|
|
|
- // 有效期调整
|
|
|
- ExpTimeChange() {
|
|
|
- // 仅针对年费用户,使用日期格式
|
|
|
- this.allDialogClose();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- let row = this.tableRadio;
|
|
|
- if (parseInt(row.vipType) == 2) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,充值会员不能调整有效期',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- this.form.expTime = row.expTime;
|
|
|
- this.form.rowName = row.name;
|
|
|
- this.dialogVisible = true;
|
|
|
- this.dialogExpTime = true;
|
|
|
- },
|
|
|
- // 课时调整
|
|
|
- lessonChange() {
|
|
|
- this.allDialogClose();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- let row = this.tableRadio;
|
|
|
- this.form.lesson = row.Recovered;
|
|
|
- this.form.rowName = row.name;
|
|
|
- this.dialogVisible = true;
|
|
|
- this.dialogLesson = true;
|
|
|
-
|
|
|
- },
|
|
|
- // 赠送调整
|
|
|
- giftChange() {
|
|
|
- this.allDialogClose();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- let row = this.tableRadio;
|
|
|
- this.form.gift = row.Recovered;
|
|
|
- this.form.rowName = row.name;
|
|
|
- this.dialogVisible = true;
|
|
|
- this.dialogGift = true;
|
|
|
-
|
|
|
- },
|
|
|
- // 增删会员课程
|
|
|
- lessonStudenChange() {
|
|
|
- this.allDialogClose();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- let row = this.tableRadio;
|
|
|
- this.form.gift = row.Recovered;
|
|
|
- this.form.rowName = row.name;
|
|
|
- this.dialogVisible = true;
|
|
|
- this.dialogLessonTable = true;
|
|
|
- },
|
|
|
- // 确认提交新增会员
|
|
|
- confirmMember() {
|
|
|
- let that = this;
|
|
|
- // checkNum
|
|
|
- if (!that.form.userCode) {
|
|
|
- this.$message.error('错了哦,手机号不能为空');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!globalCheckPhone(that.form.userCode)) {
|
|
|
- this.$message.error('错了哦,手机号格式不正确');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!that.form.name) {
|
|
|
- this.$message.error('错了哦,会员名不能为空');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (that.form.name.length > 8) {
|
|
|
- this.$message.error('错了哦,会员名字数超过8个字');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (that.form.memo) {
|
|
|
- if (that.form.memo.length > 200) {
|
|
|
- this.$message.error('错了哦,备注字数超过200个字');
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- name: that.form.name,
|
|
|
- memberType: that.form.memberType,
|
|
|
- lesson: that.form.lesson,
|
|
|
- gift: that.form.gift,
|
|
|
- memo: that.form.memo,
|
|
|
- dialogValue: that.form.dialogValue,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- // 关闭弹窗
|
|
|
- that.dialogMemberVisible = false;
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '会员添加成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- confirmEditMember() {
|
|
|
- console.log(123);
|
|
|
- let that = this;
|
|
|
- // checkNum
|
|
|
- if (!that.form.userCode) {
|
|
|
- this.$message.error('错了哦,手机号不能为空');
|
|
|
- return false
|
|
|
- }
|
|
|
- console.log(that.form.userCode);
|
|
|
- if (!globalCheckPhone(that.form.userCode)) {
|
|
|
- this.$message.error('错了哦,手机号格式不正确');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!that.form.name) {
|
|
|
- this.$message.error('错了哦,会员名不能为空');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (that.form.name.length > 8) {
|
|
|
- this.$message.error('错了哦,会员名字数超过8个字');
|
|
|
- return false
|
|
|
- }
|
|
|
- if (that.form.memo) {
|
|
|
- if (that.form.memo.length > 200) {
|
|
|
- this.$message.error('错了哦,备注字数超过200个字');
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- name: that.form.name,
|
|
|
- memberType: that.form.memberType,
|
|
|
- lesson: that.form.lesson,
|
|
|
- gift: that.form.gift,
|
|
|
- memo: that.form.memo,
|
|
|
- dialogValue: that.form.dialogValue,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- // 关闭弹窗
|
|
|
- that.dialogMemberVisible = false;
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '会员信息编辑成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 确认提交课时
|
|
|
- confirmLesson() {
|
|
|
- let that = this;
|
|
|
- // checkNum
|
|
|
-
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- lesson: that.form.lesson,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- // 关闭弹窗
|
|
|
- that.dialogVisible = false;
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '课时调整成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 确认提交赠送
|
|
|
- confirmGift() {
|
|
|
- let that = this;
|
|
|
- // checkNum
|
|
|
-
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- gift: that.form.gift,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- // 关闭弹窗
|
|
|
- that.dialogVisible = false;
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '赠送课时调整成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 确认提交有效期
|
|
|
- confirmExpTime() {
|
|
|
- let that = this;
|
|
|
- // checkNum
|
|
|
-
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- expTime: that.form.expTime,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- // 关闭弹窗
|
|
|
- that.dialogVisible = false;
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '赠送课时调整成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 确认提交会员课程
|
|
|
- confirmLessonTable() {
|
|
|
- let that = this;
|
|
|
- // checkNum
|
|
|
-
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- dialogValue: that.form.dialogValue,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- // 关闭弹窗
|
|
|
- that.dialogVisible = false;
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '会员课程调整成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 加载选项
|
|
|
- panelSelect() {
|
|
|
- let that = this;
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- classType: 1//去掉午休
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- ClassListQuery(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- if (json.Rs == null) return false
|
|
|
- that.panel.options = turnClassResToOption(json.Rs);
|
|
|
- that.panel.options.unshift({label: "全部", value: ''})
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 新增会员
|
|
|
- addMember() {
|
|
|
- this.clearForm();
|
|
|
- this.dialogMemberVisible = true
|
|
|
- this.btnType = 0;
|
|
|
- this.dialogTitle = '新增会员'
|
|
|
- },
|
|
|
- // 删除
|
|
|
- delList() {
|
|
|
- let that = this;
|
|
|
- // checkNum
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
- let detectorid = that.tableRadio.Id;
|
|
|
-
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- detectorid: detectorid,
|
|
|
- status: 9,//0禁用1启用9删除
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
-
|
|
|
- this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- testSelect(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '选中的会员已删除!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
- });
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消删除'
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
@@ -739,14 +232,14 @@
|
|
|
// 按钮倒计时
|
|
|
let that = this;
|
|
|
that.serachBtnStatus = true;
|
|
|
- let totalTime = 2
|
|
|
+ let totalTime = 2;
|
|
|
let clock = window.setInterval(() => {
|
|
|
- totalTime--
|
|
|
+ totalTime--;
|
|
|
if (totalTime < 0) {
|
|
|
totalTime = 2;
|
|
|
that.serachBtnStatus = false;
|
|
|
}
|
|
|
- }, 1000)
|
|
|
+ }, 1000);
|
|
|
this.getTableQuery();
|
|
|
this.$message.success('查询完毕');
|
|
|
},
|
|
|
@@ -758,16 +251,17 @@
|
|
|
},
|
|
|
// 页面数据查询
|
|
|
getTableQuery() {
|
|
|
+ console.log(123);
|
|
|
let that = this;
|
|
|
that.loading = true;
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- classId: that.router.query.classId,
|
|
|
- start: 1,//
|
|
|
- tableMax: 9999,//
|
|
|
+ hrId: this.$route.query.hrId,
|
|
|
+ bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:01",
|
|
|
+ et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- VipUserConsumeListQuery(postdata).then(res => {
|
|
|
+ HrSensorsBindHistory(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.loading = false;
|
|
|
@@ -778,7 +272,6 @@
|
|
|
that.allTableData = [];
|
|
|
that.recordsTotal = 0;
|
|
|
}
|
|
|
-
|
|
|
// 设置分页数据
|
|
|
that.setPaginations();
|
|
|
} else {
|
|
|
@@ -786,15 +279,6 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 导出excel
|
|
|
- btnExpAll() {
|
|
|
- let that = this;
|
|
|
- let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
|
|
|
- let bt = globaltime2String(that.panel.time1[0]);
|
|
|
- let et = globaltime2String(that.panel.time1[1]);
|
|
|
- let usercode = that.panel.usercode;
|
|
|
- window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
|
|
|
- },
|
|
|
// 设置分页数据
|
|
|
setPaginations() {
|
|
|
// 分页属性
|
|
|
@@ -842,16 +326,10 @@
|
|
|
let that = this;
|
|
|
return nonTfmtDate(column, 11);
|
|
|
},
|
|
|
- // 过滤金额
|
|
|
- filterMoney(value, row, column) {
|
|
|
- let that = this;
|
|
|
- return parseFloat(column).toFixed(2);
|
|
|
- },
|
|
|
},
|
|
|
watch: {
|
|
|
$route(to) {
|
|
|
- if (to.name == 'cost') {
|
|
|
- this.panelSelect();
|
|
|
+ if (to.name == 'bindRecord') {
|
|
|
this.getTableQuery();
|
|
|
}
|
|
|
},
|