Browse Source

Merge branch '01/21VipReset' into online

mo 4 years ago
parent
commit
25bca17b38

+ 46 - 18
src/views/buildVip/index.vue

@@ -1,7 +1,10 @@
 <template>
   <div class="m-container">
     <h2>
-      <el-page-header @back="onCancel" content="VIP课申请"></el-page-header>
+      <el-page-header
+        @back="onCancel"
+        content="VIP/乐理课申请"
+      ></el-page-header>
       <!-- <div class="squrt" /> -->
     </h2>
     <div class="m-core">
@@ -124,7 +127,7 @@
               v-model.trim="leftForm.activeType"
               filterable
               clearable
-              :disabled="!leftForm.courseType"
+              :disabled="!leftForm.courseType|| isMusicTheory"
               @change="chioseActive"
             >
               <el-option
@@ -251,11 +254,13 @@
               v-model.trim="centerForm.offlineCourseNum"
               @mousewheel.native.prevent
               type="number"
-            >     <template slot="append">节</template>
+            >
+              <template slot="append">节</template>
             </el-input>
           </el-form-item>
           <el-form-item label="待排课数">
-            <el-input v-model.trim="allCourseCount" disabled >     <template slot="append">节</template>
+            <el-input v-model.trim="allCourseCount" disabled>
+              <template slot="append">节</template>
             </el-input>
           </el-form-item>
           <el-form-item
@@ -349,12 +354,16 @@
           :inline="true"
         >
           <el-form-item v-if="hasOnline" label="线上课课酬">
-            <el-input v-model.trim="rightForm.onlineCourse" :disabled="true" >     <template slot="append">元/节</template>
+            <el-input v-model.trim="rightForm.onlineCourse" :disabled="true">
+              <template slot="append" v-if="!isMusicTheory">元/节</template>
+              <template slot="append" v-else>元/人</template>
             </el-input>
             <!--  || onlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
           </el-form-item>
           <el-form-item v-if="hasOffline" label="线下课课酬">
-            <el-input v-model.trim="rightForm.offlineCourse" :disabled="true" >     <template slot="append">元/节</template>
+            <el-input v-model.trim="rightForm.offlineCourse" :disabled="true">
+              <template slot="append" v-if="!isMusicTheory">元/节</template>
+              <template slot="append" v-else>元/人</template>
             </el-input>
             <!--  || offlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
           </el-form-item>
@@ -740,6 +749,7 @@ export default {
       id: "",
       studentList: [],
       courseTimeList: [],
+      isMusicTheory:false
     };
   },
   computed: {
@@ -899,6 +909,7 @@ export default {
           this.rightForm.offlinePrice = this.courseTypeList[
             i
           ].offlineClassesUnitPrice;
+          this.isMusicTheory = this.courseTypeList[i].musicTheory
         }
       }
       // teacherId
@@ -1344,10 +1355,29 @@ export default {
         this.$message.error("请点击计算按钮计算课酬");
         return;
       }
