فهرست منبع

1126 16:34

1111
mo 5 سال پیش
والد
کامیت
2b37af3e29

+ 10 - 3
src/views/buildVip/index.vue

@@ -4,7 +4,6 @@
       <el-page-header @back="onCancel"
                       content="VIP课申请"></el-page-header>
       <!-- <div class="squrt" /> -->
-
     </h2>
     <div class="m-core">
       <div class="vipLeft">
@@ -489,6 +488,12 @@ export default {
     // 如果有id则是修改  带出所有的数据 
     // 没有id 则是新增
     this.id = this.$route.query.id
+    if (this.$route.query.rules) {
+      this.rules = this.$route.query.rules
+    }
+    if (this.$route.query.searchForm) {
+      this.searchForm = this.$route.query.searchForm
+    }
     if (this.id) {
       // 发请求获取信息
       getVipGroupDetail({ vipGroupId: this.id }).then(res => {
@@ -943,7 +948,7 @@ export default {
         createVip(obj).then(res => {
           if (res.code == 200) {
             this.$message.success('恭喜您创建成功');
-            this.$router.go(-1);
+            this.$router.push({ path: '/business/vipList', query: { rules: this.rules, searchForm: this.searchForm } })
           }
         })
       } else {
@@ -957,6 +962,8 @@ export default {
     },
     setSection (val) {
       this.leftForm.section = '';
+      this.rightForm.offlineCourse = '';
+      this.rightForm.onlineCourse = '';
       getTeachSchool({ userId: val }).then(res => {
         if (res.code == 200) {
           this.scetionList = res.data;
@@ -964,7 +971,7 @@ export default {
       })
     },
     onCancel () {
-      this.$router.push('/business/vipList')
+      this.$router.push({ path: '/business/vipList', query: { rules: this.rules, searchForm: this.searchForm } })
     },
     setCourse () {
       //  

+ 14 - 3
src/views/teamBuild/components/teamSoundMoney.vue

@@ -485,7 +485,12 @@ export default {
               obj.musicGroupSubjectGoodsGroups.push(some);
             }
           })
-
+          let depositFee;
+          if (active.fangshi == 'LEASE') {
+            depositFee = active.fangshiprice;
+          } else {
+            depositFee = 0;
+          }
           // 添加声部
           let item = {
             expectedStudentNum: active.jihua,
@@ -493,7 +498,7 @@ export default {
             kitGroupPurchaseType: active.fangshi,
             subName: active.sound,
             subjectId: active.id,
-            depositFee: active.fangshiprice // depositFee  只有租赁才有
+            depositFee// depositFee  只有租赁才有
           }
           obj.musicGroupSubjectPlans.push(item);
         })
@@ -545,13 +550,19 @@ export default {
             }
           })
           // 添加声部
+          let depositFee;
+          if (active.fangshi == 'LEASE') {
+            depositFee = active.fangshiprice;
+          } else {
+            depositFee = 0;
+          }
           let item = {
             expectedStudentNum: active.jihua,
             fee: active.yuji,
             kitGroupPurchaseType: active.fangshi,
             subName: active.sound,
             subjectId: active.id,
-            depositFee: active.fangshiprice // depositFee  只有租赁才有
+            depositFee: depositFee // depositFee  只有租赁才有
           }
           obj.musicGroupSubjectPlans.push(item);
         })

+ 14 - 1
src/views/teamBuild/teamSeting/components/setClass.vue

@@ -272,6 +272,18 @@ export default {
 
     }
   },
+  watch: {
+    classVisible (val) {
+      if (!val) {
+        this.classVisible = false;
+        this.maskList.subjectCheckList = [];
+        this.studentsGroup = [];
+        this.activeStudents = [];
+        this.$refs['className'].resetFields();
+        this.getSingleClass();
+      }
+    }
+  },
   mounted () {
     sessionStorage.setItem('setStep', 0)
     getTeamRecruit({ musicGroupId: this.teamid }).then(res => {
@@ -534,7 +546,8 @@ export default {
 
       });
     },
-  }
+  },
+
 }
 </script>
 <style lang="scss" scoped>

