Xiao_Mo 5 лет назад
Родитель
Сommit
9fcad311d5
4 измененных файлов с 144 добавлено и 56 удалено
  1. 10 0
      src/api/buildTeam.js
  2. 8 1
      src/utils/searchArray.js
  3. 10 0
      src/utils/vueFilter.js
  4. 116 55
      src/views/accompanyManager/accompanyList.vue

+ 10 - 0
src/api/buildTeam.js

@@ -967,6 +967,16 @@ export function practiceGroupManageStudentBuys(data) {
     params: data
   })
 }
+
+// 修改网管课程组备注
+export function practiceUpdateMemo(data) {
+  return request({
+    url: api + '/practiceGroupManage/updateMemo',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
 // 清除考情记录
 export function cleanAttendance(data) {
   return request({

+ 8 - 1
src/utils/searchArray.js

@@ -120,6 +120,12 @@ const teacherTimeStatus = [
   { value: "MANUAL_SUB", label: "系统扣除" },
 ]
 
+const practiceGroupType = [
+  { value: "FREE", label: "免费" },
+  { value: "CHARGE", label: "收费" },
+  { value: "TRIAL", label: "试听课" },
+]
+
 export {
   courseType,
   attendance,
@@ -134,5 +140,6 @@ export {
   teacherTimeStatus,
   courseGroupStatus,
   commGroupStatus,
-  courseListType
+  courseListType,
+  practiceGroupType
 }

+ 10 - 0
src/utils/vueFilter.js

@@ -427,6 +427,16 @@ Vue.filter('comCourseGroup', value => {
   }
   return template[value]
 })
+//网管课类型
+Vue.filter('comType', value => {
+  let template = {
+    FREE: "免费",
+    CHARGE:'收费',
+    TRIAL:'试听课',
+  }
+  return template[value]
+})
+
 // 首充续费
 
 Vue.filter('firstOrRenewFilter', value => {

+ 116 - 55
src/views/accompanyManager/accompanyList.vue

@@ -1,9 +1,14 @@
 <template>
-  <div class="">
+  <div class>
     <!-- <h2>
       <div class="squrt"></div>网管课列表
-    </h2> -->
-    <div class="newBand" v-permission="'export/practiceGroup'" @click="onStudentExport" style="width: 120px;">网管课续费提醒</div>
+    </h2>-->
+    <div
+      class="newBand"
+      v-permission="'export/practiceGroup'"
+      @click="onStudentExport"
+      style="width: 120px;"
+    >网管课续费提醒</div>
     <div class="m-core">
       <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
         <!-- 状态 指导老师 活动方案-->
@@ -30,7 +35,21 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <!-- statusList -->
+        <el-form-item>
+          <el-select
+            v-model.trim="searchForm.practiceGroupType"
+            clearable
+            filterable
+            placeholder="课程组类型"
+          >
+            <el-option
+              v-for="(item,index) in practiceGroupType"
+              :key="index"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item prop="status">
           <el-select
             class="multiple"
@@ -54,9 +73,8 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <!-- commGroupStatus -->
-            <el-form-item>
-          <el-select v-model.trim="searchForm.practiceGroupType" clearable filterable placeholder="课程组状态">
+        <el-form-item>
+          <el-select v-model.trim="searchForm.groupStatus" clearable filterable placeholder="课程组状态">
             <el-option
               v-for="(item,index) in commGroupStatus"
               :key="index"
@@ -84,8 +102,15 @@
           :header-cell-style="{background:'#EDEEF0',color:'#444'}"
           :data="tableData"
         >
-          <el-table-column align="center" prop="id" label="课程组编号"></el-table-column>
-          <el-table-column align="center" prop="name" label="课程组名称"></el-table-column>
+          <el-table-column align="center" prop="id" label="课程组编号" width="100"></el-table-column>
+          <el-table-column align="center" prop="name" label="课程组名称" width="100"></el-table-column>
+          <el-table-column align="center" prop="type" label="课程组类型" width="100">
+            <template slot-scope="scope">
+              <div>
+                <p>{{scope.row.type | comType}}</p>
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center" prop="organName" label="所属分部"></el-table-column>
           <!-- educationalTeacherId -->
           <el-table-column align="center" prop="educationalTeacherName" label="教务老师"></el-table-column>
@@ -106,37 +131,38 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="coursesStartDate" label="开课时间">
+          <el-table-column align="center" prop="coursesStartDate" label="开课时间" width="120">
             <template slot-scope="scope">
               <div>
                 <p>{{scope.row.coursesStartDate | formatTimer}}</p>
               </div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="coursesExpireDate" label="结束时间">
+          <el-table-column align="center" prop="coursesExpireDate" label="结束时间" width="120">
             <template slot-scope="scope">
               <div>
                 <p>{{scope.row.coursesExpireDate | formatTimer}}</p>
               </div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="groupStatus" label="课程组状态">
+          <el-table-column align="center" prop="groupStatus" label="课程组状态" width="100">
             <template slot-scope="scope">
               <div>
                 <p>{{scope.row.groupStatus | comCourseGroup}}</p>
               </div>
             </template>
           </el-table-column>
-          <el-table-column align="center" label="是否续费">
+          <el-table-column align="center" label="是否续费" fixed="right">
             <template slot-scope="scope">
               <div>
-                <p  v-if="scope.row.buyMonths == 0">免费</p>
+                <p v-if="scope.row.buyMonths == 0">免费</p>
                 <p v-if="scope.row.buyMonths > 0">{{scope.row.beRenewGroupId>0?'续费':'首充'}}</p>
               </div>
             </template>
           </el-table-column>
+          <el-table-column align="center" width="150" prop="memo" label="备注" fixed="right"></el-table-column>
 
-          <el-table-column align="center" width="150px" fixed="right" label="操作">
+          <el-table-column align="center" width="200" fixed="right" label="操作">
             <template slot-scope="scope">
               <div>
                 <!-- v-permission="'courseSchedule/classStartDateAdjust'"  v-if="!scope.row.isSettlement" -->
@@ -147,6 +173,7 @@
                   @click="closeCrouse(scope.row)"
                   v-permission="'practiceGroupManage/cancelGroup'"
                 >关闭</el-button>
+                <el-button type="text" @click="resetMemo(scope.row)">修改备注</el-button>
               </div>
             </template>
           </el-table-column>
@@ -181,20 +208,28 @@
         <el-button type="primary" @click="submieCloseCrouse">确 定</el-button>
       </div>
     </el-dialog>
+    <el-dialog title="备注" width="400px" :visible.sync="memoVisible">
+      <el-input type="textarea" v-model.trim="memoForm.memo" :rows="7"></el-input>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="memoVisible = false">取 消</el-button>
+        <el-button type="primary" @click="subMemo">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
-import {commGroupStatus} from '@/utils/searchArray'
+import { commGroupStatus, practiceGroupType } from "@/utils/searchArray";
 import {
   getTeacher,
   getEmployeeOrgan,
   practiceGroupManage,
-  cancelGroup
+  cancelGroup,
+  practiceUpdateMemo
 } from "@/api/buildTeam";
 import axios from "axios";
 import { getToken } from "@/utils/auth";
-import load from '@/utils/loading'
+import load from "@/utils/loading";
 export default {
   components: { pagination },
   data() {
@@ -205,19 +240,26 @@ export default {
         teacherId: null,
         organIdList: null,
         firstOrRenew: null,
-        practiceGroupType:null
+        practiceGroupType: null,
+        groupStatus: null
       },
       closeForm: {
         isBack: false,
         money: null
       },
+      memoForm: {
+        memo: "",
+        groupId:''
+      },
+      memoVisible: false,
       closeVisible: false,
       activeRow: null,
       organList: [],
       statusList: [],
       teacherList: [],
       tableData: [],
-      commGroupStatus:commGroupStatus,
+      practiceGroupType: practiceGroupType,
+      commGroupStatus: commGroupStatus,
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -269,8 +311,9 @@ export default {
         status: null,
         teacherId: null,
         organIdList: null,
-        firstOrRenew:null,
-        practiceGroupType:null
+        firstOrRenew: null,
+        practiceGroupType: null,
+        groupStatus: null
       };
       this.search();
     },
@@ -300,36 +343,39 @@ export default {
         type: "warning"
       })
         .then(() => {
-          load.startLoading()
-          axios(options).then(res => {
-            let blob = new Blob([res.data], {
-              // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-              type: "application/vnd.ms-excel;charset=utf-8"
-              //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-            });
-            
-            let text = (new Response(blob)).text()
-            text.then(res => {
-              // 判断是否报错
-              if(res.indexOf('code') != -1) {
-                let json = JSON.parse(res)
-                this.$message.error(json.msg)
-              } else {
-                let objectUrl = URL.createObjectURL(blob);
-                let link = document.createElement("a");
-                let fname = "网管课续费提醒" + new Date().getTime(); //下载文件的名字
-                link.href = objectUrl;
-                link.setAttribute("download", fname);
-                document.body.appendChild(link);
-                link.click();
-              }
+          load.startLoading();
+          axios(options)
+            .then(res => {
+              let blob = new Blob([res.data], {
+                // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+                type: "application/vnd.ms-excel;charset=utf-8"
+                //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+              });
+
+              let text = new Response(blob).text();
+              text.then(res => {
+                // 判断是否报错
+                if (res.indexOf("code") != -1) {
+                  let json = JSON.parse(res);
+                  this.$message.error(json.msg);
+                } else {
+                  let objectUrl = URL.createObjectURL(blob);
+                  let link = document.createElement("a");
+                  let fname = "网管课续费提醒" + new Date().getTime(); //下载文件的名字
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+              load.endLoading();
             })
-            load.endLoading();
-          }).catch(error => {
-            this.$message.error('导出数据失败,请连接管理员');
-            load.endLoading();
-          });
-        }).catch(() => {});
+            .catch(error => {
+              this.$message.error("导出数据失败,请连接管理员");
+              load.endLoading();
+            });
+        })
+        .catch(() => {});
     },
     getList() {
       let obj = {
@@ -338,9 +384,11 @@ export default {
         organId: this.searchForm.organIdList || null,
         page: this.rules.page,
         rows: this.rules.limit,
-        hasEducationalTeacherId: this.searchForm.hasEducationalTeacherId || null,
-        type:this.searchForm.firstOrRenew || null,
-        practiceGroupType:this.searchForm.practiceGroupType || null
+        hasEducationalTeacherId:
+          this.searchForm.hasEducationalTeacherId || null,
+        type: this.searchForm.firstOrRenew || null,
+        practiceGroupType: this.searchForm.practiceGroupType || null,
+        groupStatus: this.searchForm.groupStatus || null
       };
       practiceGroupManage(obj).then(res => {
         if (res.code == 200) {
@@ -386,12 +434,25 @@ export default {
           this.closeVisible = false;
         }
       });
+    },
+    resetMemo(row) {
+      this.$set(this.memoForm,'memo',row.memo);
+       this.$set(this.memoForm,'groupId',row.id);
+      this.memoVisible = true;
+    },
+    subMemo(){
+      practiceUpdateMemo(this.memoForm).then(res=>{
+        if(res.code == 200){
+          this.$message.success('修改成功')
+          this.memoVisible = false;
+          this.getList()
+        }
+      })
     }
   },
   watch: {
     closeVisible(val) {
       if (!val) {
-        console.log(val);
         this.activeRow = null;
         (this.closeForm = {
           isBack: false,