Ver código fonte

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

Changpeng Duan 5 anos atrás
pai
commit
2b7484257c

+ 18 - 0
pc/README.md

@@ -105,3 +105,21 @@ e.运行
   3.操作日志
    全部todo 放在最后      
       
+      
+###
+20200910
+ ClassListByQueryStr 不知道咋用
+
+  
+  1.首页
+    全部todo
+  2.预约类
+   
+今日预约统计(未完成)
+今日课程预约总览(未完成)
+今日会员预约列表查询(未完成)
+
+order
+今日预约统计(未完成)
+今日课程预约总览(未完成)
+今日会员预约列表查询(未完成)

+ 22 - 0
pc/src/Global.js

@@ -242,6 +242,28 @@ turnResToOption = function (data) {
     })
     return ids
 }
+
+turnResToOptionByViper = function (data) {
+    if (!data) return false
+    let ids = data.map(item => {
+        return {
+            label: item.Name + ' ' + item.Phone,
+            key: parseInt(item.Id)
+        }
+    })
+    return ids
+}
+turnResToOptionByCoach = function (data) {
+    if (!data) return false
+    let ids = data.map(item => {
+        return {
+            label: item.Name + ' ' + item.Phone,
+            key: parseInt(item.TeacherId)
+        }
+    })
+    return ids
+}
+
 turnClassResToOption = function (data) {
     if (!data) return false
     let ids = data.map(item => {

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

@@ -180,11 +180,26 @@ export function ClassOngoingList(postdata) {
 }
 
 
+// 确认下课
+export function ClassOverConfirm(postdata) {
+    let url = headapi + '/v1/SchoolTimeTable/ClassOverConfirm';
+    return getApiBasic(url, postdata);
+}
+// 下课记录详情添加
+export function ClassOverDetailAdd(postdata) {
+    let url = headapi + '/v1/SchoolTimeTable/ClassOverDetailAdd';
+    return getApiBasic(url, postdata);
+}
 // 下课记录详情列表
 export function ClassOverDetailListQuery(postdata) {
     let url = headapi + '/v1/SchoolTimeTable/ClassOverDetailListQuery';
     return getApiBasic(url, postdata);
 }
+// 下课记录详情状态修改
+export function ClassOverDetailStatusEdit(postdata) {
+    let url = headapi + '/v1/SchoolTimeTable/ClassOverDetailStatusEdit';
+    return getApiBasic(url, postdata);
+}
 // 待下课课程列表
 export function ClassOverPrepare(postdata) {
     let url = headapi + '/v1/SchoolTimeTable/ClassOverPrepare';
@@ -393,6 +408,11 @@ export function VipUserEdit(postdata) {
     let url = headapi + '/v1/User/VipUserEdit ';
     return getApiBasic(url, postdata);
 }
+// 会员消费记录查询
+export function VipUserConsumeListQuery(postdata) {
+    let url = headapi + '/v1/User/VipUserConsumeListQuery ';
+    return getApiBasic(url, postdata);
+}
 
 // 会员用户列表
 export function VipUserListQuery(postdata) {

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

@@ -101,6 +101,7 @@
         margin: 0 auto;
         overflow-y: scroll;
         background-color: #fff;
+        z-index: 4444;
     }
     .logoContainer {
         width: 256px;

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

@@ -60,6 +60,14 @@ const routes = [
                     title: "编辑课程表模板",
                     clmid: "4",
                 }
+            },{
+                path: '/editLessonManage',
+                name: 'EditLessonManage',
+                component: () => import('@/views/EditLessonManage.vue'),
+                meta: {
+                    title: "编辑课程表",
+                    clmid: "5",
+                }
             },{
                 path: '/adminManage',
                 name: 'AdminManage',

+ 677 - 0
pc/src/views/EditLessonManage.vue

@@ -0,0 +1,677 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>{{pageTitle}}</h5>
+        </div>
+        <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-date-picker
+                                v-model="panel.week"
+                                type="week"
+                                :picker-options="{'firstDayOfWeek': 1}"
+                                format="yyyy 第 WW 周"
+                                placeholder="选择周">
+                        </el-date-picker>
+                    </el-col>
+                </el-row>
+            </div>
+        </div>
+        <br>
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+            <el-tab-pane label="星期一" name="1"></el-tab-pane>
+            <el-tab-pane label="星期二" name="2"></el-tab-pane>
+            <el-tab-pane label="星期三" name="3"></el-tab-pane>
+            <el-tab-pane label="星期四" name="4"></el-tab-pane>
+            <el-tab-pane label="星期五" name="5"></el-tab-pane>
+            <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"
+                    :data="tab.tableData"
+                    v-if="tab.days == activeName"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
+            >
+                <el-table-column
+                        prop="timeScope"
+                        label="时间"
+                        width="260px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-time-picker
+                                is-range
+                                v-model="scope.row.timeLong"
+                                range-separator="至"
+                                start-placeholder="开始时间"
+                                end-placeholder="结束时间"
+                                placeholder="选择时间范围">
+                        </el-time-picker>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="ClassId"
+                        label="课程"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-select v-model="scope.row.ClassId">
+                            <el-option
+                                    v-for="item in panel.options"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="OrderToplimit"
+                        label="预约名额"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.OrderToplimit" :min="1" :max="9999"
+                                         label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="ConsumeHour"
+                        label="消耗课时"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.ConsumeHour" :min="1" :max="9999"
+                                         label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="WxVisible"
+                        label="微信可见"
+                >
+                    <template slot-scope="scope">
+                        <el-switch
+                                v-model="scope.row.WxVisible"
+                                :active-value="1"
+                                :inactive-value="0"
+                                active-color="#409EFF"
+                                inactive-color="#D9D9D9"
+                                @change=changeWechat($event,scope.row)
+                        >
+                        </el-switch>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="WxOrder"
+                        label="微信可预约"
+                >
+                    <template slot-scope="scope">
+                        <el-switch
+                                v-model="scope.row.WxOrder"
+                                :active-value="1"
+                                :inactive-value="0"
+                                active-color="#409EFF"
+                                inactive-color="#D9D9D9"
+                                @change=changeWechatOrder($event,scope.row.ClassSelf)
+                        >
+                        </el-switch>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                        width="100px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="text" class="red" @click="delRow(scope)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="rowBottom">
+                <el-button type="primary" @click="addRow">新增课表</el-button>
+                <!--                ID为0是新建,不为0是修改-->
+                <el-button type="primary" @click="confirmLessonTable" v-if="this.$route.query.id == 0">提交</el-button>
+                <el-button type="primary" @click="confirmEditLessonTable" v-if="this.$route.query.id != 0">提交
+                </el-button>
+                <em class="red wrning">
+                    *所有操作提交后生效
+                </em>
+            </div>
+        </div>
+        <br>
+
+
+        <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
+            <div class="dialogTitle">
+                <span>基础功能</span>
+            </div>
+            <div>
+                <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small">确定</el-button>
+                <el-button @click="dialogVisible = false" size="small">取消</el-button>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        SttPlanBasicAdd,
+        SttPlanDetailListQuery,
+        SttPlanDetailBatchSave,
+        STTBasicAdd,
+        SttPlanBasicEdit,
+        STTDetailListQuery,
+        STTDetailBatchSave,
+        STTBasicEdit,
+        testTable,
+        testTableLong,
+        testSelect, ClassListQuery
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                pageTitle: '新增课程表',
+                dialogVisible: false,
+                dialogdata: [],
+                dialogValue: [],
+                temId: '',
+                activeName: '1',
+                tableData: [],
+                // panel 配置项目
+                panel: {
+                    name: '',
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    week: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                testRow: {
+                    timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
+                    BeginStr: '08:30',
+                    EndStr: '09:30',
+                    ClassId: 1,
+                    OrderToplimit: 1,
+                    ConsumeHour: 1,
+                },
+                tabs: [
+                    {
+                        tableData: [], days: '1'
+                    },
+                    {
+                        tableData: [
+                            // {name:'1'},
+                        ], days: '2'
+                    },
+                    {
+                        tableData: [], days: '3'
+                    },
+                    {
+                        tableData: [], days: '4'
+                    },
+                    {
+                        tableData: [], days: '5'
+                    },
+                    {
+                        tableData: [], days: '6'
+                    },
+                    {
+                        tableData: [], days: '7'
+                    },
+                ]
+            }
+        },
+        mounted() {
+            // 加载课程选项
+            this.panelSelect();
+            if (this.$route.query.id == 0) {
+                //  深拷贝赋初始值
+                this.deepValue();
+                this.panel.name = '';
+            } else {
+                // 读取赋值
+                this.getTableQuery();
+            }
+        },
+        methods: {
+            // 加载选项
+            panelSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    vipType: '',
+                    start: 1,
+                    expDay: 0,
+                    tableMax: 9999,
+                };
+                let postdata = qs.stringify(param);
+                ClassListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // that.dialogdata = json.Rs;
+                        that.panel.options = turnClassResToOption(json.Rs)
+                        console.log(that.panel.options);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            confirmEditLessonTable() {
+                let that = this;
+                if (!this.panel.name) {
+                    this.$message.error('模板名称不能为空');
+                    return false
+                }
+                if (this.panel.name.length < 3) {
+                    this.$message.error('模板名称不能小于3个字符');
+                    return false
+                }
+                if (this.panel.name.length > 20) {
+                    this.$message.error('模板名称不能大于20个字符');
+                    return false
+                }
+                let param = {
+                    token: localStorage.token,
+                    planId: this.$route.query.id,
+                    planName: this.panel.name
+                };
+                let postdata = qs.stringify(param);
+                STTBasicEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        let id = that.$route.query.id
+                        // 提交课程内容
+                        that.EditLessonTable(id);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 删除
+            delRow(scope) {
+                let delIndex = parseInt(scope.$index)
+                let curIndex = parseInt(this.activeName) - 1;
+                this.tabs[curIndex].tableData.splice(delIndex, 1)
+            },
+            // 提交课程模板
+            confirmLessonTable() {
+                if (!this.panel.name) {
+                    this.$message.error('模板名称不能为空');
+                    return false
+                }
+                if (this.panel.name.length < 3) {
+                    this.$message.error('模板名称不能小于3个字符');
+                    return false
+                }
+                if (this.panel.name.length > 20) {
+                    this.$message.error('模板名称不能大于20个字符');
+                    return false
+                }
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    name: this.panel.name,
+                    incomingDate: nonTfmtDatetoLength(this.panel.week, 10),//对应日期 字符串 年-月-日 格式,
+                };
+                let postdata = qs.stringify(param);
+                STTBasicAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.panel.tabId = json.Id;
+                        // 提交课程内容
+                        that.EditLessonTable(json.Id);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 修改课程模板
+            EditLessonTable(planId) {
+                let that = this;
+                // if (this.checkData()) {
+                //     this.$message.error('数据内容不完整,请检查后重新输入');
+                //     return false
+                // }
+                // 提交数据
+
+                let planRs = [];
+                let thisRow = {};
+                let timeLong = []
+                for (let i = 0; i < this.tabs.length; i++) {
+                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+                        thisRow = this.tabs[i].tableData[j];
+                        thisRow.LessonIndex = parseInt(j+1);
+                        if (planId) {
+                            thisRow.StbId = parseInt(planId);
+                        } else {
+                            thisRow.StbId = parseInt(this.$route.query.id);
+                        }
+                        thisRow.WeekDay = parseInt(i + 1);
+                        thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
+                        thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+                        this.$delete(thisRow, 'Base');
+                        this.$delete(thisRow, 'SpdId');
+                        // this.$delete(thisRow, 'timeLong');
+                        planRs.push(thisRow)
+                    }
+                }
+
+                let res = JSON.stringify(planRs);
+                // 如果传入0就用url里的,如果非0就用传入的
+                // let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
+                let param = {
+                    token: localStorage.token,
+                    stbId: planId,
+                    stbRs: res,
+                };
+                let postdata = qs.stringify(param);
+                STTDetailBatchSave(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '课程模板已上传成功!',
+                            type: 'success'
+                        });
+                        this.$router.push({
+                            path: '/lessonManage'
+                        });
+                        // this.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 检查数据
+            checkData() {
+                // todo
+                let tableDate = this.tabs;
+                tableDate.map(function (item) {
+                    console.log(item.tableData);
+                })
+            },
+            // 新增一行
+            addRow() {
+                // 读取当前周几
+                let index = parseInt(this.activeName) - 1;
+                let rows = this.testRow;
+                let res = this.deepClone(rows);
+                this.tabs[index].tableData.push(res);
+            },
+            //  深拷贝赋初始值
+            deepValue() {
+                let that = this;
+                let valus = [
+                    this.testRow
+                ];
+                this.tabs.map(function (item) {
+                    let res = that.deepClone(valus);
+                    item.tableData = res;
+                })
+            },
+            deepClone(obj) {
+                let _obj = JSON.stringify(obj),
+                    objClone = JSON.parse(_obj);
+                return objClone
+            },
+            handleClick() {
+            },
+            changeWechat(e, row) {
+                // todo
+                this.$message.success('当前用户微信已可见');
+            },
+            changeWechatOrder(e, row) {
+                // todo
+                this.$message.success('当前用户微信已可见');
+            },
+            // 增删会员课程
+            lessonStudenChange() {
+                this.dialogVisible = true
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 页面数据查询
+            // todo 获取默认时间
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    stbId: this.$route.query.id,//
+                };
+                this.panel.name = this.$route.query.name;
+                let postdata = qs.stringify(param);
+                STTDetailListQuery(postdata).then(res => {
+                    let json = res;
+                    let Rs = json.Rs
+                    let bt = '';
+                    let et = '';
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        // 清掉上次的记录
+                        for (let i = 0; i < that.tabs.length; i++) {
+                            that.tabs[i].tableData = []
+                        }
+                        if (Rs) {
+                            // 遍历分配
+                            Rs.map(function (item) {
+                                for (let i = 0; i < 7; i++) {
+                                    if (item.WeekDay == i + 1) {
+                                        bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
+                                        et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
+                                        item.timeLong = [bt, et];
+                                        // that.tabs[i - 1].tableData.push(item);
+                                        // tabs[0]是周一
+                                        that.tabs[i].tableData.push(item);
+
+                                    }
+                                }
+                            })
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'EditLessonManage') {
+                    this.temId = this.$route.query.id;
+                }
+            },
+            temId(e) {
+                if (parseInt(e) == 0) {
+                    this.pageTitle = '新增课程表'
+                    this.deepValue();
+                    this.panel.name = '';
+                    this.panel.week = '';
+                } else {
+                    this.pageTitle = '编辑课程表'
+                    this.getTableQuery();
+                }
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    em {
+        font-style: normal;
+    }
+
+    .context {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle span {
+        width: 169px;
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        color: #fff;
+        background: #3799FF;
+        border-radius: 250px;
+        font-size: 18px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 30px;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    /deep/ .panel_control .el-input {
+        width: 200px;
+        float: left;
+    }
+
+    .panel_control em {
+        float: left;
+        font-size: 14px;
+        color: #545454;
+        line-height: 45px;
+        margin-right: 10px;
+    }
+
+    .seeTemp {
+        position: relative;
+        float: right;
+        bottom: 60px;
+    }
+
+    .table {
+        position: relative;
+        top: -50px;
+    }
+
+    .el-range-editor.el-input__inner {
+        width: 220px;
+        padding: 3px 6px;
+    }
+
+    .rowBottom {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .rowBottom button {
+        float: left;
+        margin-right: 10px;
+    }
+
+    .wrning {
+        float: right;
+        font-size: 12px;
+    }
+</style>

+ 3 - 0
pc/src/views/Index.vue

@@ -138,6 +138,7 @@
     }
     .footer {
         position: absolute;
+        /*left: 1%;*/
         bottom: 0px;
         width: 100%;
         padding: 10px;
@@ -145,8 +146,10 @@
         display: block;
         margin: 0 auto;
         text-align: center;
+        text-indent: -30%;
         font-size: 12px;
         color: #BDBDBD;
         background: #F0F2F5;
+        z-index: 2222;
     }
 </style>

+ 26 - 4
pc/src/views/Main.vue

@@ -82,16 +82,15 @@
                     <span>{{getNowDate}}</span>
                 </div>
                 <div class="appointCard">
-                    <!--                    TodayClassOrder-->
                     <el-card class="box-card" v-for="c in classList">
-                        <div class="cardTitle blue" :style="{ color:c.color }">
+                        <div class="cardTitle blue" :style="{ color:c.ClassColor }">
                             {{c.ClassName}}
                         </div>
                         <span>
                            {{c.BeginStr}}
                         </span>
                         <em>最大预约人数 <i>{{c.OrderToplimit}}</i></em>
-                        <em>已预约人数 <i>{{c.kick}}</i></em>
+                        <em>消耗课时 <i>{{c.ConsumeHour}}</i></em>
                         <em>预约状态
                             <s class="blue" v-if="c.WxOrder > 0">可预约</s>
                             <s class="red" v-if="c.WxOrder == 0">不可预约</s>
@@ -134,6 +133,7 @@
         TodayClassOrderQuery,
         TodayVipOrderQuery,
         ClassPreFinishListQuery,
+        WaitingBeginClassList,
         ClassOngoingList,
         OrderStatistics,
     } from "../api/getApiRes";
@@ -159,7 +159,8 @@
             // this.getTodayVipOrderQuery();
             this.ClassQuery();
             this.appointQuery();
-            this.getOrderStatistics();
+            // this.getOrderStatistics();
+            this.getWaitingBeginClassList();
             this.timer = setInterval(() => {
                 that.appointQuery();
             }, 10000);
@@ -193,6 +194,24 @@
                     }
                 })
             },
+            getWaitingBeginClassList() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                WaitingBeginClassList(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                            console.log(json);
+                            that.classList = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             getTodayClassOrderQuery() {
                 let that = this;
                 that.loading = true;
@@ -725,4 +744,7 @@
     .box-card em {
         font-style: normal;
     }
+    i {
+        font-style: normal;
+    }
 </style>

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

@@ -802,7 +802,7 @@
                     let json = res;
                     if (json.Code == 0) {
                         // that.dialogdata = json.Rs;
-                        that.form.dialogdata = turnClassResToOption(json.Rs)
+                        that.form.dialogdata = turnClassResToOption(json.Rs);
                     } else {
                         that.$message.error(json.Memo);
                     }

+ 3 - 3
pc/src/views/appoint.vue

@@ -108,15 +108,15 @@
                     <div class="panel-body">
                         <div class="panel_control">
                             <el-row :gutter="20">
-                                <el-col :span="4">
+                                <el-col :span="5">
                                     <em>会员名:</em>
                                     <el-input v-model="panel.USERCODE" placeholder="请输入会员名"></el-input>
                                 </el-col>
-                                <el-col :span="4">
+                                <el-col :span="5">
                                     <em>手机号:</em>
                                     <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
                                 </el-col>
-                                <el-col :span="4">
+                                <el-col :span="5">
                                     <em>预约课程:</em>
                                     <el-select v-model="panel.endType">
                                         <el-option

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

@@ -449,7 +449,6 @@
                     this.$message.error('错了哦,手机号不能为空');
                     return false
                 }
-                console.log(that.form.phone);
                 if (!globalCheckPhone(that.form.phone)) {
                     this.$message.error('错了哦,手机号格式不正确');
                     return false
@@ -696,9 +695,7 @@
             // 页面数据查询
             getTableQuery() {
                 let that = this;
-                // this.getGetChildRegionSelect(0, 1);
                 that.loading = true;
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
                     name: this.panel.name,//

+ 53 - 52
pc/src/views/cost.vue

@@ -7,11 +7,11 @@
                     <el-row :gutter="20">
                         <el-col :span="4">
                             <em>姓名:</em>
-                            <el-input v-model="panel.USERCODE" placeholder="请输入姓名"></el-input>
+                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
                         </el-col>
                         <el-col :span="4">
                             <em>手机号:</em>
-                            <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
+                            <el-input v-model="panel.phone" placeholder="请输入手机号"></el-input>
                         </el-col>
                         <el-col :span="6">
                             <em>日期:</em>
@@ -25,18 +25,7 @@
                         </el-col>
                         <el-col :span="4">
                             <em>预约课程:</em>
-                            <el-select v-model="panel.taskstatus">
-                                <el-option
-                                        v-for="item in panel.options"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>状态:</em>
-                            <el-select v-model="panel.taskstatus">
+                            <el-select v-model="panel.classId">
                                 <el-option
                                         v-for="item in panel.options"
                                         :key="item.value"
@@ -60,6 +49,7 @@
                     :default-sort="{prop: 'date', order: 'descending'}"
                     element-loading-background="rgba(0, 0, 0, 0.8)"
                     class=""
+                    show-summary
                     @selection-change="handleSelectionChange"
 
             >
@@ -69,49 +59,63 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="Name"
                         label="会员名"
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="tel"
-                        label="手机号"
+                        prop="ClassName"
+                        label="课程"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="name"
-                        label="课程"
+                        prop="NormalHour"
+                        label="消费课时"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="Recovered"
-                        label="消课时"
+                        prop="PreNormalhour"
+                        label="消费前课时"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="create"
-                        label="时间"
-                        width="180"
+                        prop="AfterNormalhour"
+                        label="消费后课时"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="GiftHour"
+                        label="消费赠送"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="PreGifthour"
+                        label="消费前赠送"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="vipType"
-                        label="状态"
+                        prop="AfterGifthour"
+                        label="消费后赠送"
                         sortable
                 >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.vipType == 1">正常下课</span>
-                        <span v-if="scope.row.vipType == 2">预约取消</span>
-                    </template>
                 </el-table-column>
                 <el-table-column
-                        prop="name"
-                        label="教练"
+                        prop="ShopName"
+                        label="所处门店"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="CreatedAt"
+                        label="时间"
                         width="180"
+                        :formatter="filterFmtDate"
                         sortable
                 >
                 </el-table-column>
@@ -217,8 +221,10 @@
 <script>
     import Global from '../Global.js'
     import {
+        VipUserConsumeListQuery,
         testTable,
-        testSelect
+        testSelect,
+        ClassListQuery,
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -235,6 +241,9 @@
                 dialogValue: [],
                 // panel 配置项目
                 panel: {
+                    name: '',
+                    phone: '',
+                    classId: '',
                     usercode: '',
                     username: '',
                     timeScope: globalBt2(30),
@@ -254,17 +263,7 @@
                     fileList: [],
                     multipleSelection: [],
                     detectedmac: '',
-                    options: [
-                        {value: 99, label: '全部'},
-                        {value: 1, label: '进行中'},
-                        {value: 2, label: '已完成'},
-                    ],
-                    endTypeOptions: [
-                        {value: 99, label: '全部'},
-                        {value: 30, label: '近一个月'},
-                        {value: 7, label: '近一周'},
-                        {value: 1, label: '当日'},
-                    ],
+                    options: [],
                     time1: globalBt(),
                 },
                 multipleSelection: [],
@@ -737,10 +736,11 @@
                     token: localStorage.token,
                 };
                 let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
+                ClassListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        that.form.dialogdata = json.Rs;
+                        that.panel.options =  turnClassResToOption(json.Rs);
+                        that.panel.options.unshift({label:"全部",value:''})
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -815,7 +815,7 @@
             },
             // 查询按钮
             query() {
-                // this.getTableQuery();
+                this.getTableQuery();
                 this.$message.success('查询完毕');
             },
             clearForm() {
@@ -832,15 +832,16 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
-                    comid: 1,//
-                    tagname: that.panel.tagname,//标签名
+                    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),
                     start: 1,//
                     tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                VipUserConsumeListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;

+ 6 - 3
pc/src/views/finish.vue

@@ -89,8 +89,8 @@
                 dialogGift: false,//赠送课时调整
                 dialogExpTime: false,//有效期调整
                 dialogLessonTable: false,//会员课程
-                dialogTitle: '新增会员',
-                current: '星期日 2020/08/16',
+                dialogTitle: '',
+                current: getNowDate(),
                 dialogValue: [],
                 // panel 配置项目
                 panel: {
@@ -178,7 +178,10 @@
             goFinish(row) {
                 this.$router.push({
                     path: '/finishDetail', query: {
-                        id: row.StdId
+                        id: row.StdId,
+                        classId: row.ClassId,
+                        ClassName:row.ClassName,
+                        BeginTime:row.BeginTime,
                     }
                 });
             },

+ 162 - 120
pc/src/views/finishDetail.vue

@@ -2,7 +2,7 @@
     <div class="context">
         <div class="panel">
             <h5>下课详情
-                <span class="current">{{current}}</span>
+                <span class="current">{{form.BeginTime}} {{form.ClassName}} </span>
             </h5>
             <div class="panel-body">
                 <div class="panel_control">
@@ -59,8 +59,9 @@
                         sortable
                 >
                     <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 == 1">预约上课 </span>
+                        <span v-if="scope.row.Status == 2">预约未到</span>
+                        <span v-if="scope.row.Status == 3">上课未预约</span>
                     </template>
                 </el-table-column>
                 <el-table-column
@@ -68,15 +69,18 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="danger" round v-if="scope.row.Status == 1" size="mini" @click="pauseRow(scope.row)">
-                            预约未到
-                        </el-button>
-                        <el-button type="primary" round v-if="scope.row.Status == 2" size="mini" @click="runRow(scope.row)">
+                        <el-button type="danger" round v-if="scope.row.Status == 3" size="mini"
+                                   @click="pauseRow(scope.row,1)">
                             撤销
                         </el-button>
-                        <el-button type="warning" round v-if="scope.row.Status == 2" size="mini" @click="runRow(scope.row)">
-                            删除
+                        <el-button type="primary" round v-if="scope.row.Status == 1" size="mini"
+                                   @click="pauseRow(scope.row,2)">
+                            预约未到
                         </el-button>
+                        <!--                        <el-button type="warning" round v-if="scope.row.Status == 2" size="mini"-->
+                        <!--                                   @click="runRow(scope.row)">-->
+                        <!--                            删除-->
+                        <!--                        </el-button>-->
                     </template>
                 </el-table-column>
             </el-table>
@@ -91,47 +95,25 @@
 
         <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="640px">
             <div class="dialogContent">
-                <span class="blueTitle">{{form.name}}</span>
-                    <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="选择课程教练">
-                            <el-select v-model="form.coach" multiple  filterable placeholder="请选择">
-                                <el-option
-                                        v-for="item in form.coachOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-form>
+                <span class="blueTitle">{{form.ClassName}} {{form.BeginTime}}</span>
+                <div>
+                    <el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachdata"
+                                 :titles="['教练列表', '已添加教练']"></el-transfer>
+                </div>
             </div>
             <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="confirmMember">确定</el-button>
+                <el-button type="primary" size="small" @click="confirmClassFinish">确定</el-button>
                 <el-button size="small" @click="dialogFinishVisible = false">取消</el-button>
             </div>
         </el-dialog>
 
         <el-dialog title="添加下课会员" :visible.sync="dialogVisible" width="640px">
             <div class="dialogContent">
-                <span class="blueTitle">{{form.name}}</span>
-                <el-form ref="form" :model="form" label-width="160px">
-                    <el-form-item label="手机号">
-                        <el-input v-model="form.userCode"></el-input>
-                    </el-form-item>
-                    <el-form-item label="会员名">
-                        <el-input v-model="form.name" disabled></el-input>
-                    </el-form-item>
-                    <el-form-item label="状态">
-                        <el-select v-model="form.memberType" placeholder="请选择状态">
-                            <el-option
-                                    v-for="item in memberTypes"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-form>
+                <span class="blueTitle">{{form.ClassName}} {{form.BeginTime}}</span>
+                <div>
+                    <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"
+                                 :titles="['会员列表', '已添加会员']"></el-transfer>
+                </div>
             </div>
             <div class="dialogFooter">
                 <el-button type="primary" size="small" @click="confirmMember">确定</el-button>
@@ -146,8 +128,13 @@
     import Global from '../Global.js'
     import {
         ClassOverDetailListQuery,
+        ClassVipuserQuery,
+        ClassOverDetailAdd,
+        ClassVipuserEdit,
+        ClassOverDetailStatusEdit,
+        ClassOverConfirm,
         testTable,
-        testSelect
+        testSelect, TeacherListQuery
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -163,6 +150,7 @@
                 dialogTitle: '新增会员',
                 current: getNowDate(),
                 dialogValue: [],
+                dialogCoachValue: [],
                 // panel 配置项目
                 panel: {
                     name: '',
@@ -219,6 +207,7 @@
                     expTime: '',
                     dialogdata: [],//穿梭待选
                     dialogValue: [],//穿梭已选
+                    dialogCoachdata: [],//穿梭已选
                 },
                 memberTypes: [
                     {value: 1, label: '年会员'},
@@ -228,9 +217,49 @@
             }
         },
         mounted() {
+            this.form.BeginTime = nonTfmtDatetoLength(this.$route.query.BeginTime, 16);
+            this.form.ClassName = this.$route.query.ClassName;
             this.getTableQuery();
+            // 获取教练选项
+            this.getCoachOption();
         },
         methods: {
+            // 获取教练选项
+            getCoachOption() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    name: this.panel.name,//
+                    phone: this.panel.phone,//
+                };
+                let postdata = qs.stringify(param);
+                TeacherListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        console.log(json.Rs);
+                        that.form.dialogCoachdata = turnResToOptionByCoach(json.Rs);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 获取本课程下的会员列表
+            getClassVipuserQuery() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    classId: this.$route.query.classId,
+                };
+                let postdata = qs.stringify(param);
+                ClassVipuserQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.dialogdata = turnResToOptionByViper(json.Rs);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 编辑
             editMember(row) {
                 let that = this;
@@ -250,39 +279,40 @@
 
             },
             // 禁用
-            pauseRow(row) {
+            pauseRow(row, status) {
                 let that = this;
-                this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        Id: row.Id,
-                        status: 0,
-                    };
-                    let postdata = qs.stringify(param);
-                    testTable(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.name + '禁用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消禁用'
-                    });
-                });
+                // this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
+                //     confirmButtonText: '确定',
+                //     cancelButtonText: '取消',
+                //     type: 'warning'
+                // }).then(() => {
+                let param = {
+                    token: localStorage.token,
+                    stdId: this.$route.query.id,
+                    cfId: row.CfId,
+                    status: status,
+                };
+                let postdata = qs.stringify(param);
+                ClassOverDetailStatusEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '执行成功!',
+                            type: 'success'
+                        });
+                        // table 重载
+                        that.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+                // }).catch(() => {
+                //     this.$message({
+                //         type: 'info',
+                //         message: '已取消禁用'
+                //     });
+                // });
             },
             // 启用
             runRow(row) {
@@ -438,45 +468,49 @@
                 this.dialogVisible = true;
                 this.dialogLessonTable = true;
             },
