Kaynağa Gözat

Merge branch '01/21VipReset' into online

wolyshaw 4 yıl önce
ebeveyn
işleme
7d3bc863d3

+ 30 - 3
src/components/filter-search/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="filter-search" v-if="$route.query[this.searchKey]">
+  <div class="filter-search" v-if="show">
     <img src="./icon.svg"/>
     <span>{{desced}}</span>
     <i class="el-icon-circle-close" @click="close"/>
@@ -7,6 +7,7 @@
 </template>
 <script>
 import { errorType } from '@/views/main/constant'
+import cleanDeep from 'clean-deep'
 export default {
   name: 'filter-search',
   props: {
@@ -17,21 +18,47 @@ export default {
     searchKey: {
       type: String,
       default: 'search'
-    }
+    },
+    keys: {
+      type: Array,
+      default: () => []
+    },
+    moreKeys: {
+      type: Array,
+      default: () => []
+    },
   },
   computed: {
     desced() {
       const { name } = errorType[this.$route.query.filter_type] || {}
       return name ? `仅显示: ${name}` : this.desc
-    }
+    },
+    hasSearch() {
+      return this.$route.query[this.searchKey]
+    },
+    hasForm() {
+      const keys = {}
+      for (const item of this.keys) {
+        keys[item] = this.$route.query[item]
+      }
+      return !!Object.keys(cleanDeep(keys)).length
+    },
+    show() {
+      return this.hasSearch || this.hasForm
+    },
   },
   methods: {
     close() {
+      const keys = {}
+      for (const item of [...this.keys, ...this.moreKeys]) {
+        keys[item] = undefined
+      }
       this.$router.replace({
         query: {
           ...this.$route.query,
           [this.searchKey]: undefined,
           filter_type: undefined,
+          ...keys
         }
       })
       this.$emit('reload')

+ 1 - 1
src/views/main/abnormal/index.vue

@@ -43,7 +43,7 @@
       v-else
       v-for="(item, index) in activeList"
       :key="index"
-      :disabled="item[0].result && !item[0].result.length && !item[0].always" type="text"
+      :disabled="(item[0].result && !item[0].result.length) || (!item[0].always && !item[0].num)" type="text"
     >
       <title-item
         :type="item[0].isError ? 'error' : 'warning'"

+ 44 - 14
src/views/main/constant.js

@@ -34,13 +34,21 @@ export const errorType = {
     name: '乐团巡查事项异常',
     isError: false,
     url: '/business/musicInspection',
-    resultKey: 'ids',
+    always: true,
+    query: {
+      tabrouter: 'teamSchedule',
+      searchType: 'MUSIC_PATROL_ITEM',
+    },
   },
   HIGH_CLASS_STUDENT_LESS_THAN_THREE: {
     name: '基础技能班学员数量异常',
     isError: true,
-    url: '/business/teamDetail',
-    resultKey: 'search',
+    url: '/business/teamCLassList',
+    always: true,
+    query: {
+      lessThenThreeHighOnline: '1',
+      type: 'HIGH_ONLINE',
+    },
   },
   STUDENT_NOT_PAYMENT: {
     name: '学员未缴费',
@@ -52,7 +60,10 @@ export const errorType = {
     name: '学员退团申请',
     isError: true,
     url: '/business/WithdrawalApplication',
-    resultKey: 'ids',
+    always: true,
+    query: {
+      visitFlag: '0',
+    },
   },
   WAIT_CREATE_PAYMENT_CALENDER: {
     name: '待创建缴费项目',
@@ -61,7 +72,7 @@ export const errorType = {
     resultKey: 'search',
   },
   COURSE_TRUANT_STUDENT_NUM: {
-    name: '学员考异常旷课',
+    name: '学员考异常旷课',
     isError: true,
     url: '/operateManager/stuRecodeManager',
     always: true,
@@ -87,14 +98,26 @@ export const errorType = {
   TEACHER_EXCEPTION_ATTENDANCE: {
     name: '老师考勤异常',
     isError: true,
+    always: true,
     url: '/operateManager/recodeList',
-    resultKey: 'teacherAttendanceId',
+    query: {
+      attendanceStatus: 'ERR_ATTENDANCE',
+      visitFlag: 0,
+      start: '2020-12-01',
+      end: dayjs().format('YYYY-MM-DD'),
+    },
   },
   TEACHER_NOT_A_CLASS: {
-    name: '未签到签退',
+    name: '老师未签到签退',
     isError: true,
+    always: true,
     url: '/operateManager/recodeList',
-    resultKey: 'teacherAttendanceId',
+    query: {
+      attendanceStatus: 'NO_ATTENDANCE',
+      visitFlag: 0,
+      start: '2020-12-01',
+      end: dayjs().format('YYYY-MM-DD'),
+    },
   },
   TEACHER_LEAVE: {
     name: '老师请假',
@@ -117,26 +140,33 @@ export const errorType = {
   INSPECTION_ITEM: {
     name: '乐团巡查任务未计划',
     isError: true,
+    always: true,
     url: '/main/main',
     resultKey: 'ids',
     query: {
-      tabrouter: 'teamSchedule'
-    }
+      tabrouter: 'teamSchedule',
+      searchType: 'INSPECTION_ITEM',
+    },
   },
   INSPECTION_ITEM_PLAN: {
     name: '乐团巡查任务未提交',
     isError: true,
     url: '/business/musicInspection',
-    resultKey: 'ids',
+    always: true,
+    query: {
+      tabrouter: 'teamSchedule',
+      searchType: 'INSPECTION_ITEM_PLAN',
+    },
   },
   STUDENT_VISIT: {
     name: '回访任务未完成',
     isError: true,
     url: '/main/main',
-    resultKey: 'ids',
+    always: true,
     query: {
-      tabrouter: 'teamSchedule'
-    }
+      tabrouter: 'teamSchedule',
+      searchType: 'STUDENT_VISIT',
+    },
   },
 }
 

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

@@ -1,7 +1,7 @@
 <template>
   <div class="m-container">
     <h2>
-      <div class="squrt"></div>控制台 <filter-search v-if="$route.query.tabrouter === 'teamSchedule'" searchKey="ids" @reload="reloadItem"/>
+      <div class="squrt"></div>控制台 <filter-search v-if="$route.query.tabrouter === 'teamSchedule'" :keys="['searchType']" @reload="reloadItem"/>
     </h2>
     <div class="m-core">
       <tab-router @change="changeKey">
@@ -89,7 +89,9 @@ export default {
       })
     },
     reloadItem() {
-      this.$refs.teamSchedule.getList()
+      if (this.$refs.teamSchedule) {
+        this.$refs.teamSchedule.getList()
+      }
     }
   }
 }

+ 3 - 3
src/views/main/teamSchedule/index.vue

@@ -164,11 +164,11 @@ export default {
         userId: "",
         organId: "",
         month: "",
-        ids:''
+        searchType:''
       },
       handleForm: {
         memo: "",
-        id: "",
+        searchType: "",
       },
       tableList: [],
       handleVisible: false,
@@ -203,7 +203,7 @@ export default {
           ...this.searchForm,
           page: this.rules.page,
           rows: this.rules.limit,
-          ids: this.$route.query.ids,
+          searchType: this.$route.query.searchType,
         });
         this.tableList = res.data.rows;
         this.rules.total = res.data.total;

