瀏覽代碼

提交一下 准备优化乐团排课

1
mo 4 年之前
父節點
當前提交
0b949d398b

+ 6 - 2
src/views/resetTeaming/modals/payment-cycle.vue

@@ -54,10 +54,11 @@
         end-placeholder="结束日期">
       </el-date-picker>
     </el-form-item>
+
     <el-form-item
       label="缴费有效期"
       prop="paymentValid"
-      v-if="courseViewType!=1"
+      v-if="courseViewType!=1 || (courseViewType==1&&paymentType=== undefined)"
       :rules="[{required: true, message: '请选择缴费有效期', trigger: 'blur'}]"
     >
       <el-date-picker
@@ -76,7 +77,7 @@
 import { paymentPatternType } from '@/constant'
 import { objectToOptions } from '@/utils'
 export default {
-  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon', 'hidePaymentPattern','hideMoney','courseViewType'],
+  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon', 'hidePaymentPattern','hideMoney','courseViewType','paymentType'],
   data() {
     return {
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),
@@ -88,6 +89,9 @@ export default {
       },
     }
   },
+  mounted(){
+    // console.log(this.paymentType)
+  },
   methods: {
     paymentAmountChange() {
       this.$set(this.form, 'changeed', true)

+ 4 - 4
src/views/resetTeaming/modals/user-baseinfo.vue

@@ -9,17 +9,17 @@
       label="缴费类型"
       prop="leixing"
       :rules="[{required: true, message: '请选择缴费类型', trigger: 'change'}]"
-      v-if="typeof paymentType === 'undefined'"
+      v-if="typeof paymentType === 'undefined'&&courseViewType != 1"
     >
       <el-radio-group style="width: 100%" v-model="form.leixing">
-        <el-radio label="1" v-if="courseViewType != 1">乐团续费</el-radio>
+        <el-radio label="1">乐团续费</el-radio>
         <el-radio label="2">临时加课</el-radio>
       </el-radio-group>
     </el-form-item>
     <el-form-item
       label="收费标准"
       prop="musicGroupOrganizationCourseSettingId"
-      v-if="isCommon && form.musicGroupOrganizationCourseSettingId != 0 && !this.rowDetail"
+      v-if="isCommon && form.musicGroupOrganizationCourseSettingId != 0 && !this.rowDetail&&courseViewType != 1"
       :rules="[{required: true, message: '请选择收费标准', trigger: 'change'}]"
     >
       <el-select style="width: 100%!important;" v-model="form.musicGroupOrganizationCourseSettingId" placeholder="请选择收费标准">
@@ -34,7 +34,7 @@
     <el-alert
       :closable="false"
       style="margin-left: 160px;width: auto;"
-      v-if="paymentType != 0 && isCommon && !rowDetail"
+      v-if="paymentType != 0 && isCommon && !rowDetail&&courseViewType != 1"
       type="warning">
       <template #title>
         <p>该乐团为{{chargeTypeName}}模式,若需创建其他模式的收费标准,请先修改乐团基本信息中的乐团模式

+ 11 - 4
src/views/resetTeaming/modals/user-pay-form.vue

@@ -4,7 +4,7 @@
       title="课程信息设置"
       :closable="false"
       class="alert"
-      v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
+      v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'&&courseViewType!=1"
       type="info"
     >
     </el-alert>
@@ -86,11 +86,11 @@
         class="alert"
         style="margin-top: 20px"
         type="info"
-        v-if="courseViewType == 1"
+        v-if="courseViewType == 1&&paymentType !== undefined"
       >
       </el-alert>
       <memberSetting
-        v-if="courseViewType == 1"
+        v-if="courseViewType == 1&&paymentType !== undefined"
         :form="memberForm"
         :isUserType="isUserType"
         :organId="baseInfo.organId"
@@ -123,7 +123,7 @@
             style="width: 100% !important"
             v-model="payment.paymentPattern"
             placeholder="请选择缴费方式"
-            :disabled="courseViewType == 1"
+            :disabled="courseViewType == 1&&paymentType !== undefined"
           >
             <el-option
               v-for="item in paymentPatternTypeOptions"
@@ -157,6 +157,7 @@
             <paymentCycle
               ref="cycles"
               :form="item"
+              :paymentType="paymentType"
               :hidePaymentPattern="true"
               :isCommon="isCommon"
               :isUserType="isUserType"
@@ -407,6 +408,7 @@ export default {
   mounted() {
     this.formatCourse();
     this.init();
+
   },
   activated() {
     this.formatCourse();
@@ -417,6 +419,10 @@ export default {
     async init() {
       let organId = this.baseInfo?.musicGroup?.organId;
       this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
+      if(this.courseViewType == 1){
+        this.form.leixing = 1;
+        this.addExtraClass()
+      }
       // 如果为学员缴费且是乐团缴费则显示云教练的价格
       if (
         !this.paymentType &&
@@ -529,6 +535,7 @@ export default {
           this.syncAllMoney();
         } catch (error) {}
       }
+
     },
     formatCourse() {
       const organId = this.musicGroup?.organId;

+ 18 - 17
src/views/teamDetail/components/memberClassList.vue

@@ -339,7 +339,7 @@ export default {
           this.teacherList = res.data;
         }
       });
-     await this.getList();
+      await this.getList();
     },
     changeMixClass(val) {
       // 根据合奏班id获取合奏班下的所有声部班
@@ -465,8 +465,7 @@ export default {
                 this.musicGroupSchoolTermCourseDetailId,
             });
             this.$message.success("取消成功");
-             this.getList();
-
+            this.getList();
           } catch (e) {}
           // musicGroupSchoolTermCourseDetailId
         })
