瀏覽代碼

12/02 17:33

11
mo 4 年之前
父節點
當前提交
0122fd1cac

+ 1 - 0
debug.log

@@ -0,0 +1 @@
+[1202/094138.882:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

+ 21 - 0
src/api/buildTeam.js

@@ -1395,3 +1395,24 @@ export function courseMerge (data) {
     data: qs.stringify(data)
   })
 }
+
+
+// 查询班级剩余课次
+export function getClassGroupSubCourseNum (data) {
+  return request2({
+    url: api + `/classGroup/classGroupSubCourseNum`,
+    method: 'GET',
+    params: data,
+    data: {},
+  })
+}
+// 生成默认缴费信息
+export function getDefaultPaymentCalender (data) {
+  return request2({
+    url: api + `/classGroup/getDefaultPaymentCalender`,
+    method: 'post',
+    params:{},
+    data
+  })
+}
+

+ 4 - 2
src/views/resetTeaming/index.vue

@@ -46,7 +46,7 @@
         <el-tab-pane label="班级调整"
                      v-if="permission('/resetTeaming/resetClass')"
                      name="5">
-          <resetClass v-if="activeIndex == 5" />
+          <resetClass v-if="activeIndex == 5"  :musicGroupInfo='musicGroupInfo'/>
         </el-tab-pane>
         <!-- <el-tab-pane label="新增排课"
                      v-if="permission('/resetTeaming/coursePlan')"
