|
|
@@ -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>
|