Prechádzať zdrojové kódy

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

Changpeng Duan 5 rokov pred
rodič
commit
f9a0fe3be8

+ 57 - 10
app/src/page/appoint.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="pages">
         <img src="../static/images/main/banner.png" height="121" width="414"/>
-        <mu-tabs :value.sync="active" color="#F2F2F2" indicator-color="#33CAF7" >
+        <mu-tabs :value.sync="active" color="#F2F2F2" indicator-color="#33CAF7">
             <mu-tab v-for="(day,i) in weeks">{{day.name}} <br> <em>{{day.data}}</em></mu-tab>
         </mu-tabs>
         <div class="context">
@@ -19,13 +19,13 @@
                         <i class="dot" v-if="l.remain>0"></i>
 
                         <i class="cubes" v-if="l.Status==1"></i>
-<!--                        已满-->
-                        <i class="tri" v-if="l.remain==0"></i>
+                        <!--                        已满-->
+                        <i class="tri" v-if="l.remain == 0 && l.remain == 0"></i>
                         <!--                        不可约-->
                         <i class="x" v-if="l.WxOrder==0"></i>
                     </div>
                     <div class="title">
-                        <h5>{{l.ClassName}}</h5>
+                        <h5><span class="lessons" :style="{ background:l.ClassColor }">{{l.ClassName}}</span></h5>
                         <span>{{l.BeginStr}} - {{l.EndStr}}</span>
                     </div>
                     <div class="current">
@@ -35,8 +35,11 @@
                             人</h5>
                         <span>总名额 {{l.OrderToplimit}} 人</span>
                     </div>
-                    <mu-button class="appointBtn greenBtn" v-if="l.remain > 0 && l.OrderId == 0" @click="appointNow(l)">预约</mu-button>
-                    <mu-button class="appointBtn redBtn" v-if="l.remain == 0" @click="isFulled">已满</mu-button>
+                    <mu-button class="appointBtn greenBtn" v-if="l.remain > 0 && l.OrderId == 0" @click="appointNow(l)">
+                        预约
+                    </mu-button>
+                    <mu-button class="appointBtn redBtn" v-if="l.remain == 0 && l.OrderId == 0" @click="isFulled">已满
+                    </mu-button>
                     <mu-button class="appointBtn yellowBtn" v-if="l.OrderId != 0" @click="isAppointed(l)">已约</mu-button>
                     <mu-button class="appointBtn disableBtn" v-if="l.WxOrder == 0" @click="isDisable">不可约</mu-button>
                 </li>
@@ -150,7 +153,7 @@
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    stdId : that.dialog.StdId
+                    stdId: that.dialog.StdId
                 };
                 let postdata = qs.stringify(param);
                 OderAddByVipUser(postdata).then(res => {
@@ -187,7 +190,7 @@
                     if (result) {
                         let param = {
                             token: localStorage.token,
-                            orderId : row.OrderId,
+                            orderId: row.OrderId,
                         };
                         let postdata = qs.stringify(param);
                         OderCancelByVipUser(postdata).then(res => {
@@ -224,7 +227,7 @@
                             // 计算剩余
                             that.list.map(function (item) {
                                 item.remain = parseInt(item.OrderToplimit) - parseInt(item.OrderCount);
-                                that.num =  that.num + item.remain
+                                that.num = that.num + item.remain
                             })
                         }
                         console.log(that.num);
@@ -260,6 +263,7 @@
         display: block;
         margin: 0 auto;
     }
+
     /*mu-header*/
     .mu-primary-color {
         line-height: 60px;
@@ -279,11 +283,13 @@
     /deep/ .mu-appbar-title {
         text-align: center;
     }
+
     /deep/ .mu-tabs {
         display: flex;
         overflow-x: scroll;
         float: left;
     }
+
     /deep/ .mu-tab {
         width: 85px;
         min-width: 85px;
@@ -522,8 +528,49 @@
         width: 90%;
         float: left;
     }
+
     /deep/ .mu-tab-link-highlight {
-        display: none!important;
+        display: none !important;
     }
 
+    li .title span.lessons {
+        width: auto;
+        padding: 1px 11px;
+        border-radius: 250px;
+        float: left;
+        text-align: center;
+        color: #000;
+        font-size: 14px;
+    }
+
+    @media only screen and (max-width: 640px) {
+
+    }
+
+    @media only screen and (max-width: 480px) {
+
+    }
+
+    @media only screen and (max-width: 375px) {
+
+    }
+
+    @media only screen and (max-width: 360px) {
+
+    }
+
+    @media only screen and (max-width: 320px) {
+        .list .dotContainer {
+            width: 20px;
+            padding-left: 5px;
+        }
+
+        .list li .title {
+            width: 85px;
+        }
+    }
+
+    @media only screen and (min-width: 641px) {
+
+    }
 </style>

+ 29 - 9
app/src/page/login.vue

@@ -119,13 +119,12 @@
         },
         mounted() {
             // 获取图形验证码
-            // alert(document.body.clientWidth);
             this.getValImgSrc();
             this.overtime = new Date();
             let userAgent = navigator.userAgent;
             if (userAgent.indexOf("Mozilla") > -1) {//判断是否Mozilla浏览器
                 // 浏览器测试
-            }else{
+            } else {
                 this.checkcode();
             }
 
@@ -561,29 +560,42 @@
         }
     }
 
-    @media only screen and (max-width: 415px) {
+    @media only screen and (max-width: 414px) {
         #login .login_valid {
-            width: 205px;
+            width: 223px;
         }
 
         #login .login_pwd {
-            width: 205px;
+            width: 223px;
         }
     }
 
     @media only screen and (max-width: 400px) {
 
         #login .login_valid {
-            width: 195px;
+            width: 218px;
         }
 
         #login .login_pwd {
-            width: 195px;
+            width: 218px;
+        }
+        #getValidSms {
+            font-size: 13px;
         }
     }
 
     @media only screen and (max-width: 375px) {
+        #login .login_valid {
+            width: 190px;
+        }
 
+        #login .login_pwd {
+            width: 190px;
+        }
+
+        #getValidSms {
+            font-size: 14px;
+        }
     }
 
     @media only screen and (max-width: 360px) {
@@ -601,10 +613,18 @@
     }
 
     @media only screen and (max-width: 320px) {
+        #login .login_valid {
+            width: 144px;
+        }
+
+        #login .login_pwd {
+            width: 144px;
+        }
 
+        #getValidSms {
+            font-size: 12px;
+        }
     }
 
-    @media only screen and (min-width: 641px) {
 
-    }
 </style>

+ 33 - 1
app/src/page/mainpage.vue

@@ -10,7 +10,7 @@
                 <div class="rt">
                     <h5>{{l.ShopName}}</h5>
                     <span>今日预约名额剩余
