Browse Source

1119 16:49

111
mo 5 years ago
parent
commit
c6001c1fe0

+ 20 - 7
src/views/buildVip/index.vue

@@ -145,7 +145,7 @@
             <el-input v-model="allCourseCount"
                       disabled />
           </el-form-item>
-          <el-form-item v-if="hotType=='GIVE_CLASS'"
+          <el-form-item v-if="hotType=='GIVE_CLASS'&&isGiveClass"
                         label="赠课课程类型">
             <el-radio v-model="centerForm.radio"
                       label="ONLINE">
@@ -423,6 +423,7 @@ export default {
       giveNum: '',
       weekDay: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
       scetionList: [],
+      isGiveClass: false,
       courseOption: {
         disabledDate: time => {
           let startTime = this.leftForm.courseStart;
@@ -473,7 +474,12 @@ export default {
         //  this.attribute1  从多少节开始送
         //  this.attribute2  送多少节
         giveNum = parseInt((parseInt(offline) + parseInt(online)) - this.attribute1 >= 0 ? giveNum = this.attribute2 : giveNum = 0);
+        if (giveNum) {
+          // 有赠送课时
+          this.isGiveClass = true
+        }
         this.giveNum = giveNum || 0;
+
         return (parseInt(offline) + parseInt(online) + '+' + giveNum) || '';
       }
       return parseInt(offline) + parseInt(online) || ''
@@ -551,11 +557,16 @@ export default {
     },
     // 选择活动方案
     chioseActive (val) {
-      this.attribute1 = ''
+      this.lookList = []
+      this.timeTable = []
+      this.attribute1 = '';
       this.attribute2 = '';
+      this.giveNum = 0;
+      this.isGiveClass = false;
       // 根须活动id获取 相应的值
       for (let i in this.activeList) {
         if (this.activeList[i].id == val) {
+          // 如果是买赠就必须选择赠课类型
           // 报名开始 报名结束 课程开始 课程结束 // 判断是否有线上,线下课 并同步状态
           // this.leftForm.signUpStart = this.activeList[i].startTime;
           // this.leftForm.signUpEnd = this.activeList[i].endTime;
@@ -729,8 +740,6 @@ export default {
       }
     },
     setTimeTable () {
-
-
       // 拿到线上课数与线下课数 以及
       this.timeTable = [];
       let online = parseInt(this.centerForm.onlineCourseNum) || 0;
@@ -744,6 +753,7 @@ export default {
       } else if (giveClassType == 'OFFLINE') {
         offline += giveNum;
       }
+      console.log(`线上课数${online}-线下课数${offline}-赠课数${giveNum}`)
       // 这里判断是否选择了排课开始时间
       if (online && !this.maskForm.courseStartOnline) {
         // console.log(this.maskForm.courseStartOnline)
@@ -809,7 +819,7 @@ export default {
         date.setDate(date.getDate() + 7);
       }
 
-      console.log(date1)
+      // console.log(date1)
       while (offline && offline > 0) {
         // 排线下课
         for (let i in offlineList) {
@@ -962,6 +972,11 @@ export default {
       this.$router.push('/business/vipList')
     },
     setCourse () {
+      //  
+      if (this.hotType == 'GIVE_CLASS' && this.isGiveClass && !this.centerForm.radio) {
+        this.$message.error('您还未选择赠课类型')
+        return
+      }
       this.$refs['leftForm'].validate(vali => {
         if (vali) {
           this.dialogFormVisible = true
@@ -970,7 +985,6 @@ export default {
 
     },
     setVipInfo (data) {
-      console.log(data);
       this.leftForm.name = data.name;
       this.leftForm.subject = parseInt(data.subjectIdList)
       // 激活声部下的所有老师
@@ -1010,7 +1024,6 @@ export default {
       this.rightForm.offlineCourse = data.offlineTeacherSalary
       this.rightForm.offlinePrice = data.offlineClassesUnitPrice;
       this.rightForm.allPrice = data.totalPrice;
-      console.log(this.leftForm.activeType)
 
       //subjectIdList
     }

+ 7 - 1
src/views/teacherManager/teacherDetail/components/settlement.vue

@@ -68,6 +68,11 @@
         </el-table-column>
         <el-table-column label="当前课次"
                          prop="currentClassTimes">
+          <template slot-scope="scope">
+            <div>
+              {{  scope.row.currentClassTimes + '/' +scope.row.totalClassTimes  }}
+            </div>
+          </template>
         </el-table-column>
         <el-table-column label="考勤状态">
           <template slot-scope="scope">
@@ -87,7 +92,8 @@
         </el-table-column>
         <el-table-column label="操作">
           <template slot-scope="scope">
-            <el-button @click="onUpdate(scope.row)"
+            <el-button v-if="scope.row.courseScheduleType != 'DEMO'"
+                       @click="onUpdate(scope.row)"
                        type="text">课酬调整</el-button>
           </template>
         </el-table-column>

+ 1 - 1
src/views/teamBuild/components/teamBaseInfo.vue

@@ -577,7 +577,7 @@ export default {
     sessionStorage.setItem('resetCode', '1')
 
     // 获取分部下的员工
-    queryEmployByOrganId({ organId: this.$store.getters.organ }).then(res => {
+    queryEmployByOrganId({ organId: this.$store.getters.organ, rows: 1000 }).then(res => {
       if (res.code == 200) {
         this.orgianList = res.data.rows;
       }

+ 5 - 1
src/views/teamBuild/signupList.vue

@@ -12,7 +12,7 @@
           <div class='newBand close'
                @click="onClose">停止乐团</div>
           <div class='newBand'
-               @click="paymentStatus = true"
+               @click="payStart"
                v-if="status=='APPLY'">开始缴费</div>
           <div class='newBand'
                @click="onGoHome"
@@ -459,6 +459,10 @@ export default {
     onCancel () {
       this.$router.push('/business/teamDetail')
     },
+    payStart () {
+      paymentStatus = true;
+      this.getList();
+    },
     getList () {
       let obj = {
         musicGroupId: this.id,

+ 3 - 3
src/views/teamBuild/teamSeting/components/salarySet.vue

@@ -151,8 +151,8 @@ export default {
     sessionStorage.setItem('setStep', 4)
     getTeamDetail({ musicGroupId: this.teamid }).then(res => {
       if (res.code == 200) {
-        this.searchForm.salary = res.data.settlementType;
-        if (!res.data.settlementType) {
+        this.searchForm.salary = res.data.musicGroup.settlementType;
+        if (!res.data.musicGroup.settlementType) {
           this.hasDate = true;
         }
         if (this.searchForm.salary == 'TEACHER_DEFAULT') {
@@ -266,7 +266,7 @@ export default {
     getList () {
       getTeamDetail({ musicGroupId: this.teamid }).then(res => {
         if (res.code == 200) {
-          this.searchForm.salary = res.data.settlementType;
+          this.searchForm.salary = res.data.musicGroup.settlementType;
           if (!res.data.settlementType) {
             this.hasDate = true;
           }

+ 4 - 3
src/views/teamBuild/teamSeting/components/setClass.vue

@@ -196,7 +196,7 @@
             <el-option v-for="(item,index) in teacherList"
                        :key="index"
                        :value="item.id"
-                       :label="item.username"></el-option>
+                       :label="item.realName"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
@@ -210,6 +210,7 @@
   </div>
 </template>
 <script>
+import { queryEmployByOrganId } from '@/api/systemManage'
 import { getTeamRecruit, getSingleClass, getNoClassStudent, addSingleClass, removeSingleClass, addAllClass, getAllClass, findNoClassSingle, removeAllClass, getTeacher, checkAllStudent, getTeamBaseInfo } from "@/api/buildTeam"
 export default {
   props: {
@@ -279,9 +280,9 @@ export default {
     this.getSingleClass();
     this.getAllClass();
     // 获取所有老师的列表
-    getTeacher({ organId: this.$store.getters.organ, rows: 1000 }).then(res => {
+    queryEmployByOrganId({ organId: this.$store.getters.organ, rows: 1000 }).then(res => {
       if (res.code == 200) {
-        this.teacherList = res.data;
+        this.teacherList = res.data.rows;
         // console.log(this.teacherList)
       }
     })