wolyshaw 4 лет назад
Родитель
Сommit
86be4c86e8

+ 6 - 4
src/api/buildTeam.js

@@ -898,11 +898,13 @@ export function updateStudentFee (data) {
 }
 // -----[-]
 // 获取学员签到列表
-export function findStudentAttendance (data) {
-  return request({
+export function findStudentAttendance (data, postData) {
+  return request2({
     url: api + '/studentAttendance/findStudentAttendance',
-    method: 'get',
-    params: data
+    method: postData ? 'post' : 'get',
+    params: data,
+    data: postData,
+    requestType: 'form'
   })
 }
 

+ 9 - 1
src/components/filter-search/index.vue

@@ -1,11 +1,12 @@
 <template>
   <div class="filter-search" v-if="$route.query[this.searchKey]">
     <img src="./icon.svg"/>
-    <span>{{desc}}</span>
+    <span>{{desced}}</span>
     <i class="el-icon-circle-close" @click="close"/>
   </div>
 </template>
 <script>
+import { errorType } from '@/views/main/constant'
 export default {
   name: 'filter-search',
   props: {
@@ -18,12 +19,19 @@ export default {
       default: 'search'
     }
   },
+  computed: {
+    desced() {
+      const { name } = errorType[this.$route.query.filter_type] || {}
+      return name ? `仅显示: ${name}` : this.desc
+    }
+  },
   methods: {
     close() {
       this.$router.replace({
         query: {
           ...this.$route.query,
           [this.searchKey]: undefined,
+          filter_type: undefined,
         }
       })
       this.$emit('reload')

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

@@ -20,9 +20,8 @@
     </save-form>
     <div class="tags">
       <el-badge
-        :hidden="listByType[item.type].length === 0"
-        :value="listByType[item.type].length"
-        :max="99"
+        :hidden="item.num === 0"
+        is-dot
         v-for="(item, index) in tags"
         :key="index"
       >
@@ -42,15 +41,16 @@
     >
       <el-button
         type="text"
-        v-if="item[0].url && item[0].result"
+        v-if="item[0].url && item[0].result || item[0].always"
         @click="$router.push({
           path: item[0].url,
           query: {
-            ...$route.query,
             ...item[0].query,
-            [item[0].resultKey]: (item[0].result || []).join(',')
+            tag: $route.query.tag,
+            filter_type: item[0].errorType,
+            [item[0].resultKey]: item[0].resultKey ? (item[0].result || []).join(',') : undefined
           }
-        })" :disabled="!item[0].result.length"
+        })" :disabled="!item[0].result.length && !item[0].always"
       >立即处理<i class="el-icon-d-arrow-right"/></el-button>
     </title-item>
   </div>
@@ -85,7 +85,7 @@ export default {
       return key
     },
     tags() {
-      const tags = this.list.map(item => ({name: item.desc, type: item.errorType}))
+      const tags = this.list.map(item => ({name: item.desc, type: item.errorType, num: item.num}))
       return tags
     },
     activeList() {

+ 4 - 0
src/views/main/abnormal/title.vue

@@ -34,9 +34,13 @@ export default {
   justify-content: space-between;
   padding-right: 10px;
   font-weight: bold;
+  transition: all .3s;
   b{
     font-size: 18px;
   }
+  &:hover{
+    background-color: rgba(0, 0, 0, .06);
+  }
   &.error {
     b{
       color: #ED6F62;

+ 29 - 12
src/views/main/constant.js

@@ -26,51 +26,61 @@ export const descs = {
 
 export const errorType = {
   MUSIC_PATROL_ITEM: {
+    name: '乐团巡查事项异常',
     isError: false,
-    url: '/business/teamDetail',
-    resultKey: 'search',
+    url: '/business/musicInspection',
+    resultKey: 'ids',
   },
   HIGH_CLASS_STUDENT_LESS_THAN_THREE: {
+    name: '基础技能班学员数量异常',
     isError: true,
     url: '/business/teamDetail',
     resultKey: 'search',
   },
   STUDENT_NOT_PAYMENT: {
+    name: '学员未缴费',
     isError: true,
     url: '/business/teamDetail',
     resultKey: 'search',
   },
   STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP: {
+    name: '学员退团申请',
     isError: true,
-    url: '/business/teamDetail',
-    resultKey: 'search',
+    url: '/business/WithdrawalApplication',
+    resultKey: 'ids',
   },
   WAIT_CREATE_PAYMENT_CALENDER: {
+    name: '待创建缴费项目',
     isError: true,
     url: '/business/teamDetail',
     resultKey: 'search',
   },
   COURSE_TRUANT_STUDENT_NUM: {
+    name: '学员考情异常旷课',
     isError: true,
-    url: '/business/teamDetail',
-    resultKey: 'search',
+    url: '/operateManager/stuRecodeManager',
+    resultKey: 'ids',
   },
   COURSE_LEAVE_STUDENT_NUM: {
+    name: '学员请假',
     isError: true,
-    url: '/business/teamDetail',
-    resultKey: 'search',
+    url: '/operateManager/stuRecodeManager',
+    resultKey: 'ids',
   },
   TEACHER_EXCEPTION_ATTENDANCE: {
+    name: '老师考勤异常',
     isError: true,
     url: '/operateManager/recodeList',
     resultKey: 'teacherAttendanceId',
   },
   TEACHER_NOT_A_CLASS: {
+    name: '未签到签退',
     isError: true,
     url: '/operateManager/recodeList',
     resultKey: 'teacherAttendanceId',
   },
   TEACHER_LEAVE: {
+    name: '老师请假',
     isError: false,
     url: '/journal/journal',
     resultKey: 'search',
@@ -79,27 +89,34 @@ export const errorType = {
     }
   },
   TEACHER_EXPECT_SALARY_BE_LOW: {
+    name: '预计课酬较低',
     isError: false,
     url: '/operateManager/operationalList',
-    resultKey: 'search',
+    always: true,
+    query: {
+      lowSalary: 1
+    }
   },
   INSPECTION_ITEM: {
+    name: '乐团巡查任务未计划',
     isError: true,
     url: '/main/main',
-    resultKey: 'search',
+    resultKey: 'ids',
     query: {
       tabrouter: 'teamSchedule'
     }
   },
   INSPECTION_ITEM_PLAN: {
+    name: '乐团巡查任务未提交',
     isError: true,
     url: '/business/musicInspection',
-    resultKey: 'search',
+    resultKey: 'ids',
   },
   STUDENT_VISIT: {
+    name: '回访任务未完成',
     isError: true,
     url: '/main/main',
-    resultKey: 'search',
+    resultKey: 'ids',
     query: {
       tabrouter: 'teamSchedule'
     }

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

@@ -1,7 +1,7 @@
 <template>
   <div class="m-container">
     <h2 v-permission="'/main/main/allData/826'">
-      <div class="squrt"></div>控制台
+      <div class="squrt"></div>控制台 <filter-search v-if="$route.query.tabrouter === 'teamSchedule'" searchKey="ids" @reload="getList"/>
     </h2>
     <div class="m-core">
       <tab-router v-permission="'newIndex'">

+ 24 - 0
src/views/operationalEarly/operationalList.vue

@@ -38,6 +38,23 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item>
+          <el-select
+            v-model.trim="searchForm.lowSalary"
+            placeholder="请选择是否预警"
+            clearable
+            filterable
+          >
+            <el-option
+              value="0"
+              label="否"
+            ></el-option>
+            <el-option
+              value="1"
+              label="是"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
           <el-input v-model="searchForm.minSalary" type="number" placeholder="预警课酬大于"></el-input>
         </el-form-item>
         <el-form-item>
@@ -168,6 +185,7 @@ export default {
         monthStr: nowMonth,
         userId: null,
         maxSalary: null,
+        lowSalary: null,
       },
       tableList: [{}],
       organList: [],
@@ -188,6 +206,11 @@ export default {
     //     this.organList = res.data;
     //   }
     // })
+    const { lowSalary } = this.$route.query
+    let string = String(lowSalary)
+    if (string) {
+      this.$set(this.searchForm, 'lowSalary', string)
+    }
     this.$store.dispatch("setBranchs");
     // 获取老师列表
     // getTeacher({ organId: this.organId }).then(res => {
@@ -208,6 +231,7 @@ export default {
         monthStr: null,
         userId: null,
         maxSalary: null,
+        lowSalary: null,
       };
       this.getList();
     },

+ 10 - 4
src/views/stuRecodeManager/index.vue

@@ -3,7 +3,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      学生考勤列表
+      学生考勤列表 <filter-search @reload="getList" searchKey="ids"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -307,7 +307,7 @@ export default {
     return {
       searchForm: {
         studentID: "",
-        groupType: "MUSIC",
+        groupType: "",
         musicGroupId: "",
         courseScheduleId: "",
         status: "",
@@ -336,9 +336,12 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    if (this.searchForm.dates?.length < 1) {
+    if (this.searchForm.dates?.length < 1 && !this.$route.query.ids) {
         this.searchForm.dates = [new Date(),new Date()]
     }
+    if (!this.$route.query.ids) {
+      this.$set(this.searchForm, 'groupType', 'MUSIC')
+    }
     this.init();
   },
 
@@ -354,6 +357,7 @@ export default {
         ...rest,
         page: this.rules.page,
         rows: this.rules.limit,
+        ids: this.$route.query.ids,
         ...getTimes(dates, ["classStartDate", "classEndDate"],  "YYYY-MM-DD"),
       };
       await Export(this, {
@@ -382,7 +386,9 @@ export default {
       //     "YYYY-MM-DD"
       //   ),
       // };
-      findStudentAttendance(obj).then((res) => {
+      findStudentAttendance(obj, {
+        ids: this.$route.query.ids,
+      }).then((res) => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;

+ 8 - 0
src/views/withdrawal-application/api.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request2'
+
+export const musicGroupQuitQeryPage = data => {
+  return request({
+    url: '/api-web/musicGroupQuit/queryPage',
+    params: data
+  })
+}

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

@@ -1,8 +1,173 @@
 <template>
-  <div>withdrawal-application</div>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>退团申请列表 <filter-search @reload="FetchList" searchKey="ids"/>
+    </h2>
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        @submit="submit"
+        @reset="onReSet"
+        ref="searchForm"
+        :model.sync="searchForm"
+      >
+        <el-form-item>
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            placeholder="学员(乐团)编号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="danger">搜索</el-button>
+          <el-button native-type="reset" type="primary">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <el-table
+        :data="list"
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column
+          prop="userId"
+          label="学员编号"
+        >
+          <copy-text slot-scope="scope">{{scope.row.userId}}</copy-text>
+        </el-table-column>
+        <el-table-column
+          prop="userId"
+          label="学员姓名"
+        >
+          <copy-text slot-scope="scope">{{scope.row.user.username}}</copy-text>
+        </el-table-column>
+        <el-table-column
+          prop="musicGroupId"
+          label="所属乐团"
+        >
+          <copy-text slot-scope="scope">{{scope.row.musicGroup.name}}</copy-text>
+        </el-table-column>
+        <el-table-column
+          prop="createTime"
+          label="申请时间"
+        ></el-table-column>
+        <el-table-column
+          prop="userComment"
+          label="退团原因"
+        >
+          <overflow-text width="100%" slot-scope="scope" :text="scope.row.userComment"></overflow-text>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          fixed="right"
+          width="160px;"
+          label="操作"
+          v-if="permission('musicGroupQuit/quitMusicGroup/quit') || permission('musicGroupQuit/quitMusicGroup/quit-only')"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              v-if="permission('musicGroupQuit/quitMusicGroup/quit')"
+              :disabled="scope.row.status != 'PROCESSING'"
+              @click="quieTeamMask(scope.row)"
+            >退团退费</el-button>
+            <el-button
+              type="text"
+              v-if="permission('musicGroupQuit/quitMusicGroup/quit-only')"
+              :disabled="scope.row.status != 'PROCESSING'"
+              @click="quieTeam(scope.row)"
+            >退团</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        sync
+        :total.sync="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        :page-sizes="rules.page_size"
+        @pagination="FetchList"
+      />
+    </div>
+    <el-dialog title="退团退费" width="640px" :visible.sync="quitVisible">
+      <quitModal
+        v-if="quitVisible && detail"
+        :detail="detail"
+        @close="quitVisible = false"
+        @submited="FetchList"
+      />
+    </el-dialog>
+    <el-dialog title="退团" width="640px" :visible.sync="quitOnlyVisible">
+      <quitOnlyModal
+        v-if="quitOnlyVisible && detail"
+        :detail="detail"
+        @close="quitOnlyVisible = false"
+        @submited="FetchList"
+      />
+    </el-dialog>
+  </div>
 </template>
 <script>
+import pagination from "@/components/Pagination/index";
+import { permission } from '@/utils/directivePage'
+import quitModal from './modals/quit'
+import quitOnlyModal from './modals/quitOnly'
+import { musicGroupQuitQeryPage } from './api'
+const initSearch = {
+  search: ''
+}
 export default {
-
+  components: { pagination, quitModal, quitOnlyModal },
+  data() {
+    return {
+      quitVisible: false,
+      quitOnlyVisible: false,
+      detail: null,
+      list: [],
+      searchForm: {
+        ...initSearch
+      },
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    }
+  },
+  mounted() {
+    this.FetchList()
+  },
+  methods: {
+    permission,
+    submit() {
+      this.rules.page = 1
+      this.FetchList()
+    },
+    onReSet() {
+      this.searchForm = {...initSearch}
+      this.submit();
+    },
+    quieTeamMask(row) {
+      this.quitVisible = true
+      this.detail = row
+    },
+    quieTeam(row) {
+      this.quitOnlyVisible = true
+      this.detail = row
+    },
+    async FetchList() {
+      try {
+        const res = await musicGroupQuitQeryPage({
+          page: this.rules.page,
+          rows: this.rules.limit,
+          ids: this.$route.query.ids,
+          ...this.searchForm,
+        })
+        this.rules.total = res.data.total;
+        this.list = res.data.rows
+      } catch (error) {}
+    }
+  }
 }
 </script>

+ 104 - 0
src/views/withdrawal-application/modals/quit.vue

@@ -0,0 +1,104 @@
+<template>
+  <div>
+    <el-form :model="quitForm" ref="quitForm" :rules="quitRules" label-width="110px">
+      <el-form-item label="审核状态" prop="status">
+        <el-radio v-model.trim="quitForm.status" label="APPROVED"
+          >通过</el-radio
+        >
+        <el-radio v-model.trim="quitForm.status" label="DENIED"
+          >拒绝</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退还课程费用" prop="isRefundCourseFee">
+        <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="true"
+          >是</el-radio
+        >
+        <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="false"
+          >否</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退还乐器费用" prop="isRefundInstrumentFee">
+        <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="true"
+          >是</el-radio
+        >
+        <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="false"
+          >否</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退还教辅费用" prop="isRefundTeachingAssistantsFee">
+        <el-radio
+          v-model.trim="quitForm.isRefundTeachingAssistantsFee"
+          :label="true"
+          >是</el-radio
+        >
+        <el-radio
+          v-model.trim="quitForm.isRefundTeachingAssistantsFee"
+          :label="false"
+          >否</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退团原因" prop="reason">
+        <el-input type="textarea" v-model.trim="quitForm.reason" placeholder="请填写退团退费原因"></el-input>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer" style="text-align: right;">
+      <el-button @click="$emit('close')">取 消</el-button>
+      <el-button type="primary" @click="submit">确 定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { quitMusicGroup } from '@/api/journal'
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      quitForm: {
+        status: '',
+        isRefundCourseFee: null,
+        isRefundInstrumentFee: null,
+        isRefundTeachingAssistantsFee: null,
+        reason: null,
+      },
+    }
+  },
+  computed: {
+    quitRules() {
+      const required = this.quitForm.status === 'APPROVED'
+      return {
+        status: [{ required: true, message: "请选择审核状态" }],
+        isRefundCourseFee: [
+          { required, message: "请选择是否退还课程费用" },
+        ],
+        isRefundInstrumentFee: [
+          { required, message: "选择是否退还乐器费用" },
+        ],
+        isRefundTeachingAssistantsFee: [
+          { required, message: "选择是否退还教辅费用" },
+        ],
+        reason: [{ required: true, message: "请填写退团退费原因" }],
+      }
+    }
+  },
+  methods: {
+    submit() {
+      this.$refs.quitForm.validate(async valid => {
+        if (valid) {
+          try {
+            await this.$confirm("是否确定提交?", "提示", {
+              type: 'warning',
+            })
+            await quitMusicGroup({
+              id: this.detail.id,
+              ...this.quitForm
+            })
+            this.$emit('close')
+            this.$emit('submited')
+            this.$message.success("提交成功")
+          } catch (error) {}
+        }
+      })
+    }
+  }
+}
+</script>

+ 63 - 0
src/views/withdrawal-application/modals/quitOnly.vue

@@ -0,0 +1,63 @@
+<template>
+  <div>
+    <el-form :model="quitForm" ref="quitForm" :rules="quitRules">
+      <el-form-item label="审核状态" prop="status">
+        <el-radio v-model.trim="quitForm.status" label="APPROVED"
+          >通过</el-radio
+        >
+        <el-radio v-model.trim="quitForm.status" label="DENIED"
+          >拒绝</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退团原因" prop="reason">
+        <el-input type="textarea" v-model.trim="quitForm.reason" placeholder="请填写退团退费原因"></el-input>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer" style="text-align: right;">
+      <el-button @click="$emit('close')">取 消</el-button>
+      <el-button type="primary" @click="submit">确 定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { quitMusicGroup } from '@/api/journal'
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      quitForm: {
+        status: '',
+        isRefundCourseFee: false,
+        isRefundInstrumentFee: false,
+        isRefundTeachingAssistantsFee: false,
+        reason: null,
+      },
+      quitRules: {
+        status: [{ required: true, message: "请选择审核状态" }],
+        reason: [{ required: true, message: "请填写退团退费原因" }],
+      },
+    }
+  },
+  methods: {
+    submit() {
+      this.$refs.quitForm.validate(async valid => {
+        if (valid) {
+          try {
+            await this.$confirm("是否确定退团?", "提示", {
+              type: 'warning',
+            })
+            await quitMusicGroup({
+              musicGroupId: this.detail.musicGroupId,
+              userId: this.detail.userId,
+              ...this.quitForm
+            })
+            this.$emit('close')
+            this.$emit('submited')
+            this.$message.success("退团成功")
+          } catch (error) {}
+        }
+      })
+    }
+  }
+}
+</script>