浏览代码

Signed-off-by: Changpeng Duan <838560574@qq.com>

Changpeng Duan 5 年之前
父节点
当前提交
1d583be8c7

+ 2 - 1
pc/src/Global.js

@@ -35,6 +35,7 @@ globalBt = function () {
 globalBt2 = function (days) {
     const et = new Date();
     const bt = new Date();
+    days = days ? days : 0;
     bt.setTime(bt.getTime() - 3600 * 1000 * 24 * days);
     return [bt, et];
 };
@@ -74,7 +75,7 @@ globalValid = function (data, mins, maxs, text, that) {
     let max = parseInt(maxs);
     let dispalyMin = min + 1;
     let title = '警告';
-    if (thisVal == '' ) {
+    if (thisVal == '') {
         that.$message({
             message: text + '不能为空!',
             type: 'warning'

+ 15 - 2
pc/src/assets/css/panel.css

@@ -58,7 +58,7 @@
 }
 
 .panel /deep/ .el-input__inner {
-    width: 150px;
+    width: 140px;
     height: 30px;
     line-height: 30px;
     margin-top: 5px;
@@ -86,7 +86,7 @@
 }
 
 .panel /deep/ .el-input {
-    width: 150px;
+    width: 140px;
 }
 
 .panel .panel_control em {
@@ -281,4 +281,17 @@
 }
  .el-table--border th, .el-table__fixed-right-patch {
     background-color: #F0F2F5!important;
+}
+ .panel /deep/ .el-col-4 {
+     padding-left: 3px!important;
+     padding-right: 3px!important;
+ }
+ .panel /deep/ .el-input__icon {
+     line-height: 20px;
+ }
+  .el-transfer__buttons {
+     width: 66px;
+ }
+.el-transfer .el-button+.el-button {
+    margin-left: 0;
 }

+ 1 - 0
pc/src/components/Navside.vue

@@ -98,6 +98,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
+        margin-bottom: 16px;
         padding-top: 19px;
         padding-bottom: 19px;
         border-bottom: 1px solid #F0F2F5;

+ 42 - 0
pc/src/router/index.js

@@ -97,6 +97,48 @@ const routes = [
                 meta: {
                     title: "教练管理",
                 }
+            },{
+                path: '/appoint',
+                name: 'appoint',
+                component: () => import('@/views/appoint.vue'),
+                meta: {
+                    title: "预约管理",
+                }
+            },{
+                path: '/record',
+                name: 'record',
+                component: () => import('@/views/record.vue'),
+                meta: {
+                    title: "预约记录",
+                }
+            },{
+                path: '/cost',
+                name: 'cost',
+                component: () => import('@/views/cost.vue'),
+                meta: {
+                    title: "消费记录",
+                }
+            },{
+                path: '/setting',
+                name: 'setting',
+                component: () => import('@/views/setting.vue'),
+                meta: {
+                    title: "系统设置",
+                }
+            },{
+                path: '/finish',
+                name: 'finish',
+                component: () => import('@/views/finish.vue'),
+                meta: {
+                    title: "下课管理",
+                }
+            },{
+                path: '/finishDetail',
+                name: 'finishDetail',
+                component: () => import('@/views/finishDetail.vue'),
+                meta: {
+                    title: "下课管理",
+                }
             },{
                 path: '/yhgl',
                 name: 'Yhgl',

+ 128 - 27
pc/src/views/AdminSetting.vue

@@ -1,23 +1,30 @@
 <template>
-    <div class="pages">
-        <el-card class="box-card">
-        <div class="form_container">
-            <el-form ref="form" :model="form" label-width="110px" :rules="rules">
-                <el-form-item label="请输入原密码" prop="old">
-                    <el-input v-model="form.old" type="password"></el-input>
-                </el-form-item>
-                <el-form-item label="新密码" prop="newpwd">
-                    <el-input v-model="form.newpwd" type="password"></el-input>
-                </el-form-item>
-                <el-form-item label="确认密码" prop="again">
-                    <el-input v-model="form.again" type="password"></el-input>
-                </el-form-item>
-                <el-form-item>
-                    <el-button size="small" type="primary" @click="onSubmit('form')">确认</el-button>
-                </el-form-item>
-            </el-form>
+    <div class="context">
+        <div class="panel">
+            <h5>系统设置</h5>
+            <div class="pages">
+                <el-tabs v-model="activeName" type="card">
+                    <el-tab-pane label="密码修改" name="second">
+                        <div class="form_container" >
+                            <el-form ref="form" :model="form" label-width="110px" :rules="rules">
+                                <el-form-item label="请输入原密码" prop="old">
+                                    <el-input v-model="form.old" type="password"></el-input>
+                                </el-form-item>
+                                <el-form-item label="新密码" prop="newpwd">
+                                    <el-input v-model="form.newpwd" type="password"></el-input>
+                                </el-form-item>
+                                <el-form-item label="确认密码" prop="again">
+                                    <el-input v-model="form.again" type="password"></el-input>
+                                </el-form-item>
+                                <el-form-item>
+                                    <el-button type="" @click="onSubmit('form')">确认修改</el-button>
+                                </el-form-item>
+                            </el-form>
+                        </div>
+                    </el-tab-pane>
+                </el-tabs>
+            </div>
         </div>
-        </el-card>
     </div>
 </template>
 
@@ -46,8 +53,11 @@
                 }
             };
             return {
+                activeName: 'second',
+                pageApppoint:true,
                 valImgSrc: '',
                 overtime: '',
+                appoint: '0',
                 form: {
                     old: '',
                     newpwd: '',
@@ -80,8 +90,33 @@
         mounted() {
             // 读取验证码
             this.overtime = new Date();
+
+            // 读取当前店铺预约状态 todo
         },
         methods: {
+            // 微信可见与否
+            changeWechat(e,appoint) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    wxVisible: e,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(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);
+                    }
+                })
+            },
             // 跳转tab页面
             goTab(url) {
                 this.$router.push({path: url});
@@ -168,7 +203,6 @@
 </script>
 <style scoped>
     @import "../assets/css/panel.css";
-
     ul {
         margin: 0;
         padding: 0;
@@ -216,13 +250,7 @@
     }
 
     .pages {
-        /*position: absolute;*/
-        /*top: 0;*/
-        /*bottom: 0;*/
-        /*left: 0;*/
-        /*right: 0;*/
         width: 100%;
-        /*height: 100%;*/
         min-height: 600px;
         overflow: hidden;
         display: block;
@@ -263,7 +291,7 @@
 
     /deep/ .el-form-item__label {
         width: 120px !important;
-        color: #6DC1FF;
+        /*color: #6DC1FF;*/
         font-size: 16px;
         float: left;
     }
@@ -278,7 +306,7 @@
     /deep/ .el-input__inner {
         background: none;
         color: #6DC1FF;
-        border: 1px solid #005EA2;
+        border: 1px solid #DCDFE6;
         border-radius: 0;
     }
 
@@ -301,4 +329,77 @@
         float: right;
         bottom: 35px;
     }
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+    .change button {
+        float: left;
+        margin-right: 10px;
+    }
+    .change button.el-button--primary {
+        height: 38px;
+        color:#fff;
+        background: #409EFF;
+        padding: 3px 5px;
+        width: 120px;
+    }
+    .form_container {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-left: 0;
+        padding-right: 0;
+    }
+    .form_container .gary {
+        width: 100%;
+        height: 64px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding: 34px 32px;
+        padding-bottom: 0;
+        background: #F0F2F5;
+        border-radius: 2px;
+    }
+    .gary span {
+        float: left;
+        margin-right: 30px;
+    }
+    /deep/ .el-switch {
+        float: left;
+    }
+    .gary em {
+        position: relative;
+        top: -10px;
+        left: 30px;
+        padding: 13px 37px;
+        float: left;
+        background: #fff;
+        border-radius: 250px;
+        color: #E38F00;
+        font-size: 14px;
+        font-style: normal;
+    }
+    /deep/ .el-form {
+        width: 600px;
+        float: left;
+    }
+    /deep/  .el-form-item__content {
+        width: 437px;
+        float: left;
+    }
+    .panel /deep/ .el-input__inner {
+        width: 437px;
+        float: left;
+    }
 </style>

+ 2 - 2
pc/src/views/Basic.vue

@@ -8,7 +8,7 @@
                     <el-input v-model="form.pvalue_interval" placeholder="请输入刷新频率"></el-input>
                 </el-form-item>
                 <el-form-item>
-                    <el-button size="small" type="primary" @click="onSubmit">确认修改</el-button>
+                    <el-button size="small" type="primary" @click="onSubmit">确认编辑</el-button>
                 </el-form-item>
             </el-form>
         </div>
@@ -70,7 +70,7 @@
                     if (json.Code == 0) {
                         that.$message({
                             showClose: true,
-                            message: '接口修改成功!',
+                            message: '接口编辑成功!',
                             type: 'success'
                         });
                     } else {

+ 2 - 1
pc/src/views/EditLessonTable.vue

@@ -9,7 +9,8 @@
                 <el-row :gutter="20">
                     <el-col :span="9">
                         <em>课程表模板名称:</em>
-                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
+                        <span>{{panel.name}}</span>
+<!--                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>-->
                     </el-col>
                 </el-row>
             </div>

+ 5 - 5
pc/src/views/Equip.vue

@@ -35,7 +35,7 @@
         </div>
         <div class="contorl">
             <el-button size="small" type="primary" @click="addList">添加</el-button>
-            <el-button size="small" type="primary" @click="editList">修改</el-button>
+            <el-button size="small" type="primary" @click="editList">编辑</el-button>
             <el-button size="small" type="primary" @click="delList">删除</el-button>
         </div>
         <el-table
@@ -262,7 +262,7 @@
                 // dialog
                 dialog_state: false,
                 dialog_title: '',
-                dialog_type: '',//类型,1是添加,2是修改
+                dialog_type: '',//类型,1是添加,2是编辑
                 dialog: {
                     mac: '',
                     comId: 1,
@@ -598,7 +598,7 @@
                     return false
                 }
                 this.dialog_state = true;
-                this.dialog_title = '修改设备信息';
+                this.dialog_title = '编辑设备信息';
                 this.dialog_type = 2;
 
                 // 读取本条记录
@@ -745,7 +745,7 @@
                     }
                 });
             },
-            // 提交修改设备信息
+            // 提交编辑设备信息
             confirmEditEquip() {
                 let that = this;
                 // checkVal
@@ -809,7 +809,7 @@
                     }
                 });
             },
