mo 2 tahun lalu
induk
melakukan
f07660ca1b

+ 66 - 23
src/views/resetTeaming/components/payInfoDetail.vue

@@ -267,13 +267,21 @@
               </el-row>
             </div>
           </el-form>
-          <div v-if="!teamCourse && !member && !leBao && !teamActive&&$route.query.team_status=='PROGRESS'">
+          <div
+            v-if="
+              !teamCourse &&
+              !member &&
+              !leBao &&
+              !teamActive &&
+              $route.query.team_status == 'PROGRESS'
+            "
+          >
             <empty desc="暂无缴费项目配置" />
           </div>
           <div v-else style="text-align: center">
             <el-button class="submitBtn" @click="submitForm">确认</el-button>
           </div>
-           <!-- <div  style="text-align: center">
+          <!-- <div  style="text-align: center">
             <el-button class="submitBtn" @click="submitForm">确认</el-button>
           </div> -->
         </div>
@@ -333,7 +341,7 @@ import {
   getAllmemberRank,
   musicGroupcreateCalender,
   musicGroupresetCalender,
-  getAutoActivationFlag
+  getAutoActivationFlag,
 } from "../api";
 import {
   getMusicGroupPaymentCalenderDetail,
@@ -363,15 +371,15 @@ export default {
             actualAmount: "",
             memberRankSettingId: "",
             optionalFlag: null,
-            autoActivationFlag:false,
+            autoActivationFlag: false,
           },
         ],
         leBaoList: [{}],
         activeList: [{}],
-        isShowMemberForPay:true,
-        isShowMusicInsuranceForPay:true,
-        isShowVipCourseForPay:true,
-        isShowMusicCourseForPay:true,
+        isShowMemberForPay: true,
+        isShowMusicInsuranceForPay: true,
+        isShowVipCourseForPay: true,
+        isShowMusicCourseForPay: true,
         leixing: "1",
       },
       teamCourse: false,
