Ver Fonte

后线代客录单报表

yaoyao há 2 anos atrás
pai
commit
6202f5111f
2 ficheiros alterados com 189 adições e 0 exclusões
  1. 19 0
      src/http/moudules/dict.js
  2. 170 0
      src/views/Sys/HxOrdersCount.vue

+ 19 - 0
src/http/moudules/dict.js

@@ -179,4 +179,23 @@ export const companyFindPage = (data) => {
         method: 'post',
         data
     })
+}
+
+
+// 后线代客录单报表查询
+export const queryHxOrdersCount = (data) => {
+    return axios({
+        url: '/insurance/order/queryHxOrdersCount',
+        method: 'post',
+        data
+    })
+}
+
+// 后线代客录单报表导出
+export const exportHxOrdersCount = (data) => {
+    return axios({
+        url: '/insurance/order/exportHxOrdersCount',
+        method: 'post',
+        data
+    })
 }

+ 170 - 0
src/views/Sys/HxOrdersCount.vue

@@ -0,0 +1,170 @@
+<template>
+  <div>
+    <templateTable ref="templateTable" :formList="formList" :btnGroup="btnGroup" :searchData.sync="searchData"
+      :tableConfig="tableConfig" :data="tableData" @findPage="findPage" @handleSearchList="handleSearchList"
+      @selectionChange="selectionChange"
+      :pagination="pageData" @getList="findPage">
+      <template slot="导出">
+        <el-button
+            size="small"
+            type="primary"
+            :disabled="selectionList.length == 0"
+            @click="handExport"
+            >导出</el-button>
+      </template>
+    </templateTable>
+  </div>
+</template>
+
+<script>
+import templateTable from '@/components/TemplateTable/index.vue'
+export default {
+  components: { templateTable },
+  data() {
+    return {
+      formList: [
+        {
+          label: "工号",
+          prop: "operatorId",
+          type: "input",
+        },
+        {
+          label: "姓名",
+          prop: "name",
+          type: "input",
+        },
+        {
+          label: "录单日期",
+          prop: "time",
+          type: "datePicker",
+        },
+      ],
+      btnGroup:[
+        {
+          name:'导出',
+          slot: true,
+          // click:(row, index) => {return this.handExport()},
+        }
+      ],
+      searchData: {},
+      tableConfig: {
+        columns: [
+          {
+            prop: "operatorId",
+            label: "工号",
+            type: "text"
+          },
+          {
+            prop: "name",
+            label: "姓名",
+            type: "text"
+          },
+          {
+            prop: "count",
+            label: "录单次数",
+            type: "text"
+          },
+          {
+            prop: "orderStatus0",
+            label: "报价中次数",
+            type: "text"
+          },
+          {
+            prop: "orderStatus1",
+            label: "待核保次数",
+            type: "text"
+          },
+          {
+            prop: "orderStatus2",
+            label: "已核保待缴费次数",
+            type: "text"
+          },
+          {
+            prop: "orderStatus3",
+            label: "已承保次数",
+            type: "text"
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+        isShowIndex: true,
+        isCheckBox: true,
+        // optBtns:[
+        //   {
+        //     type:'primary',
+        //     label:'详情',
+        //     click:(row, index) => {return this.haldDetail(row)},
+        // },
+        // ]
+      },
+      tableData: [],
+      pageData: {
+        pageNum: 1,
+        pageSize: 20,
+      },
+      selectionList: [],
+    }
+  },
+  created() {
+    this.findPage()
+  },
+  methods: {
+    // 多选
+    selectionChange(data) {
+      this.selectionList = []
+      if (data && data.length) {
+        data.forEach((val) => {
+          this.selectionList.push(val.operatorId)
+        })
+      }
+    },
+    // 导出
+    handExport() {
+      // let time = undefined
+      // let createTimeStart = undefined
+      // let createTimeEnd = undefined
+      // if (this.$refs.templateTable.searchDataClone && this.$refs.templateTable.searchDataClone.time) {
+      //   createTimeStart = this.$refs.templateTable.searchDataClone.time[0]
+      //   createTimeEnd = this.$refs.templateTable.searchDataClone.time[1]
+      // }
+      // this.$api.dict.exportHxOrdersCount({...this.$refs.templateTable.searchDataClone, ...this.pageData,createTimeStart, createTimeEnd, time}).then((res) => {
+        this.$api.dict.exportHxOrdersCount({
+          ids: this.selectionList
+        }).then((res) => {
+        if (res.code == 200) {
+          let url = process.env.BASE_URL  + res.data; // 3.创建一个临时的url指向blob对象
+          let a = document.createElement("a");
+          a.href = url;
+          a.download = "导出文件.xlsx";
+          a.click();
+          window.URL.revokeObjectURL(url);
+        }
+      })
+    },
+    findPage(data) {
+      this.tableConfig.loading = true
+      let time = undefined
+      let createTimeStart = undefined
+      let createTimeEnd = undefined
+      if (data && data.time) {
+        createTimeStart = data.time[0]
+        createTimeEnd = data.time[1]
+      }
+      this.$api.dict.queryHxOrdersCount({...data, ...this.pageData,createTimeStart, createTimeEnd, time}).then((res) => {
+        this.tableConfig.loading = false;
+        if (res.code == 200) {
+          this.tableData = res.data.records
+          this.pageData.pageNum = res.data.current
+          this.pageData.pageSize = res.data.size
+          this.pageData.totalSize = res.data.total
+        }
+      })
+    },
+    handleSearchList(data) {
+      this.findPage(data)
+    },
+  },
+}
+</script>
+
+<style></style>