-                        <i>{{l.RemainOrdernum}}</i>
+                        <i v-if="l.RemainOrdernum > 0">{{l.RemainOrdernum}}</i>
                         <i v-if="l.RemainOrdernum == 0" class="red">{{l.RemainOrdernum}}</i>
                         人</span>
                     <span>地址:{{l.Addr}}</span>
@@ -287,4 +287,36 @@
     .list .rt em.red {
         color: #F8847F;
     }
+    .red {
+        color: #F8847F;
+    }
+
+    @media only screen and (max-width: 640px) {
+
+    }
+
+    @media only screen and (max-width: 480px) {
+
+    }
+
+    @media only screen and (max-width: 375px) {
+
+    }
+
+    @media only screen and (max-width: 360px) {
+
+    }
+
+    @media only screen and (max-width: 320px) {
+            .list .rt {
+                width: 52%;
+            }
+        .list .rt em {
+            font-size: 14px;
+        }
+    }
+
+    @media only screen and (min-width: 641px) {
+
+    }
 </style>

+ 42 - 4
app/src/page/record.vue

@@ -24,12 +24,14 @@
                         </div>
                         <div class="md">
                             <em>
-                                {{l.ClassName}}
+                                <span  class="lessons"  :style="{ background:l.ClassColor }">
+                                     {{l.ClassName}}
+                                </span>
                             </em>
                             <span class="green" v-if="l.Status == 0">
                             预约上课
                         </span>
-                            <span class="green" v-if="l.Status == 1">
+                            <span class="green" v-if="l.Status == 1 && active == 0">
                             已预约
                         </span>
                         </div>
@@ -309,12 +311,14 @@
 
     .list {
         width: 100%;
+        height: 100%;
+        min-height: 410px;
         overflow: hidden;
         display: block;
         margin: 0 auto;
         padding-top: 6px;
         padding-bottom: 30px;
-
+        background: #f2f2f2;
     }
 
     .list li {
@@ -391,7 +395,7 @@
         font-weight: normal;
         font-size: 14px;
         text-align: left;
-        color: #37cb00;
+        /*color: #37cb00;*/
         line-height: 30px;
     }
 
@@ -473,4 +477,38 @@
         padding-left: 3px;
         padding-right: 3px;
     }
+    .lessons {
+        width: auto;
+        padding: 1px 11px;
+        border-radius: 250px;
+        float: left;
+        text-align: center;
+        color: #333;
+    }
+    @media only screen and (max-width: 640px) {
+
+        }
+        @media only screen and (max-width: 480px) {
+
+        }
+        @media only screen and (max-width: 375px) {
+
+        }
+        @media only screen and (max-width: 360px) {
+
+        }
+        @media only screen and (max-width: 320px) {
+            .list .lt {
+                width: 80px;
+            }
+            .list .lt h5 {
+                font-size: 12px;
+            }
+            .md em {
+                margin-right: 3px;
+            }
+        }
+        @media only screen and (min-width: 641px) {
+
+        }
 </style>

+ 21 - 1
pc/src/Global.js

@@ -1,7 +1,7 @@
 // 网站基本信息
 companyInfo = {
     url: 'http://det.shandongewall.com/',
-    main: 'E-WALL',
+    main: 'alloutlong',
     year: new Date().getFullYear(),
 };
 
@@ -152,6 +152,26 @@ getNowDate = function () {
     return y + "年" + m + "月" + d + "日";
 }
 
+globalcurrentWeek = function () {
+    let weeks = new Date().getDay();
+    let d = new Date().getDate();
+    return getNowDate() + ' ' + numberToWeekdays(weeks) + ' 第'+ getWeekOfYear() + '周';
+}
+
+ getWeekOfYear = function (){
+    var today = new Date();
+    var firstDay = new Date(today.getFullYear(),0, 1);
+    var dayOfWeek = firstDay.getDay();
+    var spendDay= 1;
+    if (dayOfWeek !=0) {
+        spendDay=7-dayOfWeek+1;
+    }
+    firstDay = new Date(today.getFullYear(),0, 1+spendDay);
+    var d =Math.ceil((today.valueOf()- firstDay.valueOf())/ 86400000);
+    var result =Math.ceil(d/7);
+    return result+1;
+};
+
 // table配置项目
 
 // 每页选项

+ 5 - 0
pc/src/api/getApiRes.js

@@ -146,6 +146,11 @@ export function ClassVisibleStatusEdit(postdata) {
     return getApiBasic(url, postdata);
 }
 // order
+// 最新预约列表查询
+export function LastOrderQuery(postdata) {
+    let url = headapi + 'v1/Order/LastOrderQuery';
+    return getApiBasic(url, postdata);
+}
 // 管理员今日预约添加
 export function OrderAddByManager(postdata) {
     let url = headapi + 'v1/Order/OrderAddByManager';

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

@@ -292,10 +292,10 @@
      line-height: 20px;
  }
   .el-transfer__buttons {
-     width: 66px;
+     /*width: 66px;*/
  }
 .el-transfer .el-button+.el-button {
-    margin-left: 0;
+    /*margin-left: 0;*/
 }
 /deep/ .el-checkbox {
     margin-right: 0;
@@ -304,4 +304,25 @@
     text-align: left;
     float: left;
      text-indent: 20px;
+}
+ .el-transfer__buttons button {
+     /*float: right;*/
+ }
+.el-dialog__body {
+    padding-top: 4px;
+}
+
+/*颜色选择器*/
+.el-color-picker__trigger {
+    border-radius: 250px;
+}
+.el-color-picker__color-inner {
+    border-radius: 250px;
+}
+.el-color-picker__color {
+    border-radius: 250px;
+}
+.el-tabs__item.is-active {
+    color: #fff;
+    background: #409EFF;
 }

+ 12 - 2
pc/src/components/Headside.vue

@@ -3,7 +3,7 @@
         <nav class="navbar user-info-navbar" role="navigation">
 <!--            <i :class="[{'el-icon-s-unfold left_hide_icon':left_panel_state},{'el-icon-s-fold left_show_icon':!left_panel_state}] "-->
 <!--               @click="left_hide"></i>-->
-            <span class="title">场馆管理系统</span>
+            <span class="title">场馆管理系统    <em>   {{current}}</em></span>
             <div @click="checkNews">
                 <el-badge :value="newnum"
                           class="item"
@@ -14,6 +14,7 @@
                     </el-button>
                 </el-badge>
             </div>
+
             <ul class="user-info-menu right-links list-inline list-unstyled">
                 <li class="dropdown user-profile">
 <!--                        <img class="lteHead" src="../assets/img/header/lteHead.png" height="26" width="26"/>-->
@@ -29,7 +30,9 @@
     </div>
 </template>
 <script>
+
     import axios from 'axios';
