Explorar el Código

轮胎费用报表

chenrui hace 10 meses
padre
commit
6244310ec8

+ 42 - 0
src/api/reportData.js

@@ -1312,6 +1312,48 @@ export const tireOutDetailListExport = (params) => {
     }
   })
 }
+
+/*
+*   轮胎费用报表
+*/
+
+// 轮胎费用报表   列表
+export const tireFeeReportList = (params) => {
+  const url = `/report/tireFee/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 轮胎费用报表  统计
+export const tireFeeReportCount = (params) => {
+  return axios({
+    url: '/report/tireFee/reportCount',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 轮胎费用报表  导出
+export const tireFeeListExport = (params) => {
+  return axios({
+    url: '/report/tireFee/importExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}
+
 // 促销销售单报表(统计)
 export const brandTypeReportList = (params) => {
   const url = `/report/brandTypeReport/queryPage/${params.pageNo}/${params.pageSize}`

+ 10 - 6
src/libs/getDate.js

@@ -145,11 +145,15 @@ export default {
   },
   // 获取某年某季度的开始和结束时间
   getQuarterByYear (year, quarter) {
-     const start = moment([year]).quarter(quarter).startOf('quarter');
-       const end = moment([year]).quarter(quarter).endOf('quarter');
-       return {
-         start: start.format('YYYY-MM-DD 00:00:00'),
-         end: end.format('YYYY-MM-DD 23:59:59')
-       };
+    if (year && quarter) {
+      const start = moment([year]).quarter(quarter).startOf('quarter')
+      const end = moment([year]).quarter(quarter).endOf('quarter')
+      return {
+        start: start.format('YYYY-MM-DD 00:00:00'),
+        end: end.format('YYYY-MM-DD 23:59:59')
+      }
+    } else {
+      return {}
+    }
   }
 }

+ 119 - 134
src/views/reportData/tireFeeReport/monthQueryList.vue

@@ -12,8 +12,14 @@
           :model="queryParam">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="查询月份" prop="time">
-                <a-month-picker class="monthBox" :disabled-date="disabledDate" v-model="monthVal" placeholder="请选择月份" @change="onChangeMonth" />
+              <a-form-model-item label="查询月份" prop="beginDate">
+                <a-month-picker
+                  id="monthQueryList-monthBox"
+                  class="monthBox"
+                  :disabled-date="disabledDate"
+                  v-model="monthVal"
+                  placeholder="请选择月份"
+                  @change="onChangeMonth" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -34,13 +40,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="轮胎省仓名称">
-                  <v-select
-                    v-model="queryParam.dealerLevel"
-                    ref="dealerLevel"
-                    id="monthQueryList-dealerLevel"
-                    code="DEALER_LEVEL"
-                    placeholder="请输入轮胎省仓名称"
-                    allowClear></v-select>
+                  <dealerSubareaScopeList ref="provinceDealerList" placeholder="请输入轮胎省仓名称" id="monthQueryList-provinceDealerName" @change="custProvinceChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -56,13 +56,14 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="轮胎省仓">
-                  <v-select
-                    v-model="queryParam.dealerLevel"
-                    ref="dealerLevel"
-                    id="monthQueryList-dealerLevel"
-                    code="DEALER_LEVEL"
-                    placeholder="请选择是否是轮胎省仓"
-                    allowClear></v-select>
+                  <a-select id="monthQueryList-provinceFlag" placeholder="请选择是否是轮胎省仓" v-model="queryParam.provinceFlag">
+                    <a-select-option value="1">
+                      是
+                    </a-select-option>
+                    <a-select-option value="0">
+                      否
+                    </a-select-option>
+                  </a-select>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -81,7 +82,7 @@
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
-                @click="handleExport(0)"
+                @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireReportExport')"
@@ -114,19 +115,22 @@
           <template slot="addressInfo" slot-scope="text, record">
             {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
           </template>
-          <!-- v-if="$hasPermissions('M_monthQueryList_salesPrice')" -->
+          <!-- 是否是省仓客户 -->
+          <template slot="provinceFlag" slot-scope="text, record">
+            {{ record.provinceFlag?record.provinceFlag==0?'否':'是':'--' }}
+          </template>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="4" :sm="24">总量提升奖励:{{ (totalData && (totalData.sysOrderAmount || totalData.sysOrderAmount==0)) ? toThousands(totalData.sysOrderAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24">总量工厂承担60%:{{ (totalData && (totalData.upOrderQty || totalData.upOrderQty==0)) ?totalData.upOrderQty: '--' }}</a-col>
-              <a-col :md="5" :sm="24">总量供应链管理部承担40%:{{ (totalData && (totalData.upOrderQty || totalData.upOrderQty==0)) ?totalData.upOrderQty: '--' }}</a-col>
-              <a-col :md="4" :sm="24">运费补贴:{{ (totalData && (totalData.upOrderQty || totalData.upOrderQty==0)) ?totalData.upOrderQty: '--' }}</a-col>
-              <a-col :md="4" :sm="24">累计积分:{{ (totalData && (totalData.upOrderQty || totalData.upOrderQty==0)) ?totalData.upOrderQty: '--' }}</a-col>
-              <a-col :md="4" :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="5" :sm="24">积分供应链管理部承担40%:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ?totalData.putQty: '--' }}</a-col>
-              <a-col :md="4" :sm="24">平台服务费:{{ (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.increaseRewardAmount || totalData.increaseRewardAmount==0)) ? toThousands(totalData.increaseRewardAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">总量工厂承担60%:{{ (totalData && (totalData.increaseRewardShareFactory || totalData.increaseRewardShareFactory==0)) ? toThousands(totalData.increaseRewardShareFactory): '--' }}</a-col>
+              <a-col :md="5" :sm="24">总量供应链管理部承担40%:{{ (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">积分工厂承担60%:{{ (totalData && (totalData.currentPointShareFactory || totalData.currentPointShareFactory==0)) ? toThousands(totalData.currentPointShareFactory): '--' }}</a-col>
+              <a-col :md="5" :sm="24">积分供应链管理部承担40%:{{ (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-row>
           </template>
         </s-table>
@@ -134,8 +138,6 @@
     </a-card>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-    <!-- 出库明细弹窗 -->
-    <outDetailModal ref="outDetail" :openModal="showOutDetail" @close="showOutDetail=false"></outDetailModal>
   </div>
 </template>
 
@@ -147,16 +149,14 @@ 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 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'
+import { tireFeeReportList, tireFeeReportCount, tireFeeListExport } from '@/api/reportData'
 export default {
   name: 'MonthQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, reportModal },
   data () {
     return {
       spinning: false,
@@ -165,30 +165,33 @@ export default {
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
       showExport: false, // 导出弹窗
-      monthVal: undefined,
+      monthVal: moment().format('YYYY-MM'), // 初始化月份值
       //  查询条件
       queryParam: {
-        time: [], // 日期
-        bizBeginDate: '', // 开始时间
-        bizEndDate: '', // 结束时间
+        queryType: 'month', // 轮胎月度费用报表
+        beginDate: this.getMonthDetailDay().firstDay, // 开始时间
+        endDate: this.getMonthDetailDay().lastDay, // 结束时间
         provinceSn: undefined, // 省
         citySn: undefined, // 市
         districtSn: undefined, // 区
         dealerLevel: undefined, // 客户等级
-        dealerName: undefined, // 客户名称
-        dealerSn: undefined, // 客户sn
+        customSn: undefined, // 客户sn
+        parentDealerSn: undefined, // 轮胎省仓sn
+        dealerEntity: {
+          dealerName: undefined // 客户名称
+        },
+        parentDealerEntity: {
+          dealerName: undefined // 轮胎省仓名称
+        },
         subareaArea: {
-          subareaSn: undefined, // 区域
-          subareaAreaSn: undefined, // 分区
-          bizUserSn: undefined // 区域负责人
+          subareaSn: '', // 区域
+          subareaAreaSn: '' // 分区
         },
-        productWord: '', // 产品编码/原厂编码
-        productName: '' // 产品名称
+        provinceFlag: undefined// 是否是轮胎省仓 1是 0否
       },
       totalData: null, // 合计
-      showOutDetail: false, // 出库明细弹窗
       rules: {
-        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+        'beginDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -196,9 +199,8 @@ export default {
         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 => {
+        return tireFeeReportList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -208,7 +210,6 @@ export default {
               data.list[i].no = no + i + 1
             }
             this.disabled = false
-            // 获取统计数据
             this.getCount(params)
           }
           this.spinning = false
@@ -235,25 +236,55 @@ export default {
         { 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 || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '13%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '轮胎省仓', dataIndex: 'productEntity', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '轮胎省仓名称', dataIndex: 'productEntity1', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总量提升奖励', dataIndex: 'productEntity2', width: '10%', align: 'center', customRender: function (text) { return 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: <a-tooltip placement='top' title='轮胎轮胎省仓出库加盟商数量*5'>运费补贴&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'crossRegionQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: <a-tooltip placement='top' title='截止当前时间的往期累计积分'>累计积分&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'putQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: <div>当期积分<div>返利券</div></div>, dataIndex: 'sysOrderQty', width: '12%', 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 : '--') } }
+        { title: '轮胎省仓', dataIndex: 'provinceFlag', scopedSlots: { customRender: 'provinceFlag' }, width: '10%', align: 'center' },
+        { title: '轮胎省仓名称', dataIndex: 'parentDealerEntity.dealerName', width: '13%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总量提升奖励', dataIndex: 'increaseRewardAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: <div>总量工厂<div>承担60%</div></div>, dataIndex: 'increaseRewardShareFactory', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: <div>总量供应链管理部<div>承担40%</div></div>, dataIndex: 'increaseRewardShareSys', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: <a-tooltip placement='top' title='轮胎轮胎省仓出库加盟商数量*5'>运费补贴&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'transSubsidy', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: <a-tooltip placement='top' title='截止当前时间的往期累计积分'>累计积分&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'totalPoint', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: <div>当期积分<div>返利券</div></div>, dataIndex: 'currentPoint', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: <div>积分工厂<div>承担60%</div></div>, dataIndex: 'currentPointShareFactory', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: <div>积分供应链管理部<div>承担40%</div></div>, dataIndex: 'currentPointShareSys', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '平台服务费', dataIndex: 'serviceAmountSys', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '省仓服务费', dataIndex: 'serviceAmountProvince', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
       return arr
     }
   },
   methods: {
+    // 根据月份获取第一天和最后一天
+    getMonthDetailDay (dateInfo) {
+      let nowDate = ''
+      if (!dateInfo) {
+        nowDate = moment().format('YYYY-MM')
+      } else {
+        nowDate = dateInfo
+      }
+      // 月份的第一天
+      const firstDayOfMonth = moment(nowDate).format('YYYY-MM-DD') + ' 00:00:00'
+      // 月份的最后一天
+      const lastDayOfMonth = moment(nowDate).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+      return { firstDay: firstDayOfMonth, lastDay: lastDayOfMonth }
+    },
+    // 选择月份  禁用选择当月以后日期
+    disabledDate (current) {
+      return current && current >= moment().endOf('day')
+    },
+    // 选择月份 change
+    onChangeMonth (date, dateString) {
+      this.monthVal = dateString
+      if (date && dateString != '') {
+        const timeObj = this.getMonthDetailDay(dateString)
+        this.queryParam.beginDate = timeObj.firstDay
+        this.queryParam.endDate = timeObj.lastDay
+      } else {
+        this.queryParam.beginDate = void 0
+        this.queryParam.endDate = void 0
+      }
+    },
     // 查询
     handleSearch () {
       const _this = this
@@ -261,19 +292,24 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error('请选择日期')
+          _this.$message.error('请选择查询月份')
           return false
         }
       })
     },
     // 客户名称 change
     custChange (val) {
-      this.queryParam.dealerName = val.name
-      this.queryParam.dealerSn = val.key
+      this.queryParam.dealerEntity.dealerName = val.name
+      this.queryParam.customSn = val.key
+    },
+    // 轮胎省仓客户名称 change
+    custProvinceChange (val) {
+      this.queryParam.parentDealerEntity.dealerName = val.name
+      this.queryParam.parentDealerSn = val.key
     },
     // 统计
     getCount (params) {
-      queryTireDetailCount(params).then(res => {
+      tireFeeReportCount(params).then(res => {
         if (res.status == 200 && res.data) {
           this.totalData = res.data
         } else {
@@ -281,42 +317,12 @@ export default {
         }
       })
     },
-    // 出库明细
-    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, '') : ''
-    },
-    disabledDate (current) {
-      return current && current >= moment().endOf('day')
-    },
     // 区域分区  change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
@@ -324,73 +330,52 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.time = []
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.bizBeginDate = ''
-      this.queryParam.bizEndDate = ''
+      this.queryParam.queryType = 'month'
+      const timeObj = this.getMonthDetailDay()
+      this.monthVal = moment().format('YYYY-MM')
+      this.queryParam.beginDate = timeObj.firstDay // 开始时间
+      this.queryParam.endDate = timeObj.lastDay// 结束时间
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
-      this.queryParam.dealerName = undefined
-      this.queryParam.dealerSn = undefined
+      this.queryParam.dealerEntity.dealerName = undefined
+      this.queryParam.parentDealerEntity.dealerName = undefined
+      this.queryParam.customSn = undefined
+      this.queryParam.parentDealerSn = 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.queryParam.provinceFlag = undefined
       this.$refs.subarea.clearData()
       this.$refs.dealerSubareaScopeList.resetForm()
+      this.$refs.provinceDealerList.resetForm()
       this.totalData = null
       this.$refs.areaList.clearData()
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()
     },
     //  导出  必填判断
-    handleExport (pos) {
+    handleExport () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          if (pos == 0) {
-            _this.exportList()
-          } else {
-            _this.exportOutDetailList()
-          }
+          _this.exportList()
         } else {
-          _this.$message.error('请选择日期')
+          _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 () {
+      hdExportExcel(tireFeeListExport, params, '轮胎月度费用报表', function () {
         _this.exportLoading = false
         _this.spinning = false
-        _this.$store.state.app.curActionPermission = ''
       })
     },
     // 初始化

+ 62 - 98
src/views/reportData/tireFeeReport/quarterQueryList.vue

@@ -59,7 +59,7 @@
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
-                @click="handleExport(0)"
+                @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireReportExport')"
@@ -91,22 +91,11 @@
           <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="quarterQueryList-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_quarterQueryList_salesPrice')">广宣品费用:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_quarterQueryList_salesPrice')">平台返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_quarterQueryList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">广宣品费用:{{ (totalData && (totalData.posterAmount || totalData.posterAmount==0)) ? toThousands(totalData.posterAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">平台返利金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">省仓返利金额:{{ (totalData && (totalData.rebateAmountProvince || totalData.rebateAmountProvince==0)) ? toThousands(totalData.rebateAmountProvince): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -114,29 +103,27 @@
     </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 moment from 'moment'
+import getDate from '@/libs/getDate.js'
 // 组件
 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'
+import { tireFeeReportList, tireFeeReportCount, tireFeeListExport } from '@/api/reportData'
 export default {
   name: 'QuarterQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, quarterDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, quarterDate, subarea, AreaList, dealerSubareaScopeList, reportModal },
   data () {
     return {
       spinning: false,
@@ -148,26 +135,26 @@ export default {
       //  查询条件
       queryParam: {
         time: [], // 日期
-        bizBeginDate: '', // 开始时间
-        bizEndDate: '', // 结束时间
+        queryType: 'quarter', // 轮胎季度费用报表
+        beginDate: undefined, // 开始时间
+        endDate: undefined, // 结束时间
         provinceSn: undefined, // 省
         citySn: undefined, // 市
         districtSn: undefined, // 区
-        dealerLevel: undefined, // 客户等级
-        dealerName: undefined, // 客户名称
-        dealerSn: undefined, // 客户sn
+        dealerLevel: undefined, // 客户级别
         subareaArea: {
           subareaSn: undefined, // 区域
-          subareaAreaSn: undefined, // 分区
-          bizUserSn: undefined // 区域负责人
+          subareaAreaSn: undefined // 分区
+        },
+        customSn: undefined, // 客户sn
+        dealerEntity: {
+          dealerName: undefined // 客户名称
         },
-        productWord: '', // 产品编码/原厂编码
-        productName: '' // 产品名称
+        provinceFlag: '1'// 是轮胎省仓
       },
       totalData: null, // 合计
-      showOutDetail: false, // 出库明细弹窗
       rules: {
-        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+        'time': [{ required: true, message: '请选择查询季度', trigger: 'change' }]
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -177,7 +164,7 @@ export default {
         const params = JSON.parse(JSON.stringify(oldParams))
         delete params.time
         // 获取列表数据  有分页
-        return tireReportDetailList(params).then(res => {
+        return tireFeeReportList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -214,17 +201,30 @@ export default {
         { 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.dealerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: <a-tooltip placement='top' title='平台销售给该轮胎省仓及轮胎省仓差价绑定的加盟商的数量合计'>平台出库数量&nbsp;<a-icon type="question-circle" /></a-tooltip>, 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: '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: <a-tooltip placement='top' title='平台销售给该轮胎省仓及轮胎省仓差价绑定的加盟商的数量合计'>平台出库数量&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'outQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '开单金额', dataIndex: 'outAmount', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '轮胎省仓返利点数', dataIndex: 'rebatePointProvince', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '轮胎省仓返利金额', dataIndex: 'rebateAmountProvince', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
       return arr
     }
   },
   methods: {
+    // 获取季度默认值
+    getQuarterVal () {
+      // 获取今年的季度
+      const thisQuarter = moment().quarter()
+      // 获取去年年份
+      const lastYear = moment().subtract(1, 'years').format('YYYY')
+      this.queryParam.time = [lastYear, thisQuarter]
+      const valStr = getDate.getQuarterByYear(lastYear, thisQuarter)
+      if (valStr && Object.keys(valStr).length > 0) {
+        this.queryParam.beginDate = valStr.start
+        this.queryParam.endDate = valStr.end
+      }
+    },
     // 查询
     handleSearch () {
       const _this = this
@@ -232,19 +232,19 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error('请选择日期')
+          _this.$message.error('请选择查询季度')
           return false
         }
       })
     },
     // 客户名称 change
     custChange (val) {
-      this.queryParam.dealerName = val.name
-      this.queryParam.dealerSn = val.key
+      this.queryParam.dealerEntity.dealerName = val.name
+      this.queryParam.customSn = val.key
     },
     // 统计
     getCount (params) {
-      queryTireDetailCount(params).then(res => {
+      tireFeeReportCount(params).then(res => {
         if (res.status == 200 && res.data) {
           this.totalData = res.data
         } else {
@@ -252,23 +252,6 @@ export default {
         }
       })
     },
-    // 出库明细
-    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
@@ -276,11 +259,15 @@ export default {
       this.queryParam.districtSn = val[2] ? val[2] : undefined
     },
     //  日期选择  change
-    dateChange (date, valstr) {
-      console.log(date, valstr)
+    dateChange (date, valStr) {
       this.queryParam.time = date[0] && date[1] ? date : []
-      this.queryParam.beginDate = valStr ? valStr.start : ''
-      this.queryParam.endDate = valStr ? valStr.end : ''
+      if (valStr && Object.keys(valStr).length > 0) {
+        this.queryParam.beginDate = valStr.start
+        this.queryParam.endDate = valStr.end
+      } else {
+        this.queryParam.beginDate = ''
+        this.queryParam.endDate = ''
+      }
     },
     // 区域分区  change
     subareaChange (val) {
@@ -289,21 +276,19 @@ export default {
     },
     //  重置
     resetSearchForm () {
+      this.queryParam.queryType = 'quarter'
       this.queryParam.time = []
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.bizBeginDate = ''
-      this.queryParam.bizEndDate = ''
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
-      this.queryParam.dealerName = undefined
-      this.queryParam.dealerSn = undefined
+      this.queryParam.dealerEntity.dealerName = undefined
+      this.queryParam.customSn = 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.queryParam.provinceFlag = '1'
       this.$refs.subarea.clearData()
       this.$refs.dealerSubareaScopeList.resetForm()
       this.totalData = null
@@ -312,50 +297,28 @@ export default {
       this.$refs.ruleForm.resetFields()
     },
     //  导出  必填判断
-    handleExport (pos) {
+    handleExport () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          if (pos == 0) {
-            _this.exportList()
-          } else {
-            _this.exportOutDetailList()
-          }
+          _this.exportList()
         } else {
-          _this.$message.error('请选择日期')
+          _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 () {
+      hdExportExcel(tireFeeListExport, params, '轮胎季度费用报表', function () {
         _this.exportLoading = false
         _this.spinning = false
-        _this.$store.state.app.curActionPermission = ''
       })
     },
     // 初始化
@@ -363,6 +326,7 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         this.setTableH()
       })
+      this.getQuarterVal()
     },
     // 计算表格高度
     setTableH () {

+ 57 - 113
src/views/reportData/tireFeeReport/yearQueryList.vue

@@ -12,8 +12,14 @@
           :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-form-model-item label="查询年份" prop="beginDate">
+                <a-select
+                  id="yearQueryList-time"
+                  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>
@@ -63,7 +69,7 @@
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
-                @click="handleExport(0)"
+                @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireReportExport')"
@@ -92,24 +98,14 @@
           :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="yearQueryList-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_yearQueryList_salesPrice')">平台返利金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_yearQueryList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">平台返利金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24">省仓返利金额:{{ (totalData && (totalData.rebateAmountProvince || totalData.rebateAmountProvince==0)) ? toThousands(totalData.rebateAmountProvince): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -117,8 +113,6 @@
     </a-card>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-    <!-- 出库明细弹窗 -->
-    <outDetailModal ref="outDetail" :openModal="showOutDetail" @close="showOutDetail=false"></outDetailModal>
   </div>
 </template>
 
@@ -127,19 +121,16 @@ 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'
+import { tireFeeReportList, tireFeeReportCount, tireFeeListExport } from '@/api/reportData'
 export default {
   name: 'YearQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, reportModal },
   data () {
     return {
       spinning: false,
@@ -148,33 +139,32 @@ export default {
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
       showExport: false, // 导出弹窗
-      yearOpen: false,
       toYears: new Date().getFullYear(), // 今年
-      currYear: undefined,
+      currYear: '2023', // 查询年份
       //  查询条件
       queryParam: {
-        time: [], // 日期
-        bizBeginDate: '', // 开始时间
-        bizEndDate: '', // 结束时间
+        queryType: 'year', // 轮胎年度费用报表
+        beginDate: '2023-01-31 00:00:00', // 开始时间
+        endDate: '2023-12-31 23:59:59', // 结束时间
         provinceSn: undefined, // 省
         citySn: undefined, // 市
         districtSn: undefined, // 区
         dealerLevel: undefined, // 客户等级
-        dealerName: undefined, // 客户名称
-        dealerSn: undefined, // 客户sn
+        customSn: undefined, // 客户sn
         subareaArea: {
           subareaSn: undefined, // 区域
-          subareaAreaSn: undefined, // 分区
-          bizUserSn: undefined // 区域负责人
+          subareaAreaSn: undefined // 分区
+        },
+        dealerEntity: {
+          dealerName: undefined // 客户名称
         },
-        productWord: '', // 产品编码/原厂编码
-        productName: '' // 产品名称
+        provinceFlag: '1'// 是轮胎省仓
       },
       totalData: null, // 合计
       yearInfo: '',
       showOutDetail: false, // 出库明细弹窗
       rules: {
-        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+        'beginDate': [{ required: true, message: '请选择查询年份', trigger: 'change' }]
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -182,9 +172,8 @@ export default {
         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 => {
+        return tireFeeReportList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -215,6 +204,7 @@ export default {
     }
   },
   computed: {
+    // 获取年份数据
     years () {
       const years = []
       const lens = (this.toYears - 2023) + 1
@@ -229,19 +219,26 @@ export default {
         { 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: <a-tooltip placement='top' title='平台销售给该轮胎省仓及轮胎省仓差价绑定的加盟商的数量合计'>平台出库数量&nbsp;<a-icon type="question-circle" /></a-tooltip>, 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: 'dealerEntity.dealerName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: <a-tooltip placement='top' title='平台销售给该轮胎省仓及轮胎省仓差价绑定的加盟商的数量合计'>平台出库数量&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'outQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '开单金额', dataIndex: 'outAmount', width: '13%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '轮胎省仓返利点数', dataIndex: 'rebatePointProvince', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '轮胎省仓返利金额', dataIndex: 'rebateAmountProvince', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
       return arr
     }
   },
   methods: {
+    // 选择查询年份  change
     changeYear (val) {
-      debugger
+      if (!val) {
+        this.queryParam.beginDate = ''
+        this.queryParam.endDate = ''
+      } else {
+        this.queryParam.beginDate = val + '-01-31 00:00:00'
+        this.queryParam.endDate = val + '-12-31 23:59:59'
+      }
       this.currYear = val
     },
     // 查询
@@ -251,19 +248,19 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error('请选择日期')
+          _this.$message.error('请选择查询年份')
           return false
         }
       })
     },
     // 客户名称 change
     custChange (val) {
-      this.queryParam.dealerName = val.name
-      this.queryParam.dealerSn = val.key
+      this.queryParam.dealerEntity.dealerName = val.name
+      this.queryParam.customSn = val.key
     },
     // 统计
     getCount (params) {
-      queryTireDetailCount(params).then(res => {
+      tireFeeReportCount(params).then(res => {
         if (res.status == 200 && res.data) {
           this.totalData = res.data
         } else {
@@ -271,39 +268,12 @@ export default {
         }
       })
     },
-    // 出库明细
-    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
@@ -311,73 +281,47 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.time = []
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.bizBeginDate = ''
-      this.queryParam.bizEndDate = ''
+      this.queryParam.queryType = 'year'
+      this.currYear = '2023'
+      this.queryParam.beginDate = '2023-01-31 00:00:00'
+      this.queryParam.endDate = '2023-12-31 23:59:59'
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
-      this.queryParam.dealerName = undefined
-      this.queryParam.dealerSn = undefined
+      this.queryParam.dealerEntity.dealerName = undefined
+      this.queryParam.customSn = 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.areaList.clearData()
       this.$refs.dealerSubareaScopeList.resetForm()
       this.totalData = null
-      this.$refs.areaList.clearData()
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()
     },
     //  导出  必填判断
-    handleExport (pos) {
+    handleExport () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          if (pos == 0) {
-            _this.exportList()
-          } else {
-            _this.exportOutDetailList()
-          }
+          _this.exportList()
         } else {
-          _this.$message.error('请选择日期')
+          _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 () {
+      hdExportExcel(tireFeeListExport, params, '轮胎年度费用报表', function () {
         _this.exportLoading = false
         _this.spinning = false
-        _this.$store.state.app.curActionPermission = ''
       })
     },
     // 初始化