-            // 修改设备状态
+            // 编辑设备状态
             getDetectorEditStatus(detectorid, status, text) {
                 let that = this;
                 let param = {

+ 31 - 5
pc/src/views/Lesson.vue

@@ -21,6 +21,11 @@
                         type="selection"
                         width="55">
                 </el-table-column>
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
                 <el-table-column
                         prop="name"
                         label="课程名称"
@@ -38,6 +43,18 @@
                         <span v-if="scope.row.vipType == 0">否</span>
                     </template>
                 </el-table-column>
+                <el-table-column
+                        prop="vipType"
+                        label="课程类型"
+                        width="110"
+                        align="center"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.vipType == 1">占用课时</span>
+                        <span v-if="scope.row.vipType == 0">不占课时</span>
+                    </template>
+                </el-table-column>
                 <el-table-column
                         prop="Recovered"
                         label="消耗课时"
@@ -110,7 +127,7 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" @click="editLesson(scope.row)">修改</el-button>
+                        <el-button type="text" @click="editLesson(scope.row)">编辑</el-button>
                         <el-button type="text" @click="Lessonmember(scope.row)">课程会员</el-button>
                     </template>
                 </el-table-column>
@@ -149,6 +166,15 @@
                                     inactive-color="#D9D9D9">
                             </el-switch>
                         </el-form-item>
+                        <el-form-item label="是否占课时">
+                            <el-switch
+                                    v-model="form.wxvisible"
+                                    active-value="1"
+                                    inactive-value="0"
+                                    active-color="#409EFF"
+                                    inactive-color="#D9D9D9">
+                            </el-switch>
+                        </el-form-item>
                         <el-form-item label="是否通用">
                             <el-switch
                                     v-model="form.wxvisible"
@@ -351,7 +377,7 @@
                     if (json.Code == 0) {
                         that.$message({
                             showClose: true,
-                            message: '课程颜色已修改',
+                            message: '课程颜色已编辑',
                             type: 'success'
                         });
                         // 重载列表
@@ -493,7 +519,7 @@
                 this.form.currColor = '';
                 this.form.memo = '';
             },
-            // 修改
+            // 编辑
             editLesson(row){
                 let that = this;
                 this.clearForm();
@@ -505,10 +531,10 @@
                 this.form.currColor = row.color;
                 this.form.memo = row.memo;
                 this.form.dialogValue = row.dialogValue;
-                this.form.btnType = 1; //修改
+                this.form.btnType = 1; //编辑
 
                 this.dialogLesson = true
-                this.dialogTitle = '修改课程'
+                this.dialogTitle = '编辑课程'
             },
             Lessonmember(row){
                 this.dialogTableVisible = true;

+ 22 - 4
pc/src/views/LessonTable.vue

@@ -46,17 +46,29 @@
                 </el-table-column>
                 <el-table-column
                         prop="create"
-                        label="最后修改时间"
+                        label="最后编辑时间"
                         sortable
                 >
                 </el-table-column>
-
+                <el-table-column
+                        prop="vipType"
+                        label="是否通用"
+                        width="110"
+                        align="center"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.vipType == 1">是</span>
+                        <span v-if="scope.row.vipType == 0">否</span>
+                    </template>
+                </el-table-column>
                 <el-table-column
                         prop="Status"
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
+                        <el-button type="text" @click="Edit(scope.row)">编辑</el-button>
+                        <el-button type="text" @click="goEdit(scope.row)">详情</el-button>
                         <el-button type="text" @click="goEdit(scope.row)">预览本周</el-button>
                         <el-button type="success" size="mini" v-if="scope.row.Status == 1" @click="openLessonTable(scope.row)">发布</el-button>
                         <el-button type="warning" size="mini" v-if="scope.row.Status == 2" @click="unpubilc(scope.row)">取消发布</el-button>
@@ -86,7 +98,8 @@
                         type="week"
                         :picker-options="{'firstDayOfWeek': 1}"
                         format="yyyy 第 WW 周"
-                        placeholder="选择周">
+                        placeholder="选择周"
+                >
                 </el-date-picker>
                 <br>
                 <br>
@@ -283,6 +296,7 @@
             },
             // 发布
             public() {
+                console.log(this.form.week);
                 let that = this;
                 if (!this.form.week) {
                     this.$message({
@@ -342,6 +356,10 @@
                 });
             },
             // 编辑课程表模板
+            Edit(row) {
+               console.log(row);
+            },
+            // 编辑课程表模板
             goEdit(row) {
                 this.$router.push({
                     path: '/editLessonTable', query: {

+ 7 - 1
pc/src/views/Member.vue

@@ -66,9 +66,15 @@
                         type="selection"
                         width="55">
                 </el-table-column>
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
                 <el-table-column
                         prop="name"
                         label="会员名"
+                        width="90"
                 >
                 </el-table-column>
                 <el-table-column
@@ -316,7 +322,7 @@
                     memberType: 1,
                     lesson: 1,
                     gift: 1,
-                    btnType: 0,//0新建,1修改编辑
+                    btnType: 0,//0新建,1编辑编辑
                     memo: '',
                     expTime: '',
                     dialogdata: [],//穿梭待选

+ 1 - 1
pc/src/views/Pwd.vue

@@ -102,7 +102,7 @@
                     if (json.Code == 0) {
                         that.$message({
                             showClose: true,
-                            message: '密码修改成功',
+                            message: '密码编辑成功',
                             type: 'success'
                         });
                         // clean info

+ 1 - 1
pc/src/views/ShopManage.vue

@@ -22,7 +22,7 @@
         </div>
         <div class="change">
             <el-button @click="addAdmin" type="primary">新增店面</el-button>
-            <el-button @click="editList">修改店面</el-button>
+            <el-button @click="editList">编辑店面</el-button>
             <el-button @click="delList">删除店面</el-button>
         </div>
         <div class="table">

+ 1100 - 0
pc/src/views/appoint.vue

@@ -0,0 +1,1100 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>预约管理 <span class="current">{{current}}</span></h5>
+            <el-tabs v-model="activeName" type="card">
+                <el-tab-pane label="课程预览总览" name="first">
+                    <div class="table">
+                        <el-table
+                                :data="tableData"
+                                border
+                                is-horizontal-resize
+                                :default-sort="{prop: 'date', order: 'descending'}"
+                                element-loading-background="rgba(0, 0, 0, 0.8)"
+                                class=""
+                                @selection-change="handleSelectionChange"
+                        >
+                            <el-table-column
+                                    type="selection"
+                                    width="55">
+                            </el-table-column>
+                            <el-table-column
+                                    type="index"
+                                    label="序号"
+                                    width="50">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="name"
+                                    label="时间"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="name"
+                                    label="课程"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Recovered"
+                                    label="预约进度"
+                                    width="240px"
+                                    sortable
+                            >
+                                <template slot-scope="scope">
+                                    <el-progress :percentage="100" :format="format"></el-progress>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Recovered"
+                                    label="预约名额"
+                                    width="240px"
+                            >
+                                <template slot-scope="scope">
+                                    <el-input-number v-model="scope.row.Recovered"  :min="1" :max="9999" label=""></el-input-number>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Recovered"
+                                    label="消耗课时"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="wxVisible"
+                                    label="微信可预约"
+                            >
+                                <template slot-scope="scope">
+                                    <el-switch
+                                            v-model="scope.row.wxVisible"
+                                            active-value="1"
+                                            inactive-value="0"
+                                            active-color="#409EFF"
+                                            inactive-color="#D9D9D9"
+                                            @change=changeWechat($event,scope.row)
+                                    >
+                                    </el-switch>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Status"
+                                    label="操作"
+                            >
+                                <template slot-scope="scope">
+                                    <el-button type="text" @click="editMember(scope.row)">编辑</el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <br>
+                        <el-pagination
+                                background
+                                :total="pageination.total"
+                                :page-size="pageination.pageItem"
+                                @current-change="pageChange"
+                        ></el-pagination>
+                    </div>
+                </el-tab-pane>
+                <el-tab-pane label="会员预约列表" name="second">
+                    <div class="panel-body" >
+                        <div class="panel_control">
+                            <el-row :gutter="20">
+                                <el-col :span="4">
+                                    <em>会员名:</em>
+                                    <el-input v-model="panel.USERCODE" placeholder="请输入会员名"></el-input>
+                                </el-col>
+                                <el-col :span="4">
+                                    <em>手机号:</em>
+                                    <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
+                                </el-col>
+                                <el-col :span="4">
+                                    <em>预约课程:</em>
+                                    <el-select v-model="panel.endType">
+                                        <el-option
+                                                v-for="item in panel.endTypeOptions"
+                                                :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>查询</el-button>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </div>
+                    <br>
+                    <div class="change">
+                        <el-button type="warning" @click="addMember">增加预约</el-button>
+                    </div>
+                    <div class="table">
+                        <el-table
+                                :data="tableData"
+                                border
+                                is-horizontal-resize
+                                :default-sort="{prop: 'date', order: 'descending'}"
+                                element-loading-background="rgba(0, 0, 0, 0.8)"
+                                class=""
+                                @selection-change="handleSelectionChange"
+                        >
+                            <el-table-column
+                                    type="selection"
+                                    width="55">
+                            </el-table-column>
+                            <el-table-column
+                                    type="index"
+                                    label="序号"
+                                    width="50">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="name"
+                                    label="会员名"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="tel"
+                                    label="手机号"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="name"
+                                    label="预约课程"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="create"
+                                    label="会员预约时间"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Recovered"
+                                    label="消耗课时"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="vipType"
+                                    label="预约状态"
+                                    sortable
+                            >
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.vipType == 1">预约成功</span>
+                                    <span v-if="scope.row.vipType == 2">预约失败</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Recovered"
+                                    label="剩余课时"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Status"
+                                    label="操作"
+                            >
+                                <template slot-scope="scope">
+                                    <el-button type="danger" size="mini" round @click="editMember(scope.row)">取消预约</el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <br>
+                        <el-pagination
+                                background
+                                :total="pageination.total"
+                                :page-size="pageination.pageItem"
+                                @current-change="pageChange"
+                        ></el-pagination>
+                    </div>
+                </el-tab-pane>
+            </el-tabs>
+        </div>
+
+
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="480px">
+            <div class="dialogContent">
+                <div class="">
+                    <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-input-number v-model="form.lesson" :min="0" :max="99999" label="(天)"></el-input-number>-->
+<!--                        </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>
+    </div>
+</template>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                // activeName: 'first',
+                activeName: 'second',
+                tableView: true,//其他dialog
+                dialogVisible: false,//其他dialog
+                dialogMemberVisible: false,//新增教练dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//教练课程
+                dialogTitle: '新增教练',
+                current: '星期日 2020/08/16',
+                dialogValue: [],
+                // panel 配置项目
+                panel: {
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    recordsTotal2: 0,
+                    tableData: [],
+                    allTableData: [],
+                    allTableData2: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [
+                        {value: 99, label: '全部'},
+                        {value: 1, label: '进行中'},
+                        {value: 2, label: '已完成'},
+                    ],
+                    endTypeOptions: [
+                        {value: 99, label: '全部'},
+                        {value: 30, label: '近一个月'},
+                        {value: 7, label: '近一周'},
+                        {value: 1, label: '当日'},
+                    ],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    userCode: '',
+                    shopId: '',
+                    memberType: 1,
+                    lesson: 1,
+                    gift: 1,
+                    btnType: 0,//0新建,1编辑编辑
+                    memo: '',
+                    expTime: '',
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                },
+                memberTypes: [
+                    {value: 1, label: '年教练'},
+                    {value: 2, label: '充值教练'},
+                ],
+                tableData: [],
+                tableData2: [],
+            }
+        },
+        mounted() {
+            this.panelSelect();
+            this.getTableQuery();
+            this.getTableQuery2();
+        },
+        methods: {
+            format(percentage) {
+                return percentage === 100 ? '已满' : `${percentage}%`;
+            },
+            // 编辑
+            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;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.dialogdata = json.Rs;
+                    } 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.$message.success('查询完毕');
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                // this.getGetChildRegionSelect(0, 1);
+                that.loading = true;
+                // 查询检测设备。上级区域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,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            getTableQuery2() {
+                let that = this;
+                // this.getGetChildRegionSelect(0, 1);
+                that.loading = true;
+                // 查询检测设备。上级区域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,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData2 = json.Rs;
+                            that.recordsTotal2 = json.Rs.length;
+                        } else {
+                            that.allTableData2 = [];
+                            that.recordsTotal2 = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations2();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 导出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() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 设置分页数据
+            setPaginations2() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return globalfmtDate(column, 11);
+            },
+            // 过滤金额
+            filterMoney(value, row, column) {
+                let that = this;
+                return parseFloat(column).toFixed(2);
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
+
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
+    .current {
+        width: 158px;
+        height: 23px;
+        /*float: left;*/
+        border-radius: 250px;
+        text-align: center;
+        background: #F0F2F5;
+        color: #545454;
+        font-size: 14px;
+        padding: 3px 10px;
+        margin-left: 20px;
+    }
+</style>

+ 7 - 43
pc/src/views/coach.vue

@@ -33,12 +33,16 @@
                     element-loading-background="rgba(0, 0, 0, 0.8)"
                     class=""
                     @selection-change="handleSelectionChange"
-
             >
                 <el-table-column
                         type="selection"
                         width="55">
                 </el-table-column>
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
                 <el-table-column
                         prop="name"
                         label="教练"
@@ -75,7 +79,7 @@
             ></el-pagination>
         </div>
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="640">
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="480px">
             <div class="dialogContent">
                 <div class="">
                     <el-form ref="form" :model="form" label-width="160px">
@@ -97,46 +101,6 @@
                 <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>
 
@@ -206,7 +170,7 @@
                     memberType: 1,
                     lesson: 1,
                     gift: 1,
-                    btnType: 0,//0新建,1修改编辑
+                    btnType: 0,//0新建,1编辑编辑
                     memo: '',
                     expTime: '',
                     dialogdata: [],//穿梭待选

+ 1034 - 0
pc/src/views/cost.vue

@@ -0,0 +1,1034 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>消费记录</h5>
+            <div class="panel-body">
+                <div class="panel_control">
+                    <el-row :gutter="20">
+                        <el-col :span="4">
+                            <em>姓名:</em>
+                            <el-input v-model="panel.USERCODE" placeholder="请输入姓名"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>手机号:</em>
+                            <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
+                        </el-col>
+                        <el-col :span="6">
+                            <em>日期:</em>
+                            <el-date-picker
+                                    v-model="panel.timeScope"
+                                    type="daterange"
+                                    range-separator="至"
+                                    start-placeholder="开始日期"
+                                    end-placeholder="结束日期">
+                            </el-date-picker>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>预约课程:</em>
+                            <el-select v-model="panel.taskstatus">
+                                <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">
+                            <em>状态:</em>
+                            <el-select v-model="panel.taskstatus">
+                                <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>查询</el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+            </div>
+        </div>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
+
+            >
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="会员名"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="tel"
+                        label="手机号"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="课程"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Recovered"
+                        label="消耗课时"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="create"
+                        label="时间"
+                        width="180"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="vipType"
+                        label="状态"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.vipType == 1">正常下课</span>
+                        <span v-if="scope.row.vipType == 2">预约取消</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="教练"
+                        width="180"
+                        sortable
+                >
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @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>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogVisible: false,//其他dialog
+                dialogMemberVisible: false,//新增会员dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//会员课程
+                dialogTitle: '新增会员',
+                dialogValue: [],
+                // panel 配置项目
+                panel: {
+                    usercode: '',
+                    username: '',
+                    timeScope: globalBt2(30),
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [
+                        {value: 99, label: '全部'},
+                        {value: 1, label: '进行中'},
+                        {value: 2, label: '已完成'},
+                    ],
+                    endTypeOptions: [
+                        {value: 99, label: '全部'},
+                        {value: 30, label: '近一个月'},
+                        {value: 7, label: '近一周'},
+                        {value: 1, label: '当日'},
+                    ],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    userCode: '',
+                    shopId: '',
+                    memberType: 1,
+                    lesson: 1,
+                    gift: 1,
+                    btnType: 0,//0新建,1编辑编辑
+                    memo: '',
+                    expTime: '',
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                },
+                memberTypes: [
+                    {value: 1, label: '年会员'},
+                    {value: 2, label: '充值会员'},
+                ],
+                tableData: []
+            }
+        },
+        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: '已取消启用'
+                    });
+                });
+            },
+            // 关闭所有
+            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;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.dialogdata = json.Rs;
+                    } 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.$message.success('查询完毕');
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                // this.getGetChildRegionSelect(0, 1);
+                that.loading = true;
+                // 查询检测设备。上级区域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,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 导出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() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return globalfmtDate(column, 11);
+            },
+            // 过滤金额
+            filterMoney(value, row, column) {
+                let that = this;
+                return parseFloat(column).toFixed(2);
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
+
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
+
+    .panel /deep/ .el-date-editor--daterange {
+        /*width: 260px;*/
+    }
+
+    /deep/ .el-col-4 {
+        width: 15% !important;
+    }
+
+    .panel /deep/ .el-input__inner {
+        /*width: 130px;*/
+    }
+
+    .panel /deep/ .el-input {
+        /*width: 130px;*/
+    }
+
+    .panel /deep/ .el-select {
+        width: 130px;
+    }
+
+    /deep/ .el-date-editor .el-range-separator {
+        line-height: 22px;
+    }
+</style>

+ 364 - 0
pc/src/views/finish.vue

@@ -0,0 +1,364 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>下课管理
+                <span class="current">{{current}}</span>
+            </h5>
+        </div>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
+            >
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="时间"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="课程"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Recovered"
+                        label="消耗课时"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Recovered"
+                        label="实际预约人数"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="primary" round size="mini" @click="goFinish(scope.row)">
+                            下课
+                        </el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
+        </div>
+    </div>
+</template>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogVisible: false,//其他dialog
+                dialogFinishVisible: false,//确认下课dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//会员课程
+                dialogTitle: '新增会员',
+                current: '星期日 2020/08/16',
+                dialogValue: [],
+                // panel 配置项目
+                panel: {
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [
+                        {value: 99, label: '全部'},
+                        {value: 1, label: '进行中'},
+                        {value: 2, label: '已完成'},
+                    ],
+                    endTypeOptions: [
+                        {value: 99, label: '全部'},
+                        {value: 30, label: '近一个月'},
+                        {value: 7, label: '近一周'},
+                        {value: 1, label: '当日'},
+                    ],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    userCode: '',
+                    coach: '',
+                    coachOptions: [],
+                    shopId: '',
+                    memberType: 1,
+                    lesson: 1,
+                    gift: 1,
+                    btnType: 0,//0新建,1编辑编辑
+                    memo: '',
+                    expTime: '',
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                },
+                memberTypes: [
+                    {value: 1, label: '年会员'},
+                    {value: 2, label: '充值会员'},
+                ],
+                tableData: []
+            }
+        },
+        mounted() {
+            this.getTableQuery();
+        },
+        methods: {
+            goFinish(row){
+                this.$router.push({
+                    path: '/finishDetail', query: {
+                        id: row.id
+                    }
+                });
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 查询按钮
+            query() {
+                // this.getTableQuery();
+                this.$message.success('查询完毕');
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    tagname: that.panel.tagname,//标签名
+                    start: 1,//
+                    tableMax: 9999,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return globalfmtDate(column, 11);
+            },
+            // 过滤金额
+            filterMoney(value, row, column) {
+                let that = this;
+                return parseFloat(column).toFixed(2);
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
+
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
+    .blueTitle {
+        width: 200px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+        margin-bottom: 40px;
+        background: #F0F2F5;
+        border-radius: 19px;
+        text-align: center;
+        color: #3799FF;
+        font-size: 16px;
+        padding: 5px 24px;
+    }
+    .current {
+        width: 158px;
+        height: 23px;
+        /*float: left;*/
+        border-radius: 250px;
+        text-align: center;
+        background: #F0F2F5;
+        color: #545454;
+        font-size: 14px;
+        padding: 3px 10px;
+        margin-left: 20px;
+    }
+</style>

+ 966 - 0
pc/src/views/finishDetail.vue

@@ -0,0 +1,966 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>下课详情
+                <span class="current">{{current}}</span>
+            </h5>
+            <div class="panel-body">
+                <div class="panel_control">
+                    <el-row :gutter="20">
+                        <el-col :span="4">
+                            <em>会员名:</em>
+                            <el-input v-model="panel.USERCODE" placeholder="请输入会员名"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>手机号:</em>
+                            <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-button size="" type="primary" @click="query" plain>查询</el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+            </div>
+        </div>
+        <div class="change">
+            <el-button @click="addFinish">确认下课</el-button>
+            <el-button @click="addFinishMember">添加下课会员</el-button>
+        </div>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
+
+            >
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="会员名"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="tel"
+                        label="手机号"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="vipType"
+                        label="状态"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.vipType == 1">预约未到 </span>
+                        <span v-if="scope.row.vipType == 2">上课未预约</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="danger" round v-if="scope.row.Status == 1" size="mini" @click="pauseRow(scope.row)">
+                            预约未到
+                        </el-button>
+                        <el-button type="primary" round v-if="scope.row.Status == 2" size="mini" @click="runRow(scope.row)">
+                            撤销
+                        </el-button>
+                        <el-button type="warning" round v-if="scope.row.Status == 2" size="mini" @click="runRow(scope.row)">
+                            删除
+                        </el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
+        </div>
+
+        <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="640px">
+            <div class="dialogContent">
+                <span class="blueTitle">{{form.name}}</span>
+                    <el-form ref="form" :model="form" label-width="160px">
+                        <el-form-item label="选择课程教练">
+                            <el-select v-model="form.coach" multiple  filterable placeholder="请选择">
+                                <el-option
+                                        v-for="item in form.coachOptions"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-form>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" @click="confirmMember">确定</el-button>
+                <el-button size="small" @click="dialogFinishVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
+
+        <el-dialog title="添加下课会员" :visible.sync="dialogVisible" width="640px">
+            <div class="dialogContent">
+                <span class="blueTitle">{{form.name}}</span>
+                <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" disabled></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>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" @click="confirmMember">确定</el-button>
+                <el-button size="small" @click="dialogVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
+
+    </div>
+</template>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogVisible: false,//添加下课会员
+                dialogFinishVisible: false,//确认下课dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//会员课程
+                dialogTitle: '新增会员',
+                current: '星期日 2020/08/16',
+                dialogValue: [],
+                // panel 配置项目
+                panel: {
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [
+                        {value: 99, label: '全部'},
+                        {value: 1, label: '进行中'},
+                        {value: 2, label: '已完成'},
+                    ],
+                    endTypeOptions: [
+                        {value: 99, label: '全部'},
+                        {value: 30, label: '近一个月'},
+                        {value: 7, label: '近一周'},
+                        {value: 1, label: '当日'},
+                    ],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    userCode: '',
+                    coach: '',
+                    coachOptions: [],
+                    shopId: '',
+                    memberType: 1,
+                    lesson: 1,
+                    gift: 1,
+                    btnType: 0,//0新建,1编辑编辑
+                    memo: '',
+                    expTime: '',
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                },
+                memberTypes: [
+                    {value: 1, label: '年会员'},
+                    {value: 2, label: '充值会员'},
+                ],
+                tableData: []
+            }
+        },
+        mounted() {
+            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.dialogFinishVisible = 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;
+            },
+            // 有效期调整
+            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.dialogFinishVisible = 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.dialogFinishVisible = 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,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.coachOptions = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 新增会员
+            addFinish() {
+                this.clearForm();
+                this.dialogFinishVisible = true
+                this.btnType = 0;
+                this.dialogTitle = '新增会员'
+            },
+            addFinishMember() {
+                this.clearForm();
+                this.dialogVisible = true
+            },
+            // 删除
+            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.$message.success('查询完毕');
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                // this.getGetChildRegionSelect(0, 1);
+                that.loading = true;
+                // 查询检测设备。上级区域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,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 导出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() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return globalfmtDate(column, 11);
+            },
+            // 过滤金额
+            filterMoney(value, row, column) {
+                let that = this;
+                return parseFloat(column).toFixed(2);
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
+
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
+    .blueTitle {
+        width: 200px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+        margin-bottom: 40px;
+        background: #F0F2F5;
+        border-radius: 19px;
+        text-align: center;
+        color: #3799FF;
+        font-size: 16px;
+        padding: 5px 24px;
+    }
+    .current {
+        width: 158px;
+        height: 23px;
+        border-radius: 250px;
+        text-align: center;
+        background: #F0F2F5;
+        color: #545454;
+        font-size: 14px;
+        padding: 3px 10px;
+        margin-left: 20px;
+    }
+</style>

+ 6 - 4
pc/src/views/lessonManage.vue

@@ -54,7 +54,7 @@
                 </el-table-column>
                 <el-table-column
                         prop="create"
-                        label="最后修改时间"
+                        label="最后编辑时间"
                         sortable
                 >
                 </el-table-column>
@@ -613,7 +613,7 @@
 
     .curIcon {
         position: relative;
-        left: 5px;
+        left: 3px;
         top: -30px;
         width: 24px;
         height: 24px;
@@ -622,10 +622,12 @@
         background-size: 100% 100%;
     }
     .rowHeight {
-        width: 100%;
+        width: 180px;
         overflow: hidden;
         display: block;
-        margin: 0 auto;
         height: 35px;
+        float: left;
+        margin: 0;
+
     }
 </style>

+ 1033 - 0
pc/src/views/record.vue

@@ -0,0 +1,1033 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>预约记录</h5>
+            <div class="panel-body">
+                <div class="panel_control">
+                    <el-row :gutter="20">
+                        <el-col :span="4">
+                            <em>姓名:</em>
+                            <el-input v-model="panel.USERCODE" placeholder="请输入姓名"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>手机号:</em>
+                            <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
+                        </el-col>
+                        <el-col :span="6">
+                            <em>日期:</em>
+                            <el-date-picker
+                                    v-model="panel.timeScope"
+                                    type="daterange"
+                                    range-separator="至"
+                                    start-placeholder="开始日期"
+                                    end-placeholder="结束日期">
+                            </el-date-picker>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>预约课程:</em>
+                            <el-select v-model="panel.taskstatus">
+                                <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">
+                            <em>状态:</em>
+                            <el-select v-model="panel.taskstatus">
+                                <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>查询</el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+            </div>
+        </div>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
+
+            >
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        width="50">
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="会员名"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="tel"
+                        label="手机号"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="预约课程"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Recovered"
+                        label="消耗课时"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="name"
+                        label="课程时间"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="create"
+                        label="预约时间"
+                        width="180"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="vipType"
+                        label="状态"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.vipType == 1">正常下课</span>
+                        <span v-if="scope.row.vipType == 2">预约取消</span>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @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>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogVisible: false,//其他dialog
+                dialogMemberVisible: false,//新增会员dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//会员课程
+                dialogTitle: '新增会员',
+                dialogValue: [],
+                // panel 配置项目
+                panel: {
+                    usercode: '',
+                    username: '',
+                    timeScope: globalBt2(30),
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [
+                        {value: 99, label: '全部'},
+                        {value: 1, label: '进行中'},
+                        {value: 2, label: '已完成'},
+                    ],
+                    endTypeOptions: [
+                        {value: 99, label: '全部'},
+                        {value: 30, label: '近一个月'},
+                        {value: 7, label: '近一周'},
+                        {value: 1, label: '当日'},
+                    ],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    userCode: '',
+                    shopId: '',
+                    memberType: 1,
+                    lesson: 1,
+                    gift: 1,
+                    btnType: 0,//0新建,1编辑编辑
+                    memo: '',
+                    expTime: '',
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                },
+                memberTypes: [
+                    {value: 1, label: '年会员'},
+                    {value: 2, label: '充值会员'},
+                ],
+                tableData: []
+            }
+        },
+        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: '已取消启用'
+                    });
+                });
+            },
+            // 关闭所有
+            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;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.dialogdata = json.Rs;
+                    } 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.$message.success('查询完毕');
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                // this.getGetChildRegionSelect(0, 1);
+                that.loading = true;
+                // 查询检测设备。上级区域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,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 导出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() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return globalfmtDate(column, 11);
+            },
+            // 过滤金额
+            filterMoney(value, row, column) {
+                let that = this;
+                return parseFloat(column).toFixed(2);
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
+
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
+
+    .panel /deep/ .el-date-editor--daterange {
+        /*width: 260px;*/
+    }
+
+    /deep/ .el-col-4 {
+        width: 15% !important;
+    }
+
+    .panel /deep/ .el-input__inner {
+        /*width: 130px;*/
+    }
+
+    .panel /deep/ .el-input {
+        /*width: 130px;*/
+    }
+
+    .panel /deep/ .el-select {
+        width: 130px;
+    }
+
+    /deep/ .el-date-editor .el-range-separator {
+        line-height: 22px;
+    }
+</style>

+ 426 - 0
pc/src/views/setting.vue

@@ -0,0 +1,426 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>系统设置</h5>
+            <div class="pages">
+                <el-tabs v-model="activeName" type="card">
+                    <el-tab-pane label="关闭本店预约" name="first">
+                        <div class="form_container">
+                            <div class="gary">
+                       <span>
+                           是否关闭本店预约
+                       </span>
+                                <el-switch
+                                        v-model="appoint"
+                                        active-value="1"
+                                        inactive-value="0"
+                                        active-color="#409EFF"
+                                        inactive-color="#D9D9D9"
+                                        @change=changeWechat($event,appoint)
+                                >
+                                </el-switch>
+                                <em>
+                                    温馨提示:默认关闭,开启后将会关闭本店的所有课程预约,请谨慎操作!
+                                </em>
+                            </div>
+                        </div>
+                    </el-tab-pane>
+                    <el-tab-pane label="密码修改" name="second">
+                        <div class="form_container" >
+                            <el-form ref="form" :model="form" label-width="110px" :rules="rules">
+                                <el-form-item label="请输入原密码" prop="old">
+                                    <el-input v-model="form.old" type="password"></el-input>
+                                </el-form-item>
+                                <el-form-item label="新密码" prop="newpwd">
+                                    <el-input v-model="form.newpwd" type="password"></el-input>
+                                </el-form-item>
+                                <el-form-item label="确认密码" prop="again">
+                                    <el-input v-model="form.again" type="password"></el-input>
+                                </el-form-item>
+                                <el-form-item>
+                                    <el-button type="" @click="onSubmit('form')">确认修改</el-button>
+                                </el-form-item>
+                            </el-form>
+                        </div>
+                    </el-tab-pane>
+                </el-tabs>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+    let qs = require('qs');
+    import Global from '../Global.js'
+    import {
+        testTable,
+    } from '../api/getApiRes.js'
+
+    export default {
+        data() {
+            let samepass = (rule, value, callback) => {
+                if (value !== this.form.newpwd) {
+                    callback(new Error('两次输入密码不一致!'));
+                } else {
+                    callback();
+                }
+            };
+            let pwdPass = (rule, value, callback) => {
+                let re = /^[0-9a-zA-Z_]{1,}$/;
+                if (value.search(re) == -1) {
+                    callback(new Error('错了哦,密码只能由字母、数字及下划线组成'));
+                } else {
+                    callback()
+                }
+            };
+            return {
+                activeName: 'first',
+                pageApppoint:true,
+                valImgSrc: '',
+                overtime: '',
+                appoint: '0',
+                form: {
+                    old: '',
+                    newpwd: '',
+                    again: '',
+                    valid: '',
+                },
+                rules: {
+                    old: [
+                        {required: true, message: '请输入原密码', trigger: 'blur'},
+                        {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'}
+                    ],
+                    newpwd: [
+                        {required: true, message: '请输入新密码', trigger: 'blur'},
+                        {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
+                        {validator: pwdPass, trigger: 'blur'}
+                    ],
+                    again: [
+                        {required: true, message: '请输入确认密码', trigger: 'blur'},
+                        {min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur'},
+                        {validator: pwdPass, trigger: 'blur'},
+                        {validator: samepass, trigger: 'blur'},
+                    ],
+                    valid: [
+                        {required: true, message: '请输入图形验证码', trigger: 'blur'},
+                        {min: 3, max: 4, message: '长度在 4 个字符', trigger: 'blur'}
+                    ],
+                }
+            }
+        },
+        mounted() {
+            // 读取验证码
+            this.overtime = new Date();
+
+            // 读取当前店铺预约状态 todo
+        },
+        methods: {
+            // 微信可见与否
+            changeWechat(e,appoint) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    wxVisible: e,//
+                };
+                let postdata = qs.stringify(param);
+                testTable(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);
+                    }
+                })
+            },
+            // 跳转tab页面
+            goTab(url) {
+                this.$router.push({path: url});
+            },
+            //            点击验证码切换
+            changeValImg: function () {
+                this.validImgState = true;
+                this.CurenttestTable();
+            },
+            onSubmit(formName) {
+                let that = this;
+                this.$refs[formName].validate((valid) => {
+                    if (valid) {
+                        that.submitPwd()
+                    } else {
+                        that.$message({
+                            showClose: true,
+                            message: '错了哦,提交新密码失败',
+                            type: 'error'
+                        });
+                        that.form.old = '';
+                        that.form.newpwd = '';
+                        that.form.again = '';
+                        // 提交失败也要重载验证码
+                        this.CurenttestTable();
+                        return false;
+                    }
+                });
+            },
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+            submitPwd() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    oldpass: that.form.old,
+                    newpass: that.form.newpwd,
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    // 无论成功与否都重载验证码
+                    this.CurenttestTable();
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '密码修改成功',
+                            type: 'success'
+                        });
+                        // clean info
+                        that.old = '';
+                        that.newpwd = '';
+                        that.again = '';
+                        that.logoutPage();
+                    } else {
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
+                    }
+                });
+            },
+            // 重登录
+            logoutPage() {
+                const that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                testTable(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$router.push({
+                            path: '/login',
+                            query: {
+                                status: 1
+                            }
+                        })
+                    } else {
+                        that.$message.error(json.Memo + ',错误代码:' + json.Code);
+                    }
+                })
+            }
+        },
+    }
+</script>
+<style scoped>
+    @import "../assets/css/panel.css";
+    ul {
+        margin: 0;
+        padding: 0;
+        list-style: none;
+    }
+
+    .tabs ul {
+        width: 358px;
+        margin: 0 auto;
+        margin-top: 15px;
+    }
+
+    .image-border {
+        position: absolute;
+        width: 20px;
+        height: 20px;
+    }
+
+    .image-border1 {
+        top: 0;
+        left: 25px;
+        border-left: 2px solid #6DC1FF;
+        border-top: 2px solid #6DC1FF;
+    }
+
+    .image-border2 {
+        top: 0;
+        right: 12px;
+        border-right: 2px solid #6DC1FF;
+        border-top: 2px solid #6DC1FF;
+    }
+
+    .image-border3 {
+        bottom: 0;
+        left: 25px;
+        border-bottom: 2px solid #6DC1FF;
+        border-left: 2px solid #6DC1FF;
+    }
+
+    .image-border4 {
+        bottom: 0;
+        right: 12px;
+        border-right: 2px solid #6DC1FF;
+        border-bottom: 2px solid #6DC1FF;
+    }
+
+    .pages {
+        width: 100%;
+        min-height: 600px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-bottom: 80px;
+    }
+
+    .form_container {
+        width: 50%;
+        overflow: hidden;
+        margin: 0 auto;
+        margin-top: 20px;
+        padding: 20px;
+    }
+
+    s {
+        height: 50px;
+        line-height: 40px;
+        padding-left: 20px;
+        text-decoration: none;
+        font-style: normal;
+    }
+
+    i {
+        color: red;
+    }
+
+    s em {
+        font-style: normal;
+    }
+
+    /deep/ .el-form {
+        width: 500px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    /deep/ .el-form-item__label {
+        width: 120px !important;
+        /*color: #6DC1FF;*/
+        font-size: 16px;
+        float: left;
+    }
+
+    /deep/ .el-form-item__content {
+        width: 370px;
+        float: right;
+        overflow: hidden;
+        margin-left: 0px !important;
+    }
+
+    /deep/ .el-input__inner {
+        background: none;
+        color: #6DC1FF;
+        border: 1px solid #DCDFE6;
+        border-radius: 0;
+    }
+
+    /deep/ .el-range-input {
+        background: none;
+        color: #6DC1FF;
+    }
+
+    .el-button--primary {
+        width: 186px;
+        height: 30px;
+        background: #0162AA;
+        color: #6DC1FF;
+        border: 1px solid #6DC1FF;
+        border-radius: 0;
+    }
+
+    #validImg {
+        position: relative;
+        float: right;
+        bottom: 35px;
+    }
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+    .change button {
+        float: left;
+        margin-right: 10px;
+    }
+    .change button.el-button--primary {
+        height: 38px;
+        color:#fff;
+        background: #409EFF;
+        padding: 3px 5px;
+        width: 120px;
+    }
+    .form_container {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-left: 0;
+        padding-right: 0;
+    }
+    .form_container .gary {
+        width: 100%;
+        height: 64px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding: 34px 32px;
+        padding-bottom: 0;
+        background: #F0F2F5;
+        border-radius: 2px;
+    }
+    .gary span {
+        float: left;
+        margin-right: 30px;
+    }
+    /deep/ .el-switch {
+        float: left;
+    }
+    .gary em {
+        position: relative;
+        top: -10px;
+        left: 30px;
+        padding: 13px 37px;
+        float: left;
+        background: #fff;
+        border-radius: 250px;
+        color: #E38F00;
+        font-size: 14px;
+        font-style: normal;
+    }
+    /deep/ .el-form {
+        width: 600px;
+        float: left;
+    }
+    /deep/  .el-form-item__content {
+        width: 437px;
+        float: left;
+    }
+    .panel /deep/ .el-input__inner {
+        width: 437px;
+        float: left;
+    }
+</style>