|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<Row style="margin-top: 20px;width: 100%;background-color: #F7F8FA;">
|
|
|
|
<i-col span="24" style="text-align: left;padding-left: 10px;">
|
|
|
|
<Row class="row-style">
|
|
|
|
<i-col span="1" style="text-align: right;">
|
|
|
|
<p class="region">选择日期</p>
|
|
|
|
</i-col>
|
|
|
|
<i-col span="4" style="padding-left: 10px;">
|
|
|
|
<DatePicker type="date" placement="bottom-end" placeholder="请选择日期" style="width: 200px"
|
|
|
|
@on-change="onChangeDateLister"></DatePicker>
|
|
|
|
</i-col>
|
|
|
|
<i-col span="2" style="text-align: right;">
|
|
|
|
<span class="region">零售公司选择</span>
|
|
|
|
</i-col>
|
|
|
|
<i-col span="4" style="padding-left: 10px;">
|
|
|
|
<Select v-model="selectedCompany" filterable style="width: 200px;">
|
|
|
|
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
|
</Select>
|
|
|
|
</i-col>
|
|
|
|
<i-col span="1" style="text-align: right;">
|
|
|
|
<span class="region">店铺选择</span>
|
|
|
|
</i-col>
|
|
|
|
<i-col span="4" style="padding-left: 10px;">
|
|
|
|
<Select v-model="selectedStore" filterable style="width: 200px;">
|
|
|
|
<Option v-for="item in storeList" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
|
</Select>
|
|
|
|
</i-col>
|
|
|
|
|
|
|
|
<i-col span="4">
|
|
|
|
<Button type="primary">查询</Button>
|
|
|
|
</i-col>
|
|
|
|
</Row>
|
|
|
|
</i-col>
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
<Table :columns="columns1" :data="data1" style="margin-top: 20px;"></Table>
|
|
|
|
<Page :total="totalSize" :current="pageNum" :page-size="pageSize" show-elevator show-total
|
|
|
|
placement="top" style="float: right;margin-top: 20px"></Page>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import IncreaseData from "../../services/generalize/IncreaseData";
|
|
|
|
export default {
|
|
|
|
name: "IncreaseDataStore",
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
selectedCompany: null,
|
|
|
|
companyList: [],
|
|
|
|
selectedStore: null,
|
|
|
|
storeList: [],
|
|
|
|
columns1: [
|
|
|
|
{
|
|
|
|
title: '序号',
|
|
|
|
key: 'id',
|
|
|
|
type: 'index'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '零售公司名称',
|
|
|
|
key: 'retailName'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '所属区域',
|
|
|
|
key: 'region'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '总客户数',
|
|
|
|
key: 'customerNum'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '有效客户总数',
|
|
|
|
key: 'effectiveNum'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '新增客户数',
|
|
|
|
key: 'addNum'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '新增有效客户数',
|
|
|
|
key: 'addEffectiveNum'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '日增有效好友平均',
|
|
|
|
key: 'avg'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '删除/拉黑成员客户数(累计)',
|
|
|
|
key: 'delNum'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '拉黑率(累计)',
|
|
|
|
key: 'delRate'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
data1: [
|
|
|
|
{
|
|
|
|
retailName: '零售公司',
|
|
|
|
region: '区域',
|
|
|
|
customerNum: 18,
|
|
|
|
effectiveNum: 18,
|
|
|
|
addNum: 99,
|
|
|
|
addEffectiveNum: 99,
|
|
|
|
avg: 80,
|
|
|
|
delNum: 80,
|
|
|
|
delRate: '2%'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
retailName: '零售公司',
|
|
|
|
region: '区域',
|
|
|
|
customerNum: 18,
|
|
|
|
effectiveNum: 18,
|
|
|
|
addNum: 99,
|
|
|
|
addEffectiveNum: 99,
|
|
|
|
avg: 80,
|
|
|
|
delNum: 80,
|
|
|
|
delRate: '2%'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
retailName: '零售公司',
|
|
|
|
region: '区域',
|
|
|
|
customerNum: 18,
|
|
|
|
effectiveNum: 18,
|
|
|
|
addNum: 99,
|
|
|
|
addEffectiveNum: 99,
|
|
|
|
avg: 80,
|
|
|
|
delNum: 80,
|
|
|
|
delRate: '2%'
|
|
|
|
},
|
|
|
|
],
|
|
|
|
//分页内容
|
|
|
|
totalSize: 0,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 20,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted: function () {
|
|
|
|
this.allCompany();
|
|
|
|
this.storeInit();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onChangeDateLister: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
allCompany(){
|
|
|
|
let that = this;
|
|
|
|
let request = {
|
|
|
|
userId:JSON.parse(sessionStorage.getItem("loginInfo")).userId
|
|
|
|
};
|
|
|
|
this.regionList = [];
|
|
|
|
IncreaseData.listOfRetailCompany(request,function (data) {
|
|
|
|
data = data.data;
|
|
|
|
if (data.code === '0001') {
|
|
|
|
that.$Message.error("查询零售公司出错!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (data.code === '0000') {
|
|
|
|
that.regionList = data.results;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
storeInit(){
|
|
|
|
let that = this;
|
|
|
|
let request = {};
|
|
|
|
this.storeList = [];
|
|
|
|
IncreaseData.storeInit(request,function (data) {
|
|
|
|
data = data.data;
|
|
|
|
if (data.code === '0001') {
|
|
|
|
that.$Message.error("查询零售公司的店铺出错!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (data.code === '0000') {
|
|
|
|
that.storeList = data.results;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
storeOfCompany(){
|
|
|
|
let that = this;
|
|
|
|
let request = {};
|
|
|
|
this.selectedStore = [];
|
|
|
|
IncreaseData.listOfStoreByCompany(request,function (data) {
|
|
|
|
data = data.data;
|
|
|
|
if (data.code === '0001') {
|
|
|
|
that.$Message.error("查询零售公司的店铺出错!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (data.code === '0000') {
|
|
|
|
that.selectedStore = data.results;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.region {
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 32px;
|
|
|
|
}
|
|
|
|
.row-style {
|
|
|
|
padding-top: 20px;
|
|
|
|
padding-bottom: 20px;
|
|
|
|
}
|
|
|
|
</style>
|