-            // 确认提交新增会员
+            // 确认提交下课会员
             confirmMember() {
                 let that = this;
                 // checkNum
-                if (!that.form.userCode) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.userCode)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
+                let userlist = that.dialogValue.toString();
+                let param = {
+                    token: localStorage.token,
+                    stdId: this.$route.query.id,
+                    userlist: userlist
+                };
+                let postdata = qs.stringify(param);
+                // 下课记录详情添加
+                ClassOverDetailAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '下课会员修改成功!',
+                            type: 'success'
+                        });
+                        that.getTableQuery()
+                    } else {
+                        that.$message.error(json.Memo);
                     }
-                }
-
+                })
+            },
+            // 确认下课
+            confirmClassFinish() {
+                let that = this;
+                // checkNum
+                let userlist = that.dialogCoachValue.toString();
                 let param = {
                     token: localStorage.token,
-                    userCode: that.form.userCode,
-                    name: that.form.name,
-                    memberType: that.form.memberType,
-                    lesson: that.form.lesson,
-                    gift: that.form.gift,
-                    memo: that.form.memo,
-                    dialogValue: that.form.dialogValue,
+                    stdId: this.$route.query.id,
+                    teacherList: userlist
                 };
                 let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
+                // 下课记录详情添加
+                ClassOverDetailAdd(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         // 关闭弹窗
@@ -485,9 +519,10 @@
                         that.getTableQuery();
                         that.$message({
                             showClose: true,
-                            message: '会员添加成功!',
+                            message: '当前课程已确认下课!',
                             type: 'success'
                         });
+                        that.getTableQuery()
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -528,7 +563,7 @@
                     lesson: that.form.lesson,
                     gift: that.form.gift,
                     memo: that.form.memo,
-                    dialogValue: that.form.dialogValue,
+                    dialogValue: that.dialogValue,
                 };
                 let postdata = qs.stringify(param);
                 testSelect(postdata).then(res => {
@@ -543,6 +578,7 @@
                             message: '会员信息编辑成功!',
                             type: 'success'
                         });
+
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -685,6 +721,7 @@
             },
             addFinishMember() {
                 this.clearForm();
+                this.getClassVipuserQuery();
                 this.dialogVisible = true
             },
             // 删除
