Bladeren bron

04/17 16:09

111
Xiao_Mo 5 jaren geleden
bovenliggende
commit
29adf40d45

+ 2 - 2
src/api/journal.js

@@ -170,7 +170,7 @@ export function teacherSalaryComplaintsDetail(data) {
 export function complaintsDispose(data) {
     return request({
         url: api + '/teacherSalaryComplaints/complaintsDispose',
-        method: 'GET',
-        params: data
+        method: 'post',
+        data: qs.stringify(data)
     })
 }

+ 3 - 0
src/views/afterSchoolManager/afterSchoolTeach.vue

@@ -204,6 +204,9 @@ export default {
   },
   methods: {
     init() {
+      if(this.$route.query.teacherName){
+        this.searchForm.search = this.$route.query.teacherName
+      }
       this.getList();
     },
     getDate() {

+ 0 - 1
src/views/setSilder/addSilder.vue

@@ -181,7 +181,6 @@ export default {
       }
      */
     onOperation (type, row) {
-      console.log(row)
       this.branchStatus = true
       this.operationType = type
       if (type == 'update') {

+ 12 - 3
src/views/teacherManager/teacherList.vue

@@ -123,12 +123,16 @@
           <el-table-column align="center" label="开放网管课">
             <template slot-scope="scope">{{ scope.row.isSupportExtraPracticeLesson ? '是' : '否' }}</template>
           </el-table-column>
-           <el-table-column align="center" label="服务指标">
-            <template slot-scope="scope">{{ scope.row.serviceIndex +'%' }}</template>
-          </el-table-column>
+          
            <el-table-column align="center" label="运营指标">
             <template slot-scope="scope">{{ scope.row.operatingIndex +'%' }}</template>
           </el-table-column>
+           <el-table-column align="center" label="服务指标">
+            <template slot-scope="scope">
+              <el-button type="text" @click="gotoAfterSchool(scope.row)">{{ scope.row.serviceIndex +'%' }}</el-button>
+              
+              </template>
+          </el-table-column>
           <el-table-column align="center" fixed="right" width="200" label="操作">
             <template slot-scope="scope">
               <!--   let search = JSON.stringify(this.searchForm)
@@ -414,6 +418,11 @@ export default {
           })
         }
       })
+    },
+    gotoAfterSchool(row){
+      console.log(row)
+      // 需要的参数 id 
+      this.$router.push({path:'/business/afterSchoolManager',query:{teacherName:row.realName ,activeIndex:'2'}})
     }
   }
 };

+ 1 - 1
src/views/workBenchManager/classFeesIsOk.vue

@@ -158,7 +158,7 @@
           <el-table-column align="center" prop label="状态" fixed="right">
             <template slot-scope="scope">{{scope.row.confirmStatus | confirmFilter }}</template>
           </el-table-column>
-          <el-table-column align="center" prop="memo" label="备注" width="150" fixed="right"></el-table-column>
+          <el-table-column align="center" prop="memo" label="备注" width="300" fixed="right"></el-table-column>
           <el-table-column align="center" label="操作" fixed="right">
             <template slot-scope="scope">
               <el-button type="text" @click="resetSalary(scope.row)">课酬调整</el-button>

+ 227 - 27
src/views/workBenchManager/requestProcessing.vue

@@ -37,20 +37,33 @@
         </el-form-item>
         <el-form-item>
           <el-select placeholder="状态" v-model="searchForm.statusEnum" clearable>
-            <el-option label="待确定" value="1"></el-option>
-            <el-option label="已确定" value="2"></el-option>
-            <el-option label="已完成" value="3"></el-option>
+            <el-option label="待处理" value="PENDING"></el-option>
+            <el-option label="已完成" value="DONE"></el-option>
+            <el-option label="已同意" value="AGREED"></el-option>
+            <el-option label="已拒绝" value="DENIED"></el-option>
+            <el-option label="已撤回" value="WITHDRAWN"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
           <el-date-picker
-            :clearable="false"
+            :clearable="true"
             v-model="searchForm.salarySettlementMonth"
             type="month"
             value-format="yyyy-MM"
             placeholder="选择年月"
           ></el-date-picker>
         </el-form-item>