+    import Global from '../Global.js'
     import {SignOut,ManagerSelfQuery} from '../api/getApiRes.js'
     let qs = require('qs');
     export default {
@@ -44,7 +47,8 @@
                 qq: '0000079000',
                 newnum: '',
                 newnumState: false,
-                left_panel_state: false
+                left_panel_state: false,
+                current:globalcurrentWeek()
             }
         },
         mounted() {
@@ -513,6 +517,12 @@
         line-height: 72px;
         margin-left: 23px;
     }
+    .title em {
+        font-style: normal;
+        font-size: 14px;
+        margin-left: 10px;
+        font-size: 14px;
+    }
     .lteHead {
         margin-top: 25px;
         margin-right: 10px;

+ 4 - 3
pc/src/components/Navside.vue

@@ -33,8 +33,10 @@
 </template>
 <script>
     import Navs from '../api/Navs';
-    import {ManagerSelfQuery} from '../api/getApiRes.js'
-    import {ShopListQuery} from "../api/getApiRes";
+    import {
+        ManagerSelfQuery,
+        ShopListQuery
+    } from '../api/getApiRes.js'
 
     let qs = require('qs');
     export default {
@@ -114,7 +116,6 @@
                         json.Rs.map(function (item) {
                             if (item.ShopID == ShopId) {
                                 that.ShopName = item.ShopName;
-                                console.log(item.ShopName);
                             }
                         })
                     } else {

+ 12 - 4
pc/src/components/preview.vue

@@ -90,11 +90,17 @@
     }
 
     .mainTitle span {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
         font-family: "Source Han Sans CN";
         font-weight: normal;
         font-size: 16px;
-        text-align: left;
+        text-align: center;
         color: #bdbdbd;
+        padding: 3px 0;
+        padding-bottom: 9px;
     }
 
     .tableContext {
@@ -113,6 +119,7 @@
         line-height: 40px;
         color: #545454;
         float: left;
+        border-right: 1px solid #fff;
     }
 
     .times span {
@@ -135,8 +142,8 @@
 
     .tableTitle span {
         width: 113px;
-        height: 30px;
-        line-height: 30px;
+        height: 45px;
+        line-height: 45px;
         font-family: "Source Han Sans CN";
         font-weight: normal;
         font-size: 12px;
@@ -144,6 +151,7 @@
         color: #222;
         float: left;
         background: #F0F2F5;
+        border-right: 1px solid #fff;
     }
 
     .rows {
@@ -171,7 +179,7 @@
     }
 
     .previewContainer {
-        width: 920px;
+        width: 913px;
         overflow: hidden;
         display: block;
         margin: 0 auto;

+ 2 - 0
pc/src/views/AdminManage.vue

@@ -64,6 +64,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column

+ 18 - 7
pc/src/views/EditLessonManage.vue

@@ -7,11 +7,11 @@
             <div class="panel_control">
                 <el-row :gutter="20">
                     <el-col :span="5">
-                        <em>课程表名称:</em>
+                        <em><span style="color: red">*</span> 课程表名称:</em>
                         <el-input v-model="panel.name" placeholder="请输入课程表名称" :disabled="panel.inputState"></el-input>
                     </el-col>
                     <el-col :span="5" v-if="!panel.inputState">
-                        <em>课程表时间:</em>
+                        <em><span style="color: red">*</span> 课程表时间:</em>
                         <el-date-picker
                                 v-model="panel.week"
                                 type="week"
@@ -20,6 +20,9 @@
                                 placeholder="选择周">
                         </el-date-picker>
                     </el-col>
+                    <!--        todo-->
+                    <!--        <el-button class="seeTemp">预览课程表</el-button>-->
+                    <el-button type="default" class="seeTemp" @click="$router.push('/lessonManage')">返回课程表</el-button>
                 </el-row>
             </div>
         </div>
@@ -33,7 +36,9 @@
             <el-tab-pane label="星期六" name="6"></el-tab-pane>
             <el-tab-pane label="星期天" name="7"></el-tab-pane>
         </el-tabs>
-        <el-button class="seeTemp">预览模板</el-button>
+
+
+        <!--        todo 读取后台保存状态,新保存后不跳走-->
         <div class="table">
             <el-table
                     v-for="tab in tabs"
@@ -141,7 +146,8 @@
                         align="center"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" class="red" @click="delRow(scope)">删除</el-button>
+                        <el-button type="text" class="red" @click="delRow(scope)" v-if="scope.row.Locking != 1">删除</el-button>
+                        <el-button type="text" class="gary"  v-else @click="delRow(scope)" v-if="scope.row.Locking == 1">删除</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -570,6 +576,7 @@
             $route(to) {
                 if (to.name == 'EditLessonManage') {
                     this.temId = this.$route.query.id;
+                    this.panelSelect();
                 }
             },
             temId(e) {
@@ -694,15 +701,16 @@
     }
 
     .seeTemp {
-        position: relative;
+        /*position: relative;*/
         float: right;
-        bottom: 60px;
+        bottom: 0px;
         z-index: 222;
     }
 
     .table {
         position: relative;
-        top: -50px;
+        /*top: -50px;*/
+        top: 0px;
     }
 
     .el-range-editor.el-input__inner {
@@ -731,4 +739,7 @@
     .rowBottom button.pull-right {
         float: right;
     }
+    .gary {
+        color: #8c939d;
+    }
 </style>

+ 59 - 28
pc/src/views/EditLessonTable.vue

@@ -7,10 +7,13 @@
             <div class="panel_control">
                 <el-row :gutter="20">
                     <el-col :span="9">
-                        <em>课程表模板名称:</em>
+                        <em> <span style="color: red">*</span>课程表模板名称:</em>
                         <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
                     </el-col>
                     <!--                    默认不通用-->
+                    <!--        todo-->
+                    <!--        <el-button class="seeTemp" @click.native="seeWeekTemp">预览模板</el-button>-->
+                    <el-button type="default" class="seeTemp" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
                 </el-row>
             </div>
         </div>
@@ -24,7 +27,7 @@
             <el-tab-pane label="星期六" name="6"></el-tab-pane>
             <el-tab-pane label="星期天" name="7"></el-tab-pane>
         </el-tabs>
-        <el-button class="seeTemp">预览模板</el-button>
+
         <div class="table">
             <el-table
                     v-for="tab in tabs"
@@ -134,11 +137,20 @@
                 <el-button @click="dialogVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
+
+        <el-dialog title="预览" :visible.sync="previewShow" width="1200px">
+            <preview :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle"></preview>
+            <div class="dialogFooter">
+                <el-button @click="previewShow = false" size="small">关闭</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 
 <script>
     import Global from '../Global.js'
+    import preview from '@/components/preview.vue'
+
     import {
         SttPlanBasicAdd,
         SttPlanDetailListQuery,
@@ -147,13 +159,17 @@
         ClassDetailOne,
         testTable,
         testTableLong,
-        testSelect, ClassListQuery
+        testSelect, ClassListQuery, SttPlanPreview
     } from "../api/getApiRes";
 
     let qs = require('qs');
     export default {
         data() {
             return {
+                previewShow: false,
+                previewDate: {},
+                BigTitle: '',
+                smallTitle: '',
                 pageTitle: '新增课程表模板',
                 dialogVisible: false,
                 dialogdata: [],
@@ -224,7 +240,7 @@
                         tableData: [], days: '7'
                     },
                 ],
-                DataAssemblyRs:[]
+                DataAssemblyRs: []
             }
         },
         mounted() {
@@ -355,7 +371,7 @@
                 })
             },
             // 数据组装
-            DataAssembly(){
+            DataAssembly() {
                 let thisRow = {};
                 for (let i = 0; i < this.tabs.length; i++) {
                     for (let j = 0; j < this.tabs[i].tableData.length; j++) {
@@ -411,25 +427,25 @@
                 };
                 let postdata = qs.stringify(param);
                 // 得等数组装完才能校验
-                    SttPlanDetailBatchSave(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '课程模板已上传成功!',
-                                type: 'success'
-                            });
-                            this.$router.push({
-                                path: '/lessonTable'
-                            });
-                            // this.getTableQuery();
-                        } else {
-                            this.$router.push({
-                                path: '/lessonTable'
-                            });
-                            that.$message.error(json.Memo);
-                        }
-                    })
+                SttPlanDetailBatchSave(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '课程模板已上传成功!',
+                            type: 'success'
+                        });
+                        this.$router.push({
+                            path: '/lessonTable'
+                        });
+                        // this.getTableQuery();
+                    } else {
+                        this.$router.push({
+                            path: '/lessonTable'
+                        });
+                        that.$message.error(json.Memo);
+                    }
+                })
             },
             // 检查数据
             checkData() {
@@ -443,7 +459,7 @@
                         let lessonIndex = parseInt(item.lessonIndex + 1);
                         that.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
                         return false
-                    }else{
+                    } else {
                         return true
                     }
                 })
