Sfoglia il codice sorgente

提交 排课跳节假日 学校缴费撤回

1
mo 4 anni fa
parent
commit
341671ca9f

+ 1 - 1
src/api/user.js

@@ -40,4 +40,4 @@ export function getRefreshToken (data) {
     method: 'post',
     data: qs.stringify(data)
   })
-}
+}

+ 23 - 9
src/views/resetTeaming/components/resetPayList.vue

@@ -178,11 +178,15 @@
                   >修改</el-button
                 >
               </auth>
-              <auth auths="musicGroupPaymentCalender/update/4313">
+              <auth auths="musicGroupPaymentCalender/revoke">
                 <el-button
                   type="text"
-                  v-if="teamStatus && scope.row.auditStatus === 'AUDITING'&&scope.row.paymentType != 'ADD_STUDENT' &&
-                    scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'"
+                  v-if="
+                    (team_status == 'FEE_AUDIT' || team_status == 'PROGRESS') &&
+                    scope.row.auditStatus === 'AUDITING' &&
+                    scope.row.paymentType != 'ADD_STUDENT' &&
+                    scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
+                  "
                   @click="revoke(scope.row)"
                   >撤回</el-button
                 >
@@ -536,7 +540,6 @@ export default {
   },
   data() {
     return {
-      team_status: "",
       musicGroupStu: [],
       payFormType: "user",
       userVisible: false,
@@ -619,27 +622,33 @@ export default {
     },
     teamStatus() {
       // let type = this.$route.query.type;
-      let team_status = this.$route.query.team_status;
-      return team_status == "PRE_BUILD_FEE" || team_status == "PROGRESS";
+      return this.team_status == "PRE_BUILD_FEE" || this.team_status == "PROGRESS";
     },
+    team_status(){
+      return this.$route.query.team_status
+    }
   },
   // activated () {
   //   this.init();
   // },
   methods: {
     async init() {
-      this.team_status = this.$route.query.team_status;
+      // this.team_status = this.$route.query.team_status;
       try {
         const res = await getMusicGroupStu({
           musicGroupId: this.$route.query.id,
         });
       } catch (error) {}
+      this.getTeamInfo()
+      this.getList();
+    },
+    getTeamInfo() {
       getTeamBaseInfo({ musicGroupId: this.$route.query.id }).then((res) => {
         if (res.code == 200) {
           this.baseInfo = res.data;
+          this.$emit("getBaseInfo",this.baseInfo);
         }
       });
-      this.getList();
     },
     newUserPay() {
       // 判断一下乐团是课程缴费 还是会员缴费 且乐团状态为创建缴费中
@@ -678,6 +687,8 @@ export default {
           this.tableList = res.data.rows;
         }
       });
+
+      // 请求乐团状态
     },
     paymentPatternChange(val) {
       // if (val === 2) {
@@ -733,8 +744,8 @@ export default {
         });
         this.$message.success("取消审批成功");
         this.getList();
+        this.getTeamInfo()
       } catch {}
