Преглед изворни кода

6.TV PK的间距调整回以前那种√

Changpeng Duan пре 5 година
родитељ
комит
a76a6feca4

+ 12 - 1
pc/src/api/Navs.js

@@ -18,6 +18,16 @@ let navs = [
         "show": 3,
         "grouplist": "2,5",
         "icon": "el-icon-user",
+    },
+    {
+        "clmid": "33",
+        "clmcode": "tempUser",
+        "clmname": "临时用户",
+        "clmurl": "/tempUser",
+        "prname": "",
+        "show": 3,
+        "grouplist": "2,5",
+        "icon": "el-icon-user-solid",
     },{
         "clmid": "3",
         "clmcode": "lesson",
@@ -198,7 +208,8 @@ let navs = [
         "show": 4,
         "grouplist": "2,5",
         "icon": "el-icon-user",
-    }, {
+    },
+  {
         "clmid": "3",
         "clmcode": "lesson",
         "clmname": "课目管理",

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

@@ -147,18 +147,20 @@
     .Navside {
         width: 100%;
         height: 910px;
+        /*height: 100%;*/
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        /*overflow-y: scroll;*/
-        overflow-y: hidden;
+        overflow-y: scroll;
+        /*overflow-y: hidden;*/
         background-color: #fff;
         z-index: 4444;
     }
 
     .NavsideShort {
         width: 100%;
-        height: 710px;
+        height: 100%;
+        /*height: 710px;*/
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -168,6 +170,35 @@
         z-index: 4444
     }
 
+    .Navside::-webkit-scrollbar { /*滚动条整体样式*/
+
+        width: 3px; /*高宽分别对应横竖滚动条的尺寸*/
+
+        height: 1px;
+
+    }
+
+    .Navside::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
+
+        border-radius: 3px;
+
+        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+
+        background: #f5f5f5;
+
+    }
+
+    .Navside::-webkit-scrollbar-track { /*滚动条里面轨道*/
+
+        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+
+        border-radius: 3px;
+
+        background: #f5f5f5;
+
+    }
+
+
     .NavsideShort::-webkit-scrollbar { /*滚动条整体样式*/
 
         width: 3px; /*高宽分别对应横竖滚动条的尺寸*/

+ 10 - 1
pc/src/router/index.js

@@ -36,7 +36,16 @@ const routes = [
                     title: "会员管理",
                     clmid: "2",
                 }
-            }, {
+            },
+            {
+                path: '/tempUser',
+                name: 'tempUser',
+                component: () => import('@/views/tempUser.vue'),
+                meta: {
+                    title: "临时用户",
+                    clmid: "33",
+                }
+            },{
                 path: '/lesson',
                 name: 'Lesson',
                 component: () => import('@/views/Lesson.vue'),

+ 29 - 0
pc/src/views/courseEdit.vue

@@ -33,6 +33,7 @@
                 </el-button>
                 <el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
                 <el-button @click="addFinishMember">添加上课会员</el-button>
+                <el-button @click="addTempMember" type="warning">添加临时会员</el-button>
             </div>
         </div>
         <div class="table">
@@ -223,6 +224,18 @@
                 <el-button size="small" @click="dialogVisible = false">取消</el-button>
             </div>
         </el-dialog>
+        <el-dialog title="添加临时会员" :visible.sync="dialogTempVisible" width="720px">
+            <div class="dialogContent viplist">
+                <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
+                <div>
+                    <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"
+                                 :titles="['临时会员', '已添加会员']"></el-transfer>
+                </div>
+            </div>
+            <div class="dialogFooter">
+                <el-button size="small" @click="dialogTempVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
         <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
             <div class="dialogContent">
                 <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
@@ -281,6 +294,7 @@
                 ClassStateText: '',
                 FinishClass: 0,//当前上课状态 1已下课 2已上课 3准备上课 FinishClass
                 dialogVisible: false,//添加下课会员
+                dialogTempVisible: false,//添加临时会员
                 dialogFinishVisible: false,//确认下课dialog
                 dialogLesson: false,//课时调整
                 dialogGift: false,//赠送课时调整
@@ -633,6 +647,21 @@
                 that.dialogValue = std;
                 this.dialogVisible = true
             },
+            // 添加临时会员
+            addTempMember() {
+                let that = this;
+                this.clearForm();
+                this.getClassVipuserQuery();
+                this.dialogValue = [];
+                let std = [];
+                if (this.tableData) {
+                    this.tableData.map(function (item) {
+                        std.push(item.UserId)
+                    })
+                }
+                that.dialogValue = std;
+                this.dialogTempVisible = true
+            },
             clearForm() {
                 // clear
                 this.form.name = '';

+ 13 - 0
pc/src/views/guest.vue

@@ -0,0 +1,13 @@
+<template>
+    <h5>guest</h5>
+</template>
+
+<script>
+    export default {
+        name: "guest"
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 331 - 2
pc/src/views/tempUser.vue

@@ -1,13 +1,342 @@
 <template>
-    <h5>临时会员</h5>
+    <div class="context">
+        <div class="panel">
+            <h5>临时会员</h5>
+            <div class="panel-body">
+                <div class="panel_control">
+                    <el-row :gutter="20">
+                        <el-col :span="4">
+                            <em>姓名:</em>
+                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>手机号:</em>
+                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
+                            </el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+            </div>
+        </div>
+        <div class="change">
+            <el-button @click="addMember" v-if="userLevel != 4" type="primary">新增临时会员</el-button>
+            <el-button @click="delList" v-if="userLevel != 4">删除临时会员</el-button>
+        </div>
+        <div class="table">
+            <el-table
+                    :data="tableData"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    @selection-change="handleSelectionChange" @current-change="clickChange"
+            >
+                >
+                <el-table-column label="选择" width="55">
+                    <template slot-scope="scope">
+                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        align="center"
+                        width="50"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.head"
+                        label="头像"
+                        width="50"
+                >
+                    <template slot-scope="scope">
+                        <div class="demo-image__preview" v-if="scope.row.UserInfo.Head">
+                            <el-image
+                                    style="width: 25px; height: 25px"
+                                    :src="scope.row.UserInfo.Head"
+                                    :preview-src-list="[scope.row.UserInfo.Head]"
+
+                            >
+                            </el-image>
+                        </div>
+                        <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.Name"
+                        label="会员名"
+                        width="90"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.Phone"
+                        label="手机号"
+                        width="110"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="ClassInfo"
+                        label="会员课程"
+                        width="220px"
+                >
+                    <template slot-scope="scope">
+                        <span class="lessonSpan" :style="{background:lesson.ClassColor}"
+                              v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.IsAcross"
+                        label="跨店会员"
+                        width="105"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.UserInfo.IsAcross == 0"  class="green">本店用户</span>
+                        <span v-else  class="red">跨店用户</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.Memo"
+                        label="备注">
+                    <template slot-scope="scope">
+                        <el-popover
+                                placement="top"
+                                title=""
+                                width="200"
+                                trigger="hover"
+                                :content="scope.row.UserInfo.Memo">
+                            <span slot="reference"
+                                  v-if="scope.row.UserInfo.Memo.length > 6">{{ scope.row.UserInfo.Memo.substr(0, 6) }} ....</span>
+                        </el-popover>
+                        <span v-if="scope.row.UserInfo.Memo.length <= 6">{{ scope.row.UserInfo.Memo }}</span>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
+        </div>
+    </div>
+
 </template>
 
 <script>
+        import Global from '../Global.js'
+        import ImgCutter from 'vue-img-cutter'
+        import {
+            testTable,
+            testSelect
+        } from "../api/getApiRes";
+
+    let qs = require('qs');
     export default {
-        name: "tempUser"
+        data() {
+            return {
+                imageUrl: '',
+                token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
+                domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
+                qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
+                tableData: [],
+                tableRadio: [],
+                userLevel: localStorage.userLevel,
+                serachBtnStatus: false,
+                panel: {
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    vipType: '',
+                    expDay: '',
+                    vipOptions: vipOptions(0),
+                    endTypeOptions: endTypeOptions(),
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 20,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+            }
+        },
+        methods: {
+            addMember(){
+
+            },
+            delList(){
+
+            },
+            clickChange(item) {
+                this.tableRadio = item
+            },
+            // 查询按钮
+            query() {
+                let that = this;
+                that.serachBtnStatus = true;
+                that.getTableQuery();
+                that.$message.success('查询完毕');
+                let totalTime = 2
+                let clock = window.setInterval(() => {
+                    totalTime--
+                    if (totalTime < 0) {
+                        totalTime = 2;
+                        that.serachBtnStatus = false;
+                    }
+                }, 1000)
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    vipType: that.panel.vipType,//
+                    phone: that.panel.phone,//
+                    name: that.panel.name,//
+                    expDay: that.panel.expDay,//
+                    start: that.start,//
+                    tableMax: 20,//
+                };
+                let postdata = qs.stringify(param);
+                VipUserListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.PageCount * that.pageination.pageItem;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
+                    }
+                })
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.head = '';
+                this.imageUrl = '';
+                this.form.phone = '';
+                this.form.memo = '';
+                this.form.normalhour = 0;
+                this.form.gifthour = 0;
+                this.form.height = '';
+                this.form.weight = '';
+                this.form.staticHr = '';
+                this.form.sex = 1;
+                this.form.birthday = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+                this.form.classlist = [];
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                // that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                console.log(index);
+                console.log(that.draw);
+                that.getTableQuery();
+            },
+        }
     }
 </script>
 
 <style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        border-radius: 12px;