@@ -766,9 +803,9 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    stdId : this.$route.query.id,//标签名
-                    name : this.panel.name,//姓名
-                    phone : this.panel.phone,//手机号
+                    stdId: this.$route.query.id,//标签名
+                    name: this.panel.name,//姓名
+                    phone: this.panel.phone,//手机号
                     start: 1,//
                     tableMax: 9999,//
                 };
@@ -792,15 +829,6 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
             // 设置分页数据
             setPaginations() {
                 // 分页属性
@@ -854,6 +882,14 @@
                 return parseFloat(column).toFixed(2);
             },
         },
+        watch: {
+            $route(to) {
+                if (to.name == 'finishDetail') {
+                    this.form.BeginTime = nonTfmtDatetoLength(this.$route.query.BeginTime, 16);
+                    this.form.ClassName = this.$route.query.ClassName;
+                }
+            },
+        },
     }
 </script>
 
@@ -940,6 +976,7 @@
         width: 70%;
         float: right;
     }
+
     .blueTitle {
         width: 200px;
         overflow: hidden;
@@ -954,6 +991,7 @@
         font-size: 16px;
         padding: 5px 24px;
     }
+
     .current {
         width: 158px;
         height: 23px;
@@ -965,4 +1003,8 @@
         padding: 3px 10px;
         margin-left: 20px;
     }
+
+    /deep/ .el-checkbox__inner {
+        left: -20px;
+    }
 </style>

+ 70 - 46
pc/src/views/lessonManage.vue

@@ -34,15 +34,15 @@
                 >
                     <template slot-scope="scope">
                         <div class="rowHeight">
-<!--                            未上线-->
-                        <span class="readyTime" v-if="scope.row.Online == 0">
+                            <!--                            未上线-->
+                            <span class="readyTime" v-if="scope.row.Online == 0">
                                {{scope.row.BeginDate}} - {{scope.row.EndDate}}
                         </span>
-<!--                            已上线-->
-                        <span class="CurTime" v-if="scope.row.Online == 1">
+                            <!--                            已上线-->
+                            <span class="CurTime" v-if="scope.row.Online == 1">
                              {{scope.row.BeginDate}} - {{scope.row.EndDate}}
                         </span>
-<!--                            当前进行-->
+                            <!--                            当前进行-->
                             <i class="curIcon" v-if="scope.row.Status == 1 && scope.row.Online == 1"></i>
                             <span class="runTime" v-if="scope.row.Status == 2 && scope.row.Online == 1">
                               {{scope.row.BeginDate}} - {{scope.row.EndDate}}
@@ -66,7 +66,7 @@
                         prop="Online"
                         label="是否上线"
                 >