-      console.log(row);
     },
     changeActive(val) {
       if (this.$listeners.changeActive) {
@@ -766,6 +777,7 @@ export default {
           delMusicGroupPaymentCalender({ id }).then((res) => {
             if (res.code == 200) {
               this.$message.success("删除成功");
+
               this.getList();
             }
           });
@@ -856,6 +868,7 @@ export default {
         if (res.code == 200) {
           this.$message.success("修改成功");
           this.payVisible = false;
+          this.getTeamInfo()
           this.getList();
         }
       });
@@ -906,6 +919,7 @@ export default {
     async payedSubmited(data) {
       try {
         await this.getList();
+        this.getTeamInfo()
         // if (!this.isNewGropu) {
         //   this.chioseStudentVisible = true;
         //   if (data) {

+ 54 - 10
src/views/resetTeaming/components/resetPayListSchool.vue

@@ -159,6 +159,19 @@
                 v-permission="'musicGroupPaymentCalenderDetail/batchAdd/4360'"
                 >添加学员</el-button
               >
+              <auth auths="musicGroupPaymentCalender/revoke">
+                <el-button
+                  type="text"
+                  v-if="
+                    (team_status == 'FEE_AUDIT' || team_status == 'PROGRESS') &&
+                    scope.row.auditStatus === 'AUDITING' &&
+                    scope.row.paymentType != 'ADD_STUDENT' &&
+                    scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
+                  "
+                  @click="revoke(scope.row)"
+                  >撤回</el-button
+                >
+              </auth>
               <el-button
                 type="text"
                 v-if="teamStatus && scope.row.auditStatus === 'REJECT'"
@@ -471,7 +484,7 @@ import { objectToOptions } from "@/utils";
 import { payOrderTypeList } from "@/utils/searchArray";
 import { getTeamBaseInfo } from "@/api/buildTeam";
 export default {
-  props: [ "isNewGropu"],
+  props: ["isNewGropu"],
   components: {
     pagination,
     setStudentFee,
@@ -537,7 +550,7 @@ export default {
       musicGroupPaymentCalenderId: "",
       payOrderTypeLists: payOrderTypeList,
       getMoneyVisible: false,
-      baseInfo:null
+      baseInfo: null,
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -566,27 +579,33 @@ export default {
     },
     teamStatus() {
       // let type = this.$route.query.type;
-      let team_status = this.$route.query.team_status;
+      let team_status = this.team_status;
       return team_status == "PRE_BUILD_FEE" || team_status == "PROGRESS";
     },
+    team_status() {
+      return this.$route.query.team_status;
+    },
   },
   // activated () {
   //   this.init();
   // },
   methods: {
     async init() {
-      this.team_status = this.$route.query.team_status;
       try {
         const res = await getMusicGroupStu({
           musicGroupId: this.$route.query.id,
         });
       } catch (error) {}
-           getTeamBaseInfo({ musicGroupId: this.$route.query.id }).then((res) => {
+      this.getTeamInfo();
+      this.getList();
+    },
+    getTeamInfo() {
+      getTeamBaseInfo({ musicGroupId: this.$route.query.id }).then((res) => {
         if (res.code == 200) {
           this.baseInfo = res.data;
+          this.$emit("getBaseInfo", this.baseInfo);
         }
       });
-      this.getList();
     },
     newUserPay() {
       this.payFormType = "user";
@@ -595,10 +614,18 @@ export default {
       this.userVisible = true;
     },
     newSchoolPay() {
-      this.payFormType = "school";
-      this.isNew = true;
-      this.activeRow = null;
-      this.userVisible = true;
+      if (
+        this.baseInfo?.musicGroup?.courseViewType == 1 &&
+        this.team_status == "PRE_BUILD_FEE"
+      ) {
+        this.$message.error('会员缴费乐团无法创建学校缴费')
+        return
+      } else {
+        this.payFormType = "school";
+        this.isNew = true;
+        this.activeRow = null;
+        this.userVisible = true;
+      }
     },
     getList() {
       let musicGroupId = this.$route.query.id;
@@ -765,6 +792,7 @@ export default {
         if (res.code == 200) {
           this.$message.success("修改成功");
           this.payVisible = false;
+          this.getTeamInfo();
           this.getList();
         }
       });
@@ -815,6 +843,7 @@ export default {
     async payedSubmited(data) {
       try {
         await this.getList();
+        this.getTeamInfo();
         // if (!this.isNewGropu) {
         //   this.chioseStudentVisible = true;
         //   if (data) {
@@ -834,6 +863,21 @@ export default {
       this.getMoneyVisible = false;
       this.getList();
     },
+    async revoke(row) {
+      try {
+        await this.$confirm("是否撤回此缴费项目的审批?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const res = await revokeMusicGroupPaymentCalender({
+          batchNo: row.batchNo,
+        });
+        this.$message.success("取消审批成功");
+        this.getList();
+        this.getTeamInfo();
+      } catch {}
+    },
   },
   watch: {
     chioseStudentVisible() {

+ 33 - 9
src/views/resetTeaming/index.vue

@@ -4,11 +4,21 @@
       <el-page-header @back="onCancel" :content="teamName"></el-page-header>
     </h2>
     <div class="m-core">
-      <el-popover placement="left" width="1000" trigger="hover" ref='popover' :open-delay="500">
+      <el-popover
+        placement="left"
+        width="1000"
+        trigger="hover"
+        ref="popover"
+        :open-delay="500"
+      >
         <teamJournal :teamid="teamid" />
         <!--  v-if="team_status" -->
-        <p slot="reference" class="msg"  :class="team_status"  >
-          <img :src="stepImgs[team_status]" alt="" v-if="stepImgs[team_status]"/>
+        <p slot="reference" class="msg" :class="team_status">
+          <img
+            :src="stepImgs[team_status]"
+            alt=""
+            v-if="stepImgs[team_status]"
+          />
           {{ musicGroupType[team_status] }}
         </p>
       </el-popover>
@@ -71,7 +81,11 @@
           name="3"
           :disabled="!teamid"
         >
-          <resetPayList v-if="activeIndex == '3'" @changeActive="handleClick" />
+          <resetPayList
+            v-if="activeIndex == '3'"
+            @changeActive="handleClick"
+            @getBaseInfo="getBaseInfo"
+          />
         </el-tab-pane>
         <el-tab-pane
           label="学校缴费设置"
@@ -83,6 +97,7 @@
           <resetPayListSchool
             v-if="activeIndex == '6'"
             @changeActive="handleClick"
+            @getBaseInfo="getBaseInfo"
           />
         </el-tab-pane>
         <el-tab-pane
@@ -186,7 +201,7 @@ import forecastName from "@/views/teamBuild/forecastName";
 import musicOrder from "@/views/teamDetail/teamDetailedList";
 import teamJournal from "@/views/teamBuild/components/teamJournal";
 import teamRemainTime from "@/views/teamBuild/components/teamRemainTime";
-
+import merge from "webpack-merge";
 import { permission } from "@/utils/directivePage";
 import { getTeamBaseInfo } from "@/api/buildTeam";
 import { musicGroupType } from "@/constant";
@@ -296,6 +311,15 @@ export default {
           this.teamName = baseInfo?.musicGroup?.name;
         }
         this.musicGroupInfo = baseInfo?.musicGroup;
+        // 在这里刷新一下 乐团状态 改变url
+        //  query: merge(this.$route.query, {
+        //                     type: "teamDraft",
+        //                     id: res.data,
+        //                     team_status: "DRAFT",
+        //                   }),
+        this.$router.push({ query: merge(this.$route.query, {...this.$route.query,team_status:this.musicGroupInfo.status}) });
+         this.team_status = this.$route.query.team_status;
+        // console.log(this.musicGroupInfo.status);
       } else {
         this.__init();
       }
@@ -335,10 +359,10 @@ export default {
       });
       return p;
     },
-    setpopover(){
-      console.log('调整位置')
-      this.$refs.popover.updatePopper()
-    }
+    setpopover() {
+      console.log("调整位置");
+      this.$refs.popover.updatePopper();
+    },
   },
   watch: {
     //  async activeIndex(val){

+ 1 - 2
src/views/teamDetail/components/modals/classroom-setting-item.vue

@@ -405,7 +405,6 @@ export default {
       }
       if (val) {
         let activeTime = val * Math.max(item.row.expectCourseNum || 0, 0);
-        console.log("activeTime", activeTime);
         if (this.endSchoolTerm) {
           this.$set(
             item.row,
@@ -464,7 +463,6 @@ export default {
       return num;
     },
     updateEndTime(row) {
-      console.log(row);
       if (row.dayOfWeek && row.startDate && typeof row.holiday === "boolean") {
         // const num = this.addData(row.startDate, row.dayOfWeek)
         // const week = dayjs(row.startDate).get('day') == 0 ? 7 : dayjs(row.startDate).get('day')
@@ -473,6 +471,7 @@ export default {
         let end = dayjs(row.startDate);
         // console.log(selectWeek, end.get('day'))
         if (row.holiday) {
+          // exp >0 还有未排的课
           while (exp > 0) {
             if (
               selectWeek == end.get("day") &&

+ 4 - 3
src/views/teamDetail/components/modals/member-class-setting.vue

@@ -110,6 +110,7 @@ import { isEmpty } from "lodash";
 import { preCourseSchedule } from "@/api/buildTeam";
 import { getClassAllStudent } from "@/api/studentManager";
 import { queryByOrganIdAndCourseType } from "@/views/resetTeaming/api";
+import { sysConfigList } from "@/api/generalSettings";
 import viewStudentList from "@/views/teamDetail/componentClass/student-list";
 const formatClassGroupTeacherMapperList = (core, ass) => {
   const list = [];
@@ -199,7 +200,9 @@ export default {
           group: "holiday",
         });
         this.holidays = JSON.parse(res.data[0].paranValue);
-      } catch (error) {}
+      } catch (error) {
+        console.log(error)
+      }
     },
     setCourseTypeListByName() {
       const courseTypeListByName = {};
@@ -210,7 +213,6 @@ export default {
         }
       }
       this.courseTypeListByName = courseTypeListByName;
-      console.log(this.courseTypeListByName);
     },
     async formatClasss() {
       this.coreid = "";
@@ -256,7 +258,6 @@ export default {
       // console.log(classs,this.courseTypeList[0].value)
       let key = this.courseTypeList[0].value;
       this.allClasss = { ...classs };
-      console.log("allClasss", this.allClasss);
       let onlyClass = { [key]: classs[this.courseTypeList[0].value] };
       this.$set(this.form, "classs", onlyClass);
     },