lilei 3 hónapja
szülő
commit
c5c77f1c03

+ 25 - 25
src/config/report/otherReport.js

@@ -41,31 +41,31 @@ export default {
               }
             ]
           },
-          {
-            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/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/tireSubsidyReport',
             redirect: '/reportData/tireSubsidyReport/index',

+ 1 - 1
src/views/allocationManagement/transferOut/edit.vue

@@ -262,7 +262,7 @@
           :data="chooseLoadData"
           :defaultLoadData="false"
           :pagination="{pageSizeOptions: ['20','50','100','200','500']}"
-          :pageSize="20"
+          :pageSize="50"
           :scroll="{ y: 300 }"
           bordered>
           <!-- 售价 -->

+ 1 - 2
src/views/common/quarterDate.vue

@@ -22,7 +22,7 @@
         :value="currJd"
         @change="changeJd"
         allowClear>
-        <a-select-option v-for="item in quarter" :disabled="item.isToChoose" :value="item.id" :key="item.id">
+        <a-select-option v-for="item in quarter" :value="item.id" :key="item.id">
           {{ item.val }}
         </a-select-option>
       </a-select>
@@ -48,7 +48,6 @@ export default {
     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
     }

+ 43 - 59
src/views/reportData/tireSubsidyReport/incrementalSubsidyList.vue

@@ -1,60 +1,47 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="quarterQueryList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="incSubSidy-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="quarterQueryList-form"
+          id="incSubSidy-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
           :rules="rules"
           :model="queryParam">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
+          <a-row :gutter="15" type="flex">
+            <a-col :flex="1">
               <a-form-model-item label="查询季度" prop="queryDate">
-                <quarterDate ref="quarterDate" id="quarterQueryList-time" :value="timeInfo" @change="dateChange" />
+                <quarterDate ref="quarterDate" id="incSubSidy-time" :value="timeInfo" @change="dateChange" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :flex="1">
               <a-form-model-item label="地区">
-                <AreaList id="quarterQueryList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <AreaList id="incSubSidy-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :flex="1">
               <a-form-item label="区域/分区">
-                <subarea id="quarterQueryList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                <subarea id="incSubSidy-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="quarterQueryList-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="quarterQueryList-dealerLevel"
-                    code="DEALER_LEVEL"
-                    placeholder="请选择客户级别"
-                    allowClear></v-select>
-                </a-form-model-item>
-              </a-col>
-            </template>
-            <a-col :md="6" :sm="24">
+            <a-col :flex="2">
+              <a-form-model-item label="客户名称">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="incSubSidy-dealerName" @change="custChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :flex="2">
               <a-button
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="quarterQueryList-refresh">查询</a-button>
+                id="incSubSidy-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="quarterQueryList-reset">重置</a-button>
+                id="incSubSidy-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -63,11 +50,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireFeeExport')"
-                id="quarterQueryList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'" />
-              </a>
+                id="incSubSidy-export">导出</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -82,27 +65,25 @@
           size="small"
           :rowKey="(record) => record.no"
           rowKeyName="no"
-          :style="{ height: tableHeight+70+'px' }"
+          :style="{ height: tableHeight+20+'px' }"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: tableHeight-120}"
+          :scroll="{ y: tableHeight-80}"
+          :pageSize="50"
+          :pagination="{pageSizeOptions: ['20','50','100','200','500']}"
           :defaultLoadData="false"
           bordered>
           <!-- 地区 -->
           <template slot="addressInfo" slot-scope="text, record">
             <span v-if="record.dealerEntity&&record.dealerEntity.provinceName">
-              {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+              {{ record.dealerEntity.provinceName }}
             </span>
             <span v-else>--</span>
           </template>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="4" :sm="24">平台出库数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty: '--' }}</a-col>
-              <a-col :md="4" :sm="24">平台返利点数:{{ (totalData && (totalData.rebatePointsSys || totalData.rebatePointsSys==0)) ? (totalData.rebatePointsSys*100).toFixed(2)+'%': '--' }}</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.rebateAmountSys || totalData.rebateAmountSys==0)) ? toThousands(totalData.rebateAmountSys): '--' }}</a-col>
-              <a-col :md="4" :sm="24"><a-tooltip placement="top" title="开单金额合计*1.5%">广宣品费用&nbsp;<a-icon type="question-circle" /></a-tooltip>:{{ (totalData && (totalData.posterAmount || totalData.posterAmount==0)) ? toThousands(totalData.posterAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24">轮胎省仓返利金额:{{ (totalData && (totalData.rebateAmountProvince || totalData.rebateAmountProvince==0)) ? toThousands(totalData.rebateAmountProvince): '--' }}</a-col>
+              <a-col :md="4" :sm="24">订货数量合计:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty: '--' }}</a-col>
+              <a-col :md="4" :sm="24">增量补贴金额:{{ (totalData && (totalData.rebateAmountSys || totalData.rebateAmountSys==0)) ? toThousands(totalData.rebateAmountSys): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -143,7 +124,6 @@ export default {
       queryParam: {
         queryType: 'quarter', // 轮胎季度费用报表
         queryDate: undefined, // 选择年份+季度
-        dealerLevel: undefined, // 客户级别
         subareaArea: {
           subareaSn: '', // 区域
           subareaAreaSn: '' // 分区
@@ -154,8 +134,7 @@ export default {
           provinceSn: undefined, // 省
           citySn: undefined, // 市
           districtSn: undefined // 区
-        },
-        provinceFlag: '1'// 是轮胎省仓
+        }
       },
       totalData: null, // 合计
       rules: {
@@ -175,6 +154,8 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              data.list[i].year = this.queryParam.queryDate.substr(0, 4)
+              data.list[i].quarter = ['一', '二', '三', '四'][this.queryParam.queryDate.substr(5, 1) - 1] + '季度'
             }
             this.disabled = false
             // 获取统计数据
@@ -201,15 +182,20 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '年度', dataIndex: 'year', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '季度', dataIndex: 'quarter', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { 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 || '--' }, 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: '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 * 100).toFixed(2) + '%' : '--') } },
-        { title: '轮胎省仓返利金额', dataIndex: 'rebateAmountProvince', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', scopedSlots: { customRender: 'addressInfo' }, width: '10%', align: 'center' },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '订货数量(总部)', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '订货数量(转单)', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货数量(总部)', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '订货数量合计', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '季度目标', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '季度增量补贴', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '增量补贴金额', dataIndex: 'rebateAmountProvince', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
       return arr
     }
@@ -282,8 +268,6 @@ export default {
       this.queryParam.customSn = undefined
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
-      this.queryParam.dealerLevel = undefined
-      this.queryParam.provinceFlag = '1'
       this.$refs.subarea.clearData()
       if (this.advanced) {
         this.$refs.dealerSubareaScopeList.resetForm()
@@ -312,7 +296,7 @@ export default {
       _this.exportLoading = true
       _this.spinning = true
       _this.showExport = true
-      hdExportExcel(tireFeeListExport, _this.queryParam, '轮胎季度费用报表', function () {
+      hdExportExcel(tireFeeListExport, _this.queryParam, '增量补贴报表(季度)', function () {
         _this.exportLoading = false
         _this.spinning = false
       })
@@ -327,7 +311,7 @@ export default {
     // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 280
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 335 - 0
src/views/reportData/tireSubsidyReport/incrementalSubsidyYearList.vue

@@ -0,0 +1,335 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="incSubSidyYear-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="incSubSidyYear-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15" type="flex">
+            <a-col :flex="1">
+              <a-form-model-item label="查询年份" prop="queryDate">
+                <a-select
+                  id="yearQueryList-time"
+                  style="width: 100%"
+                  placeholder="请选择年份"
+                  :value="queryParam.queryDate"
+                  @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 :flex="1">
+              <a-form-model-item label="地区">
+                <AreaList id="incSubSidyYear-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :flex="1">
+              <a-form-item label="区域/分区">
+                <subarea id="incSubSidyYear-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <a-col :flex="2">
+              <a-form-model-item label="客户名称">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="incSubSidyYear-dealerName" @change="custChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :flex="2">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="incSubSidyYear-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="incSubSidyYear-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_tireFeeExport')"
+                id="incSubSidyYear-export">导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :style="{ height: tableHeight+20+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight-80}"
+          :pageSize="50"
+          :pagination="{pageSizeOptions: ['20','50','100','200','500']}"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 地区 -->
+          <template slot="addressInfo" slot-scope="text, record">
+            <span v-if="record.dealerEntity&&record.dealerEntity.provinceName">
+              {{ record.dealerEntity.provinceName }}
+            </span>
+            <span v-else>--</span>
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">订货数量合计:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty: '--' }}</a-col>
+              <a-col :md="4" :sm="24">增量补贴金额:{{ (totalData && (totalData.rebateAmountSys || totalData.rebateAmountSys==0)) ? toThousands(totalData.rebateAmountSys): '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import moment from 'moment'
+// 组件
+import { STable, VSelect } from '@/components'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import reportModal from '@/views/common/reportModal.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
+import { tireFeeReportList, tireFeeReportCount, tireFeeListExport } from '@/api/reportData'
+export default {
+  name: 'QuarterQueryList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, reportModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      toYears: new Date().getFullYear(), // 今年
+      //  查询条件
+      queryParam: {
+        queryType: 'year', // 轮胎年度费用报表
+        queryDate: moment().year(), // 选择年份
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '' // 分区
+        },
+        customSn: undefined, // 客户sn
+        dealerEntity: {
+          dealerName: undefined, // 客户名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined // 区
+        }
+      },
+      totalData: null, // 合计
+      rules: {
+        'queryDate': [{ required: true, message: '请选择查询年份', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据  有分页
+        return tireFeeReportList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].year = this.queryParam.queryDate
+            }
+            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: '4%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', scopedSlots: { customRender: 'addressInfo' }, width: '10%', align: 'center' },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '订货数量(总部)', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '订货数量(转单)', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货数量(总部)', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '订货数量合计', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '年度目标', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '年度增量补贴', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '增量补贴金额', dataIndex: 'rebateAmountProvince', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '增量已补金额', dataIndex: 'rebateAmountProvince', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '剩余增量补贴金额', dataIndex: 'rebateAmountProvince', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 选择查询年份  change
+    changeYear (val) {
+      if (!val) {
+        this.queryParam.queryDate = void 0
+      } else {
+        this.queryParam.queryDate = 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.dealerEntity.dealerName = val.name
+      this.queryParam.customSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      tireFeeReportCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 地区
+    areaChange (val) {
+      this.queryParam.dealerEntity.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.dealerEntity.citySn = val[1] ? val[1] : undefined
+      this.queryParam.dealerEntity.districtSn = val[2] ? val[2] : undefined
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : ''
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.queryType = 'year'
+      this.queryParam.queryDate = undefined
+      this.queryParam.dealerEntity.provinceSn = undefined
+      this.queryParam.dealerEntity.citySn = undefined
+      this.queryParam.dealerEntity.districtSn = undefined
+      this.queryParam.dealerEntity.dealerName = undefined
+      this.queryParam.customSn = undefined
+      this.queryParam.subareaArea.subareaSn = ''
+      this.queryParam.subareaArea.subareaAreaSn = ''
+      this.$refs.subarea.clearData()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+      }
+      this.totalData = null
+      this.$refs.areaList.clearData()
+      this.$refs.table.clearTable()
+      this.$refs.ruleForm.resetFields()
+    },
+    //  导出  必填判断
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.exportList()
+        } else {
+          _this.$message.error('请选择查询年度')
+          return false
+        }
+      })
+    },
+    // 导出
+    exportList () {
+      const _this = this
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      hdExportExcel(tireFeeListExport, _this.queryParam, '增量补贴报表(年度)', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+      this.resetSearchForm()
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+  }
+}
+</script>

+ 9 - 5
src/views/reportData/tireSubsidyReport/index.vue

@@ -5,11 +5,14 @@
         <a-tab-pane key="1" tab="服务费/运费报表">
           <serviceFreightList ref="tableList1"></serviceFreightList>
         </a-tab-pane>
-        <a-tab-pane key="2" tab="增量补贴报表" force-render>
+        <a-tab-pane key="2" tab="增量补贴报表(季度)" force-render>
           <incrementalSubsidyList ref="tableList2"></incrementalSubsidyList>
         </a-tab-pane>
-        <a-tab-pane key="3" tab="服务费/运费明细报表" force-render>
-          <serviceFreightDetailList ref="tableList3"></serviceFreightDetailList>
+        <a-tab-pane key="3" tab="增量补贴报表(年度)" force-render>
+          <incrementalSubsidyYearList ref="tableList3"></incrementalSubsidyYearList>
+        </a-tab-pane>
+        <a-tab-pane key="4" tab="服务费/运费明细报表" force-render>
+          <serviceFreightDetailList ref="tableList4"></serviceFreightDetailList>
         </a-tab-pane>
       </a-tabs>
     </a-card>
@@ -20,14 +23,15 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 import serviceFreightList from './serviceFreightList.vue'
 import incrementalSubsidyList from './incrementalSubsidyList.vue'
+import incrementalSubsidyYearList from './incrementalSubsidyYearList.vue'
 import serviceFreightDetailList from './serviceFreightDetailList.vue'
 export default {
   name: 'TireFeeReportIndex',
   mixins: [commonMixin],
-  components: { serviceFreightList, incrementalSubsidyList, serviceFreightDetailList },
+  components: { serviceFreightList, incrementalSubsidyList, incrementalSubsidyYearList, serviceFreightDetailList },
   data () {
     return {
-      tabVal: 1 // tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表
+      tabVal: 1 // tab值
     }
   },
   methods: {

+ 32 - 33
src/views/reportData/tireSubsidyReport/serviceFreightList.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="monthQueryList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="serviceFreight-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="monthQueryList-form"
+          id="serviceFreight-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -14,7 +14,7 @@
             <a-col :flex="1">
               <a-form-model-item label="查询月份" prop="queryDate">
                 <a-month-picker
-                  id="monthQueryList-monthBox"
+                  id="serviceFreight-monthBox"
                   class="monthBox"
                   :disabled-date="disabledDate"
                   v-model="monthVal"
@@ -24,17 +24,17 @@
             </a-col>
             <a-col :flex="1">
               <a-form-item label="所在区域">
-                <subarea id="monthQueryList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                <subarea id="serviceFreight-subarea" ref="subarea" @change="subareaChange"></subarea>
               </a-form-item>
             </a-col>
             <a-col :flex="1">
               <a-form-model-item label="地区">
-                <AreaList id="monthQueryList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <AreaList id="serviceFreight-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
               </a-form-model-item>
             </a-col>
             <a-col :flex="2">
-              <a-form-model-item label="轮胎省仓名称">
-                <dealerSubareaScopeList ref="provinceDealerList" placeholder="请输入轮胎省仓名称" id="monthQueryList-provinceDealerName" @change="custProvinceChange" />
+              <a-form-model-item label="记账主体">
+                <dealerSubareaScopeList ref="provinceDealerList" placeholder="请输入记账主体" id="serviceFreight-provinceDealerName" @change="custProvinceChange" />
               </a-form-model-item>
             </a-col>
             <a-col :flex="2">
@@ -42,12 +42,12 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="monthQueryList-refresh">查询</a-button>
+                id="serviceFreight-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="monthQueryList-reset">重置</a-button>
+                id="serviceFreight-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -56,7 +56,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireFeeExport')"
-                id="monthQueryList-export">导出</a-button>
+                id="serviceFreight-export">导出</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -71,29 +71,25 @@
           size="small"
           :rowKey="(record) => record.no"
           rowKeyName="no"
-          :style="{ height: tableHeight+70+'px' }"
+          :style="{ height: tableHeight+20+'px' }"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: tableHeight-120}"
+          :scroll="{ y: tableHeight-80}"
+          :pageSize="50"
+          :pagination="{pageSizeOptions: ['20','50','100','200','500']}"
           :defaultLoadData="false"
           bordered>
           <!-- 地区 -->
           <template slot="addressInfo" slot-scope="text, record">
             <span v-if="record.dealerEntity&&record.dealerEntity.provinceName">
-              {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+              {{ record.dealerEntity.provinceName }}
             </span>
             <span v-else>--</span>
           </template>
-          <!-- 是否是省仓客户 -->
-          <template slot="provinceFlag" slot-scope="text, record">
-            {{ record.provinceFlag?record.provinceFlag==0?'否':'是':'--' }}
-          </template>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">销售数量:{{ (totalData && (totalData.currentPointShareFactory || totalData.currentPointShareFactory==0)) ? toThousands(totalData.currentPointShareFactory): '--' }}</a-col>
-              <a-col :md="6" :sm="24">销售金额:{{ (totalData && (totalData.currentPointShareSys || totalData.currentPointShareSys==0)) ?toThousands(totalData.currentPointShareSys): '--' }}</a-col>
-              <a-col :md="6" :sm="24">服务费金额:{{ (totalData && (totalData.serviceAmountSys || totalData.serviceAmountSys==0)) ? toThousands(totalData.serviceAmountSys): '--' }}</a-col>
-              <a-col :md="6" :sm="24">运费补贴金额:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
+              <a-col :md="6" :sm="24">服务费金额合计:{{ (totalData && (totalData.serviceAmountSys || totalData.serviceAmountSys==0)) ? toThousands(totalData.serviceAmountSys): '--' }}</a-col>
+              <a-col :md="6" :sm="24">运费补贴金额合计:{{ (totalData && (totalData.serviceAmountProvince || totalData.serviceAmountProvince==0)) ? toThousands(totalData.serviceAmountProvince): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -133,7 +129,6 @@ export default {
       queryParam: {
         queryType: 'month', // 轮胎月度费用报表
         queryDate: moment().format('YYYYMM'), // 选择月份
-
         dealerLevel: undefined, // 客户等级
         customSn: undefined, // 客户sn
         parentDealerSn: undefined, // 轮胎省仓sn
@@ -149,8 +144,7 @@ export default {
         subareaArea: {
           subareaSn: '', // 区域
           subareaAreaSn: '' // 分区
-        },
-        provinceFlag: undefined// 是否是轮胎省仓 1是 0否
+        }
       },
       totalData: null, // 合计
       rules: {
@@ -170,6 +164,7 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              data.list[i].mothDay = this.queryParam.queryDate.substr(0, 4) + '-' + this.queryParam.queryDate.substr(4, 2)
             }
             this.disabled = false
             this.getCount(params)
@@ -195,15 +190,20 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '月份', dataIndex: 'mothDay', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
-        { title: '轮胎省仓名称', dataIndex: 'parentDealerEntity.dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '销售数量', dataIndex: 'currentPointShareFactory', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '销售金额', dataIndex: 'currentPointShareSys', width: '10%', 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) : '--') } }
+        { title: '省份', scopedSlots: { customRender: 'addressInfo' }, width: '10%', align: 'center' },
+        { title: '记账主体', dataIndex: 'parentDealerEntity.dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '服务费(记)', dataIndex: 'currentPointShareFactory', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '服务费(扣)', dataIndex: 'currentPointShareSys', width: '10%', 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) : '--') } },
+        { title: '运费补贴(总部扣)', dataIndex: 'serviceAmountProvince', 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) : '--') } },
+        { title: '运费补贴(转单扣)', dataIndex: 'serviceAmountProvince', 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
     }
@@ -280,7 +280,6 @@ export default {
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.dealerLevel = undefined
-      this.queryParam.provinceFlag = undefined
       this.$refs.subarea.clearData()
       this.$refs.provinceDealerList.resetForm()
       this.totalData = null
@@ -322,7 +321,7 @@ export default {
     // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 280
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {