瀏覽代碼

Merge commit '4d829637827cb75884acd5bb56cf2aa907e923f7' into HEAD

gitadmin 12 小時之前
父節點
當前提交
eb2866bd37

+ 1 - 1
public/version.json

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

+ 84 - 0
src/api/bizRemove.js

@@ -0,0 +1,84 @@
+import { axios } from '@/utils/request'
+
+// 根据销售退货单号查询客户
+export const salesReturnDetailByNo = (params) => {
+  return axios({
+    url: `/salesReturn/findByNo/${params.salesReturnBillNo}`,
+    data: params,
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('根据销售退货单号查询客户信息')
+    }
+  })
+}
+//  根据sn查询销售退货剔除配置
+export const bizRemoveConfigDetail = (params) => {
+  return axios({
+    url: `/bizRemoveConfig/findBySn`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('销售退货剔除配置详情')
+    }
+  })
+}
+//  销售退货剔除配置创建
+export const bizRemoveConfigCreate = (params) => {
+  return axios({
+    url: `/bizRemoveConfig/create`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('创建销售退货剔除配置')
+    }
+  })
+}
+//  销售退货剔除配置修改
+export const bizRemoveConfigModify = (params) => {
+  return axios({
+    url: `/bizRemoveConfig/modify`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('修改销售退货剔除配置')
+    }
+  })
+}
+//  销售退货剔除配删除
+export const bizRemoveConfigDelete = (params) => {
+  return axios({
+    url: `/bizRemoveConfig/delete`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('删除销售退货剔除配置')
+    }
+  })
+}
+// 销售退货剔除配置列表
+export const bizRemoveConfigPageList = (params) => {
+  const url = `/bizRemoveConfig/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('销售退货剔除配置列表查询')
+    }
+  })
+}
+
+// 导出
+export const bizRemoveConfigReportExport = (params) => {
+  return axios({
+    url: `/bizRemoveConfig/reportExport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('销售退货剔除配置导出')
+    }
+  })
+}

+ 25 - 0
src/config/sysSetting.js

@@ -324,6 +324,31 @@ export default {
         }
       ]
     },
