浏览代码

轮胎补贴配置,轮胎补贴报表新增页面

chenrui 2 月之前
父节点
当前提交
9b05456133

+ 62 - 20
src/views/reportData/salesDetails/list.vue

@@ -151,6 +151,20 @@
     </a-card>
     <a-card size="small" :bordered="false">
       <a-spin :spinning="spinning" tip="Loading...">
+        <div style="margin-bottom:12px;text-align: right;">
+          <span>显示:</span>
+          <a-tree-select
+            size="small"
+            v-model="showCols"
+            style="min-width: 200px"
+            dropdownMatchSelectWidth
+            :maxTagCount="3"
+            id="salesOrderTotalList-isShowColumn"
+            :tree-data="colsArr"
+            tree-checkable
+            placeholder="请选择要显示的列(多选)"
+          />
+        </div>
         <!-- 列表 -->
         <s-table
           class="sTable fixPagination"
@@ -173,23 +187,19 @@
             <a-badge count="槛" v-if="record.promotionFlag=='GATE'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge>
           </template>
           <template slot="footer">
-            <a-row :gutter="15">
-              <a-col :md="4" :sm="24">下推数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_costPrice')">成本金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">总优惠金额(含特价):{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
-              <a-col :md="4" :sm="24">毛利率(减促销费用):{{ (totalData && (totalData.grossMargin || totalData.grossMargin==0)) ? (totalData.grossMargin*100).toFixed(2)+'%' : '--' }}</a-col>
-              <a-col :md="4" :sm="24"></a-col>
-              <a-col :md="4" :sm="24"></a-col>
-            </a-row>
-            <a-row :gutter="15">
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
-              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">&nbsp;&nbsp;特价产品优惠金额:{{ (totalData && (totalData.specialDiscountAmount || totalData.specialDiscountAmount==0)) ? toThousands(totalData.specialDiscountAmount) : '--' }}</a-col>
-              <a-col :md="4" :sm="24">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;实际毛利率:{{ (totalData && (totalData.realGrossMargin || totalData.realGrossMargin==0)) ? (totalData.realGrossMargin*100).toFixed(2)+'%' : '--' }}</a-col>
-              <a-col :md="4" :sm="24"></a-col>
-              <a-col :md="4" :sm="24"></a-col>
-            <!--  <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">折后金额:{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? toThousands(totalData.discountedAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">折扣金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col> -->
+            <a-row :gutter="15" class="footerBox">
+              <a-col :md="4" :sm="24"><label>下推数量:</label>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_costPrice')"><label>成本金额:</label>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')"><label>总优惠金额(含特价):</label>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24"><label>毛利率(减促销费用):</label>{{ (totalData && (totalData.grossMargin || totalData.grossMargin==0)) ? (totalData.grossMargin*100).toFixed(2)+'%' : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')"><label>开单金额:</label>{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')"><label>实售金额:</label>{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')"><label>特价产品优惠金额:</label>{{ (totalData && (totalData.specialDiscountAmount || totalData.specialDiscountAmount==0)) ? toThousands(totalData.specialDiscountAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24"><label>实际毛利率:</label>{{ (totalData && (totalData.realGrossMargin || totalData.realGrossMargin==0)) ? (totalData.realGrossMargin*100).toFixed(2)+'%' : '--' }}</a-col>
+              <a-col :md="4" :sm="24"><label>合计重量:</label>{{ (totalData && (totalData.realGrossMargin || totalData.realGrossMargin==0)) ? totalData.realGrossMargin : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')"><label>平均成本公斤单价:</label>{{ (totalData && (totalData.specialDiscountAmount || totalData.specialDiscountAmount==0)) ? toThousands(totalData.specialDiscountAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')"><label>平均售价公斤单价:</label>{{ (totalData && (totalData.specialDiscountAmount || totalData.specialDiscountAmount==0)) ? toThousands(totalData.specialDiscountAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')"><label>返利金额:</label>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? toThousands(totalData.discountedAmount) : '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -290,7 +300,23 @@ export default {
           this.spinning = false
           return data
         })
-      }
+      },
+      // 列表列显示
+      colsArr: [
+        {
+          title: '单重',
+          value: 'directRebateAmountInfo',
+          key: 'directRebateAmountInfo',
+          disabled: !this.$hasPermissions('M_salesOrderTotalList_salesPrice')
+        },
+        {
+          title: '平均公斤单价',
+          value: 'indirectRebateAmountInfo',
+          key: 'indirectRebateAmountInfo',
+          disabled: !this.$hasPermissions('M_salesOrderTotalList_salesPrice')
+        }
+      ],
+      showCols: []// 已勾选显示的列
     }
   },
   computed: {
@@ -316,7 +342,10 @@ export default {
         { title: '产品名称', dataIndex: 'productName', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', scopedSlots: { customRender: 'productCode' } },
         { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '下推数量', dataIndex: 'qty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '下推数量', dataIndex: 'qty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单重(kg)', dataIndex: 'qty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '合计重量', dataIndex: 'qty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+
         // { title: '成本价', dataIndex: 'totalCost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '实售价', dataIndex: 'totalRealAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '开单价', dataIndex: 'totalAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -327,10 +356,13 @@ export default {
         // { title: '折扣金额', dataIndex: 'discountAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
       ]
       if (this.$hasPermissions('M_salesDetailsList_costPrice')) { //  成本价权限
-        arr.splice(21, 0, { title: '成本金额', dataIndex: 'totalCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '成本金额', dataIndex: 'totalCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '平均成本公斤单价', dataIndex: 'totalCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       if (this.$hasPermissions('M_salesDetailsList_salesPrice')) { //  售价权限
         arr.push({ title: '实售金额', dataIndex: 'totalRealAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '平均售价公斤单价', dataIndex: 'totalRealAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '返利金额', dataIndex: 'totalRealAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         arr.push({ title: '开单金额', dataIndex: 'totalAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       if (this.$hasPermissions('M_salesDetailsList_cityPrice')) { //  市级价权限
@@ -502,3 +534,13 @@ export default {
   }
 }
 </script>
+<style lang="less" scoped>
+  .footerBox{
+    /deep/ label{
+      display: inline-block;
+      width: 135px;
+      text-align: right;
+    }
+
+  }
+</style>

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

@@ -14,6 +14,9 @@
         <a-tab-pane key="4" tab="增量补贴报表(年度)" force-render>
           <incrementalSubsidyYearList ref="tableList4"></incrementalSubsidyYearList>
         </a-tab-pane>
+        <a-tab-pane key="5" tab="供应商轮胎补贴返利报表" force-render>
+          <supplierRebateList ref="tableList5"></supplierRebateList>
+        </a-tab-pane>
       </a-tabs>
     </a-card>
   </div>
@@ -25,10 +28,11 @@ import serviceFreightList from './serviceFreightList.vue'
 import incrementalSubsidyList from './incrementalSubsidyList.vue'
 import incrementalSubsidyYearList from './incrementalSubsidyYearList.vue'
 import serviceFreightDetailList from './serviceFreightDetailList.vue'
+import supplierRebateList from './supplierRebateList.vue'
 export default {
   name: 'TireFeeReportIndex',
   mixins: [commonMixin],
-  components: { serviceFreightList, incrementalSubsidyList, incrementalSubsidyYearList, serviceFreightDetailList },
+  components: { serviceFreightList, incrementalSubsidyList, incrementalSubsidyYearList, serviceFreightDetailList, supplierRebateList },
   data () {
     return {
       tabVal: 1 // tab值

+ 412 - 0
src/views/reportData/tireSubsidyReport/supplierRebateList.vue

@@ -0,0 +1,412 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="sRebateList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="sRebateList-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 prop="queryDate">
+                <div style="display: inline;" slot="label">
+                  <a-popover placement="top">
+                    <template slot="content">
+                      <p>1、销售单(非转单)下推时间</p>
+                      <p>2、销售单(转单)转单完结时间</p>
+                      <p>3、销售退货单客服确认时间</p>
+                    </template>
+                    查询月份 <a-icon type="question-circle" />
+                  </a-popover>
+                </div>
+                <a-month-picker
+                  id="sRebateList-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-item label="销售单号">
+                <a-input id="sRebateList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="备货单号">
+                <a-input id="sRebateList-bizNo1" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入备货单号"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <custList id="sRebateList-custName" dataAuthFlag="0" placeholder="请输入客户名称" ref="custList" @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="sRebateList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="所在区域">
+                  <subarea id="sRebateList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <AreaList id="sRebateList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="sRebateList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="sRebateList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('M_tireSubsidyExport')"
+                id="sRebateList-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"
+          :pageSize="30"
+          :scroll="{ y: tableHeight-50}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">下推数量:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ?totalData.subsidyServiceAmount: '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">平均成本公斤单价:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">成本金额:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
+              <a-col :md="6" :sm="24">合计重量:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ?totalData.subsidyServiceAmount: '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">实售金额:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">平均售价公斤单价:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">返利金额:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import custList from '@/views/common/custList.vue'
+// 接口
+import { subsidyDetailList, subsidyDetailCount, subsidyDetailExport } from '@/api/reportData'
+export default {
+  name: 'ServiceFreightDetailList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, subarea, AreaList, custList },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      monthVal: moment().format('YYYY-MM'), // 初始化月份值
+      //  查询条件
+      queryParam: {
+        queryDate: moment().format('YYYY-MM'), // 选择月份
+        bizNo: undefined, // 业务单号
+        bizType: undefined, // 业务类型
+        belongProvinceFlag: undefined, // 是否轮胎省仓
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined // 分区
+        },
+        dealer: {
+          provinceSn: undefined,
+          citySn: undefined,
+          districtSn: undefined
+        },
+        belongDealerSn: undefined,
+        transferDealerSn: undefined,
+        bizDealerSn: undefined
+      },
+      totalData: null, // 合计
+      showOutDetail: false, // 出库明细弹窗
+      rules: {
+        'time': [{ required: true, message: '请选择查询日期', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const oldParams = Object.assign(parameter, this.queryParam)
+        const params = JSON.parse(JSON.stringify(oldParams))
+        delete params.time
+        // 获取列表数据  有分页
+        return subsidyDetailList(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: '40px', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'bizNo', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货单号', dataIndex: 'bizNo1', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'provinceName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'bizDealerName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户级别', dataIndex: 'dealerLevel', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下推时间', dataIndex: 'belongProvinceFlagDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下推数量', dataIndex: 'bizQty3', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单重(kg)', dataIndex: 'bizQty2', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '合计重量', dataIndex: 'bizQty1', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本金额', dataIndex: 'subsidyServiceDiff1', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text * 100) + '%' : '--') } },
+        { title: '平均成本公斤单价', dataIndex: 'subsidyShippingDiff', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '实售金额', dataIndex: 'subsidyShippingAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '平均售价公斤单价', dataIndex: 'subsidyShippingAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '返利金额', dataIndex: 'subsidyShippingAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+      ]
+      // if (_this.$hasPermissions('M_tireSubsidyList_salesPrice')) {
+      //   arr.splice(8, 0, { title: '销售金额', dataIndex: 'bizAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      //   arr.splice(10, 0, { title: '服务费金额', dataIndex: 'subsidyServiceAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      // }
+      return arr
+    }
+  },
+  methods: {
+    // 选择月份  禁用选择当月以后日期
+    disabledDate (current) {
+      return current && current >= moment().endOf('day')
+    },
+    // 选择月份 change
+    onChangeMonth (date, dateString) {
+      this.monthVal = dateString
+      if (date && dateString != '') {
+        this.queryParam.queryDate = dateString
+      } 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
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 选择发货经销商
+    custTireChange (val) {
+      this.queryParam.transferDealerSn = val.key
+    },
+    // 记账主体
+    belongDealerChange (val) {
+      this.queryParam.belongDealerSn = val.key
+    },
+    // 客户名称 change
+    custChange (val) {
+      this.queryParam.bizDealerSn = val.key
+    },
+    // 统计
+    getCount (params) {
+      subsidyDetailCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 地区省份
+    areaChange (val) {
+      this.queryParam.dealer.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.dealer.citySn = val[1] ? val[1] : undefined
+      this.queryParam.dealer.districtSn = val[2] ? val[2] : undefined
+    },
+    // 区域分区  change
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = [
+        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.bizNo = undefined
+      this.queryParam.bizType = undefined
+      this.queryParam.belongDealerSn = undefined
+      this.queryParam.transferDealerSn = undefined
+      this.queryParam.bizDealerSn = undefined
+      this.queryParam.belongProvinceFlag = undefined
+      this.queryParam.dealer.provinceSn = undefined
+      this.queryParam.dealer.citySn = undefined
+      this.queryParam.dealer.districtSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.$refs.belongDealer.resetForm()
+      if (this.advanced) {
+        this.$refs.dealerTireScopeList.resetForm()
+        this.$refs.custList.resetForm()
+        this.$refs.subarea.clearData()
+        this.$refs.areaList.clearData()
+      }
+      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.$store.state.app.curActionPermission = 'M_tireSubsidyExport'
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(subsidyDetailExport, params, '轮胎服务费运费明细报表-', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+      this.resetSearchForm()
+    },
+    // 计算表格高度
+    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()
+    }
+  }
+}
+</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>

+ 6 - 2
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -105,6 +105,9 @@
             <span v-if="$route.params.type!='stockOut'&&$hasPermissions('B_dispatchDetail_cityPrice')">
               本次下推市级价金额:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;
             </span>
+            <span v-if="$route.params.type!='stockOut'&&$hasPermissions('B_dispatchDetail_cityPrice')">
+              合计重量:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? detailData.totalCityAmount : '--' }}</strong>;
+            </span>
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -235,12 +238,13 @@ export default {
         // { title: '销售价格', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '市级销售价格', dataIndex: 'cityPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', dataIndex: 'salesQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '本次下推数', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '本次下推数', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '合计重量', dataIndex: 'qty1', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         // { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_dispatchDetail_salesPrice')) { //  售价权限
         arr.splice(5, 0, { title: '销售价格', dataIndex: 'price', width: '8%', align: 'right', scopedSlots: { customRender: 'price' } })
-        arr.splice(9, 0, { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(8, 0, { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       if (this.$hasPermissions('B_dispatchDetail_cityPrice')) { //  市级权限
         arr.splice(6, 0, { title: '市级销售价格', dataIndex: 'cityPrice', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })

+ 5 - 1
src/views/setting/tireSubsidySetting/index.vue

@@ -13,6 +13,9 @@
       <a-tab-pane key="SUBSIDY_YEAR_FEE" tab="增量补贴(年度)" force-render>
         <addSubsidyList pageType="SUBSIDY_YEAR_FEE"></addSubsidyList>
       </a-tab-pane>
+      <a-tab-pane key="SUBSIDY_AMOUNT" tab="返利金额" force-render>
+        <rebateAmountList pageType="SUBSIDY_AMOUNT"></rebateAmountList>
+      </a-tab-pane>
     </a-tabs>
   </div>
 </template>
@@ -21,11 +24,12 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 import costCollectionList from './costCollectionList.vue'
 import addSubsidyList from './addSubsidyList.vue'
+import rebateAmountList from './rebateAmountList.vue'
 
 export default {
   name: 'TireSubsidySetting',
   mixins: [commonMixin],
-  components: { costCollectionList, addSubsidyList },
+  components: { costCollectionList, addSubsidyList, rebateAmountList },
   data () {
     return {
       tabVal: 'SERVICE_FEE' // tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表

+ 230 - 0
src/views/setting/tireSubsidySetting/rebateAddModal.vue

@@ -0,0 +1,230 @@
+<template>
+  <a-modal
+    centered
+    class="costAdd-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="!itemSn?'新增':'编辑'"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="700">
+    <div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="costAddModal-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="开始时间" v-if="itemSn&&timeInfo">
+            {{ timeInfo }}
+          </a-form-model-item>
+          <a-form-model-item label="返利金额" prop="ruleValue1">
+            <a-input-number
+              id="costAddModal-ruleValue1"
+              v-model="form.ruleValue1"
+              :min="0"
+              style="width:90%;"
+              :max="100"
+              :precision="2"
+              placeholder="请输入返利金额"/>
+            <span style="margin-left:10px;">元</span>
+          </a-form-model-item>
+          <a-form-model-item label="当前返利金额" v-if="rebateList&&rebateList.length>0">
+            {{ (rebateList[0].ruleValue1||rebateList[0].ruleValue1==0)?toThousands(rebateList[0].ruleValue1) :'--' }}
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button id="costAddModal-cancel" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+          <a-button type="primary" id="costAddModal-save" @click="handleSave">保存</a-button>
+        </div>
+      </a-spin>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { VSelect } from '@/components'
+import custList from '@/views/common/custList.vue'
+// 接口
+import { getSubsidyRuleList, subsidyRuleSave, createSubsidyRule, editSubsidyRule } from '@/api/subsidyRule'
+export default {
+  name: 'CostAddModal',
+  mixins: [commonMixin],
+  components: { VSelect, custList },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    pageType: { //  页面类型
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false, // 页面加载状态
+      formItemLayout: {// form表单中label设置
+        labelCol: { span: 4 },
+        wrapperCol: { span: 17 }
+      },
+      // 提交数据
+      form: {
+        defaultFlag: 1, // 0指定客户  1默认
+        dealerSn: undefined, // 客户名称
+        ruleValue1: undefined, // 返利金额
+        ruleType: undefined, // 弹窗类型
+        effectType: 0
+      },
+      // 必填项判断
+      rules: {
+        ruleValue1: [{ required: true, message: '请输入返利金额', trigger: 'blur' }]
+      },
+      rebateList: null, // 当前返利金额 数据
+      itemSn: null, // 当前行ruleSn
+      timeInfo: null// 开始时间
+    }
+  },
+  methods: {
+    // 获取当前返利金额  历史记录
+    getHistoryData (ajaxData) {
+      this.spinning = true
+      getSubsidyRuleList(ajaxData).then(res => {
+        if (res.status == 200) {
+          this.rebateList = res.data
+        } else {
+          this.rebateList = null
+        }
+        this.spinning = false
+      })
+    },
+    // 保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.form.ruleType = _this.pageType
+          _this.spinning = true
+          const ajaxName = _this.itemSn ? editSubsidyRule : subsidyRuleSave
+          _this.form.ruleSn = _this.itemSn ? _this.itemSn : undefined
+          ajaxName(_this.form).then(res => {
+            if (res.status == 200) {
+              if (!_this.itemSn) {
+                if (!res.data) {
+                  _this.isShow = false
+                  _this.$message.success(res.message)
+                  _this.$emit('ok')
+                } else {
+                  _this.openTip(res.data)
+                }
+              } else {
+                _this.isShow = false
+                _this.$message.success(res.message)
+                _this.$emit('ok')
+              }
+            }
+            _this.spinning = false
+          }).catch(err => {
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    openTip (code) {
+      const _this = this
+      if (code != 'IN_USE') {
+        this.$confirm({
+          title: '提示',
+          content: '将重新生成新的返利金额,并结束当前月份的返利金额。',
+          centered: true,
+          onOk () {
+            createSubsidyRule(_this.form).then(res => {
+              if (res.status == 200) {
+                _this.isShow = false
+                _this.$message.success(res.message)
+                _this.$emit('ok')
+              }
+            })
+          }
+        })
+      } else {
+        const tipWord = '已存在【启用中】的返利金额'
+        _this.setInfoModal(tipWord)
+      }
+    },
+    // 提示弹窗
+    setInfoModal (tip) {
+      this.$info({
+        title: '提示',
+        content: tip,
+        centered: true,
+        onOk () {
+          console.log('知道了')
+        }
+      })
+    },
+    // 编辑获取数据
+    pageInit (itemData) {
+      this.itemSn = itemData.ruleSn
+      this.form.ruleValue1 = itemData.ruleValue1
+      this.timeInfo = itemData.ruleStartDate
+    },
+    // 重置
+    resetFormData () {
+      this.form.defaultFlag = 1
+      this.form.dealerSn = undefined
+      this.form.ruleValue1 = undefined
+      this.form.ruleType = undefined
+      this.form.effectType = 0
+      this.rebateList = null
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetFormData()
+      } else {
+        if (!this.itemSn) {
+          this.getHistoryData({ defaultFlag: 1, subsidyQueryStatus: 'NOT_FINISH', ruleType: this.pageType })
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .costAdd-modal{
+    .formList{
+      margin-left:42px;
+    }
+    .formBoxList{
+      div{
+        margin-bottom:5px;
+      }
+    }
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 30px;
+    }
+  }
+</style>

+ 205 - 0
src/views/setting/tireSubsidySetting/rebateAmountList.vue

@@ -0,0 +1,205 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="rebateAmountList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="rebateAmountList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="5" :sm="24">
+              <a-form-model-item label="状态">
+                <v-select
+                  v-model="queryParam.subsidyQueryStatus"
+                  id="rebateAmountList-subsidyQueryStatus"
+                  code="INCREMENT_SUBSIDY_QUERY_STATUS"
+                  placeholder="请选择状态"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-button
+                type="primary"
+                @click="$refs.table.refresh(true)"
+                :disabled="disabled"
+                id="rebateAmountList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="rebateAmountList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button id="rebateAmountList-add-btn" type="primary" @click="openRebateAddModal = true">新增</a-button>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :style="{ height: tableHeight+70+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight}"
+          :defaultLoadData="false"
+          bordered>
+          <!-- $hasPermissions('B_tireSubsidySetting_edit')&& -->
+          <!-- 结束时间 -->
+          <template slot="endDate" slot-scope="text, record">
+            {{ record.status==='END'? record.ruleEndDate:'--' }}
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              @click="handleEdit(record)"
+              v-if="record.status==='IN_USE'&&record.isSomeTimeFlag"
+              :id="'rebateAmountList-edit-btn'+record.id"
+            >
+              编辑
+            </a-button>
+            <span v-if="record.status==='FINISH'&&!record.isSomeTimeFlag">--</span>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 新增 -->
+    <rebate-add-modal
+      ref="rebateAdd"
+      v-drag
+      :openModal="openRebateAddModal"
+      :pageType="pageType"
+      @ok="$refs.table.refresh(true)"
+      @close="openRebateAddModal = false" />
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable, VSelect } from '@/components'
+import rebateAddModal from './rebateAddModal.vue'
+// 接口
+import { tireSubsidyRuleList } from '@/api/subsidyRule'
+export default {
+  name: 'RebateAmountList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rebateAddModal },
+  props: {
+    pageType: { //  弹框显示状态
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0, // 表格高度
+      openRebateAddModal: false, // 新增弹窗
+      //  查询条件
+      queryParam: {
+        ruleType: undefined, // 页面类型
+        subsidyQueryStatus: 'NOT_FINISH'// 状态默认值
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '开始时间', dataIndex: 'newRuleStartDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '结束时间', dataIndex: 'ruleEndDate', width: '12%', align: 'center', scopedSlots: { customRender: 'endDate' } },
+        { title: '返利金额', dataIndex: 'ruleValue1', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '状态', dataIndex: 'statusDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        // 获取列表数据  有分页
+        this.queryParam.ruleType = this.pageType
+        const params = Object.assign(parameter, this.queryParam)
+        return tireSubsidyRuleList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].isSomeTimeFlag = data.list[i].ruleStartDate ? this.isSameMonth(data.list[i].ruleStartDate) : false
+              data.list[i].newRuleStartDate = data.list[i].ruleStartDate ? this.formatDate(data.list[i].ruleStartDate) : '--'
+              data.list[i].ruleEndDate = data.list[i].ruleEndDate ? this.formatDate(data.list[i].ruleEndDate) : '--'
+            }
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    // 置换时间
+    formatDate (input) {
+      // 分割日期部分,提取年和月
+      const [datePart] = input.split(' ')
+      const [year, month] = datePart.split('-')
+      // 确保月份为两位数并拼接结果
+      return `${year}年${month.padStart(2, '0')}月`
+    },
+    // 判断当前时间是否和开始时间一致
+    isSameMonth (inputDateStr) {
+      // 提取输入日期的年、月
+      const [inputYear, inputMonth] = inputDateStr.split('-').map(s => parseInt(s))
+      // 获取当前年、月(月份需+1,因Date对象月份从0开始)
+      const currentDate = new Date()
+      const currentYear = currentDate.getFullYear()
+      const currentMonth = currentDate.getMonth() + 1
+      // 对比结果
+      return inputYear === currentYear && inputMonth === currentMonth
+    },
+    // 编辑
+    handleEdit (row) {
+      this.$refs.rebateAdd.pageInit(row)
+      this.$nextTick(() => {
+        this.openRebateAddModal = true
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.ruleType = undefined
+      this.queryParam.subsidyQueryStatus = 'NOT_FINISH'
+      this.$refs.table.refresh(true)
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+      })
+      this.resetSearchForm()
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 300
+    }
+  },
+  mounted () {
+    this.pageInit()
+  }
+}
+</script>