+        <el-form-item>
+          <el-button type="danger" @click="search">搜索</el-button>
+          <el-button @click="onReSet" type="primary">重置</el-button>
+          <!-- export/isSettlementCourseSalarys -->
+          <el-button
+            @click="onExport"
+            type="primary"
+            v-permission="'export/teacherSalaryComplaints'"
+            style=" background: #14928a; border:1px solid #14928a;"
+          >导出</el-button>
+        </el-form-item>
       </el-form>
       <div class="tableWrap">
         <el-table
@@ -58,17 +71,25 @@
           :header-cell-style="{background:'#EDEEF0',color:'#444'}"
           :data="tableList"
         >
-          <el-table-column align="center" prop="studentId" label="分部"></el-table-column>
-          <el-table-column align="center" prop="studentId" label="老师编号"></el-table-column>
-          <el-table-column align="center" prop="courseScheduleId" width="150" label="课酬归属时间">
-            <template slot-scope="scope">{{scope.row.startClassTime | dateForMinFormat}}</template>
+          <el-table-column align="center" prop="organName" label="分部"></el-table-column>
+          <el-table-column align="center" prop="teacherId" label="老师编号"></el-table-column>
+          <el-table-column align="center" prop="realName" label="老师姓名"></el-table-column>
+          <el-table-column align="center" prop="salarySettlementMonth" width="150" label="课酬归属时间"></el-table-column>
+          <el-table-column align="center" prop="updateTime" width="150" label="申述提交">
+            <template slot-scope="scope">{{scope.row.updateTime | dateForMinFormat}}</template>
+          </el-table-column>
+          <el-table-column align="center" prop="statusEnum" label="状态">
+            <template slot-scope="scope">{{scope.row.statusEnum | statusEnum}}</template>
           </el-table-column>
-          <el-table-column align="center" prop="courseScheduleId" width="150" label="申述提交">
-            <template slot-scope="scope">{{scope.row.startClassTime | dateForMinFormat}}</template>
+          <el-table-column align="center" prop="operatorRealName" label="申述处理者"></el-table-column>
+          <!-- <el-table-column align="center" prop="reason" width="400" label="备注"></el-table-column> -->
+          <el-table-column align="center" prop="courseScheduleId" width="150" label="操作">
+            <template slot-scope="scope">
+              <div>
+                <el-button type="text" @click="lookDetail(scope.row)" v-permission="'teacherSalaryComplaints/complaintsDispose'">操作</el-button>
+              </div>
+            </template>
           </el-table-column>
-          <el-table-column align="center" prop="courseScheduleId" width="150" label="申述处理者"></el-table-column>
-          <el-table-column align="center" prop="courseScheduleId" width="150" label="备注"></el-table-column>
-           <el-table-column align="center" prop="courseScheduleId" width="150" label="操作"></el-table-column>
         </el-table>
         <pagination
           :total="rules.total"
@@ -79,30 +100,55 @@
         />
       </div>
     </div>