+ 3 - 3
src/views/musicInspection/index.vue

@@ -3,7 +3,7 @@
     <div class="m-container">
         <h2>
             <div class="squrt"></div>乐团巡查
-            <filter-search @reload="getList" searchKey="ids" />
+            <filter-search @reload="getList" :keys="['searchType']" />
         </h2>
         <div class="m-core">
             <save-form :inline="true" ref="searchForm" @submit="search" @reset="onReSet" :model="searchForm">
@@ -270,7 +270,7 @@ export default {
             try {
                 let { createTimer, ...rest } = this.searchForm
                 let params = {
-                    ids: this.$route.query.ids,
+                    searchType: this.$route.query.searchType,
                     ...rest,
                     page: this.pageInfo.page,
                     rows: this.pageInfo.limit,
@@ -362,4 +362,4 @@ export default {
 /deep/.description-title {
     margin: 0 !important;
 }
-</style>
+</style>

+ 8 - 4
src/views/recodeManager/recodeList.vue

@@ -3,7 +3,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      老师考勤列表 <filter-search @reload="reloadSearch" searchKey="teacherAttendanceId"/>
+      老师考勤列表 <filter-search @reload="reloadSearch" :keys="['attendanceStatus', 'visitFlag']" :moreKeys="['start', 'end']"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -349,7 +349,7 @@ export default {
     },
     teacherAttendanceId() {
       return this.$route.query.teacherAttendanceId
-    }
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -366,8 +366,11 @@ export default {
     //     this.organList = res.data;
     //   }
     // });
+    const { query } = this.$route
     this.$store.dispatch("setBranchs");
-    if (!this.teacherAttendanceId) {
+    if (query.start || query.end) {
+      this.courseTime = [query.start, query.end]
+    } else {
       this.courseTime = [nowTime, nowTime]
     }
     this.init();
@@ -383,7 +386,8 @@ export default {
       let obj = {
         page: this.rules.page,
         rows: this.rules.limit,
-        teacherAttendanceId: this.teacherAttendanceId,
+        attendanceStatus: this.$route.query.attendanceStatus,
+        visitFlag: this.$route.query.visitFlag,
       };
       Object.assign(obj, this.searchForm);
       if (this.courseTime && this.courseTime.length > 0) {

+ 4 - 4
src/views/teamBuild/forecastName.vue

@@ -214,7 +214,7 @@
             :close-on-click-modal="false"
             :visible.sync="visitVisible"
         >
-            <visit-model v-if="visitVisible" @close="visitVisible = false" :visitDetail="visitDetail" />
+            <visit-model v-if="visitVisible" @close="visitVisible = false" :detail="visitDetail" @submited="getList"/>
         </el-dialog>
     </div>
 </template>
@@ -224,7 +224,7 @@ import pagination from "@/components/Pagination/index";
 import qrCode from '@/components/QrCode/index';
 import { permission } from "@/utils/directivePage";
 import { vaildStudentUrl } from '@/utils/validate'
-import visitModel from './modals/visit'
+import visitModel from '@/views/withdrawal-application/modals/visit'
 import { queryPreApplyList, finishPreApply, sendParentMeetingNotice } from './api'
 export default {
     name: 'forecastName',
@@ -318,12 +318,12 @@ export default {
                 musicGroupId: rows.musicGroupId,
                 overview: "",
                 purpose: "",
-                studentId: rows.userId,
+                userId: rows.userId,
                 type: "",
                 visitTime: "",
                 visitType: "",
                 feedback: "",
-                studentName: rows.userName,
+                realName: rows.userName,
             }
             // this.visitDetail = rows
         },

+ 21 - 11
src/views/teamBuild/signupList.vue

@@ -569,12 +569,18 @@
     <!-- 回访记录 -->
     <el-dialog
       title="新增回访"
-      width="600px"
+      width="500px"
       destroy-on-close
       :close-on-click-modal="false"
       :visible.sync="visitVisiable"
     >
-      <el-form
+      <visit
+        v-if="visitVisiable && detail"
+        :detail="detail"
+        @close="visitVisiable = false"
+        @submited="getList"
+      />
+      <!-- <el-form
         :model="visitForm"
         label-width="120px"
         label-position="right"
@@ -631,7 +637,7 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="visitVisiable = false">取 消</el-button>
         <el-button type="primary" @click="submitAddVisit">确 定</el-button>
-      </span>
+      </span> -->
     </el-dialog>
     <el-dialog
       title="更改声部"
@@ -681,6 +687,7 @@ import qs from "qs";
 import { permission } from "@/utils/directivePage";
 import cleanDeep from "clean-deep";
 import changeVoice from "./modals/change-voice";
+import visit from '@/views/withdrawal-application/modals/visit'
 export default {
   name: "signupList",
   components: {
@@ -688,6 +695,7 @@ export default {
     changeVoice,
     mergeMusic,
     forecastList,
+    visit
   },
   data() {
     return {
@@ -809,6 +817,7 @@ export default {
       },
       isPay: false,
       applyDates: this.applyDate(),
+      detail:null
     };
   },
   created() {
@@ -1337,9 +1346,10 @@ export default {
       // row.typeVisible = false;
     },
     addVisit(row) {
-      this.visitForm.studentName = row.studentName;
-      this.visitForm.musicGroupId = this.teamid;
-      this.visitForm.studentId = row.studentId;
+      // this.visitForm.studentName = row.studentName;
+      // this.visitForm.musicGroupId = this.teamid;
+      // this.visitForm.studentId = row.studentId;
+      this.detail = row
       this.visitVisiable = true;
     },
     openChangeVoice(row) {
@@ -1473,11 +1483,11 @@ export default {
         this.$refs["quitForm"].resetFields();
       }
     },
-    visitVisiable(val) {
-      if (!val) {
-        this.$refs["visitForm"].resetFields();
-      }
-    },
+    // visitVisiable(val) {
+    //   if (!val) {
+    //     this.$refs["visitForm"].resetFields();
+    //   }
+    // },
   },
 };
 </script>

+ 27 - 81
src/views/teamDetail/components/studentList.vue

@@ -56,7 +56,7 @@
     <save-form
     ref='searchForm'
       :inline="true"
-      save-key="teamDetails-studentList"
+      :save-key="saveKey"
       class="searchForm"
       @submit="search"
       @reset="onReSet"
@@ -271,11 +271,6 @@
             <div>{{ scope.row.paymentStatus | studentPays }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="是否欠费">
-          <template slot-scope="scope">
-            <div>{{ scope.row.oweFlag | yesOrNo }}</div>
-          </template>
-        </el-table-column>
         <el-table-column align="center" label="是否激活">
           <template slot-scope="scope">
             <div>{{ scope.row.isActive ? "是" : "否" }}</div>
@@ -346,7 +341,7 @@
         </el-table-column>
       </el-table>
       <pagination
-       save-key="teamDetails-studentList"
+       :save-key="saveKey"
         sync
         :total.sync="rules.total"
         :page.sync="rules.page"
@@ -621,69 +616,17 @@
     </el-dialog>
     <el-dialog
       title="新增回访"
-      width="600px"
+      width="500px"
       destroy-on-close
       :close-on-click-modal="false"
       :visible.sync="visitVisiable"
     >
-      <el-form
-        :model="visitForm"
-        label-width="120px"
-        label-position="right"
-        ref="visitForm"
-        :rules="visitRules"
-      >
-        <el-form-item label="学生姓名">
-          <p>{{ visitForm.studentName }}</p>
-        </el-form-item>
-        <el-form-item label="回访类型" prop="visitType">
-          <el-cascader
-            expand-trigger="hover"
-            clearable
-            placeholder="请选择回访类型"
-            :options="visitChiose"
-            @change="handleChange"
-            style="width: 220px !important"
-            v-model="visitForm.visitType"
-          >
-          </el-cascader>
-        </el-form-item>
-        <el-form-item label="回访日期" prop="visitTime">
-          <el-date-picker
-            v-model.trim="visitForm.visitTime"
-            align="right"
-            style="width: 220px !important"
-            type="date"
-            placeholder="选择日期"
-            :picker-options="pickerOptions"
-            value-format="yyyy-MM-dd"
-          ></el-date-picker>
-        </el-form-item>
-        <el-form-item label="学员情况" prop="overview">
-          <el-input
-            type="textarea"
-            v-model="visitForm.overview"
-            style="width: 80% !important"
-            :rows="3"
-            maxlength="50"
-            show-word-limit
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="家长反馈" prop="feedback">
-          <el-input
-            type="textarea"
-            v-model="visitForm.feedback"
-            style="width: 80% !important"
-            :rows="3"
-            maxlength="50"
-            show-word-limit
-          ></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="visitVisiable = false">取 消</el-button>
-        <el-button type="primary" @click="submitAddVisit">确 定</el-button>
-      </span>
+       <visit
+        v-if="visitVisiable && detail"
+        :detail="detail"
+        @close="visitVisiable = false"
+        @submited="getList"
+      />
     </el-dialog>
     <el-dialog
       title="选择班级"
@@ -755,10 +698,12 @@ import TimesView from './modals/course-time-detail'
 import paymentCycle from '../../resetTeaming/modals/payment-cycle'
 import paymentList from './modals/payment-list'
 import Tooltip from '@/components/Tooltip/index'
+import visit from '@/views/withdrawal-application/modals/visit'
 export default {
   name: "tstudentList",
   data() {
     return {
+      detail:null,
       teamid: "",
       paymentDetailVisible: false,
       paymentDetail: {},
@@ -931,7 +876,8 @@ export default {
     createUserPay,
     Tooltip,
     'times-view': TimesView,
-    paymentList
+    paymentList,
+    visit
   },
   created() {
     // 判断是否带缓存参数
@@ -942,12 +888,6 @@ export default {
       this.Frules = this.$route.query.rules;
     }
   },
-  /**  <el-option label="已开启缴费"
-                     value="1"></el-option>
-          <el-option label="未缴费"
-                     value="0"></el-option>
-          <el-option label="已缴费"
-                     value="2"></el-option> */
   filters: {
     studentPays(val) {
       let template = {
@@ -1516,9 +1456,10 @@ export default {
     },
     addVisit(row) {
       console.log(row);
-      this.visitForm.studentName = row.realName;
-      this.visitForm.musicGroupId = this.teamid;
-      this.visitForm.studentId = row.userId;
+      this.detail = row
+      // this.visitForm.studentName = row.realName;
+      // this.visitForm.musicGroupId = this.teamid;
+      // this.visitForm.studentId = row.userId;
       this.visitVisiable = true;
     },
     handleChange(val) {
@@ -1561,12 +1502,17 @@ export default {
         this.$refs["quitForm"].resetFields();
       }
     },
-    visitVisiable(val) {
-      if (!val) {
-        this.$refs["visitForm"].resetFields();
-      }
-    },
+    // visitVisiable(val) {
+    //   if (!val) {
+    //     this.$refs["visitForm"].resetFields();
+    //   }
+    // },
   },
+  computed:{
+    saveKey(){
+      return 'teamDetails-'+this.$route.query.id
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 34 - 5
src/views/teamDetail/teamClassList.vue

@@ -3,7 +3,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      班级列表
+      班级列表 <filter-search :keys="['lessThenThreeHighOnline']" @reload="getList"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -56,7 +56,13 @@
         </el-form-item>
         <!-- musicClassTypeList -->
         <el-form-item prop="type">
-          <el-select v-model.trim="searchForm.type" filterable  clearable :disabled='searchForm.groupType!="MUSIC"'>
+          <el-select
+            v-model.trim="searchForm.type"
+            filterable
+            clearable
+            :disabled='searchForm.groupType!="MUSIC"'
+            placeholder="班级类型"
+          >
             <el-option
               v-for="(item, index) in musicClassTypeList"
               :key="index"
@@ -146,7 +152,7 @@
               <div>{{ scope.row.totalClassTimes }}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" label="操作">
+          <el-table-column fixed="right" width="160px" align="center" label="操作">
             <!--    -->
             <template slot-scope="scope">
               <el-button
@@ -169,6 +175,16 @@
                 @click="cancleCompound(scope.row)"
                 >取消合班</el-button
               >
+              <el-button
+                type="text"
+                v-if="
+                  scope.row.groupType === 'MUSIC' &&
+                  (scope.row.studentNum == '0' ||
+                  scope.row.totalClassTimes == '0')
+                "
+                  @click="removeClass(scope)"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -199,7 +215,7 @@ import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { courseListType } from "@/utils/searchArray";
 import { musicClassTypeList } from "@/utils/searchArray";
-import { getClassGroupPage } from "@/api/buildTeam";
+import { getClassGroupPage, removeSingleClass } from "@/api/buildTeam";
 import { permission } from "@/utils/directivePage";
 import classCompound from "./componentClass/classCompound";
 export default {
@@ -231,6 +247,9 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
+    if (this.$route.query.type) {
+      this.searchForm.type = this.$route.query.type
+    }
     // 获取分部
     this.$store.dispatch("setBranchs");
     this.init();
@@ -242,9 +261,9 @@ export default {
     async getList() {
       try {
         let { organIdList, ...result } = this.searchForm;
-        console.log(result);
         let obj = {
           ...result,
+          lessThenThreeHighOnline: this.$route.query.lessThenThreeHighOnline,
           organIdList: this.searchForm.organIdList.join(","),
           page: this.rules.page,
           rows: this.rules.limit,
@@ -265,6 +284,16 @@ export default {
       this.searchForm.groupType = 'MUSIC'
       this.search();
     },
+    async removeClass(scope) {
+      try {
+        await this.$confirm('是否确定删除该班级?', '提示', {
+          type: 'warning'
+        })
+        await removeSingleClass({ classGroupId: scope.row.id })
+        this.$message.success('删除成功')
+        this.getList()
+      } catch (error) {}
+    },
     addCompound(row) {
       //  scope.row.type != 'HIGH_ONLINE' &&scope.row.type != 'HIGH'&&
       this.hightOnlineCount = 0;

+ 2 - 2
src/views/withdrawal-application/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="m-container">
     <h2>
-      <div class="squrt"></div>退团申请列表 <filter-search @reload="FetchList" searchKey="ids"/>
+      <div class="squrt"></div>退团申请列表 <filter-search @reload="FetchList" :keys="['visitFlag']"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -180,7 +180,7 @@ export default {
         const res = await musicGroupQuitQeryPage({
           page: this.rules.page,
           rows: this.rules.limit,
-          ids: this.$route.query.ids,
+          visitFlag: this.$route.query.visitFlag,
           ...this.searchForm,
         })
         this.rules.total = res.data.total;

+ 6 - 2
src/views/withdrawal-application/modals/visit.vue

@@ -90,11 +90,15 @@ export default {
   },
   computed: {
     userName() {
-      return this.username || this.detail.user?.username
+      return this.username || this.detail.user?.username || this.detail.realName || this.detail.userName || this.detail.studentName
+    },
+    studentId(){
+      return this.detail.userId || this.detail.studentId
     }
   },
   methods: {
     submitAddVisit() {
+
       this.$refs.visitForm.validate((res) => {
         if (res) {
           const { visitType, ...rest } = this.visitForm
@@ -103,7 +107,7 @@ export default {
             objectId: this.detail.id,
             studentName: this.userName,
             musicGroupId: this.detail.musicGroupId,
-            studentId: this.detail.userId,
+            studentId: this.studentId,
             type: visitType[0],
             purpose: visitType[1],
           }