@@ -525,11 +541,20 @@
                     }
                 })
             },
+            seeWeekTemp() {
+                // 只看保存过的
+            },
+            // 去重
+            unique(arr) {
+                const res = new Map();
+                return arr.filter((arr) => !res.has(arr.EndStr) && res.set(arr.EndStr, 1))
+            }
         },
         watch: {
             $route(to) {
                 if (to.name == 'EditLessonTable') {
                     this.temId = this.$route.query.id;
+                    this.panelSelect();
                 }
             },
             temId(e) {
@@ -543,6 +568,9 @@
                 }
             },
         },
+        components: {
+            preview
+        }
     }
 </script>
 
@@ -649,14 +677,17 @@
     }
 
     .seeTemp {
-        position: relative;
+        /*position: relative;*/
         float: right;
-        bottom: 60px;
+        bottom: 0px;
+        z-index: 22;
+        margin-left: 10px;
     }
 
     .table {
         position: relative;
-        top: -50px;
+        /*top: -50px;*/
+        top: 0px;
     }
 
     .el-range-editor.el-input__inner {

+ 2 - 0
pc/src/views/Equip.vue

@@ -55,6 +55,8 @@
             <el-table-column
                     type="index"
                     label="序号"
+                        align="center"
+
                     width="60"
                     sortable
             >

+ 24 - 9
pc/src/views/Lesson.vue

@@ -25,6 +25,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column
@@ -34,7 +36,7 @@
                 </el-table-column>
                 <el-table-column
                         prop="ClassSelf.ClassType"
-                        label="是否通用"
+                        label="是否跨店"
                         width="110"
                         align="center"
                         sortable
@@ -130,11 +132,11 @@
             ></el-pagination>
         </div>
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogLesson" width="1200px">
+        <el-dialog :title="dialogTitle" :visible.sync="dialogLesson" :width="form.btnType == 0? '1200px':'650px'">
             <div>
                 <div class="pull-left">
                     <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="课程名称">
+                        <el-form-item label="课程名称" :required="true">
                             <el-input v-model="form.ClassName"></el-input>
                         </el-form-item>
                         <el-form-item label="消耗课时">
@@ -154,7 +156,7 @@
                                     inactive-color="#D9D9D9">
                             </el-switch>
                         </el-form-item>
-                        <el-form-item label="是否占课时">
+                        <el-form-item label="是否可选课">
                             <el-switch
                                     v-model="form.classType"
                                     :active-value="1"
@@ -163,13 +165,15 @@
                                     inactive-color="#D9D9D9">
                             </el-switch>
                         </el-form-item>
-                        <el-form-item label="是否通用">
+                        <el-form-item label="是否跨店">
                             <el-switch
                                     v-model="form.allUse"
                                     :active-value="0"
                                     :inactive-value="1"
                                     active-color="#409EFF"
-                                    inactive-color="#D9D9D9">
+                                    inactive-color="#D9D9D9"
+                                    :disabled="true"
+                            >
                             </el-switch>
                         </el-form-item>
                         <el-form-item label="课程颜色">
@@ -180,7 +184,7 @@
                         </el-form-item>
                     </el-form>
                 </div>
-                <div class="pull-right">
+                <div class="pull-right" v-if="form.btnType == 0">
                     <el-form ref="form" :model="form" label-width="160px">
                         <el-form-item label="课程会员人数">
                             <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"
@@ -636,7 +640,11 @@
                 this.form.classId = row.ClassId
                 this.form.ShopId = row.ShopId;
                 this.form.allUse = row.ShopId;
-                this.dialogLesson = true
+                this.dialogLesson = true;
+                // 读取已选的会员
+                console.log(row);
+                this.form.dialogValue = [];
+
                 this.dialogTitle = '编辑课程'
             },
             Lessonmember(Userlist) {
@@ -721,7 +729,11 @@
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return nonTfmtDate(column, 11);
+                if (column == "0001-01-01T08:05:43+08:05") {
+                    return '无有效期';
+                } else {
+                    return nonTfmtDate(column, 11);
+                }
             },
         },
         watch: {
@@ -832,4 +844,7 @@
     /deep/ .el-transfer-panel__item .el-checkbox__input {
         left: 15px;
     }
+    /deep/ .el-dialog .el-input__inner {
+        min-width: 180px;
+    }
 </style>

+ 14 - 12
pc/src/views/LessonTable.vue

@@ -25,6 +25,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column
@@ -142,7 +144,7 @@
                 <el-button @click="dialogVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="预览本周" :visible.sync="previewShow" width="1200px">
+        <el-dialog title="" :visible.sync="previewShow" width="1200px">
             <preview :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle"></preview>
             <div class="dialogFooter">
                 <el-button @click="previewShow = false" size="small">关闭</el-button>
@@ -358,11 +360,11 @@
                 };
                 let postdata = qs.stringify(param);
 
