فهرست منبع

1223 17:26

11
mo 5 سال پیش
والد
کامیت
f23192533b
5فایلهای تغییر یافته به همراه58 افزوده شده و 10 حذف شده
  1. 9 0
      src/api/vipSeting.js
  2. 1 1
      src/utils/vueFilter.js
  3. 4 4
      src/views/buildVip/index.vue
  4. 42 3
      src/views/vipClass/vipDetail/components/vipStudentList.vue
  5. 2 2
      vue.config.js

+ 9 - 0
src/api/vipSeting.js

@@ -313,3 +313,12 @@ export function batchAppendVipGroupCourses (data) {
     data
   })
 }
+
+// vip休学 
+export function vipPauseForStudent (data) {
+  return request({
+    url: api + '/vipGroupManage/pauseForStudent',
+    method: 'POST',
+    data: qs.stringify(data)
+  })
+}

+ 1 - 1
src/utils/vueFilter.js

@@ -267,7 +267,7 @@ Vue.filter('teamStatus', value => {
 // 学生状态
 /**studentStatus */
 Vue.filter('studentStatus', value => {
-  let template = ['在读', '已退课', '退课中']
+  let template = ['在读', '已退课', '退课中', '休学']
   return template[value]
 })
 // 学生点名

+ 4 - 4
src/views/buildVip/index.vue

@@ -964,8 +964,8 @@ export default {
         name: this.leftForm.name,
         offlineClassesNum: offline || 0,
         onlineClassesNum: online || 0,
-        offlineClassesUnitPrice: this.rightForm.offlinePrice,
-        onlineClassesUnitPrice: this.rightForm.onlinePrice,
+        offlineClassesUnitPrice: this.rightForm.offlinePrice || 0,
+        onlineClassesUnitPrice: this.rightForm.onlinePrice || 0,
         paymentExpireDate: this.leftForm.signUpEnd,
         registrationStartTime: this.leftForm.signUpStart,
         singleClassMinutes: this.leftForm.classTime,
@@ -973,8 +973,8 @@ export default {
         userId: this.leftForm.teacher,
         vipGroupActivityId: this.leftForm.activeType,
         vipGroupCategoryId: this.leftForm.courseType,
-        onlineTeacherSalary: this.rightForm.onlineCourse,
-        offlineTeacherSalary: this.rightForm.offlineCourse,
+        onlineTeacherSalary: this.rightForm.onlineCourse || 0,
+        offlineTeacherSalary: this.rightForm.offlineCourse || 0,
         giveTeachMode: this.centerForm.radio,
         subjectIdList: this.leftForm.subject,
       }

+ 42 - 3
src/views/vipClass/vipDetail/components/vipStudentList.vue

@@ -74,6 +74,13 @@
                          v-if="scope.row.studentStatus == 0"
                          v-permission="'vipGroupManage/applyRefundForStudent'"
                          @click="lookFee(scope)">退学</el-button>
+              <!--   v-permission="'vipGroupManage/applyRefundForStudent'" -->
+              <el-button type="text"
+                         v-if="scope.row.studentStatus == 0"
+                         @click="stopCourse(scope)">休学</el-button>
+              <el-button type="text"
+                         v-if="scope.row.studentStatus == 3"
+                         @click="recoveryCourse(scope)">恢复</el-button>
             </div>
           </template>
         </el-table-column>
@@ -136,7 +143,7 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { findVipGroupStudents, leaveSchool, getStudentSurplusCourseFee, getHaveCourseBalanceStudents, addVipGroupStudents } from '@/api/vipSeting'
+import { findVipGroupStudents, leaveSchool, getStudentSurplusCourseFee, getHaveCourseBalanceStudents, addVipGroupStudents, vipPauseForStudent } from '@/api/vipSeting'
 export default {
   components: { pagination },
   data () {
@@ -220,8 +227,8 @@ export default {
             })
           }
         })
-      }).catch(() =>{})
-      
+      }).catch(() => { })
+
     },
     addStudentList () {
       // 发请求 搜索学生
@@ -251,6 +258,38 @@ export default {
           this.getStudents()
         }
       })
+    },
+    stopCourse (scope) {
+      this.$confirm('是否休学?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // 发请求 申请休学
+        vipPauseForStudent({ vipGroupId: this.id, studentId: scope.row.id }).then(res => {
+          if (res.code == 200) {
+            this.$message.success('休学成功')
+            this.getStudents()
+          }
+        })
+      }).catch(() => {
+      });
+    },
+    recoveryCourse (scope) {
+      // this.$confirm('是否休学?', '提示', {
+      //   confirmButtonText: '确定',
+      //   cancelButtonText: '取消',
+      //   type: 'warning'
+      // }).then(() => {
+      //   // 发请求 申请休学
+      //   vipPauseForStudent({ vipGroupId: this.id, studentId: scope.row.id }).then(res => {
+      //     if (res.code == 200) {
+      //       this.$message.success('休学成功')
+      //       this.getList()
+      //     }
+      //   })
+      // }).catch(() => {
+      // });
     }
   },
 }

+ 2 - 2
vue.config.js

@@ -18,11 +18,11 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://testadm.dayaedu.com/' //勇哥迁库
-// let target = 'http://192.168.3.27:8000' // 箭河
+let target = 'http://192.168.3.27:8000' // 箭河
 // let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:18000' //勇哥
 // let target = 'http://47.99.212.176:8000' // 测试服
-let target = 'http://192.168.3.48:8080' // 乔
+// let target = 'http://192.168.3.48:8080' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**