| 
					
				 | 
			
			
				@@ -35,45 +35,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <a-form-model-item label="产品分类"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <a-cascader 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  @change="changeProductType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  change-on-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  v-model="productType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  expand-trigger="hover" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  :options="productTypeList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  id="customerReportList-productType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  placeholder="请选择产品分类" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  allowClear /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <ProductType placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <template v-if="advanced"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <a-col :md="10" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <a-col span="7"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      <a-form-model-item prop="provinceSn" style="margin: 0!important;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        </a-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <a-col span="7" offset="1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      <a-form-model-item prop="citySn" style="margin: 0!important;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        </a-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <a-col span="7" offset="1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      <a-form-model-item prop="countySn" style="margin: 0!important;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        <a-select v-model="queryParam.countySn" allowClear placeholder="请选择区/县"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        </a-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <a-form-item label="客户所在区"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <a-col :md="4" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <a-form-item label="客户类型"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -107,7 +76,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         class="sTable" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ref="table" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        :rowKey="(record) => record.salesTargetSn" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        :rowKey="(record) => record.no" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        rowKeyName="no" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         :columns="columns" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         :data="loadData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         :defaultLoadData="false" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -121,12 +91,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { commonMixin } from '@/utils/mixin' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { STable, VSelect } from '@/components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import rangeDate from '@/views/common/rangeDate.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { getArea } from '@/api/data' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import AreaList from '@/views/common/areaList.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import custType from '@/views/common/custType.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { dealerProductTypeList } from '@/api/dealerProductType' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import ProductType from '../../common/productType.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { reportBigCustomerLinkageList, reportBigCustomerLinkageCount, linkageGroupList } from '@/api/reportData' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  components: { STable, VSelect, rangeDate, custType }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  components: { STable, VSelect, rangeDate, custType, AreaList, ProductType }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mixins: [commonMixin], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -206,9 +176,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     columns () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const arr = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '连锁门店', dataIndex: 'dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '客户名称', dataIndex: 'salesTargetName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, sorter: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '客户名称', dataIndex: 'salesTargetName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, sorter: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '客户类型', dataIndex: 'customerTypeName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '交易金额', dataIndex: 'discountedAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') }, sorter: true } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ] 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -220,6 +190,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    areaChange (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.provinceSn = val[0] ? val[0] : undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.citySn = val[1] ? val[1] : undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.countySn = val[2] ? val[2] : undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 合计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getCount (params) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       reportBigCustomerLinkageCount(params).then(res => { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -262,6 +237,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.countySn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.customerTypeSn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.productType = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(this.advanced){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$refs.areaList.clearData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.ruleForm.resetFields() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.totalData = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.table.clearTable() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -277,62 +255,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.productTypeSn2 = val[1] ? val[1] : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.productTypeSn3 = val[2] ? val[2] : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //  产品分类  列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getProductType () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      dealerProductTypeList({}).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.productTypeList = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.productTypeList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 获取城市列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getCityList (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.addrCityList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.addrDistrictList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.queryParam.citySn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.queryParam.countySn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.getArea('city', val) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 获取区县列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getAreaList (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.addrDistrictList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.queryParam.countySn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.getArea('district', val) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //  省/市/区 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getArea (leve, sn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      let params 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (leve == 'province') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        params = { type: '2' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      getArea(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (leve == 'province') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.addrProvinceList = res.data || [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (leve == 'city') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.addrCityList = res.data || [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (leve == 'district') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.addrDistrictList = res.data || [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (leve == 'province') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.addrProvinceList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (leve == 'city') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.addrCityList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (leve == 'district') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.addrDistrictList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 连锁店 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getLinkageGroup () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       linkageGroupList({}).then(res => { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -345,8 +267,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     pageInit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.getLinkageGroup() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.getArea('province') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.getProductType() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mounted () { 
			 |