浏览代码

04/27 13:49

11
Xiao_Mo 5 年之前
父节点
当前提交
6b9227c117

文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-8335a786.b38ed516.css → dist/static/css/chunk-f5536f90.5a5a6545.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.titlewrap[data-v-709ff8c4]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.titlewrap[data-v-709ff8c4],.wrap[data-v-709ff8c4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.wrap div[data-v-709ff8c4]{margin-right:20px}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.titlewrap[data-v-316aa50a]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.titlewrap[data-v-316aa50a],.wrap[data-v-316aa50a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.wrap div[data-v-316aa50a]{margin-right:20px}

文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.f5dbf856.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-1092deaa.6ac8965c.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-1092deaa.cdb1af02.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-8335a786.efcb7643.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-f5536f90.3d73a75e.js


+ 2 - 2
src/views/accompanyManager/accompanys.vue

@@ -140,8 +140,8 @@
             value-format="yyyy-MM-dd"
             placeholder="选择日期"
           ></el-date-picker>
-        </el-form-item v-else>
-            <el-form-item label="上课日期" prop="date">
+        </el-form-item >
+            <el-form-item label="上课日期" prop="date" v-else>
           <el-date-picker
             v-model.trim="maskForm.date"
             style="width:200px!important;"

+ 102 - 8
src/views/settlementManager/settlementList.vue

@@ -34,20 +34,31 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select placeholder="转结状态" v-model="searchForm.settlementStatus" clearable>
+          <el-select placeholder="转结状态" v-model="searchForm.settlementStatus" clearable> 
             <el-option label="已结算" value="1"></el-option>
             <el-option label="未结算" value="0"></el-option>
           </el-select>
         </el-form-item>
+          <el-form-item>
+          <el-date-picker
+            v-model.trim="searchForm.date"
+            style="width:410px;"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-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>
-          <!-- <el-button
+          <el-button
             @click="onExport"
             type="primary"
-            v-permission="'export/exercisesSituations'"
+            v-permission="'export/teacherCourseReward'"
             style=" background: #14928a; border:1px solid #14928a;"
-          >导出</el-button>-->
+          >导出</el-button>
         </el-form-item>
       </el-form>
       <div class="tableWrap">
@@ -91,6 +102,7 @@
 
 <script>
 import axios from "axios";
+import qs from 'qs'
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
@@ -104,7 +116,8 @@ export default {
         search: null,
         organId: null,
         teacherId: null,
-        settlementStatus:null
+        settlementStatus:null,
+        date:[],
       },
       teacherList: [],
       tableList: [],
@@ -145,14 +158,94 @@ export default {
     getList() {
       this.searchForm.page = this.rules.page;
       this.searchForm.rows = this.rules.limit;
-      teacherCourseReward(this.searchForm).then(res => {
+      if(this.searchForm.date&&this.searchForm.date.length>0){
+        this.searchForm.startTime = this.searchForm.date[0]
+        this.searchForm.endTime = this.searchForm.date[1]
+      }else {
+        this.searchForm.startTime = null
+        this.searchForm.endTime = null;
+      }
+      
+      let obj = JSON.parse(JSON.stringify(this.searchForm));
+      obj.date = null;
+      teacherCourseReward(obj).then(res => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;
         }
       });
     },
-    onExport() {},
+    onExport() {
+       let url = "/api-web/export/teacherCourseReward";
+        this.searchForm.page = this.rules.page;
+      this.searchForm.rows = this.rules.limit;
+      if(this.searchForm.date&&this.searchForm.date.length>0){
+        this.searchForm.startTime = this.searchForm.date[0]
+        this.searchForm.endTime = this.searchForm.date[1]
+      }{
+        this.searchForm.startTime = null
+        this.searchForm.endTime = null;
+      }
+      let obj = JSON.parse(JSON.stringify(this.searchForm));
+      obj.date = null;
+       const options = {
+        method: "POST",
+        headers: {
+          Authorization: getToken()
+        },
+        data: qs.stringify(obj),
+        url,
+        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 = "报表导出" + new Date().getTime(); //下载文件的名字
+                link.href = objectUrl;
+                link.setAttribute("download", fname);
+                document.body.appendChild(link);
+                link.click();
+              }
+            })
+
+            load.endLoading();
+          }).catch(error => {
+            this.$message.error('导出数据失败,请连接管理员');
+            load.endLoading();
+          });
+        })
+        .catch(() => {});
+    },
     search() {
       this.rules.page = 1;
       this.getList();
@@ -162,7 +255,8 @@ export default {
         search: null,
         organId: null,
         teacherId: null,
-        settlementStatus:null
+        settlementStatus:null,
+        date:[],
       };
       this.search();
     }

部分文件因为文件数量过多而无法显示