+ 29 - 18
src/views/teamDetail/components/resetClass.vue

@@ -247,6 +247,16 @@
                :rules="teacherRules"
                label-position='right'
                label-width="100px;">
+        <el-form-item label="合奏班"
+                      v-if='!isTemporary'
+                      prop="mixClassGroupId">
+          <el-select v-model="teacherForm.mixClassGroupId">
+            <el-option v-for="(item,index) in maxClassList"
+                       :label="item.name"
+                       :key="index"
+                       :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="主教老师"
                       prop='coreTeacher'>
           <el-select v-model="teacherForm.coreTeacher"
@@ -389,13 +399,15 @@ export default {
         courseType: '',
         courseTime: '',
         checked: false,
-        courseNum: ''
+        courseNum: '',
+        mixClassGroupId: ''
       },
       teacherRules: {
         coreTeacher: [{ required: true, message: '请选择主教老师' }],
         courseType: [{ required: true, message: '请选择上课类型' }],
         courseTime: [{ required: true, message: '请选择开始时间' }],
-        courseNum: [{ required: true, message: '请输入排课次数' }]
+        courseNum: [{ required: true, message: '请输入排课次数' }],
+        mixClassGroupId: [{ required: true, message: '请选择合奏班' }]
       },
       weekList: [{
         week: '',
@@ -441,11 +453,11 @@ export default {
     // 2.根据合奏班获取所有的单技班
     // 3.根据乐团id 查询 此乐团所有的合奏班
     // 4.获取当年的所有节假日
-    // getAllClass({ musicGroupId: this.teamid }).then(res => {
-    //   if (res.code == 200) {
-    //     this.maxClassList = res.data;
-    //   }
-    // })
+    getAllClass({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        this.maxClassList = res.data;
+      }
+    })
     // let year = new Date().getFullYear();
     // axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
     //   this.holidayList = Object.keys(res.data[year])
@@ -701,11 +713,17 @@ export default {
         if (this.weekList[i].id == item.id) {
           this.weekList.splice(i, 1)
         }
-
       }
     },
     // 提交临时班的信息
     submitTemporary (type) {
+      // 参数是一样  type为1 新增临时班
+      // type为2  新增单技班
+      if (type == 1) {
+        this.isTemporary = true;
+      } else {
+        this.isTemporary = false;
+      }
       this.$refs['teacherForm'].validate(item => {
         if (item) {
           let week = this.weekList;
@@ -719,7 +737,7 @@ export default {
           for (let i in this.teacherForm.assistant) {
             classGroupTeacherMapperList.push({ userId: this.teacherForm.assistant[i], teacherRole: 'TEACHING' })
           }
-          let mixClassGroupId = this.activeMixClass;
+          let mixClassGroupId = this.teacherForm.mixClassGroupId;
           let musicGroupId = this.teamid;
           let startDate = this.teacherForm.courseTime;
           let courseType = this.teacherForm.courseType;
@@ -728,13 +746,6 @@ export default {
             return item.userId;
           })
           let holiday = this.teacherForm.checked;
-          /**
-           *  this.weekList.push({
-        week: '',
-        startTime: '',
-        endTime: '',
-           * 
-           */
           let courseList = [];
           for (let i in this.weekList) {
             courseList.push(this.weekList[i])
@@ -763,7 +774,7 @@ export default {
                 this.$message.success('修改成功')
                 this.infoVisible = false;
                 this.studentVisible = false;
-                this.getList(this.activeMixClass);
+                this.getList();
               }
             })
           } else if (type == 2) {
@@ -773,7 +784,7 @@ export default {
                 this.$message.success('修改成功');
                 this.infoVisible = false;
                 this.studentVisible = false;
-                this.getList(this.activeMixClass);
+                this.getList();
               }
             })
           }

+ 22 - 7
src/views/vipClass/vipDetail/index.vue

@@ -1,6 +1,10 @@
 <template>
   <div class='m-container'>
-    <h2>{{ className }}</h2>
+
+    <h2>
+      <el-page-header @back="onCancel"
+                      :content="className"></el-page-header>
+    </h2>
     <div class="m-core">
       <!-- navMenu -->
       <el-tabs v-model="activeName"
@@ -8,7 +12,8 @@
                @tab-click="handleClick">
         <el-tab-pane label="基本信息"
                      name="1">
-          <vipBase v-if="activeName == 1" @getName='getName' />
+          <vipBase v-if="activeName == 1"
+                   @getName='getName' />
         </el-tab-pane>
         <el-tab-pane label="教学记录"
                      name="2">
@@ -37,7 +42,17 @@ export default {
   data () {
     return {
       activeName: '1',
-      className: ''
+      className: '',
+      rules: null,
+      searchForm: null
+    }
+  },
+  mounted () {
+    if (this.$route.query.rules) {
+      this.rules = this.$route.query.rules
+    }
+    if (this.$route.query.searchForm) {
+      this.searchForm = this.$route.query.searchForm
     }
   },
   methods: {
@@ -47,11 +62,11 @@ export default {
     },
     getName (val) {
       this.className = val;
+    },
+    onCancel () {
+      this.$router.push({ path: '/business/vipList', query: { rules: this.rules, searchForm: this.searchForm } })
     }
-  },
-  mounted () {
-
-  },
+  }
 }
 </script>
 <style lang="scss">

+ 13 - 3
src/views/vipClass/vipList.vue

@@ -215,6 +215,16 @@ export default {
       },
     }
   },
+  created () {
+    if (this.$route.query.rules) {
+      this.rules = this.$route.query.rules;
+      // console.log(this.$route.query.rules)
+    }
+    if (this.$route.query.searchForm) {
+      this.searchForm = this.$route.query.searchForm;
+      // console.log(this.$route.query.rules)
+    }
+  },
   mounted () {
     getEmployeeOrgan().then(res => {
       if (res.code == 200) {
@@ -257,7 +267,7 @@ export default {
     },
     // 跳转到vip详情
     gotoVipDetail (id) {
-      this.$router.push({ path: '/business/vipDetail', query: { id } })
+      this.$router.push({ path: '/business/vipDetail', query: { id, rules: this.rules, searchForm: this.searchForm } })
     },
     closeVip (scope) {
       let id = scope.row.id;
@@ -270,11 +280,11 @@ export default {
       })
     },
     gotoBuildVip () {
-      this.$router.push({ path: '/business/buildVip' })
+      this.$router.push({ path: '/business/buildVip', query: { rules: this.rules, searchForm: this.searchForm } })
     },
     // 修改vip
     resetVip (id) {
-      this.$router.push({ path: '/business/vipReset', query: { id } })
+      this.$router.push({ path: '/business/vipReset', query: { id, rules: this.rules, searchForm: this.searchForm } })
     }
 
   },

+ 10 - 2
src/views/vipClass/vipReset.vue

@@ -243,11 +243,19 @@ export default {
         startTime: [{ required: true, message: '请选择上课开始时间', trigger: 'blur' },],
         endTime: [{ required: true, message: '请选择上课结束时间', trigger: 'blur' },],
       },
-      schoolList: []
+      schoolList: [],
+      Frules: null,
+      FsearchForm: null
     }
   },
   created () {
     this.vipid = this.$route.query.id;
+    if (this.$route.query.rules) {
+      this.Frules = this.$route.query.rules
+    }
+    if (this.$route.query.searchForm) {
+      this.FsearchForm = this.$route.query.searchForm
+    }
   },
   mounted () {
     this.getList();
@@ -270,7 +278,7 @@ export default {
       )
     },
     goBack () {
-      this.$router.go(-1)
+      this.$router.push({ path: '/business/vipList', query: { rules: this.Frules, searchForm: this.FsearchForm } })
     },
     resetClass (row) {
       this.maskForm.date = row.classDate;