+    {
+      path: '/setting/salesReturnRemove',
+      redirect: '/setting/salesReturnRemove/list',
+      name: 'salesReturnRemove',
+      component: BlankLayout,
+      meta: {
+        title: '开单剔除配置',
+        icon: 'sketch',
+        permission: 'M_salesReturnRemoveList'
+      },
+      hideChildrenInMenu: true,
+      children: [
+        {
+          path: 'list',
+          name: 'salesReturnRemoveList',
+          component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/salesReturnRemove/list.vue'),
+          meta: {
+            title: '开单剔除配置',
+            icon: 'sketch',
+            hidden: true,
+            permission: 'M_salesReturnRemoveList'
+          }
+        }
+      ]
+    },
     {
       path: '/setting/tireSubsidySetting',
       redirect: '/setting/tireSubsidySetting/index',

+ 61 - 59
src/views/reportData/billingStatistics/customerCountList.vue

@@ -8,18 +8,19 @@
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
-          :rules="rules"
           :model="queryParam">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="月份" prop="beginDate">
-                <a-month-picker
+              <a-form-model-item label="月份" required>
+                <a-range-picker
                   id="customerCountList-monthBox"
                   class="monthBox"
-                  :disabled-date="disabledDate"
+                  :placeholder="['开始月份', '结束月份']"
+                  format="YYYY-MM"
                   v-model="monthVal"
-                  placeholder="请选择月份"
-                  @change="onChangeMonth" />
+                  :mode="mode"
+                  @panelChange="handlePanelChange"
+                />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -56,7 +57,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客服">
-                  <customerService ref="customerName" id="customerCountList-customerName" v-model="queryParam.kfSn"></customerService>
+                  <customerService ref="customerName" id="customerCountList-customerName" v-model="queryParam.subareaArea.kfSn"></customerService>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -132,11 +133,21 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService.vue'
 // 接口
-import { salesStatsDealerList, salesStatsDealerTitle, salesStatsDealerCount, salesStatsDealerExport } from '@/api/reportData'
+import { salesStatsDealerList, salesStatsDealerCount, salesStatsDealerExport } from '@/api/reportData'
 export default {
   name: 'CustomerCountList',
   mixins: [commonMixin],
   components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
+  props: {
+    removeReportFlag: {
+      type: [String, Number],
+      default: '0'
+    },
+    tableTitle: {
+      type: Object,
+      default: () => {}
+    }
+  },
   data () {
     return {
       spinning: false,
@@ -144,13 +155,14 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
-      monthVal: moment().format('YYYY-MM'), // 初始化月份值
+      monthVal: [moment().format('YYYY-MM'), moment().format('YYYY-MM')], // 初始化月份值
+      mode: ['month', 'month'],
       //  查询条件
       queryParam: {
-        beginDate: moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00', // 月份开始时间
-        endDate: moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59', // 月份结束时间
+        beginDate: '', // 月份开始时间
+        endDate: '', // 月份结束时间
         dealerLevel: undefined, // 客户等级
-        dealerSn: undefined, // 客户sn
+        dealerSnOwner: undefined, // 客户sn
         dealerName: undefined, // 客户名称
         provinceSn: undefined, // 省
         citySn: undefined, // 市
@@ -158,20 +170,25 @@ export default {
         subareaArea: {
           subareaSn: '', // 区域
           subareaAreaSn: '', // 分区
-          bizUserSn: undefined// 区域负责人
-        },
-        kfSn: undefined// 客服
+          bizUserSn: undefined, // 区域负责人
+          kfSn: undefined// 客服
+        }
       },
       columns: [], // 表格  列数据
       totalData: null, // 合计
-      rules: {
-        'beginDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
-      },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        if (this.monthVal) {
+          this.queryParam.beginDate = this.getMonthRange(this.monthVal[0]).firstDay
+          this.queryParam.endDate = this.getMonthRange(this.monthVal[1]).lastDay
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
         const params = Object.assign(parameter, this.queryParam)
+        params.removeReportFlag = this.removeReportFlag
         // 获取列表数据  有分页
         return salesStatsDealerList(params).then(res => {
           let data
@@ -203,20 +220,9 @@ export default {
     }
   },
   methods: {
-    // 选择月份  禁用选择当月以后日期
-    disabledDate (current) {
-      return current && current >= moment().endOf('day')
-    },
-    // 选择月份 change
-    onChangeMonth (date, dateString) {
-      this.monthVal = dateString
-      if (date && dateString != '') {
-        this.queryParam.beginDate = this.getMonthRange(dateString).firstDay
-        this.queryParam.endDate = this.getMonthRange(dateString).lastDay
-      } else {
-        this.queryParam.beginDate = undefined
-        this.queryParam.endDate = undefined
-      }
+    handlePanelChange (value, mode) {
+      this.monthVal = value
+      this.mode = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
     },
     // 获取指定月份   第一天和最后一天
     getMonthRange (targetMonth) {
@@ -229,16 +235,16 @@ export default {
     // 获取表头
     async getTableTitle () {
       const _this = this
-      const tableTitle = await salesStatsDealerTitle().then(res => res.data)
-      this.columns = tableTitle.list
-      this.countLabel = tableTitle.count
+      this.columns = _this.tableTitle.list
+      this.countLabel = _this.tableTitle.count
       this.columns.map(item => {
-        item.titleNum = item.title
-        let mw = 20
-        if (item.customRender == 'amount') {
-          mw = 15
+        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.titleNum}</span>
+            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) : '--' }
@@ -246,8 +252,6 @@ export default {
         } else {
           item.customRender = function (text) { return text || '--' }
         }
-        const w = item.titleNum.length * mw
-        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
@@ -255,20 +259,17 @@ export default {
     },
     // 查询
     handleSearch () {
-      const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          _this.$refs.table.refresh(true)
-        } else {
-          _this.$message.error('请选择查询月份')
-          return false
-        }
-      })
+      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.dealerSn = val.key
+      this.queryParam.dealerSnOwner = val.key
     },
     // 统计
     getCount (params) {
@@ -299,18 +300,19 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.beginDate = moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
-      this.queryParam.endDate = moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
-      this.monthVal = moment().format('YYYY-MM')
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.monthVal = [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
       this.queryParam.dealerName = undefined
-      this.queryParam.dealerSn = undefined
+      this.queryParam.dealerSnOwner = undefined
       this.queryParam.bizUserSn = undefined
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.subareaArea.kfSn = undefined
       this.queryParam.dealerLevel = undefined
       if (this.advanced) {
         this.$refs.subarea.clearData()
@@ -337,9 +339,10 @@ export default {
     exportList () {
       const _this = this
       const params = JSON.parse(JSON.stringify(_this.queryParam))
+      params.removeReportFlag = this.removeReportFlag
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(salesStatsDealerExport, params, '开单统计报表(客户)', function () {
+      hdExportExcel(salesStatsDealerExport, params, this.removeReportFlag == 0 ? '开单统计报表(客户)' : '未统计销售退货(客户)', function () {
         _this.exportLoading = false
         _this.spinning = false
       })
@@ -349,6 +352,7 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         this.setTableH()
         this.resetSearchForm()
+        this.getTableTitle()
       })
     },
     // 计算表格高度
@@ -360,14 +364,12 @@ export default {
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.getTableTitle()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.getTableTitle()
     }
   }
 }

+ 580 - 0
src/views/reportData/billingStatistics/dataCustomer.js

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

+ 548 - 0
src/views/reportData/billingStatistics/dataProvince.js

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

+ 15 - 3
src/views/reportData/billingStatistics/index.vue

@@ -3,10 +3,16 @@
     <a-card size="small" :bordered="false">
       <a-tabs default-active-key="1" @change="handleChange">
         <a-tab-pane key="1" tab="开单统计报表(客户)">
-          <customerCountList ref="customerList"></customerCountList>
+          <customerCountList ref="customerList" :tableTitle="tableTitle" :removeReportFlag="0"></customerCountList>
         </a-tab-pane>
         <a-tab-pane key="2" tab="开单统计报表(省份)" force-render>
-          <provinceCountList ref="provinceList"></provinceCountList>
+          <provinceCountList ref="provinceList" :tableTitle="tableTitle1" :removeReportFlag="0"></provinceCountList>
+        </a-tab-pane>
+        <a-tab-pane key="3" tab="未统计销售退货(客户)" force-render>
+          <customerCountList ref="customerList1" :tableTitle="tableTitle2" :removeReportFlag="1"></customerCountList>
+        </a-tab-pane>
+        <a-tab-pane key="4" tab="未统计销售退货(省份)" force-render>
+          <provinceCountList ref="provinceList1" :tableTitle="tableTitle3" :removeReportFlag="1"></provinceCountList>
         </a-tab-pane>
       </a-tabs>
     </a-card>
@@ -17,13 +23,19 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 import customerCountList from './customerCountList.vue'
 import provinceCountList from './provinceCountList.vue'
+import tableTitle from './dataCustomer.js'
+import tableTitle1 from './dataProvince.js'
 export default {
   name: 'BillingStatisticsIndex',
   mixins: [commonMixin],
   components: { customerCountList, provinceCountList },
   data () {
     return {
-      tabVal: 1 // tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表
+      tabVal: 1, // tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表
+      tableTitle: { count: tableTitle.count, list: tableTitle.list.filter(item => item.key !== 'bizNo') },
+      tableTitle1: { count: tableTitle1.count, list: tableTitle1.list.filter(item => item.key !== 'bizNo') },
+      tableTitle2: tableTitle,
+      tableTitle3: tableTitle1
     }
   },
   methods: {

+ 53 - 47
src/views/reportData/billingStatistics/provinceCountList.vue

@@ -12,14 +12,16 @@
           :model="queryParam">
           <a-row :gutter="15">
             <a-col :md="5" :sm="24">
-              <a-form-model-item label="月份" prop="beginDate">
-                <a-month-picker
-                  id="provinceCountList-monthBox"
+              <a-form-model-item label="月份" required>
+                <a-range-picker
+                  id="customerCountList-monthBox"
                   class="monthBox"
-                  :disabled-date="disabledDate"
+                  :placeholder="['开始月份', '结束月份']"
+                  format="YYYY-MM"
                   v-model="monthVal"
-                  placeholder="请选择月份"
-                  @change="onChangeMonth" />
+                  :mode="mode"
+                  @panelChange="handlePanelChange"
+                />
               </a-form-model-item>
             </a-col>
             <a-col :md="5" :sm="24">
@@ -104,22 +106,33 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import BizUser from '@/views/common/bizUser.js'
 // 接口
-import { salesStatsProvinceList, salesStatsProvinceTit, salesStatsProvinceCount, salesStatsProvinceExport } from '@/api/reportData'
+import { salesStatsProvinceList, salesStatsProvinceCount, salesStatsProvinceExport } from '@/api/reportData'
 export default {
   name: 'ProvinceCountList',
   mixins: [commonMixin],
   components: { STable, VSelect, subarea, Area, BizUser },
+  props: {
+    removeReportFlag: {
+      type: [String, Number],
+      default: '0'
+    },
+    tableTitle: {
+      type: Object,
+      default: () => {}
+    }
+  },
   data () {
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
-      monthVal: moment().format('YYYY-MM'), // 初始化月份值
+      monthVal: [moment().format('YYYY-MM'), moment().format('YYYY-MM')], // 初始化月份值
+      mode: ['month', 'month'],
       //  查询条件
       queryParam: {
-        beginDate: moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00', // 月份开始时间
-        endDate: moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59', // 月份结束时间
+        beginDate: '', // 月份开始时间
+        endDate: '', // 月份结束时间
         provinceSn: undefined, // 地区
         subareaArea: {
           subareaSn: '', // 区域
@@ -137,7 +150,15 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        if (this.monthVal) {
+          this.queryParam.beginDate = this.getMonthRange(this.monthVal[0]).firstDay
+          this.queryParam.endDate = this.getMonthRange(this.monthVal[1]).lastDay
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
         const params = Object.assign(parameter, this.queryParam)
+        params.removeReportFlag = this.removeReportFlag
         // 获取列表数据  无分页
         return salesStatsProvinceList(params).then(res => {
           let data
@@ -163,20 +184,9 @@ export default {
     }
   },
   methods: {
-    // 选择月份  禁用选择当月以后日期
-    disabledDate (current) {
-      return current && current >= moment().endOf('day')
-    },
-    // 选择月份 change
-    onChangeMonth (date, dateString) {
-      this.monthVal = dateString
-      if (date && dateString != '') {
-        this.queryParam.beginDate = this.getMonthRange(dateString).firstDay
-        this.queryParam.endDate = this.getMonthRange(dateString).lastDay
-      } else {
-        this.queryParam.beginDate = undefined
-        this.queryParam.endDate = undefined
-      }
+    handlePanelChange (value, mode) {
+      this.monthVal = value
+      this.mode = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
     },
     // 获取指定月份   第一天和最后一天
     getMonthRange (targetMonth) {
@@ -189,16 +199,16 @@ export default {
     // 获取表头
     async getTableTitle () {
       const _this = this
-      const tableTitle = await salesStatsProvinceTit().then(res => res.data)
-      this.columns = tableTitle.list
-      this.countLabel = tableTitle.count
+      this.columns = _this.tableTitle.list
+      this.countLabel = _this.tableTitle.count
       this.columns.map(item => {
-        item.titleNum = item.title
-        let mw = 20
-        if (item.customRender == 'amount') {
-          mw = 15
+        const mw = item.type == 'amount' ? 15 : 17
+        const textLen = typeof item.title === 'string' ? item.title.length : (item.title.children && item.title.children[0].text && item.title.children[0].text.length)
+        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.titleNum}</span>
+            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) : '--' }
@@ -206,8 +216,6 @@ export default {
         } else {
           item.customRender = function (text) { return text || '--' }
         }
-        const w = item.titleNum.length * mw
-        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
@@ -215,15 +223,12 @@ export default {
     },
     // 查询
     handleSearch () {
-      const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          _this.$refs.table.refresh(true)
-        } else {
-          _this.$message.error('请选择查询月份')
-          return false
-        }
-      })
+      const date = this.monthVal
+      if (date && date[0] && date[1]) {
+        this.$refs.table.refresh(true)
+      } else {
+        this.$message.error('请选择查询月份')
+      }
     },
     // 统计
     getCount (params) {
@@ -248,9 +253,9 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.beginDate = moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
-      this.queryParam.endDate = moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
-      this.monthVal = moment().format('YYYY-MM')
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.monthVal = [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
       this.queryParam.provinceSn = undefined
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
@@ -276,9 +281,10 @@ export default {
     exportList () {
       const _this = this
       const params = JSON.parse(JSON.stringify(_this.queryParam))
+      params.removeReportFlag = this.removeReportFlag
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(salesStatsProvinceExport, params, '开单统计报表(省份)', function () {
+      hdExportExcel(salesStatsProvinceExport, params, this.removeReportFlag == 0 ? '开单统计报表(省份)' : '未统计销售退货(省份)', function () {
         _this.exportLoading = false
         _this.spinning = false
       })

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

@@ -44,16 +44,27 @@
                   <subarea id="customerFeeList-subarea" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-model-item label="区域负责人">
                   <BizUser id="customerFeeList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="customerFeeList-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="是否包含特价">
+                  <v-select
+                    v-model="queryParam.discountFlag"
+                    ref="discountFlag"
+                    id="customerFeeList-discountFlag"
+                    code="FLAG"
+                    placeholder="请选择是否包含特价"
+                  ></v-select>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客服">
                   <customerService ref="customerName" id="customerFeeList-customerName" v-model="queryParam.kfSn"></customerService>
@@ -121,7 +132,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService.vue'
 // 接口
-import { promoSalesExpenseList, promoSalesExpenseTitle, promoSalesExpenseCount, promoSalesExpenseExport } from '@/api/reportData'
+import { promoSalesExpenseList, promoSalesExpenseTitle, promoSalesExpenseExport } from '@/api/reportData'
 export default {
   name: 'CustomerFeeList',
   mixins: [commonMixin],
@@ -152,6 +163,7 @@ export default {
           subareaAreaSn: '', // 分区
           bizUserSn: undefined// 区域负责人
         },
+        discountFlag: '0', // 是否包含特价
         kfSn: undefined// 客服
       },
       columns: [], // 表头
@@ -287,6 +299,7 @@ export default {
       this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.kfSn = undefined
+      this.queryParam.discountFlag = '0'
       this.$refs.dealerSubareaScopeList.resetForm()
       if (this.advanced) {
         this.$refs.subarea && this.$refs.subarea.clearData()

+ 15 - 2
src/views/reportData/promotionFeeReport/promoFeeList.vue

@@ -44,16 +44,27 @@
                   <subarea id="promotionFeeList-subarea" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-model-item label="区域负责人">
                   <BizUser id="promotionFeeList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="promotionFeeList-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="是否包含特价">
+                  <v-select
+                    v-model="queryParam.discountFlag"
+                    ref="discountFlag"
+                    id="customerFeeList-discountFlag"
+                    code="FLAG"
+                    placeholder="请选择是否包含特价"
+                  ></v-select>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <a-button
@@ -146,6 +157,7 @@ export default {
         endDate: moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59', // 月份结束时间
         dealerLevel: undefined, // 客户级别
         dealerSn: undefined, // 客户sn
+        discountFlag: '0', // 是否特价
         dealerEntity: {
           dealerName: undefined, // 客户名称
           provinceSn: undefined, // 省
@@ -305,6 +317,7 @@ export default {
       this.queryParam.districtSn = undefined
       this.queryParam.dealerEntity.dealerName = undefined
       this.queryParam.dealerSn = undefined
+      this.queryParam.discountFlag = '0'
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined

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

@@ -10,8 +10,8 @@
           layout="inline"
           :rules="rules"
           :model="queryParam">
-          <a-row :gutter="15">
-            <a-col :md="5" :sm="24">
+          <a-row :gutter="15" type="flex">
+            <a-col :md="3" :sm="24">
               <a-form-model-item label="月份" prop="beginDate">
                 <a-month-picker
                   id="provinceFeeList-monthBox"
@@ -22,7 +22,7 @@
                   @change="onChangeMonth" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="3" :sm="24">
               <a-form-model-item label="地区">
                 <Area id="provinceFeeList-areaList" v-model="queryParam.provinceSn" placeholder="请选择省份"></Area>
               </a-form-model-item>
@@ -32,12 +32,23 @@
                 <subarea id="provinceFeeList-subarea" ref="subarea" @change="subareaChange"></subarea>
               </a-form-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="3" :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="4" :sm="24">
+            <a-col :md="3" :sm="24">
+              <a-form-model-item label="是否包含特价">
+                <v-select
+                  v-model="queryParam.discountFlag"
+                  ref="discountFlag"
+                  id="customerFeeList-discountFlag"
+                  code="FLAG"
+                  placeholder="请选择是否包含特价"
+                ></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="7" :sm="24">
               <a-button
                 type="primary"
                 @click="handleSearch"
@@ -111,6 +122,7 @@ export default {
         beginDate: moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00', // 月份开始时间
         endDate: moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59', // 月份结束时间
         provinceSn: undefined, // 省
+        discountFlag: '0', // 是否包含特价
         subareaArea: {
           subareaSn: '', // 区域
           subareaAreaSn: '', // 分区
@@ -228,6 +240,7 @@ export default {
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.discountFlag = '0'
       this.totalData = null
       this.$refs.subarea && this.$refs.subarea.clearData()
       this.$refs.areaList && this.$refs.areaList.clearData()

+ 40 - 44
src/views/reportData/regionTypeBusinessReport/list.vue

@@ -91,28 +91,28 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import getDate from '@/libs/getDate'
 // 接口
 import { manageAnalysisReportQuery, manageAnalysisReportExport } from '@/api/reportData'
-const strongRow = []
-const redRow = []
-const renderContent = (value, row, index) => {
-  const ret = value || value == 0 ? value : ''
-  const retVal = ret == 0 ? '0.00' : ret
-  const isStrong = strongRow.indexOf(index) >= 0
-  const isRed = redRow.indexOf(index) >= 0
-  if (isStrong || isRed) {
-    return {
-      children: retVal == '--' ? '' : retVal,
-      attrs: {
-        style: 'font-weight: bold;color:red;font-size:14px;'
-      }
-    }
-  }
-  return retVal == '--' ? '' : retVal
-}
 export default {
   name: 'RegionTypeBusinessReportList',
   mixins: [commonMixin],
   components: { STable, VSelect, Area, dealerSubareaScopeList },
   data () {
+    const strongRow = []
+    const redRow = []
+    const renderContent = (value, row, index) => {
+      const ret = value || value == 0 ? value : ''
+      const retVal = ret == 0 && typeof (ret) === 'string' ? '0.00' : ret
+      const isStrong = strongRow.indexOf(index) >= 0
+      const isRed = redRow.indexOf(index) >= 0
+      if (isStrong || isRed) {
+        return {
+          children: retVal == '--' ? '' : retVal,
+          attrs: {
+            style: 'font-weight: bold;color:red;font-size:14px;'
+          }
+        }
+      }
+      return retVal == '--' ? '' : retVal
+    }
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
@@ -132,6 +132,29 @@ export default {
       rules: {
         'queryDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
       },
+      columns: [
+        { title: '类别',
+          dataIndex: 'category',
+          width: '15%',
+          align: 'center',
+          customRender: (text, row, index) => {
+            const isStrong = row.category.indexOf('合计') >= 0
+            const isRed = row.category == '全品类(含NGK)' || row.category == '箭牌喇叭' || row.category == '轮胎'
+            if (isStrong || isRed) {
+              return <a-button size="small" type="link" class="button-error" style="font-weight:bold;font-size:14px;">{text}</a-button>
+            }
+            return <a-button size="small" type="link" class="button-default">{text}</a-button>
+          }
+        },
+        { title: '成本', dataIndex: 'cost', width: '10%', align: 'center', customRender: renderContent },
+        { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: renderContent },
+        { title: '销售额', dataIndex: 'amount', width: '10%', align: 'center', customRender: renderContent },
+        { title: '毛利', dataIndex: 'gross', width: '10%', align: 'center', customRender: renderContent },
+        { title: '毛利率', dataIndex: 'grossMargin', width: '10%', align: 'center', customRender: renderContent },
+        { title: '促销费用', dataIndex: 'promo', width: '10%', align: 'center', customRender: renderContent },
+        { title: '减促销费用的毛利', dataIndex: 'removePromoGross', width: '10%', align: 'center', customRender: renderContent },
+        { title: '促销费用占比', dataIndex: 'promoRatio', width: '10%', align: 'center', customRender: renderContent }
+      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -183,33 +206,6 @@ export default {
       this.setTableH()
     }
   },
-  computed: {
-    columns () {
-      const arr = [
-        { title: '类别',
-          dataIndex: 'category',
-          width: '15%',
-          align: 'center',
-          customRender: (text, row, index) => {
-            const isStrong = row.category.indexOf('合计') >= 0
-            const isRed = row.category == '全品类(含NGK)' || row.category == '箭牌喇叭' || row.category == '轮胎'
-            if (isStrong || isRed) {
-              return <a-button size="small" type="link" class="button-error" style="font-weight:bold;font-size:14px;">{text}</a-button>
-            }
-            return <a-button size="small" type="link" class="button-default">{text}</a-button>
-          }
-        },
-        { title: '成本', dataIndex: 'cost', width: '10%', align: 'center', customRender: renderContent },
-        { title: '销售额', dataIndex: 'amount', width: '10%', align: 'center', customRender: renderContent },
-        { title: '毛利', dataIndex: 'gross', width: '10%', align: 'center', customRender: renderContent },
-        { title: '毛利率', dataIndex: 'grossMargin', width: '10%', align: 'center', customRender: renderContent },
-        { title: '促销费用', dataIndex: 'promo', width: '10%', align: 'center', customRender: renderContent },
-        { title: '减促销费用的毛利', dataIndex: 'removePromoGross', width: '10%', align: 'center', customRender: renderContent },
-        { title: '促销费用占比', dataIndex: 'promoRatio', width: '10%', align: 'center', customRender: renderContent }
-      ]
-      return arr
-    }
-  },
   methods: {
     // 选择月份  禁用选择当月以后日期
     disabledDate (current) {

+ 240 - 0
src/views/setting/dailyReportSettings/baseModal.vue

@@ -0,0 +1,240 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    :width="560"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="销售退货单号" prop="salesReturnBillNo">
+              <a-input
+                id="base-salesReturnBillNo"
+                :disabled="bizSn"
+                v-model.trim="form.salesReturnBillNo"
+                @change="fetchUser"
+                allowClear
+                placeholder="请输入销售退货单号"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="客户名称" prop="buyerSn">
+              {{ dealerData&&dealerData.buyerName||'--' }}
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="全国销售日报" prop="countrySalesDay">
+              <a-radio-group name="radioGroup" v-model="form.countrySalesDay">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="项目销售日报1" prop="dailyPl">
+              <a-radio-group name="radioGroup1" v-model="form.dailyPl">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="项目销售日报2" prop="dailyPljl">
+              <a-radio-group name="radioGroup2" v-model="form.dailyPljl">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="分区销售日报" prop="areaSalesDay">
+              <a-radio-group name="radioGroup3" v-model="form.areaSalesDay">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import debounce from 'lodash/debounce'
+import warehouse from '@/views/common/chooseWarehouse.js'
+import { bizRemoveConfigCreate, bizRemoveConfigModify, bizRemoveConfigDetail, salesReturnDetailByNo } from '@/api/bizRemove'
+export default {
+  name: 'BaseModal',
+  mixins: [commonMixin],
+  components: { VSelect, warehouse },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '新增配置',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        salesReturnBillNo: '',
+        buyerSn: undefined,
+        configType: 'DAILY_REPORT',
+        bizSn: undefined, // bizsn
+        dailyPl: undefined,
+        countrySalesDay: undefined,
+        dailyPljl: undefined,
+        areaSalesDay: undefined
+      },
+      rules: {
+        salesReturnBillNo: [{ required: true, message: '请输入销售退货单号', trigger: ['change', 'blur'] }],
+        buyerSn: [{ required: true, message: '请选择客户', trigger: ['change', 'blur'] }],
+        dailyPl: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }],
+        countrySalesDay: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }],
+        dailyPljl: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }],
+        areaSalesDay: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }]
+      },
+      fetching: false,
+      dealerData: null,
+      bizSn: undefined
+    }
+  },
+  methods: {
+    fetchUser () {
+      if (!this.form.salesReturnBillNo) return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = null
+      this.fetching = true
+      this.spinning = true
+      salesReturnDetailByNo({ salesReturnBillNo: this.form.salesReturnBillNo }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        if (res.data) {
+          this.dealerData = res.data
+          this.form.buyerSn = res.data.buyerSn
+          this.form.bizSn = res.data.salesReturnBillSn
+        } else {
+          this.dealerData = null
+          this.form.buyerSn = undefined
+          this.form.bizSn = undefined
+        }
+        this.spinning = false
+        this.fetching = false
+      })
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          // 保存
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建销售退货单
+    salesSaveFun () {
+      const _this = this
+      const form = this.form
+      const funs = !this.bizSn ? bizRemoveConfigCreate : bizRemoveConfigModify
+      _this.spinning = true
+      funs(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('ok', res.data)
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.form = {
+        configType: 'DAILY_REPORT',
+        salesReturnBillNo: '',
+        buyerSn: undefined,
+        bizSn: undefined, // bizsn
+        dailyPl: undefined,
+        countrySalesDay: undefined,
+        dailyPljl: undefined,
+        areaSalesDay: undefined
+      }
+      this.bizSn = undefined
+      this.dealerData = null
+      this.$refs.ruleForm.resetFields()
+      this.$emit('cancel')
+    },
+    getDetail () {
+      bizRemoveConfigDetail({ bizSn: this.bizSn, configType: 'DAILY_REPORT' }).then(res => {
+        const { bizSn, bizNo, dealerSn, dealerName, areaSalesDay, countrySalesDay, dailyPl, dailyPljl } = res.data
+        this.dealerData = { buyerName: dealerName }
+        this.form = Object.assign(this.form, {
+          salesReturnBillNo: bizNo,
+          buyerSn: dealerSn,
+          bizSn: bizSn,
+          dailyPl: dailyPl,
+          countrySalesDay: countrySalesDay,
+          dailyPljl: dailyPljl,
+          areaSalesDay: areaSalesDay
+        })
+      })
+    },
+    edit (row) {
+      if (row && row.bizSn) {
+        this.title = '编辑配置'
+        this.bizSn = row.bizSn
+        this.getDetail()
+      } else {
+        this.title = '新增配置'
+        this.bizSn = undefined
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+    }
+  }
+}
+</script>

+ 6 - 2
src/views/setting/dailyReportSettings/index.vue

@@ -17,6 +17,9 @@
         <a-tab-pane key="5" tab="分区月目标" force-render>
           <partitionTargetList pageType="PARTITION_MONTHLY_TARGET"></partitionTargetList>
         </a-tab-pane>
+        <a-tab-pane key="6" tab="销售退货剔除" force-render>
+          <salesReturnRemove></salesReturnRemove>
+        </a-tab-pane>
       </a-tabs>
     </a-card>
   </div>
@@ -27,13 +30,14 @@ import { commonMixin } from '@/utils/mixin'
 import estimatedOrderList from './estimatedOrderList.vue'
 import categoryTargetList from './categoryTargetList.vue'
 import partitionTargetList from './partitionTargetList.vue'
+import salesReturnRemove from './salesReturnRemove.vue'
 export default {
   name: 'DailyReportSettingsIndex',
   mixins: [commonMixin],
-  components: { estimatedOrderList, categoryTargetList, partitionTargetList },
+  components: { estimatedOrderList, categoryTargetList, partitionTargetList, salesReturnRemove },
   data () {
     return {
-      tabVal: '1'// tab值  1区域预估订单 2轮胎月目标 3品类月目标 4品类经理月目标  5分区月目标
+      tabVal: '1'// tab值  1区域预估订单 2轮胎月目标 3品类月目标 4品类经理月目标  5分区月目标 6销售退货剔除
     }
   }
 }

+ 278 - 0
src/views/setting/dailyReportSettings/salesReturnRemove.vue

@@ -0,0 +1,278 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="退货日期">
+                <rangeDate ref="rangeCreateDate" id="salesReturnRemove-createDate" :value="createDate" @change="dateCreateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesReturnRemove-dealerSn" @change="custChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="总部销退单号">
+                <a-input id="salesReturnRemove-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入总部销退单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button id="salesReturnRemove-search" type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button id="salesReturnRemove-reset" style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  id="salesReturnRemove-export">导出</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div class="table-operator" style="flex-grow: 1;display: flex;justify-content: space-between;align-items: center;">
+          <div style="flex-grow: 1;display: flex;align-items: center;">
+            <!-- 操作按钮 -->
+            <div>
+              <a-button type="primary" v-if="$hasPermissions('B_salesReturnNew')" @click="handleEdit">新增</a-button>
+            </div>
+          </div>
+          <div></div>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+75+'px' }"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record, index">
+            <div>
+              <a-button
+                size="small"
+                type="link"
+                class="button-info"
+                v-if="record.show"
+                @click="handleEdit(record)"
+                :id="'salesReturnRemove-edit-btn'+index">编辑</a-button>
+              <a-button
+                size="small"
+                type="link"
+                class="button-error"
+                v-if="record.show"
+                @click="handleDel(record)"
+                :id="'salesReturnRemove-del-btn'+index">删除</a-button>
+            </div>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 选择客户弹框 -->
+      <baseModal :show="openModal" ref="openModal" @ok="handleOk" @cancel="openModal=false"></baseModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import baseModal from './baseModal.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { bizRemoveConfigPageList, bizRemoveConfigDelete, bizRemoveConfigReportExport } from '@/api/bizRemove'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  name: 'SalesReturnRemove',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    baseModal,
+    dealerSubareaScopeList,
+    rangeDate
+  },
+  data () {
+    return {
+      spinning: false,
+      // 高级搜索 展开/关闭
+      advanced: true,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      createDate: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ], //  创建时间
+      openModal: false, // 选择客户弹框是否显示
+      openDepartUserModal: false,
+      // 查询参数
+      queryParam: {
+        configType: 'DAILY_REPORT',
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        dealerSn: undefined, //  客户名称
+        bizNo: undefined //  总部销退单号
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return bizRemoveConfigPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].show = new Date(data.list[i].bizDate).getMonth() == new Date().getMonth()
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false
+    }
+  },
+  computed: {
+    columns () {
+      const a = ['', '剔除']
+      const arr = [
+        { title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总部销退单号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货日期', dataIndex: 'bizDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '全国销售日报', dataIndex: 'countrySalesDay', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '项目销售日报1', dataIndex: 'dailyPl', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '项目销售日报2', dataIndex: 'dailyPljl', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '分区销售日报', dataIndex: 'areaSalesDay', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateCreateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 选择客户
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(bizRemoveConfigReportExport, params, '每日报表销售退货剔除配置-', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 编辑
+    handleEdit (row) {
+      this.openModal = true
+      this.$refs.openModal.edit(row)
+    },
+    handleOk (res) {
+      this.$refs.table.refresh()
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: <div>销退单号:{row.bizNo}<div>确认要删除吗?</div></div>,
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          bizRemoveConfigDelete({ bizSn: row.bizSn, configType: 'DAILY_REPORT' }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 重置查询
+    resetSearchForm () {
+      this.$refs.rangeCreateDate.resetDate(this.createDate)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.dealerSn = undefined
+      this.$refs.dealerSubareaScopeList.resetForm()
+      this.queryParam.bizNo = ''
+
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 300
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 212 - 0
src/views/setting/salesReturnRemove/baseModal.vue

@@ -0,0 +1,212 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    :width="560"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="销售退货单号" prop="salesReturnBillNo">
+              <a-input
+                id="base-salesReturnBillNo"
+                :disabled="bizSn"
+                v-model.trim="form.salesReturnBillNo"
+                @change="fetchUser"
+                allowClear
+                placeholder="请输入销售退货单号"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="客户名称" prop="buyerSn">
+              {{ dealerData&&dealerData.buyerName||'--' }}
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="开单统计(客户)" prop="salesStatsDealer">
+              <a-radio-group name="radioGroup" v-model="form.salesStatsDealer">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="开单统计(省份)" prop="salesStatsProvince">
+              <a-radio-group name="radioGroup1" v-model="form.salesStatsProvince">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import debounce from 'lodash/debounce'
+import warehouse from '@/views/common/chooseWarehouse.js'
+import { bizRemoveConfigCreate, bizRemoveConfigModify, bizRemoveConfigDetail, salesReturnDetailByNo } from '@/api/bizRemove'
+export default {
+  name: 'BaseModal',
+  mixins: [commonMixin],
+  components: { VSelect, warehouse },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '新增配置',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 8 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        salesReturnBillNo: '',
+        buyerSn: undefined,
+        configType: 'BILLING_REPORT',
+        bizSn: undefined, // bizsn
+        salesStatsProvince: undefined,
+        salesStatsDealer: undefined
+      },
+      rules: {
+        salesReturnBillNo: [{ required: true, message: '请输入销售退货单号', trigger: ['change', 'blur'] }],
+        buyerSn: [{ required: true, message: '请选择客户', trigger: ['change', 'blur'] }],
+        salesStatsProvince: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }],
+        salesStatsDealer: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }]
+      },
+      fetching: false,
+      dealerData: null,
+      bizSn: undefined
+    }
+  },
+  methods: {
+    fetchUser () {
+      if (!this.form.salesReturnBillNo) return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = null
+      this.spinning = true
+      this.fetching = true
+      salesReturnDetailByNo({ salesReturnBillNo: this.form.salesReturnBillNo }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        if (res.data) {
+          this.dealerData = res.data
+          this.form.buyerSn = res.data.buyerSn
+          this.form.bizSn = res.data.salesReturnBillSn
+        } else {
+          this.dealerData = null
+          this.form.buyerSn = undefined
+          this.form.bizSn = undefined
+        }
+        this.fetching = false
+        this.spinning = false
+      })
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          // 保存
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建销售退货单
+    salesSaveFun () {
+      const _this = this
+      const form = this.form
+      const funs = !this.bizSn ? bizRemoveConfigCreate : bizRemoveConfigModify
+      _this.spinning = true
+      funs(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('ok', res.data)
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.form = {
+        configType: 'BILLING_REPORT',
+        salesReturnBillNo: '',
+        buyerSn: undefined,
+        bizSn: undefined, // bizsn
+        salesStatsProvince: undefined,
+        salesStatsDealer: undefined
+      }
+      this.bizSn = undefined
+      this.dealerData = null
+      this.$refs.ruleForm.resetFields()
+      this.$emit('cancel')
+    },
+    getDetail () {
+      bizRemoveConfigDetail({ bizSn: this.bizSn, configType: 'BILLING_REPORT' }).then(res => {
+        const { bizSn, bizNo, dealerSn, dealerName, salesStatsDealer, salesStatsProvince } = res.data
+        this.dealerData = { buyerName: dealerName }
+        this.form = Object.assign(this.form, {
+          salesReturnBillNo: bizNo,
+          buyerSn: dealerSn,
+          bizSn: bizSn,
+          salesStatsProvince: salesStatsProvince,
+          salesStatsDealer: salesStatsDealer
+        })
+      })
+    },
+    edit (row) {
+      if (row && row.bizSn) {
+        this.title = '编辑配置'
+        this.bizSn = row.bizSn
+        this.getDetail()
+      } else {
+        this.title = '新增配置'
+        this.bizSn = undefined
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+    }
+  }
+}
+</script>

+ 279 - 0
src/views/setting/salesReturnRemove/list.vue

@@ -0,0 +1,279 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="退货日期">
+                <rangeDate ref="rangeCreateDate" id="salesReturnRemove-createDate" :value="createDate" @change="dateCreateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesReturnRemove-dealerSn" @change="custChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="总部销退单号">
+                <a-input id="salesReturnRemove-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入总部销退单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button id="salesReturnRemove-search" type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button id="salesReturnRemove-reset" style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  class="button-warning"
+                  v-if="$hasPermissions('B_srr_export')"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  id="salesReturnRemove-export">导出</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <!-- 表格 -->
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div class="table-operator" style="flex-grow: 1;display: flex;justify-content: space-between;align-items: center;">
+          <div style="flex-grow: 1;display: flex;align-items: center;">
+            <!-- 操作按钮 -->
+            <div>
+              <a-button type="primary" v-if="$hasPermissions('B_srr_add')" @click="handleEdit">新增</a-button>
+            </div>
+          </div>
+          <div></div>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+75+'px' }"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record, index">
+            <div>
+              <a-button
+                size="small"
+                type="link"
+                class="button-info"
+                v-if="record.show&&$hasPermissions('B_srr_edit')"
+                @click="handleEdit(record)"
+                :id="'salesReturnRemove-edit-btn'+index">编辑</a-button>
+              <a-button
+                size="small"
+                type="link"
+                class="button-error"
+                v-if="record.show&&$hasPermissions('B_srr_del')"
+                @click="handleDel(record)"
+                :id="'salesReturnRemove-del-btn'+index">删除</a-button>
+            </div>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 选择客户弹框 -->
+      <baseModal :show="openModal" ref="openModal" @ok="handleOk" @cancel="openModal=false"></baseModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import baseModal from './baseModal.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { bizRemoveConfigPageList, bizRemoveConfigDelete, bizRemoveConfigReportExport } from '@/api/bizRemove'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  name: 'SalesReturnRemove',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    baseModal,
+    dealerSubareaScopeList,
+    rangeDate
+  },
+  data () {
+    return {
+      spinning: false,
+      // 高级搜索 展开/关闭
+      advanced: true,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      createDate: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ], //  创建时间
+      openModal: false, // 选择客户弹框是否显示
+      openDepartUserModal: false,
+      // 查询参数
+      queryParam: {
+        configType: 'BILLING_REPORT',
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        dealerSn: undefined, //  客户名称
+        bizNo: undefined //  总部销退单号
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return bizRemoveConfigPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].show = new Date(data.list[i].bizDate).getMonth() == new Date().getMonth()
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false
+    }
+  },
+  computed: {
+    columns () {
+      const a = ['', '剔除']
+      const arr = [
+        { title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总部销退单号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货状态', dataIndex: 'billStatusDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货日期', dataIndex: 'bizDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '开单统计(客户)', dataIndex: 'salesStatsDealer', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '开单统计(省份)', dataIndex: 'salesStatsProvince', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateCreateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 选择客户
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(bizRemoveConfigReportExport, params, '开单剔除配置-', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 编辑
+    handleEdit (row) {
+      this.openModal = true
+      this.$refs.openModal.edit(row)
+    },
+    handleOk (res) {
+      this.$refs.table.refresh()
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: <div>销退单号:{row.bizNo}<div>确认要删除吗?</div></div>,
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          bizRemoveConfigDelete({ bizSn: row.bizSn, configType: 'BILLING_REPORT' }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 重置查询
+    resetSearchForm () {
+      this.$refs.rangeCreateDate.resetDate(this.createDate)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.dealerSn = undefined
+      this.$refs.dealerSubareaScopeList.resetForm()
+      this.queryParam.bizNo = ''
+
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 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: {