lilei 4 viikkoa sitten
vanhempi
commit
a24baa188f

+ 11 - 31
src/views/reportData/promotionFeeReport/customerFeeList.vue

@@ -100,7 +100,7 @@
           :style="{ height: tableHeight+70+'px' }"
           :columns="columns"
           :data="loadData"
-          :scroll="{x:2200, y: tableHeight-120}"
+          :scroll="{x:2200, y: tableHeight}"
           :defaultLoadData="false"
           bordered>
         </s-table>
@@ -156,7 +156,6 @@ export default {
       },
       columns: [], // 表头
       countLabel: null, // 合计名称
-      totalData: null, // 合计
       rules: {
         'beginDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
       },
@@ -171,13 +170,11 @@ export default {
           if (res.status == 200) {
             data = res.data
             // 计算表格序号
-            const no = (data.pageNo - 1) * data.pageSize
+            const id = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
+              data.list[i].id = id + i + 1
             }
             this.disabled = false
-            // 统计
-            // this.getCount(params)
           }
           this.spinning = false
           return data
@@ -266,9 +263,9 @@ export default {
     },
     // 地区
     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
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.districtSn = val[2] ? val[2] : undefined
     },
     // 区域分区  change
     subareaChange (val) {
@@ -280,9 +277,9 @@ export default {
       this.queryParam.beginDate = moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
       this.queryParam.endDate = moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
       this.monthVal = moment().format('YYYY-MM')
-      this.queryParam.dealerEntity.provinceSn = undefined
-      this.queryParam.dealerEntity.citySn = undefined
-      this.queryParam.dealerEntity.districtSn = undefined
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
       this.queryParam.dealerEntity.dealerName = undefined
       this.queryParam.dealerSn = undefined
       this.queryParam.subareaArea.subareaSn = ''
@@ -292,10 +289,9 @@ export default {
       this.queryParam.kfSn = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
       if (this.advanced) {
-        this.$refs.subarea.clearData()
-        this.$refs.areaList.clearData()
+        this.$refs.subarea && this.$refs.subarea.clearData()
+        this.$refs.areaList && this.$refs.areaList.clearData()
       }
-      this.totalData = null
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()
     },
@@ -322,22 +318,6 @@ export default {
         _this.spinning = false
       })
     },
-    // 统计
-    getCount (params) {
-      promoSalesExpenseCount(params).then(res => {
-        if (res.status == 200 && res.data) {
-          const mergedList = this.countLabel.map(item => {
-            const key = item.key
-            return key in res.data
-              ? { ...item, [key]: res.data[key] }
-              : item
-          })
-          this.totalData = mergedList
-        } else {
-          this.totalData = null
-        }
-      })
-    },
     // 初始化
     pageInit () {
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 8 - 8
src/views/reportData/promotionFeeReport/promoFeeList.vue

@@ -286,9 +286,9 @@ export default {
     },
     // 地区
     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
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.districtSn = val[2] ? val[2] : undefined
     },
     // 区域分区  change
     subareaChange (val) {
@@ -300,9 +300,9 @@ export default {
       this.queryParam.beginDate = moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
       this.queryParam.endDate = moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
       this.monthVal = moment().format('YYYY-MM')
-      this.queryParam.dealerEntity.provinceSn = undefined
-      this.queryParam.dealerEntity.citySn = undefined
-      this.queryParam.dealerEntity.districtSn = undefined
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
       this.queryParam.dealerEntity.dealerName = undefined
       this.queryParam.dealerSn = undefined
       this.queryParam.subareaArea.subareaSn = ''
@@ -311,8 +311,8 @@ export default {
       this.queryParam.dealerLevel = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
       if (this.advanced) {
-        this.$refs.subarea.clearData()
-        this.$refs.areaList.clearData()
+        this.$refs.subarea && this.$refs.subarea.clearData()
+        this.$refs.areaList && this.$refs.areaList.clearData()
       }
       this.totalData = null
       this.$refs.table.clearTable()

+ 5 - 23
src/views/reportData/promotionFeeReport/provinceFeeList.vue

@@ -73,7 +73,7 @@
           :style="{ height: tableHeight+70+'px' }"
           :columns="columns"
           :data="loadData"
-          :scroll="{x:2200, y: tableHeight-120}"
+          :scroll="{x:2200, y: tableHeight}"
           :defaultLoadData="false"
           :showPagination="false"
           bordered>
@@ -94,7 +94,7 @@ import Area from '@/views/common/area.js'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService.vue'
 // 接口
-import { promoProvinceList, promoProvinceTableTitle, promoProvinceCount, promoProvinceExport } from '@/api/reportData'
+import { promoProvinceList, promoProvinceTableTitle, promoProvinceExport } from '@/api/reportData'
 export default {
   name: 'ProvinceFeeList',
   mixins: [commonMixin],
@@ -135,11 +135,9 @@ export default {
             data = res.data
             // 计算表格序号
             for (var i = 0; i < data.length; i++) {
-              data[i].no = i + 1
+              data[i].id = i + 1
             }
             this.disabled = false
-            // 统计
-            // this.getCount(params)
           }
           this.spinning = false
           return data
@@ -198,22 +196,6 @@ export default {
       })
       this.resetSearchForm()
     },
-    // 统计
-    getCount (params) {
-      promoProvinceCount(params).then(res => {
-        if (res.status == 200 && res.data) {
-          const mergedList = this.countLabel.map(item => {
-            const key = item.key
-            return key in res.data
-              ? { ...item, [key]: res.data[key] }
-              : item
-          })
-          this.totalData = mergedList
-        } else {
-          this.totalData = null
-        }
-      })
-    },
     // 查询
     handleSearch () {
       const _this = this
@@ -246,9 +228,9 @@ export default {
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined
-      this.$refs.subarea.clearData()
       this.totalData = null
-      this.$refs.areaList.clearData()
+      this.$refs.subarea && this.$refs.subarea.clearData()
+      this.$refs.areaList && this.$refs.areaList.clearData()
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()
     },