-                this.$confirm('此操作将复制相同内容的课程表, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
+                // this.$confirm('此操作将复制相同内容的课程表, 是否继续?', '提示', {
+                //     confirmButtonText: '确定',
+                //     cancelButtonText: '取消',
+                //     type: 'warning'
+                // }).then(() => {
                     SttPlanCopy(postdata).then(res => {
                         let json = res;
                         if (json.Code == 0) {
@@ -379,12 +381,12 @@
                             that.$message.error(json.Memo);
                         }
                     });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消复制'
-                    });
-                });
+                // }).catch(() => {
+                //     this.$message({
+                //         type: 'info',
+                //         message: '已取消复制'
+                //     });
+                // });
             },
             // 发布课程表
             openLessonTable(row) {

+ 2 - 0
pc/src/views/Log.vue

@@ -50,6 +50,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column

+ 39 - 10
pc/src/views/Main.vue

@@ -16,7 +16,7 @@
                             </em>
                             <em class="emrt">
                                 <i class="el-icon-caret-top"></i>
-                                昨日新增 {{CountAdd}}
+                                昨日新增 {{CountAdd}}
                             </em>
                         </div>
                     </li>
@@ -86,7 +86,7 @@
                     <span>{{getNowDate}}</span>
                 </div>
                 <div class="appointCard">
-                    <el-card class="box-card" v-for="c in classList">
+                    <el-card class="box-card" v-for="c in classList" @click.native="goLesson">
                         <div class="cardTitle blue" :style="{ color:c.ClassColor }">
                             {{c.ClassName}}
                         </div>
@@ -112,21 +112,22 @@
         <div class="rt">
             <div class="rtContext">
                 <div class="rtTitle">
-                    <h5>今日预约</h5>
-                    <span @click="goPage('appoint')">查看全部</span>
+                    <h5>最新预约</h5>
+                    <span @click="goPage('appoint','second')">查看全部</span>
                 </div>
                 <ul>
                     <!--                    TodayVipOrder-->
-                    <li v-for="as in appointList">
+                    <li v-for="as in appointList" @click="goAppointDetail(as.UserName)">
                         <div class="asTitle">
                             <img src="../assets/img/main/Oval.png" alt="">
                             <span>
                                 {{as.UserName}}
-                                {{as.Phone}}
+                                {{as.Phone}}  &nbsp; &nbsp; &nbsp;
+                                <em>预约时间:  {{as.OrderCreateTime |parseDate}}</em>
                           </span>
                         </div>
                         <div class="asContent">
-                            <span>预约时间:<em>{{as.BeginStr}}</em></span>
+                            <span>上课时间:<em>{{as.BeginStr}}</em></span>
                             <span>预约状态:
                                 <em v-if="as.Status == 1" class="green">已预约</em>
                                 <em v-if="as.Status == 2" class="red">已取消</em>
@@ -160,6 +161,7 @@
         ClassStatistics,
         ClassOverPrepare,
         VipUserOrderQuery,
+        LastOrderQuery,
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -208,10 +210,26 @@
             clearInterval(this.timer);//页面销毁时清除定时器
         },
         methods: {
-            goPage(url) {
+            goLesson(){
+                this.$router.push({
+                    path: '/appoint',
+                })
+            },
+            goAppointDetail(name){
+                this.$router.push({
+                    path: '/appoint',
+                    query: {
+                        page:'second',
+                        name:name
+                    }
+                })
+            },
+            goPage(url,page) {
                 this.$router.push({
                     path: '/' + url,
-                    query: {}
+                    query: {
+                        page:page
+                    }
                 })
             },
             // 会员统计
@@ -351,7 +369,8 @@
                     stdId: 0,
                 };
                 let postdata = qs.stringify(param);
-                VipUserOrderQuery(postdata).then(res => {
+                // VipUserOrderQuery(postdata).then(res => {
+                LastOrderQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -808,6 +827,7 @@
         border-bottom: 1px solid #F0F2F5;
         padding-top: 30px;
         padding-bottom: 10px;
+        cursor: pointer;
     }
 
     .asTitle {
@@ -820,6 +840,7 @@
         line-height: 20px;
         color: #000000;
         font-size: 14px;
+
     }
 
     .asTitle img {
@@ -829,11 +850,16 @@
 
     .asTitle span {
         /*width: 26px;*/
+        min-width: 300px;
         height: 30px;
         line-height: 26px;
         float: left;
         margin-right: 10px;
     }
+    .asTitle em {
+        float: right;
+        text-align: right;
+    }
 
     .asContent {
         width: 100%;
@@ -867,6 +893,9 @@
     .asContent span s.blue {
         background-color: #E5F2FF;
     }
+    .box-card {
+        cursor: pointer;
+    }
 
     .box-card em {
         font-style: normal;

+ 19 - 13
pc/src/views/Member.vue

@@ -48,7 +48,7 @@
             <el-button @click="lessonChange">课时调整</el-button>
             <el-button @click="giftChange">赠送课时调整</el-button>
             <el-button @click="ExpTimeChange">有效期调整</el-button>
-            <el-button @click="lessonStudenChange">增删课程</el-button>
+            <el-button @click="lessonStudenChange">增删会员可预约课程</el-button>
             <!--            <el-button class="pull-right" icon="el-icon-position">导出</el-button>-->
         </div>
         <div class="table">
@@ -68,7 +68,9 @@
                 <el-table-column
                         type="index"
                         label="序号"
-                        width="50">
+                        align="center"
+                        width="50"
+                >
                 </el-table-column>
                 <el-table-column
                         prop="UserInfo.Name"
@@ -85,6 +87,7 @@
                 <el-table-column
                         prop="UserInfo.VipType"
                         label="类型"
+                        align="center"
                         width="80px"
                         sortable
                 >
@@ -186,10 +189,10 @@
             <div class="dialogContent">
                 <div :class="['pull-left',{'tabwild':form.btnType == 1},]">
                     <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="手机号">
+                        <el-form-item label="手机号"  :required="true">
                             <el-input v-model="form.phone"></el-input>
                         </el-form-item>
-                        <el-form-item label="会员名">
+                        <el-form-item label="会员名" :required="true">
                             <el-input v-model="form.name"></el-input>
                         </el-form-item>
                         <el-form-item label="会员类型" v-if="form.btnType == 0">
@@ -239,17 +242,17 @@
                     <em class="blue">【 {{form.rowName}}】</em>
                     <br>
                     <br>
-                    <span v-if="dialogLesson">当前课时</span>
-                    <span v-if="dialogGift">赠送课时</span>
+                    <span v-if="dialogLesson">当前课时 {{form.normalhour}}</span>
+                    <span v-if="dialogGift">赠送课时 {{form.gifthour}}</span>
                     <span v-if="dialogExpTime">当前到期时间</span>
                     <span v-if="dialogLessonTable">当前会员课程</span>
                 </h5>
             </div>
             <div v-if="dialogLesson">
-                <el-input-number v-model="form.normalhour" :min="0" :max="9999" label="课时调整"></el-input-number>
+                <el-input-number v-model="form.newnormalhour" :min="-9999" :max="9999" label="课时调整"></el-input-number>
             </div>
             <div v-if="dialogGift">
-                <el-input-number v-model="form.gifthour" :min="0" :max="9999" label="赠送课时调整"></el-input-number>
+                <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整"></el-input-number>
             </div>
             <div v-if="dialogExpTime">
                 <el-date-picker
@@ -347,7 +350,9 @@
                     userId: '',
                     vipType: 1,
                     normalhour: 0,
+                    newnormalhour: 0,
                     gifthour: 0,
+                    newgifthour: 0,
                     btnType: 0,//0新建,1编辑编辑
                     memo: '',
                     expTime: '',
@@ -516,7 +521,8 @@
                     return false
                 }
                 let row = this.multipleSelection[0];
-                this.form.normalhour = 0;
+                this.form.normalhour = row.UserInfo.RemainNormalhour;
+                this.form.newnormalhour = 0;
                 this.form.rowName = row.UserInfo.Name;
                 this.form.userId = row.UserInfo.Id;
                 this.dialogVisible = true;
@@ -543,8 +549,8 @@
                     return false
                 }
                 let row = this.multipleSelection[0];
-                // this.form.gifthour = row.UserInfo.RemainGifthour;
-                this.form.gifthour = 0;
+                this.form.gifthour = row.UserInfo.RemainGifthour;
+                this.form.newgifthour = 0;
                 this.form.rowName = row.UserInfo.Name;
                 this.form.userId = row.UserInfo.Id;
                 this.dialogVisible = true;
@@ -703,7 +709,7 @@
                 let param = {
                     token: localStorage.token,
                     userId: that.form.userId,
-                    chgHour: that.form.normalhour,
+                    chgHour: that.form.newnormalhour,
                     chgType: 1,//课时类型 1:普通课时 2:赠送课时
                 };
                 let postdata = qs.stringify(param);
@@ -730,7 +736,7 @@
                 let param = {
                     token: localStorage.token,
                     userId: that.form.userId,
-                    chgHour: that.form.gifthour,
+                    chgHour: that.form.newgifthour,
                     chgType: 2,//课时类型 1:普通课时 2:赠送课时
                 };
                 let postdata = qs.stringify(param);

+ 2 - 0
pc/src/views/ShopManage.vue

@@ -47,6 +47,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column

+ 159 - 132
pc/src/views/appoint.vue

@@ -13,10 +13,42 @@
                 </ul>
             </div>
             <el-tabs v-model="activeName" type="card">
-                <el-tab-pane label="课程预览总览" name="first">
+                <el-tab-pane label="会员预约列表" name="second">
+                    <div class="panel-body">
+                        <div class="panel_control">
+                            <el-row :gutter="20">
+                                <el-col :span="5">
+                                    <em>会员名:</em>
+                                    <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
+                                </el-col>
+                                <el-col :span="5">
+                                    <em>手机号:</em>
+                                    <el-input v-model="panel.phone" placeholder="请输入手机号"></el-input>
+                                </el-col>
+                                <el-col :span="5">
+                                    <em>预约课程:</em>
+                                    <el-select v-model="panel.classId">
+                                        <el-option
+                                                v-for="item in panel.classOptions"
+                                                :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-col :span="4">
+                                    <el-button class="pull-right" type="warning" @click="addMember">增加预约</el-button>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </div>
+                    <br>
                     <div class="table">
                         <el-table
-                                :data="tableData"
+                                :data="tableData2"
                                 border
                                 is-horizontal-resize
                                 :default-sort="{prop: 'date', order: 'descending'}"
@@ -31,17 +63,23 @@
                             <el-table-column
                                     type="index"
                                     label="序号"
+                                    align="center"
                                     width="50">
                             </el-table-column>
                             <el-table-column
-                                    prop="BeginTime"
-                                    label="上课时间"
-                                    :formatter="filterFmtDate"
+                                    prop="UserName"
+                                    label="会员名"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Phone"
+                                    label="手机号"
+                                    sortable
                             >
                             </el-table-column>
                             <el-table-column
                                     prop="ClassName"
-                                    label="课程"
+                                    label="预约课程"
                                     sortable
                             >
                                 <template slot-scope="scope">
@@ -49,24 +87,17 @@
                                 </template>
                             </el-table-column>
                             <el-table-column
-                                    prop="Recovered"
-                                    label="预约进度"
-                                    width="220px"
-                                    sortable
+                                    prop="BeginTime"
+                                    label="上课时间"
+                                    :formatter="filterFmtDate"
                             >
-                                <template slot-scope="scope">
-                                    <el-progress
-                                            :percentage="parseFloat((scope.row.OrderCount/scope.row.OrderToplimit * 100).toFixed(2))"
-                                            :format="format"
-                                    ></el-progress>
-                                </template>
                             </el-table-column>
                             <el-table-column
-                                    prop="OrderToplimit"
-                                    label="预约名额"
-                                    width="240px"
+                                    prop="OrderCreateTime"
+                                    label="会员预约时间"
+                                    :formatter="filterFmtDate"
+                                    sortable
                             >
-
                             </el-table-column>
                             <el-table-column
                                     prop="ConsumeHour"
@@ -75,28 +106,31 @@
                             >
                             </el-table-column>
                             <el-table-column
-                                    prop="WxOrder"
-                                    label="微信可预约"
+                                    prop="RemainHour"
+                                    label="剩余课时"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Status"
+                                    label="预约状态"
+                                    sortable
                             >
                                 <template slot-scope="scope">
-                                    <!--                                    0:不可预约 1:可预约-->
-                                    <el-switch
-                                            v-model="scope.row.WxOrder"
-                                            :active-value="1"
-                                            :inactive-value="0"
-                                            active-color="#409EFF"
-                                            inactive-color="#D9D9D9"
-                                            @change=changeWechat($event,scope.row)
-                                    >
-                                    </el-switch>
+                                    <span v-if="scope.row.Status == 1" style="color: chartreuse">已预约</span>
+                                    <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
+                                    <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
+                                    <span v-if="scope.row.Status == 4" style="color: #015B9E">已完成</span>
                                 </template>
                             </el-table-column>
                             <el-table-column
-                                    prop="StdId"
+                                    prop="Status"
                                     label="操作"
                             >
                                 <template slot-scope="scope">
-                                    <el-button type="text" @click="seeDetail(scope.row)">详情</el-button>
+                                    <el-button type="danger" size="mini" round
+                                               @click="BtnOrderCancelByManager(scope.row)">取消预约
+                                    </el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -109,42 +143,10 @@
                         ></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="5">
-                                    <em>会员名:</em>
-                                    <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
-                                </el-col>
-                                <el-col :span="5">
-                                    <em>手机号:</em>
-                                    <el-input v-model="panel.phone" placeholder="请输入手机号"></el-input>
-                                </el-col>
-                                <el-col :span="5">
-                                    <em>预约课程:</em>
-                                    <el-select v-model="panel.classId">
-                                        <el-option
-                                                v-for="item in panel.classOptions"
-                                                :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-col :span="4">
-                                    <el-button class="pull-right" type="warning" @click="addMember">增加预约</el-button>
-                                </el-col>
-                            </el-row>
-                        </div>
-                    </div>
-                    <br>
+                <el-tab-pane label="课程预览总览" name="first">
                     <div class="table">
                         <el-table
-                                :data="tableData2"
+                                :data="tableData"
                                 border
                                 is-horizontal-resize
                                 :default-sort="{prop: 'date', order: 'descending'}"
@@ -159,39 +161,46 @@
                             <el-table-column
                                     type="index"
                                     label="序号"
+                        align="center"
+
                                     width="50">
                             </el-table-column>
                             <el-table-column
-                                    prop="UserName"
-                                    label="会员名"
+                                    prop="BeginTime"
+                                    label="上课时间"
+                                    :formatter="filterFmtDate"
                             >
                             </el-table-column>
                             <el-table-column
-                                    prop="Phone"
-                                    label="手机号"
+                                    prop="ClassName"
+                                    label="课程"
                                     sortable
                             >
+                                <template slot-scope="scope">
+                                    <span class="lessons" :style="{ background:scope.row.ClassColor }">{{scope.row.ClassName}}</span>
+                                </template>
                             </el-table-column>
                             <el-table-column
-                                    prop="ClassName"
-                                    label="预约课程"
+                                    prop="Recovered"
+                                    label="预约进度"
+                                    width="220px"
                                     sortable
                             >
                                 <template slot-scope="scope">
-                                    <span class="lessons" :style="{ background:scope.row.ClassColor }">{{scope.row.ClassName}}</span>
+                                    <el-progress
+                                            :percentage="parseInt((scope.row.OrderCount/scope.row.OrderToplimit * 100))"
+                                            :format="format"
+                                    ></el-progress>
                                 </template>
                             </el-table-column>
                             <el-table-column
-                                    prop="BeginTime"
-                                    label="上课时间"
-                                    :formatter="filterFmtDate"
+                                    prop="OrderToplimit"
+                                    label="预约名额"
                             >
                             </el-table-column>
                             <el-table-column
-                                    prop="OrderCreateTime"
-                                    label="会员预约时间"
-                                    :formatter="filterFmtDate"
-                                    sortable
+                                    prop="OrderCount"
+                                    label="预约人数"
                             >
                             </el-table-column>
                             <el-table-column
@@ -201,31 +210,28 @@
                             >
                             </el-table-column>
                             <el-table-column
-                                    prop="RemainHour"
-                                    label="剩余课时"
-                                    sortable
-                            >
-                            </el-table-column>
-                            <el-table-column
-                                    prop="Status"
-                                    label="预约状态"
-                                    sortable
+                                    prop="WxOrder"
+                                    label="微信可预约"
                             >
                                 <template slot-scope="scope">
-                                    <span v-if="scope.row.Status == 1">已预约</span>
-                                    <span v-if="scope.row.Status == 2">已取消</span>
-                                    <span v-if="scope.row.Status == 3">预约未到</span>
-                                    <span v-if="scope.row.Status == 4">已完成</span>
+                                    <!--                                    0:不可预约 1:可预约-->
+                                    <el-switch
+                                            v-model="scope.row.WxOrder"
+                                            :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"
+                                    prop="StdId"
                                     label="操作"
                             >
                                 <template slot-scope="scope">
-                                    <el-button type="danger" size="mini" round
-                                               @click="BtnOrderCancelByManager(scope.row)">取消预约
-                                    </el-button>
+                                    <el-button type="text" @click="seeDetail(scope.row)">详情</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -240,14 +246,16 @@
                 </el-tab-pane>
             </el-tabs>
         </div>
-
-
         <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
             <div class="dialogContent">
                 <div class="">
                     <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="课程">
-                            <el-select v-model="form.stdId" filterable placeholder="请选择" @change="vipSelect(form.stdId)">
+                        <el-form-item label="当前日期" :required="true">
+                            <el-input v-model="form.displayDay" placeholder="placeholder" :disabled="true" style="width: 220px"></el-input>
+                        </el-form-item>
+                        <el-form-item label="课程" :required="true">
+                            <el-select v-model="form.stdId" filterable placeholder="请选择"
+                                       @change="vipSelect(form.stdId)">
                                 <el-option
                                         v-for="item in form.stdList"
                                         :key="item.value"
@@ -256,9 +264,9 @@
                                 </el-option>
                             </el-select>
                         </el-form-item>
-<!--                      todo  课程联动查询userlist by classid-->
-                        <el-form-item label="会员">
-                            <el-select v-model="form.userId" filterable placeholder="请选择" >
+                        <!--     课程联动查询userlist by classid-->
+                        <el-form-item label="会员" :required="true">
+                            <el-select v-model="form.userId" filterable placeholder="请选择">
                                 <el-option
                                         v-for="item in form.userList"
                                         :key="item.value"
@@ -308,10 +316,8 @@
     export default {
         data() {
             return {
-                // activeName: 'first',
-                activeName: 'first',
+                activeName: 'second',
                 choiceDate: 0,//默认为今天
-                // activeName: 'second',
                 tableView: true,//其他dialog
                 dialogVisible: false,//其他dialog
                 dialogTableVisible: false,//其他dialog
@@ -361,7 +367,7 @@
                         {value: 7, label: '近一周'},
                         {value: 1, label: '当日'},
                     ],
-                    time1: globalBt(),
+                    // time1: globalBt(),
                 },
                 multipleSelection: [],
                 pageination: {
@@ -372,6 +378,7 @@
                 },
                 form: {
                     name: '',
+                    displayDay: '',
                     userCode: '',
                     shopId: '',
                     stdId: 0,
@@ -396,10 +403,17 @@
             }
         },
         mounted() {
+            if (this.$route.query.page == 'second') {
+                this.panel.name = this.$route.query.name;
+                this.activeName = 'second'
+            } else {
+                this.activeName = 'second'
+            }
             this.ClassSelect();
             this.panelSelect();
             // this.getCurrWeekDays();
             this.getFurtherDays();
+
         },
         methods: {
             // .课程表详情微信可预约状态修改
@@ -461,24 +475,23 @@
                 let that = this;
                 // 筛选相同的stdid的classId
                 that.form.stdList.map(function (item) {
-                    console.log(item);
-                        if(item.value == stdId){
-                            let param = {
-                                token: localStorage.token,
-                                classId:item.classId
-                            };
-                            let postdata = qs.stringify(param);
-                            // VipUserListQuery
-                            VipUserSimpleQuery(postdata).then(res => {
-                                let json = res;
-                                if (json.Code == 0) {
-                                    that.form.userId = '';
-                                    that.form.userList = turnResToOptionBySimViper(json.Rs);
-                                } else {
-                                    that.$message.error(json.Memo);
-                                }
-                            })
-                        }
+                    if (item.value == stdId) {
+                        let param = {
+                            token: localStorage.token,
+                            // classId: item.classId
+                        };
+                        let postdata = qs.stringify(param);
+                        // VipUserListQuery
+                        VipUserSimpleQuery(postdata).then(res => {
+                            let json = res;
+                            if (json.Code == 0) {
+                                that.form.userId = '';
+                                that.form.userList = turnResToOptionBySimViper(json.Rs);
+                            } else {
+                                that.$message.error(json.Memo);
+                            }
+                        })
+                    }
                 })
             },
             ClassSelect() {
@@ -560,7 +573,7 @@
             // 编辑
             BtnOrderCancelByManager(row) {
                 let that = this;
-                this.$confirm('是否取消用户' + row.UserName + '的预约?', '取消预约', {
+                this.$confirm('是否取消用户  ' + row.UserName + '  的预约?', '取消预约', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'
@@ -1009,7 +1022,8 @@
                 this.clearForm();
                 // 加载当前可选课程
                 this.getClassListByOrderDate();
-                this.dialogMemberVisible = true
+                this.dialogMemberVisible = true;
+                this.form.displayDay =  this.weeks[this.choiceDate].data +' '+ this.weeks[this.choiceDate].name;
                 this.btnType = 0;
                 this.dialogTitle = '新增预约';
             },
@@ -1304,8 +1318,12 @@
         watch: {
             $route(to) {
                 if (to.name == 'appoint') {
-                    this.getTableQuery();
+                    if (this.$route.query.page == 'second') {
+                        this.activeName = 'second'
+                        this.panel.name = this.$route.query.name;
+                    }
                 }
+
             },
             activeName(val) {
                 if (val == 'first') {
@@ -1510,17 +1528,26 @@
         border-radius: 250px;
         float: left;
     }
+
     /deep/ .el-progress__text {
         position: relative;
-        top:1px;
+        top: 1px;
         float: right;
         line-height: 14px;
         height: 16px;
     }
+
     /deep/ .el-progress-bar {
         width: 190px;
         float: left;
         overflow: hidden;
         margin-top: 5px;
     }
+    .timeList li.active {
+        color: #fff;
+        background: #409EFF;
+    }
+    .timeList li.active span, .timeList li.active em {
+        color: #fff;
+    }
 </style>

+ 2 - 0
pc/src/views/coach.vue

@@ -41,6 +41,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column

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

@@ -57,6 +57,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column
@@ -64,11 +66,19 @@
                         label="会员名"
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="Phone"
+                        label="手机号"
+                >
+                </el-table-column>
                 <el-table-column
                         prop="ClassName"
                         label="课程"
                         sortable
                 >
+                    <template slot-scope="scope">
+                        <span class="lessons" :style="{ background:scope.row.ClassColor }">{{scope.row.ClassName}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="NormalHour"
@@ -1069,4 +1079,9 @@
     /deep/ .el-date-editor .el-range-separator {
         line-height: 22px;
     }
+    .lessons {
+        padding: 1px 7px;
+        border-radius: 250px;
+        float: left;
+    }
 </style>

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

@@ -18,6 +18,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column

+ 45 - 4
pc/src/views/finishDetail.vue

@@ -39,6 +39,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column
@@ -52,6 +54,28 @@
                         sortable
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="ClassName"
+                        label="课程"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span class="lessons" :style="{ background:scope.row.ClassColor }">{{scope.row.ClassName}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="OrderTime"
+                        label="预约时间"
+                        :formatter="filterFmtDate"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="RemainTotalhour"
+                        label="剩余全部课时"
+                        sortable
+                >
+                </el-table-column>
                 <el-table-column
                         prop="Status"
                         label="状态"
@@ -136,6 +160,7 @@
         testSelect,
         TeacherListQuery,
         ShopManagerListQuery,
+        VipUserSimpleQuery,
         ClassOverDetailDel
     } from "../api/getApiRes";
 
@@ -255,13 +280,15 @@
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    classId: this.$route.query.classId,
+                    // classId: this.$route.query.classId,
                 };
                 let postdata = qs.stringify(param);
-                ClassVipuserQuery(postdata).then(res => {
+                // ClassVipuserQuery(postdata).then(res => {
+                VipUserSimpleQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        that.form.dialogdata = turnResToOptionByViper(json.Rs);
+                        // that.form.dialogdata = turnResToOptionByViper(json.Rs);
+                        that.form.dialogdata = turnResToOptionBySimViper(json.Rs);
                         console.log(that.form.dialogdata);
                     } else {
                         that.$message.error(json.Memo);
@@ -276,7 +303,7 @@
                     stdId: row.StdId,
                     cfId: row.CfId,
                 };
-                this.$confirm('是否删除用户' + row.Name + '的下课记录?', '禁用操作', {
+                this.$confirm('是否删除用户  ' + row.Name + '  的下课记录?', '提示', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'
@@ -615,6 +642,15 @@
             sortChange(params) {
                 console.log(params)
             },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
+                    return '无有效期';
+                } else {
+                    return nonTfmtDate(column, 11);
+                }
+            },
         },
         watch: {
             $route(to) {
@@ -748,4 +784,9 @@
     .viplist /deep/ .el-transfer__buttons button:nth-child(1){
         display: none;
     }
+    .lessons {
+        padding: 1px 7px;
+        border-radius: 250px;
+        float: left;
+    }
 </style>

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

@@ -26,6 +26,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column
@@ -179,7 +181,7 @@
                 <el-button @click="dialogNameVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="预览本周" :visible.sync="previewShow" width="1200px">
+        <el-dialog title="" :visible.sync="previewShow" width="1200px">
             <preview  :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle" ></preview>
             <div class="dialogFooter">
                 <el-button @click="previewShow = false" size="small">关闭</el-button>
@@ -264,7 +266,7 @@
                     let json = res;
                     if (json.Code == 0) {
                         that.BigTitle = row.Name;
-                        that.smallTitle = row.BeginDate + '-----' + row.EndDate;
+                        that.smallTitle = row.BeginDate + '' + row.EndDate;
                         that.previewDate = json.Rs;
                         // 前台排序
                         that.previewDate.SttPreviewClassList.sort((a,b)=>a.ClassIndex-b.ClassIndex);//升序

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

@@ -66,6 +66,8 @@
                 <el-table-column
                         type="index"
                         label="序号"
+                        align="center"
+
                         width="50">
                 </el-table-column>
                 <el-table-column