Browse Source

Merge branch 'develop_yh62' of jianguan-web/jg-ocs-html into pre-release

李磊 20 giờ trước cách đây
mục cha
commit
c4528ca844
36 tập tin đã thay đổi với 1346 bổ sung194 xóa
  1. 1 1
      public/version.json
  2. 35 0
      src/api/dealearNewLog.js
  3. 52 0
      src/api/reportData.js
  4. 25 0
      src/config/dealerManagement.js
  5. 25 0
      src/config/report/salesReport.js
  6. 114 0
      src/views/common/month.vue
  7. 278 0
      src/views/dealerManagement/newCustomSearch/list.vue
  8. 12 2
      src/views/reportData/actualSalesReport/list.vue
  9. 12 9
      src/views/reportData/allocationDetails/list.vue
  10. 12 8
      src/views/reportData/allocationOrderTotal/list.vue
  11. 10 1
      src/views/reportData/allocationPresentation/list.vue
  12. 12 2
      src/views/reportData/billingReturnReport/list.vue
  13. 41 30
      src/views/reportData/billingStatistics/customerCountList.vue
  14. 19 30
      src/views/reportData/billingStatistics/provinceCountList.vue
  15. 378 0
      src/views/reportData/newCustomSales/list.vue
  16. 13 3
      src/views/reportData/promotionFeeReport/customerFeeList.vue
  17. 11 1
      src/views/reportData/promotionFeeReport/promoFeeList.vue
  18. 17 7
      src/views/reportData/promotionFeeReport/provinceFeeList.vue
  19. 15 5
      src/views/reportData/promotionSalesOrderReport/list.vue
  20. 18 8
      src/views/reportData/promotionSalesRealTimeReport/index.vue
  21. 23 13
      src/views/reportData/promotionSalesRealTimeReport/list.vue
  22. 12 2
      src/views/reportData/regionTypeSalesReport/list.vue
  23. 12 2
      src/views/reportData/returnGoodsPresentation/list.vue
  24. 11 1
      src/views/reportData/returnSlipReport/list.vue
  25. 12 2
      src/views/reportData/salesAmountReport/list.vue
  26. 32 9
      src/views/reportData/salesDetails/list.vue
  27. 13 14
      src/views/reportData/salesOrderTotal/list.vue
  28. 12 2
      src/views/reportData/salesPresentation/list.vue
  29. 12 8
      src/views/reportData/salesReturnDetailReport/list.vue
  30. 12 2
      src/views/reportData/salesReturnReport/list.vue
  31. 11 1
      src/views/reportData/salesReturnsReport/list.vue
  32. 13 8
      src/views/reportData/salesSlipReport/list.vue
  33. 2 1
      src/views/salesManagement/pushOrderManagement/detail.vue
  34. 35 17
      src/views/salesManagement/pushOrderManagement/list.vue
  35. 32 3
      src/views/salesManagement/waitDispatchNew/dsModal.vue
  36. 2 2
      vue.config.js

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.0618",
+    "version": "2.2.062",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 35 - 0
src/api/dealearNewLog.js

@@ -0,0 +1,35 @@
+import { axios } from '@/utils/request'
+//  查询修改标记
+export const dealerNewLogEditFlag = (params) => {
+  return axios({
+    url: `/dealerNewLog/queryUpdateFlag/${params.sn}`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('查询新客户首笔订单是否修改标记')
+    }
+  })
+}
+// 新客户列表
+export const dealerNewLogPageList = (params) => {
+  const url = `/dealerNewLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  新客户导出
+export const dealerNewLogExport = (params) => {
+  return axios({
+    url: '/dealerNewLog/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('新客户导出')
+    }
+  })
+}

+ 52 - 0
src/api/reportData.js

@@ -1792,3 +1792,55 @@ export const salesStatsProvinceExport = (params) => {
     }
   })
 }
+// 新客户首笔统计报表
+// 新客户首笔统计报表   列表   有分页
+export const reportDealerNewLogList = (params) => {
+  const url = `/report/reportDealerNewLog/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 新客户首笔统计报表  表头
+export const reportDealerNewLogTitle = (params) => {
+  return axios({
+    url: '/report/reportDealerNewLog/reportTitle',
+    data: params,
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('表头')
+    }
+  })
+}
+
+// 新客户首笔统计报表  合计
+export const reportDealerNewLogCount = (params) => {
+  return axios({
+    url: '/report/reportDealerNewLog/reportCount',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('合计')
+    }
+  })
+}
+
+// 新客户首笔统计报表  导出
+export const reportDealerNewLogExport = (params) => {
+  return axios({
+    url: '/report/reportDealerNewLog/reportExport',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}

+ 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'
+          }
+        }
+      ]
     }
   ]
 }

+ 25 - 0
src/config/report/salesReport.js

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

+ 114 - 0
src/views/common/month.vue

@@ -0,0 +1,114 @@
+<template>
+  <div class="monthBox" style="display:flex;align-item:center;">
+    <a-month-picker
+      id="customerCountList-startValue"
+      :disabled-date="disabledStartDate"
+      format="YYYY-MM"
+      v-model="startValue"
+      placeholder="开始月份"
+      @openChange="handleStartOpenChange"
+    />
+    <span>~</span>
+    <a-month-picker
+      id="customerCountList-endValue"
+      :disabled-date="disabledEndDate"
+      format="YYYY-MM"
+      v-model="endValue"
+      placeholder="结束月份"
+      :open="endOpen"
+      @openChange="handleEndOpenChange"
+    />
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+export default {
+  props: {
+    value: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data () {
+    return {
+      startValue: moment().format('YYYY-MM'),
+      endValue: moment().format('YYYY-MM'),
+      endOpen: false
+    }
+  },
+  watch: {
+    startValue (a, b) {
+      this.hanldChange(a ? moment(a).format('YYYY-MM') : '', this.endValue)
+    },
+    endValue (a, b) {
+      this.hanldChange(this.startValue, a ? moment(a).format('YYYY-MM') : '')
+    }
+  },
+  methods: {
+    // 统计月份  选择月份限制
+    disabledStartDate (current) {
+      const endValue = this.endValue
+      const md = moment(current).startOf('month').valueOf()
+      const cd = moment().startOf('month').valueOf() // 当前月份
+      if (!current || !endValue) {
+        return md > cd
+      }
+      const ed = moment(endValue).startOf('month').valueOf()
+      return md > ed || md > cd
+    },
+    disabledEndDate (current) {
+      const startValue = this.startValue
+      const md = moment(current).startOf('month').valueOf()
+      const cd = moment().startOf('month').valueOf() // 当前月份
+      if (!current || !startValue) {
+        return md > cd
+      }
+      const sd = moment(startValue).startOf('month').valueOf()
+      return md < sd || md > cd
+    },
+    // 开始时间
+    handleStartOpenChange (open) {
+      if (!open) {
+        this.endOpen = true
+      }
+    },
+    // 结束时间
+    handleEndOpenChange (open) {
+      this.endOpen = open
+    },
+    hanldChange (s, e) {
+      console.log(s, e)
+      const val = [s, e]
+      this.startValue = val[0]
+      this.endValue = val[1]
+      this.$emit('change', val)
+      this.$emit('input', val)
+    },
+    // 获取指定月份   第一天和最后一天
+    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 }
+    },
+    resetDate () {
+      this.startValue = moment().format('YYYY-MM')
+      this.endValue = moment().format('YYYY-MM')
+      this.hanldChange(this.startValue, this.endValue)
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .monthBox{
+    /deep/.ant-calendar-picker-icon{
+      display:none !important;
+    }
+    /deep/.ant-calendar-picker input{
+      text-align:center;
+    }
+  }
+</style>

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

@@ -0,0 +1,278 @@
+<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_newCustomSearchExport')"
+                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}"
+          bordered>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+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 { dealerNewLogPageList, dealerNewLogExport } from '@/api/dealearNewLog'
+export default {
+  name: 'CustomerCountList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
+  data () {
+    const _this = this
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      //  查询条件
+      queryParam: {
+        dealerLevel: undefined, // 客户等级
+        dealerSn: 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.bizUserName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'provinceName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '17%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: '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: '8%', 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: 'right', customRender: function (text) { return _this.toThousands(text) || '--' } },
+        { title: '总实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'right', customRender: function (text) { return _this.toThousands(text) || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据  有分页
+        return dealerNewLogPageList(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.dealerSn = 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.dealerSn = 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()
+      this.$refs.table.refresh(false)
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(dealerNewLogExport, 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-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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, // 客服
+        dealerNewFlag: undefined
       },
       totalData: null, // 统计数据
       columns: [], // 列表表头
@@ -300,6 +309,7 @@ export default {
       }
       this.totalData = null
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       if (this.advanced) {
         this.$refs.areaList.clearData()
         this.$refs.subarea.clearData()

+ 12 - 9
src/views/reportData/allocationDetails/list.vue

@@ -92,15 +92,16 @@
                   <customerService ref="customerName" id="allocationDetailsList-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="allocationDetailsList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <!-- <a-button
-                style="margin-left: 0px"
-                type="primary"
-                class="button-info"
-                size="small"
-                @click="handleStock"
-                id="allocationDetailsList-stockDate">盘点区间日期</a-button> -->
+            <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="allocationDetailsList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationDetailsList-reset">重置</a-button>
               <a-button
@@ -214,7 +215,8 @@ export default {
         },
         dealerProvinceSn: undefined, // 地区  省份
         warehouseSn: undefined, // 出库仓库
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined
       },
       productType: [], // 产品分类
       allocateTypeVal: [], // 已选费用/调拨类型 值
@@ -403,6 +405,7 @@ export default {
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.warehouseSn = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.productType = []
       this.allocateTypeVal = []
       if (this.advanced) {

+ 12 - 8
src/views/reportData/allocationOrderTotal/list.vue

@@ -64,14 +64,16 @@
                   </a-select>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="allocationOrderTotalList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <!-- <a-button
-                type="primary"
-                class="button-info"
-                size="small"
-                @click="handleStock"
-                id="allocationOrderTotalList-stockDate">盘点区间日期</a-button> -->
+            <a-col :md="isShowCustomerSearch&&advanced?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: isShowCustomerSearch&&advanced?'center':''}">
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="allocationOrderTotalList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationOrderTotalList-reset">重置</a-button>
               <a-button
@@ -179,7 +181,8 @@ export default {
         allocateTypeSn: undefined, //  调拨类型2
         bizUserSn: undefined, // 客服
         targetName: undefined, // 客户名称
-        targetType: undefined// 客户类型
+        targetType: undefined, // 客户类型
+        dealerNewFlag: undefined
       },
       allocateTypeList: [], //  调拨类型
       allocateTypeVal: [], // 已选费用/调拨类型
@@ -328,6 +331,7 @@ export default {
       this.queryParam.bizUserSn = undefined
       this.queryParam.targetName = undefined
       this.queryParam.targetType = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.allocateTypeVal = []
       this.$refs.ruleForm.resetFields()
       this.totalData = null

+ 10 - 1
src/views/reportData/allocationPresentation/list.vue

@@ -50,6 +50,14 @@
                     <AreaList id="allocationPresentationList-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="新/老客户">
+                    <a-select id="allocationPresentationList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                      <a-select-option value="1">新客户</a-select-option>
+                      <a-select-option value="0">老客户</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="allocationPresentationList-refresh">查询</a-button>
@@ -179,6 +187,7 @@ export default {
         endDate: '', // 结束日期
         allocateNo: '', // 调拨单号
         targetName: '', // 客户名称
+        dealerNewFlag: undefined,
         subareaArea: {
           subareaSn: undefined, // 区域
           subareaAreaSn: undefined// 分区
@@ -279,7 +288,6 @@ export default {
         if (res.status == 200) {
           this.allocateType = res.data
           this.atypeColList = this.getCol(this.allocateType, '')
-          // console.log(JSON.stringify(this.atypeColList))
         } else {
           this.allocateType = []
         }
@@ -351,6 +359,7 @@ export default {
       this.queryParam.endDate = ''
       this.queryParam.allocateNo = ''
       this.queryParam.targetName = ''
+      this.queryParam.dealerNewFlag = undefined
       this.queryParam.subareaArea = {
         subareaSn: undefined,
         subareaAreaSn: undefined

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

@@ -55,8 +55,16 @@
                   <customerService id="billingReturnReportList-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="billingReturnReportList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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="billingReturnReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="billingReturnReportList-reset">重置</a-button>
               <a-button
@@ -166,7 +174,8 @@ export default {
           bizUserSn: undefined// 区域负责人
         },
         dealerLevel: undefined, // 客户等级
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined
       },
       rules: {
         'time': [{ required: true, message: '请选择退货日期', trigger: 'change' }]
@@ -290,6 +299,7 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.totalData = null
       if (this.advanced) {
         this.$refs.areaList.clearData()

+ 41 - 30
src/views/reportData/billingStatistics/customerCountList.vue

@@ -12,15 +12,7 @@
           <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"
-                />
+                <month ref="monthDate" id="customerCountList-monthBox" v-model="monthVal"></month>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -55,11 +47,19 @@
                   <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-col :md="6" :sm="24" v-show="isShowCustomerSearch">
                 <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="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="customerCountList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24" v-if="removeReportFlag==1">
                 <a-form-item label="业务类型">
                   <v-select
@@ -72,7 +72,11 @@
                 </a-form-item>
               </a-col>
             </template>
-            <a-col :md="removeReportFlag==1&&advanced?24:6" :sm="24" :style="{textAlign:removeReportFlag==1&&advanced?'center':'left'}">
+            <a-col
+              :md="isCenter=='center'?24:6"
+              :sm="24"
+              style="margin-bottom: 10px;"
+              :style="{textAlign:isCenter}">
               <a-button
                 type="primary"
                 @click="handleSearch"
@@ -135,7 +139,6 @@
 <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'
@@ -143,12 +146,13 @@ 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 month from '@/views/common/month.vue'
 // 接口
 import { salesStatsDealerList, salesStatsDealerCount, salesStatsDealerExport } from '@/api/reportData'
 export default {
   name: 'CustomerCountList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService, month },
   props: {
     removeReportFlag: {
       type: [String, Number],
@@ -166,8 +170,7 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
-      monthVal: [moment().format('YYYY-MM'), moment().format('YYYY-MM')], // 初始化月份值
-      mode: ['month', 'month'],
+      monthVal: [], // 初始化月份值
       //  查询条件
       queryParam: {
         beginDate: '', // 月份开始时间
@@ -178,6 +181,7 @@ export default {
         provinceSn: undefined, // 省
         citySn: undefined, // 市
         districtSn: undefined, // 区
+        dealerNewFlag: undefined,
         subareaArea: {
           subareaSn: '', // 区域
           subareaAreaSn: '', // 分区
@@ -193,8 +197,8 @@ export default {
         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
+          this.queryParam.beginDate = this.$refs.monthDate.getMonthRange(this.monthVal[0]).firstDay
+          this.queryParam.endDate = this.$refs.monthDate.getMonthRange(this.monthVal[1]).lastDay
         } else {
           this.queryParam.beginDate = undefined
           this.queryParam.endDate = undefined
@@ -220,6 +224,23 @@ export default {
       }
     }
   },
+  computed: {
+    isCenter () {
+      if (this.removeReportFlag == 0) {
+        if (this.isShowCustomerSearch) {
+          return this.advanced ? 'center' : 'left'
+        } else {
+          return 'left'
+        }
+      } else {
+        if (this.isShowCustomerSearch) {
+          return 'left'
+        } else {
+          return this.advanced ? 'center' : 'left'
+        }
+      }
+    }
+  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -232,18 +253,6 @@ export default {
     }
   },
   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
@@ -314,7 +323,7 @@ export default {
     resetSearchForm () {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.monthVal = [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
+      this.$refs.monthDate.resetDate()
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
@@ -326,7 +335,9 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.subareaArea.kfSn = undefined
       this.queryParam.dealerLevel = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.queryParam.bizType = undefined
+
       if (this.advanced) {
         this.$refs.subarea.clearData()
         this.$refs.dealerSubareaScopeList.resetForm()

+ 19 - 30
src/views/reportData/billingStatistics/provinceCountList.vue

@@ -13,15 +13,7 @@
           <a-row :gutter="15">
             <a-col :md="4" :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"
-                />
+                <month ref="monthDate" id="customerCountList-monthBox" v-model="monthVal"></month>
               </a-form-model-item>
             </a-col>
             <a-col :md="4" :sm="24">
@@ -39,6 +31,14 @@
                 <BizUser id="provinceCountList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
               </a-form-model-item>
             </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="新/老客户">
+                <a-select id="customerCountList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                  <a-select-option value="1">新客户</a-select-option>
+                  <a-select-option value="0">老客户</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="4" :sm="24" v-if="removeReportFlag==1">
               <a-form-item label="业务类型">
                 <v-select
@@ -50,7 +50,7 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="removeReportFlag==1 ? 24 : 4" :style="{textAlign: removeReportFlag==1 ? 'center': ''}" :sm="24">
               <a-button
                 type="primary"
                 @click="handleSearch"
@@ -110,18 +110,18 @@
 <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 Area from '@/views/common/area.js'
 import BizUser from '@/views/common/bizUser.js'
+import month from '@/views/common/month.vue'
 // 接口
 import { salesStatsProvinceList, salesStatsProvinceCount, salesStatsProvinceExport } from '@/api/reportData'
 export default {
   name: 'ProvinceCountList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, Area, BizUser },
+  components: { STable, VSelect, subarea, Area, BizUser, month },
   props: {
     removeReportFlag: {
       type: [String, Number],
@@ -138,8 +138,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
-      monthVal: [moment().format('YYYY-MM'), moment().format('YYYY-MM')], // 初始化月份值
-      mode: ['month', 'month'],
+      monthVal: [], // 初始化月份值
       //  查询条件
       queryParam: {
         beginDate: '', // 月份开始时间
@@ -150,7 +149,8 @@ export default {
           subareaAreaSn: '', // 分区
           bizUserSn: undefined// 区域负责人
         },
-        bizType: undefined // 业务类型
+        bizType: undefined, // 业务类型
+        dealerNewFlag: undefined // 新老客户
       },
       columns: [], // 表格列
       countLabel: null, // 统计名称合集
@@ -163,8 +163,8 @@ export default {
         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
+          this.queryParam.beginDate = this.$refs.monthDate.getMonthRange(this.monthVal[0]).firstDay
+          this.queryParam.endDate = this.$refs.monthDate.getMonthRange(this.monthVal[1]).lastDay
         } else {
           this.queryParam.beginDate = undefined
           this.queryParam.endDate = undefined
@@ -196,18 +196,6 @@ export default {
     }
   },
   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
@@ -267,12 +255,13 @@ export default {
     resetSearchForm () {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.monthVal = [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
+      this.$refs.monthDate.resetDate()
       this.queryParam.provinceSn = undefined
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.bizType = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.$refs.subarea.clearData()
       this.totalData = null
       this.$refs.table.clearTable()

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

@@ -0,0 +1,378 @@
+<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>
+                <month ref="monthDate" id="customerCountList-monthBox" v-model="monthVal"></month>
+              </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="实售/开单金额">
+                  <v-select
+                    v-model="queryParam.amountType"
+                    ref="amountType"
+                    id="customerCountList-amountType"
+                    code="AMOUNT_TYPE"
+                    placeholder="请选择"
+                  ></v-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_newCustomReport_export')"
+                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">
+                  <span v-if="item.key !='ltQty'">
+                    {{ item.title }}:{{ item[item.key] ||item[item.key] ==0 ? toThousands(item[item.key]) :'--' }}
+                  </span>
+                  <span v-else>
+                    {{ item.title }}:{{ item[item.key] ||item[item.key] ==0 ? item[item.key] :'--' }}
+                  </span>
+                </a-col>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+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 reportModal from '@/views/common/reportModal.vue'
+import BizUser from '@/views/common/bizUser.js'
+import customerService from '@/views/common/customerService.vue'
+import month from '@/views/common/month.vue'
+// 接口
+import { reportDealerNewLogList, reportDealerNewLogCount, reportDealerNewLogTitle, reportDealerNewLogExport } from '@/api/reportData'
+export default {
+  name: 'CustomerCountList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService, reportModal, month },
+  data () {
+    return {
+      spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 高级搜索 展开/关闭
+      showExport: false,
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      monthVal: [], // 初始化月份值
+      //  查询条件
+      queryParam: {
+        beginDate: '', // 月份开始时间
+        endDate: '', // 月份结束时间
+        dealerLevel: undefined, // 客户等级
+        dealerSnOwner: undefined, // 客户sn
+        dealerName: undefined, // 客户名称
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        subareaArea: {
+          subareaSn: '', // 区域
+          subareaAreaSn: '', // 分区
+          bizUserSn: undefined, // 区域负责人
+          kfSn: undefined// 客服
+        },
+        amountType: 'total_real_amount'
+      },
+      columns: [], // 表格  列数据
+      totalData: null, // 合计
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        if (this.monthVal) {
+          this.queryParam.beginDate = this.$refs.monthDate.getMonthRange(this.monthVal[0]).firstDay
+          this.queryParam.endDate = this.$refs.monthDate.getMonthRange(this.monthVal[1]).lastDay
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据  有分页
+        return reportDealerNewLogList(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: {
+    // 获取表头
+    async getTableTitle () {
+      const _this = this
+      const tableTitle = await reportDealerNewLogTitle({}).then(res => res.data)
+      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) {
+      reportDealerNewLogCount(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.$refs.monthDate.resetDate()
+      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
+      this.queryParam.amountType = 'total_real_amount'
+      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))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(reportDealerNewLogExport, params, '新客户首笔销售统计(' + params.amountType === 'total_real_amount' ? '实售' : '开单' + ')', function () {
+        _this.exportLoading = false
+        _this.showExport = true
+        _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>

+ 13 - 3
src/views/reportData/promotionFeeReport/customerFeeList.vue

@@ -65,13 +65,21 @@
                   ></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
                 <a-form-model-item label="客服">
                   <customerService ref="customerName" id="customerFeeList-customerName" v-model="queryParam.kfSn"></customerService>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="customerFeeList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24">
+            <a-col :md="isShowCustomerSearch&&advanced?24:6" :sm="24" style="margin-bottom:5px;" :style="{textAlign: isShowCustomerSearch&&advanced?'center':''}">
               <a-button
                 type="primary"
                 @click="handleSearch"
@@ -164,7 +172,8 @@ export default {
           bizUserSn: undefined// 区域负责人
         },
         discountFlag: '0', // 是否包含特价
-        kfSn: undefined// 客服
+        kfSn: undefined, // 客服
+        dealerNewFlag: undefined // 新老客户
       },
       columns: [], // 表头
       countLabel: null, // 合计名称
@@ -299,6 +308,7 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.kfSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.queryParam.discountFlag = '0'
       this.$refs.dealerSubareaScopeList.resetForm()
       if (this.advanced) {

+ 11 - 1
src/views/reportData/promotionFeeReport/promoFeeList.vue

@@ -65,6 +65,14 @@
                   ></v-select>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="customerFeeList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <a-button
@@ -168,7 +176,8 @@ export default {
           subareaSn: '', // 区域
           subareaAreaSn: '', // 分区
           bizUserSn: undefined// 区域负责人
-        }
+        },
+        dealerNewFlag: undefined
       },
       columns: [], // 表头
       countLabel: null, // 合计名称
@@ -322,6 +331,7 @@ export default {
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
       if (this.advanced) {
         this.$refs.subarea && this.$refs.subarea.clearData()

+ 17 - 7
src/views/reportData/promotionFeeReport/provinceFeeList.vue

@@ -11,7 +11,7 @@
           :rules="rules"
           :model="queryParam">
           <a-row :gutter="15" type="flex">
-            <a-col :md="3" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="月份" prop="beginDate">
                 <a-month-picker
                   id="provinceFeeList-monthBox"
@@ -22,22 +22,22 @@
                   @change="onChangeMonth" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="3" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="地区">
                 <Area id="provinceFeeList-areaList" v-model="queryParam.provinceSn" placeholder="请选择省份"></Area>
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="所在区域">
                 <subarea id="provinceFeeList-subarea" ref="subarea" @change="subareaChange"></subarea>
               </a-form-item>
             </a-col>
-            <a-col :md="3" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="区域负责人">
                 <BizUser id="provinceFeeList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
               </a-form-model-item>
             </a-col>
-            <a-col :md="3" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="是否包含特价">
                 <v-select
                   v-model="queryParam.discountFlag"
@@ -48,7 +48,15 @@
                 ></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="7" :sm="24">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="新/老客户">
+                <a-select id="customerFeeList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                  <a-select-option value="1">新客户</a-select-option>
+                  <a-select-option value="0">老客户</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
               <a-button
                 type="primary"
                 @click="handleSearch"
@@ -127,7 +135,8 @@ export default {
           subareaSn: '', // 区域
           subareaAreaSn: '', // 分区
           bizUserSn: undefined// 区域负责人
-        }
+        },
+        dealerNewFlag: undefined
       },
       countLabel: null, // 统计名称合集
       totalData: null, // 统计数据
@@ -241,6 +250,7 @@ export default {
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.discountFlag = '0'
+      this.queryParam.dealerNewFlag = undefined
       this.totalData = null
       this.$refs.subarea && this.$refs.subarea.clearData()
       this.$refs.areaList && this.$refs.areaList.clearData()

+ 15 - 5
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-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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
@@ -234,7 +242,8 @@ export default {
         productBrand: undefined, // 产品品牌
         productTypeSn1: '', //  产品一级分类
         productType: '', //  产品二级分类
-        dealerLevel: undefined// 客户等级
+        dealerLevel: undefined, // 客户等级
+        dealerNewFlag: undefined
       },
       productType: [], // 产品分类
       form: {
@@ -438,6 +447,7 @@ export default {
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productType = undefined
       this.queryParam.dealerLevel = undefined
+      this.queryParam.dealerNewFlag = undefined
 
       this.productType = []
       this.totalData = null

+ 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-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                          <a-select-option value="1">新客户</a-select-option>
+                          <a-select-option value="0">老客户</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, // 客服
+        dealerNewFlag: undefined // 客户类型
       },
       rules: {
         salesDate: [{ required: true, message: '请选择销售审核时间', trigger: 'change' }]
@@ -419,7 +428,8 @@ export default {
         dealerCitySn: undefined, // 城市编码
         dealerDistrictSn: undefined, // 区域编码
         giveMoney: undefined,
-        bizUserSn: undefined // 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: 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-dealerNewFlag" v-model="newQueryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                      <a-select-option value="1">新客户</a-select-option>
+                      <a-select-option value="0">老客户</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, // 客服
+        dealerNewFlag: undefined // 客户类型
       },
       rules: {
         salesDate: [{ required: true, message: '请选择下推时间', trigger: 'change' }]
@@ -550,7 +559,8 @@ export default {
         dealerProvinceSn: undefined, // 省份编码
         dealerCitySn: undefined, // 城市编码
         dealerDistrictSn: undefined, // 区域编码
-        bizUserSn: undefined
+        bizUserSn: undefined,
+        dealerNewFlag: 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/regionTypeSalesReport/list.vue

@@ -48,7 +48,15 @@
                   <customerService id="regionTypeSalesList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="(activeKey==0&&!isShowCustomerSearch)?24:activeKey==1&&isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign:(activeKey==0&&!isShowCustomerSearch)?'center':(activeKey==1&&isShowCustomerSearch)?'center':'left'}">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="新/老客户">
+                  <a-select id="regionTypeSalesList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="(activeKey==1&&!isShowCustomerSearch)?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign:(activeKey==1&&!isShowCustomerSearch)?'center':'left'}">
                 <a-button type="primary" @click="handleSearch" :disabled="disabled" id="regionTypeSalesList-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="regionTypeSalesList-reset">重置</a-button>
                 <a-button
@@ -128,7 +136,8 @@ export default {
           bizUserSn: undefined// 区域负责人
         },
         salesStatusType: 'REAL_SALES', // 销售状态
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined
       },
       rules: {
         'time': [{ required: true, message: '请选择时间', trigger: 'change' }],
@@ -204,6 +213,7 @@ export default {
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.queryParam.salesStatusType = 'REAL_SALES'
       if (this.activeKey == 0) {
         this.$refs.subarea.clearData()

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

@@ -55,8 +55,16 @@
                   <AreaList id="returnGoodsPresentationList-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="新/老客户">
+                  <a-select id="returnGoodsPresentationList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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="advanced?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: advanced?'center':''}">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
               <a-button
@@ -163,7 +171,8 @@ export default {
           'citySn': undefined, // 市
           'districtSn': undefined, // 区
           'dealerLevel': undefined// 客户级别
-        }
+        },
+        dealerNewFlag: undefined
       },
       columns: [], // 表头数据
       countLabel: [], // 统计分类数据
@@ -279,6 +288,7 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.salesReturnBillNo = ''
+      this.queryParam.dealerNewFlag = undefined
       this.queryParam.subareaArea = {
         subareaSn: undefined,
         subareaAreaSn: undefined,

+ 11 - 1
src/views/reportData/returnSlipReport/list.vue

@@ -80,6 +80,14 @@
                   <customerService id="returnSlipReportList-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="returnSlipReportList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnSlipReportList-refresh">查询</a-button>
@@ -194,7 +202,8 @@ export default {
         salesReturnType: undefined, // 退货类型
         goodFlag: undefined, // 退货类别
         salesReturnBillNo: '', // 退货单号
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined// 客户类型
       },
       rules: {
         'time': [{ required: true, message: '请选择退货日期', trigger: 'change' }]
@@ -327,6 +336,7 @@ export default {
       this.queryParam.salesReturnType = undefined
       this.queryParam.goodFlag = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.queryParam.salesReturnBillNo = ''
       this.$refs.custList.resetForm()
       this.totalData = null

+ 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-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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, // 客服
+        dealerNewFlag: 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.dealerNewFlag = undefined
       this.totalData = null
       this.$refs.subarea.clearData()
       if (this.advanced) {

+ 32 - 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,27 @@
                   <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-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="新客户首笔订单">
+                  <v-select
+                    v-model="queryParam.newCustFlag"
+                    ref="newCustFlag"
+                    id="salesDetailsList-newCustFlag"
+                    code="FLAG"
+                    placeholder="请选择是否新客户首笔订单"
+                    allowClear></v-select>
+                </a-form-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 +280,9 @@ export default {
         warehouseSn: undefined, // 出库仓库
         giftFLag: undefined, // 是否是促销产品  1是  0不是
         promotionFlag: undefined, // 产品类型
-        bizUserSn: undefined // 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined, // 客户类型
+        newCustFlag: undefined
       },
       isAveragePrice: false, // 平均公斤单价
       productType: [], // 产品分类
@@ -463,6 +484,8 @@ export default {
       this.queryParam.giftFLag = undefined
       this.queryParam.promotionFlag = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
+      this.queryParam.newCustFlag = undefined
       if (this.advanced) {
         this.$refs.subarea.clearData()
         this.$refs.areaList.clearData()
@@ -515,7 +538,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-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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, // 客服
+        dealerNewFlag: 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.dealerNewFlag = undefined
       this.totalData = null
       if (this.advanced) {
         this.$refs.subarea.clearData()

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

@@ -55,8 +55,16 @@
                   <AreaList id="salesPresentationList-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="新/老客户">
+                  <a-select id="salesPresentationList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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="advanced?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign:advanced?'center':'left'}">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesPresentationList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesPresentationList-reset">重置</a-button>
               <a-button
@@ -157,7 +165,8 @@ export default {
           'citySn': undefined,
           'districtSn': undefined,
           'dealerLevel': undefined
-        }
+        },
+        dealerNewFlag: undefined
       },
       columns: [],
       countLabel: [],
@@ -269,6 +278,7 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.salesBillNo = ''
+      this.queryParam.dealerNewFlag = undefined
       this.queryParam.subareaArea = {
         'subareaSn': undefined,
         'subareaAreaSn': undefined,

+ 12 - 8
src/views/reportData/salesReturnDetailReport/list.vue

@@ -115,14 +115,16 @@
                   <customerService id="salesReturnDetailList-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="salesReturnDetailList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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-button
-                type="primary"
-                class="button-info"
-                size="small"
-                @click="handleStock"
-                id="salesReturnDetailList-stockDate">盘点区间日期</a-button> -->
+            <a-col :md="!isShowCustomerSearch?24:(advanced?6:24)" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: !isShowCustomerSearch?'center':(advanced?'':'center')}">
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnDetailList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnDetailList-reset">重置</a-button>
               <a-button
@@ -264,7 +266,8 @@ export default {
         dealerProvinceSn: undefined, // 省
         dealerCitySn: undefined, // 市
         dealerCountySn: undefined, // 区
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined // 客户类型
       },
       rules: {
         'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
@@ -526,6 +529,7 @@ export default {
       this.queryParam.goodFlag = undefined
       this.queryParam.salesReturnType = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.productType = []
       if (this.advanced) {
         this.$refs.subarea.clearData()

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

@@ -54,8 +54,16 @@
                   <customerService id="salesReturnDetailList-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="salesReturnDetailList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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="salesReturnReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReportList-reset">重置</a-button>
               <a-button
@@ -166,7 +174,8 @@ export default {
           bizUserSn: undefined// 区域负责人
         },
         dealerLevel: undefined, // 客户级别
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined
       },
       rules: {
         'time': [{ required: true, message: '请选择退货日期', trigger: 'change' }]
@@ -293,6 +302,7 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.totalData = null
       this.$refs.subarea.clearData()
       if (this.advanced) {

+ 11 - 1
src/views/reportData/salesReturnsReport/list.vue

@@ -80,6 +80,14 @@
                   <customerService id="salesReturnsReportList-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="customerCountList-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnsReportList-refresh">查询</a-button>
@@ -198,7 +206,8 @@ export default {
         dealerProvinceSn: undefined, // 省
         dealerCitySn: undefined, // 市
         dealerCountySn: undefined, // 区
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined
       },
       rules: {
         'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
@@ -398,6 +407,7 @@ export default {
       this.queryParam.goodFlag = undefined
       this.queryParam.salesReturnType = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.$refs.subarea.clearData()
       if (this.advanced) {
         this.$refs.custList.resetForm()

+ 13 - 8
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-dealerNewFlag" v-model="queryParam.dealerNewFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="1">新客户</a-select-option>
+                    <a-select-option value="0">老客户</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
@@ -178,7 +181,8 @@ export default {
           subareaAreaSn: undefined, // 分区
           bizUserSn: undefined// 区域负责人
         },
-        bizUserSn: undefined// 客服
+        bizUserSn: undefined, // 客服
+        dealerNewFlag: undefined
       },
       columns: [], // 表格列
       countLabel: [], // 统计品牌数据
@@ -305,6 +309,7 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerNewFlag = undefined
       this.totalData = null
       if (this.advanced) {
         this.$refs.subarea.clearData()

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

@@ -4,7 +4,8 @@
       <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" :style="{marginBottom:!outBizSubSn&&!bizSn?'6px':'0px'}">
         <template slot="subTitle" v-if="!outBizSubSn&&!bizSn">
           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.dispatchBillNo }}</span>
+          <span style="margin: 0 5px 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.dispatchBillNo }}</span>
+          <a-badge count="新" v-if="detailData&&detailData.newCustFlag==1" :number-style="{ backgroundColor: '#52c41a', zoom:0.8 }"></a-badge>
           <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
           <a-button type="link" size="small" class="button-default" @click="showDetail=!showDetail">
             <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息

+ 35 - 17
src/views/salesManagement/pushOrderManagement/list.vue

@@ -41,18 +41,18 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单据状态">
+                <v-select
+                  v-model="queryParam.voidFlag"
+                  ref="voidFlag"
+                  id="pushOrder-voidFlag"
+                  code="VOID_FLAG"
+                  placeholder="请选择单据状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="单据状态">
-                  <v-select
-                    v-model="queryParam.voidFlag"
-                    ref="voidFlag"
-                    id="pushOrder-voidFlag"
-                    code="VOID_FLAG"
-                    placeholder="请选择单据状态"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="备货打印状态">
                   <v-select
@@ -95,8 +95,19 @@
                   <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="新客户首笔订单">
+                  <v-select
+                    v-model="queryParam.newCustFlag"
+                    ref="newCustFlag"
+                    id="pushOrder-newCustFlag"
+                    code="FLAG"
+                    placeholder="请选择是否新客户首笔订单"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
             </template>
-            <a-col :md="isShowCustomerSearch?6:24" :sm="24" :style="{textAlign:isShowCustomerSearch?'':'center'}">
+            <a-col :md="6" :sm="24">
               <div class="table-page-search-submitButtons">
                 <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                 <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
@@ -127,7 +138,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y:tableHeight, x:1890 }"
+          :scroll="{ y:tableHeight, x:1920 }"
           :defaultLoadData="false"
           bordered>
           <!-- 销售单号 -->
@@ -137,8 +148,13 @@
           </template>
           <!-- 备货单号 -->
           <template slot="dispatchBillNo" slot-scope="text, record">
-            <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
-            <span v-else>{{ record.dispatchBillNo }}</span>
+            <div style="display: flex;align-items: center;justify-content: center;">
+              <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">
+                {{ record.dispatchBillNo }}
+              </span>
+              <span v-else>{{ record.dispatchBillNo }}</span>
+              <a-badge count="新" v-if="record.newCustFlag==1" :number-style="{ backgroundColor: '#52c41a', zoom:0.8 }"></a-badge>
+            </div>
           </template>
           <!-- 发货说明  -->
           <template slot="explainInfo" slot-scope="text, record">
@@ -246,7 +262,8 @@ export default {
         printStatus: undefined, // 备货打印状态
         checkStatus: undefined, // 对单状态
         warehouseSn: undefined, // 仓库
-        bizUserSn: undefined // 客服
+        bizUserSn: undefined, // 客服
+        newCustFlag: undefined
       },
       totalData: { // 统计数据
         totalAmount: 0, // 总金额
@@ -285,7 +302,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
         { title: '下推时间', dataIndex: 'pushedDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '120px', align: 'center' },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '150px', align: 'center' },
         { title: '发货编号', dataIndex: 'sendNo', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '150px', align: 'center', ellipsis: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -394,6 +411,7 @@ export default {
       this.queryParam.checkStatus = undefined
       this.queryParam.warehouseSn = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.newCustFlag = undefined
 
       if (this.advanced) {
         this.$refs.subarea.clearData()

+ 32 - 3
src/views/salesManagement/waitDispatchNew/dsModal.vue

@@ -77,6 +77,16 @@
               </a-radio>
             </a-radio-group>
           </a-form-model-item>
+          <a-form-model-item label="新客户首笔订单" prop="newCustFlag">
+            <a-radio-group v-model="form.newCustFlag" :disabled="!editFlag" id="dsModal-newCustFlag">
+              <a-radio value="1" id="dsModal-newCustFlag-1">
+                是
+              </a-radio>
+              <a-radio value="0" id="dsModal-newCustFlag-2">
+                否
+              </a-radio>
+            </a-radio-group>
+          </a-form-model-item>
         </a-form-model>
         <div class="btn-cont">
           <a-button id="dsModal-back" @click="isShow = false">取消下推</a-button>
@@ -94,6 +104,7 @@ import { commonMixin } from '@/utils/mixin'
 import chooseAddressModal from '../salesQuery/receivingAddress/chooseAddressModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { dealerRecevieAddrQuery } from '@/api/dealerRecevieAddr'
+import { dealerNewLogEditFlag } from '@/api/dealearNewLog'
 export default {
   name: 'DsModal',
   mixins: [commonMixin],
@@ -123,11 +134,13 @@ export default {
         receiverSn: '', // 收货客户sn
         receiverName: '', // 收货客户名称
         dealerRecevieAddressSn: '', // 地址sn
-        explainInfo: '' // 备注
+        explainInfo: '', // 备注
+        newCustFlag: undefined // 新客户首笔订单
       },
       rules: {
         sendNo: [{ required: true, message: '请输入发货编号', trigger: 'change' }],
         printStatus: [{ required: true, message: '请选择备货打印', trigger: 'change' }],
+        newCustFlag: [{ required: true, message: '请选择是否新客户首笔订单', trigger: 'change' }],
         dealerRecevieAddressSn: [ { required: true, message: '请选择收货地址', trigger: 'change' } ]
       },
       detailData: null, //  详情数据
@@ -135,7 +148,8 @@ export default {
       chooseAddr: '', //  当前已选地址信息
       openAddrModal: false, // 选择地址弹框是否显示
       addressId: undefined, // 地址id
-      receiverDisabled: false // 是否选择收货客户名称
+      receiverDisabled: false, // 是否选择收货客户名称
+      editFlag: true
     }
   },
   methods: {
@@ -217,6 +231,18 @@ export default {
         }
       }
     },
+    getEditFlag () {
+      dealerNewLogEditFlag({ sn: this.detailData.buyerSn }).then(res => {
+        if (res.status == 200) {
+          this.editFlag = res.data
+          if (!this.editFlag) {
+            this.form.newCustFlag = '0'
+          } else {
+            this.form.newCustFlag = undefined
+          }
+        }
+      })
+    },
     // 重置表单
     resetForm () {
       this.detailData = null
@@ -228,7 +254,8 @@ export default {
         receiverSn: '',
         receiverName: '',
         dealerRecevieAddressSn: '',
-        explainInfo: ''
+        explainInfo: '',
+        newCustFlag: undefined
       }
       if (!this.receiverDisabled) {
         this.$refs.dealerSubareaScopeList.resetForm()
@@ -246,6 +273,8 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.resetForm()
+      } else {
+        this.getEditFlag()
       }
     }
   }

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.103/ocs-admin',
+        // target: 'http://192.168.2.10/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {