Quellcode durchsuchen

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

Changpeng Duan vor 5 Jahren
Ursprung
Commit
a1a19bc45a

+ 5 - 13
app/src/page/appoint.vue

@@ -119,17 +119,6 @@
                     }
                     this.weeks.push(item);
                 }
-                console.log( this.weeks);
-                // let todaymonth =  new Date.getMonth() + 1;
-                // let todayday =  new Date.getDate();
-                //  todaymonth = todaymonth < 10 ? '0' + todaymonth : todaymonth;
-                //  todayday = todayday < 10 ? '0' + todayday : todayday;
-                // let today = {
-                //     name:this.numberToWeek(new Date.getDay()),
-                //     data: new Date.getMonth() + 1 + '月' + new Date.getDate() + '日',
-                //     orderDate: new Date().getFullYear() + '-' + month + '-' + day
-                // }
-                // this.weeks.push(today);
                 this.getList();
             },
             numberToWeek(val) {
@@ -174,7 +163,6 @@
                         that.Toast(json.Memo + ',错误码:' + json.Code);
                     }
                 })
-
             },
             closeAlertDialog() {
                 this.openAlert = false;
@@ -297,6 +285,8 @@
         float: left;
     }
     /deep/ .mu-tab {
+        width: 85px;
+        min-width: 85px;
         float: left;
         height: 51px;
         margin-right: 6px;
@@ -528,10 +518,12 @@
         display: none;
     }
 
-
     /deep/ .mu-modal-inner {
         width: 90%;
         float: left;
     }
+    /deep/ .mu-tab-link-highlight {
+        display: none!important;
+    }
 
 </style>

+ 4 - 17
app/src/page/index.vue

@@ -1,11 +1,9 @@
 <template>
-<div id="index">
-    <keep-alive>
-        <transition name="fade">
+    <div id="index">
+        <keep-alive>
             <router-view></router-view>
-        </transition>
-    </keep-alive>
-</div>
+        </keep-alive>
+    </div>
 </template>
 
 <script>
@@ -21,15 +19,4 @@
         padding-bottom: 40px;
         overflow-y: scroll;
     }
-    .fade-enter-active, .fade-leave-active {
-        transition: opacity .5s;
-    }
-
-    .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */
-    {
-        opacity: 0;
-    }
-    .mu-modal-icon {
-        float: left;
-    }
 </style>

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

@@ -9,7 +9,10 @@
                 <img src="../static/images/main/771.png" height="133" width="130"/>
                 <div class="rt">
                     <h5>{{l.ShopName}}</h5>
-                    <span>今日预约名额剩余{{l.Recovered}}人</span>
+                    <span>今日预约名额剩余
+                        <i>{{l.RemainOrdernum}}</i>
+                        <i v-if="l.RemainOrdernum == 0" class="red">{{l.RemainOrdernum}}</i>
+                        人</span>
                     <span>地址:{{l.Addr}}</span>
                     <em class="green" v-if="l.WxStatus == 1">点击预约</em>
                     <em class="red" v-else>不可预约</em>
@@ -141,6 +144,7 @@
 <style scoped>
     #mainPage {
         width: 100%;
+        height: 100%;
         overflow: hidden;
         display: block;
         margin: 0 auto;

+ 83 - 56
app/src/page/mine.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="page">
+    <div class="pages">
         <img src="../static/images/main/banner.png" height="121" width="414"/>
         <div class="context">
               <span class="num">
@@ -20,7 +20,8 @@
                     <em v-if="user.VipType == 0">(有效期至{{user.ExpTime |fmtTime}})</em>
                 </div>
                 <mu-flex class="linear-progress">
-                    <mu-linear-progress mode="determinate" :value="user.ClassRemain / user.ClassTotal *100"  :size="10"  color="secondary"></mu-linear-progress>
+                    <mu-linear-progress mode="determinate" :value="user.ClassRemain / user.ClassTotal *100" :size="10"
+                                        color="secondary"></mu-linear-progress>
                 </mu-flex>
                 <div class="limit">
                     <em>剩余 {{user.ClassRemain}} 课时</em>
@@ -30,27 +31,27 @@
             <div class="dataSum">
                 <div class="row">
                     <em>卡路里(月度)</em>
-                    <div class="mid midl"></div>
                     <span>{{user.CalorieMonth}}</span>
                 </div>
+            </div>
+            <div class="dataSum">
                 <div class="row">
                     <em>总卡路里</em>
-                    <div class="mid"></div>
                     <span>{{user.CalorieTotal}}</span>
                 </div>
             </div>
             <div class="dataSum">
                 <div class="row">
                     <em>CK(月度)</em>
-                    <div class="mid midl"></div>
                     <span>{{user.CKMonth}}</span>
                 </div>
-                <div class="row">
-                    <em>总CK</em>
-                    <div class="mid"></div>
-                    <span>{{user.CKTotal}}</span>
-                </div>
             </div>
+                <div class="dataSum">
+                    <div class="row">
+                        <em>总CK</em>
+                        <span>{{user.CKTotal}}</span>
+                    </div>
+                </div>
             <div class="btn_center">
                 <span class="btn btn-md login_btn" @click="logoutBtn">退出</span>
             </div>