-<!--                    上线状态	0:不上线 1:下线-->
+                    <!--                    上线状态	0:不上线 1:下线-->
                     <template slot-scope="scope">
                         <el-switch
                                 v-model="scope.row.Online"
@@ -142,6 +142,24 @@
                 <el-button @click="dialogVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
+        <el-dialog title="复制课程表" :visible.sync="dialogCopyVisible" width="640px">
+            <div>
+                <span class="demonstration">选择发布日期(按周选取)</span>
+                <br>
+                <br>
+                <el-date-picker
+                        v-model="copyForm.week"
+                        type="week"
+                        :picker-options="{'firstDayOfWeek': 1}"
+                        format="yyyy 第 WW 周"
+                        placeholder="选择周">
+                </el-date-picker>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" @click="confirmCopy">确定</el-button>
+                <el-button @click="dialogCopyVisible = false" size="small">取消</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 
@@ -151,6 +169,7 @@
         STTBasicListQuery,
         STTBasicOfflineEdit,
         STTBasicStatusEdit,
+        SchoolTimeTableCopy,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -160,6 +179,7 @@
         data() {
             return {
                 dialogVisible: false,
+                dialogCopyVisible: false,
                 dialogdata: [],
                 dialogValue: [],
                 // panel 配置项目
@@ -177,6 +197,14 @@
                     wechat: 1,
                     appoint: 1,
                 },
+                copyForm: {
+                    stbId: '',
+                    Id: '',
+                    name: '',
+                    week: '',
+                    wechat: 1,
+                    appoint: 1,
+                },
                 tableData: []
             }
         },
@@ -186,7 +214,7 @@
         methods: {
             addLessonTable() {
                 this.$router.push({
-                    path: '/editLessonTable', query: {
+                    path: '/editLessonManage', query: {
                         id: 0
                     }
                 });
@@ -216,7 +244,7 @@
 
                 let param = {
                     token: localStorage.token,
-                    stbId : row.StbId ,
+                    stbId: row.StbId,
                     status: 9,//0禁用1启用9删除
                 };
                 let postdata = qs.stringify(param);
@@ -247,7 +275,35 @@
                     });
                 });
             },
+            confirmCopy() {
+                let that = this;
+                let row = this.copyForm;
 
+                if(!row.week){
+                    that.$message.error('没有选择发布周期');
+                    return false
+                }
+                let param = {
+                    token: localStorage.token,
+                    stbId: row.StbId,
+                    incomingDate: nonTfmtDatetoLength(row.week, 10),//对应日期 字符串 年-月-日 格式,
+                };
+                let postdata = qs.stringify(param);
+                SchoolTimeTableCopy(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '课程复制成功!',
+                            type: 'success'
+                        });
+                        this.dialogCopyVisible = false;
+                        this.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             copy() {
                 let that = this;
                 // checkNum
@@ -267,41 +323,8 @@
                     });
                     return false
                 }