@@ -519,25 +518,27 @@ export default {
   },
   async beforeRouteLeave(to, from, next) {
     let flag = false;
+    // if (this.activeSingleList.length > 0) {
+    // }
     this.activeSingleList.forEach((item) => {
       if (item.preTotalClassTimes != 0) {
         flag = true;
       }
-      if (flag) {
-        this.$confirm("预排课程尚未提交,是否确认跳转其他页面?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(async () => {
-            next();
-            // musicGroupSchoolTermCourseDetailId
-          })
-          .catch(() => {});
-      } else {
-        next();
-      }
     });
+    if (flag) {
+      this.$confirm("预排课程尚未提交,是否确认跳转其他页面?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          next();
+          // musicGroupSchoolTermCourseDetailId
+        })
+        .catch(() => {});
+    } else {
+      next();
+    }
   },
 };
 </script>

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

@@ -685,6 +685,7 @@ import {
   createClass,
   pushMessage,
   coursePostpone,
+  musicGroupSchoolTermCourseDetail,
 } from "@/api/buildTeam";
 import {
   getClassAllStudent,
@@ -877,7 +878,7 @@ export default {
       options: this.processDate(),
       team_status: "",
       activeList: [],
-      courseViewType:''
+      courseViewType: "",
     };
   },
   created() {
@@ -897,14 +898,14 @@ export default {
       if (this.musicGroupInfo) {
         this.organId = this.musicGroupInfos.organId;
         this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
-        this.courseViewType = this.musicGroupInfos.courseViewType
+        this.courseViewType = this.musicGroupInfos.courseViewType;
       } else {
         getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
           if (res.code == 200) {
             this.musicGroupInfos = res.data.musicGroup;
             this.organId = this.musicGroupInfos.organId;
             this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
-                this.courseViewType = this.musicGroupInfos.courseViewType
+            this.courseViewType = this.musicGroupInfos.courseViewType;
           }
         });
       }
@@ -1076,7 +1077,7 @@ export default {
     },
     changeMixClass(val) {
       // 根据合奏班id获取合奏班下的所有声部班
-      console.log(val)
+      console.log(val);
       this.getList(val);
       this.activeMixClass = val;
     },
@@ -1718,13 +1719,20 @@ export default {
       this.activeClass = row.id;
       this.postponeVisible = true;
     },
-    gotoMemberCourse(){
+    async gotoMemberCourse() {
       // 这里跳转到课表
-      this.$router.push({
-        path:'/business/memberClassList',
-        query:{...this.$route.query}
-      })
-    }
+      try {
+        const res = await musicGroupSchoolTermCourseDetail({
+          musicGroupId: this.teamid,
+        });
+        this.$router.push({
+          path: "/business/memberClassList",
+          query: { ...this.$route.query },
+        });
+      } catch (e) {
+        console.log(e);
+      }
+    },
   },
 
   watch: {

+ 2 - 2
vue.config.js

@@ -19,8 +19,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 开发环境
-let target = 'https://test.dayaedu.com' //测试环境
+let target = 'http://dev.dayaedu.com' // 开发环境
+// let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {