Browse Source

修改bug

chenrui 11 tháng trước cách đây
mục cha
commit
f2f032117e

+ 82 - 80
src/views/common/monthDate.vue

@@ -1,36 +1,30 @@
 <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 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 getDate from '@/libs/getDate.js'
+import moment from 'moment'
 export default {
   props: {
     value: {
@@ -46,78 +40,86 @@ export default {
   },
   data () {
     return {
-      date: this.value,
-      toYears: new Date().getFullYear(), // 今年
-      // quarter: [{ id: 1, val: '一季度' }, { id: 2, val: '二季度' }, { id: 3, val: '三季度' }, { id: 4, val: '四季度' }], // 季度
-      currYear: this.toYears,
-      currJd: undefined
-    }
-  },
-  computed: {
-    years () {
-      const years = []
-      const lens = (this.toYears - 2024) + 1
-      for (let i = 0; i < lens; i++) {
-        years.push(this.toYears - i)
-      }
-      return years
-    },
-    quarter () {
-      const quarterData = [{ id: 1, val: '一季度' }, { id: 2, val: '二季度' }, { id: 3, val: '三季度' }, { id: 4, val: '四季度' }]
-      const now = new Date()
-      const month = now.getMonth()
-      const numInfo = Math.floor(month / 3) + 1
-      quarterData.map(item => {
-        if (numInfo * 1 + 1 === item.id) {
-          item.isToChoose = true
-        } else {
-          item.isToChoose = false
-        }
-      })
-      return quarterData
+      monthVal: this.value,
+      startValue: undefined, // 统计月份 开始
+      endValue: undefined, // 统计月份 结束
+      endOpen: false // 打开结束月份弹窗
     }
   },
   watch: {
     value (val) {
-      this.date = val
+      this.monthVal = val
       if (val.length > 0) {
-        this.currYear = val[0]
-        this.currJd = val[1]
+        this.startValue = val[0]
+        this.endValue = 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)
+    // 统计月份  选择月份限制
+    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])
     },
-    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)
+    // 结束时间
+    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 = this.toYears
+      this.currYear = undefined
       this.currJd = undefined
-      this.$emit('input', [this.currYear, this.currJd], null)
-      this.$emit('change', [this.currYear, this.currJd], null)
+      this.$emit('input', [this.startValue, this.endValue])
+      this.$emit('change', [this.startValue, this.endValue])
     }
   }
 }
 </script>
 <style lange="less">
-.quarter-date-box{
-  display: flex;
-  align-items: center;
+.month-date-box{
   width:100%;
-  .quarter-date-year{
-    flex:1;
+  .month-date-year{
+    display:flex;
+    align-item:center;
   }
-  .quarter-date-jd{
-    flex:1;
+  .monthBox{
+    .ant-calendar-picker-icon{
+      display:none !important;
+    }
+    .ant-calendar-picker input{
+      text-align:center;
+    }
   }
 }
 </style>

+ 25 - 27
src/views/reportData/tireFeeReport/feeDetailList.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="feeDetailList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="tireSalesReportList-form"
+          id="feeDetailList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -13,29 +13,27 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="统计月份" prop="time">
-                <rangeDate
-                  ref="rangeDate"
-                  id="tireSalesReportList-time"
-                  :showTime="false"
-                  :today="false"
-                  :value="queryParam.time"
-                  @change="dateChange" />
+                <monthDate
+                  ref="monthDate"
+                  id="monthQueryList-time"
+                  :value="queryParam.monthVal"
+                  @change="monthChange"></monthDate>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="地区">
-                <AreaList id="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <AreaList id="feeDetailList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="区域/分区">
-                <subarea id="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                <subarea id="feeDetailList-subarea" ref="subarea" @change="subareaChange"></subarea>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户名称">
-                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesReportList-dealerName" @change="custChange" />
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="feeDetailList-dealerName" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -43,7 +41,7 @@
                   <v-select
                     v-model="queryParam.dealerLevel"
                     ref="dealerLevel"
-                    id="tireSalesReportList-dealerLevel"
+                    id="feeDetailList-dealerLevel"
                     code="DEALER_LEVEL"
                     placeholder="请选择客户级别"
                     allowClear></v-select>
@@ -54,7 +52,7 @@
                   <v-select
                     v-model="queryParam.dealerLevel"
                     ref="dealerLevel"
-                    id="tireSalesReportList-dealerLevel"
+                    id="feeDetailList-dealerLevel"
                     code="DEALER_LEVEL"
                     placeholder="请选择轮胎省仓"
                     allowClear></v-select>
@@ -66,12 +64,12 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="tireSalesReportList-refresh">查询</a-button>
+                id="feeDetailList-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="tireSalesReportList-reset">重置</a-button>
+                id="feeDetailList-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -80,7 +78,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireReportExport')"
-                id="tireSalesReportList-export">导出</a-button>
+                id="feeDetailList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
@@ -116,12 +114,12 @@
               type="link"
               class="button-warning"
               @click="handleOutDetail(record)"
-              id="tireSalesReportList-outDetail">出库明细</a-button>
+              id="feeDetailList-outDetail">出库明细</a-button>
             <span v-else>--</span>
           </template>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台出库数量:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_feeDetailList_salesPrice')">平台出库数量:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
               <a-col :md="4" :sm="24">省仓出库加盟商:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
               <a-col :md="4" :sm="24">运费补贴:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
               <a-col :md="4" :sm="24">积分合计:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
@@ -147,7 +145,7 @@ import { commonMixin } from '@/utils/mixin'
 import { hdExportExcel } from '@/libs/exportExcel'
 // 组件
 import { STable, VSelect } from '@/components'
-import rangeDate from '@/views/common/rangeDate.vue'
+import monthDate from '@/views/common/monthDate.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
@@ -157,9 +155,9 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 // 接口
 import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
 export default {
-  name: 'TireSalesReportList',
+  name: 'FeeDetailList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, monthDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
   data () {
     return {
       spinning: false,
@@ -247,15 +245,15 @@ export default {
         { title: '积分值', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '平台出库数量', dataIndex: 'crossRegionQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '省仓出库加盟商数量', dataIndex: 'putQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '运费补贴', dataIndex: 'rptDealerStockVO.totalStockQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '积分合计', dataIndex: 'outQtyDealer', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <a-tooltip placement='top' title='省仓出库加盟商数量*5'>运费补贴&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'rptDealerStockVO.totalStockQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <a-tooltip placement='top' title='非轮胎省仓,积分合计=平台出库数量*积分值;是轮胎省仓,积分合计=省仓出给加盟商数量*积分值'>积分合计&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'outQtyDealer', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '积分工厂承担60%', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '积分供应链管理部承担40%', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '开单金额', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '平台服务费率', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '省仓服务费率', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '平台服务费', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '省仓服务费', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: <a-tooltip placement='top' title='开单金额 * 平台服务费'>平台服务费&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <a-tooltip placement='top' title='开单金额 * 省仓服务费'>省仓服务费&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       return arr
     }
@@ -312,7 +310,7 @@ export default {
       this.queryParam.districtSn = val[2] ? val[2] : undefined
     },
     //  日期选择  change
-    dateChange (date) {
+    monthChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
       } else {

+ 5 - 7
src/views/reportData/tireFeeReport/index.vue

@@ -3,16 +3,16 @@
     <a-card size="small" :bordered="false">
       <a-tabs default-active-key="1" @change="handleChange">
         <a-tab-pane key="1" tab="轮胎月度费用报表">
-          <monthQueryList ref="tireStatisticsList"></monthQueryList>
+          <monthQueryList ref="tireMonthQueryList"></monthQueryList>
         </a-tab-pane>
         <a-tab-pane key="2" tab="轮胎季度费用报表" force-render>
-          <quarterQueryList ref="tireDetailList"></quarterQueryList>
+          <quarterQueryList></quarterQueryList>
         </a-tab-pane>
         <a-tab-pane key="3" tab="轮胎年度费用报表" force-render>
-          <yearQueryList ref="tireDetailList"></yearQueryList>
+          <yearQueryList></yearQueryList>
         </a-tab-pane>
         <a-tab-pane key="4" tab="轮胎费用明细报表" force-render>
-          <feeDetailList ref="tireDetailList"></feeDetailList>
+          <feeDetailList></feeDetailList>
         </a-tab-pane>
       </a-tabs>
     </a-card>
@@ -42,9 +42,7 @@ export default {
     // 初始化
     pageInit () {
       if (this.tabVal == 1) {
-        this.$refs.tireStatisticsList.pageInit()
-      } else {
-        this.$refs.tireDetailList.pageInit()
+        this.$refs.tireMonthQueryList.pageInit()
       }
     }
   },

+ 30 - 35
src/views/reportData/tireFeeReport/monthQueryList.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="monthQueryList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="tireSalesReportList-form"
+          id="monthQueryList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -13,29 +13,23 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="查询月份" prop="time">
-                <rangeDate
-                  ref="rangeDate"
-                  id="tireSalesReportList-time"
-                  :showTime="false"
-                  :today="false"
-                  :value="queryParam.time"
-                  @change="dateChange" />
+                <a-month-picker class="monthBox" 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="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <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="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                <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="tireSalesReportList-dealerName" @change="custChange" />
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="monthQueryList-dealerName" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -43,7 +37,7 @@
                   <v-select
                     v-model="queryParam.dealerLevel"
                     ref="dealerLevel"
-                    id="tireSalesReportList-dealerLevel"
+                    id="monthQueryList-dealerLevel"
                     code="DEALER_LEVEL"
                     placeholder="请选择客户级别"
                     allowClear></v-select>
@@ -54,7 +48,7 @@
                   <v-select
                     v-model="queryParam.dealerLevel"
                     ref="dealerLevel"
-                    id="tireSalesReportList-dealerLevel"
+                    id="monthQueryList-dealerLevel"
                     code="DEALER_LEVEL"
                     placeholder="请选择是否是轮胎省仓"
                     allowClear></v-select>
@@ -66,12 +60,12 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="tireSalesReportList-refresh">查询</a-button>
+                id="monthQueryList-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="tireSalesReportList-reset">重置</a-button>
+                id="monthQueryList-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -80,7 +74,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireReportExport')"
-                id="tireSalesReportList-export">导出</a-button>
+                id="monthQueryList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
@@ -105,28 +99,18 @@
           :scroll="{ y: tableHeight-120}"
           :defaultLoadData="false"
           bordered>
+          <!-- 地区 -->
           <template slot="addressInfo" slot-scope="text, record">
             {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
           </template>
-          <!-- 操作 -->
-          <template slot="action" slot-scope="text, record">
-            <a-button
-              v-if="$hasPermissions('B_outDetailShow')"
-              size="small"
-              type="link"
-              class="button-warning"
-              @click="handleOutDetail(record)"
-              id="tireSalesReportList-outDetail">出库明细</a-button>
-            <span v-else>--</span>
-          </template>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="3" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">运费补贴:{{ (totalData && (totalData.sysOrderAmount || totalData.sysOrderAmount==0)) ? toThousands(totalData.sysOrderAmount): '--' }}</a-col>
+              <a-col :md="3" :sm="24" v-if="$hasPermissions('M_monthQueryList_salesPrice')">运费补贴:{{ (totalData && (totalData.sysOrderAmount || totalData.sysOrderAmount==0)) ? toThousands(totalData.sysOrderAmount): '--' }}</a-col>
               <a-col :md="3" :sm="24"> 积分合计:{{ (totalData && (totalData.upOrderQty || totalData.upOrderQty==0)) ?totalData.upOrderQty: '--' }}</a-col>
               <a-col :md="4" :sm="24">积分工厂承担60%:{{ (totalData && (totalData.crossRegionQty || totalData.crossRegionQty==0)) ?totalData.crossRegionQty: '--' }}</a-col>
               <a-col :md="6" :sm="24">积分供应链管理部承担40%:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ?totalData.putQty: '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台服务费:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">省仓服务费:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_monthQueryList_salesPrice')">平台服务费:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_monthQueryList_salesPrice')">省仓服务费:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -144,7 +128,6 @@ import { commonMixin } from '@/utils/mixin'
 import { hdExportExcel } from '@/libs/exportExcel'
 // 组件
 import { STable, VSelect } from '@/components'
-import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
@@ -154,9 +137,9 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 // 接口
 import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
 export default {
-  name: 'TireSalesReportList',
+  name: 'MonthQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
   data () {
     return {
       spinning: false,
@@ -165,6 +148,7 @@ export default {
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
       showExport: false, // 导出弹窗
+      monthVal: undefined,
       //  查询条件
       queryParam: {
         time: [], // 日期
@@ -239,7 +223,7 @@ export default {
         { title: '轮胎省仓', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: <div>平台出库<div>数量</div></div>, dataIndex: 'sysOrderQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: <div>省仓出库加<div>盟商数量</div></div>, dataIndex: 'upOrderQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '运费补贴', dataIndex: 'crossRegionQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <a-tooltip placement='top' title='省仓出库加盟商数量*5'>运费补贴&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'crossRegionQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '积分合计', dataIndex: 'putQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: <div>积分工厂<div>承担60%</div></div>, dataIndex: 'rptDealerStockVO.totalStockQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: <div>积分供应链管理部<div>承担40%</div></div>, dataIndex: 'outQtyDealer', width: '18%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -414,3 +398,14 @@ export default {
   }
 }
 </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>

+ 16 - 16
src/views/reportData/tireFeeReport/quarterQueryList.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="quarterQueryList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="tireSalesReportList-form"
+          id="quarterQueryList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -13,23 +13,23 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="查询季度" prop="time">
-                <quarterDate ref="quarterDate" id="tireSalesReportList-time" :value="queryParam.time" @change="dateChange" />
+                <quarterDate ref="quarterDate" id="quarterQueryList-time" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="地区">
-                <AreaList id="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <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="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                <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="tireSalesReportList-dealerName" @change="custChange" />
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="quarterQueryList-dealerName" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -37,7 +37,7 @@
                   <v-select
                     v-model="queryParam.dealerLevel"
                     ref="dealerLevel"
-                    id="tireSalesReportList-dealerLevel"
+                    id="quarterQueryList-dealerLevel"
                     code="DEALER_LEVEL"
                     placeholder="请选择客户级别"
                     allowClear></v-select>
@@ -49,12 +49,12 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="tireSalesReportList-refresh">查询</a-button>
+                id="quarterQueryList-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="tireSalesReportList-reset">重置</a-button>
+                id="quarterQueryList-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -63,7 +63,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireReportExport')"
-                id="tireSalesReportList-export">导出</a-button>
+                id="quarterQueryList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
@@ -99,14 +99,14 @@
               type="link"
               class="button-warning"
               @click="handleOutDetail(record)"
-              id="tireSalesReportList-outDetail">出库明细</a-button>
+              id="quarterQueryList-outDetail">出库明细</a-button>
             <span v-else>--</span>
           </template>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">广宣品费用:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_quarterQueryList_salesPrice')">广宣品费用:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_quarterQueryList_salesPrice')">平台返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_quarterQueryList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -134,7 +134,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 // 接口
 import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
 export default {
-  name: 'TireSalesReportList',
+  name: 'QuarterQueryList',
   mixins: [commonMixin],
   components: { STable, VSelect, quarterDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
   data () {
@@ -218,7 +218,7 @@ export default {
         { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '平台出库数量', dataIndex: 'productEntity.code', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '开单金额', dataIndex: 'crossRegionQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '广宣品费用', dataIndex: 'putQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <a-tooltip placement='top' title='开单金额*1.5%'>广宣品费用&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'putQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '平台返利点数', dataIndex: 'rptDealerStockVO.totalStockQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '省仓返利点数', dataIndex: 'outQtyDealer', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '平台返利金额', dataIndex: 'returnQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 13 - 13
src/views/reportData/tireFeeReport/yearQueryList.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="yearQueryList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="tireSalesReportList-form"
+          id="yearQueryList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -22,18 +22,18 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="地区">
-                <AreaList id="tireSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <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="tireSalesReportList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                <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="tireSalesReportList-dealerName" @change="custChange" />
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="yearQueryList-dealerName" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -41,7 +41,7 @@
                   <v-select
                     v-model="queryParam.dealerLevel"
                     ref="dealerLevel"
-                    id="tireSalesReportList-dealerLevel"
+                    id="yearQueryList-dealerLevel"
                     code="DEALER_LEVEL"
                     placeholder="请选择客户级别"
                     allowClear></v-select>
@@ -53,12 +53,12 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="tireSalesReportList-refresh">查询</a-button>
+                id="yearQueryList-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="tireSalesReportList-reset">重置</a-button>
+                id="yearQueryList-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -67,7 +67,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireReportExport')"
-                id="tireSalesReportList-export">导出</a-button>
+                id="yearQueryList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
@@ -103,13 +103,13 @@
               type="link"
               class="button-warning"
               @click="handleOutDetail(record)"
-              id="tireSalesReportList-outDetail">出库明细</a-button>
+              id="yearQueryList-outDetail">出库明细</a-button>
             <span v-else>--</span>
           </template>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">平台返利金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_yearQueryList_salesPrice')">平台返利金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount): '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_yearQueryList_salesPrice')">省仓返利金额:{{ (totalData && (totalData.returnAmount || totalData.returnAmount==0)) ? toThousands(totalData.returnAmount): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -137,7 +137,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 // 接口
 import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
 export default {
-  name: 'TireSalesReportList',
+  name: 'YearQueryList',
   mixins: [commonMixin],
   components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
   data () {