소스 검색

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

Changpeng Duan 5 년 전
부모
커밋
af22b729bb
5개의 변경된 파일80개의 추가작업 그리고 106개의 파일을 삭제
  1. 22 0
      pc/src/api/getApiRes.js
  2. 3 7
      pc/src/views/appoint.vue
  3. 39 72
      pc/src/views/coach.vue
  4. 14 26
      pc/src/views/lessonManage.vue
  5. 2 1
      pc/src/views/record.vue

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

@@ -295,6 +295,28 @@ export function SttPlanDetailBatchSave(postdata) {
     return getApiBasic(url, postdata);
 }
 
+// teacher
+// 教练信息添加 √
+export function TeacherAdd(postdata) {
+    let url = headapi + '/v1/Teacher/TeacherAdd';
+    return getApiBasic(url, postdata);
+}
+// 教练信息修改  √
+export function TeacherEdit(postdata) {
+    let url = headapi + '/v1/Teacher/TeacherEdit';
+    return getApiBasic(url, postdata);
+}
+// 教练信息列表查询  √
+export function TeacherListQuery(postdata) {
+    let url = headapi + '/v1/Teacher/TeacherListQuery';
+    return getApiBasic(url, postdata);
+}
+// 教练状态修改  √
+export function TeacherStatusEdit(postdata) {
+    let url = headapi + '/v1/Teacher/TeacherStatusEdit';
+    return getApiBasic(url, postdata);
+}
+
 // User
 // √
 export function ManagerSelfQuery(postdata) {

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

@@ -244,6 +244,8 @@
 <script>
     import Global from '../Global.js'
     import {
+        TodayClassOrderQuery,
+        TodayVipOrderQuery,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -869,15 +871,9 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
-                    comid: 1,//
-                    tagname: that.panel.tagname,//标签名
-                    start: 1,//
-                    tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                TodayClassOrderQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;

+ 39 - 72
pc/src/views/coach.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="4">
                             <el-button size="" type="primary" @click="query" plain>查询</el-button>
@@ -44,25 +44,25 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="name"
+                        prop="Name"
                         label="教练"
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="tel"
+                        prop="Phone"
                         label="手机号"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="Recovered"
+                        prop="SumHour"
                         label="上课总时长(h)"
                         width="180"
                         sortable
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="Status"
+                        prop="TeacherId"
                         label="操作"
                 >
                     <template slot-scope="scope">
@@ -84,20 +84,18 @@
                 <div class="">
                     <el-form ref="form" :model="form" label-width="160px">
                         <el-form-item label="手机号">
-                            <el-input v-model="form.userCode"></el-input>
+                            <el-input v-model="form.phone"></el-input>
                         </el-form-item>
                         <el-form-item label="姓名">
                             <el-input v-model="form.name"></el-input>
                         </el-form-item>
-<!--                        <el-form-item label="课时">-->
-<!--                            <el-input-number v-model="form.lesson" :min="0" :max="99999" label="(天)"></el-input-number>-->
-<!--                        </el-form-item>-->
                     </el-form>
                 </div>
             </div>
             <div class="dialogFooter">
                 <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
-                <el-button type="primary" size="small"  v-if="form.btnType == 1" @click="confirmEditMember">确定</el-button>
+                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
+                </el-button>
                 <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
             </div>
         </el-dialog>
@@ -107,6 +105,10 @@
 <script>
     import Global from '../Global.js'
     import {
+        TeacherListQuery,
+        TeacherAdd,
+        TeacherEdit,
+        TeacherStatusEdit,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -125,8 +127,8 @@
                 dialogValue: [],
                 // panel 配置项目
                 panel: {
-                    usercode: '',
-                    username: '',
+                    name: '',
+                    phone: '',
                     compname: '',
                     keyword: '',
                     USERCODE: '',
@@ -167,11 +169,13 @@
                     name: '',
                     userCode: '',
                     shopId: '',
+                    teacherId: 0,
                     memberType: 1,
                     lesson: 1,
                     gift: 1,
                     btnType: 0,//0新建,1编辑编辑
                     memo: '',
+                    phone: '',
                     expTime: '',
                     dialogdata: [],//穿梭待选
                     dialogValue: [],//穿梭已选
@@ -184,7 +188,6 @@
             }
         },
         mounted() {
-            this.panelSelect();
             this.getTableQuery();
         },
         methods: {
@@ -193,15 +196,12 @@
                 let that = this;
                 this.clearForm();
 
-                this.form.userCode = row.userCode;
-                this.form.name = row.name;
-                this.form.memberType = row.vipType;
-                this.form.lesson = row.Recovered;
-                this.form.gift = row.Recovered;
-                this.form.memo = row.memo;
+                this.form.name = row.Name;
+                this.form.phone = row.Phone;
+                this.form.shopId = row.ShopId;
+                this.form.teacherId = row.TeacherId;
                 this.form.btnType = 1;
 
-                this.form.shopId = row.Id;
                 this.dialogMemberVisible = true
                 this.dialogTitle = '编辑教练'
 
@@ -401,11 +401,11 @@
             confirmMember() {
                 let that = this;
                 // checkNum
-                if (!that.form.userCode) {
+                if (!that.form.phone) {
                     this.$message.error('错了哦,手机号不能为空');
                     return false
                 }
-                if (!globalCheckPhone(that.form.userCode)) {
+                if (!globalCheckPhone(that.form.phone)) {
                     this.$message.error('错了哦,手机号格式不正确');
                     return false
                 }
@@ -417,25 +417,15 @@
                     this.$message.error('错了哦,教练名字数超过8个字');
                     return false
                 }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
 
                 let param = {
                     token: localStorage.token,
-                    userCode: that.form.userCode,
+                    shopId: localStorage.shopId,
                     name: that.form.name,
-                    memberType: that.form.memberType,
-                    lesson: that.form.lesson,
-                    gift: that.form.gift,
-                    memo: that.form.memo,
-                    dialogValue: that.form.dialogValue,
+                    phone: that.form.phone,
                 };
                 let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
+                TeacherAdd(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         // 关闭弹窗
@@ -453,15 +443,14 @@
                 })
             },
             confirmEditMember() {
-                console.log(123);
                 let that = this;
                 // checkNum
-                if (!that.form.userCode) {
+                if (!that.form.phone) {
                     this.$message.error('错了哦,手机号不能为空');
                     return false
                 }
-                console.log(that.form.userCode);
-                if (!globalCheckPhone(that.form.userCode)) {
+                console.log(that.form.phone);
+                if (!globalCheckPhone(that.form.phone)) {
                     this.$message.error('错了哦,手机号格式不正确');
                     return false
                 }
@@ -473,24 +462,15 @@
                     this.$message.error('错了哦,教练名字数超过8个字');
                     return false
                 }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
                 let param = {
                     token: localStorage.token,
-                    userCode: that.form.userCode,
+                    shopId: localStorage.shopId,
+                    teacherId: that.form.teacherId,
                     name: that.form.name,
-                    memberType: that.form.memberType,
-                    lesson: that.form.lesson,
-                    gift: that.form.gift,
-                    memo: that.form.memo,
-                    dialogValue: that.form.dialogValue,
+                    phone: that.form.phone,
                 };
                 let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
+                TeacherEdit(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         // 关闭弹窗
@@ -663,11 +643,11 @@
                     return false
                 }
 
-                let detectorid = that.multipleSelection[0].Id;
+                let TeacherId = that.multipleSelection[0].TeacherId;
 
                 let param = {
                     token: localStorage.token,
-                    detectorid: detectorid,
+                    teacherId: TeacherId,
                     status: 9,//0禁用1启用9删除
                 };
                 let postdata = qs.stringify(param);
@@ -677,7 +657,7 @@
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-                    testSelect(postdata).then(res => {
+                    TeacherStatusEdit(postdata).then(res => {
                         let json = res;
                         if (json.Code == 0) {
                             that.$message({
@@ -721,15 +701,11 @@
                 // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
-                    comid: 1,//
-                    tagname: that.panel.tagname,//标签名
-                    start: 1,//
-                    tableMax: 9999,//
+                    name: this.panel.name,//
+                    phone: this.panel.phone,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                TeacherListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -748,15 +724,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() {
                 // 分页属性

+ 14 - 26
pc/src/views/lessonManage.vue

@@ -7,6 +7,7 @@
             <el-button type="primary" @click="addLessonTable">新增课程表</el-button>
             <el-button type="" @click="copy">复制</el-button>
             <el-button type="" @click="delList">删除</el-button>
+            <el-button type="" @click="  query">查询</el-button>
         </div>
         <div class="table">
             <el-table
@@ -33,14 +34,17 @@
                 >
                     <template slot-scope="scope">
                         <div class="rowHeight">
-                        <span class="readyTime" v-if="scope.row.Status == 0">
+<!--                            未上线-->
+                        <span class="readyTime" v-if="scope.row.Online == 0">
                                {{scope.row.Name}}
                         </span>
-                            <span class="CurTime" v-if="scope.row.Status == 1">
-                               {{scope.row.Name}}
+<!--                            已上线-->
+                        <span class="CurTime" v-if="scope.row.Online == 1">
+                           {{scope.row.Name}}
                         </span>
-                            <i class="curIcon" v-if="scope.row.Status == 1"></i>
-                            <span class="runTime" v-if="scope.row.Status == 2">
+<!--                            当前进行-->
+                            <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.Name}}
                         </span>
                         </div>
@@ -58,23 +62,6 @@
                         sortable
                 >
                 </el-table-column>
-<!--                <el-table-column-->
-<!--                        prop="wxVisible"-->
-<!--                        label="微信可见"-->
-<!--                        width="140px"-->
-<!--                >-->
-<!--                    <template slot-scope="scope">-->
-<!--                        <el-switch-->
-<!--                                v-model="scope.row.wxVisible"-->
-<!--                                :active-value="1"-->
-<!--                                :inactive-value="0"-->
-<!--                                active-color="#409EFF"-->
-<!--                                inactive-color="#D9D9D9"-->
-<!--                                @change=changeWechat($event,scope.row)-->
-<!--                        >-->
-<!--                        </el-switch>-->
-<!--                    </template>-->
-<!--                </el-table-column>-->
                 <el-table-column
                         prop="Status"
                         label="操作"
@@ -366,9 +353,11 @@
             },
             // 编辑课程表
             goEdit(row) {
+                // 参数???
                 this.$router.push({
                     path: '/editLessonTable', query: {
-                        id: row.id
+                        id: row.StbId,
+                        name: row.Name
                     }
                 });
             },
@@ -377,7 +366,7 @@
             },
             // 查询按钮
             query() {
-                // this.getTableQuery();
+                this.getTableQuery();
                 this.$message.success('查询完毕');
             },
             // 页面数据查询
@@ -395,12 +384,10 @@
                 STTBasicListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        console.log(23);
                         that.loading = false;
                         if (json.Rs) {
                             that.allTableData = json.Rs;
                             that.recordsTotal = json.Rs.length;
-                            console.log(123);
                         } else {
                             that.allTableData = [];
                             that.recordsTotal = 0;
@@ -501,6 +488,7 @@
         margin: 0 auto;
         background-color: #fff !important;
         padding: 30px;
+        padding-bottom: 60px;
     }
 
     .panel-body {

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

@@ -216,6 +216,7 @@
 <script>
     import Global from '../Global.js'
     import {
+        OrderListQuery,
         testTable,
         testSelect
     } from "../api/getApiRes";
@@ -839,7 +840,7 @@
                     tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                testTable(postdata).then(res => {
+                OrderListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;