@@ -86,17 +87,17 @@
                     timeLong: '',
                 },
                 user: {
-                    CKMonth:0,
-                    CKTotal:0,
-                    CalorieMonth:0,
-                    CalorieTotal:0,
-                    ClassFinish:0,
-                    ClassRemain:0,
-                    ClassTotal:0,
-                    ExpTime:0,
-                    Name:'',
-                    Phone:'',
-                    VipType:0,
+                    CKMonth: 0,
+                    CKTotal: 0,
+                    CalorieMonth: 0,
+                    CalorieTotal: 0,
+                    ClassFinish: 0,
+                    ClassRemain: 0,
+                    ClassTotal: 0,
+                    ExpTime: 0,
+                    Name: '',
+                    Phone: '',
+                    VipType: 0,
                 }
             }
         },
@@ -104,11 +105,11 @@
             this.getInfo();
         },
         methods: {
-            logoutBtn(){
-                  let that = this;
+            logoutBtn() {
+                let that = this;
                 this.$confirm('是否退出当前账号?', '提示', {
                     type: 'warning'
-                }).then(({ result }) => {
+                }).then(({result}) => {
                     if (result) {
                         localStorage.token = '';
                         that.$router.push({path: '/login'});
@@ -136,9 +137,9 @@
         },
         filters: {
             fmtTime: function (value) {
-                if(!value){
+                if (!value) {
                     return 0
-                }else{
+                } else {
                     let date = new Date(value);
                     let y = date.getFullYear();
                     let MM = date.getMonth() + 1;
@@ -151,7 +152,7 @@
                     m = m < 10 ? ('0' + m) : m;
                     let s = date.getSeconds();
                     s = s < 10 ? ('0' + s) : s;
-                    return y + '-' + MM + '-' + d ;
+                    return y + '-' + MM + '-' + d;
                 }
             },
         },
@@ -177,7 +178,10 @@
 </script>
 
 <style scoped>
-    .page {
+    .pages {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
         background: #F2F2F2;
     }
 
@@ -284,6 +288,7 @@
     .vTitle.price i {
         background: #FFB43C;
     }
+
     .vNum {
         width: 100%;
         height: 25px;
@@ -291,6 +296,7 @@
         display: block;
         margin: 5px auto;
     }
+
     .center {
         width: 100%;
         overflow: hidden;
@@ -298,6 +304,7 @@
         margin: 0 auto;
         text-align: center;
     }
+
     .vNum em {
         position: relative;
         float: right;
@@ -308,6 +315,7 @@
         color: #c9c9c9;
         padding-right: 3%;
     }
+
     /deep/ .linear-progress {
         width: 90%;
         overflow: hidden;
@@ -315,6 +323,7 @@
         margin: 0 auto;
         border-radius: 250px;
     }
+
     .limit {
         width: 90%;
         overflow: hidden;
@@ -322,6 +331,7 @@
         margin: 0 auto;
         margin-top: 8px;
     }
+
     .limit em {
         font-family: "PingFang SC";
         font-weight: 300;
@@ -330,6 +340,7 @@
         color: #e75296;
         padding-left: 10px;
     }
+
     .limit span {
         font-family: "PingFang SC";
         font-weight: 300;
@@ -340,22 +351,24 @@
         text-align: right;
         padding-right: 10px;
     }
+
     .dataSum {
         width: 100%;
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        height: 95px;
         background: #fff;
         margin-top: 10px;
     }
+
     .dataSum .row {
-        width: 94%;
+        width: 90%;
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        padding: 3% 0;
+        padding: 2% 0;
     }
+
     .dataSum .row em {
         float: left;
         font-family: "PingFang SC";
@@ -364,6 +377,7 @@
         text-align: right;
         color: #3b3b3b;
     }
+
     .dataSum .row span {
         font-family: "PingFang SC";
         font-weight: 500;
@@ -372,6 +386,7 @@
         color: #3b3b3b;
         float: right;
     }
+
     .row .mid {
         width: 66%;
         height: 0px;
@@ -382,10 +397,12 @@
         margin-right: 5px;
         margin-left: 10px;
     }
+
     .row .midl {
         width: 54%;
         height: 0px;
     }
+
     .login_btn {
         width: 96%;
         height: 50px;
@@ -405,40 +422,50 @@
         padding: 0;
         font-size: 24px;
     }
+
     @media only screen and (max-width: 640px) {
 
+    }
+
+    @media only screen and (max-width: 480px) {
+
+    }
+
+    @media only screen and (max-width: 375px) {
+        .vNum em {
+            padding-right: 0 !important;
         }
-        @media only screen and (max-width: 480px) {
 
+        .row .mid {
+            width: 49%;
         }
-        @media only screen and (max-width: 375px) {
-            .vNum em {
-                padding-right: 0!important;
-            }
-            .row .mid {
-                width: 49%;
-            }
-            .row .midl {
-                width: 44%;
-                height: 0px;
-            }
+
+        .row .midl {
+            width: 44%;
+            height: 0px;
         }
-        @media only screen and (max-width: 360px) {
-            .vNum em {
-                padding-right: 0!important;
-            }
-            .row .mid {
-                width: 49%;
-            }
-            .row .midl {
-                width: 44%;
-                height: 0px;
-            }
+    }
+
+    @media only screen and (max-width: 360px) {
+        .vNum em {
+            padding-right: 0 !important;
         }
-        @media only screen and (max-width: 320px) {
 
+        .row .mid {
+            width: 49%;
         }
-        @media only screen and (min-width: 641px) {
 
+        .row .midl {
+            width: 44%;
+            height: 0px;
         }
+    }
+
+    @media only screen and (max-width: 320px) {
+
+    }
+
+    @media only screen and (min-width: 641px) {
+
+    }
 </style>

+ 97 - 60
app/src/page/record.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="page">
+    <div class="pages">
         <img src="../static/images/main/banner.png" height="121" width="414"/>
         <div class="context">
             <span class="num">
@@ -11,64 +11,67 @@
                 <mu-tab>消费记录</mu-tab>
             </mu-tabs>
             <div class="whiteCube"></div>
-            <ul class="list">
-                <li v-for="l in list">
-                    <div class="lt" v-if="active != 2">
-                        <h5>{{l.CurrentDate}}</h5>
-                        <span>{{l.BeginStr}}-{{l.EndStr}}</span>
-                    </div>
-                    <div class="lt" v-if="active == 2">
-                        <h5>{{l.CreatedAt|filterTime}}</h5>
-                        <span>剩余课时 {{l.AfterNormalhour}}</span>
-                    </div>
-                    <div class="md">
-                        <em>
-                            {{l.ClassName}}
-                        </em>
-                        <span class="green" v-if="l.Status == 0">
+                <ul class="list">
+                    <mu-load-more @refresh="refresh" :refreshing="refreshing" :loading="loading" @load="load">
+                    <li v-for="l in list">
+                        <div class="lt" v-if="active != 2">
+                            <h5>{{l.CurrentDate}}</h5>
+                            <span>{{l.BeginStr}}-{{l.EndStr}}</span>
+                        </div>
+                        <div class="lt" v-if="active == 2">
+                            <h5>{{l.CreatedAt|filterTime}}</h5>
+                            <span>剩余课时 {{l.AfterNormalhour}}</span>
+                        </div>
+                        <div class="md">
+                            <em>
+                                {{l.ClassName}}
+                            </em>
+                            <span class="green" v-if="l.Status == 0">
                             预约上课
                         </span>
-                        <span class="red" v-if="l.Status == 1">
-                            预约未到
-                        </span>
-                    </div>
-                    <div class="rt">
-                        <div class="cancleBtn" v-if="l.Status == 0" @click="cancleAppoint(l)">取消</div>
-                        <span v-if="l.Status == 1" class="isFinish">
+                            <span class="green" v-if="l.Status == 1">
                             已预约
                         </span>
-                        <span class="red" v-if="l.Status == 2">
+                        </div>
+                        <div class="rt">
+                            <mu-button color="error" v-if="l.Status == 0" round @click="cancleAppoint(l)">取消</mu-button>
+                            <span v-if="l.Status == 1" class="isFinish">
+<!--                            已预约-->
+                             <mu-button color="error" round @click="cancleAppoint(l)">取消</mu-button>
+                        </span>
+                            <span class="red" v-if="l.Status == 2">
                             已取消
                         </span>
-                        <span class="red" v-if="l.Status == 3">
+                            <span class="red" v-if="l.Status == 3">
                             预约未到
                         </span>
-                        <span class="green" v-if="l.Status == 4">
+                            <span class="green" v-if="l.Status == 4">
                             已完成
                         </span>
-                        <em  v-if="active == 2">
-                            - {{l.NormalHour}}课时
-                        </em>
+                            <em v-if="active == 2">
+                                - {{l.NormalHour}}课时
+                            </em>
+                        </div>
+                    </li>
+                    </mu-load-more>
+                    <div class="tips">
+                        <p v-if="active == 0 && list == ''">
+                            暂无已预约
+                        </p>
+                        <p v-if="active == 1 && list == ''">
+                            暂无预约记录
+                        </p>
+                        <p v-if="active == 2 && list == ''">
+                            暂无消费记录
+                        </p>
                     </div>
-                </li>
-                <div class="tips">
-                    <p v-if="active == 0 && list == ''">
-                        暂无已预约
-                    </p>
-                    <p v-if="active == 1 && list == ''">
-                        暂无预约记录
-                    </p>
-                    <p v-if="active == 2 && list == ''">
-                        暂无消费记录
-                    </p>
-                </div>
-            </ul>
-        </div>
+                </ul>
+            </div>
         <bottomTab :curTab="thisTab"></bottomTab>
-<!--        <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>-->
+        <!--        <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>-->
     </div>
 </template>
 
@@ -78,6 +81,7 @@
     import {
         OrderListQuery,
         VipUserConsumeListQuery,
+        OderCancelByVipUser,
         testSelect,
         testTable,
     } from '../api/getApiRes.js'
@@ -99,23 +103,41 @@
                     name: '',
                     timeLong: '',
                 },
+                refreshing: false,
+                loading: false,
+                start: 1,
+                tableMax: 6,
             }
         },
         mounted() {
             this.getList();
         },
         methods: {
+            refresh () {
+            },
+            load () {
+                if(this.active != 2){
+                    return false
+                }
+                this.loading = true;
+                setTimeout(() => {
+                    this.loading = false;
+                    this.start =  this.start + 6;
+                    this.getVipUserConsumeListQuery();
+                }, 2000);
+            },
             cancleAppoint(row) {
                 let that = this;
-                this.$confirm('是否取消前课程预约?', '提示', {
+                this.$confirm('是否取消' + row.ClassName + '课程预约?', '提示', {
                     type: 'warning'
                 }).then(({result}) => {
                     if (result) {
                         let param = {
                             token: localStorage.token,
+                            orderId: row.OrderId,
                         };
                         let postdata = qs.stringify(param);
-                        testTable(postdata).then(res => {
+                        OderCancelByVipUser(postdata).then(res => {
                             let json = res;
                             if (json.Code == 0) {
                                 that.Toast('当前课程已取消预约', 'success');
@@ -135,7 +157,7 @@
                     token: localStorage.token,
                     statusList: statusList,
                     start: 1,
-                    tableMax: 10,
+                    tableMax: 299,
                 };
                 let postdata = qs.stringify(param);
                 if (parseInt(this.active) == 0 || parseInt(this.active) == 1) {
@@ -147,7 +169,7 @@
                                 that.num = json.Rs.length;
                             }
                         } else {
-                            that.$message.error(json.Memo);
+                            that.Toast(json.Memo + ',错误码:' + json.Code);
                         }
                     });
                 }
@@ -156,14 +178,15 @@
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    start: 1,
-                    tableMax: 10,
+                    start: this.start,
+                    tableMax: this.tableMax,
                 };
                 let postdata = qs.stringify(param);
                 VipUserConsumeListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        that.list = json.Rs;
+                        // that.list = json.Rs;
+                        that.list =  that.list.concat(json.Rs);
                         if (that.list) {
                             that.num = json.Rs.length;
                         }
@@ -205,9 +228,9 @@
         },
         filters: {
             filterTime: function (value) {
-                if(!value){
+                if (!value) {
                     return 0
-                }else{
+                } else {
                     return globalfmtDate(value);
                 }
             },
@@ -219,6 +242,7 @@
                 }
             },
             'active'() {
+                this.start = 1;
                 this.getList();
             }
         },
@@ -229,7 +253,10 @@
 </script>
 
 <style scoped>
-    .page {
+    .pages {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
         background: #F2F2F2;
     }
 
@@ -311,8 +338,9 @@
     }
 
     .list .lt {
-        width: 120px;
+        width: 100px;
         float: left;
+        overflow: visible;
     }
 
     .list .lt h5 {
@@ -340,7 +368,6 @@
     }
 
     .list .rt {
-        width: 55px;
         float: right;
         margin-right: 2%;
         overflow: hidden;
@@ -384,7 +411,8 @@
         font-size: 14px;
         text-align: left;
         color: #909090;
-
+        overflow: hidden;
+        padding-bottom: 6px;
     }
 
     .rt .red {
@@ -433,7 +461,16 @@
         font-size: 14px;
         line-height: 35px;
     }
+
     .green {
         color: #37cb00;
     }
+
+    /deep/ .mu-raised-button.mu-button-small {
+        width: 54px;
+        min-width: 40px;
+        float: right;
+        padding-left: 3px;
+        padding-right: 3px;
+    }
 </style>

+ 101 - 0
app/src/page/test.vue

@@ -0,0 +1,101 @@
+<template>
+    <div>
+        <mu-paper :z-depth="1" class="demo-loadmore-wrap">
+            <mu-container ref="container" class="demo-loadmore-content">
+                <mu-load-more @refresh="refresh" :refreshing="refreshing" :loading="loading" @load="load">
+                    <li v-for="i in list">
+                        {{text}} Item {{i.ClassName}}
+                    </li>
+
+                </mu-load-more>
+            </mu-container>
+        </mu-paper>
+    </div>
+</template>
+
+<script>
+    import axios from 'axios';
+    import {
+        VipUserConsumeListQuery,
+    } from '../api/getApiRes.js'
+
+    let qs = require('qs');
+    import Global from '../Global.js'
+
+    export default {
+        data() {
+            return {
+                num: 20,
+                refreshing: false,
+                loading: false,
+                text: 'List',
+                list: [],
+                start: 1,
+                tableMax: 5,
+            }
+        },
+        mounted() {
+            this.getVipUserConsumeListQuery();
+        },
+        methods: {
+            refresh() {
+            },
+            load() {
+                this.loading = true;
+                setTimeout(() => {
+                    this.loading = false;
+                    this.start =  this.start + 5;
+                    this.getVipUserConsumeListQuery();
+                }, 2000);
+            },
+            getVipUserConsumeListQuery() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    start: this.start,
+                    tableMax: this.tableMax,
+                };
+                let postdata = qs.stringify(param);
+                VipUserConsumeListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.list =  that.list.concat(json.Rs);
+                    } else {
+                        that.Toast(json.Memo + ',错误码:' + json.Code);
+                    }
+                })
+            },
+        }
+    };
+</script>
+
+<style scoped>
+    .demo-loadmore-wrap {
+        position: absolute;
+        width: 100%;
+        height: 100%;
+        display: flex;
+        overflow-y: scroll;
+        flex-direction: column;
+    }
+
+    .mu-appbar {
+        width: 100%;
+    }
+
+    .demo-loadmore-content {
+        flex: 1;
+        overflow: auto;
+        -webkit-overflow-scrolling: touch;
+    }
+    li {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 160px;
+        line-height: 160px;
+        border: 1px solid #ccc;
+        text-align: center;
+    }
+</style>

+ 8 - 0
app/src/router/index.js

@@ -65,6 +65,14 @@ const routes = [
             index: 1
         },
         component: () => import( '../page/login.vue')
+    }, {
+        path: '/test',
+        name: 'test',
+        meta: {
+            title: 'test',
+            index: 1
+        },
+        component: () => import( '../page/test.vue')
     }, {
         path: '*',
         name: 'notFound',

+ 12 - 0
pc/src/Global.js

@@ -255,6 +255,17 @@ turnResToOptionByViper = function (data) {
     })
     return ids
 }
+turnResToOptionBySimViper = function (data) {
+    if (!data) return false
+    let ids = data.map(item => {
+        return {
+            label: item.Name + ' ' + item.Usercode,
+            key: parseInt(item.Id),
+            value: parseInt(item.Id),
+        }
+    })
+    return ids
+}
 turnResToOptionByCoach = function (data) {
     if (!data) return false
     let ids = data.map(item => {
@@ -299,6 +310,7 @@ turnStdToOption = function (data) {
             label: item.ClassName + '(' + item.BeginStr + '-' + item.EndStr + ')',
             key: parseInt(item.StdId),
             value: parseInt(item.StdId),
+            classId: parseInt(item.ClassId),
         }
     })
     return ids

BIN
pc/src/assets/img/header/lteHead.png


BIN
pc/src/assets/img/header/ltehead.png


+ 3 - 3
pc/src/components/Headside.vue

@@ -1,8 +1,8 @@
 <template>
     <div id="headside">
         <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>
+<!--            <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>
             <div @click="checkNews">
                 <el-badge :value="newnum"
@@ -509,7 +509,7 @@
         color: #BADCFF;
         font-size: 19px;
         line-height: 72px;
-        margin-left: 17px;
+        margin-left: 23px;
     }
     .lteHead {
         margin-top: 25px;

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

@@ -192,6 +192,13 @@
     /deep/ .el-menu {
         border: none;
     }
+    /deep/ .el-menu-item {
+    }
+    /deep/ .el-menu-item span {
+        text-align: left;
+        float: left;
+        margin-left: 70px;
+    }
     /deep/ .el-menu-item.is-active {
         background-color:#3799FF!important;
         color: #fff!important;

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

@@ -126,7 +126,7 @@
             ></el-pagination>
         </div>
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="360px">
+        <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="650px">
             <div>
                 <el-form ref="form" :model="form" label-width="80px">
                     <el-form-item label="登陆账号">
@@ -696,4 +696,10 @@
     /deep/ .el-dialog .el-select .el-input__inner {
         width: 240px;
     }
+    /deep/ .el-dialog .el-select {
+        width: 530px;
+    }
+    /deep/ .el-dialog .el-select .el-input__inner {
+        width: 530px;
+    }
 </style>

+ 4 - 0
pc/src/views/AdminSetting.vue

@@ -404,4 +404,8 @@
         width: 437px;
         float: left;
     }
+    /deep/ .el-button {
+        float: left;
+        margin-left: 120px;
+    }
 </style>

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

@@ -59,7 +59,9 @@
                                 range-separator="至"
                                 start-placeholder="开始时间"
                                 end-placeholder="结束时间"
-                                placeholder="选择时间范围">
+                                placeholder="选择时间范围"
+                                :readonly="scope.row.Locking == 1"
+                        >
                         </el-time-picker>
                     </template>
                 </el-table-column>
@@ -68,8 +70,9 @@
                         label="课程"
                         align="center"
                 >
+<!--                    locking是1的不可编辑课程和时间-->
                     <template slot-scope="scope">
-                        <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)">
+                        <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)" :disabled="scope.row.Locking == 1">
                             <el-option
                                     v-for="item in panel.options"
                                     :key="item.value"
@@ -246,7 +249,7 @@
                     OrderToplimit: 1,
                     ConsumeHour: 1,
                     WxOrder: 1,
-                    WxVisible: 1,
+                    WxVisible: 0,
                 },
                 tabs: [
                     {
@@ -491,12 +494,18 @@
             handleClick() {
             },
             changeWechat(e, row) {
-                // todo
-                this.$message.success('当前用户微信已可见');
+                // if(parseInt(e) == 0){
+                //     this.$message.success('当前课程微信已不可见');
+                // }else{
+                //     this.$message.success('当前课程微信不可见');
+                // }
             },
             changeWechatOrder(e, row) {
-                // todo
-                this.$message.success('当前用户微信已可见');
+                // if(parseInt(e) == 0){
+                //     this.$message.success('当前课程微信已不可预约');
+                // }else{
+                //     this.$message.success('当前课程微信可预约');
+                // }
             },
             // 增删会员课程
             lessonStudenChange() {

+ 8 - 6
pc/src/views/Lesson.vue

@@ -197,7 +197,7 @@
             </div>
         </el-dialog>
 
-        <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
+        <el-dialog title="增删课程会员" :visible.sync="dialogVisible" width="650px">
             <div class="dialogTitle">
                 <span>基础功能</span>
             </div>
@@ -211,7 +211,7 @@
             </div>
         </el-dialog>
 
-        <el-dialog title="课程会员" :visible.sync="dialogTableVisible">
+        <el-dialog title="课程会员" :visible.sync="dialogTableVisible" style="overflow-y: scroll">
             <el-table :data="gridData">
                 <el-table-column property="Name" label="姓名" width="200"></el-table-column>
                 <el-table-column property="Phone" label="手机"></el-table-column>
@@ -407,7 +407,7 @@
 
                 let teacherId = that.form.dialogValue ? that.form.dialogValue.toString() : '';
                 // 通用是0,非通用是shopid
-                let shopId = that.form.allUse == 0 ? 0:localStorage.ShopId;
+                let shopId = that.form.allUse == 0 ? 0 : localStorage.ShopId;
                 let param = {
                     token: localStorage.token,
                     shopId: shopId,
@@ -566,10 +566,11 @@
                 let postdata = qs.stringify(param);
                 ClassVisibleStatusEdit(postdata).then(res => {
                     let json = res;
+                    let text = parseInt(e) == 1 ? '可见' : '不可见';
                     if (json.Code == 0) {
                         that.$message({
                             showClose: true,
-                            message: '当前用户微信已' + json.Memo,
+                            message: '当前用户微信已' + text,
                             type: 'success'
                         });
                         // 重载列表
@@ -729,8 +730,9 @@
 <style scoped>
     @import "../assets/css/panel.css";
 
-    .context {   height: 770px;
-         overflow-y: scroll;
+    .context {
+        height: 770px;
+        overflow-y: scroll;
 
         display: block;
         margin: 0 auto;

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

@@ -94,7 +94,7 @@
                            {{c.BeginStr}}
                         </span>
                         <em>最大预约人数 <i>{{c.OrderToplimit}}</i></em>
-                        <em>消耗课时 <i>{{c.ConsumeHour}}</i></em>
+                        <em>已预约人数 <i>{{c.OrderNum}}</i></em>
                         <em>预约状态
                             <s class="blue" v-if="c.WxOrder > 0">可预约</s>
                             <s class="red" v-if="c.WxOrder == 0">不可预约</s>
@@ -197,6 +197,11 @@
             this.getWaitingBeginClassList();
             this.timer = setInterval(() => {
                 that.getVipUserOrderQuery();
+                this.getVipUserStatistics();
+                this.getClassStatistics();
+                this.ClassQuery();
+                this.getOrderStatistics();
+                this.getWaitingBeginClassList();
             }, 10000);
         },
         destroyed() {
@@ -413,7 +418,7 @@
     }
 
     .container .rt {
-        width: 415px;
+        width: 436px;
         height: 100%;
         float: right;
     }
@@ -471,7 +476,7 @@
     }
 
     .btLine {
-        width: 100%;
+        width: 84%;
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -486,15 +491,19 @@
     .btLine .emlt {
         width: 50%;
         float: left;
+        text-align: left;
     }
 
     .btLine i {
         font-size: 18px;
         color: #BDBDBD;
     }
-
+    .emlt i {
+        float: left;
+    }
     .finish {
         width: 100%;
+        min-height: 358px;
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -526,7 +535,6 @@
     }
 
     .finish ul {
-        width: 100%;
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -661,6 +669,7 @@
     }
 
     .appoint .appointCard {
+        min-height: 195px;
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -726,7 +735,7 @@
     }
 
     .appointCard em s {
-        width: 47px;
+        /*width: 47px;*/
         height: 20px;
         line-height: 20px;
         text-align: center;
@@ -734,12 +743,17 @@
         text-decoration: none;
         float: right;
         border-radius: 3px;
+        padding: 0 3px;
     }
 
     .appointCard em s.blue {
         background-color: #E5F2FF;
+        color: #3799FF;
+    }
+    .appointCard em s.red {
+        background-color: #E5F2FF;
+        color: rgb(204,2,2);
     }
-
     .rtContext {
         width: 100%;
         overflow: hidden;
@@ -757,7 +771,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        padding: 30px;
+        padding: 10px 30px;
     }
 
     .rtTitle h5 {
@@ -879,7 +893,6 @@
     .tips {
         color: #333;
         font-size: 14px!important;
-        width: 100%;
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -887,6 +900,6 @@
         line-height: 30px;
     }
     .middleTips {
-        margin-top: 240px;
+        margin-top: 180px;
     }
 </style>

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

@@ -182,8 +182,6 @@
             ></el-pagination>
         </div>
 
-        <!--        新增和编辑-->
-        <!--        :width="[{'1200px':form.btnType == 0},{'600px':form.btnType == 1}]"-->
         <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="1200px">
             <div class="dialogContent">
                 <div :class="['pull-left',{'tabwild':form.btnType == 1},]">
@@ -234,7 +232,7 @@
             </div>
         </el-dialog>
 
-        <el-dialog :visible.sync="dialogVisible">
+        <el-dialog :visible.sync="dialogVisible"  width="650px">
             <div class="dialogTitle">
                 <h5>
                     用户:

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

@@ -82,7 +82,7 @@
             ></el-pagination>
         </div>
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="360px">
+        <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="650px">
             <div>
                 <el-form ref="form" :model="form" label-width="80px">
                     <el-form-item label="店面名称">

+ 59 - 24
pc/src/views/appoint.vue

@@ -3,7 +3,7 @@
         <!--        panel-->
         <div class="">
             <div class="panel">
-                <h5>预约管理 <span class="current">{{current}}</span></h5>
+                <h5>预约管理</h5>
             </div>
 
             <div class="timeList">
@@ -35,7 +35,7 @@
                             </el-table-column>
                             <el-table-column
                                     prop="BeginTime"
-                                    label="时间"
+                                    label="上课时间"
                                     :formatter="filterFmtDate"
                             >
                             </el-table-column>
@@ -51,7 +51,7 @@
                             <el-table-column
                                     prop="Recovered"
                                     label="预约进度"
-                                    width="240px"
+                                    width="220px"
                                     sortable
                             >
                                 <template slot-scope="scope">
@@ -181,6 +181,12 @@
                                     <span class="lessons" :style="{ background:scope.row.ClassColor }">{{scope.row.ClassName}}</span>
                                 </template>
                             </el-table-column>
+                            <el-table-column
+                                    prop="BeginTime"
+                                    label="上课时间"
+                                    :formatter="filterFmtDate"
+                            >
+                            </el-table-column>
                             <el-table-column
                                     prop="CurrentDate"
                                     label="会员预约时间"
@@ -238,12 +244,12 @@
         </div>
 
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="480px">
+        <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="请选择">
+                            <el-select v-model="form.stdId" filterable placeholder="请选择" @change="vipSelect(form.stdId)">
                                 <el-option
                                         v-for="item in form.stdList"
                                         :key="item.value"
@@ -252,8 +258,9 @@
                                 </el-option>
                             </el-select>
                         </el-form-item>
+<!--                      todo  课程联动查询userlist by classid-->
                         <el-form-item label="会员">
-                            <el-select v-model="form.userId" filterable placeholder="请选择">
+                            <el-select v-model="form.userId" filterable placeholder="请选择" >
                                 <el-option
                                         v-for="item in form.userList"
                                         :key="item.value"
@@ -270,7 +277,7 @@
                 <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="课程会员" :visible.sync="dialogTableVisible">
+        <el-dialog title="课程会员" :visible.sync="dialogTableVisible" width="650px">
             <el-table :data="gridData">
                 <el-table-column property="UserName" label="姓名" width="200"></el-table-column>
                 <el-table-column property="Phone" label="手机"></el-table-column>
@@ -292,7 +299,11 @@
         OrderCancelByManager,
         STTDetailWxOrderEdit,
         testTable,
-        testSelect, WaitingBeginClassList, ShopWxStatusEdit, ClassListQuery
+        testSelect,
+        WaitingBeginClassList,
+        ShopWxStatusEdit,
+        ClassListQuery,
+        VipUserSimpleQuery
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -365,6 +376,8 @@
                     name: '',
                     userCode: '',
                     shopId: '',
+                    stdId: 0,
+                    userId: 0,
                     memberType: 1,
                     lesson: 1,
                     gift: 1,
@@ -385,7 +398,6 @@
             }
         },
         mounted() {
-            this.vipSelect();
             this.ClassSelect();
             this.panelSelect();
             // this.getCurrWeekDays();
@@ -447,21 +459,28 @@
                     }
                 })
             },
-            vipSelect() {
+            vipSelect(stdId) {
                 let that = this;
-                let param = {
-                    token: localStorage.token,
-                    start: 1,//
-                    tableMax: 9999,//
-                };
-                let postdata = qs.stringify(param);
-                VipUserListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.userList = turnResToOption(json.Rs);
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
+                // 筛选相同的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);
+                                }
+                            })
+                        }
                 })
             },
             ClassSelect() {
@@ -1080,9 +1099,12 @@
             },
             clearForm() {
                 // clear
+                this.form.stdId = '';
+                this.form.userId = '';
                 this.form.name = '';
                 this.form.userCode = '';
                 this.form.shopId = '';
+                this.form.userList = [];
             },
             // 页面数据查询
             getTableQuery() {
@@ -1132,7 +1154,6 @@
                     if (json.Code == 0) {
                         that.loading = false;
                         if (json.Rs) {
-                            console.log(json.Rs);
                             that.allTableData2 = json.Rs;
                             that.recordsTotal2 = json.Rs.length;
                         } else {
@@ -1283,6 +1304,11 @@
             }
         },
         watch: {
+            $route(to) {
+                if (to.name == 'appoint') {
+                    this.getTableQuery();
+                }
+            },
             activeName(val) {
                 if (val == 'first') {
                     this.getTableQuery();
@@ -1486,4 +1512,13 @@
         border-radius: 250px;
         float: left;
     }
+    /deep/ .el-progress__text {
+        float: right;
+        line-height: 10px;
+    }
+    /deep/ .el-progress-bar {
+        width: 190px;
+        float: left;
+        overflow: hidden;
+    }
 </style>

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

@@ -72,7 +72,7 @@
             ></el-pagination>
         </div>
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="480px">
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
             <div class="dialogContent">
                 <div class="">
                     <el-form ref="form" :model="form" label-width="160px">

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

@@ -387,7 +387,7 @@
                 });
             },
             // 表格合计
-            getSummaries(param){
+            getSummaries(param) {
                 const {columns, data} = param;
                 const sums = [];
                 columns.forEach((column, index) => {
@@ -766,8 +766,8 @@
                 ClassListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        that.panel.options =  turnClassResToOption(json.Rs);
-                        that.panel.options.unshift({label:"全部",value:''})
+                        that.panel.options = turnClassResToOption(json.Rs);
+                        that.panel.options.unshift({label: "全部", value: ''})
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -862,8 +862,8 @@
                     classId: that.panel.classId,
                     name: that.panel.name,
                     phone: that.panel.phone,
-                    bt: nonTfmtDate(that.panel.timeScope[0], 10),
-                    et: nonTfmtDate(that.panel.timeScope[1], 10),
+                    bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + ' 00:00:01',
+                    et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + ' 23:59:59',
                     start: 1,//
                     tableMax: 9999,//
                 };

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

@@ -22,7 +22,7 @@
                 </el-table-column>
                 <el-table-column
                         prop="EndTime"
-                        label="时间"
+                        label="下课时间"
                         :formatter="filterFmtDate"
                 >
                 </el-table-column>

+ 9 - 5
pc/src/views/finishDetail.vue

@@ -92,9 +92,9 @@
             ></el-pagination>
         </div>
 
-        <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="640px">
+        <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
             <div class="dialogContent">
-                <span class="blueTitle">{{form.ClassName}} {{form.BeginTime}}</span>
+                <span class="blueTitle">{{ClassName}} {{BeginTime}}</span>
                 <div>
                     <el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachdata"
                                  :titles="['教练列表', '已添加教练']"></el-transfer>
@@ -106,9 +106,9 @@
             </div>
         </el-dialog>
 
-        <el-dialog title="添加下课会员" :visible.sync="dialogVisible" width="640px">
-            <div class="dialogContent">
-                <span class="blueTitle">{{form.ClassName}} {{form.BeginTime}}</span>
+        <el-dialog title="添加下课会员" :visible.sync="dialogVisible" width="650px">
+            <div class="dialogContent viplist">
+                <span class="blueTitle">{{ClassName}} {{BeginTime}}</span>
                 <div>
                     <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"
                                  :titles="['会员列表', '已添加会员']"></el-transfer>
@@ -533,6 +533,7 @@
                 this.form.name = '';
                 this.form.userCode = '';
                 this.form.shopId = '';
+                this.dialogCoachValue = [];
             },
             // 页面数据查询
             getTableQuery() {
@@ -740,4 +741,7 @@
     /deep/ .el-checkbox__inner {
         left: -20px;
     }
+    .viplist /deep/ .el-transfer__buttons button:nth-child(1){
+        display: none;
+    }
 </style>

+ 22 - 9
pc/src/views/lessonManage.vue

@@ -34,7 +34,7 @@
                 >
                     <template slot-scope="scope">
                         <div class="rowHeight">
-                            <!--                            未上线-->
+                            <!--                            已过期-->
                             <span class="readyTime" v-if="scope.row.Diffweek < 0">
                                {{scope.row.BeginDate}} - {{scope.row.EndDate}}
                         </span>
@@ -85,8 +85,10 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" @click="editName(scope.row)">编辑名称</el-button>
-                        <el-button type="text" @click="goEdit(scope.row)">修改课程</el-button>
+                        <el-button type="text" v-if="scope.row.Diffweek >= 0" @click="editName(scope.row)">编辑名称
+                        </el-button>
+                        <el-button type="text" v-if="scope.row.Diffweek >= 0" @click="goEdit(scope.row)">修改课程
+                        </el-button>
                         <el-button type="text" @click="seeWeek(scope.row)">预览本周</el-button>
                     </template>
                 </el-table-column>
@@ -101,7 +103,7 @@
             ></el-pagination>
         </div>
 
-        <el-dialog title="发布课程表" :visible.sync="dialogVisible" width="640px">
+        <el-dialog title="发布课程表" :visible.sync="dialogVisible" width="650px">
             <div class="dialogTitle">
                 <span>{{form.name}}</span>
             </div>
@@ -144,7 +146,7 @@
                 <el-button @click="dialogVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="复制课程表" :visible.sync="dialogCopyVisible" width="640px">
+        <el-dialog title="复制课程表" :visible.sync="dialogCopyVisible" width="650px">
             <div>
                 <span class="demonstration">选择发布日期(按周选取)</span>
                 <br>
@@ -162,7 +164,7 @@
                 <el-button @click="dialogCopyVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="编辑名称" :visible.sync="dialogNameVisible" width="640px">
+        <el-dialog title="编辑名称" :visible.sync="dialogNameVisible" width="650px">
             <el-form ref="form" :model="form" label-width="160px">
                 <el-form-item label="课程表名称">
                     <el-input v-model="form.name"></el-input>
@@ -266,6 +268,15 @@
 
                 let row = that.multipleSelection[0];
 
+                if (row.Diffweek < 0) {
+                    that.$message({
+                        showClose: true,
+                        message: '已过期的课程表不可删除',
+                        type: 'error'
+                    });
+                    return false
+                }
+
                 let param = {
                     token: localStorage.token,
                     stbId: row.StbId,
@@ -563,9 +574,10 @@
                 STTBasicOfflineEdit(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
+                        let text = parseInt(e) == 1 ? '上线' : '下线';
                         that.$message({
                             showClose: true,
-                            message: '当前课程表已' + json.Memo,
+                            message: '当前课程表已' + text,
                             type: 'success'
                         });
                         // 重载列表
@@ -583,8 +595,9 @@
 <style scoped>
     @import "../assets/css/panel.css";
 
-    .context {   height: 770px;
-         overflow-y: scroll;
+    .context {
+        height: 770px;
+        overflow-y: scroll;
 
         display: block;
         margin: 0 auto;

+ 12 - 1
pc/src/views/record.vue

@@ -91,6 +91,7 @@
                 <el-table-column
                         prop="ConsumeHour"
                         label="课时"
+                        width="80"
                         sortable
                 >
                 </el-table-column>
@@ -109,7 +110,8 @@
                         sortable
                 >
                     <template slot-scope="scope">
-                        {{scope.row.BeginStr}} - {{scope.row.EndStr}}
+
+                        {{ scope.row.BeginTime |filterNoTTime}} - {{scope.row.EndStr}}
                     </template>
                 </el-table-column>
                 <el-table-column
@@ -346,6 +348,15 @@
                 return parseFloat(column).toFixed(2);
             },
         },
+        filters: {
+            filterNoTTime: function (value) {
+                if(!value){
+                    return 0
+                }else{
+                    return nonTfmtDatetoLength(value,16);
+                }
+            },
+        }
     }
 </script>
 

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

@@ -466,4 +466,8 @@
         width: 437px;
         float: left;
     }
+    /deep/ .el-button {
+        float: left;
+        margin-left: 120px;
+    }
 </style>