Pārlūkot izejas kodu

提交 测试

1
mo 4 gadi atpakaļ
vecāks
revīzija
24467683df

+ 2 - 2
src/views/resetTeaming/modals/member-setting.vue

@@ -97,7 +97,7 @@
     <el-form-item
       label="缴费时间"
       prop="paymentDate"
-      v-if="isUserType && !addStudent"
+      v-if="isUserType && !addStudent&&showTime"
       :rules="[{ required: true, message: '请选择缴费时间', trigger: 'blur' }]"
     >
       <el-date-picker
@@ -118,7 +118,7 @@ import { paymentPatternType } from "@/constant";
 import { objectToOptions } from "@/utils";
 import { getAllmemberRank, getMemberFee } from "../api";
 export default {
-  props: ["form", "isUserType", "organId", "addStudent"],
+  props: ["form", "isUserType", "organId", "addStudent","showTime"],
   data() {
     return {
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),

+ 110 - 36
src/views/resetTeaming/modals/user-pay-form.vue

@@ -80,14 +80,37 @@
       "
     />
     <template>
+      <el-alert
+        title="会员设置"
+        :closable="false"
+        class="alert"
+        style="margin-top: 20px"
+        type="info"
+        v-if="courseViewType == 1"
+      >
+      </el-alert>
+      <memberSetting
+        v-if="courseViewType == 1"
+        :form="memberForm"
+        :isUserType="isUserType"
+        :organId="baseInfo.organId"
+        :showTime="false"
+      />
       <el-alert title="缴费设置" :closable="false" class="alert" type="info">
       </el-alert>
 
       <el-form ref="payment" :model="payment">
-        <el-form-item label-width="160px"
-          label="系统缴费金额" v-if="!paymentType&&type=='user'&&(courseViewType==2||courseViewType==3)">
+        <el-form-item
+          label-width="160px"
+          label="系统缴费金额"
+          v-if="
+            !paymentType &&
+            type == 'user' &&
+            (courseViewType == 2 || courseViewType == 3)
+          "
+        >
           <el-input :disabled="true" v-model="cloudFee"></el-input>
-          </el-form-item>
+        </el-form-item>
         <el-form-item
           label-width="160px"
           label="缴费方式"
@@ -100,6 +123,7 @@
             style="width: 100% !important"
             v-model="payment.paymentPattern"
             placeholder="请选择缴费方式"
+            :disabled="courseViewType == 1"
           >
             <el-option
               v-for="item in paymentPatternTypeOptions"
@@ -163,6 +187,7 @@
         :isDisabled="
           form.leixing === '1' || form.leixing === '2' || paymentType == '0'
         "
+        :courseViewType="courseViewType"
         v-else
       />
     </template>
@@ -203,10 +228,11 @@ import extraClass from "./extra-class";
 import extraClassUser from "./extra-class-user";
 import classrooms from "./classrooms";
 import otherform from "./other";
+import memberSetting from "./member-setting";
 import baseInfoVue from "../../teamDetail/components/baseInfo.vue";
 import merge from "webpack-merge";
 import numeral from "numeral";
-import { organizationCloudTeacherFeeQueryPage } from '@/api/specialSetting'
+import { organizationCloudTeacherFeeQueryPage } from "@/api/specialSetting";
 const paymentTypeFormat = {
   0: "MUSIC_APPLY",
   1: "MUSIC_RENEW",
@@ -231,6 +257,7 @@ export default {
     extraClassUser,
     classrooms,
     otherform,
+    memberSetting,
   },
   data() {
     return {
@@ -257,8 +284,15 @@ export default {
       viewDetail: null,
       organizationCourseUnitPriceSettingsByType: {},
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),
-      cloudFee:'',
-      courseViewType:''
+      cloudFee: "",
+      courseViewType: "",
+      memberForm: {
+        memberRankSettingId: "",
+        memberValidDate: 6,
+        memberPaymentAmount: "",
+        originalMemberPaymentAmount: "",
+        paymentDate: [],
+      },
     };
   },
   computed: {
@@ -380,21 +414,29 @@ export default {
   },
   methods: {
     async init() {
-      let organId = this.baseInfo?.musicGroup?.organId
-       this.courseViewType = this.baseInfo?.musicGroup?.courseViewType
+      let organId = this.baseInfo?.musicGroup?.organId;
+      this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
       // 如果为学员缴费且是乐团缴费则显示云教练的价格
-      if(!this.paymentType&&this.type=='user'&&organId&&(this.courseViewType==2||this.courseViewType==3)){
-        try{
-          const res = await organizationCloudTeacherFeeQueryPage({organId})
-          this.courseViewType==2?this.cloudFee = res.data.rows[0].price:this.cloudFee = res.data.rows[0].plusPrice
-        }catch(e){
-          console.log(e)
+      if (
+        !this.paymentType &&
+        this.type == "user" &&
+        organId &&
+        (this.courseViewType == 2 || this.courseViewType == 3)
+      ) {
+        try {
+          const res = await organizationCloudTeacherFeeQueryPage({ organId });
+          this.courseViewType == 2
+            ? (this.cloudFee = res.data.rows[0].price)
+            : (this.cloudFee = res.data.rows[0].plusPrice);
+        } catch (e) {
+          console.log(e);
         }
         // 获取乐团云教练费用
         // this.cloudFee
       }
       this.getCharges();
       if (this.rowDetail) {
+        console.log("this.rowDetail", this.rowDetail);
         for (const key in paymentTypeFormat) {
           if (paymentTypeFormat.hasOwnProperty(key)) {
             const item = paymentTypeFormat[key];
@@ -403,6 +445,7 @@ export default {
             }
           }
         }
+
         this.$set(
           this.other,
           "isGiveMusicNetwork",
@@ -421,8 +464,8 @@ export default {
           ).filter((item) => {
             return !item.isStudentOptional || this.paymentType !== undefined;
           });
-          this.eclassuser = res.data.musicGroupPaymentCalenderStudentDetails.map(
-            (item) => {
+          this.eclassuser =
+            res.data.musicGroupPaymentCalenderStudentDetails.map((item) => {
               if (this.paymentTypeString === "SPAN_GROUP_CLASS_ADJUST") {
                 return {
                   ...item,
@@ -430,13 +473,35 @@ export default {
                 };
               }
               return item;
-            }
-          );
+            });
           this.$set(
             this.payment,
             "paymentPattern",
             String(this.viewDetail.auditDto?.paymentPattern)
           );
+          // 添加会员缴费信息
+          this.$set(
+            this.memberForm,
+            "memberRankSettingId",
+            this.viewDetail.musicGroupPaymentCalenders[0].memberRankSettingId
+          );
+
+          this.$set(
+            this.memberForm,
+            "memberValidDate",
+            this.viewDetail.musicGroupPaymentCalenders[0].memberValidDate
+          );
+          this.$set(
+            this.memberForm,
+            "memberPaymentAmount",
+            this.viewDetail.musicGroupPaymentCalenders[0].memberPaymentAmount
+          );
+          this.$set(
+            this.memberForm,
+            "originalMemberPaymentAmount",
+            this.viewDetail.musicGroupPaymentCalenders[0]
+              .originalMemberPaymentAmount
+          );
           if (this.$refs.cycle) {
             this.$set(
               this.cycle,
@@ -498,8 +563,8 @@ export default {
     },
     syncAllMoney() {
       if (this.paymentTypeString === "SPAN_GROUP_CLASS_ADJUST") {
-        const money = this.viewDetail?.musicGroupPaymentCalenders[0]
-          .paymentAmount;
+        const money =
+          this.viewDetail?.musicGroupPaymentCalenders[0].paymentAmount;
         this.$set(this.cycle, "paymentAmount", money);
         return money;
       }
@@ -624,13 +689,14 @@ export default {
           }
         });
       }
-      if (this.eclass.length < 1 && this.eclassuser.length < 1) {
+      if (this.eclass.length < 1 && this.eclassuser.length < 1&&this.courseViewType !=1) {
         return this.$message.error("请至少选择一条加课信息");
       }
       if (valided.length === forms.length) {
         const { leixing, ...rest } = {
           ...this.form,
           ...this.other,
+
           paymentPattern: this.payment.paymentPattern,
           musicGroupPaymentDateRangeList: [
             ...this.cycles.map((item) => {
@@ -669,6 +735,7 @@ export default {
         }
         const data = {
           ...rest,
+          ...this.memberForm,
           isGiveMusicNetwork: false,
           studentIds: this.studentIds,
           paymentType:
@@ -682,31 +749,37 @@ export default {
           data.attribute1 = info.attribute1;
         }
 
-        let hasCourseFee = false
+        let hasCourseFee = false;
 
         for (const item of data.musicGroupPaymentCalenderCourseSettingsList) {
           if (item.courseCurrentPrice > 0 || item.isStudentOptional == true) {
-            hasCourseFee = true
-            break
+            hasCourseFee = true;
+            break;
           }
         }
         // console.log(this.baseInfo?.musicGroup?.courseViewType, this.paymentType, hasCourseFee, this.type)
-        if ((this.baseInfo?.musicGroup?.courseViewType == 2 || this.baseInfo?.musicGroup?.courseViewType == 3) && this.paymentType == 0 && hasCourseFee && this.type === 'user') {
-          this.$message.error('报名缴费云教练收费模式课程费用不得大于0且不可选')
-          return
+        if (
+          (this.baseInfo?.musicGroup?.courseViewType == 2 ||
+            this.baseInfo?.musicGroup?.courseViewType == 3) &&
+          this.paymentType == 0 &&
+          hasCourseFee &&
+          this.type === "user"
+        ) {
+          this.$message.error(
+            "报名缴费云教练收费模式课程费用不得大于0且不可选"
+          );
+          return;
         }
 
         if (!this.rowDetail?.batchNo) {
-
-
           try {
             const res = await musicGroupPaymentCalenderAdd(data);
-                 if (this.$route.query.team_status == "PRE_BUILD_FEE") {
-                 this.$message.success("创建成功");
-                  this.$store.dispatch("delVisitedViews", this.$route);
-                  this.$router.push({
-                    path: "/teamList",
-                  });
+            if (this.$route.query.team_status == "PRE_BUILD_FEE") {
+              this.$message.success("创建成功");
+              this.$store.dispatch("delVisitedViews", this.$route);
+              this.$router.push({
+                path: "/teamList",
+              });
             }
 
             this.$listeners.close();
@@ -718,7 +791,8 @@ export default {
           try {
             data.batchNo = this.rowDetail.batchNo;
             // 缴费类型无法修改,按照之前覆盖
-            data.paymentType = this.viewDetail.musicGroupPaymentCalenders[0]?.paymentType;
+            data.paymentType =
+              this.viewDetail.musicGroupPaymentCalenders[0]?.paymentType;
             const res = await musicGroupPaymentCalenderDetailBatchUpdate(data);
             this.$listeners.close();
             this.$listeners.submited(res.data);

+ 24 - 22
src/views/teamDetail/components/memberClassList.vue

@@ -339,7 +339,7 @@ export default {
           this.teacherList = res.data;
         }
       });
-      this.getList();
+     await this.getList();
     },
     changeMixClass(val) {
       // 根据合奏班id获取合奏班下的所有声部班
@@ -348,24 +348,25 @@ export default {
       this.activeMixClass = val;
     },
     getList(val) {
-      getAllSignClassandTeacher({ musicGroupId: this.teamid, type: val }).then(
-        (res) => {
-          if (res.code == 200) {
-            this.activeSingleList = [];
-            res.data.map((item) => {
-              if (
-                item.type != "HIGH" &&
-                item.type != "DEMO" &&
-                item.type != "HIGH_ONLINE" &&
-                item.type != "MUSIC_NETWORK"
-              ) {
-                this.activeSingleList.push(item);
-              }
-            });
-            // this.topForm.count = this.activeSingleList.length
-          }
+      return getAllSignClassandTeacher({
+        musicGroupId: this.teamid,
+        type: val,
+      }).then((res) => {
+        if (res.code == 200) {
+          this.activeSingleList = [];
+          res.data.map((item) => {
+            if (
+              item.type != "HIGH" &&
+              item.type != "DEMO" &&
+              item.type != "HIGH_ONLINE" &&
+              item.type != "MUSIC_NETWORK"
+            ) {
+              this.activeSingleList.push(item);
+            }
+          });
+          // this.topForm.count = this.activeSingleList.length
         }
-      );
+      });
     },
     goBack() {
       this.$router.push({
@@ -464,7 +465,8 @@ export default {
                 this.musicGroupSchoolTermCourseDetailId,
             });
             this.$message.success("取消成功");
-            this.getList();
+             this.getList();
+
           } catch (e) {}
           // musicGroupSchoolTermCourseDetailId
         })
@@ -500,7 +502,7 @@ export default {
                 this.musicGroupSchoolTermCourseDetailId,
             });
             this.$message.success("提交成功");
-            this.getList();
+            await this.getList();
             this.goBack();
           } catch (e) {}
           //
@@ -532,8 +534,8 @@ export default {
             // musicGroupSchoolTermCourseDetailId
           })
           .catch(() => {});
-      }else{
-        next()
+      } else {
+        next();
       }
     });
   },

+ 1 - 1
src/views/teamDetail/components/modals/create-user-pay.vue

@@ -508,7 +508,7 @@ export default {
   display: flex;
   flex-direction: row;
   align-items: center;
-  justify-content: space-between;
+  justify-content: flex-end;
   // text-align: right;
   p {
     font-size: 16px;