+        height: 770px;
+        overflow-y: scroll;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+        padding-bottom: 30px;
+    }
 
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
 </style>

+ 2 - 2
tv/src/Mock/index.js

@@ -359,11 +359,11 @@ if (t == 0) {
     let curheadapi = 'http://192.168.0.63:8080/';
 
     // 0: 下课 团课/私教/PK 的排名
-    let LessonClass = 1;
+    let LessonClass = 3;
     // 1:团课/私教
     // 2:竞技课2PK
     // 3:竞技课threepk
-    let LessonDp = 3;
+    let LessonDp = 2;
 
 
     if (LessonClass == 1) {

+ 2 - 2
tv/src/views/pk.vue

@@ -1364,8 +1364,8 @@
     .pk_container  .four {
         width: 49%;
         float: left;
-        margin-top: 0.4rem;
-        margin-bottom: 0.5rem;
+        /*margin-top: 0.4rem;*/
+        /*margin-bottom: 0.5rem;*/
     }
 
     .four .bg {

+ 2 - 2
tv/src/views/threepk.vue

@@ -1546,8 +1546,8 @@
     .pk_container  .four {
         width: 49%;
         float: left;
-        margin-top: 0.4rem;
-        margin-bottom: 0.5rem;
+        /*margin-top: 0.4rem;*/
+        /*margin-bottom: 0.5rem;*/
     }
 
     .four .bg {

+ 3 - 2
tv/需求修改和debug.md

@@ -112,10 +112,11 @@ let url = '';
     5.管理端增加学生连点问题√  
     3.关联手机号左侧选中的栏不对√  
     4.关联手机号增加用户名√  
+     6.TV PK的间距调整回以前那种√ 
  
- 1.访客管理-添加/删除
+ 1.临时会员管理-添加/删除
  2.课程管理 单独添加,绑定,删除访客
-* downloadwgt下的还是旧的包是为什么?
+ *downloadwgt下的还是旧的包是为什么?