Explorar o código

Merge branch '11/24SAAS' of http://git.dayaedu.com/yonge/dy-admin-manager into 11/24SAAS

lex-xin %!s(int64=3) %!d(string=hai) anos
pai
achega
01649861e3

+ 8 - 0
src/views/resetTeaming/api.js

@@ -19,6 +19,14 @@ export const musicGroupcreateCalender = data => request2({
   method: 'post',
 
 })
+export const musicGroupresetCalender = data => request2({
+  url: '/api-web/musicGroupPaymentCalender/updateCalender',
+  data,
+  method: 'post',
+
+})
+
+
 
 
 export const musicGroupPaymentCalenderView = data => request2({

+ 90 - 27
src/views/resetTeaming/components/payInfoDetail.vue

@@ -5,7 +5,9 @@
         <el-page-header
           @back="goback"
           style="padding-bottom: 30px"
-          :content='$route.query.payUserType == "SCHOOL"?"学校缴费":"学员缴费"'
+          :content="
+            $route.query.payUserType == 'SCHOOL' ? '学校缴费' : '学员缴费'
+          "
         >
         </el-page-header>
         <div class="m-core">
@@ -134,10 +136,12 @@
                   leBao ? 'active' : '',
                   leBaoDisabled ? 'disabled' : '',
                 ]"
-                @click.prevent="()=>{
-                  if(leBaoDisabled)return
-                  leBao = !leBao
-                }"
+                @click.prevent="
+                  () => {
+                    if (leBaoDisabled) return;
+                    leBao = !leBao;
+                  }
+                "
               >
                 <p>乐保</p>
                 <el-checkbox
@@ -151,10 +155,12 @@
                   teamActive ? 'active' : '',
                   teamActiveDisabled ? 'disabled' : '',
                 ]"
-                @click.prevent="()=>{
-                  if(teamActiveDisabled)return
-                  teamActive = !teamActive
-                }"
+                @click.prevent="
+                  () => {
+                    if (teamActiveDisabled) return;
+                    teamActive = !teamActive;
+                  }
+                "
               >
                 <p>乐团活动</p>
                 <el-checkbox
@@ -216,14 +222,12 @@ import {
 } from "@/api/specialSetting";
 import { getSysTenantConfig } from "@/views/courseRulersManager/api";
 import {
-  musicGroupPaymentCalenderAdd,
-  musicGroupPaymentCalenderDetailBatchUpdate,
   queryByMusicGroupOrganizationCourseSettingsId,
-  musicGroupPaymentCalenderView,
   getAllmemberRank,
-  getMemberFee,
   musicGroupcreateCalender,
+  musicGroupresetCalender,
 } from "../api";
+import { getMusicGroupPaymentCalenderDetail } from "@/api/buildTeam";
 import { vipGroupActivity } from "@/api/vipSeting";
 export default {
   components: {
@@ -240,7 +244,7 @@ export default {
         eclass: [{}],
         memberList: [
           {
-            periodEnum: "",
+            period: "",
             num: "",
             actualAmount: "",
             memberRankSettingId: "",
@@ -265,6 +269,7 @@ export default {
       teamActive: false,
       teamActiveDisabled: false,
       leBao: false,
+      leBaoDisabled: false,
       organizationCourseUnitPriceSettings: null,
       baseInfo: null,
       courseViewType: null,
@@ -310,8 +315,8 @@ export default {
       if (this.$route.query.payUserType == "SCHOOL") {
         this.member = false;
         this.memberDisabled = true;
-        this.leBao = false
-        this.teamActive = false
+        this.leBao = false;
+        this.teamActive = false;
         this.leBaoDisabled = true;
         this.teamActiveDisabled = true;
       }
@@ -320,7 +325,55 @@ export default {
       await this.getMemberList(); // 获取会员(团练保信息)
       await this.getLeBao(); // 获取乐保
       await this.getActive(); // 获取活动
-      if (this.submitList.length > 0) {
+
+      console.log(this.$route.query.calenderId,'calenderId');
+      if (this.$route.query.calenderId) {
+        // 说明是修改  查缴项目详情
+        getMusicGroupPaymentCalenderDetail({
+          id: this.$route.query.calenderId,
+        }).then((res) => {
+          if (res.code == 200) {
+            if (res.data.member) {
+              // 团练保
+              this.member = true;
+              this.$set(this.form, "memberList"[{ ...res.data.member }]);
+            }
+            this.$set(this.form, "paymentDate", [
+              res.data?.calender?.startPaymentDate,
+              res.data?.calender?.deadlinePaymentDate,
+            ]);
+            this.$set(this.form, "memo", res.data?.calender?.memo);
+            this.$set(
+              this.form,
+              "payUserType",
+              res.data?.calender?.payUserType
+            );
+            if (res.data?.calender?.musicGroupOrganizationCourseSettingId) {
+              this.leixing = "1";
+              this.$set(
+                this.form,
+                "musicGroupOrganizationCourseSettingId",
+                res.data?.calender?.musicGroupOrganizationCourseSettingId
+              );
+            } else {
+              this.leixing = "2";
+            }
+            if (res.data.repair) {
+              this.leBao = true;
+              this.$set(this.form, "leBaoList"[{ ...res.data.repair }]);
+            }
+            if (res.data?.course?.length > 0) {
+              this.teamCourse = true;
+              this.$set(this.form, "eclass", res.data.course);
+            }
+            if (res.data?.activity?.length > 0) {
+              this.teamActive = true;
+              this.$set(this.form, "activity", res.data.activity);
+            }
+          }
+        });
+      }
+        if (this.submitList.length > 0) {
         this.$bus.$emit("showguide", this.submitList);
         return;
       }
@@ -498,13 +551,23 @@ export default {
       this.$refs.form.validate(async (isok) => {
         if (isok) {
           let obj = this.fommatDate();
-          console.log(obj);
-          try {
-            const res = await musicGroupcreateCalender(obj);
-            this.$message.success("创建缴费成功");
-            this.goback();
-          } catch (e) {
-            console.log(e);
+          if (this.$route.query.calenderId) {
+            obj.calenderId = this.$route.query.calenderId;
+            try {
+              const res = await musicGroupresetCalender(obj);
+              this.$message.success("修改缴费成功");
+              this.goback();
+            } catch (e) {
+              console.log(e);
+            }
+          } else {
+            try {
+              const res = await musicGroupcreateCalender(obj);
+              this.$message.success("创建缴费成功");
+              this.goback();
+            } catch (e) {
+              console.log(e);
+            }
           }
         }
       });
@@ -518,7 +581,7 @@ export default {
         startPaymentDate: this.form.paymentDate[0],
         deadlinePaymentDate: this.form.paymentDate[1],
         calenderActivityList:
-          this.form.activeList.length > 0 ? this.form.activeList : null,
+          this.form.activeList?.length > 0 ? this.form.activeList : null,
         musicRepair:
           this.form.leBaoList?.length > 0
             ? { ...this.form.leBaoList[0] }
@@ -528,7 +591,7 @@ export default {
             ? { ...this.form.memberList[0] }
             : null,
         musicGroupPaymentCalenderCourseSettingsList:
-          this.form.eclass.length > 0 ? this.form.eclass : null,
+          this.form.eclass?.length > 0 ? this.form.eclass : null,
         musicGroupId: this.$route.query.id,
       };
     },
@@ -723,7 +786,7 @@ export default {
         background-color: #f2f2f2 !important;
         /deep/.el-checkbox__inner {
           background-color: #fff !important;
-           border-color: #d9d9d9;
+          border-color: #d9d9d9;
           color: #fff;
           &::after {
             border-color: #d9d9d9;

+ 5 - 0
src/views/resetTeaming/components/resetPayList.vue

@@ -755,6 +755,11 @@ export default {
         this.payFormType = row.payUserType === "SCHOOL" ? "school" : "user";
         this.isNew = false;
         this.activeRow = row;
+           let query = this.$route.query;
+      this.$router.push({
+        path: "/business/studentPaySet",
+        query: { ...query,  payUserType: "STUDENT",calenderId:row.id},
+      });
         // 跳转新接口
         // this.memberVisible = true;
       } else {

+ 5 - 5
src/views/resetTeaming/modals/payMember.vue

@@ -71,13 +71,13 @@
       </el-table-column>
       <el-table-column
         label="会员周期"
-        prop="periodEnum"
-        key="periodEnum"
+        prop="period"
+        key="period"
         width="170px"
       >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'memberList.' + scope.$index + '.periodEnum'"
+            :prop="'memberList.' + scope.$index + '.period'"
             :rules="[
               {
                 required: true,
@@ -87,7 +87,7 @@
             ]"
           >
             <el-select
-              v-model="form.memberList[scope.$index].periodEnum"
+              v-model="form.memberList[scope.$index].period"
               style="width: 90% !important"
               @change="changeMemberperiodEnum"
               :disabled="!form.memberList[scope.$index].memberRankSettingId"
@@ -129,7 +129,7 @@
               :controls="false"
               :precision="0"
               :min="0"
-              @change="changeMemberperiodEnum(form.memberList[scope.$index].periodEnum)"
+              @change="changeMemberperiodEnum(form.memberList[scope.$index].period)"
               placeholder="会员数量"
                :disabled="!form.memberList[scope.$index].memberRankSettingId"
             />