@@ -92,7 +92,8 @@ export default {
       Fsearch: null,
       Frules: null,
       name: null,
-      teamName: '乐团修改'
+      teamName: '乐团修改',
+      musicGroupInfo:null
     }
   },
   created () {
@@ -131,6 +132,7 @@ export default {
     getBaseInfo (baseInfo) {
       this.baseInfo = baseInfo
       this.teamName = baseInfo.musicGroup.name
+      this.musicGroupInfo = baseInfo.musicGroup
     },
     handleClick (val) {
       this.activeIndex = val.name

+ 162 - 8
src/views/teamDetail/components/modals/class-pay-list-item.vue

@@ -1,13 +1,42 @@
 <template>
   <div>
-    <el-form-item label="班级" style="padding-left: 20px">
-      <div></div>
-      <a @click="lookStudentList" class="studentTitle">学员列表>></a>
-    </el-form-item>
+    <el-alert
+      :title="'班级' + (index + 1)"
+      type="info"
+      :closable="false"
+      class="alert"
+    >
+    </el-alert>
+    <el-row>
+      <el-col :span="12">
+        <p class="classTitle">
+          班级: <span>{{ className }}</span>
+        </p>
+      </el-col>
+      <el-col :span="12">
+        <div class="rightBtn">
+          <el-button
+            type="text"
+            @click="studentListModalVisible = true"
+            :disabled="!item.classId"
+            class="studentTitle"
+            >学员列表>></el-button
+          >
+        </div></el-col
+      >
+    </el-row>
     <div class="infomsg">
-      <div class="left">
+      <div class="left" v-if="Object.keys(item.courseList).length > 0">
         剩余课时:
-        <p>合奏课:<span>1</span>节</p>
+        <div v-for="(val, key) in item.courseList" :key="key">
+          <p style="margin-right: 5px">
+            {{ key | courseTypeFormat }}:<span>{{ val }}</span
+            >节
+          </p>
+        </div>
+      </div>
+      <div class="left" v-else>
+        <div>暂无剩余课时</div>
       </div>
       <div class="right">
         已选学员:
@@ -17,14 +46,139 @@
         </p>
       </div>
     </div>
+    <extraClass
+      v-if="Object.keys(payItem).length > 0"
+      :form="corusePayList"
+      class="extraClass"
+      ref="eclass"
+      :isUserType="true"
+      :isCommon="false"
+      :isDisabled="true"
+      :courseUnitPriceSettingsByType="courseTypesByType"
+      @priceChange="priceChange"
+      @moneyChange="syncAllMoney"
+    />
+    <paymentCycle
+      v-if="Object.keys(payItem).length > 0"
+      ref="cycles"
+      :form="item"
+      :isUserType="false"
+      :isCommon="true"
+      :isDisabled="true"
+    />
+    <p v-if="!(Object.keys(payItem).length > 0)" class="noMore">
+      无需增加缴费周期
+    </p>
+    <el-dialog
+      title="学员列表"
+      width="700px"
+      :visible.sync="studentListModalVisible"
+      append-to-body
+      destroy-on-close
+    >
+      <viewStudentList
+        :list="item.studentList"
+        v-if="studentListModalVisible"
+        :isChiose="false"
+        @close="studentListModalVisible = false"
+      />
+    </el-dialog>
   </div>
 </template>
 <script>
+import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
+import extraClass from "../../../resetTeaming/modals/extra-class";
+import viewStudentList from "./view-student-list";
 export default {
+  props: ["item", "index", "payInfo",'courseTypesByType'],
+  components: { viewStudentList, paymentCycle, extraClass },
   data() {
-    return {};
+    return {
+      corusePayList: [],
+      eclass: [],
+      className: "",
+      studentListModalVisible: false,
+      isNoCourse: false,
+      payItem: {},
+    };
+  },
+  mounted() {
+    // console.log(this.item);
+    let idList = this.item?.classList?.map((classes) => {
+      if (classes.id == this.item.classId) {
+        this.className = classes.name;
+      }
+      return classes.id;
+    });
+    for (let key in this.payInfo) {
+      if (this.payInfo.hasOwnProperty(key)) {
+        if (this.item.classId == key) {
+          this.payItem = this.payInfo[key];
+          console.log(this.payItem);
+          break;
+        }
+      }
+    }
+    if (Object.keys(this.payItem).length > 0) {
+      this.corusePayList = [];
+      for (let key in this.payItem) {
+        if (this.payItem.hasOwnProperty(key)) {
+          this.corusePayList.push(this.payItem[key]);
+        }
+      }
+    }
+    console.log(this.corusePayList)
+  },
+  methods: {
+    priceChange() {},
+    moneyChange() {},
+    syncAllMoney() {},
   },
 };
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
+.infomsg {
+  background-color: #f5faf9;
+  height: 34px;
+  line-height: 34px;
+  padding: 0 25px;
+  color: #333;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  margin-bottom: 20px;
+  div {
+    display: flex;
+    flex-direction: row;
+    p {
+      color: #1a1a1a;
+      font-weight: bold;
+      span {
+        color: #3b7f7a;
+      }
+    }
+  }
+}
+.classTitle {
+  line-height: 40px;
+  font-size: 16px;
+  padding: 0 25px;
+  color: #333;
+  span {
+    font-weight: bold;
+  }
+}
+.rightBtn {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-end;
+  padding: 0 25px;
+}
+.extraClass {
+  margin-bottom: 20px;
+}
+.noMore {
+  text-align: center;
+  margin: 60px;
+}
 </style>

+ 33 - 7
src/views/teamDetail/components/modals/class-pay-list.vue

@@ -1,26 +1,52 @@
 <template>
   <div>
-
+    <classPayListItem
+    :payInfo="payInfo"
+    :courseTypesByType='courseTypesByType'
+      v-for="(item, index) in form.classList"
+      :key="index"
+      :item="item"
+      :index="index"
+    />
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="close">上一步</el-button>
+      <el-button type="primary" @click="gotoLast">下一步</el-button>
+    </div>
+    <div style="clear: both"></div>
   </div>
 </template>
 <script>
-import classPayList from'./class-pay-list-item'
+import { getDefaultPaymentCalender } from "@/api/buildTeam";
+import classPayListItem from "./class-pay-list-item";
 export default {
-    components:{
-        classPayList
-    },
+  props: ["form",'payInfo','courseTypesByType'],
+  components: {
+    classPayListItem,
+  },
   data() {
     return {};
   },
+   mounted() {
+    // 获取缴费信息
+
+   
+  },
+  methods: {
+    close() {
+      this.$emit("close");
+    },
+    gotoLast() {},
+  },
 };
 </script>
 <style lang="scss" scoped>
-
 .studentTitle {
   width: 120px !important;
   text-align: right;
   display: inline-block;
   color: #409eff;
 }
-
+.dialog-footer {
+  float: right;
+}
 </style>

+ 51 - 26
src/views/teamDetail/components/modals/classList-group.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-form :model="form" ref='form'>
+    <el-form :model="form" ref="form">
       <classListItem
         v-for="(item, index) in form.classList"
         :key="index"
@@ -21,13 +21,29 @@
       :disabled="form.classList.length >= classList.length"
       >添加班级</el-button
     >
+    <el-dialog
+      :visible.sync="showSecondVisable"
+      title="缴费信息设置"
+      append-to-body
+      width="800px"
+    >
+      <classPayList
+      :courseTypesByType='courseTypesByType'
+        :form="form"
+        :payInfo="payInfo"
+        @close="showSecondVisable = false"
+        v-if="showSecondVisable"
+      />
+    </el-dialog>
   </div>
 </template>
 <script>
 import classListItem from "./classList-item";
+import classPayList from './class-pay-list' 
+import { getDefaultPaymentCalender } from "@/api/buildTeam";
 export default {
-  props: ["classList"],
-  components: { classListItem },
+  props: ["classList",'courseTypesByType'],
+  components: { classListItem,classPayList },
   data() {
     return {
       form: {
@@ -35,11 +51,14 @@ export default {
           {
             classId: "",
             studentList: [],
-            courseList: [],
+            courseList: {},
             index: "",
+            classList:this.classList
           },
         ],
+    
       },
+          showSecondVisable:false
     };
   },
   methods: {
@@ -47,39 +66,45 @@ export default {
       this.form.classList.push({
         classId: "",
         studentList: [],
-        courseList: [],
+        courseList:{},
         index: "",
+         classList:this.classList
       });
     },
     deteleClass(index) {
       this.form.classList.splice(index, 1);
     },
-    gotoSecond(){
-      this.$refs.form.validate(res=>{
-        if(res){
-          let flag = false
-          this.form.classList.forEach(item=>{
-            if(item.studentList.length <=0){
-              flag = true
+    gotoSecond() {
+      this.$refs.form.validate( async (res) => {
+        if (res) {
+          let flag = false;
+          this.form.classList.forEach((item) => {
+            if (item.studentList.length <= 0) {
+              flag = true;
             }
-          })
-          if(flag){
-            this.$message.error('每个班级至少勾选一名学员')
-            return
+          });
+          if (flag) {
+            this.$message.error("每个班级至少勾选一名学员");
+            return;
           }
-          this.$store.dispatch('setClassList',this.form.classList)
-          console.log('跳转到第二页')
-          console.log(this.$store.getters.reactClassStudentList)
-        
-        
+              let classIdList = this.form.classList.map((item) => {
+      return item.classId;
+    });
+    try {
+       console.log(classIdList);
+      let result = await getDefaultPaymentCalender(classIdList)
+      this.payInfo = result.data
+         this.showSecondVisable = true;
+    } catch {}
+         
+       
         }
-      })
-      
-    }
-   
+      });
+    },
+  
+ 
   },
 };
 </script>
 <style lang="scss" scoped>
-
 </style>

+ 62 - 46
src/views/teamDetail/components/modals/classList-item.vue

@@ -28,65 +28,76 @@
           :disabled="isDisabled(item)"
         ></el-option>
       </el-select>
-      <el-button type="text"  @click="lookStudentList" :disabled="!item.classId" class="studentTitle">学员列表>></el-button>
+      <el-button
+        type="text"
+        @click="lookStudentList"
+        :disabled="!item.classId"
+        class="studentTitle"
+        >学员列表>></el-button
+      >
     </el-form-item>
-    
+
     <div class="infomsg">
-      <div class="left">
-        剩余课时:
-        <p>合奏课:<span>1</span>节</p>
+      <div class="left" v-if="!isNoCourse">
+           剩余课时:
+        <div v-for="(val,key) in item.courseList" :key='key'>
+          <p style="margin-right:5px">{{key|courseTypeFormat}}:<span>{{val}}</span>节</p>
+        </div>
+      </div>
+      <div class="left" v-else>
+        <div>暂无剩余课时</div>
       </div>
       <div class="right">
         已选学员:
-        <p><span>{{item.studentList.length}}</span>人</p>
+        <p>
+          <span>{{ item.studentList.length }}</span
+          >人
+        </p>
       </div>
-    
     </div>
-      <!-- <extraClass  :form="eclass"
-      class="extraClass"
-      ref="eclass"
-      :isUserType="true"
-      :isCommon="false"
-      :isDisabled="true"
-      :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
-      @priceChange="priceChange"
-      @moneyChange="syncAllMoney"/>
-      <paymentCycle ref="cycles"
-          :form="item"
-          :isUserType="false"
-          :isCommon="true"
-          :isDisabled="true"/> -->
-    <el-dialog title="学员列表"
-         width="700px"
-               :visible.sync="studentListModalVisible"
-               append-to-body
-               destroy-on-close>
-      <viewStudentList :list="studentList" :chioseList='item.studentList' v-if="studentListModalVisible"
-      :isChiose='true'
-                       @close="closeStudentView" /> 
+
+    <el-dialog
+      title="学员列表"
+      width="700px"
+      :visible.sync="studentListModalVisible"
+      append-to-body
+      destroy-on-close
+    >
+      <viewStudentList
+        :list="studentList"
+        :chioseList="item.studentList"
+        v-if="studentListModalVisible"
+        :isChiose="true"
+        @close="closeStudentView"
+      />
     </el-dialog>
   </div>
 </template>
 <script>
 import { getClassAllStudent } from "@/api/studentManager";
-import viewStudentList from './view-student-list'
+import { getClassGroupSubCourseNum } from "@/api/buildTeam";
+import viewStudentList from "./view-student-list";
 import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
 import extraClass from "../../../resetTeaming/modals/extra-class";
 export default {
   props: ["item", "index", "classList", "form"],
-  components:{viewStudentList,paymentCycle,extraClass},
+  components: { viewStudentList, paymentCycle, extraClass },
   data() {
     return {
       studentList: [],
-      studentListModalVisible:false,
-      organizationCourseUnitPriceSettingsByType:[],
-      eclass:[],
-
+      studentListModalVisible: false,
+      organizationCourseUnitPriceSettingsByType: [],
+      eclass: [],
+      isNoCourse: false,
     };
   },
   methods: {
-    changeValue(val) {
-      console.log(val);
+    async changeValue(val) {
+      this.item.studentList = []
+      try {
+        let reset = await getClassGroupSubCourseNum({ classGroupId: val });
+        this.setClassCourse(reset.data);
+      } catch {}
     },
     deteleClass() {
       this.$emit("deteleClass", this.index);
@@ -117,16 +128,24 @@ export default {
               subjectNames: item.subjectName,
             };
           });
-          this.studentListModalVisible = true
+          this.studentListModalVisible = true;
         }
       });
     },
-    closeStudentView(list){
-      this.item.studentList = list
-      this.studentListModalVisible = false
+    closeStudentView(list) {
+      this.item.studentList = list;
+      this.studentListModalVisible = false;
     },
-    priceChange(){},
-    syncAllMoney(){},
+    setClassCourse(data) {
+      if (Object.keys(data).length > 0) {
+
+        this.item.courseList = data;
+      } else {
+        this.isNoCourse = true;
+      }
+    },
+    priceChange() {},
+    syncAllMoney() {},
   },
 };
 </script>
@@ -167,7 +186,4 @@ export default {
   flex-direction: row;
   justify-content: flex-end;
 }
-.extraClass {
-  margin-bottom: 20px;
-}
 </style>

+ 2 - 2
src/views/teamDetail/components/modals/student-reset-view.vue

@@ -6,7 +6,7 @@
               class="alert"
               show-icon>
     </el-alert>
-    <classListGroup :classList="classList" ref='classListGroup'/>
+    <classListGroup :classList="classList" ref='classListGroup' :courseTypesByType='courseTypesByType'/>
      <div slot="footer" class="dialog-footer">
       <el-button @click="close">取 消</el-button>
       <el-button  type="primary" @click="gotoSecond">下一步</el-button>
@@ -17,7 +17,7 @@
 <script>
 import classListGroup from './classList-group'
 export default {
-  props: ['classList'],
+  props: ['classList','courseTypesByType'],
   components: {
     classListGroup
   },

+ 9 - 4
src/views/teamDetail/components/modals/view-student-list.vue

@@ -45,14 +45,14 @@
       ></el-table-column>
       <el-table-column
         prop="subjectNames"
-        align="center"
-        width="120"
+        align="center"       
         label="专业"
       ></el-table-column>
     </el-table>
     <div slot="footer" class="dialog-footer">
       <el-button type="primary" @click="$listeners.close(selectList)">确 定</el-button>
     </div>
+    <div style="clear: both;"></div>
   </div>
 </template>
 <script>
@@ -63,7 +63,8 @@ export default {
       selectList:this.chioseList
     }
   },mounted(){
-    let idList = this.chioseList.map((item,index)=>{
+    if(this.chioseList){
+          let idList = this.chioseList.map((item,index)=>{
       return item.userId
     })
     this.list.forEach((item,index)=>{
@@ -71,6 +72,7 @@ export default {
         this.$refs.studentTable.toggleRowSelection(item,true);
       }
     })
+    }
   },
   methods:{
     handleSelectionChange(val){
@@ -83,5 +85,8 @@ export default {
 /deep/.dialog-footer{
   margin-top: 10px;
 }
-  
+  .dialog-footer {
+  float: right;
+ 
+}
 </style>

文件差異過大導致無法顯示
+ 440 - 316
src/views/teamDetail/components/resetClass.vue


+ 1 - 1
src/views/teamDetail/teamCourseList.vue

@@ -401,7 +401,7 @@
                   @getList='getList'
                   :id='id' />
     </el-dialog>
-    <addCompound :compoundList='compoundList'
+    <addCompound :compoundList='compoundList' v-if="permission('courseSchedule/courseMerge')"
                  @clearCom='clearCom'
                  @cancleCompound='cancleCompound' />
   </div>

部分文件因文件數量過多而無法顯示