+    <el-dialog title="课酬调整" :visible.sync="dialogVisible" width="400px">
+      <div>
+        <el-form ref="visibleForm" :model="visibleForm" class="visibleForm" >
+          <el-form-item
+            label="申述内容"
+            :rules="[{ required: true, message: '请填写申述内容',trigger: 'blur'}]"
+            prop="reason"
+          >
+            <el-input type="textarea" :rows="5" v-model.trim="visibleForm.reason"></el-input>
+          </el-form-item>
+          <el-form-item
+            label="处理意见"
+            :rules="[{ required: true, message: '请填写处理意见',trigger: 'blur'}]"
+            prop="handingSuggestion"
+          >
+            <el-input type="textarea" :rows="5" v-model.trim="visibleForm.handingSuggestion"></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer">
+        <el-button @click="subreset('DENIED')">拒绝</el-button>
+        <el-button type="primary" @click="subreset('AGREED')">同意</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
+import qs from 'qs'
 import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
 import {
- teacherSalaryComplaints,
- teacherSalaryComplaintsDetail,
- complaintsDispose
+  teacherSalaryComplaints,
+  teacherSalaryComplaintsDetail,
+  complaintsDispose
 } from "@/api/journal";
 export default {
   components: { pagination },
   data() {
     return {
       searchForm: {
-        search:null,
-        salarySettlementMonth:null,
-        statusEnum:null,
-        teacherId:null,
-        organId:null
+        search: null,
+        salarySettlementMonth: null,
+        statusEnum: null,
+        teacherId: null,
+        organId: null
       },
       teacherList: [],
       tableList: [],
@@ -113,6 +159,15 @@ export default {
         page: 1, // 当前页
         total: 0, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
+      },
+      dialogVisible: false,
+      visibleForm: {
+        reason: null,
+        handingSuggestion: null,
+        teacherId: null,
+        salarySettlementMonth: null,
+        statusEnum: null,
+        id:null
       }
     };
   },
@@ -134,18 +189,163 @@ export default {
     this.init();
   },
   methods: {
-    init() {},
+    init() {
+      this.getList();
+    },
     getList() {
       this.searchForm.page = this.rules.page;
       this.searchForm.rows = this.rules.limit;
-      teacherSalaryComplaints(this.searchForm).then(res=>{
-        if(res.code == 200){
-          this.tableList = res.data.rows
-          this.rules.total = res.data.total
+      teacherSalaryComplaints(this.searchForm).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total;
         }
+      });
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.searchForm = {
+        search: null,
+        salarySettlementMonth: null,
+        statusEnum: null,
+        teacherId: null,
+        organId: null
+      };
+      this.search();
+    },
+      onExport() {
+      let url = "/api-web/export/teacherSalaryComplaints";
+      let obj = this.searchForm;
+      const options = {
+        method: "post",
+        headers: {
+          Authorization: getToken()
+        },
+        url,
+        data: qs.stringify(obj),
+        responseType: "blob"
+      };
+
+      this.$confirm("您确定导出列表?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        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 nowTime = new Date();
+                  let ymd =
+                    nowTime.getFullYear() +
+                    "" +
+                    (nowTime.getMonth() + 1) +
+                    "" +
+                    nowTime.getDate() +
+                    "" +
+                    nowTime.getHours() +
+                    "" +
+                    nowTime.getMinutes();
+                  let fname = ymd + "申述处理";
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+
+              load.endLoading();
+            })
+            .catch(error => {
+              this.$message.error("导出数据失败,请连接管理员");
+              load.endLoading();
+            });
+        })
+        .catch(() => {});
+    },
+    lookDetail(row) {
+      teacherSalaryComplaintsDetail({ id: row.id }).then(res => {
+        if (res.code == 200) {
+          this.visibleForm = {
+            reason: res.data.reason,
+            handingSuggestion: res.data.handingSuggestion,
+            teacherId: res.data.teacherId,
+            salarySettlementMonth: res.data.salarySettlementMonth,
+            statusEnum: null,
+            id:res.data.id
+          };
+          
+          this.dialogVisible = true;
+        }
+      });
     },
-  
+    subreset(str) {
+       this.$refs["visibleForm"].validate(flag => {
+        if (flag) {
+          let obj = {
+            reason: this.visibleForm.reason,
+            handingSuggestion: this.visibleForm.handingSuggestion,
+            currentReduceSalary: this.visibleForm.reduceSalary,
+            salarySettlementMonth: this.visibleForm.salarySettlementMonth,
+            teacherId:this.visibleForm.teacherId,
+            statusEnum: str,
+             id:this.visibleForm.id
+          };
+          complaintsDispose(obj).then(res => {
+            if (res.code == 200) {
+              this.dialogVisible = false;
+              this.$message.success("处理成功");
+              this.getList();
+            }
+          });
+        }
+      });
+    }
+  },
+  filters: {
+    statusEnum(val) {
+      let template = {
+        PENDING: "待处理",
+        DONE: "已完成",
+        AGREED: "已同意",
+        DENIED: "已拒绝",
+        WITHDRAWN: "已撤回"
+      };
+      return template[val];
+    }
+  },
+  watch: {
+    dialogVisible(val) {
+      if (!val) {
+        this.visibleForm = {
+          reason: null,
+          handingSuggestion: null,
+          teacherId: null,
+          salarySettlementMonth: null,
+          statusEnum: null,
+           id:null
+        };
+         this.$refs["visibleForm"].resetFields();
+      }
+      
+    }
   }
 };
 </script>