chenrui 1 bulan lalu
induk
melakukan
10ef0dbfee
1 mengubah file dengan 383 tambahan dan 0 penghapusan
  1. 383 0
      src/views/reportData/billingStatistics/provinceCountList.vue

+ 383 - 0
src/views/reportData/billingStatistics/provinceCountList.vue

@@ -0,0 +1,383 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="provinceCountList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="provinceCountList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="5" :sm="24">
+              <a-form-model-item label="月份" prop="queryDate">
+                <a-month-picker
+                  id="provinceCountList-monthBox"
+                  class="monthBox"
+                  :disabled-date="disabledDate"
+                  v-model="monthVal"
+                  placeholder="请选择月份"
+                  @change="onChangeMonth" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="provinceCountList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-item label="所在区域">
+                <subarea id="provinceCountList-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-model-item label="区域负责人">
+                <BizUser id="provinceCountList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="provinceCountList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="provinceCountList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_tireFeeExport')"
+                id="provinceCountList-export">导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :style="{ height: tableHeight+70+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{x:2200, y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="24" :sm="24">合计:</a-col>
+              <a-col :md="4" :sm="24">箭牌滤清器:{{ (totalData && (totalData.increaseRewardAmount || totalData.increaseRewardAmount==0)) ? toThousands(totalData.increaseRewardAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">箭牌变速箱滤清器:{{ (totalData && (totalData.increaseRewardShareFactory || totalData.increaseRewardShareFactory==0)) ? toThousands(totalData.increaseRewardShareFactory): '--' }}</a-col>
+              <a-col :md="4" :sm="24">冠牌滤清器:{{ (totalData && (totalData.increaseRewardShareSys || totalData.increaseRewardShareSys==0)) ? toThousands(totalData.increaseRewardShareSys): '--' }}</a-col>
+              <a-col :md="4" :sm="24">滤清器合计:{{ (totalData && (totalData.transSubsidy || totalData.transSubsidy==0)) ? toThousands(totalData.transSubsidy): '--' }}</a-col>
+              <a-col :md="4" :sm="24">箭牌雨刮片:{{ (totalData && (totalData.totalPoint || totalData.totalPoint==0)) ? toThousands(totalData.totalPoint): '--' }}</a-col>
+              <a-col :md="4" :sm="24">箭牌雨燕雨刮片:{{ (totalData && (totalData.currentPoint || totalData.currentPoint==0)) ? toThousands(totalData.currentPoint): '--' }}</a-col>
+              <a-col :md="4" :sm="24">冠牌雨刮片:{{ (totalData && (totalData.currentPointShareFactory || totalData.currentPointShareFactory==0)) ? toThousands(totalData.currentPointShareFactory): '--' }}</a-col>
+              <a-col :md="4" :sm="24">雨刮片合计:{{ (totalData && (totalData.currentPointShareSys || totalData.currentPointShareSys==0)) ?toThousands(totalData.currentPointShareSys): '--' }}</a-col>
+              <a-col :md="4" :sm="24">箭牌喇叭:{{ (totalData && (totalData.serviceAmountSys || totalData.serviceAmountSys==0)) ? toThousands(totalData.serviceAmountSys): '--' }}</a-col>
+              <a-col :md="4" :sm="24">箭牌刹车片:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">TBU+箭牌感应线:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">冠牌刹车片:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">TBU刹车片:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">TBU至惠刹车片:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">TBU刹车油:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">TBU-P刹车盘:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">刹车片合计:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">汇箭蓄电池:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">布瑞斯蓄电池:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">蓄电池合计:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">德路斯机油:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">德路斯变速箱油:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">德路斯刹车油:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">德路斯汽车养护产品:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">科润星机油:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">德路斯合计:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">稳升点火线圈:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">稳升LED灯:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">稳升合计:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">合计品牌:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">轮胎:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">NGk火花塞:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">飞利浦:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">代理品牌合计:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">品牌+代理品牌合计:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import moment from 'moment'
+// 组件
+import { STable, VSelect } from '@/components'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
+// 接口
+import { tireFeeReportList, tireFeeReportCount, tireFeeListExport } from '@/api/reportData'
+export default {
+  name: 'ProvinceCountList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList, BizUser },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      monthVal: moment().format('YYYY-MM'), // 初始化月份值
+      //  查询条件
+      queryParam: {
+        queryType: 'month', // 开单统计报表(客户)
+        queryDate: moment().format('YYYYMM'), // 选择月份
+        dealerLevel: undefined, // 客户等级
+        customSn: undefined, // 客户sn
+        dealerEntity: {
+          dealerName: undefined, // 客户名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined // 区
+        },
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '', // 分区
+          bizUserSn: undefined// 区域负责人
+        },
+        bizUserSn: undefined// 客服
+      },
+      totalData: null, // 合计
+      rules: {
+        'queryDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据  有分页
+        return tireFeeReportList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.getCount(params)
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '40px', align: 'center', fixed: 'left' },
+        { title: '月份', dataIndex: 'monthData', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '区域负责人', dataIndex: 'subareaArea.bizUserName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '省份', dataIndex: 'dealerEntity.provinceName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '箭牌滤清器', dataIndex: 'serviceAmountProvince', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '箭牌变速箱滤清器', dataIndex: 'serviceAmountProvince1', width: '110px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '冠牌滤清器', dataIndex: 'serviceAmountProvince2', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '滤清器合计', dataIndex: 'serviceAmountProvince3', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '箭牌雨刮片', dataIndex: 'serviceAmountProvince4', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '箭牌雨燕雨刮片', dataIndex: 'serviceAmountProvince5', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '冠牌雨刮片', dataIndex: 'serviceAmountProvince6', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '雨刮片合计', dataIndex: 'serviceAmountProvince7', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '箭牌喇叭', dataIndex: 'serviceAmountProvince8', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '箭牌刹车片', dataIndex: 'serviceAmountProvince9', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: 'TBU+箭牌感应线', dataIndex: 'serviceAmountProvincea', width: '110px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '冠牌刹车片', dataIndex: 'serviceAmountProvincec', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: 'TBU刹车片', dataIndex: 'serviceAmountProvinceb', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: 'TBU至惠刹车片', dataIndex: 'serviceAmountProvinced', width: '110px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: 'TBU刹车油', dataIndex: 'serviceAmountProvincee', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: 'TBU-P刹车盘', dataIndex: 'serviceAmountProvincef', width: '110px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '刹车片合计', dataIndex: 'serviceAmountProvinceg', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '汇箭蓄电池', dataIndex: 'serviceAmountProvinceh', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '布瑞斯蓄电池', dataIndex: 'serviceAmountProvincei', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '蓄电池合计', dataIndex: 'serviceAmountProvincej', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '德路斯机油', dataIndex: 'serviceAmountProvincel', width: '90px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '德路斯变速箱油', dataIndex: 'serviceAmountProvincek', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '德路斯刹车油', dataIndex: 'serviceAmountProvincel6656', width: '90px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '德路斯汽车养护产品', dataIndex: 'serviceAmountProvincem', width: '120px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '科润星机油', dataIndex: 'serviceAmountProvince12', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '润滑油合计', dataIndex: 'serviceAmountProvince13', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '稳升点火线圈', dataIndex: 'serviceAmountProvince14', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '稳升LED灯', dataIndex: 'serviceAmountProvince15', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '稳升合计', dataIndex: 'serviceAmountProvince16', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '品牌合计', dataIndex: 'serviceAmountProvince17', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '轮胎', dataIndex: 'serviceAmountProvince18', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: 'NGk火花塞', dataIndex: 'serviceAmountProvince19', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '飞利浦', dataIndex: 'serviceAmountProvince20', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '代理品牌合计', dataIndex: 'serviceAmountProvince21', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '合计', dataIndex: 'serviceAmountProvince22', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+      ]
+      return arr
+    }
+
+  },
+  methods: {
+    // 选择月份  禁用选择当月以后日期
+    disabledDate (current) {
+      return current && current >= moment().endOf('day')
+    },
+    // 选择月份 change
+    onChangeMonth (date, dateString) {
+      this.monthVal = dateString
+      if (date && dateString != '') {
+        this.queryParam.queryDate = dateString.replace('-', '')
+      } else {
+        this.queryParam.queryDate = void 0
+      }
+    },
+    // 查询
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          _this.$message.error('请选择查询月份')
+          return false
+        }
+      })
+    },
+    // 客户名称 change
+    custChange (val) {
+      this.queryParam.dealerEntity.dealerName = val.name
+      this.queryParam.customSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      tireFeeReportCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 地区
+    areaChange (val) {
+      this.queryParam.dealerEntity.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.dealerEntity.citySn = val[1] ? val[1] : undefined
+      this.queryParam.dealerEntity.districtSn = val[2] ? val[2] : undefined
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : ''
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.queryType = 'month'
+      this.monthVal = moment().format('YYYY-MM')
+      this.queryParam.queryDate = moment().format('YYYYMM')
+      this.queryParam.dealerEntity.provinceSn = undefined
+      this.queryParam.dealerEntity.citySn = undefined
+      this.queryParam.dealerEntity.districtSn = undefined
+      this.queryParam.dealerEntity.dealerName = undefined
+      this.queryParam.customSn = undefined
+      this.queryParam.bizUserSn = undefined
+      this.queryParam.subareaArea.subareaSn = ''
+      this.queryParam.subareaArea.subareaAreaSn = ''
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.provinceFlag = undefined
+      this.$refs.subarea.clearData()
+      this.$refs.dealerSubareaScopeList.resetForm()
+      this.totalData = null
+      this.$refs.areaList.clearData()
+      this.$refs.table.clearTable()
+      this.$refs.ruleForm.resetFields()
+    },
+    //  导出  必填判断
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.exportList()
+        } else {
+          _this.$message.error('请选择查询月份')
+          return false
+        }
+      })
+    },
+    // 导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(tireFeeListExport, params, '轮胎月度费用报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+      this.resetSearchForm()
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .monthBox{
+    width: 100%;
+    /deep/.ant-calendar-picker-icon{
+      display:none !important;
+    }
+    /deep/.ant-calendar-picker input{
+      text-align:center;
+    }
+  }
+</style>