chenrui 1 år sedan
förälder
incheckning
db78ebbd41

+ 41 - 28
src/views/reportData/actualSalesReport/list.vue

@@ -51,9 +51,9 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-                <a-form-item label="客服">
+                <a-form-model-item label="客服">
                   <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom:10px;">
@@ -124,17 +124,19 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import reportModal from '@/views/common/reportModal.vue'
-import customerService from '@/views/common/customerService.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { salesBillRealReportTitle, salesBillRealAmountQueryPageList, salesBillRealReportCount } from '@/api/salesBillReport'
+import customerService from '@/views/common/customerService.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
 import { actualSalesExport } from '@/api/reportData'
+import { salesBillRealReportTitle, salesBillRealAmountQueryPageList, salesBillRealReportCount } from '@/api/salesBillReport'
 export default {
   name: 'ActualSalesReportList',
   mixins: [commonMixin],
@@ -143,44 +145,53 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
       showExport: false, // 导出弹窗初始值
-      queryParam: { //  查询条件
+      //  查询条件
+      queryParam: {
+        // 默认下推时间
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
-          bizUserSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined// 区域负责人
         },
         dealer: {
-          dealerSn: undefined,
-          provinceSn: undefined,
-          citySn: undefined,
-          districtSn: undefined,
-          dealerLevel: undefined
+          dealerSn: undefined, // 客户sn
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined, // 区
+          dealerLevel: undefined// 客户等价
         },
-        bizUserSn: undefined
+        bizUserSn: undefined// 客服
       },
+      totalData: null, // 统计数据
+      columns: [], // 列表表头
+      countLabel: [], // 统计数据表头
+      countBrandLabel: [], // 统计数据品牌表头
       rules: {
         'time': [{ required: true, message: '请选择下推时间', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
+        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize })
+        // 获取列表数据 有分页
         return salesBillRealAmountQueryPageList(paramsPage).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 获取统计数据
             this.getCount(paramsPage)
+            // 计算列表序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -190,14 +201,11 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      totalData: null,
-      columns: [],
-      countLabel: [],
-      countBrandLabel: []
+      }
     }
   },
   watch: {
+    // 展开收起
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -239,6 +247,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -250,7 +259,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  下推时间  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -260,9 +269,11 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 客户下拉  change
     custChange (val) {
       this.queryParam.dealer.dealerSn = val.key
     },
+    // 所在区域 change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -298,6 +309,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 地区
     areaChange (val) {
       this.queryParam.dealer.provinceSn = val[0] ? val[0] : ''
       this.queryParam.dealer.citySn = val[1] ? val[1] : ''
@@ -325,6 +337,7 @@ export default {
       })
       this.resetSearchForm()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 218

+ 39 - 25
src/views/reportData/salesAmountReport/list.vue

@@ -123,17 +123,19 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { salesKdxxReportTitle, salesBillReportGroupByBuyerList, salesBillReportCountByBuyer } from '@/api/salesBillReport'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
 import { salesAmountExport } from '@/api/reportData'
+import { salesKdxxReportTitle, salesBillReportGroupByBuyerList, salesBillReportCountByBuyer } from '@/api/salesBillReport'
 export default {
   name: 'SalesAmountReportList',
   mixins: [commonMixin],
@@ -142,45 +144,51 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      showExport: false,
-      queryParam: { //  查询条件
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      tableHeight: 0, // 表格高度
+      showExport: false, // 导出弹窗
+      //  查询条件
+      queryParam: {
+        // 默认下推时间
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        dealerSn: undefined,
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined,
-        dealerLevel: undefined,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        dealerSn: undefined, // 客户sn
+        provinceSn: undefined, // 省份
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        dealerLevel: undefined, // 客户等级
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
-          bizUserSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined// 区域负责人
         },
         bizUserSn: undefined// 客服
       },
-      columns: [],
-      countLabel: [],
-      countBrandLabel: [],
+      totalData: null, // 统计数据
+      columns: [], // 列表表头
+      countLabel: [], // 统计数据表头
+      countBrandLabel: [], // 统计数据品牌表头
       rules: {
         'time': [{ required: true, message: '请选择下推时间', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
+        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize })
+        // 获取列表数据 有分页
         return salesBillReportGroupByBuyerList(paramsPage).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计
             this.getCount(paramsPage)
+            // 计算序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -190,11 +198,12 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      totalData: null
+      }
+
     }
   },
   watch: {
+    // 展开收起
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -236,6 +245,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -247,7 +257,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  下推时间  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -257,9 +267,11 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 客户名称 change
     custChange (val) {
       this.queryParam.dealerSn = val.key
     },
+    // 区域分区  change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -291,6 +303,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : ''
       this.queryParam.citySn = val[1] ? val[1] : ''
@@ -318,6 +331,7 @@ export default {
       })
       this.resetSearchForm()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215

+ 1 - 1
src/views/reportData/salesReturnDetailReport/list.vue

@@ -174,7 +174,7 @@
           bordered>
           <!-- 产品编码 -->
           <template slot="productCode" slot-scope="text, record">
-            <span>{{ record.productCode }}</span>
+            <span style="margin-right:15px;">{{ record.productCode }}</span>
             <a-badge count="折" :number-style="{ zoom:'80%' }" v-if="record.priceSetFlag==='PRICE_SET_FLAG_DISCOUNT'"></a-badge>
           </template>
           <template slot="footer">