lex-xin 3 éve
szülő
commit
9b8f75a717

+ 29 - 27
src/views/activeProgram/activeDetail.vue

@@ -46,33 +46,35 @@
         </div>
 
         <!-- 赠送课程类型,只有VIP和网管课的时候才有赠送课程 -->
-        <h2 class="van-block__title">赠送课程</h2>
-        <div class="active-row">
-            <van-row>
-                <van-col span="8">课程类型</van-col>
-                <van-col span="16">{{ vipGroup.giveCourseType | coursesType }}&nbsp;</van-col>
-                <van-col span="8" v-if="vipGroup.giveCourseType == 'VIP'">课程形式</van-col>
-                <van-col span="16" v-if="vipGroup.giveCourseType == 'VIP'">{{ vipGroup.giveCategoryName }}&nbsp;</van-col>
-                <van-col span="8">上课模式</van-col>
-                <van-col span="16">{{ vipGroup.giveTeachMode | formatTeachModel }}&nbsp;</van-col>
-                <van-col span="8">单课时时长</van-col>
-                <van-col span="16">{{ vipGroup.giveSingleCourseTime }}分钟</van-col>
-                <van-col span="8">课时数</van-col>
-                <van-col span="16">{{ vipGroup.giveCourseNum }}课时</van-col>
-            </van-row>
-            <van-cell is-link class="teaching" :clickable="false">
-                <template #title>
-                    剩余 <span style="color: #01C1B5">
-                        {{vipGroup.giveCourseType == 'VIP' ? vipDetail.giveVipNum : null}}
-                        {{vipGroup.giveCourseType == 'PRACTICE' ? vipDetail.givePracticeNum : null}}
-                    </span> 名学员未排课
-                </template>
-                <template #default>
-                    <span v-if="vipGroup.giveCourseType == 'VIP' && vipDetail.giveVipNum || vipGroup.giveCourseType == 'PRACTICE' && vipDetail.givePracticeNum" style="color: #01C1B5" @click="onProgram('give')">立即排课</span>
-                    <span v-else style="color: #c0c0c0">立即排课</span>
-                </template>
-            </van-cell>
-        </div>
+        <template v-if="vipGroup.giveCourseType != 'MEMBER'">
+            <h2 class="van-block__title">赠送课程</h2>
+            <div class="active-row">
+                <van-row>
+                    <van-col span="8">课程类型</van-col>
+                    <van-col span="16">{{ vipGroup.giveCourseType | coursesType }}&nbsp;</van-col>
+                    <van-col span="8" v-if="vipGroup.giveCourseType == 'VIP'">课程形式</van-col>
+                    <van-col span="16" v-if="vipGroup.giveCourseType == 'VIP'">{{ vipGroup.giveCategoryName }}&nbsp;</van-col>
+                    <van-col span="8">上课模式</van-col>
+                    <van-col span="16">{{ vipGroup.giveTeachMode | formatTeachModel }}&nbsp;</van-col>
+                    <van-col span="8">单课时时长</van-col>
+                    <van-col span="16">{{ vipGroup.giveSingleCourseTime }}分钟</van-col>
+                    <van-col span="8">课时数</van-col>
+                    <van-col span="16">{{ vipGroup.giveCourseNum }}课时</van-col>
+                </van-row>
+                <van-cell is-link class="teaching" :clickable="false">
+                    <template #title>
+                        剩余 <span style="color: #01C1B5">
+                            {{vipGroup.giveCourseType == 'VIP' ? vipDetail.giveVipNum : null}}
+                            {{vipGroup.giveCourseType == 'PRACTICE' ? vipDetail.givePracticeNum : null}}
+                        </span> 名学员未排课
+                    </template>
+                    <template #default>
+                        <span v-if="vipGroup.giveCourseType == 'VIP' && vipDetail.giveVipNum || vipGroup.giveCourseType == 'PRACTICE' && vipDetail.givePracticeNum" style="color: #01C1B5" @click="onProgram('give')">立即排课</span>
+                        <span v-else style="color: #c0c0c0">立即排课</span>
+                    </template>
+                </van-cell>
+            </div>
+        </template>
 
         <!-- <m-empty v-if="!vipDetail.giveVipNum && !vipDetail.givePracticeNum && !vipDetail.vipNum && !vipDetail.practiceNum" msg="暂无排课内容" /> -->
     </div>

+ 7 - 2
src/views/activeProgram/modal/studentList.vue

@@ -120,6 +120,7 @@ export default {
             try {
                 const res = await getActivityStudentCanCourseNum(params)
                 let result = res.data || []
+                let showResult = []
                 result.forEach(item => {
                     let showStudentNum = 0
                     if (this.typeStatus) {
@@ -128,9 +129,13 @@ export default {
                         showStudentNum = this.courseTypeIsVip ? item.giveVipNum : item.givePracticeNum
                     }
                     item.showStudentNum = showStudentNum
+                    // 判断次数大于0的学生展示
+                    if(showStudentNum > 0) {
+                        showResult.push(item)
+                    }
                 })
-                this.dataList = result
-                if(result.length > 0) {
+                this.dataList = showResult
+                if(showResult.length > 0) {
                     this.dataShow = true
                 } else {
                     this.dataShow = false

+ 9 - 12
src/views/teacher/VIP00Apply.vue

@@ -763,19 +763,16 @@ export default {
           let result = res.data;
           if (result.code == 200 && result.data.length > 0) {
             let tempArr = [];
-            let regStr = new RegExp("双十一");
             result.data.forEach((item) => {
-              if (!regStr.test(item.name)) {
-                item.value = item.id;
-                item.text = item.name;
-                (item.startTime = item.startTime
-                  ? item.startTime.split(" ")[0]
-                  : null), // 报名开始时间
-                  (item.endTime = item.endTime
-                    ? item.endTime.split(" ")[0]
-                    : null); // 报名结束时间
-                tempArr.push(item);
-              }
+              item.value = item.id;
+              item.text = item.name;
+              (item.startTime = item.startTime
+                ? item.startTime.split(" ")[0]
+                : null), // 报名开始时间
+                (item.endTime = item.endTime
+                  ? item.endTime.split(" ")[0]
+                  : null); // 报名结束时间
+              tempArr.push(item);
             });
             this.loadData.vipGroupActivity = tempArr;
             sheetForm.columns = tempArr;