|
|
@@ -7,11 +7,11 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="4">
|
|
|
<em>姓名:</em>
|
|
|
- <el-input v-model="panel.USERCODE" placeholder="请输入姓名"></el-input>
|
|
|
+ <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<em>手机号:</em>
|
|
|
- <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
|
|
|
+ <el-input v-model="panel.phone" placeholder="请输入手机号"></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<em>日期:</em>
|
|
|
@@ -25,9 +25,9 @@
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<em>预约课程:</em>
|
|
|
- <el-select v-model="panel.taskstatus">
|
|
|
+ <el-select v-model="panel.classId">
|
|
|
<el-option
|
|
|
- v-for="item in panel.options"
|
|
|
+ v-for="item in panel.classOptions"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value">
|
|
|
@@ -36,7 +36,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<em>状态:</em>
|
|
|
- <el-select v-model="panel.taskstatus">
|
|
|
+ <el-select v-model="panel.status">
|
|
|
<el-option
|
|
|
v-for="item in panel.options"
|
|
|
:key="item.value"
|
|
|
@@ -69,7 +69,7 @@
|
|
|
width="50">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Name"
|
|
|
+ prop="UserName"
|
|
|
label="会员名"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
@@ -80,39 +80,48 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
+ prop="ClassName"
|
|
|
label="预约课程"
|
|
|
sortable
|
|
|
>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="lessons" :style="{ background:scope.row.ClassColor }">{{scope.row.ClassName}}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="ConsumeNormalhour"
|
|
|
- label="消耗课时"
|
|
|
+ prop="ConsumeHour"
|
|
|
+ label="课时"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="ConsumeGifthour"
|
|
|
- label="消耗赠送"
|
|
|
+ prop="CurrentDate"
|
|
|
+ label="预约日期"
|
|
|
+ width="180"
|
|
|
+ :formatter="filterFmtDate"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="ExpTime"
|
|
|
- label="预约时间"
|
|
|
+ prop="BeginStr"
|
|
|
+ label="上课时间"
|
|
|
width="180"
|
|
|
- :formatter="filterFmtDate"
|
|
|
sortable
|
|
|
>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.BeginStr}} - {{scope.row.EndStr}}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="vipType"
|
|
|
+ prop="Status"
|
|
|
label="状态"
|
|
|
sortable
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.vipType == 1">正常下课</span>
|
|
|
- <span v-if="scope.row.vipType == 2">预约取消</span>
|
|
|
+ <span v-if="scope.row.Status == 1">已预约</span>
|
|
|
+ <span v-if="scope.row.Status == 2">已取消</span>
|
|
|
+ <span v-if="scope.row.Status == 3">预约未到</span>
|
|
|
+ <span v-if="scope.row.Status == 4">已完成</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -124,93 +133,6 @@
|
|
|
@current-change="pageChange"
|
|
|
></el-pagination>
|
|
|
</div>
|
|
|
-
|
|
|
- <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="1200px">
|
|
|
- <div class="dialogContent">
|
|
|
- <div class="pull-left">
|
|
|
- <el-form ref="form" :model="form" label-width="160px">
|
|
|
- <el-form-item label="手机号">
|
|
|
- <el-input v-model="form.userCode"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="会员名">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="会员类型">
|
|
|
- <el-select v-model="form.memberType" placeholder="请选择所属门店">
|
|
|
- <el-option
|
|
|
- v-for="item in memberTypes"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="课时">
|
|
|
- <el-input-number v-model="form.lesson" :min="0" :max="99999" label="(天)"></el-input-number>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="赠送课时">
|
|
|
- <el-input-number v-model="form.gift" :min="0" :max="99999" label="(天)"></el-input-number>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="备注">
|
|
|
- <el-input v-model="form.memo"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <div class="pull-right">
|
|
|
- <el-form ref="form" :model="form" label-width="160px">
|
|
|
- <el-form-item label="会员课程">
|
|
|
- <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="dialogFooter">
|
|
|
- <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
|
|
|
- <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
|
|
|
- </el-button>
|
|
|
- <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <el-dialog :visible.sync="dialogVisible">
|
|
|
- <div class="dialogTitle">
|
|
|
- <h5>
|
|
|
- 用户:
|
|
|
- <em class="blue">【 {{form.rowName}}】</em>
|
|
|
- <span v-if="dialogLesson">当前课时</span>
|
|
|
- <span v-if="dialogGift">当前赠送课时</span>
|
|
|
- <span v-if="dialogExpTime">当前到期时间</span>
|
|
|
- <span v-if="dialogLessonTable">当前会员课程</span>
|
|
|
- </h5>
|
|
|
- </div>
|
|
|
- <div v-if="dialogLesson">
|
|
|
- <el-input-number v-model="form.lesson" :min="0" :max="9999" label="课时调整"></el-input-number>
|
|
|
- </div>
|
|
|
- <div v-if="dialogGift">
|
|
|
- <el-input-number v-model="form.gift" :min="0" :max="9999" label="赠送课时调整"></el-input-number>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div v-if="dialogExpTime">
|
|
|
- <el-date-picker
|
|
|
- v-model="form.expTime"
|
|
|
- type="date"
|
|
|
- placeholder="选择日期">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- <div v-if="dialogLessonTable">
|
|
|
- <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="dialogFooter">
|
|
|
- <!-- 当前课时-->
|
|
|
- <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
|
|
|
- <el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
|
|
|
- <el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
|
|
|
- <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
|
|
|
- </el-button>
|
|
|
- <el-button size="small" @click="dialogVisible = false">取消</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -218,8 +140,7 @@
|
|
|
import Global from '../Global.js'
|
|
|
import {
|
|
|
OrderListQuery,
|
|
|
- testTable,
|
|
|
- testSelect
|
|
|
+ ClassListQuery,
|
|
|
} from "../api/getApiRes";
|
|
|
|
|
|
let qs = require('qs');
|
|
|
@@ -236,6 +157,8 @@
|
|
|
dialogValue: [],
|
|
|
// panel 配置项目
|
|
|
panel: {
|
|
|
+ status: '',
|
|
|
+ classId: '',
|
|
|
usercode: '',
|
|
|
username: '',
|
|
|
timeScope: globalBt2(30),
|
|
|
@@ -255,10 +178,13 @@
|
|
|
fileList: [],
|
|
|
multipleSelection: [],
|
|
|
detectedmac: '',
|
|
|
+ classOptions:[],
|
|
|
options: [
|
|
|
- {value: 99, label: '全部'},
|
|
|
- {value: 1, label: '进行中'},
|
|
|
- {value: 2, label: '已完成'},
|
|
|
+ {value: '', label: '全部'},
|
|
|
+ {value: 1, label: '已预约'},
|
|
|
+ {value: 2, label: '已取消'},
|
|
|
+ {value: 3, label: '预约未到'},
|
|
|
+ {value: 4, label: '已完成'},
|
|
|
],
|
|
|
endTypeOptions: [
|
|
|
{value: 99, label: '全部'},
|
|
|
@@ -300,437 +226,6 @@
|
|
|
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: '已取消启用'
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // 关闭所有
|
|
|
- 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.multipleSelection[0];
|
|
|
- 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.multipleSelection[0];
|
|
|
- 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.multipleSelection[0];
|
|
|
- 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.multipleSelection[0];
|
|
|
- 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;
|
|
|
@@ -738,85 +233,22 @@
|
|
|
token: localStorage.token,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ ClassListQuery(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
- that.form.dialogdata = json.Rs;
|
|
|
+ that.panel.classOptions = turnClassResToOption(json.Rs);
|
|
|
+ that.panel.classOptions.unshift({value:'',label:'全部'})
|
|
|
} 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.multipleSelection[0].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;
|
|
|
},
|
|
|
// 查询按钮
|
|
|
query() {
|
|
|
- // this.getTableQuery();
|
|
|
+ this.getTableQuery();
|
|
|
this.$message.success('查询完毕');
|
|
|
},
|
|
|
clearForm() {
|
|
|
@@ -833,12 +265,12 @@
|
|
|
// 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- supregionid: 0,//
|
|
|
- regionid: this.panel.regionid,//
|
|
|
- comid: 1,//
|
|
|
- tagname: that.panel.tagname,//标签名
|
|
|
- start: 1,//
|
|
|
- tableMax: 9999,//
|
|
|
+ classId: that.panel.classId,//
|
|
|
+ name: that.panel.name,//
|
|
|
+ phone: that.panel.phone,//
|
|
|
+ beginOrdertime: that.panel.beginOrdertime,//
|
|
|
+ endOrdertime: that.panel.endOrdertime,//
|
|
|
+ status: that.panel.status,//标签名
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
OrderListQuery(postdata).then(res => {
|
|
|
@@ -1032,4 +464,9 @@
|
|
|
/deep/ .el-date-editor .el-range-separator {
|
|
|
line-height: 22px;
|
|
|
}
|
|
|
+ .lessons {
|
|
|
+ padding: 1px 7px;
|
|
|
+ border-radius: 250px;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
</style>
|