瀏覽代碼

修改学员调整问题,隐藏二维码

wolyshaw 4 年之前
父節點
當前提交
3da4d80ace

+ 2 - 2
src/views/resetTeaming/components/resetPayList.vue

@@ -129,9 +129,9 @@
                          v-permission="'musicGroupPaymentCalender/update'"
                          @click="resetPay(scope.row)">修改</el-button>
 
-              <el-button type="text"
+              <!-- <el-button type="text"
                          v-if="!isNewGropu&&teamStatus"
-                         @click="onCreateQRCode(scope.row)">续费二维码</el-button>
+                         @click="onCreateQRCode(scope.row)">续费二维码</el-button> -->
               <el-button type="text"
                          v-if="isNewGropu"
                          v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"

+ 17 - 12
src/views/teamBuild/teamSeting/components/setClassV2.vue

@@ -262,9 +262,10 @@
         :classGroupId="activeClass"
         :isOnlyChangeUser="true"
         :activeType="activeType"
+        type="change"
         @changeActiveChioseSound="changeActiveChioseSound"
         @searchStudent="searchStudent"
-        @submited="getList"
+        @submited="submited"
         @close="studentVisible = false"
       />
       <!-- <div class="studentMask">
@@ -979,11 +980,11 @@ export default {
         }
       });
     },
-    addSomeStudent () {
+    addSomeStudent (arr) {
       // 获取勾选的学生
-      let arr = this.chioseStudent.map(item => {
-        return item.userId;
-      });
+      // let arr = this.chioseStudent.map(item => {
+      //   return item.userId;
+      // });
       if (arr.length <= 0) {
         this.$message.error("至少添加一名学员");
         return;
@@ -1096,15 +1097,19 @@ export default {
     searchStudent (val) {
       this.getNoClassStudent(this.newClassForm.type, val);
     },
-    createMusiceClass () {
+    submited(data) {
+      if (!this.isNewClass) {
+        this.addSomeStudent(data?.seleched || [])
+        return
+      } else {
+        this.createMusiceClass(data?.seleched || [])
+      }
+    },
+    createMusiceClass (uids) {
       // console.log(this.activeListStudent)
       let userIds = null;
-      if (this.activeListStudent.length > 0) {
-        userIds = this.activeListStudent
-          .map(item => {
-            return item.userId;
-          })
-          .join(",");
+      if (uids.length > 0) {
+        userIds = uids.join(",");
       }
       // 创建班级
       let obj = {};

+ 6 - 2
src/views/teamDetail/components/modals/select-student.vue

@@ -74,7 +74,7 @@ import { genderType } from "@/constant";
 import { updateClassGroupStudents } from '../../api'
 import { uniqBy } from 'lodash'
 export default {
-  props: ["studentList", "soundList", "activeType", 'activeListStudent', 'isOnlyChangeUser', 'classGroupId'],
+  props: ["studentList", "soundList", "activeType", 'activeListStudent', 'isOnlyChangeUser', 'classGroupId', 'type'],
   computed: {
     data() {
       return uniqBy([...this.studentList, ...this.activeListStudent], 'userId').map((item) => ({
@@ -128,6 +128,7 @@ export default {
       );
     },
     change(val) {
+      this.seleched = []
       this.$listeners.changeActiveChioseSound(val)
       this.$listeners.searchStudent()
     },
@@ -140,7 +141,7 @@ export default {
       }
       this.$refs.form.validate(async valid => {
         if (valid) {
-          if (this.isOnlyChangeUser) {
+          if (this.isOnlyChangeUser && this.type !== 'change') {
             try {
               await updateClassGroupStudents({
                 classGroupId: this.classGroupId,
@@ -191,6 +192,9 @@ export default {
     display: none;
   }
 }
+/deep/ .el-checkbox-group{
+  padding-bottom: 40px;
+}
 /deep/ .line {
   width: 220px;
   display: flex;