-
-                let detectorid = that.multipleSelection[0].Id;
-
-                let param = {
-                    token: localStorage.token,
-                    detectorid: detectorid,
-                    status: 3,//0禁用1启用9删除
-                };
-                let postdata = qs.stringify(param);
-
-                this.$confirm('此操作将复制相同内容的课程表, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    testSelect(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的课程表已复制!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消复制'
-                    });
-                });
+                this.dialogCopyVisible = true;
+                this.copyForm = that.multipleSelection[0];
             },
             // 发布课程表
             openLessonTable(row) {
@@ -374,7 +397,7 @@
             goEdit(row) {
                 // 参数???
                 this.$router.push({
-                    path: '/editLessonTable', query: {
+                    path: '/editLessonManage', query: {
                         id: row.StbId,
                         name: row.Name
                     }
@@ -475,8 +498,8 @@
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    stbId : row.StbId,//
-                    online : e,//
+                    stbId: row.StbId,//
+                    online: e,//
                 };
                 let postdata = qs.stringify(param);
                 STTBasicOfflineEdit(postdata).then(res => {
@@ -637,6 +660,7 @@
         background: url("../assets/img/lessonTable/star.png") top center no-repeat;
         background-size: 100% 100%;
     }
+
     .rowHeight {
         width: 220px;
         overflow: hidden;