mo 4 年之前
父節點
當前提交
ca6b3cf13d
共有 4 個文件被更改,包括 103 次插入6 次删除
  1. 2 2
      mock/mock-server.js
  2. 90 2
      src/views/reportForm/index.vue
  3. 9 0
      src/views/teamDetail/teamList.vue
  4. 2 2
      vue.config.js

+ 2 - 2
mock/mock-server.js

@@ -5,7 +5,7 @@ const path = require('path')
 
 const mockDir = path.join(process.cwd(), 'mock')
 
-function registerRoutes(app) {
+function registerRoutes (app) {
   let mockLastIndex
   const { default: mocks } = require('./index.js')
   for (const mock of mocks) {
@@ -19,7 +19,7 @@ function registerRoutes(app) {
   }
 }
 
-function unregisterRoutes() {
+function unregisterRoutes () {
   Object.keys(require.cache).forEach(i => {
     if (i.includes(mockDir)) {
       delete require.cache[require.resolve(i)]

+ 90 - 2
src/views/reportForm/index.vue

@@ -21,7 +21,8 @@
           </div>
           <!-- <img :src="imageIcon" class="micon el-tooltip" style="width:8px height:8px" alt /> -->
           <i class="el-icon-question micon el-tooltip"
-             style="font-size: 18px; color: #F56C6C"></i>
+             style="font-size: 18px; color: #F56C6C"
+             v-permission="'export/teacherSalary'"></i>
         </el-tooltip>
       </div>
       <el-divider></el-divider>
@@ -50,10 +51,41 @@
               请选择分部后,导出招生情况汇总表,分部可多选
             </div>
             <i class="el-icon-question micon el-tooltip"
+               v-permission="'export/musicGroupRegister'"
                style="font-size: 18px; color: #F56C6C"></i>
           </el-tooltip>
         </div>
       </div>
+      <el-divider></el-divider>
+      <div class="m-core">
+        <div class="m-wrap">
+          <div class="title">老师默认课酬:
+          </div>
+          <el-select v-model.trim="teacherDefaultSalaryOrganId"
+                     class="organSelect"
+                     style="width:100%"
+                     filterable
+                     clearable>
+            <el-option v-for="(item,index) in organList"
+                       :key="index"
+                       :label="item.name"
+                       :value="item.id"></el-option>
+          </el-select>
+
+          <div class="newBand"
+               @click="exportDefaultSalary"
+               v-permission="'export/teacherDefaultSalary'">导出</div>
+          <el-tooltip placement="top"
+                      popper-class="mTooltip">
+            <div slot="content">
+              请选择分部后,导出老师列表及老师课酬信息
+            </div>
+            <i class="el-icon-question micon el-tooltip"
+               style="font-size: 18px; color: #F56C6C"
+               v-permission="'export/teacherDefaultSalary'"></i>
+          </el-tooltip>
+        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -72,7 +104,8 @@ export default {
     return {
       mouth: "",
       organList: [],
-      organIdList: []
+      organIdList: [],
+      teacherDefaultSalaryOrganId: ''
       // imageIcon: require("@/assets/images/base/warning.png")
     };
   },
@@ -192,6 +225,61 @@ export default {
           load.endLoading();
         })
       }).catch(() => { })
+    },
+    exportDefaultSalary () {
+      if (!this.teacherDefaultSalaryOrganId) {
+        this.$message.error('请选择一个分部')
+        return
+      }
+
+      let url = '/api-web/export/teacherDefaultSalary'
+      let data = { organId: this.teacherDefaultSalaryOrganId }
+      const options = {
+        method: 'POST',
+        headers: {
+          'Authorization': getToken()
+        },
+        data: qs.stringify(data),
+        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()
+              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(() => { })
     }
   }
 

+ 9 - 0
src/views/teamDetail/teamList.vue

@@ -145,6 +145,15 @@
             </template>
           </el-table-column>
           <el-table-column align='center'
+                           width='100px'
+                           label="清单状况">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.hasVerifyMusicalList?'已确认':'未确认'}}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align='center'
                            width='220px'
                            fixed="right"
                            label="操作">

+ 2 - 2
vue.config.js

@@ -21,8 +21,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 测试服
-// let target = 'http://dev.dayaedu.com' // 乔
+// let target = 'http://dev.dayaedu.com' // 测试服
+let target = 'http://192.168.3.196:8080' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**