@@ -410,7 +418,7 @@ export default {
       preViewData: {},
       tenantId: null,
       isField: false,
-      showAutoActivationFlag:false
+      showAutoActivationFlag: false,
     };
   },
   mounted() {
@@ -494,7 +502,10 @@ export default {
               "payUserType",
               res.data?.calender?.payUserType
             );
-
+            this.$set(this.form, "isShowMemberForPay", res.data?.calender?.paymentItemShowState?.isShowMemberForPay);
+            this.$set(this.form, "isShowMusicInsuranceForPay", res.data?.calender?.paymentItemShowState?.isShowMusicInsuranceForPay);
+            this.$set(this.form, "isShowVipCourseForPay", res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay);
+            this.$set(this.form, "isShowMusicCourseForPay", res.data?.calender?.paymentItemShowState?.isShowMusicCourseForPay);
             if (res.data.member) {
               // 团练保
               this.member = true;
@@ -589,8 +600,8 @@ export default {
         const res = await getAllmemberRank({ isDefault: 0 });
         this.memberRankList = res.data;
         // 获取是否展示会员是否自动生效
-        const memberRes = await getAutoActivationFlag()
-        this.showAutoActivationFlag = memberRes.data
+        const memberRes = await getAutoActivationFlag();
+        this.showAutoActivationFlag = memberRes.data;
       } catch (e) {
         console.log(e);
       }
@@ -787,7 +798,7 @@ export default {
                 this.$message.success("修改缴费成功");
                 this.goback();
               }
-                  if (res.code == 207) {
+              if (res.code == 207) {
                 await this.$confirm(
                   res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
                   "提示",
@@ -900,14 +911,41 @@ export default {
               ? { ...form.leBaoList[0], optionalFlag: false }
               : null, // 乐保
         },
-        isShowMemberForPay:form.isShowMemberForPay,
-        isShowMusicInsuranceForPay:form.isShowMusicInsuranceForPay,
-        isShowVipCourseForPay:form.isShowVipCourseForPay,
-        isShowMusicCourseForPay:form.isShowMusicCourseForPay,
-
+        isShowMemberForPay: form.isShowMemberForPay,
+        isShowMusicInsuranceForPay: form.isShowMusicInsuranceForPay,
+        isShowVipCourseForPay: form.isShowVipCourseForPay,
+        isShowMusicCourseForPay: form.isShowMusicCourseForPay,
       };
     },
     fommatDate() {
+      console.log({
+        payUserType: this.$route.query.payUserType,
+        musicGroupOrganizationCourseSettingId:
+          this.form.musicGroupOrganizationCourseSettingId || null,
+        memo: this.form.memo,
+        startPaymentDate: this.form.paymentDate[0],
+        deadlinePaymentDate: this.form.paymentDate[1],
+        calenderActivityList:
+          this.form.activeList?.length > 0 ? this.form.activeList : null,
+        musicRepair:
+          this.form.leBaoList?.length > 0
+            ? { ...this.form.leBaoList[0] }
+            : null,
+        calenderMember:
+          this.form.memberList?.length > 0 &&
+          this.form.memberList[0]?.memberRankSettingId
+            ? { ...this.form.memberList[0] }
+            : null,
+        musicGroupPaymentCalenderCourseSettingsList:
+          this.form.eclass?.length > 0 ? this.form.eclass : null,
+        musicGroupId: this.$route.query.id,
+        paymentItemShowState: {
+          isShowMemberForPay: this.form.isShowMemberForPay,
+          isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
+          isShowVipCourseForPay: this.form.isShowVipCourseForPay,
+          isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
+        },
+      })
       return {
         payUserType: this.$route.query.payUserType,
         musicGroupOrganizationCourseSettingId:
@@ -922,14 +960,19 @@ export default {
             ? { ...this.form.leBaoList[0] }
             : null,
         calenderMember:
-          this.form.memberList?.length > 0&&this.form.memberList[0]?.memberRankSettingId ? { ...this.form.memberList[0] }: null,
+          this.form.memberList?.length > 0 &&
+          this.form.memberList[0]?.memberRankSettingId
+            ? { ...this.form.memberList[0] }
+            : null,
         musicGroupPaymentCalenderCourseSettingsList:
           this.form.eclass?.length > 0 ? this.form.eclass : null,
         musicGroupId: this.$route.query.id,
-        isShowMemberForPay:form.isShowMemberForPay,
-        isShowMusicInsuranceForPay:form.isShowMusicInsuranceForPay,
-        isShowVipCourseForPay:form.isShowVipCourseForPay,
-        isShowMusicCourseForPay:form.isShowMusicCourseForPay,
+        paymentItemShowState:  JSON.stringify({
+          isShowMemberForPay: this.form.isShowMemberForPay,
+          isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
+          isShowVipCourseForPay: this.form.isShowVipCourseForPay,
+          isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
+        }),
       };
     },
     getScroll() {

+ 28 - 8
src/views/resetTeaming/modals/subject-preview.vue

@@ -3,7 +3,7 @@
     <tips />
 
     <course-model
-      v-if="preViewData.isShowMusicCourseForPay"
+    v-if="mypreViewData&&mypreViewData.isShowMusicCourseForPay"
       :courseViewType="courseViewType"
       :courseShowInfo="courseShowInfo"
       :remissionCourseFeeStatus="remissionCourseFeeStatus"
@@ -19,7 +19,7 @@
     />
 
     <member
-      v-if="toolsPackage && toolsPackage.length > 0&&preViewData.isShowMemberForPay"
+      v-if="toolsPackage && toolsPackage.length > 0&&mypreViewData&&mypreViewData.isShowMemberForPay"
       :toolsPackage="toolsPackage"
       :isGiveAccessories="isGiveAccessories"
       :accessStatus="accessOries.length > 0"
@@ -37,7 +37,7 @@
       @onQuestions="onQuestions"
     />
 
-    <div class="courseModel" style="margin-top: 12px;" v-if="instrumentRepair && instrumentRepair.length > 0&& preViewData.isShowMusicInsuranceForPay">
+    <div class="courseModel" style="margin-top: 12px;" v-if="instrumentRepair && instrumentRepair.length > 0&& mypreViewData&&mypreViewData.isShowMusicInsuranceForPay">
       <h2 class="titles">
         <img :src="trainSmallBg" />
         <span>乐器保养</span>
@@ -72,7 +72,7 @@
       @onAuxiliarie="onCheckItem"
     />
     <activity
-      v-if="activityList && activityList.length > 0&&preViewData.isShowVipCourseForPay"
+      v-if="activityList && activityList.length > 0&&mypreViewData&&mypreViewData.isShowVipCourseForPay"
       :trainSmallBg="trainSmallBg"
       :activityList="activityList"
       @onCheckItem="onCheckItem"
@@ -178,7 +178,13 @@ export default {
       remissionCourseFeeStatus: false,
       isGiveAccessories: false, // 是否赠送辅件
       giveAccessoriesStatus: false,
-    };
+      mypreViewData:{
+        isShowMemberForPay:true,
+          isShowMusicInsuranceForPay:true,
+          isShowVipCourseForPay:true,
+          isShowMusicCourseForPay:true,
+      }
+    }
   },
   mounted() {
     this.__init();
@@ -202,7 +208,13 @@ export default {
       });
     },
     __dataFormat(tempResult) {
-      const preViewData = this.preViewData ? JSON.parse(JSON.stringify(this.preViewData)) : null
+      this.mypreViewData = this.preViewData&&this.preViewData.paymentCalender ? JSON.parse(JSON.stringify(this.preViewData)) : {
+          isShowMemberForPay:true,
+          isShowMusicInsuranceForPay:true,
+          isShowVipCourseForPay:true,
+          isShowMusicCourseForPay:true,
+        }
+
       this.courseViewType = tempResult.musicGroup.courseViewType || 0;
       this.isGiveAccessories = tempResult.musicGroup && tempResult.musicGroup.isGiveAccessories || false; // 是否赠送辅件
       this.organId = tempResult.musicGroup.organId;
@@ -233,9 +245,17 @@ export default {
             tempResult.musicGroupPaymentCalender.paymentValidEndDate
           ).format("YYYY/MM/DD");
       }
-      const paymentCalender =  preViewData ? preViewData.paymentCalender : (tempResult.paymentCalender || null)
-      let tempInfo = paymentCalender && paymentCalender.course ? paymentCalender.course : [];
+      const paymentCalender =  this.mypreViewData&&this.mypreViewData.paymentCalender ? this.mypreViewData.paymentCalender : (tempResult.paymentCalender || null)
+      if(paymentCalender&&paymentCalender.calender&&paymentCalender.calender.paymentItemShowState){
+
+        let obj = JSON.parse(paymentCalender.calender.paymentItemShowState)
 
+        for(let key in obj){
+          this.mypreViewData [key] = obj[key]
+        }
+      }
+
+      let tempInfo = paymentCalender && paymentCalender.course ? paymentCalender.course : [];
       let memberPrivilegesItemList = tempResult.memberPrivilegesItemList
         ? tempResult.memberPrivilegesItemList
         : [];

+ 1 - 0
src/views/teamDetail/teamList.vue

@@ -608,6 +608,7 @@ export default {
         courseViewType: this.topForm.courseViewType || null,
         cooperationOrganId: this.topForm.cooperationOrganId || null,
         searchType: this.$route.query.searchType,
+        isStartedCourse:this.topForm.isStartedCourse,
         ...getTimes(
           createTimer,
           ["createStartDate", "createEndDate"],