-      if (this.leftForm.students.length > this.studentLimit) {
-        this.$message.error(`请选择上课学生为${this.studentLimit}人`);
-        return;
+      // let activeCourseType;
+      let flag =false
+      // console.log(this.courseTypeList,)
+      // this.courseTypeList.forEach((courseType) => {
+      //   if (courseType.id == this.leftForm.courseType) {
+      //     activeCourseType = courseType;
+      //   }
+      // });
+      // console.log(activeCourseType)
+      if (this.isMusicTheory) {
+         if (this.leftForm.students.length > this.studentLimit || this.leftForm.students.length<3) {
+          this.$message.error(`请选择上课学生为3-${this.studentLimit}人`);
+          flag = true
+        }
+      } else {
+        if (this.leftForm.students.length !== this.studentLimit) {
+          this.$message.error(`请选择上课学生为${this.studentLimit}人`);
+          flag = true
+        }
       }
+      if(flag)return
+      // 获取活动方案
+
       // 判断线上课课酬和线下课课酬
       let online = parseInt(this.centerForm.onlineCourseNum);
       let offline = parseInt(this.centerForm.offlineCourseNum);
@@ -1378,7 +1408,7 @@ export default {
       let studentIdList = this.leftForm.students.join(",") || null;
       obj.vipGroupApplyBaseInfo = {
         studentIdList, // 这个不要了
-        vipGroupStudentCoursePrices:this.activeStudentList,
+        vipGroupStudentCoursePrices: this.activeStudentList,
         coursesExpireDate: this.leftForm.courseEnd,
         teacherSchoolId: this.leftForm.section,
         // name: this.leftForm.name,
@@ -1505,13 +1535,12 @@ export default {
       // 老师 乐团主管 都要重置
       this.studentList = [];
       this.$set(this.leftForm, "students", []);
-      this.$set(this.leftForm, "teacher", '');
-       this.$set(this.leftForm, "educationalTeacherId", '');
-       this.$set(this.leftForm, "section", '');
-       this.$set(this.leftForm, "activeType", '');
-       this.$set(this.leftForm, "classTime", '');
-       this.$set(this.leftForm, "subject", '');
-
+      this.$set(this.leftForm, "teacher", "");
+      this.$set(this.leftForm, "educationalTeacherId", "");
+      this.$set(this.leftForm, "section", "");
+      this.$set(this.leftForm, "activeType", "");
+      this.$set(this.leftForm, "classTime", "");
+      this.$set(this.leftForm, "subject", "");
 
       // this.leftForm.students = [];
       // this.leftForm.teacherId = "";
@@ -1649,7 +1678,6 @@ export default {
       }
     },
     changeStudent(val) {
-      console.log(val, this.studentList);
       this.activeStudentList = [];
       this.studentList.forEach((stu) => {
         if (val.indexOf(stu.userId) != -1) {

+ 1 - 1
src/views/categroyManager/generalSettings/vipParameterManager.vue

@@ -2,7 +2,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      VIP参数设置
+      VIP/乐理课参数设置
     </h2>
     <div class="m-core">
         <tab-router v-model.trim="activeIndex" type="card" @tab-click="handleClick">

+ 1 - 1
src/views/categroyManager/insideSetting/branchActive.vue

@@ -2,7 +2,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      VIP分部活动列表
+      VIP/乐理课分部活动列表
     </h2>
     <div class="m-core">
       <el-button

+ 2 - 2
src/views/categroyManager/vipActiveList.vue

@@ -2,7 +2,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      VIP活动方案
+      VIP/乐理课活动方案
     </h2>
 
     <div class="m-core">
@@ -192,7 +192,7 @@
       </div>
     </div>
     <el-dialog
-      title="修改VIP活动"
+      title="修改VIP/乐理课活动"
       width="650px"
       :before-close="closeVipform"
       :visible.sync="dialogVisible"

+ 2 - 2
src/views/categroyManager/vipChargeSeting.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="m-container">
     <h2>
-      <div class="squrt"></div>VIP课程收费设置
+      <div class="squrt"></div>VIP/乐理课程收费设置
     </h2>
     <div class="m-core">
       <save-form :inline="true"
@@ -122,4 +122,4 @@ export default {
 }
 </script>
 <style lang="scss">
-</style>
+</style>

+ 1 - 1
src/views/categroyManager/vipNewActive.vue

@@ -3,7 +3,7 @@
     <!-- <h2><div class="squrt"></div>VIP活动方案新增 </h2> -->
     <h2>
       <el-page-header @back="onCancel"
-                      :content="'VIP活动方案' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
+                      :content="'VIP/乐理课活动方案' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
     </h2>
     <div class="m-core">
       <el-form :label-position="labelPosition"

+ 3 - 2
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -155,7 +155,8 @@
                         @mousewheel.native.prevent
                         v-model.trim="scope.row.offlineClassesSalary"
                         placeholder="请输入内容">
-                <template slot="append">元/45分钟</template>
+                <template slot="append" v-if="!scope.row.musicTheory">元/节</template>
+              <template slot="append" v-else>元/人</template>
               </el-input>
             </template>
           </el-table-column>
@@ -643,4 +644,4 @@ export default {
   border: 1px solid #dcdfe6;
   border-left: 0;
 }
-</style>
+</style>

+ 4 - 4
src/views/vipClass/vipList.vue

@@ -2,17 +2,17 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      VIP课列表
+      VIP/乐理课列表
     </h2>
     <div class="newBand" v-permission="'/buildVip'" @click="gotoBuildVip">
-      新建VIP课
+      新建VIP/乐理
     </div>
     <div
       class="newBand"
       v-permission="'export/vipGroupList'"
       @click="onVIPCourseExport"
     >
-      导出VIP课
+      导出VIP/乐理
     </div>
     <div
       class="newBand"
@@ -20,7 +20,7 @@
       @click="onStudentExport"
       style="max-width: inherit"
     >
-      VIP课程续费提醒导出
+      VIP/乐理课课程续费提醒导出
     </div>
     <div class="m-core">
       <!-- 搜索类型 -->