فهرست منبع

Merge branch 'develop_yh45' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh46

# Conflicts:
#	src/views/dealerManagement/merchantInfoManagement/edit.vue
lilei 9 ماه پیش
والد
کامیت
f88767d84f

+ 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}`

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

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

+ 13 - 0
src/libs/getDate.js

@@ -142,5 +142,18 @@ export default {
       	beginDate: moment(year.toString()).startOf('year').format('YYYY-MM-DD 00:00:00'),
       	endDate: moment(year.toString()).endOf('year').format('YYYY-MM-DD 23:59:59')
     }
+  },
+  // 获取某年某季度的开始和结束时间
+  getQuarterByYear (year, quarter) {
+    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 {}
+    }
   }
 }

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

@@ -0,0 +1,125 @@
+<template>
+  <!-- 月份选择器 -->
+  <div class="month-date-box">
+    <div class="month-date-year monthBox">
+      <a-month-picker
+        :disabled-date="disabledStartDate"
+        format="YYYY-MM"
+        v-model="startValue"
+        placeholder="开始月份"
+        @openChange="handleStartOpenChange"
+        @change="getStartDate"
+      />
+      <span>~</span>
+      <a-month-picker
+        :disabled-date="disabledEndDate"
+        format="YYYY-MM"
+        v-model="endValue"
+        placeholder="结束月份"
+        :open="endOpen"
+        @openChange="handleEndOpenChange"
+        @change="getEndDate"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import moment from 'moment'
+export default {
+  props: {
+    value: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    size: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data () {
+    return {
+      monthVal: this.value,
+      startValue: undefined, // 统计月份 开始
+      endValue: undefined, // 统计月份 结束
+      endOpen: false // 打开结束月份弹窗
+    }
+  },
+  watch: {
+    value (val) {
+      this.monthVal = val
+      if (val.length > 0) {
+        this.startValue = val[0]
+        this.endValue = val[1]
+      }
+    }
+  },
+  methods: {
+    // 统计月份  选择月份限制
+    disabledStartDate (current) {
+      const endValue = this.endValue
+      const md = moment(current).startOf('month').valueOf()
+      const cd = moment().startOf('month').valueOf() // 当前月份
+      if (!current || !endValue) {
+        return md > cd
+      }
+      const ed = moment(endValue).startOf('month').valueOf()
+      return md > ed || md > cd
+    },
+    disabledEndDate (current) {
+      const startValue = this.startValue
+      const md = moment(current).startOf('month').valueOf()
+      const cd = moment().startOf('month').valueOf() // 当前月份
+      if (!current || !startValue) {
+        return md > cd
+      }
+      const sd = moment(startValue).startOf('month').valueOf()
+      return md < sd || md > cd
+    },
+    // 开始时间
+    handleStartOpenChange (open) {
+      if (!open) {
+        this.endOpen = true
+      }
+    },
+    getStartDate (date, dateString) {
+      this.startValue = dateString
+      this.$emit('input', [this.startValue, this.endValue])
+      this.$emit('change', [this.startValue, this.endValue])
+    },
+    // 结束时间
+    handleEndOpenChange (open) {
+      this.endOpen = open
+    },
+    getEndDate (date, dateString) {
+      this.endValue = dateString
+      this.$emit('input', [this.startValue, this.endValue])
+      this.$emit('change', [this.startValue, this.endValue])
+    },
+    resetDate () {
+      this.currYear = undefined
+      this.currJd = undefined
+      this.$emit('input', [this.startValue, this.endValue])
+      this.$emit('change', [this.startValue, this.endValue])
+    }
+  }
+}
+</script>
+<style lange="less">
+.month-date-box{
+  width:100%;
+  .month-date-year{
+    display:flex;
+    align-item:center;
+  }
+  .monthBox{
+    .ant-calendar-picker-icon{
+      display:none !important;
+    }
+    .ant-calendar-picker input{
+      text-align:center;
+    }
+  }
+}
+</style>

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

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

+ 1 - 0
src/views/dealerManagement/merchantInfoManagement/detailModal.vue

@@ -32,6 +32,7 @@
             <a-descriptions-item v-if="!isAudit&&form&&form.auditState != 'WAIT'" label="授权类型">{{ form&&form.menuMouldIdDictValue ? form.menuMouldIdDictValue : '--' }}</a-descriptions-item>
             <a-descriptions-item label="财务编码">{{ form&&form.kdMidCustomerFnumber ? form.kdMidCustomerFnumber : '--' }}</a-descriptions-item>
             <a-descriptions-item label="默认仓库">{{ form&&form.defaultWarehouseName ? form.defaultWarehouseName : '--' }}</a-descriptions-item>
+            <!-- <a-descriptions-item label="轮胎省仓">{{ form&&form.tireStorage ? form.tireStorage : '--' }}</a-descriptions-item> --> -->
           </a-descriptions>
         </a-card>
         <a-card title="公司信息" size="small" style="margin-bottom: 15px;">

+ 15 - 1
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -121,6 +121,16 @@
                     <chooseWarehouse ref="warehouse" id="merchantInfoManagementEdit-warehouse" v-model="form.defaultWarehouseSn"></chooseWarehouse>
                   </a-form-model-item>
                 </a-col>
+                <!-- <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="轮胎省仓" prop="tireStorage" >
+                    <v-select
+                      code="FLAG"
+                      showType="radio"
+                      id="merchantInfoManagementEdit-tireStorage"
+                      v-model="form.tireStorage"
+                    ></v-select>
+                  </a-form-model-item>
+                </a-col> -->
               </a-row>
             </a-collapse-panel>
           </a-collapse>
@@ -473,7 +483,8 @@ export default {
         isShowSpecialPrice: 0, // 特约价是否可见 0否  1是
         remark: '', // 备注
         kdMidCustomerFnumber: '', // 财务编码
-        defaultWarehouseSn: undefined// 默认仓库
+        defaultWarehouseSn: undefined, // 默认仓库
+        tireStorage: '0' // 是否轮胎省仓
       },
       // 规则验证
       rules: {
@@ -511,6 +522,9 @@ export default {
         defaultWarehouseSn: [
           { required: true, message: '请选择默认仓库', trigger: 'change' }
         ],
+        // tireStorage: [
+        //   { required: true, message: '请选择是否轮胎省仓', trigger: 'change' }
+        // ],
         dealerTelephone: [
           { pattern: /^[0-9-]{11,13}$/, message: '请输入正确的电话号码!' }
         ],

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

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

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

@@ -0,0 +1,414 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="monthQueryList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="monthQueryList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="查询月份" prop="queryDate">
+                <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">
+              <a-form-model-item label="地区">
+                <AreaList id="monthQueryList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域/分区">
+                <subarea id="monthQueryList-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="monthQueryList-dealerName" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓名称">
+                  <dealerSubareaScopeList ref="provinceDealerList" placeholder="请输入轮胎省仓名称" id="monthQueryList-provinceDealerName" @change="custProvinceChange" />
+                </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="monthQueryList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓">
+                  <v-select
+                    v-model="queryParam.provinceFlag"
+                    ref="provinceFlag"
+                    id="monthQueryList-provinceFlag"
+                    code="FlAG"
+                    placeholder="请选择是否是轮胎省仓"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="monthQueryList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="monthQueryList-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="monthQueryList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :style="{ height: tableHeight+70+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 地区 -->
+          <template slot="addressInfo" slot-scope="text, record">
+            {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+          </template>
+          <!-- 是否是省仓客户 -->
+          <template slot="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.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>
+      </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: 'MonthQueryList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, reportModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      monthVal: moment().format('YYYY-MM'), // 初始化月份值
+      //  查询条件
+      queryParam: {
+        queryType: 'month', // 轮胎月度费用报表
+        queryDate: moment().format('YYYYMM'), // 选择月份
+
+        dealerLevel: undefined, // 客户等级
+        customSn: undefined, // 客户sn
+        parentDealerSn: undefined, // 轮胎省仓sn
+        dealerEntity: {
+          dealerName: undefined, // 客户名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined // 区
+        },
+        parentDealerEntity: {
+          dealerName: undefined // 轮胎省仓名称
+        },
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '' // 分区
+        },
+        provinceFlag: undefined// 是否是轮胎省仓 1是 0否
+      },
+      totalData: null, // 合计
+      rules: {
+        'queryDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据  有分页
+        return tireFeeReportList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.getCount(params)
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '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: '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 != '') {
+        this.queryParam.queryDate = dateString.replace('-', '')
+      } else {
+        this.queryParam.queryDate = void 0
+      }
+    },
+    // 查询
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          _this.$message.error('请选择查询月份')
+          return false
+        }
+      })
+    },
+    // 客户名称 change
+    custChange (val) {
+      this.queryParam.dealerEntity.dealerName = val.name
+      this.queryParam.customSn = val.key
+    },
+    // 轮胎省仓客户名称 change
+    custProvinceChange (val) {
+      this.queryParam.parentDealerEntity.dealerName = val.name
+      this.queryParam.parentDealerSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      tireFeeReportCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 地区
+    areaChange (val) {
+      this.queryParam.dealerEntity.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.dealerEntity.citySn = val[1] ? val[1] : undefined
+      this.queryParam.dealerEntity.districtSn = val[2] ? val[2] : undefined
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : ''
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.queryType = 'month'
+      this.monthVal = moment().format('YYYY-MM')
+      this.queryParam.queryDate = moment().format('YYYYMM')
+      this.queryParam.dealerEntity.provinceSn = undefined
+      this.queryParam.dealerEntity.citySn = undefined
+      this.queryParam.dealerEntity.districtSn = undefined
+      this.queryParam.dealerEntity.dealerName = undefined
+      this.queryParam.parentDealerEntity.dealerName = undefined
+      this.queryParam.customSn = undefined
+      this.queryParam.parentDealerSn = undefined
+      this.queryParam.subareaArea.subareaSn = ''
+      this.queryParam.subareaArea.subareaAreaSn = ''
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.provinceFlag = undefined
+      this.$refs.subarea.clearData()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.$refs.provinceDealerList.resetForm()
+      }
+      this.totalData = null
+      this.$refs.areaList.clearData()
+      this.$refs.table.clearTable()
+      this.$refs.ruleForm.resetFields()
+    },
+    //  导出  必填判断
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.exportList()
+        } else {
+          _this.$message.error('请选择查询月份')
+          return false
+        }
+      })
+    },
+    // 导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      hdExportExcel(tireFeeListExport, params, '轮胎月度费用报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style lang="less" scoped>
+  .monthBox{
+    width: 100%;
+    /deep/.ant-calendar-picker-icon{
+      display:none !important;
+    }
+    /deep/.ant-calendar-picker input{
+      text-align:center;
+    }
+  }
+</style>

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

@@ -0,0 +1,344 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="quarterQueryList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="quarterQueryList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="查询季度" prop="queryDate">
+                <quarterDate ref="quarterDate" id="quarterQueryList-time" :value="timeInfo" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="quarterQueryList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域/分区">
+                <subarea id="quarterQueryList-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-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="quarterQueryList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="quarterQueryList-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="quarterQueryList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :style="{ height: tableHeight+70+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="addressInfo" slot-scope="text, record">
+            {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <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.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-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 quarterDate from '@/views/common/quarterDate.vue'
+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, quarterDate, subarea, AreaList, dealerSubareaScopeList, reportModal },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      timeInfo: [], // 日期
+      //  查询条件
+      queryParam: {
+        queryType: 'quarter', // 轮胎季度费用报表
+        queryDate: undefined, // 选择年份+季度
+        dealerLevel: undefined, // 客户级别
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '' // 分区
+        },
+        customSn: undefined, // 客户sn
+        dealerEntity: {
+          dealerName: undefined, // 客户名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined // 区
+        },
+        provinceFlag: '1'// 是轮胎省仓
+      },
+      totalData: null, // 合计
+      rules: {
+        'queryDate': [{ required: true, message: '请选择查询季度', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据  有分页
+        return tireFeeReportList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            // 获取统计数据
+            this.getCount(params)
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '14%', align: '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: '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 lastQuarter = moment().subtract(1, 'month').quarter()
+      // 获取今年年份
+      const thisYear = moment().year()
+      this.timeInfo = [thisYear, lastQuarter]
+      this.queryParam.queryDate = thisYear + '0' + lastQuarter
+    },
+    // 查询
+    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
+    dateChange (date, valStr) {
+      this.timeInfo = date[0] && date[1] ? date : []
+      if (date && date.length > 0) {
+        this.queryParam.queryDate = date[0] + '0' + date[1]
+      } else {
+        this.queryParam.queryDate = undefined
+      }
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : ''
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.queryType = 'quarter'
+      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.queryParam.dealerLevel = undefined
+      this.queryParam.provinceFlag = '1'
+      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()
+      this.getQuarterVal()
+    },
+    //  导出  必填判断
+    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.getQuarterVal()
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

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

@@ -0,0 +1,354 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="yearQueryList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="yearQueryList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="查询年份" prop="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 :md="6" :sm="24">
+              <a-form-model-item label="地区">
+                <AreaList id="yearQueryList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域/分区">
+                <subarea id="yearQueryList-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="yearQueryList-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="yearQueryList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="yearQueryList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="yearQueryList-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="yearQueryList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :style="{ height: tableHeight+70+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight-120}"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 地区 -->
+          <template slot="addressInfo" slot-scope="text, record">
+            {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
+          </template>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <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.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-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: 'YearQueryList',
+  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().subtract(1, 'years').format('YYYY'), // 选择年份
+        dealerLevel: undefined, // 客户等级
+        customSn: undefined, // 客户sn
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '' // 分区
+        },
+        dealerEntity: {
+          dealerName: undefined, // 客户名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined // 区
+        },
+        provinceFlag: '1'// 是轮胎省仓
+      },
+      totalData: null, // 合计
+      yearInfo: '',
+      showOutDetail: false, // 出库明细弹窗
+      rules: {
+        'queryDate': [{ required: true, message: '请选择查询年份', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const oldParams = Object.assign(parameter, this.queryParam)
+        const params = JSON.parse(JSON.stringify(oldParams))
+        // 获取列表数据  有分页
+        return tireFeeReportList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            // 获取统计数据
+            this.getCount(params)
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  computed: {
+    // 获取年份数据
+    years () {
+      const years = []
+      const lens = (this.toYears - 2023) + 1
+      for (let i = 0; i < lens; i++) {
+        years.push(this.toYears - i)
+      }
+      return years
+    },
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '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) {
+      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'
+      const lastYear = moment().subtract(1, 'years').format('YYYY')
+      this.queryParam.queryDate = lastYear
+      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.queryParam.dealerLevel = undefined
+      this.$refs.subarea.clearData()
+      this.$refs.areaList.clearData()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+      }
+      this.totalData = null
+      this.$refs.table.clearTable()
+      this.$refs.ruleForm.resetFields()
+    },
+    //  导出  必填判断
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.exportList()
+        } else {
+          _this.$message.error('请选择查询年份')
+          return false
+        }
+      })
+    },
+    // 导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      _this.showExport = true
+      hdExportExcel(tireFeeListExport, params, '轮胎年度费用报表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 57 - 12
src/views/reportData/tireSalesReport/detailList.vue

@@ -32,12 +32,12 @@
                 <subarea id="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户名称">
-                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesReportList-dealerName" @change="custChange" />
-              </a-form-model-item>
-            </a-col>
             <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesReportList-dealerName" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户级别">
                   <v-select
@@ -49,11 +49,31 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓">
+                  <v-select
+                    v-model="queryParam.provinceFlag"
+                    id="tireSalesDealerList-provinceFlag"
+                    code="Flag"
+                    placeholder="请选择是否是轮胎省仓"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓名称">
+                  <dealerSubareaScopeList ref="provinceDealerList" placeholder="请输入轮胎省仓名称" id="tireSalesDealerList-custProvinceName" @change="custProvinceChange" />
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
                   <BizUser id="tireSalesReportList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客服">
+                  <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品编码/原厂编码">
                   <a-input id="tireSalesReportList-productWord" v-model.trim="queryParam.productWord" allowClear placeholder="请输入产品编码/原厂编码"/>
@@ -65,9 +85,8 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="text-align:center;">
+            <a-col :md="6" :sm="24">
               <a-button
-                style="margin-left: 5px"
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
@@ -78,7 +97,7 @@
                 :disabled="disabled"
                 id="tireSalesReportList-reset">重置</a-button>
               <a-button
-                style="margin-left: 10px"
+                style="margin-left: 8px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport(0)"
@@ -87,7 +106,7 @@
                 v-if="$hasPermissions('B_tireReportExport')"
                 id="tireSalesReportList-export">导出</a-button>
               <a-button
-                style="margin-left: 10px"
+                style="margin-left: 8px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport(1)"
@@ -149,6 +168,8 @@
               <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">客户现有库存金额:{{ (totalData&&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.totalStockAmount || totalData.rptDealerStockVO.totalStockAmount==0)) ? toThousands(totalData.rptDealerStockVO.totalStockAmount): '--' }}</a-col>
               <a-col :md="4" :sm="24">出库加盟商数量:{{ (totalData && (totalData.outQtyDealer || totalData.outQtyDealer==0)) ?totalData.outQtyDealer: '--' }}</a-col>
               <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库加盟商金额:{{ (totalData && (totalData.outAmountDealer || totalData.outAmountDealer==0)) ? toThousands(totalData.outAmountDealer): '--' }}</a-col>
+              <a-col :md="4" :sm="24">出库跨区域数量:{{ (totalData && (totalData.outQtyDealer || totalData.outQtyDealer==0)) ?totalData.outQtyDealer: '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库跨区域金额:{{ (totalData && (totalData.outAmountDealer || totalData.outAmountDealer==0)) ? toThousands(totalData.outAmountDealer): '--' }}</a-col>
               <a-col :md="4" :sm="24">出库终端数量:{{ (totalData && (totalData.outQtyTerminal || totalData.outQtyTerminal==0)) ?totalData.outQtyTerminal: '--' }}</a-col>
               <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库终端金额:{{ (totalData && (totalData.outAmountTerminal || totalData.outAmountTerminal==0)) ? toThousands(totalData.outAmountTerminal): '--' }}</a-col>
               <a-col :md="4" :sm="24">累计出库数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ?totalData.outQty: '--' }}</a-col>
@@ -177,13 +198,14 @@ 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 customerService from '@/views/common/customerService'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 // 接口
 import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
 export default {
   name: 'TireSalesReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, outDetailModal, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, outDetailModal, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal, customerService },
   data () {
     return {
       spinning: false,
@@ -209,7 +231,12 @@ export default {
           bizUserSn: undefined // 区域负责人
         },
         productWord: '', // 产品编码/原厂编码
-        productName: '' // 产品名称
+        productName: '', // 产品名称
+        parentDealerSn: undefined, // 轮胎省仓sn
+        parentDealerEntity: {
+          dealerName: undefined // 轮胎省仓名称
+        },
+        provinceFlag: undefined// 是否是轮胎省仓 1是 0否
       },
       totalData: null, // 合计
       showOutDetail: false, // 出库明细弹窗
@@ -265,6 +292,8 @@ export default {
         { title: '区域负责人', dataIndex: 'bizUserName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '轮胎省仓', dataIndex: 'provinceFlag', width: '80px', align: 'center', customRender: function (text) { return text == '1' ? '是' : '否' } },
+        { title: '轮胎省仓名称', dataIndex: 'parentDealerEntity.dealerName', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品尺寸', dataIndex: 'productEntity.size', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
@@ -313,6 +342,11 @@ export default {
       this.queryParam.dealerName = val.name
       this.queryParam.dealerSn = val.key
     },
+    // 轮胎省仓客户名称 change
+    custProvinceChange (val) {
+      this.queryParam.parentDealerEntity.dealerName = val.name
+      this.queryParam.parentDealerSn = val.key
+    },
     // 统计
     getCount (params) {
       queryTireDetailCount(params).then(res => {
@@ -380,8 +414,14 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.productWord = undefined
       this.queryParam.productName = undefined
+      this.queryParam.parentDealerSn = undefined
+      this.queryParam.parentDealerEntity.dealerName = undefined
+      this.queryParam.provinceFlag = undefined
       this.$refs.subarea.clearData()
-      this.$refs.dealerSubareaScopeList.resetForm()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.$refs.provinceDealerList.resetForm()
+      }
       this.totalData = null
       this.$refs.areaList.clearData()
       this.$refs.table.clearTable()
@@ -462,3 +502,8 @@ export default {
   }
 }
 </script>
+<style lang="less" scoped>
+  /deep/.button-warning{
+    margin-right:0;
+  }
+</style>

+ 54 - 15
src/views/reportData/tireSalesReport/list.vue

@@ -28,9 +28,9 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="区域/分区">
+              <a-form-model-item label="区域/分区">
                 <subarea id="tireSalesDealerList-subarea" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
@@ -49,13 +49,33 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓">
+                  <v-select
+                    v-model="queryParam.provinceFlag"
+                    id="tireSalesDealerList-provinceFlag"
+                    code="Flag"
+                    placeholder="请选择是否是轮胎省仓"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="轮胎省仓名称">
+                  <dealerSubareaScopeList ref="provinceDealerList" placeholder="请输入轮胎省仓名称" id="tireSalesDealerList-custProvinceName" @change="custProvinceChange" />
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
                   <BizUser id="tireSalesDealerList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
+                <a-form-model-item label="客服">
+                  <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24">
+            <a-col :md="isShowCustomerSearch?6:24" :sm="24" :style="{textAlign:isShowCustomerSearch?'left':'center'}">
               <a-button
                 style="margin-left: 5px"
                 type="primary"
@@ -124,6 +144,8 @@
               <a-col :md="4" :sm="24">累计出库数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ?totalData.outQty: '--' }}</a-col>
               <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">累计出库金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
               <a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData&&totalData.rptDealerStockVO && (totalData.rptDealerStockVO.totalWarrantyQty || totalData.rptDealerStockVO.totalWarrantyQty==0)) ?totalData.rptDealerStockVO.totalWarrantyQty: '--' }}</a-col>
+              <a-col :md="4" :sm="24">出库跨区域数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ?totalData.outQty: '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">出库跨区域金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -144,13 +166,14 @@ 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 customerService from '@/views/common/customerService'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 // 接口
 import { tireReportList, queryTireCount, tireListExport } from '@/api/reportData'
 export default {
   name: 'TireSalesDealerList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal, customerService },
   data () {
     return {
       spinning: false,
@@ -174,7 +197,12 @@ export default {
           subareaSn: undefined, // 区域
           subareaAreaSn: undefined, // 分区
           bizUserSn: undefined // 区域负责人
-        }
+        },
+        parentDealerSn: undefined, // 轮胎省仓sn
+        parentDealerEntity: {
+          dealerName: undefined // 轮胎省仓名称
+        },
+        provinceFlag: undefined// 是否是轮胎省仓 1是 0否
       },
       rules: {
         'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
@@ -230,6 +258,8 @@ export default {
         { title: '区域负责人', dataIndex: 'bizUserName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '轮胎省仓', dataIndex: 'provinceFlag', width: '8%', align: 'center', customRender: function (text) { return text == '1' ? '是' : '否' } },
+        { title: '轮胎省仓名称', dataIndex: 'parentDealerEntity.dealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '任务数量', dataIndex: 'dealerEntity.taskNum', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '授信金额', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '8%', align: 'right', customRender: function (text) { return text || '--' } },
         { title: '总部订货数量', dataIndex: 'sysOrderQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -253,16 +283,16 @@ export default {
         { title: <div>已绑质保单<div>数量</div></div>, dataIndex: 'rptDealerStockVO.totalWarrantyQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
-        arr.splice(8, 0, { title: '授信金额', dataIndex: 'dealerEntity.taskAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(10, 0, { title: '总部订货金额', dataIndex: 'sysOrderAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(12, 0, { title: '上级订货金额', dataIndex: 'upOrderAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(14, 0, { title: '跨地区订货金额', dataIndex: 'crossRegionAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(16, 0, { title: '累计入库金额', dataIndex: 'putAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(18, 0, { title: '退货金额', dataIndex: 'returnAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(20, 0, { title: '客户现有库存金额', dataIndex: 'rptDealerStockVO.totalStockAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(22, 0, { title: '出库加盟商金额', dataIndex: 'outAmountDealer', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(24, 0, { title: '出库终端金额', dataIndex: 'outAmountTerminal', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(26, 0, { title: '累计出库金额', dataIndex: 'outAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(10, 0, { title: '授信金额', dataIndex: 'dealerEntity.taskAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(12, 0, { title: '总部订货金额', dataIndex: 'sysOrderAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(14, 0, { title: '上级订货金额', dataIndex: 'upOrderAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(16, 0, { title: '跨地区订货金额', dataIndex: 'crossRegionAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(18, 0, { title: '累计入库金额', dataIndex: 'putAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(20, 0, { title: '退货金额', dataIndex: 'returnAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(22, 0, { title: '客户现有库存金额', dataIndex: 'rptDealerStockVO.totalStockAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(24, 0, { title: '出库加盟商金额', dataIndex: 'outAmountDealer', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(26, 0, { title: '出库终端金额', dataIndex: 'outAmountTerminal', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(28, 0, { title: '累计出库金额', dataIndex: 'outAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
@@ -285,6 +315,11 @@ export default {
       this.queryParam.dealerName = val.name
       this.queryParam.dealerSn = val.key
     },
+    // 轮胎省仓客户名称 change
+    custProvinceChange (val) {
+      this.queryParam.parentDealerEntity.dealerName = val.name
+      this.queryParam.parentDealerSn = val.key
+    },
     // 统计
     getCount (params) {
       queryTireCount(params).then(res => {
@@ -331,9 +366,13 @@ export default {
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
+      this.queryParam.parentDealerSn = undefined
+      this.queryParam.parentDealerEntity.dealerName = undefined
+      this.queryParam.provinceFlag = undefined
       this.totalData = null
       this.$refs.areaList.clearData()
       if (this.advanced) {
+        this.$refs.provinceDealerList.resetForm()
         this.$refs.dealerSubareaScopeList.resetForm()
       }
 

+ 1 - 1
src/views/reportData/tireSalesReport/outDetailModal.vue

@@ -73,7 +73,7 @@ export default {
       const _this = this
       const arr = [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '类型', width: '15%', dataIndex: 'customTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '加盟商/终端', dataIndex: 'customName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'customName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', dataIndex: 'outQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_outDetailShow_salesPrice')) {