浏览代码

轮胎费用报表

chenrui 11 月之前
父节点
当前提交
9872e69b91

+ 25 - 0
src/config/router.config.js

@@ -1904,6 +1904,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/tireFeeReport',
+            redirect: '/reportData/tireFeeReport/index',
+            name: 'tireFeeReport',
+            component: BlankLayout,
+            meta: {
+              title: '轮胎费用报表',
+              icon: 'profile'
+              // permission: 'M_tireFeeReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'tireFeeReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/tireFeeReport/index.vue'),
+                meta: {
+                  title: '轮胎费用报表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_tireFeeReportList'
+                }
+              }
+            ]
+          },
           {
             path: '/reportData/allocationOrderTotal',
             redirect: '/reportData/allocationOrderTotal/list',

+ 123 - 0
src/views/common/monthDate.vue

@@ -0,0 +1,123 @@
+<template>
+  <!-- 季度选择器 -->
+  <div class="quarter-date-box">
+    <div class="quarter-date-year">
+      <a-select
+        style="width: 100%"
+        :size="size"
+        placeholder="请选择年份"
+        :value="currYear"
+        @change="changeYear"
+        allowClear>
+        <a-select-option v-for="item in years" :value="item" :key="item">
+          {{ item }}
+        </a-select-option>
+      </a-select>
+    </div>
+    <div class="quarter-date-jd">
+      <a-select
+        style="width: 100%"
+        :size="size"
+        placeholder="请选择季度"
+        :value="currJd"
+        @change="changeJd"
+        allowClear>
+        <a-select-option v-for="item in quarter" :disabled="item.isToChoose" :value="item.id" :key="item.id">
+          {{ item.val }}
+        </a-select-option>
+      </a-select>
+    </div>
+  </div>
+</template>
+<script>
+import getDate from '@/libs/getDate.js'
+export default {
+  props: {
+    value: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    size: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data () {
+    return {
+      date: this.value,
+      toYears: new Date().getFullYear(), // 今年
+      // quarter: [{ id: 1, val: '一季度' }, { id: 2, val: '二季度' }, { id: 3, val: '三季度' }, { id: 4, val: '四季度' }], // 季度
+      currYear: this.toYears,
+      currJd: undefined
+    }
+  },
+  computed: {
+    years () {
+      const years = []
+      const lens = (this.toYears - 2024) + 1
+      for (let i = 0; i < lens; i++) {
+        years.push(this.toYears - i)
+      }
+      return years
+    },
+    quarter () {
+      const quarterData = [{ id: 1, val: '一季度' }, { id: 2, val: '二季度' }, { id: 3, val: '三季度' }, { id: 4, val: '四季度' }]
+      const now = new Date()
+      const month = now.getMonth()
+      const numInfo = Math.floor(month / 3) + 1
+      quarterData.map(item => {
+        if (numInfo * 1 + 1 === item.id) {
+          item.isToChoose = true
+        } else {
+          item.isToChoose = false
+        }
+      })
+      return quarterData
+    }
+  },
+  watch: {
+    value (val) {
+      this.date = val
+      if (val.length > 0) {
+        this.currYear = val[0]
+        this.currJd = val[1]
+      }
+    }
+  },
+  methods: {
+    changeYear (val) {
+      this.currYear = val
+      const valStr = getDate.getQuarterByYear(this.currYear, this.currJd)
+      this.$emit('input', [this.currYear, this.currJd], valStr)
+      this.$emit('change', [this.currYear, this.currJd], valStr)
+    },
+    changeJd (val) {
+      this.currJd = val
+      const valStr = getDate.getQuarterByYear(this.currYear, this.currJd)
+      this.$emit('input', [this.currYear, this.currJd], valStr)
+      this.$emit('change', [this.currYear, this.currJd], valStr)
+    },
+    resetDate () {
+      this.currYear = this.toYears
+      this.currJd = undefined
+      this.$emit('input', [this.currYear, this.currJd], null)
+      this.$emit('change', [this.currYear, this.currJd], null)
+    }
+  }
+}
+</script>
+<style lange="less">
+.quarter-date-box{
+  display: flex;
+  align-items: center;
+  width:100%;
+  .quarter-date-year{
+    flex:1;
+  }
+  .quarter-date-jd{
+    flex:1;
+  }
+}
+</style>

+ 31 - 5
src/views/common/quarterDate.vue

@@ -2,15 +2,27 @@
   <!-- 季度选择器 -->
   <div class="quarter-date-box">
     <div class="quarter-date-year">
-      <a-select style="width: 100%" :size="size" :value="currYear" @change="changeYear">
+      <a-select
+        style="width: 100%"
+        :size="size"
+        placeholder="请选择年份"
+        :value="currYear"
+        @change="changeYear"
+        allowClear>
         <a-select-option v-for="item in years" :value="item" :key="item">
           {{ item }}
         </a-select-option>
       </a-select>
     </div>
     <div class="quarter-date-jd">
-      <a-select style="width: 100%" :size="size" :value="currJd" @change="changeJd">
-        <a-select-option v-for="item in quarter" :value="item.id" :key="item.id">
+      <a-select
+        style="width: 100%"
+        :size="size"
+        placeholder="请选择季度"
+        :value="currJd"
+        @change="changeJd"
+        allowClear>
+        <a-select-option v-for="item in quarter" :disabled="item.isToChoose" :value="item.id" :key="item.id">
           {{ item.val }}
         </a-select-option>
       </a-select>
@@ -36,7 +48,7 @@ export default {
     return {
       date: this.value,
       toYears: new Date().getFullYear(), // 今年
-      quarter: [{ id: 1, val: '一季度' }, { id: 2, val: '二季度' }, { id: 3, val: '三季度' }, { id: 4, val: '四季度' }], // 季度
+      // quarter: [{ id: 1, val: '一季度' }, { id: 2, val: '二季度' }, { id: 3, val: '三季度' }, { id: 4, val: '四季度' }], // 季度
       currYear: this.toYears,
       currJd: undefined
     }
@@ -44,11 +56,25 @@ export default {
   computed: {
     years () {
       const years = []
-      const lens = (this.toYears - 2024) + 1
+      const lens = (this.toYears - 2023) + 1
       for (let i = 0; i < lens; i++) {
         years.push(this.toYears - i)
       }
       return years
+    },
+    quarter () {
+      const quarterData = [{ id: 1, val: '一季度' }, { id: 2, val: '二季度' }, { id: 3, val: '三季度' }, { id: 4, val: '四季度' }]
+      const now = new Date()
+      const month = now.getMonth()
+      const numInfo = Math.floor(month / 3) + 1
+      quarterData.map(item => {
+        if (numInfo * 1 + 1 === item.id) {
+          item.isToChoose = true
+        } else {
+          item.isToChoose = false
+        }
+      })
+      return quarterData
     }
   },
   watch: {

+ 427 - 0
src/views/reportData/tireFeeReport/feeDetailList.vue

@@ -0,0 +1,427 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="tireSalesReportList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="统计月份" prop="time">
+                <rangeDate
+                  ref="rangeDate"
+                  id="tireSalesReportList-time"
+                  :showTime="false"
+                  :today="false"
+                  :value="queryParam.time"
+                  @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域/分区">
+                <subarea id="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesReportList-dealerName" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="商户级别">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="tireSalesReportList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="tireSalesReportList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择轮胎省仓"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="tireSalesReportList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="tireSalesReportList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport(0)"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_tireReportExport')"
+                id="tireSalesReportList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </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:2500, y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="addressInfo" slot-scope="text, record">
+            {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              v-if="$hasPermissions('B_outDetailShow')"
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleOutDetail(record)"
+              id="tireSalesReportList-outDetail">出库明细</a-button>
+            <span v-else>--</span>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台出库数量:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">省仓出库加盟商:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">运费补贴:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">积分合计:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">积分工厂承担60%:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">积分供应链管理部承担40%:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">开单金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">平台服务费:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">省仓服务费:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    <!-- 出库明细弹窗 -->
+    <outDetailModal ref="outDetail" :openModal="showOutDetail" @close="showOutDetail=false"></outDetailModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
+import reportModal from '@/views/common/reportModal.vue'
+// import outDetailModal from './outDetailModal'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
+import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
+export default {
+  name: 'TireSalesReportList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        bizBeginDate: '', // 开始时间
+        bizEndDate: '', // 结束时间
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        dealerLevel: undefined, // 客户等级
+        dealerName: undefined, // 客户名称
+        dealerSn: undefined, // 客户sn
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined // 区域负责人
+        },
+        productWord: '', // 产品编码/原厂编码
+        productName: '' // 产品名称
+      },
+      totalData: null, // 合计
+      showOutDetail: false, // 出库明细弹窗
+      rules: {
+        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const oldParams = Object.assign(parameter, this.queryParam)
+        const params = JSON.parse(JSON.stringify(oldParams))
+        delete params.time
+        // 获取列表数据  有分页
+        return tireReportDetailList(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: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '轮胎省仓', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品尺寸', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '积分值', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '平台出库数量', dataIndex: 'crossRegionQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓出库加盟商数量', dataIndex: 'putQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '运费补贴', dataIndex: 'rptDealerStockVO.totalStockQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '积分合计', dataIndex: 'outQtyDealer', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '积分工厂承担60%', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '积分供应链管理部承担40%', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '开单金额', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '平台服务费率', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓服务费率', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '平台服务费', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓服务费', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 查询
+    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.dealerName = val.name
+      this.queryParam.dealerSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      queryTireDetailCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 出库明细
+    handleOutDetail (row) {
+      const params = {
+        bizBeginDate: this.queryParam.bizBeginDate,
+        bizEndDate: this.queryParam.bizEndDate,
+        dealerSn: row.dealerSn,
+        productSn: row.productSn
+      }
+      this.showOutDetail = true
+      const titObj = {
+        tit: row.dealerEntity.dealerName,
+        code: row.productEntity.code
+      }
+      this.$nextTick(() => {
+        this.$refs.outDetail.getAjaxData(params, titObj)
+      })
+    },
+    // 地区
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.districtSn = val[2] ? val[2] : undefined
+    },
+    //  日期选择  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.bizBeginDate = date[0] ? date[0].replace(/-/g, '') : ''
+      this.queryParam.bizEndDate = date[1] ? date[1].replace(/-/g, '') : ''
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.bizBeginDate = ''
+      this.queryParam.bizEndDate = ''
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.productWord = undefined
+      this.queryParam.productName = 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 (pos) {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          if (pos == 0) {
+            _this.exportList()
+          } else {
+            _this.exportOutDetailList()
+          }
+        } else {
+          _this.$message.error('请选择日期')
+          return false
+        }
+      })
+    },
+    // 轮胎明细报表导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireReportExport'
+      params.exportFlag = 1
+      delete params.time
+      hdExportExcel(tireListExport, params, '轮胎明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 轮胎出库明细报表  导出
+    exportOutDetailList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireDetailExport'
+      delete params.time
+      hdExportExcel(tireOutDetailListExport, params, '轮胎出库明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+    },
+    // 计算表格高度
+    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()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 75 - 0
src/views/reportData/tireFeeReport/index.vue

@@ -0,0 +1,75 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false">
+      <a-tabs default-active-key="1" @change="handleChange">
+        <a-tab-pane key="1" tab="轮胎月度费用报表">
+          <monthQueryList ref="tireStatisticsList"></monthQueryList>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="轮胎季度费用报表" force-render>
+          <quarterQueryList ref="tireDetailList"></quarterQueryList>
+        </a-tab-pane>
+        <a-tab-pane key="3" tab="轮胎年度费用报表" force-render>
+          <yearQueryList ref="tireDetailList"></yearQueryList>
+        </a-tab-pane>
+        <a-tab-pane key="4" tab="轮胎费用明细报表" force-render>
+          <feeDetailList ref="tireDetailList"></feeDetailList>
+        </a-tab-pane>
+      </a-tabs>
+    </a-card>
+  </div>
+</template>
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import monthQueryList from './monthQueryList.vue'
+import quarterQueryList from './quarterQueryList.vue'
+import yearQueryList from './yearQueryList.vue'
+import feeDetailList from './feeDetailList.vue'
+export default {
+  name: 'TireFeeReportIndex',
+  mixins: [commonMixin],
+  components: { monthQueryList, quarterQueryList, yearQueryList, feeDetailList },
+  data () {
+    return {
+      tabVal: 1 // tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表
+    }
+  },
+  methods: {
+    // 切换tab值  change
+    handleChange (val) {
+      this.tabVal = val
+    },
+    // 初始化
+    pageInit () {
+      if (this.tabVal == 1) {
+        this.$refs.tireStatisticsList.pageInit()
+      } else {
+        this.$refs.tireDetailList.pageInit()
+      }
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+  }
+}
+
+</script>
+
+<style lang="less" scoped>
+  .monthBox{
+    /deep/.ant-calendar-picker-icon{
+      display:none !important;
+    }
+    /deep/.ant-calendar-picker input{
+      text-align:center;
+    }
+  }
+</style>

+ 416 - 0
src/views/reportData/tireFeeReport/monthQueryList.vue

@@ -0,0 +1,416 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="tireSalesReportList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="查询月份" prop="time">
+                <rangeDate
+                  ref="rangeDate"
+                  id="tireSalesReportList-time"
+                  :showTime="false"
+                  :today="false"
+                  :value="queryParam.time"
+                  @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域/分区">
+                <subarea id="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesReportList-dealerName" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户级别">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="tireSalesReportList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="tireSalesReportList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择是否是轮胎省仓"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="tireSalesReportList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="tireSalesReportList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport(0)"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_tireReportExport')"
+                id="tireSalesReportList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </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="{ y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="addressInfo" slot-scope="text, record">
+            {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              v-if="$hasPermissions('B_outDetailShow')"
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleOutDetail(record)"
+              id="tireSalesReportList-outDetail">出库明细</a-button>
+            <span v-else>--</span>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="3" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">运费补贴:{{ (totalData && (totalData.sysOrderAmount || totalData.sysOrderAmount==0)) ? toThousands(totalData.sysOrderAmount): '--' }}</a-col>
+              <a-col :md="3" :sm="24"> 积分合计:{{ (totalData && (totalData.upOrderQty || totalData.upOrderQty==0)) ?totalData.upOrderQty: '--' }}</a-col>
+              <a-col :md="4" :sm="24">积分工厂承担60%:{{ (totalData && (totalData.crossRegionQty || totalData.crossRegionQty==0)) ?totalData.crossRegionQty: '--' }}</a-col>
+              <a-col :md="6" :sm="24">积分供应链管理部承担40%:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ?totalData.putQty: '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台服务费:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">省仓服务费:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    <!-- 出库明细弹窗 -->
+    <outDetailModal ref="outDetail" :openModal="showOutDetail" @close="showOutDetail=false"></outDetailModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
+import reportModal from '@/views/common/reportModal.vue'
+// import outDetailModal from './outDetailModal'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
+import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
+export default {
+  name: 'TireSalesReportList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        bizBeginDate: '', // 开始时间
+        bizEndDate: '', // 结束时间
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        dealerLevel: undefined, // 客户等级
+        dealerName: undefined, // 客户名称
+        dealerSn: undefined, // 客户sn
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined // 区域负责人
+        },
+        productWord: '', // 产品编码/原厂编码
+        productName: '' // 产品名称
+      },
+      totalData: null, // 合计
+      showOutDetail: false, // 出库明细弹窗
+      rules: {
+        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const oldParams = Object.assign(parameter, this.queryParam)
+        const params = JSON.parse(JSON.stringify(oldParams))
+        delete params.time
+        // 获取列表数据  有分页
+        return tireReportDetailList(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: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '轮胎省仓', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: <div>平台出库<div>数量</div></div>, dataIndex: 'sysOrderQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <div>省仓出库加<div>盟商数量</div></div>, dataIndex: 'upOrderQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '运费补贴', dataIndex: 'crossRegionQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '积分合计', dataIndex: 'putQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <div>积分工厂<div>承担60%</div></div>, dataIndex: 'rptDealerStockVO.totalStockQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <div>积分供应链管理部<div>承担40%</div></div>, dataIndex: 'outQtyDealer', width: '18%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '平台服务费', dataIndex: 'returnQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓服务费', dataIndex: 'returnQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 查询
+    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.dealerName = val.name
+      this.queryParam.dealerSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      queryTireDetailCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 出库明细
+    handleOutDetail (row) {
+      const params = {
+        bizBeginDate: this.queryParam.bizBeginDate,
+        bizEndDate: this.queryParam.bizEndDate,
+        dealerSn: row.dealerSn,
+        productSn: row.productSn
+      }
+      this.showOutDetail = true
+      const titObj = {
+        tit: row.dealerEntity.dealerName,
+        code: row.productEntity.code
+      }
+      this.$nextTick(() => {
+        this.$refs.outDetail.getAjaxData(params, titObj)
+      })
+    },
+    // 地区
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.districtSn = val[2] ? val[2] : undefined
+    },
+    //  日期选择  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.bizBeginDate = date[0] ? date[0].replace(/-/g, '') : ''
+      this.queryParam.bizEndDate = date[1] ? date[1].replace(/-/g, '') : ''
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.bizBeginDate = ''
+      this.queryParam.bizEndDate = ''
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.productWord = undefined
+      this.queryParam.productName = 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 (pos) {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          if (pos == 0) {
+            _this.exportList()
+          } else {
+            _this.exportOutDetailList()
+          }
+        } else {
+          _this.$message.error('请选择日期')
+          return false
+        }
+      })
+    },
+    // 轮胎明细报表导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireReportExport'
+      params.exportFlag = 1
+      delete params.time
+      hdExportExcel(tireListExport, params, '轮胎明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 轮胎出库明细报表  导出
+    exportOutDetailList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireDetailExport'
+      delete params.time
+      hdExportExcel(tireOutDetailListExport, params, '轮胎出库明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+    },
+    // 计算表格高度
+    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()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 391 - 0
src/views/reportData/tireFeeReport/quarterQueryList.vue

@@ -0,0 +1,391 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="tireSalesReportList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="查询季度" prop="time">
+                <quarterDate ref="quarterDate" id="tireSalesReportList-time" :value="queryParam.time" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域/分区">
+                <subarea id="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesReportList-dealerName" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户级别">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="tireSalesReportList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="tireSalesReportList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="tireSalesReportList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport(0)"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_tireReportExport')"
+                id="tireSalesReportList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </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="{ y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="addressInfo" slot-scope="text, record">
+            {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              v-if="$hasPermissions('B_outDetailShow')"
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleOutDetail(record)"
+              id="tireSalesReportList-outDetail">出库明细</a-button>
+            <span v-else>--</span>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">广宣品费用:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    <!-- 出库明细弹窗 -->
+    <outDetailModal ref="outDetail" :openModal="showOutDetail" @close="showOutDetail=false"></outDetailModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+import { STable, VSelect } from '@/components'
+import quarterDate from '@/views/common/quarterDate.vue'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
+import reportModal from '@/views/common/reportModal.vue'
+// import outDetailModal from './outDetailModal'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
+import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
+export default {
+  name: 'TireSalesReportList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, quarterDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        bizBeginDate: '', // 开始时间
+        bizEndDate: '', // 结束时间
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        dealerLevel: undefined, // 客户等级
+        dealerName: undefined, // 客户名称
+        dealerSn: undefined, // 客户sn
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined // 区域负责人
+        },
+        productWord: '', // 产品编码/原厂编码
+        productName: '' // 产品名称
+      },
+      totalData: null, // 合计
+      showOutDetail: false, // 出库明细弹窗
+      rules: {
+        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const oldParams = Object.assign(parameter, this.queryParam)
+        const params = JSON.parse(JSON.stringify(oldParams))
+        delete params.time
+        // 获取列表数据  有分页
+        return tireReportDetailList(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: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '平台出库数量', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '开单金额', dataIndex: 'crossRegionQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '广宣品费用', dataIndex: 'putQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '平台返利点数', dataIndex: 'rptDealerStockVO.totalStockQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓返利点数', dataIndex: 'outQtyDealer', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '平台返利金额', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓返利金额', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 查询
+    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.dealerName = val.name
+      this.queryParam.dealerSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      queryTireDetailCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 出库明细
+    handleOutDetail (row) {
+      const params = {
+        bizBeginDate: this.queryParam.bizBeginDate,
+        bizEndDate: this.queryParam.bizEndDate,
+        dealerSn: row.dealerSn,
+        productSn: row.productSn
+      }
+      this.showOutDetail = true
+      const titObj = {
+        tit: row.dealerEntity.dealerName,
+        code: row.productEntity.code
+      }
+      this.$nextTick(() => {
+        this.$refs.outDetail.getAjaxData(params, titObj)
+      })
+    },
+    // 地区
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.districtSn = val[2] ? val[2] : undefined
+    },
+    //  日期选择  change
+    dateChange (date, valstr) {
+      console.log(date, valstr)
+      this.queryParam.time = date[0] && date[1] ? date : []
+      this.queryParam.beginDate = valStr ? valStr.start : ''
+      this.queryParam.endDate = valStr ? valStr.end : ''
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.bizBeginDate = ''
+      this.queryParam.bizEndDate = ''
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.productWord = undefined
+      this.queryParam.productName = 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 (pos) {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          if (pos == 0) {
+            _this.exportList()
+          } else {
+            _this.exportOutDetailList()
+          }
+        } else {
+          _this.$message.error('请选择日期')
+          return false
+        }
+      })
+    },
+    // 轮胎明细报表导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireReportExport'
+      params.exportFlag = 1
+      delete params.time
+      hdExportExcel(tireListExport, params, '轮胎明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 轮胎出库明细报表  导出
+    exportOutDetailList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireDetailExport'
+      delete params.time
+      hdExportExcel(tireOutDetailListExport, params, '轮胎出库明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+    },
+    // 计算表格高度
+    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()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 412 - 0
src/views/reportData/tireFeeReport/yearQueryList.vue

@@ -0,0 +1,412 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="tireSalesReportList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="查询年份" prop="time">
+                <a-select style="width: 100%" placeholder="请选择年份" :value="currYear" @change="changeYear" allowClear>
+                  <a-select-option v-for="item in years" :value="item" :key="item">
+                    {{ item }}
+                  </a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域/分区">
+                <subarea id="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesReportList-dealerName" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户级别">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="tireSalesReportList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="tireSalesReportList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="tireSalesReportList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport(0)"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_tireReportExport')"
+                id="tireSalesReportList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </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="{ y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="addressInfo" slot-scope="text, record">
+            {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              v-if="$hasPermissions('B_outDetailShow')"
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleOutDetail(record)"
+              id="tireSalesReportList-outDetail">出库明细</a-button>
+            <span v-else>--</span>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台返利金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    <!-- 出库明细弹窗 -->
+    <outDetailModal ref="outDetail" :openModal="showOutDetail" @close="showOutDetail=false"></outDetailModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
+import reportModal from '@/views/common/reportModal.vue'
+// import outDetailModal from './outDetailModal'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
+import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
+export default {
+  name: 'TireSalesReportList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      yearOpen: false,
+      toYears: new Date().getFullYear(), // 今年
+      currYear: undefined,
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        bizBeginDate: '', // 开始时间
+        bizEndDate: '', // 结束时间
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        dealerLevel: undefined, // 客户等级
+        dealerName: undefined, // 客户名称
+        dealerSn: undefined, // 客户sn
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined // 区域负责人
+        },
+        productWord: '', // 产品编码/原厂编码
+        productName: '' // 产品名称
+      },
+      totalData: null, // 合计
+      yearInfo: '',
+      showOutDetail: false, // 出库明细弹窗
+      rules: {
+        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const oldParams = Object.assign(parameter, this.queryParam)
+        const params = JSON.parse(JSON.stringify(oldParams))
+        delete params.time
+        // 获取列表数据  有分页
+        return tireReportDetailList(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: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    years () {
+      const years = []
+      const lens = (this.toYears - 2023) + 1
+      for (let i = 0; i < lens; i++) {
+        years.push(this.toYears - i)
+      }
+      return years
+    },
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '平台出库数量', dataIndex: 'productEntity.code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '开单金额', dataIndex: 'crossRegionQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '平台返利点数', dataIndex: 'rptDealerStockVO.totalStockQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓返利点数', dataIndex: 'outQtyDealer', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '平台返利金额', dataIndex: 'returnQty1', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省仓返利金额', dataIndex: 'returnQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    changeYear (val) {
+      debugger
+      this.currYear = val
+    },
+    // 查询
+    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.dealerName = val.name
+      this.queryParam.dealerSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      queryTireDetailCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 出库明细
+    handleOutDetail (row) {
+      const params = {
+        bizBeginDate: this.queryParam.bizBeginDate,
+        bizEndDate: this.queryParam.bizEndDate,
+        dealerSn: row.dealerSn,
+        productSn: row.productSn
+      }
+      this.showOutDetail = true
+      const titObj = {
+        tit: row.dealerEntity.dealerName,
+        code: row.productEntity.code
+      }
+      this.$nextTick(() => {
+        this.$refs.outDetail.getAjaxData(params, titObj)
+      })
+    },
+    // 地区
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.districtSn = val[2] ? val[2] : undefined
+    },
+    //  日期选择  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.bizBeginDate = date[0] ? date[0].replace(/-/g, '') : ''
+      this.queryParam.bizEndDate = date[1] ? date[1].replace(/-/g, '') : ''
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.bizBeginDate = ''
+      this.queryParam.bizEndDate = ''
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.productWord = undefined
+      this.queryParam.productName = 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 (pos) {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          if (pos == 0) {
+            _this.exportList()
+          } else {
+            _this.exportOutDetailList()
+          }
+        } else {
+          _this.$message.error('请选择日期')
+          return false
+        }
+      })
+    },
+    // 轮胎明细报表导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireReportExport'
+      params.exportFlag = 1
+      delete params.time
+      hdExportExcel(tireListExport, params, '轮胎明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 轮胎出库明细报表  导出
+    exportOutDetailList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      _this.$store.state.app.curActionPermission = 'B_tireDetailExport'
+      delete params.time
+      hdExportExcel(tireOutDetailListExport, params, '轮胎出库明细报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+    },
+    // 计算表格高度
+    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()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>