推广数据
parent
95a45f638e
commit
c6698fc87f
@ -0,0 +1,147 @@
|
|||||||
|
<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="3" 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="4">
|
||||||
|
<Button type="primary" @click="generalizeOfRetail">查询</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: "IncreaseDataCompany",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectedCompany: null,
|
||||||
|
companyList: [],
|
||||||
|
columns1: [
|
||||||
|
{
|
||||||
|
type: 'index',
|
||||||
|
title: '序号',
|
||||||
|
key: 'id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '零售公司名称',
|
||||||
|
key: 'retailCompany'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '总客户数',
|
||||||
|
key: 'allCustomer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '有效客户总数',
|
||||||
|
key: 'effectiveCustomer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '新增客户数',
|
||||||
|
key: 'newCustomer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '新增有效客户数',
|
||||||
|
key: 'newEffectiveCustomer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '日增有效好友平均',
|
||||||
|
key: 'avgNewCustomer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '删除/拉黑成员客户数(累计)',
|
||||||
|
key: 'delCustomer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '拉黑率(累计)',
|
||||||
|
key: 'delRate'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
data1: [],
|
||||||
|
//分页内容
|
||||||
|
totalSize: 0,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
date:null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
this.allCompany();
|
||||||
|
this.generalizeOfRetail();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onChangeDateLister(date) {
|
||||||
|
this.date = date;
|
||||||
|
},
|
||||||
|
allCompany(){
|
||||||
|
let that = this;
|
||||||
|
let request = {
|
||||||
|
userId:JSON.parse(sessionStorage.getItem("loginInfo")).userId
|
||||||
|
};
|
||||||
|
this.companyList = [];
|
||||||
|
IncreaseData.listOfRetailCompany(request,function (data) {
|
||||||
|
data = data.data;
|
||||||
|
if (data.code === '0001') {
|
||||||
|
that.$Message.error("查询零售公司出错!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data.code === '0000') {
|
||||||
|
that.companyList = data.results;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
generalizeOfRetail(){
|
||||||
|
let request = {
|
||||||
|
date:this.date,
|
||||||
|
orgId:this.selectedCompany,
|
||||||
|
pageNum:this.pageNum,
|
||||||
|
pageSize:this.pageSize
|
||||||
|
};
|
||||||
|
let that = this;
|
||||||
|
that.data1 = [];
|
||||||
|
IncreaseData.generalizeOfRetail(request,function (data) {
|
||||||
|
data = data.data;
|
||||||
|
if(data.code === '0001'){
|
||||||
|
that.$Message.info("查询推广数据失败!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(data.code === '0000'){
|
||||||
|
that.data1 = data.results;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.region {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
.row-style {
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,123 +0,0 @@
|
|||||||
<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;">
|
|
||||||
<span class="region">区域选择</span>
|
|
||||||
</i-col>
|
|
||||||
<i-col span="4" style="padding-left: 10px;">
|
|
||||||
<Select v-model="selectedRegion" filterable style="width: 200px;">
|
|
||||||
<Option v-for="item in regionList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
||||||
</Select>
|
|
||||||
</i-col>
|
|
||||||
<i-col span="1" style="text-align: right;">
|
|
||||||
<p class="region">时间</p>
|
|
||||||
</i-col>
|
|
||||||
<i-col span="4" style="padding-left: 10px;">
|
|
||||||
<DatePicker type="daterange" placement="bottom-end" placeholder="请选择日期" style="width: 200px"
|
|
||||||
@on-change="onChangeDateLister"></DatePicker>
|
|
||||||
</i-col>
|
|
||||||
<i-col span="4">
|
|
||||||
<Button type="primary">查询</Button>
|
|
||||||
</i-col>
|
|
||||||
<i-col span="10" style="text-align: right;padding-right: 20px;">
|
|
||||||
<Button type="primary">导出数据</Button>
|
|
||||||
|
|
||||||
</i-col>
|
|
||||||
</Row>
|
|
||||||
</i-col>
|
|
||||||
</Row>
|
|
||||||
|
|
||||||
<Table :columns="columns1" :data="data1" style="margin-top: 20px;"></Table>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "IncreaseDataRegion",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
selectedRegion: null,
|
|
||||||
regionList: [],
|
|
||||||
columns1: [
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
key: 'id'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '区域名称',
|
|
||||||
key: 'regionName'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '总客户数',
|
|
||||||
key: 'customerNum'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '新增客户数',
|
|
||||||
key: 'addNum'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '日增好友平均',
|
|
||||||
key: 'avg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '删除/拉黑成员客户数(累计)',
|
|
||||||
key: 'rate'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
data1: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
regionName: '区域1',
|
|
||||||
customerNum: 18,
|
|
||||||
addNum: 99,
|
|
||||||
avg: 80,
|
|
||||||
rate: '2%'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
regionName: '区域2',
|
|
||||||
customerNum: 18,
|
|
||||||
addNum: 99,
|
|
||||||
avg: 80,
|
|
||||||
rate: '2%'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
regionName: '区域3',
|
|
||||||
customerNum: 18,
|
|
||||||
addNum: 99,
|
|
||||||
avg: 80,
|
|
||||||
rate: '2%'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
regionName: '区域4',
|
|
||||||
customerNum: 18,
|
|
||||||
addNum: 99,
|
|
||||||
avg: 80,
|
|
||||||
rate: '2%'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onChangeDateLister: function () {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.region {
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
.row-style {
|
|
||||||
padding-top: 20px;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
/**
|
||||||
|
* home请求数据
|
||||||
|
* @author wangyinjia
|
||||||
|
* @date 2020/2/24
|
||||||
|
*/
|
||||||
|
|
||||||
|
import http from '../CommonHttp'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有的零售公司信息
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function listOfRetailCompany(params, call) {
|
||||||
|
return http.get('/retail/company', params).then(call)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询零售公司下的店铺
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function listOfStoreByCompany(params, call) {
|
||||||
|
return http.get('/retail/store/company', params).then(call)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询店铺下的导购
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function listOfSellerByStore(params, call) {
|
||||||
|
return http.get('/retail/seller/store', params).then(call)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 零售公司的推广数据
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function generalizeOfRetail(params, call) {
|
||||||
|
return http.get('/retail/retail', params).then(call)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店的推广数据
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function generalizeOfStore(params, call) {
|
||||||
|
return http.get('/retail/store', params).then(call)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导购的推广数据
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function generalizeOfSeller(params, call) {
|
||||||
|
return http.get('/retail/seller', params).then(call)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店信息
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function storeInit(params, call) {
|
||||||
|
return http.get('/poi/store/user/shop', params).then(call)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导购信息
|
||||||
|
* @param params
|
||||||
|
* @param call
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
export function sellerInit(params, call) {
|
||||||
|
return http.get('/poi/seller/user/seller', params).then(call)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
listOfRetailCompany,
|
||||||
|
listOfStoreByCompany,
|
||||||
|
listOfSellerByStore,
|
||||||
|
generalizeOfRetail,
|
||||||
|
generalizeOfStore,
|
||||||
|
generalizeOfSeller,
|
||||||
|
storeInit,
|
||||||
|
sellerInit
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue