lilei 12 時間 前
コミット
ccbf48f25a

+ 25 - 0
src/config/dealerManagement.js

@@ -338,6 +338,31 @@ export default {
           }
         }
       ]
+    },
+    {
+      path: '/dealerManagement/newCustomSearch',
+      redirect: '/dealerManagement/newCustomSearch/list',
+      name: 'newCustomSearch',
+      component: BlankLayout,
+      meta: {
+        title: '新客户查询',
+        icon: 'setting',
+        // permission: 'M_newCustomSearchList'
+      },
+      hideChildrenInMenu: true,
+      children: [
+        {
+          path: 'list',
+          name: 'newCustomSearchList',
+          component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/newCustomSearch/list.vue'),
+          meta: {
+            title: '新客户查询列表',
+            icon: 'setting',
+            hidden: true,
+            // permission: 'M_newCustomSearchList'
+          }
+        }
+      ]
     }
   ]
 }

+ 7 - 7
src/config/report/salesReport.js

@@ -17,26 +17,26 @@ export default {
   },
   children: [
     {
-      path: '/reportData/salesOrderTotal',
-      redirect: '/reportData/salesOrderTotal/list',
-      name: 'salesOrderTotal',
+      path: '/reportData/newCustomSales',
+      redirect: '/reportData/newCustomSales/list',
+      name: 'newCustomSales',
       component: BlankLayout,
       meta: {
         title: '新客户首笔销售统计',
         icon: 'profile',
-        permission: 'M_salesOrderTotalList'
+        // permission: 'M_newCustomSalesList'
       },
       hideChildrenInMenu: true,
       children: [
         {
           path: 'list',
-          name: 'salesOrderTotalList',
-          component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesOrderTotal/list.vue'),
+          name: 'newCustomSalesList',
+          component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/newCustomSales/list.vue'),
           meta: {
             title: '新客户首笔销售统计列表',
             icon: 'profile',
             hidden: true,
-            permission: 'M_salesOrderTotalList'
+            // permission: 'M_newCustomSalesList'
           }
         }
       ]

+ 281 - 0
src/views/dealerManagement/newCustomSearch/list.vue

@@ -0,0 +1,281 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="customerCountList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="customerCountList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="客户名称">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="customerCountList-dealerName" @change="custChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="客户级别">
+                <v-select
+                  v-model="queryParam.dealerLevel"
+                  ref="dealerLevel"
+                  id="customerCountList-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="customerCountList-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="区域负责人">
+                  <BizUser id="customerCountList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <AreaList id="customerCountList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客服">
+                  <customerService ref="customerName" id="customerCountList-customerName" v-model="queryParam.subareaArea.kfSn"></customerService>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="customerCountList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="customerCountList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_billingStatisticsExport')"
+                id="customerCountList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :style="{ height: tableHeight+70+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{y: tableHeight}"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import moment from 'moment'
+// 组件
+import { STable, VSelect } from '@/components'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import BizUser from '@/views/common/bizUser.js'
+import customerService from '@/views/common/customerService.vue'
+// 接口
+import { salesStatsDealerList, salesStatsDealerExport } from '@/api/reportData'
+export default {
+  name: 'CustomerCountList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      //  查询条件
+      queryParam: {
+        dealerLevel: undefined, // 客户等级
+        dealerSnOwner: undefined, // 客户sn
+        dealerName: undefined, // 客户名称
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '', // 分区
+          bizUserSn: undefined, // 区域负责人
+          kfSn: undefined// 客服
+        }
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域负责人', dataIndex: 'subareaArea.userNameQyfzrs', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'dealer.provinceName', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealer.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'dealer.dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '年份', dataIndex: 'year', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月份', dataIndex: 'month', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '第一笔时间', dataIndex: 'firstDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '最后一笔时间', dataIndex: 'lastDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '首笔订单数', dataIndex: 'billCount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总开单金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        params.removeReportFlag = 1
+        // 获取列表数据  有分页
+        return salesStatsDealerList(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.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  methods: {
+    // 查询
+    handleSearch () {
+      this.$refs.table.refresh(true)
+    },
+    // 客户名称 change
+    custChange (val) {
+      this.queryParam.dealerName = val.name
+      this.queryParam.dealerSnOwner = val.key
+    },
+    // 地区
+    areaChange (val) {
+      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) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : ''
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSnOwner = undefined
+      this.queryParam.bizUserSn = undefined
+      this.queryParam.subareaArea.subareaSn = ''
+      this.queryParam.subareaArea.subareaAreaSn = ''
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.subareaArea.kfSn = undefined
+      this.queryParam.dealerLevel = undefined
+      if (this.advanced) {
+        this.$refs.subarea.clearData()
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.$refs.areaList.clearData()
+      }
+      this.$refs.table.clearTable()
+      this.$refs.ruleForm.resetFields()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      params.removeReportFlag = this.removeReportFlag
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(salesStatsDealerExport, params, '新客户查询', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+        this.resetSearchForm()
+      })
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 200
+    }
+  },
+  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>

+ 12 - 2
src/views/reportData/actualSalesReport/list.vue

@@ -54,8 +54,16 @@
                   <customerService ref="customerName" id="actualSalesReportList-customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="actualSalesReportList-customFlag" v-model="queryParam.customFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="0">新客户</a-select-option>
+                    <a-select-option value="1">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom:10px;">
+            <a-col :md="isShowCustomerSearch&&advanced?24:6" :sm="24" style="margin-bottom:10px;" :style="{textAlign: isShowCustomerSearch&&advanced?'center':''}">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="actualSalesReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="actualSalesReportList-reset">重置</a-button>
               <a-button
@@ -169,7 +177,8 @@ export default {
           districtSn: undefined, // 区
           dealerLevel: undefined// 客户等价
         },
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        customFlag: undefined
       },
       totalData: null, // 统计数据
       columns: [], // 列表表头
@@ -300,6 +309,7 @@ export default {
       }
       this.totalData = null
       this.queryParam.bizUserSn = undefined
+      this.queryParam.customFlag = undefined
       if (this.advanced) {
         this.$refs.areaList.clearData()
         this.$refs.subarea.clearData()

+ 584 - 0
src/views/reportData/newCustomSales/dataCustomer.js

@@ -0,0 +1,584 @@
+export default {
+    'count': [
+      {
+        'type': 'amount',
+        'dataIndex': 'jplqq',
+        'title': '箭牌滤清器',
+        'align': 'right',
+        'key': 'jplqq'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpbsxlqq',
+        'title': '箭牌变速箱滤清器',
+        'align': 'right',
+        'key': 'jpbsxlqq'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'gplqq',
+        'title': '冠牌滤清器',
+        'align': 'right',
+        'key': 'gplqq'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'lqqhj',
+        'title': '滤清器合计',
+        'align': 'right',
+        'key': 'lqqhj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpygp',
+        'title': '箭牌雨刮片',
+        'align': 'right',
+        'key': 'jpygp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpyyygp',
+        'title': '箭牌雨燕雨刮片',
+        'align': 'right',
+        'key': 'jpyyygp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'gpygp',
+        'title': '冠牌雨刮片',
+        'align': 'right',
+        'key': 'gpygp'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'ygphj',
+        'title': '雨刮片合计',
+        'align': 'right',
+        'key': 'ygphj'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'jplb',
+        'title': '箭牌喇叭',
+        'align': 'right',
+        'key': 'jplb'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpscp',
+        'title': '箭牌刹车片',
+        'align': 'right',
+        'key': 'jpscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbujpgyx',
+        'title': 'TBU+箭牌感应线',
+        'align': 'right',
+        'key': 'tbujpgyx'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'gpscp',
+        'title': '冠牌刹车片',
+        'align': 'right',
+        'key': 'gpscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbuscp',
+        'title': 'TBU刹车片',
+        'align': 'right',
+        'key': 'tbuscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbuzhscp',
+        'title': 'TBU至惠刹车片',
+        'align': 'right',
+        'key': 'tbuzhscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbuscy',
+        'title': 'TBU刹车油',
+        'align': 'right',
+        'key': 'tbuscy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tubpscp',
+        'title': 'TBU-P刹车盘',
+        'align': 'right',
+        'key': 'tubpscp'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'scphj',
+        'title': '刹车片合计',
+        'align': 'right',
+        'key': 'scphj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'hjxdc',
+        'title': '汇箭蓄电池',
+        'align': 'right',
+        'key': 'hjxdc'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'brsxdc',
+        'title': '布瑞斯蓄电池',
+        'align': 'right',
+        'key': 'brsxdc'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'xdchj',
+        'title': '蓄电池合计',
+        'align': 'right',
+        'key': 'xdchj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsjy',
+        'title': '德路斯机油',
+        'align': 'right',
+        'key': 'dlsjy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsbsxy',
+        'title': '德路斯变速箱油',
+        'align': 'right',
+        'key': 'dlsbsxy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsscy',
+        'title': '德路斯刹车油',
+        'align': 'right',
+        'key': 'dlsscy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsqcyhcp',
+        'title': '德路斯汽车养护产品',
+        'align': 'right',
+        'key': 'dlsqcyhcp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'krxjy',
+        'title': '科润星机油',
+        'align': 'right',
+        'key': 'krxjy'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'rhyhj',
+        'title': '润滑油合计',
+        'align': 'right',
+        'key': 'rhyhj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'wsdhxq',
+        'title': '稳升点火线圈',
+        'align': 'right',
+        'key': 'wsdhxq'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'wsledd',
+        'title': '稳升LED灯',
+        'align': 'right',
+        'key': 'wsledd'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'wshj',
+        'title': '稳升合计',
+        'align': 'right',
+        'key': 'wshj'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'pphj',
+        'title': '品牌合计',
+        'align': 'right',
+        'key': 'pphj'
+      },
+      {
+        'dataIndex': 'luntai',
+        'title': '轮胎条数',
+        'align': 'right',
+        'key': 'luntai'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'luntai',
+        'title': '轮胎金额',
+        'align': 'right',
+        'key': 'luntai'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'ngkhhs',
+        'title': 'NGK火花塞',
+        'align': 'right',
+        'key': 'ngkhhs'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'flp',
+        'title': '飞利浦',
+        'align': 'right',
+        'key': 'flp'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'dlpphj',
+        'title': '代理品牌合计',
+        'align': 'right',
+        'key': 'dlpphj'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'ppdlpphj',
+        'title': '合计',
+        'align': 'right',
+        'key': 'ppdlpphj'
+      }
+    ],
+    'list': [
+      {
+        'dataIndex': 'no',
+        'fixed': 'left',
+        'title': '序号',
+        'align': 'center',
+        'width': '40px',
+        'key': 'no'
+      },
+      {
+        'dataIndex': 'subareaName',
+        'fixed': 'left',
+        'title': '区域',
+        'align': 'center',
+        'key': 'subareaName'
+      },
+      {
+        'dataIndex': 'subareaAreaName',
+        'fixed': 'left',
+        'title': '分区',
+        'align': 'center',
+        'key': 'subareaAreaName'
+      },
+      {
+        'dataIndex': 'bizUserName',
+        'fixed': 'left',
+        'title': '区域负责人',
+        'align': 'center',
+        'key': 'bizUserName',
+        'ellipsis': 'true'
+      },
+      {
+        'dataIndex': 'bizUserName',
+        'fixed': 'left',
+        'title': '销售日期',
+        'align': 'center',
+        'key': 'salesDate'
+      },
+      {
+        'dataIndex': 'provinceName',
+        'fixed': 'left',
+        'title': '省份',
+        'align': 'center',
+        'key': 'provinceName'
+      },
+      {
+        'dataIndex': 'dealerName',
+        'fixed': 'left',
+        'title': '客户名称',
+        'align': 'left',
+        'key': 'dealerName'
+      },
+      {
+        'dataIndex': 'dealerLevel',
+        'fixed': 'left',
+        'title': '客户级别',
+        'align': 'center',
+        'key': 'dealerLevel'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jplqq',
+        'title': '箭牌滤清器',
+        'align': 'right',
+        'key': 'jplqq'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpbsxlqq',
+        'title': '箭牌变速箱滤清器',
+        'align': 'right',
+        'key': 'jpbsxlqq'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'gplqq',
+        'title': '冠牌滤清器',
+        'align': 'right',
+        'key': 'gplqq'
+      },
+      {
+        'colour': 'red',
+        'txtLen': '5',
+        'type': 'amount',
+        'dataIndex': 'lqqhj',
+        'title': '滤清器合计',
+        'align': 'right',
+        'key': 'lqqhj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpygp',
+        'title': '箭牌雨刮片',
+        'align': 'right',
+        'key': 'jpygp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpyyygp',
+        'title': '箭牌雨燕雨刮片',
+        'align': 'right',
+        'key': 'jpyyygp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'gpygp',
+        'title': '冠牌雨刮片',
+        'align': 'right',
+        'key': 'gpygp'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'txtLen': '5',
+        'dataIndex': 'ygphj',
+        'title': '雨刮片合计',
+        'align': 'right',
+        'key': 'ygphj'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'jplb',
+        'txtLen': '4',
+        'title': '箭牌喇叭',
+        'align': 'right',
+        'key': 'jplb'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'jpscp',
+        'title': '箭牌刹车片',
+        'align': 'right',
+        'key': 'jpscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbujpgyx',
+        'title': 'TBU+箭牌感应线',
+        'align': 'right',
+        'key': 'tbujpgyx'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'gpscp',
+        'title': '冠牌刹车片',
+        'align': 'right',
+        'key': 'gpscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbuscp',
+        'title': 'TBU刹车片',
+        'align': 'right',
+        'key': 'tbuscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbuzhscp',
+        'title': 'TBU至惠刹车片',
+        'align': 'right',
+        'key': 'tbuzhscp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tbuscy',
+        'title': 'TBU刹车油',
+        'align': 'right',
+        'key': 'tbuscy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'tubpscp',
+        'title': 'TBU-P刹车盘',
+        'align': 'right',
+        'key': 'tubpscp'
+      },
+      {
+        'colour': 'red',
+        'txtLen': '5',
+        'type': 'amount',
+        'dataIndex': 'scphj',
+        'title': '刹车片合计',
+        'align': 'right',
+        'key': 'scphj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'hjxdc',
+        'title': '汇箭蓄电池',
+        'align': 'right',
+        'key': 'hjxdc'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'brsxdc',
+        'title': '布瑞斯蓄电池',
+        'align': 'right',
+        'key': 'brsxdc'
+      },
+      {
+        'colour': 'red',
+        'txtLen': '5',
+        'type': 'amount',
+        'dataIndex': 'xdchj',
+        'title': '蓄电池合计',
+        'align': 'right',
+        'key': 'xdchj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsjy',
+        'title': '德路斯机油',
+        'align': 'right',
+        'key': 'dlsjy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsbsxy',
+        'title': '德路斯变速箱油',
+        'align': 'right',
+        'key': 'dlsbsxy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsscy',
+        'title': '德路斯刹车油',
+        'align': 'right',
+        'key': 'dlsscy'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'dlsqcyhcp',
+        'title': '德路斯汽车养护产品',
+        'align': 'right',
+        'key': 'dlsqcyhcp'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'krxjy',
+        'title': '科润星机油',
+        'align': 'right',
+        'key': 'krxjy'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'txtLen': '5',
+        'dataIndex': 'rhyhj',
+        'title': '润滑油合计',
+        'align': 'right',
+        'key': 'rhyhj'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'wsdhxq',
+        'title': '稳升点火线圈',
+        'align': 'right',
+        'key': 'wsdhxq'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'wsledd',
+        'title': '稳升LED灯',
+        'align': 'right',
+        'key': 'wsledd'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'wshj',
+        'txtLen': '4',
+        'title': '稳升合计',
+        'align': 'right',
+        'key': 'wshj'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'txtLen': '4',
+        'dataIndex': 'pphj',
+        'title': '品牌合计',
+        'align': 'right',
+        'key': 'pphj'
+      },
+      {
+        'dataIndex': 'luntai',
+        'txtLen': '2',
+        'title': '轮胎条数',
+        'align': 'right',
+        'key': 'luntai'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'dataIndex': 'luntai',
+        'txtLen': '2',
+        'title': '轮胎金额',
+        'align': 'right',
+        'key': 'luntai'
+      },
+      {
+        'type': 'amount',
+        'dataIndex': 'ngkhhs',
+        'title': 'NGK火花塞',
+        'align': 'right',
+        'key': 'ngkhhs'
+      },
+      {
+        'colour': 'red',
+        'type': 'amount',
+        'txtLen': '2',
+        'dataIndex': 'ppdlpphj',
+        'title': '品牌+代理品牌合计',
+        'align': 'right',
+        'key': 'ppdlpphj'
+      }
+    ]
+  }

+ 386 - 0
src/views/reportData/newCustomSales/list.vue

@@ -0,0 +1,386 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="customerCountList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="customerCountList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="销售月份" required>
+                <a-range-picker
+                  id="customerCountList-monthBox"
+                  class="monthBox"
+                  :placeholder="['开始月份', '结束月份']"
+                  format="YYYY-MM"
+                  v-model="monthVal"
+                  :mode="mode"
+                  @panelChange="handlePanelChange"
+                />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="客户名称">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="customerCountList-dealerName" @change="custChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="客户级别">
+                <v-select
+                  v-model="queryParam.dealerLevel"
+                  ref="dealerLevel"
+                  id="customerCountList-dealerLevel"
+                  code="DEALER_LEVEL"
+                  placeholder="请选择客户级别"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="所在区域">
+                  <subarea id="customerCountList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-model-item label="区域负责人">
+                  <BizUser id="customerCountList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <AreaList id="customerCountList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-model-item label="客服">
+                  <customerService ref="customerName" id="customerCountList-customerName" v-model="queryParam.subareaArea.kfSn"></customerService>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-model-item label="实售/开单金额">
+                  <a-select placeholder="请选择">
+                    <a-select-option value="1">实售金额</a-select-option>
+                    <a-select-option value="2">开单金额</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="customerCountList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="customerCountList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_billingStatisticsExport')"
+                id="customerCountList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :style="{ height: tableHeight+70+'px' }"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{x:2200, y: tableHeight-130}"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer" v-if="totalData&&totalData.length">
+            <a-row :gutter="15">
+              <a-col span="24">合计:</a-col>
+              <a-col span="24">
+                <a-col span="4" v-for="item in totalData" :key="item.key">
+                  {{ item.title }}:{{ item[item.key] ||item[item.key] ==0?toThousands(item[item.key]) :'--' }}
+                </a-col>
+              </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 tableTitle from './dataCustomer.js'
+// 组件
+import { STable, VSelect } from '@/components'
+import subarea from '@/views/common/subarea.js'
+import AreaList from '@/views/common/areaList.js'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import BizUser from '@/views/common/bizUser.js'
+import customerService from '@/views/common/customerService.vue'
+// 接口
+import { salesStatsDealerList, salesStatsDealerCount, salesStatsDealerExport } from '@/api/reportData'
+export default {
+  name: 'CustomerCountList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      monthVal: [moment().format('YYYY-MM'), moment().format('YYYY-MM')], // 初始化月份值
+      mode: ['month', 'month'],
+      //  查询条件
+      queryParam: {
+        beginDate: '', // 月份开始时间
+        endDate: '', // 月份结束时间
+        dealerLevel: undefined, // 客户等级
+        dealerSnOwner: undefined, // 客户sn
+        dealerName: undefined, // 客户名称
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '', // 分区
+          bizUserSn: undefined, // 区域负责人
+          kfSn: undefined// 客服
+        }
+      },
+      columns: [], // 表格  列数据
+      totalData: null, // 合计
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        if (this.monthVal) {
+          this.queryParam.beginDate = this.getMonthRange(this.monthVal[0]).firstDay
+          this.queryParam.endDate = this.getMonthRange(this.monthVal[1]).lastDay
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        const params = Object.assign(parameter, this.queryParam)
+        params.removeReportFlag = 1
+        // 获取列表数据  有分页
+        return salesStatsDealerList(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()
+    }
+  },
+  methods: {
+    handlePanelChange (value, mode) {
+      this.monthVal = value
+      this.mode = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
+    },
+    // 获取指定月份   第一天和最后一天
+    getMonthRange (targetMonth) {
+      // 获取指定月第一天(格式化为 YYYY-MM-DD)
+      const firstDay = moment(targetMonth).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+      // 获取指定月最后一天(格式化为 YYYY-MM-DD)
+      const lastDay = moment(targetMonth).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+      return { firstDay, lastDay }
+    },
+    // 获取表头
+    async getTableTitle () {
+      const _this = this
+      this.columns = tableTitle.list
+      this.countLabel = tableTitle.count
+      this.columns.map(item => {
+        const mw = item.type == 'amount' ? 15 : 17
+        const textLen = typeof item.title === 'string' ? item.title.length : item.txtLen
+        const w = textLen * mw
+        const tw = w <= 80 ? mw * 5 : w
+        if (item.type == 'amount') {
+          if (item.colour && item.colour === 'red') {
+            item.title = <span style="color:red;">{ item.title }</span>
+            item.customRender = (text) => { return <span style="color:red;">{(text || text == 0) ? _this.toThousands(text) : '--'}</span> }
+          } else {
+            item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+          }
+        } else {
+          item.customRender = function (text) { return text || '--' }
+        }
+        item.width = tw + 'px'
+        this.tableWidth = this.tableWidth + tw
+      })
+      this.resetSearchForm()
+    },
+    // 查询
+    handleSearch () {
+      const date = this.monthVal
+      if (date && date[0] && date[1]) {
+        this.$refs.table.refresh(true)
+      } else {
+        this.$message.error('请选择查询月份')
+      }
+    },
+    // 客户名称 change
+    custChange (val) {
+      this.queryParam.dealerName = val.name
+      this.queryParam.dealerSnOwner = val.key
+    },
+    // 统计
+    getCount (params) {
+      salesStatsDealerCount(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
+        }
+      })
+    },
+    // 地区
+    areaChange (val) {
+      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) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : ''
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.monthVal = [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSnOwner = undefined
+      this.queryParam.bizUserSn = undefined
+      this.queryParam.subareaArea.subareaSn = ''
+      this.queryParam.subareaArea.subareaAreaSn = ''
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.subareaArea.kfSn = undefined
+      this.queryParam.dealerLevel = undefined
+      if (this.advanced) {
+        this.$refs.subarea.clearData()
+        this.$refs.dealerSubareaScopeList.resetForm()
+        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))
+      params.removeReportFlag = this.removeReportFlag
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(salesStatsDealerExport, params, this.removeReportFlag == 0 ? '开单统计报表(客户)' : '未统计销售退货(客户)', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 初始化
+    pageInit () {
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        this.setTableH()
+        this.resetSearchForm()
+        this.getTableTitle()
+      })
+    },
+    // 计算表格高度
+    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>

+ 12 - 4
src/views/reportData/promotionSalesOrderReport/list.vue

@@ -48,10 +48,10 @@
                 <BizUser id="promotionSalesList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
               </a-form-model-item>
             </a-col>
-            <a-form-model-item label="省份">
-              <Area id="promotionSalesList-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
-            </a-form-model-item>
             <template v-if="advanced">
+              <a-form-model-item label="省份">
+                <Area id="promotionSalesList-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
+              </a-form-model-item>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户名称">
                   <dealerSubareaScopeList ref="custList" id="salesAmountReportList-dealerSn" @change="custChange" />
@@ -85,8 +85,16 @@
                     id="productInfoList-productType"></productTypeAll>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="productInfoList-customFlag" v-model="queryParam.customFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="0">新客户</a-select-option>
+                    <a-select-option value="1">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="text-align:center;margin-bottom: 10px;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="promotionSalesList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="promotionSalesList-reset">重置</a-button>
               <a-button

+ 18 - 8
src/views/reportData/promotionSalesRealTimeReport/index.vue

@@ -34,12 +34,12 @@
                         allowClear></v-select>
                     </a-form-model-item>
                   </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-model-item label="销售单号">
-                      <a-input id="promotionSalesRealTimeReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-                    </a-form-model-item>
-                  </a-col>
                   <template v-if="advanced">
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="销售单号">
+                        <a-input id="promotionSalesRealTimeReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                      </a-form-model-item>
+                    </a-col>
                     <a-col :md="6" :sm="24">
                       <a-form-model-item label="促销开始时间">
                         <a-range-picker
@@ -98,8 +98,16 @@
                         <customerService id="promotionSalesRealTimeReport-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                       </a-form-model-item>
                     </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-model-item label="新/老客户">
+                        <a-select id="promotionSalesRealTimeReport-customFlag" v-model="queryParam.customFlag" placeholder="请选择" allowClear>
+                          <a-select-option value="0">新客户</a-select-option>
+                          <a-select-option value="1">老客户</a-select-option>
+                        </a-select>
+                      </a-form-model-item>
+                    </a-col>
                   </template>
-                  <a-col :md="24" :sm="24" style="text-align:center">
+                  <a-col :md="!isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: !isShowCustomerSearch?'center':''}">
                     <div class="table-page-search-submitButtons">
                       <a-button type="primary" id="promotionSalesRealTimeReport-refresh" :disabled="disabled" @click="testForm('search')" >查询</a-button>
                       <a-button style="margin-left: 8px" id="promotionSalesRealTimeReport-reset" :disabled="disabled" @click="resetSearchForm">重置</a-button>
@@ -236,7 +244,8 @@ export default {
         dealerCitySn: undefined, // 城市编码
         dealerDistrictSn: undefined, // 区域编码
         giveMoney: undefined, // 采购额
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        customFlag: undefined // 客户类型
       },
       rules: {
         salesDate: [{ required: true, message: '请选择销售审核时间', trigger: 'change' }]
@@ -419,7 +428,8 @@ export default {
         dealerCitySn: undefined, // 城市编码
         dealerDistrictSn: undefined, // 区域编码
         giveMoney: undefined,
-        bizUserSn: undefined // 客服
+        bizUserSn: undefined, // 客服
+        customFlag: undefined // 自定义
       }
       this.time = undefined
       this.$refs.subarea.clearData()

+ 23 - 13
src/views/reportData/promotionSalesRealTimeReport/list.vue

@@ -31,16 +31,16 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="销售单号">
-                  <a-input
-                    id="promotionSalesRealTimeList-salesBillNo"
-                    v-model.trim="newQueryParam.salesBillNo"
-                    allowClear
-                    placeholder="请输入销售单号" />
-                </a-form-model-item>
-              </a-col>
               <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="销售单号">
+                    <a-input
+                      id="promotionSalesRealTimeList-salesBillNo"
+                      v-model.trim="newQueryParam.salesBillNo"
+                      allowClear
+                      placeholder="请输入销售单号" />
+                  </a-form-model-item>
+                </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-model-item label="促销开始时间">
                     <a-range-picker
@@ -96,8 +96,16 @@
                     <customerService ref="customerName" id="promotionSalesRealTimeList-customerName" v-model="newQueryParam.bizUserSn"></customerService>
                   </a-form-model-item>
                 </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="新/老客户">
+                    <a-select id="promotionSalesRealTimeList-customFlag" v-model="newQueryParam.customFlag" placeholder="请选择" allowClear>
+                      <a-select-option value="0">新客户</a-select-option>
+                      <a-select-option value="1">老客户</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
               </template>
-              <a-col :md="24" :sm="24" style="text-align:center">
+              <a-col :md="isShowCustomerSearch&&advanced?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: isShowCustomerSearch&&advanced?'center':''}">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" id="promotionSalesRealTimeList-refresh":disabled="disabled" @click="testForm('search')">查询</a-button>
                   <a-button style="margin-left: 8px" id="promotionSalesRealTimeList-reset" :disabled="disabled" @click="resetSearchForm">重置</a-button>
@@ -233,7 +241,8 @@ export default {
         dealerProvinceSn: undefined, // 省份编码
         dealerCitySn: undefined, // 城市编码
         dealerDistrictSn: undefined, // 区域编码
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        customFlag: undefined // 客户类型
       },
       rules: {
         salesDate: [{ required: true, message: '请选择下推时间', trigger: 'change' }]
@@ -550,7 +559,8 @@ export default {
         dealerProvinceSn: undefined, // 省份编码
         dealerCitySn: undefined, // 城市编码
         dealerDistrictSn: undefined, // 区域编码
-        bizUserSn: undefined
+        bizUserSn: undefined,
+        customFlag: undefined
       }
       this.$set(this.newQueryParam, 'salesDate', [
         getDate.getCurrMonthDays().starttime,
@@ -573,7 +583,7 @@ export default {
     // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 260
+      this.tableHeight = window.innerHeight - tableSearchH - 270
     }
   },
   mounted () {

+ 12 - 2
src/views/reportData/salesAmountReport/list.vue

@@ -54,8 +54,16 @@
                   <customerService id="salesAmountReportList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="salesAmountReportList-customFlag" v-model="queryParam.customFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="0">新客户</a-select-option>
+                    <a-select-option value="1">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="isShowCustomerSearch&&advanced?24:6" :sm="24" style="margin-bottom:10px;" :style="{textAlign: isShowCustomerSearch&&advanced?'center':''}">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesAmountReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesAmountReportList-reset">重置</a-button>
               <a-button
@@ -167,7 +175,8 @@ export default {
           subareaAreaSn: undefined, // 分区
           bizUserSn: undefined// 区域负责人
         },
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        customFlag: undefined
       },
       totalData: null, // 统计数据
       columns: [], // 列表表头
@@ -294,6 +303,7 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.customFlag = undefined
       this.totalData = null
       this.$refs.subarea.clearData()
       if (this.advanced) {

+ 19 - 9
src/views/reportData/salesDetails/list.vue

@@ -53,13 +53,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="备货单号">
-                <a-input id="salesDetailsList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
-              </a-form-model-item>
-            </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24" v-if="!isShowCustomerSearch">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="备货单号">
+                  <a-input id="salesDetailsList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="品牌分类">
                   <v-select code="BRAND_TYPE" id="salesDetailsList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
                 </a-form-model-item>
@@ -127,8 +127,16 @@
                   <customerService id="salesDetailsList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="salesDetailsList-customFlag" v-model="queryParam.customFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="0">新客户</a-select-option>
+                    <a-select-option value="1">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: isShowCustomerSearch?'center':''}">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailsList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailsList-reset">重置</a-button>
               <a-button
@@ -261,7 +269,8 @@ export default {
         warehouseSn: undefined, // 出库仓库
         giftFLag: undefined, // 是否是促销产品  1是  0不是
         promotionFlag: undefined, // 产品类型
-        bizUserSn: undefined // 客服
+        bizUserSn: undefined, // 客服
+        customFlag: undefined // 客户类型
       },
       isAveragePrice: false, // 平均公斤单价
       productType: [], // 产品分类
@@ -463,6 +472,7 @@ export default {
       this.queryParam.giftFLag = undefined
       this.queryParam.promotionFlag = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.customFlag = undefined
       if (this.advanced) {
         this.$refs.subarea.clearData()
         this.$refs.areaList.clearData()
@@ -515,7 +525,7 @@ export default {
     // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 215
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
   },
   mounted () {

+ 13 - 14
src/views/reportData/salesOrderTotal/list.vue

@@ -35,19 +35,8 @@
                   placeholder="请输入客户名称" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24" v-if="isShowCustomerSearch">
-              <a-form-model-item label="客户级别">
-                <v-select
-                  v-model="queryParam.dealerLevel"
-                  ref="dealerLevel"
-                  id="salesOrderTotalList-dealerLevel"
-                  code="DEALER_LEVEL"
-                  placeholder="请选择客户级别"
-                  allowClear></v-select>
-              </a-form-model-item>
-            </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24" v-if="!isShowCustomerSearch">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户级别">
                   <v-select
                     v-model="queryParam.dealerLevel"
@@ -94,8 +83,16 @@
                   <customerService id="salesOrderTotalList-bizUserSn" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="salesOrderTotalList-customFlag" v-model="queryParam.customFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="0">新客户</a-select-option>
+                    <a-select-option value="1">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: isShowCustomerSearch?'center':''}">
+            <a-col :md="!isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: !isShowCustomerSearch?'center':''}">
               <a-button
                 style="margin-left: 5px"
                 type="primary"
@@ -221,7 +218,8 @@ export default {
           subareaAreaSn: undefined// 分区
         },
         dealerProvinceSn: undefined, // 省份
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        customFlag: undefined // 客户类型
       },
       rules: { 'time': [{ required: true, message: '请选择下推时间', trigger: 'change' }] }, // 查询时间必选项
 
@@ -402,6 +400,7 @@ export default {
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.customFlag = undefined
       this.totalData = null
       if (this.advanced) {
         this.$refs.subarea.clearData()

+ 10 - 7
src/views/reportData/salesSlipReport/list.vue

@@ -33,13 +33,8 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24" v-if="isShowCustomerSearch">
-              <a-form-model-item label="销售单号">
-                <a-input id="salesSlipReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-              </a-form-model-item>
-            </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24" v-if="!isShowCustomerSearch">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="销售单号">
                   <a-input id="salesSlipReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
                 </a-form-model-item>
@@ -64,8 +59,16 @@
                   <customerService id="salesSlipReportList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="salesSlipReportList-customFlag" v-model="queryParam.customFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="0">新客户</a-select-option>
+                    <a-select-option value="1">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: isShowCustomerSearch?'center':''}">
+            <a-col :md="!isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: !isShowCustomerSearch?'center':''}">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesSlipReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesSlipReportList-reset">重置</a-button>
               <a-button