فهرست منبع

10/16 乐团优化

mo 4 سال پیش
والد
کامیت
33c7403607

+ 15 - 5
src/api/buildTeam.js

@@ -589,6 +589,16 @@ export function extensionPayment (data) {
   })
 }
 
+// 延长报名 extensionApplyExpireDate
+export function extensionApplyExpire (data) {
+  return request({
+    url: api + `/musicGroup/extensionApplyExpireDate`,
+    method: 'POST',
+    data: qs.stringify(data)
+  })
+}
+
+
 // 班级临时调整
 export function revisionClassGroup (data) {
   return request({
@@ -1281,7 +1291,7 @@ export function batchPracticeGroupTeacherAdjust (data) {
 }
 
 // 获取报名缴费详情
-export function getStudentOriginal(data) {
+export function getStudentOriginal (data) {
   return request({
     url: api + '/subjectChange/getStudentOriginal',
     method: 'get',
@@ -1289,17 +1299,17 @@ export function getStudentOriginal(data) {
   })
 }
 
-export function getSubjectGoodsAndInfo(data) {
+export function getSubjectGoodsAndInfo (data) {
   return request({
-    url:  api + '/subjectChange/getSubjectGoodsAndInfo',
+    url: api + '/subjectChange/getSubjectGoodsAndInfo',
     method: 'get',
     params: data
   })
 }
 
-export function getChangeInfo(data) {
+export function getChangeInfo (data) {
   return request({
-    url:  api + '/subjectChange/getChangeInfo',
+    url: api + '/subjectChange/getChangeInfo',
     method: 'get',
     params: data
   })

+ 53 - 9
src/views/teamBuild/signupList.vue

@@ -8,7 +8,7 @@
           </el-page-header>
         </h2>
         <p style="margin-bottom:15px; font-size:18px;
-             font-weight:400">报名截止时间:{{ applyExpireDate | formatTimer }} 缴费截止时间:{{ applyExpireDate | formatTimer }} </p>
+             font-weight:400">报名截止时间:{{ applyExpireDate | formatTimer }} 缴费截止时间:{{ paymentExpireDate | formatTimer }} </p>
         <div class="btnList">
           <!-- <div class='newBand close'
                v-permission="'musicGroup/cancelMusicGroup'"
@@ -271,11 +271,13 @@
 
     <el-dialog :title="!isPay?'延长报名':'延长缴费'"
                :visible.sync="extendPaymentStatus"
+               destroy-on-close
                width="400px">
       <el-form :model="extendForm"
                ref="extendForm"
                :rules="extendRule">
-        <el-form-item label="延长时间"
+        <el-form-item v-if="isPay"
+                      label="延长缴费时间"
                       prop="expireDate">
           <el-date-picker v-model.trim="extendForm.expireDate"
                           value-format="yyyy-MM-dd"
@@ -286,6 +288,16 @@
                           placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="延长报名时间"
+                      v-else
+                      prop="expireDate">
+          <el-date-picker v-model.trim="extendForm.expireDate"
+                          value-format="yyyy-MM-dd"
+                          type="date"
+                          :picker-options="applyDates"
+                          placeholder="选择日期">
+          </el-date-picker>
+        </el-form-item>
       </el-form>
       <div slot="footer"
            class="dialog-footer">
@@ -534,7 +546,7 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { getintoClass, getStudentList, findSound, musicGroupOpenPay, openPayment, musicGroupFound, extensionPayment, resetPlanNum, cancelMusicGroup, getTeamBaseInfo, studentApplyDetailExport, StudentQuit } from '@/api/buildTeam'
+import { getintoClass, getStudentList, findSound, musicGroupOpenPay, openPayment, musicGroupFound, extensionPayment, extensionApplyExpire, resetPlanNum, cancelMusicGroup, getTeamBaseInfo, studentApplyDetailExport, StudentQuit } from '@/api/buildTeam'
 import { resetStudentSubject, getStudentFeeDetail } from '@/api/studentManager'
 import { vaildStudentUrl, vaildTeacherUrl } from '@/utils/validate'
 import { addVisit } from "@/views/returnVisitManager/api.js"
@@ -643,6 +655,7 @@ export default {
       Fsearch: null,
       Frules: null,
       applyExpireDate: '',
+      paymentExpireDate: '',
       activeRow: null,
       visitVisiable: false,
       visitForm: {
@@ -664,7 +677,8 @@ export default {
         visitTime: [{ required: true, message: "请输入回访时间" }],
         visitType: [{ required: true, message: "请选择回访类型" }]
       },
-      isPay: false
+      isPay: false,
+      applyDates: this.applyDate()
     }
   },
   created () {
@@ -672,7 +686,9 @@ export default {
     this.init()
   },
   activated () {
+
     this.init()
+
   },
   methods: {
     permission (str) {
@@ -694,6 +710,7 @@ export default {
       getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
         if (res.code == 200) {
           this.applyExpireDate = res.data.musicGroup.applyExpireDate;
+          this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
         }
       })
 
@@ -999,7 +1016,22 @@ export default {
       this.$refs[formName].validate(valid => {
         if (valid) {
           if (!isPay) {
-
+            extensionApplyExpire({
+              musicGroupId: this.id,
+              expireDate: this.extendForm.expireDate
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message.success('延长报名成功')
+                this.extendPaymentStatus = false
+                getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
+                  if (res.code == 200) {
+                    this.applyExpireDate = res.data.musicGroup.applyExpireDate;
+                  }
+                })
+              } else {
+                this.$message.error(res.msg);
+              }
+            })
           } else {
             extensionPayment({
               musicGroupId: this.id,
@@ -1010,7 +1042,7 @@ export default {
                 this.extendPaymentStatus = false
                 getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
                   if (res.code == 200) {
-                    this.applyExpireDate = res.data.musicGroup.applyExpireDate;
+                    this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
                   }
                 })
               } else {
@@ -1195,14 +1227,26 @@ export default {
     },
     extendTime (isPay) {
       this.isPay = isPay
-      this.extendPaymentStatus = true
+
       if (isPay) {
         // 点击的延长缴费
-
+        this.extendForm.expireDate = this.paymentExpireDate
       } else {
         // 点击的延长报名
+        this.extendForm.expireDate = this.applyExpireDate
       }
-    }
+      this.extendPaymentStatus = true
+    },
+    applyDate () {
+      let self = this
+
+      return {
+        firstDayOfWeek: 1,
+        disabledDate (time) {
+          return time.getTime() > new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
+        }
+      }
+    },
   },
   watch: {
     orderVisible (val) {

+ 127 - 10
src/views/teamBuild/teamSeting/components/setClassV2.vue

@@ -67,13 +67,27 @@
         <el-table-column prop="totalClassTimes"
                          label="排课课次"></el-table-column>
         <el-table-column align="center"
+                         width="260px"
                          prop
                          label="操作">
           <template slot-scope="scope">
             <div>
               <el-button type="text"
+                         v-if="scope.row.type === 'HIGH' || scope.row.type==='HIGH_ONLINE'         
+              "
+                         v-permission="'classGroupStudent/findAllStudent'"
+                         @click='lookDeatil(scope.row)'>查看</el-button>
+              <el-button type="text"
                          v-permission="'classGroup/classGroupUpdate'"
                          @click="classAdjustment(scope.row)">老师调整</el-button>
+              <el-button type="text"
+                         v-if="scope.row.type
+                         !='HIGH'
+                         &&scope.row.type
+                         !='HIGH_ONLINE'
+              "
+                         v-permission="'classGroupStudent/findAllStudent'"
+                         @click="resetClass(scope.row)">学员调整</el-button>
               <el-popover placement="top"
                           width="160"
                           :ref="scope.$index"
@@ -94,12 +108,12 @@
 
               <el-button type="text"
                          v-if="scope.row.type
-                         !='HIGH'
-                         &&scope.row.type
-                         !='HIGH_ONLINE'
+                         ==='HIGH'
+                         ||scope.row.type
+                         ==='HIGH_ONLINE'
               "
-                         v-permission="'classGroupStudent/findAllStudent'"
-                         @click="resetClass(scope.row)">学员调整</el-button>
+                         v-permission="'classGroupStudent/addStudents'"
+                         @click="addstudentBtn(scope.row)">添加学员</el-button>
             </div>
           </template>
         </el-table-column>
@@ -115,7 +129,7 @@
                title="新增班级">
       <el-form :model="newClassForm"
                :inline="true"
-               label-width="100px"
+               label-width="120px"
                ref="newClassForm"
                class="newClassForm">
         <el-form-item label="班级名称"
@@ -209,7 +223,7 @@
                        :value="item.id"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="声部"
+        <el-form-item label="网络教室声部"
                       prop="subjectId"
                       :rules="[{ required: true, message: '请选择线上声部',trigger: 'blur'}]"
                       v-if="newClassForm.type == 'HIGH_ONLINE'"
@@ -605,6 +619,63 @@
                    @click="arrangeFormSubmit">确 定</el-button>
       </div>
     </el-dialog>
+    <el-dialog title="添加学员"
+               width="600px"
+               :visible.sync="addStudentVisible">
+      <el-table :data="studentList"
+                ref='studentList'
+                @selection-change="selectStudent"
+                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+        <el-table-column type="selection"
+                         width="55"></el-table-column>
+        <el-table-column prop='name'
+                         label="学生姓名"></el-table-column>
+        <el-table-column property="classGroupName"
+                         label="所在班级"></el-table-column>
+      </el-table>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button type="primary"
+                   v-permission="'classGroupStudent/addStudents'"
+                   @click="addStudnt">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="小班课学员详情"
+               width="600px"
+               :visible.sync="lookDeatilVisible">
+      <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+                :data='classList'>
+        <el-table-column label="学员姓名"
+                         prop="name">
+        </el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <div>
+              <el-popover placement="top"
+                          v-permission="'classGroupStudent/del'"
+                          width="160"
+                          :ref="scope.$index">
+                <p>确定删除该学生?</p>
+                <div style="text-align: right; margin-top: 20px">
+                  <el-button size="mini"
+                             type="text"
+                             @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
+                  <el-button type="primary"
+                             size="mini"
+                             @click="removeStudent(scope)">确定</el-button>
+                </div>
+                <el-button type="text"
+                           slot="reference">删除</el-button>
+              </el-popover>
+              <!-- <el-button type="text"
+                         v-permission="'classGroupStudent/adjustClassGroup'"
+                         @click="resetClass(scope.row)">调整班级</el-button> -->
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+
+    </el-dialog>
   </div>
 </template>
 
@@ -739,7 +810,11 @@ export default {
 
       classCardList: [], // 课表的集合
       teamid: null,
-      maxMun: 16
+      maxMun: 16,
+      lookDeatilVisible: false,
+      addStudentVisible: false,
+      activeStudentList: [],
+      classList: []
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -1500,11 +1575,53 @@ export default {
 
       } else {
         this.newClassForm.memo = []
+      }
+
+    },
+    lookDeatil (row) {
+      console.log(row)
+      this.lookDeatilVisible = true;
+      this.activeClass = row.id;
+      getClassAllStudent({ classGroupId: this.activeClass }).then(res => {
+        if (res.code == 200) {
+          this.classList = res.data;
+        }
+      })
 
+      return
 
-      }
+    },
+    addstudentBtn (row) {
+      this.activeClass = row.id;
+      let type = row.type;
+      getMusicGroupStuNoClassType({ musicGroupId: this.teamid, type }).then(res => {
+        if (res.code == 200) {
+          this.studentList = res.data;
+          this.addStudentVisible = true;
+        }
+      })
 
-    }
+    },
+    selectStudent (val) {
+      this.activeStudentList = val;
+    },
+    addStudnt () {
+      // 发请求添加学生
+      let classGroupId = this.activeClass;
+      let userIdsStr = this.activeStudentList.map(item => {
+        return item.userId
+      }).join(',')
+      addStudents({ userIdsStr, classGroupId }).then(res => {
+        if (res.code == 200) {
+          this.$message.success('添加成功')
+          this.activeStudentList = [];
+          this.addStudentVisible = false;
+          // 取消列表的勾选
+          this.$refs.studentList.clearSelection();
+          this.getList();
+        }
+      })
+    },
   },
   filters: {
     getBishopName (val) {

+ 3 - 3
src/views/teamDetail/teamList.vue

@@ -159,9 +159,9 @@
                            label="操作">
             <template slot-scope="scope">
               <div>
-                <el-button type="text"
+                <!-- <el-button type="text"
                            v-if="scope.row.status == 'PREPARE' && permission('/setImprovement')"
-                           @click="gotoImprovement(scope.row)">基础技能班</el-button>
+                           @click="gotoImprovement(scope.row)">基础技能班</el-button> -->
                 <el-button type="text"
                            v-if="scope.row.status == 'PREPARE' && permission('/teamDetailedList')"
                            @click="gotodetailList(scope.row)">发放清单</el-button>
@@ -195,7 +195,7 @@
                 <!-- 筹备中 编辑 -->
                 <el-button type="text"
                            v-if="scope.row.status == 'PREPARE' && permission('teamDetail/teamSeting/update')"
-                           @click="lookTeamDetail(scope.row)">编辑</el-button>
+                           @click="lookTeamDetail(scope.row)">班级列表</el-button>
                 <!-- 审核中 编辑 -->
                 <el-button type="text"
                            v-if="scope.row.status == 'AUDIT' && permission('teamDetail/audit/update')"