|
|
|
@ -6,11 +6,11 @@
|
|
|
|
|
<!--筛选-->
|
|
|
|
|
<row style="height: 90px;background: #f7f8fa;border: 1px solid #E8ECF2;line-height: 90px">
|
|
|
|
|
<span style="margin-left: 48px">区域选择</span>
|
|
|
|
|
<Select filterable placeholder="请选择区域" v-model="regionId" class="left-15" style="width:190px" size="small">
|
|
|
|
|
<Select filterable placeholder="请选择区域" v-model="regionId" class="left-15" style="width:190px" size="small" @on-change="downRegionChange">
|
|
|
|
|
<Option v-for="item in regionList" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
<span class="left-15">店铺选择</span>
|
|
|
|
|
<Select filterable placeholder="请选择店铺" v-model="shopId" class="left-15" style="width:190px" size="small">
|
|
|
|
|
<Select filterable placeholder="请选择店铺" v-model="shopId" class="left-15" style="width:190px" size="small" @on-change="downShopChange">
|
|
|
|
|
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
<span class="left-15">导购选择</span>
|
|
|
|
@ -95,16 +95,18 @@
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
import customerView from "../services/datacenter/customerView";
|
|
|
|
|
import customerDetail from "../services/datacenter/DataCenter";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
userId: 13,
|
|
|
|
|
//加载遮罩
|
|
|
|
|
spinShow: false,
|
|
|
|
|
regionId: null,
|
|
|
|
|
regionId: 0,
|
|
|
|
|
regionList: [{"id":1,"name":"一区"},{"id":2,"name":"二大区"}],
|
|
|
|
|
shopId: null,
|
|
|
|
|
shopId: 0,
|
|
|
|
|
shopList: [{"id":1,"name":"一区"},{"id":2,"name":"二大区"}],
|
|
|
|
|
sellerId: null,
|
|
|
|
|
sellerId: 0,
|
|
|
|
|
sellerList: [{"id":1,"name":"一区"},{"id":2,"name":"二大区"}],
|
|
|
|
|
//人数占比
|
|
|
|
|
allVipPercent: "width:66.66%",
|
|
|
|
@ -138,6 +140,9 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted: function () {
|
|
|
|
|
this.downSellerData();
|
|
|
|
|
this.downShopData();
|
|
|
|
|
this.downRegionData();
|
|
|
|
|
this.getMainList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -171,19 +176,85 @@
|
|
|
|
|
this.allCustomerPercent = "width:" + (p1 + p2) + "%";
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//0转null
|
|
|
|
|
checkZero: function (value) {
|
|
|
|
|
if(value === 0){return null;}
|
|
|
|
|
return value;
|
|
|
|
|
},
|
|
|
|
|
//导购list
|
|
|
|
|
downSellerData: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.sellerList = [{"id":0,"name":"全部"}];
|
|
|
|
|
let request = {userId: this.userId, regionId: that.checkZero(that.regionId), shopId:that.checkZero( that.shopId)};
|
|
|
|
|
customerDetail.downSellerData(request, function (data) {
|
|
|
|
|
data = data.data.results;
|
|
|
|
|
if(data){
|
|
|
|
|
for(let i=0;i<data.length;i++){
|
|
|
|
|
let entity = data[i];
|
|
|
|
|
if(entity){
|
|
|
|
|
that.sellerList.push(entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//店铺list
|
|
|
|
|
downShopData: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.shopList = [{"id":0,"name":"全部"}];
|
|
|
|
|
let request =
|
|
|
|
|
{userId: this.userId,regionId: that.checkZero(that.regionId)};
|
|
|
|
|
customerDetail.downShopData(request, function (data) {
|
|
|
|
|
data = data.data.results;
|
|
|
|
|
if(data){
|
|
|
|
|
for(let i=0;i<data.length;i++){
|
|
|
|
|
let entity = data[i];
|
|
|
|
|
if(entity){
|
|
|
|
|
that.shopList.push(entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//区域list
|
|
|
|
|
downRegionData: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.regionList = [{"id":0,"name":"全部"}];
|
|
|
|
|
let request =
|
|
|
|
|
{userId: this.userId};
|
|
|
|
|
customerDetail.downRegionData(request, function (data) {
|
|
|
|
|
data = data.data.results;
|
|
|
|
|
if(data){
|
|
|
|
|
for(let i=0;i<data.length;i++){
|
|
|
|
|
let entity = data[i];
|
|
|
|
|
if(entity){
|
|
|
|
|
that.regionList.push(entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//店铺选择
|
|
|
|
|
downShopChange: function () {
|
|
|
|
|
this.downSellerData();
|
|
|
|
|
},
|
|
|
|
|
//区域选择
|
|
|
|
|
downRegionChange: function () {
|
|
|
|
|
this.downShopData();
|
|
|
|
|
},
|
|
|
|
|
//搜索
|
|
|
|
|
searchCustomerDataBtnClick: function () {
|
|
|
|
|
this.getMainList();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**mainList*/
|
|
|
|
|
getMainList: function(){
|
|
|
|
|
let request = {
|
|
|
|
|
userId: 0,
|
|
|
|
|
userId: this.userId,
|
|
|
|
|
sevenDayStartTime: this.$moment(new Date()).add(-6,"days").format("YYYY-MM-DD 00:00:00"),
|
|
|
|
|
sevenDayEndTime: this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
|
|
regionId: this.regionId,
|
|
|
|
|
shopId: this.shopId,
|
|
|
|
|
regionId: this.checkZero(this.regionId),
|
|
|
|
|
shopId: this.checkZero(this.shopId),
|
|
|
|
|
sellerId: this.checkZero(this.sellerId),
|
|
|
|
|
};
|
|
|
|
|
let that = this;
|
|
|
|
|
//加载遮罩
|
|
|
|
|