This commit is contained in:
cclu 2023-04-14 18:41:05 +08:00
parent 99ce5e8233
commit 09817ee2a0
26 changed files with 1008 additions and 256 deletions

View File

@ -5,14 +5,35 @@
<div class="charts">
<div class="chartsItem">
<p class="title">交易分析</p>
<div style="display: flex;justify-content: space-between;align-items: center">
<p class="title">{{month}}月交易分析</p>
<div class="time">
<div class="select">
<picker mode="date" fields="month" :value="single" :end="endData" @change="bindDateChange" >
<view class="time">
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
<image class="icon" src="/static/images/index/arrow_bottom.svg"></image>
</view>
</picker>
</div>
</div>
</div>
<div v-if="transactionList">
<transaction-analysis :data="transactionList" />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">消费时段分析</p>
<p class="title">{{month}}月消费转化对比图</p>
<div v-if="compareList.series[0].data.length>0">
<consumption-compare :data="compareList"/>
<analyse :analyseInfo="{analysisins_type: 1406,analysisins_format: 2000}" />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{month}}月消费时段分析</p>
<div v-if="timePeriodList.series.length>0">
<time-period-analysis :data="timePeriodList"/>
<analyse :analyseInfo="{analysisins_type: 1403,analysisins_format: 2000}" />
@ -20,7 +41,7 @@
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">消费水平<text class="unit">(Top 5)</text></p>
<p class="title">{{month}}消费水平<text class="unit"></text></p>
<div v-if="levelTopList.series.length>0">
<level-top :data="levelTopList"></level-top>
<analyse :analyseInfo="{analysisins_type: 1404,analysisins_format: 2000}" />
@ -28,7 +49,15 @@
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">业态交易值占比</p>
<p class="title">{{month}}月品牌消费水平<text class="unit"></text></p>
<div v-if="bandLevelList.length>0">
<band-level :data="bandLevelList"/>
<analyse :analyseInfo="{analysisins_type: 1503,analysisins_format: 2000}" />
</div>
<no-data v-else/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{month}}月业态交易值占比</p>
<div v-if="businessTypeList.series[0].data.length>0">
<business-format :data="businessTypeList"/>
<analyse :analyseInfo="{analysisins_type: 1405,analysisins_format: 2000}" />
@ -36,15 +65,7 @@
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">消费转化对比图</p>
<div v-if="compareList.series[0].data.length>0">
<consumption-compare :data="compareList"/>
<analyse :analyseInfo="{analysisins_type: 1406,analysisins_format: 2000}" />
</div>
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">商超畅销品</p>
<p class="title">{{month}}月商超畅销品</p>
<bestseller-shop :data="bestsellerList"/>
<analyse :analyseInfo="{analysisins_type: 1407,analysisins_format: 2000}" />
</div>
@ -63,10 +84,12 @@ import BusinessFormat from "./components/bussiness/businessFormat.vue";
import ConsumptionCompare from "./components/bussiness/consumptionCompare.vue";
import BestsellerShop from "./components/bussiness/bestsellerShop.vue";
import NoData from "./components/noData.vue";
import BandLevel from "./components/format/bandLevel.vue";
export default {
name: "businessPortrait",
components: {
BandLevel,
NoData,
BestsellerShop,
ConsumptionCompare,
@ -84,14 +107,17 @@ export default {
transactionList:[],//
timePeriodList:[],//
levelTopList:[],//
bandLevelList:[],//
businessTypeList:[],//
compareList:[],//
bestsellerList:[],//
serviceInfo:{} ,//
backType:'',//
analyseInfo:{
analysisins_type: 1401
},
analyseInfo:{},
analysisins_type: 1401,
single:'',//
endData:'', //
month:'',//
}
},
onLoad(option) {
@ -100,12 +126,19 @@ export default {
this.serviceInfo = serviceInfo
//
this.time = option.time
this.endData = new Date()
},
onShow(){
let storeTime = uni.getStorageSync('lastDay')
if (storeTime){
this.time = storeTime
}
this.single = this.$util.getThisMonthHave(this.time)
const date = new Date(this.time)
let month = date.getMonth() + 1
this.month = month<10?'0' + month:month
console.log('this.time',this.time)
let storeServiceInfo = uni.getStorageSync('currentService')
if (storeServiceInfo){
this.serviceInfo = storeServiceInfo
@ -125,7 +158,9 @@ export default {
this.getTimePeriodList()
//
this.getLevelTopList()
//
//
this.getBandLevelList()
//
this.getBusinessTypeList()
//
this.getCompareList()
@ -133,6 +168,36 @@ export default {
this.getBestsellerList()
},
methods:{
onRefresh(){
//
this.getTransactionList()
//
this.getTimePeriodList()
//
this.getLevelTopList()
//
this.getBandLevelList()
//
this.getBusinessTypeList()
//
this.getCompareList()
//
this.getBestsellerList()
this.$forceUpdate()
},
bindDateChange(e){
const date = new Date(e.detail.value)
let m = date.getMonth() + 1
if (m<10){
m = '0' + m
}
this.month = m
this.single = e.detail.value
let d = this.$util.getThisMonthDay(e.detail.value)
this.endTime = e.detail.value + '-' + d
this.time = e.detail.value
this.onRefresh()
},
async nearestService(){
let seat = uni.getStorageSync('seatInfo');
let req = {
@ -171,23 +236,28 @@ export default {
Serverpart_ID:this.serviceInfo.Serverpart_ID
}
let totalData = await request.$webGet('CommercialApi/Revenue/GetTransactionTimeAnalysis',req)
console.log('totalData123213',totalData)
let res = {
series: [
{
name: "",
data: totalData.Result_Data.data
}
]
categories: ["0:00","2:00","4:00","6:00","8:00","10:00","12:00","14:00","16:00","18:00","20:00","22:00","23:00"],
series:[{}]
}
// let res={
// let res = {
// categories: ["2018","2019","2020","2021","2022","2023"],
// series: [
// {
// name: "",
// data: [[2,35,17],[6,18,9],[10,5,5],[14,8,8],[18,9,9],[22,18,9]]
// name: "A",
// data: [35,8,25,37,4,20]
// },
// {
// name: "B",
// data: [70,40,65,100,44,68]
// },
// {
// name: "C",
// data: [100,80,95,150,112,132]
// }
// ]
// }
// };
this.timePeriodList = res
},
async getLevelTopList(){
@ -195,7 +265,7 @@ export default {
ProvinceCode:'340000',
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ShowWholeTrade:true
ShowWholeTrade:false
}
let res = {
categories:[],
@ -229,6 +299,36 @@ export default {
console.log('res',res)
this.levelTopList = res
},
async getBandLevelList(){
let req = {
ProvinceCode:'340000',
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ShowWholeBrand:false
}
let res =[]
let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessBrandLevel',req)
console.log('品牌消费水平',totalData)
totalData.Result_Data.legend.forEach(item=>{
res.push({name:item,small:0,normal:0,big:0})
})
res.forEach((item,index)=>{
totalData.Result_Data.ColumnList.forEach((subItem,subIndex)=>{
if (subItem.name==='低消费'){
item.small = subItem.data[index]
}else if(subItem.name==='普通消费'){
item.normal = subItem.data[index]
}else if(subItem.name==='高消费'){
item.big = subItem.data[index]
}
})
})
// let res=[{name:'',big:'14.8',normal:'41.7',small:'43.5'},
// {name:'驿',big:'44.1',normal:'31.7',small:'24.2'},
// {name:'',big:'15.2',normal:'70.1',small:'14.5'},
// {name:'',big:'25.2',normal:'39.9',small:'34.7'}]
this.bandLevelList = res
},
async getBusinessTypeList(){
const req = {
ProvinceCode:'340000',
@ -244,7 +344,9 @@ export default {
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value),number:Number(item.data)})
all+=Number(item.value)
}else if(index===11){
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2)),number:Number(item.data)})
if (all<100){
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2)),number:Number(item.data)})
}
}
})
let result= {
@ -333,35 +435,75 @@ export default {
// }
this.compareList = res
},
getBestsellerList(){
async getBestsellerList(){
let req = {
statisticsDate:this.time,
provinceCode:'340000',
Serverpart_ID:this.serviceInfo.Serverpart_ID,
SPRegionType_ID:this.serviceInfo.SPRegionType_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetSalableCommodity',req)
console.log('data222222222222',data)
let dataFirst = [{"name":"热销商品","value":data.Result_Data.SalableCommodity },
{"name":"","value":100 - data.Result_Data.SalableCommodity}]
let listFirst = []
let dataSecond = [{"name":"滞销商品","value":data.Result_Data.UnSalableCommodity},
{"name":"","value":100 - data.Result_Data.UnSalableCommodity}]
let listSecond = []
data.Result_Data.SalableCommodityList.forEach(item=>{
listFirst.push({name:item.Commodity_name ,value:item.Proportion })
})
data.Result_Data.UnSalableCommodityList .forEach(item=>{
listSecond.push({name:item.Commodity_name ,value:item.Proportion })
})
let res = [
{
series: [
series:[
{
data: [{"name":"热销商品","value":39.8},
{"name":"","value":60.2}],
list:[{name:'红牛',value:29.3},
{name:'农夫山泉',value:25.6},
{name:'康师傅红烧牛肉面桶装牛肉面桶装',value:16.5},
{name:'方便面',value:15.2},
{name:'其他',value:13.4}]
data:dataFirst,
list:listFirst
}
]
},
{
series: [
series:[
{
data: [{"name":"滞销商品","value":21.6},
{"name":"","value":78.4}],
list:[{name:'水杯',value:29.3},
{name:'吸油纸',value:25.6},
{name:'康师傅红烧牛肉面桶装牛肉面桶装',value:16.5},
{name:'纸巾',value:15.2},
{name:'其他',value:13.4}]
data:dataSecond,
list:listSecond
}
]
}
]
// let res = [
// {
// series: [
// {
// data: [{"name":"","value":39.8},
// {"name":"","value":60.2}],
// list:[{name:'',value:29.3},
// {name:'',value:25.6},
// {name:'',value:16.5},
// {name:'便',value:15.2},
// {name:'',value:13.4}]
// }
// ]
// },
// {
// series: [
// {
// data: [{"name":"","value":21.6},
// {"name":"","value":78.4}],
// list:[{name:'',value:29.3},
// {name:'',value:25.6},
// {name:'',value:16.5},
// {name:'',value:15.2},
// {name:'',value:13.4}]
// }
// ]
// }
// ]
this.bestsellerList = res
}
}
@ -393,6 +535,43 @@ export default {
margin-left: 4px;
}
}
.time{
margin-bottom: 4px;
.thisTime{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 500;
color: #160002;
}
.select{
margin-left: 8px;
display: inline-block;
.time {
display: flex;
align-items: center;
margin-right: 4px;
.day {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #782717;
line-height: 44rpx;
margin-right: 4px;
}
.uni-input {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ae664e;
line-height: 36rpx;
}
.icon {
width: 24px;
height: 16px;
}
}
}
}
}
}
}

View File

@ -58,7 +58,7 @@
<p class="title">月度车流累计</p>
<div>
<month-total :data="monthTotalList"/>
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
<analyse :analyseInfo="{analysisins_type: 1107,analysisins_format: 2000}" />
</div>
</div>
@ -108,7 +108,7 @@
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车型占比</p>
<div class="box" v-if="allEntry">
<text class="value">{{allEntry?allEntry:'-'}}%</text>
<view class="right">
<view class="right" v-if="addAllEntry">
<text class="compare">(较上月)</text>
<image class="arrowTop" :src="Number(addAllEntry)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text class="text">{{addAllEntry?Math.abs(addAllEntry) + '%':'-' + '%'}}</text>
@ -327,7 +327,7 @@ export default {
this.labelList = list
//
const total = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',reqText)
this.analyseText = total.Result_Data.List[0].ANALYSIS_CONTENT
this.analyseText = total.Result_Data.List[0]?total.Result_Data.List[0].ANALYSIS_CONTENT:''
},
//
async nearestService(){
@ -400,7 +400,11 @@ export default {
if (monetCountMax<item.RevenueAmount){
monetCountMax = item.RevenueAmount
}
carCount.push(Number((item.Vehicle_Count / 10000)))
if (item.Vehicle_Count === 0){
carCount.push(0)
}else{
carCount.push(Number((item.Vehicle_Count / 10000)))
}
moneyCount.push(Number((item.RevenueAmount / 10000)))
// showTip
info.push({

View File

@ -49,7 +49,7 @@ export default {
PageSize:10
}
const data = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',req)
this.analyseText = data.Result_Data.List[0].ANALYSIS_CONTENT
this.analyseText = data.Result_Data.List[0]?data.Result_Data.List[0].ANALYSIS_CONTENT:''
console.log('getLabelDetail',data)
},
}

View File

@ -36,7 +36,7 @@ export default {
formatter: (item, category, index, opts) => {
console.log('opts',opts)
console.log('index',index)
return item.name + ',客单数量 ' + opts.series[index].number + '笔'
return item.name + ',客单数量 ' + opts.series[index].number + '笔,' + '客单均价 '
}
});
uChartsInstance[e.target.id].touchLegend(e);

View File

@ -1,6 +1,6 @@
<template>
<div class="consumptionCompare">
<canvas class="consumption" canvas-id="consumption" id="consumption" @tap="tap"/>
<canvas class="consumption" canvas-id="consumption" id="consumption" @tap="tap" />
<!-- <image v-if="consumptionPath" :src="consumptionPath" class="consumption"></image>-->
</div>
</template>
@ -35,7 +35,7 @@ export default {
uChartsInstance[e.target.id].showToolTip(e, {
formatter: (item, category, index, opts) => {
console.log('item',item)
if (item.name === 'name'){
if (item.name === '客单数'){
return item.name + ':'+ item.data + '笔'
}else{
return item.name + ':'+ item.data + '辆'

View File

@ -1,7 +1,7 @@
<template>
<div class="levelTop">
<canvas v-if="!levelTopPath" class="level" canvas-id="levelTop" id="levelTop"/>
<image v-if="levelTopPath" class="level" :src="levelTopPath"></image>
<canvas class="level" canvas-id="levelTop" id="levelTop" @tap="tap"/>
<!-- <image v-if="levelTopPath" class="level" :src="levelTopPath"></image>-->
</div>
</template>
@ -31,6 +31,14 @@ export default {
}
},
methods: {
tap(e){
uChartsInstance[e.target.id].showToolTip(e,{
formatter: (item, category, index, opts) =>{
return item.name + ' '+ item.data + '%';
}
});
uChartsInstance[e.target.id].touchLegend(e);
},
//
handleCarData(value) {
let res = value
@ -93,7 +101,7 @@ export default {
}
});
setTimeout( ()=>{
this.canvasToTempImage('levelTop')
// this.canvasToTempImage('levelTop')
},2000)
},
canvasToTempImage(id){

View File

@ -43,7 +43,7 @@ export default {
let phoneInfo = uni.getStorageSync('phoneInfo')
this.width = phoneInfo.screenWidth - 32
uChartsInstance[id] = new uCharts({
type: "bubble",
type: "area",
context: ctx,
width: _this.width,
height: 200,
@ -85,9 +85,13 @@ export default {
float: 'center',
},
extra: {
bubble: {
border: 1,
opacity: 0.25
area: {
type: "curve",
opacity: 0.2,
addLine: true,
width: 2,
gradient: true,
activeType: "hollow"
}
}
});

View File

@ -7,7 +7,7 @@
</div>
<div class="bottom">
<div class="item">
<p class="price">{{ info.AvgTicketPrice?info.AvgTicketPrice:'-' }}</p>
<p class="price">{{ info.MonthAvgTicketPrice?info.MonthAvgTicketPrice:'-' }}</p>
<p class="text">该服务区</p>
</div>
<div class="item">

View File

@ -37,6 +37,7 @@ export default {
watch: {
data: {
handler(value) {
console.log('value',value)
this.info = value
this.carTypeTimePath=''
this.handleCarData(value)
@ -52,7 +53,7 @@ export default {
formatter: (item, category, index, opts) =>{
if (this.num===0){
this.num++
return '日均车辆' + ":" + opts.series[0].valueList[index] + '辆';
return '日均车辆' + ":" + opts.series[0].valueList[index] + '辆,占比' + item.data + '%';
}else{
this.num=0
return '平均停留' + ":" + item.data + '分钟';

View File

@ -101,6 +101,7 @@ export default {
return item.name + ":" + item.data + '辆';
}
});
uChartsInstance[e.target.id].touchLegend(e);
},
//
handleCarData(value) {

View File

@ -63,7 +63,12 @@ export default {
return 5
}else{
let sum = value + value *0.2
return Number((sum / 5).toFixed(0)) * 5
if (sum>0 && sum<5){
return 5
}else{
console.log('sum',sum)
return Number((sum / 5).toFixed(0)) * 5
}
}
},
drawCharts(id, data,config) {
@ -101,7 +106,7 @@ export default {
disabled: false,
axisLine: false,
titleOffsetY: -5,
titleOffsetX: 15,
titleOffsetX: 25,
min: 0,
max:config.carMax
},

View File

@ -37,7 +37,7 @@
</div>
<div style="display: flex;align-items: center">
<p class="smallRate">{{item.value + '%'}}</p>
<view class="right">
<view class="right" v-if="item.addValue">
<image class="arrowTop" :src="Number(item.addValue)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text class="text">{{item.addValue?Math.abs(item.addValue) + '%':'-' + '%'}}</text>
</view>
@ -98,6 +98,7 @@ export default {
},
//
handleCarData(value) {
console.log('valuePer',value)
let Vehicle_CountAll=0
let SectionFlow_CountAll=0
let minAll = 0
@ -118,8 +119,8 @@ export default {
this.dataList[0].value = (minAll / Vehicle_CountAll*100).toFixed(2)
this.dataList[1].value = (middleAll / Vehicle_CountAll*100).toFixed(2)
this.dataList[2].value = (bigAll / Vehicle_CountAll*100).toFixed(2)
this.dataList[0].addValue = value[0].MinVehicleEntry_Rate
this.dataList[1].addValue = value[0].MediumVehicleEntry_Rate
this.dataList[0].addValue = value[0].MinVehicleEntry_GrowthRate
this.dataList[1].addValue = value[0].MediumVehicleEntry_GrowthRate
this.dataList[2].addValue = value[0].LargeVehicleEntry_GrowthRate
let list = []
this.dataList.forEach(item=>{

View File

@ -44,7 +44,11 @@ export default {
//
handleTap(e){
uChartsInstance[e.target.id].touchLegend(e);
uChartsInstance[e.target.id].showToolTip(e);
uChartsInstance[e.target.id].showToolTip(e,{
formatter: (item, category, index, opts) =>{
return item.name + ":" + item.data + '分钟'
}
});
},
//
handleCarData(value) {

View File

@ -3,10 +3,11 @@
<div class="bandItem" v-for="(item,index) in dataList" :key="index">
<p class="title">{{item.name}}</p>
<div class="progress">
<div v-if="Number(item.small)!==0" class="small" :style="{width:`calc(${item.small}% - 2px)`}">{{item.small<16?'':item.small+'%'}}</div>
<div v-if="Number(item.normal)!==0" class="normal" :style="{width:`calc(${item.normal}% - 2px)`,left:`calc(${item.small}% - 2px)`}">{{item.normal<16?'':item.normal + '%'}}</div>
<div v-if="Number(item.big)!==0" class="big" :style="{width:item.big+'%',left:`calc(${item.normal + item.small}% - 4px)`}">{{item.big<16?'':item.big + '%'}}</div>
<div v-if="Number(item.small)!==0" class="small" :style="{width:`calc(${item.small}% - 2px)`}" @click="handleClick($event,'small',item)">{{item.small<16?'':item.small+'%'}}</div>
<div v-if="Number(item.normal)!==0" class="normal" :style="{width:`calc(${item.normal}% - 2px)`,left:`calc(${item.small}% - 2px)`}" @click="handleClick($event,'normal',item)">{{item.normal<16?'':item.normal + '%'}}</div>
<div v-if="Number(item.big)!==0" class="big" :style="{width:item.big+'%',left:`calc(${item.normal + item.small}% - 4px)`}" @click="handleClick($event,'big',item)">{{item.big<16?'':item.big + '%'}}</div>
</div>
<div class="meng" :style="position==='left'?`left:${positionWidth}`:`right:${positionWidth}`" v-if="selectName===item.name">{{typeText}}{{typeValue}}</div>
</div>
<div class="key">
<div class="box">
@ -33,7 +34,13 @@ export default {
name: "bandLevel",
data() {
return {
dataList: []
dataList: [],
isShow: false,
typeText:'',
typeValue:'',
selectName:'',
position:'',//left right
positionWidth:'',//
}
},
props: {
@ -52,7 +59,39 @@ export default {
}
},
methods: {
handleClick(e,type,item){
console.log('index',item)
this.selectName = item.name
let phoneInfo = uni.getStorageSync('phoneInfo')
let width = phoneInfo.screenWidth
let startWidth = width * 0.2
let endWidth = width * 0.6
let now = e.detail.x
console.log('now',now)
this.isShow = true
if (now<startWidth){
this.position = 'left'
this.positionWidth = 0
}else if(now>startWidth && now<endWidth){
this.position = 'left'
this.positionWidth = `calc(${now}px - 16px)`
}else if(now>endWidth){
this.position = 'right'
this.positionWidth = 0
}
if (type==='small'){
this.typeText = '低消费'
this.typeValue = item.small + '%'
}else if(type === 'normal'){
this.typeText = '普通消费'
this.typeValue = item.normal + '%'
}else if(type === 'big'){
this.typeText = '高消费'
this.typeValue = item.big + '%'
}
console.log('e',e)
console.log('type',type)
}
}
}
</script>
@ -62,6 +101,8 @@ export default {
width: 100%;
margin-top: 12px;
.bandItem{
width: 100%;
position: relative;
margin-bottom: 12px;
.title{
font-size: 14px;
@ -70,6 +111,16 @@ export default {
color: #160002;
line-height: 20px;
}
.meng{
position: absolute;
display: inline-block;
padding: 0 5px;
z-index: 9;
top: 0;
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
}
.progress{
width: 100%;
height: 20px;

View File

@ -1,7 +1,7 @@
<template>
<div class="consumLevel">
<canvas v-if="!levelPath" class="level" canvas-id="level" id="level"/>
<image v-if="levelPath" class="level" :src="levelPath"></image>
<canvas class="level" canvas-id="level" id="level" @tap="tap"/>
<!-- <image v-if="levelPath" class="level" :src="levelPath"></image>-->
</div>
</template>
@ -32,6 +32,14 @@ export default {
}
},
methods: {
tap(e){
uChartsInstance[e.target.id].showToolTip(e,{
formatter: (item, category, index, opts) =>{
return item.name + item.data + '%';
}
});
uChartsInstance[e.target.id].touchLegend(e);
},
//
handleCarData(value) {
let res = value
@ -96,7 +104,7 @@ export default {
}
});
setTimeout( ()=>{
this.canvasToTempImage('level')
// this.canvasToTempImage('level')
},2000)
},
canvasToTempImage(id){

View File

@ -1,8 +1,8 @@
<template>
<div class="fillingDegree">
<div class="item">
<canvas v-if="!fillDegreePath" class="fillDegree" canvas-id="fillDegree" id="fillDegree"/>
<image v-if="fillDegreePath" class="fillDegree" :src="fillDegreePath"></image>
<canvas class="fillDegree" canvas-id="fillDegree" id="fillDegree" @tap="tap" @click="handleChange"/>
<!-- <image v-if="fillDegreePath" class="fillDegree" :src="fillDegreePath"></image>-->
</div>
</div>
</template>
@ -14,8 +14,10 @@ export default {
name: "fillingDegree",
data() {
return {
width:0,
fillDegreePath:''
width:0,
fillDegreePath:'',
selectIndex: 0,
dataList : []
}
},
props: {
@ -34,6 +36,26 @@ export default {
}
},
methods: {
handleChange(type){
if (type==='canvas'){
this.$emit('handleChangeBandLevel',this.selectIndex)
}else{
this.$emit('handleChangeBandLevel',false)
}
},
tap(e){
uChartsInstance[e.target.id].showToolTip(e,{
formatter: (item, category, index, opts) =>{
this.selectIndex = opts.series[index].key
this.handleChange('canvas')
console.log('item',item)
console.log('opts',opts)
console.log('index',index)
return item.name;
}
});
uChartsInstance[e.target.id].touchLegend(e);
},
//
handleCarData(value) {
let res = value.result
@ -59,7 +81,7 @@ export default {
background: "#FFFFFF",
color: ["#1E80FF", "#00C2FF","#6B6FFF","#38C275","#F3BC1B","#ED6B5A","#FF9845","#74839D","#ACB9CD","#CAD0DA"],
padding: [5, 5, 5, 5],
dataLabel: true,
dataLabel: false,
enableScroll: false,
title: {
name:config.Abundant?'盈足':'不盈足',
@ -68,9 +90,9 @@ export default {
},
legend: {
show: true,
position: "bottom",
position: "right",
lineHeight: 25,
float: 'left'
float: 'center'
},
extra: {
@ -87,7 +109,7 @@ export default {
}
});
setTimeout( ()=>{
this.canvasToTempImage('fillDegree')
// this.canvasToTempImage('fillDegree')
},2000)
},
canvasToTempImage(id){

View File

@ -8,10 +8,18 @@
<div class="bottom">
<div class="item">
<p class="price">{{ info.TicketCount?info.TicketCount:'-' }}</p>
<p class="text">入区车辆 <text class="unit">/</text></p>
<p class="text">客单交易 <text class="unit">/</text></p>
</div>
<div class="item">
<p class="price">{{ info.AvgTicketPrice?info.AvgTicketPrice:'-' }}</p>
<p class="text">客单均价 <text class="unit">/</text></p>
</div>
<div class="item">
<p class="price">{{ info.VehicleCount?info.VehicleCount:'-' }}</p>
<p class="text">入区车辆 <text class="unit">/</text></p>
</div>
<div class="item">
<p class="price">{{ info.AvgVehicleAmount ?info.AvgVehicleAmount :'-' }}</p>
<p class="text">单车价值 <text class="unit">/</text></p>
</div>
</div>
@ -31,11 +39,11 @@
<p class="text">客单均价 <text class="unit">/</text></p>
</div>
<div class="item">
<p class="price">{{ info.TicketAvgCount?info.TicketAvgCount:'-' }}</p>
<p class="text">入区车辆 <text class="unit">/</text></p>
<p class="price">{{ info.MonthVehicleCount?info.MonthVehicleCount:'-' }}</p>
<p class="text">入区车辆 <text class="unit">/</text></p>
</div>
<div class="item">
<p class="price">{{ info.MonthAvgTicketPrice?info.MonthAvgTicketPrice:'-' }}</p>
<p class="price">{{ info.MonthVehicleAmount?info.MonthVehicleAmount:'-' }}</p>
<p class="text">单车价值 <text class="unit">/</text></p>
</div>
</div>
@ -43,13 +51,13 @@
<div class="box">
<div class="pro">
<div class="big" :style="{width:info.transactionLevel.HighConsumption_Rate +'%'}" @click="handleShow(0)">
<view class="meng" v-if="genderList[0]">{{'高消费'}}</view>
<view class="meng" :style="Number(info.transactionLevel.HighConsumption_Rate)<10?'right: 0':'left:0'" v-if="genderList[0]">高消费: {{info.transactionLevel.HighConsumption_Count }}</view>
</div>
<div class="normal" :style="{width:info.transactionLevel.NormalConsumption_Rate +'%',left:info.transactionLevel.HighConsumption_Rate+'%'}" @click="handleShow(1)">
<view class="meng" v-if="genderList[1]">{{'普通消费'}}</view>
<view class="meng" :style="Number(info.transactionLevel.HighConsumption_Rate)<10?'left: 0':'right:0'" v-if="genderList[1]">普通消费: {{info.transactionLevel.NormalConsumption_Count }}</view>
</div>
<div class="small" @click="handleShow(2)" :style="{width:info.transactionLevel.LowConsumption_Rate +'%',left:(Number(info.transactionLevel.HighConsumption_Rate) + Number(info.transactionLevel.NormalConsumption_Rate))+'%'}">
<view class="meng" v-if="genderList[2]">{{'低消费'}}</view>
<view class="meng" :style="Number(info.transactionLevel.LowConsumption_Rate)<10?'right: 0':'left:0'" v-if="genderList[2]">低消费: {{info.transactionLevel.LowConsumption_Count }}</view>
</div>
</div>
<div class="type">
@ -184,9 +192,8 @@ export default {
background: #1E80FF;
border-radius: 2px 0 0 2px;
.meng{
width: 70px;
width: 110px;
height: 20px;
box-sizing: border-box;
line-height: 20px;
position: absolute;
display: inline-block;
@ -196,6 +203,7 @@ export default {
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
text-align: center;
}
}
.normal{
@ -204,9 +212,8 @@ export default {
background: #ACB9CD;
border-radius: 2px 0 0 2px;
.meng{
width: 70px;
width: 110px;
height: 20px;
box-sizing: border-box;
line-height: 20px;
position: absolute;
display: inline-block;
@ -216,6 +223,7 @@ export default {
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
text-align: center;
}
}
.small{
@ -224,9 +232,8 @@ export default {
background: #CAD0DA;
border-radius: 2px 0 0 2px;
.meng{
width: 70px;
width: 110px;
height: 20px;
box-sizing: border-box;
line-height: 20px;
position: absolute;
display: inline-block;
@ -236,6 +243,7 @@ export default {
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
text-align: center;
}
}
}

View File

@ -228,11 +228,15 @@ export default {
margin-right: 2px;
border-radius: 2px 0 0 2px;
.meng{
width: 90px;
line-height: 24px;
text-align: center;
height: 24px;
position: absolute;
display: inline-block;
padding: 0 5px;
z-index: 9;
left: 0;top: -10px;
left: 0;top: -20px;
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
@ -255,14 +259,18 @@ export default {
background: #00C2FF;
border-radius: 0 2px 2px 0 ;
.meng{
position: absolute;
display: inline-block;
padding: 0 5px;
z-index: 9;
right: 0;top: -10px;
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
width: 90px;
line-height: 24px;
text-align: center;
height: 24px;
position: absolute;
display: inline-block;
padding: 0 5px;
z-index: 9;
left: 0;top: -20px;
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
}
}
.woman:after{

View File

@ -147,7 +147,7 @@ export default {
this.labelList = list
//
const total = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',reqText)
this.analyseText = total.Result_Data.List[0].ANALYSIS_CONTENT
this.analyseText = total.Result_Data.List[0]?total.Result_Data.List[0].ANALYSIS_CONTENT:''
},
bindPickerChange(){

View File

@ -42,7 +42,16 @@ export default {
console.log('dataList',this.dataList)
uChartsInstance[e.target.id].showToolTip(e, {
formatter: (item, category, index, opts) => {
return item.name + ":" + item.data + '万元'
console.log('item',item)
console.log('opts',opts)
console.log('index',index)
if (this.selectIndex === 0){
return item.name + ":" + item.data + '万元,' + '环比: '
}else if(this.selectIndex === 1){
return item.name + ":" + item.data + '笔'
}else {
return item.name + ":" + item.data + '元'
}
// if (this.selectIndex===0){
// if (item.name === ''){
// return item.name + ":" + this.dataList.normal[0].data[index] + '';

View File

@ -2,7 +2,7 @@
<div class="main">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/noData.svg"></image>
<p class="text" v-if="type!=='car'">抱歉,服务区采集样本过小,无法分析</p>
<p class="text" v-else>抱歉,第三方数据未传,无法分析</p>
<p class="text" v-else>抱歉,数据为第三方接口传输无法进行画像分析</p>
</div>
</template>

View File

@ -7,13 +7,13 @@
<div class="chartsItem">
<p class="title">业态充盈度</p>
<div v-if="fillDegreeList.result.series[0].data.length>0">
<filling-degree :data="fillDegreeList" />
<filling-degree :data="fillDegreeList" @handleChangeBandLevel="handleChangeBandLevel"/>
<analyse :analyseInfo="{analysisins_type: 1502,analysisins_format: 2000}" />
</div>
<no-data v-else/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">品牌消费水平<text class="unit">(Top 5)</text></p>
<p class="title">品牌消费水平<text class="unit"></text></p>
<div v-if="bandLevelList.length>0">
<band-level :data="bandLevelList"/>
<analyse :analyseInfo="{analysisins_type: 1503,analysisins_format: 2000}" />
@ -21,7 +21,7 @@
<no-data v-else/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">业态消费水平<text class="unit">(Top 5)</text></p>
<p class="title">业态消费水平<text class="unit"></text></p>
<div v-if="consumLevelList.series.length>0">
<consumption-level :data="consumLevelList" />
<analyse :analyseInfo="{analysisins_type: 1504,analysisins_format: 2000}" />
@ -119,6 +119,47 @@ export default {
this.getBrandInfoList()
},
methods:{
//
async handleChangeBandLevel(key){
console.log('key',key)
let req
if (key===false){
req = {
ProvinceCode:'340000',
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
ShowWholeBrand:false
}
}else{
req = {
ProvinceCode:'340000',
StatisticsDate:this.time,
ServerpartId:this.serviceInfo.Serverpart_ID,
BusinessTradeIds: key,
ShowWholeBrand:false
}
}
let res =[]
let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessBrandLevel',req)
if (totalData.Result_Data){
console.log('品牌消费水平',totalData)
totalData.Result_Data.legend.forEach(item=>{
res.push({name:item,small:0,normal:0,big:0})
})
res.forEach((item,index)=>{
totalData.Result_Data.ColumnList.forEach((subItem,subIndex)=>{
if (subItem.name==='低消费'){
item.small = subItem.data[index]
}else if(subItem.name==='普通消费'){
item.normal = subItem.data[index]
}else if(subItem.name==='高消费'){
item.big = subItem.data[index]
}
})
})
}
this.bandLevelList = res
},
async nearestService(){
let seat = uni.getStorageSync('seatInfo');
let req = {
@ -142,17 +183,19 @@ export default {
const req = {
ProvinceCode:'340000',
StatisticsDate:this.time,
serverpartId:this.serviceInfo.Serverpart_ID
serverpartId:this.serviceInfo.Serverpart_ID,
BusinessTradeIds:-1
}
const data = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeRevenue',req)
console.log('data21312312',data)
let res = []
let all = 0
data.Result_Data.BusinessTradeRank.forEach((item,index)=>{
if (index<=10){
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value)})
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value),key:item.key})
all+=Number(item.value)
}else if(index===11){
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2))})
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2)),key:item.key})
}
})
console.log('res21312312',res)
@ -193,6 +236,7 @@ export default {
}
let res =[]
let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessBrandLevel',req)
console.log('品牌消费水平',totalData)
totalData.Result_Data.legend.forEach(item=>{
res.push({name:item,small:0,normal:0,big:0})
})

View File

@ -26,6 +26,7 @@
</view>
</picker>
</div>
</div>
<p class="title">{{thisMonth?thisMonth:'-'}}月客群特征分析</p>
<div v-if="genderBubbleList.res.length>0">
<customer-second :data="genderBubbleList" />
@ -78,7 +79,6 @@ export default {
data() {
return {
topBg:'linear-gradient(180deg, #A1D0C1 0%, #B1D9CD 100%);',//
labelList:['女性','高消费','喜爱奶茶','浙江','20-30岁','江苏'],//
title:'客群画像',//
bgColor:'180deg, #30C8ED 0%, #0B9353 100%',//
bgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/commercial/guestPortraitBg.svg',//
@ -239,7 +239,7 @@ export default {
res:[]
}
const req = {
statisticsType:2,
statisticsType:1,
provinceCode:'340000',
serverpartId:this.serviceInfo.Serverpart_ID,
statisticsMonth:this.$util.getThisMonth(time)
@ -377,7 +377,10 @@ export default {
res.push({name:`${item.name} ${item.value}%`,value:Number(item.value)})
all+=Number(item.value)
}else if(index===5){
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2))})
console.log('all',all)
if (all<100){
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2))})
}
}
})
let result = [

View File

@ -596,9 +596,15 @@ export default {
this.trendsList = res
},
async getRevenueType(){
const date = new Date(this.time)
let y = date.getFullYear()
let m = date.getMonth() + 1
if (m<10){
m = '0'+ m
}
const req = {
pushProvinceCode:'340000',
Statistics_StartDate:this.time,
Statistics_StartDate:`${y}-${m}-01`,
Statistics_Date:this.time,
Serverpart_ID:this.serviceInfo.Serverpart_ID
}

View File

@ -3,7 +3,7 @@
<div class="top">
<p class="title" v-if="type==='month'">{{serviceInfo.name}}服务区自营计划</p>
<p class="title" v-if="type==='year'">{{serviceInfo.name}}服务区年度自营计划</p>
<div class="select" v-if="isSelect && optionTime===''">
<div class="select">
<picker mode="date" fields="month" :value="single" :end="endData" @change="bindDateChange" >
<view class="time">
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
@ -87,98 +87,127 @@
</view>
<p class="title" style="margin-top: 12px">{{month}}月预算完成度</p>
<div class="list" v-if="type==='month'" >
<div class="item" >
<div class="firstBox" v-for="(item,index) in dataList" :key="index" >
<text class="firstTitle">{{item.node.ACCOUNT_CODE}}</text>
<div class="valueBox" v-if="item.node.BUDGETDETAIL_AMOUNT ">
<p class="value" style="color:#a69e9f">{{item.node.BUDGETDETAIL_AMOUNT }}<text style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text class="type" style="margin-left: 4px">(计划)</text></p>
<p class="value" v-if="item.node.ShowGrowth_Rate">{{item.node.REVENUE_AMOUNT?item.node.REVENUE_AMOUNT:'-' }}<text v-if="item.node.REVENUE_AMOUNT!=='-'" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="item.node.REVENUE_AMOUNT!=='-'" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="item.node.ShowGrowth_Rate">
<image class="addIcon" :src="item.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':item.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{item.node.Growth_Rate?Math.abs(item.node.Growth_Rate) + '%':'-' }}</p>
<text class="type" style="margin-left: 4px">{{item.node.Growth_Rate>0?'(提升)':item.node.Growth_Rate<0?'(降低)':'-'}}</text>
</view>
</div>
<div class="item" >
<div class="firstBox" v-for="(item,index) in dataList" :key="index" >
<div v-if="item.children.length>0" class="subBox" v-for="(subItem,subIndex) in item.children" :key="subIndex"
:style="subItem.children.length>0?'':'display:flex;justify-content: space-between'">
<p class="subTitle">{{subItem.node.ACCOUNT_CODE}}</p>
<div class="valueBox" v-if="subItem.node.BUDGETDETAIL_AMOUNT ">
<p class="value" style="color:#a69e9f">{{subItem.node.BUDGETDETAIL_AMOUNT}}<text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
<p v-if="subItem.node.ShowGrowth_Rate" class="value">{{subItem.node.REVENUE_AMOUNT?subItem.node.REVENUE_AMOUNT:'-' }}<text v-if="subItem.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="subItem.node.ShowGrowth_Rate">
<image class="addIcon" :src="subItem.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':subItem.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{subItem.node.Growth_Rate?Math.abs(subItem.node.Growth_Rate) + '%':'-'}}</p>
<text class="type" style="margin-left: 4px">{{subItem.node.Growth_Rate>0?'(提升)':subItem.node.Growth_Rate<0?'(降低)':''}}</text>
</view>
</div>
<div v-if="subItem.children.length>0" class="thirdBox" v-for="(thirdItem,thirdIndex) in subItem.children" :key="thirdIndex">
<text class="thirdTitle">{{thirdItem.node.ACCOUNT_CODE}}</text>
<div class="valueBox" v-if="thirdItem.node.BUDGETDETAIL_AMOUNT">
<p class="value" style="color:#a69e9f">{{thirdItem.node.BUDGETDETAIL_AMOUNT}}<text style="margin-left: 4px;color:#a69e9f" v-if="thirdItem.node.BUDGETDETAIL_AMOUNT!=='-'">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="thirdItem.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
<p class="value" v-if="thirdItem.node.ShowGrowth_Rate">{{thirdItem.node.REVENUE_AMOUNT?thirdItem.node.REVENUE_AMOUNT:'-' }}<text v-if="thirdItem.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="thirdItem.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="thirdItem.node.ShowGrowth_Rate">
<image class="addIcon" :src="thirdItem.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':thirdItem.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{thirdItem.node.Growth_Rate?Math.abs(thirdItem.node.Growth_Rate) + '%':'-'}}</p>
<text class="type" style="margin-left: 4px">{{thirdItem.node.Growth_Rate>0?'(提升)':thirdItem.node.Growth_Rate<0?'(降低)':''}}</text>
</view>
</div>
<!-- <div class="top">-->
<!-- <p class="thirdTitle">便利店</p>-->
<!-- <view class="right">-->
<!-- <text class="comparePlan">比计划 </text>-->
<!-- <view class="box2">-->
<!-- <image class="addIcon" :src="Number(serviceInfo.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>-->
<!-- <p class="text">{{6+'%'}}</p>-->
<!-- </view>-->
<!-- </view>-->
<!-- </div>-->
<!-- <div class="progressPlan">-->
<!-- <div class="trans" :style="{width:serviceInfo.Budget_Degree > 100 ? '100%' : serviceInfo.Budget_Degree + '%'}"></div>-->
<!-- </div>-->
</div>
</div>
<div class="valueBox" v-if="item.node.ShowRevenue_Amount" style="display: flex;justify-content: space-between">
<p class="firstTitle">{{item.node.ACCOUNT_CODE}}</p>
<div>
<p v-if="item.node.BUDGETDETAIL_AMOUNT" class="value" style="color:#a69e9f">{{item.node.BUDGETDETAIL_AMOUNT?item.node.BUDGETDETAIL_AMOUNT:''}}<text v-if="item.node.BUDGETDETAIL_AMOUNT!=='-'" style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="item.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
<p class="value">{{item.node.REVENUE_AMOUNT?item.node.REVENUE_AMOUNT:'-' }}<text v-if="item.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="item.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="item.node.ShowGrowth_Rate">
<image class="addIcon" :src="item.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':item.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{item.node.Growth_Rate?Math.abs(item.node.Growth_Rate) + '%':'-'}}</p>
<text class="type" style="margin-left: 4px">{{item.node.Growth_Rate>0?'(提升)':item.node.Growth_Rate<0?'(降低)':''}}</text>
</view>
</div>
<!-- <div class="firstBox">-->
<!-- <p class="firstTitle">营业成本</p>-->
<!-- <div class="subBox">-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">便利店</text>-->
<!-- <text class="value">100,200,600.00</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">餐饮</text>-->
<!-- <text class="value">100,200,600.00</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">客房及其他</text>-->
<!-- <text class="value">100,200,600.00</text>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="firstBox">-->
<!-- <p class="firstTitle">毛利率</p>-->
<!-- <div class="subBox">-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">自营综合毛利率</text>-->
<!-- <text class="value">150%</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">便利店</text>-->
<!-- <text class="value">45%</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">餐饮</text>-->
<!-- <text class="value">65%</text>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<text class="firstTitle" v-if="!item.node.ShowRevenue_Amount ">{{item.node.ACCOUNT_CODE}}</text>
<div class="valueBox" v-if="item.node.BUDGETDETAIL_AMOUNT && !item.node.ShowRevenue_Amount">
<p class="value" style="color:#a69e9f">{{item.node.BUDGETDETAIL_AMOUNT }}<text style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text class="type" style="margin-left: 4px">(计划)</text></p>
<p class="value" v-if="item.node.ShowGrowth_Rate">{{item.node.REVENUE_AMOUNT?item.node.REVENUE_AMOUNT:'-' }}<text v-if="item.node.REVENUE_AMOUNT!=='-'" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="item.node.REVENUE_AMOUNT!=='-'" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="item.node.ShowGrowth_Rate">
<image class="addIcon" :src="item.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':item.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{item.node.Growth_Rate?Math.abs(item.node.Growth_Rate) + '%':'-' }}</p>
<text class="type" style="margin-left: 4px">{{item.node.Growth_Rate>0?'(提升)':item.node.Growth_Rate<0?'(降低)':'-'}}</text>
</view>
</div>
<div v-if="item.children.length>0" class="subBox" v-for="(subItem,subIndex) in item.children" :key="subIndex"
:style="subItem.children?'':'display:flex;justify-content: space-between'">
<div class="valueBox" v-if="subItem.node.ShowRevenue_Amount" style="display: flex;justify-content: space-between">
<p class="subTitle">{{subItem.node.ACCOUNT_CODE}}</p>
<div >
<p v-if="subItem.node.BUDGETDETAIL_AMOUNT" class="value" style="color:#a69e9f">{{subItem.node.BUDGETDETAIL_AMOUNT?subItem.node.BUDGETDETAIL_AMOUNT:''}}<text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
<p class="value">{{subItem.node.REVENUE_AMOUNT?subItem.node.REVENUE_AMOUNT:'-' }}<text v-if="subItem.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="subItem.node.ShowGrowth_Rate">
<image class="addIcon" :src="subItem.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':subItem.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{subItem.node.Growth_Rate?Math.abs(subItem.node.Growth_Rate) + '%':'-'}}</p>
<text class="type" style="margin-left: 4px">{{subItem.node.Growth_Rate>0?'(提升)':subItem.node.Growth_Rate<0?'(降低)':''}}</text>
</view>
</div>
</div>
<p class="subTitle" v-if="!subItem.node.ShowRevenue_Amount ">{{subItem.node.ACCOUNT_CODE}}</p>
<div class="valueBox" v-if="subItem.node.BUDGETDETAIL_AMOUNT && !subItem.node.ShowRevenue_Amount">
<p class="value" style="color:#a69e9f">{{subItem.node.BUDGETDETAIL_AMOUNT?subItem.node.BUDGETDETAIL_AMOUNT:''}}<text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" style="margin-left: 4px;color:#a69e9f">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
<p v-if="subItem.node.ShowGrowth_Rate" class="value">{{subItem.node.REVENUE_AMOUNT?subItem.node.REVENUE_AMOUNT:'-' }}<text v-if="subItem.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="subItem.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="subItem.node.ShowGrowth_Rate">
<image class="addIcon" :src="subItem.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':subItem.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{subItem.node.Growth_Rate?Math.abs(subItem.node.Growth_Rate) + '%':'-'}}</p>
<text class="type" style="margin-left: 4px">{{subItem.node.Growth_Rate>0?'(提升)':subItem.node.Growth_Rate<0?'(降低)':''}}</text>
</view>
</div>
<div v-if="subItem.children.length>0" class="thirdBox" v-for="(thirdItem,thirdIndex) in subItem.children" :key="thirdIndex">
<text class="thirdTitle">{{thirdItem.node.ACCOUNT_CODE}}</text>
<div class="valueBox" v-if="thirdItem.node.BUDGETDETAIL_AMOUNT">
<p class="value" style="color:#a69e9f">{{thirdItem.node.BUDGETDETAIL_AMOUNT}}<text style="margin-left: 4px;color:#a69e9f" v-if="thirdItem.node.BUDGETDETAIL_AMOUNT!=='-'">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="thirdItem.node.BUDGETDETAIL_AMOUNT!=='-'" class="type" style="margin-left: 4px">(计划)</text></p>
<p class="value" v-if="thirdItem.node.ShowGrowth_Rate">{{thirdItem.node.REVENUE_AMOUNT?thirdItem.node.REVENUE_AMOUNT:'-' }}<text v-if="thirdItem.node.REVENUE_AMOUNT" style="margin-left: 4px">{{item.node.ACCOUNT_CODE==='毛利率'?'%':'元'}}</text><text v-if="thirdItem.node.REVENUE_AMOUNT" class="type" style="margin-left: 4px">(实际)</text></p>
<view class="addBox" v-if="thirdItem.node.ShowGrowth_Rate">
<image class="addIcon" :src="thirdItem.node.Growth_Rate>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':thirdItem.node.Growth_Rate<0?'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg':''"></image>
<p class="text" style="margin-left: 4px">{{thirdItem.node.Growth_Rate?Math.abs(thirdItem.node.Growth_Rate) + '%':'-'}}</p>
<text class="type" style="margin-left: 4px">{{thirdItem.node.Growth_Rate>0?'(提升)':thirdItem.node.Growth_Rate<0?'(降低)':''}}</text>
</view>
</div>
<!-- <div class="top">-->
<!-- <p class="thirdTitle">便利店</p>-->
<!-- <view class="right">-->
<!-- <text class="comparePlan">比计划 </text>-->
<!-- <view class="box2">-->
<!-- <image class="addIcon" :src="Number(serviceInfo.Growth_Rate)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>-->
<!-- <p class="text">{{6+'%'}}</p>-->
<!-- </view>-->
<!-- </view>-->
<!-- </div>-->
<!-- <div class="progressPlan">-->
<!-- <div class="trans" :style="{width:serviceInfo.Budget_Degree > 100 ? '100%' : serviceInfo.Budget_Degree + '%'}"></div>-->
<!-- </div>-->
</div>
</div>
</div>
<!-- <div class="firstBox">-->
<!-- <p class="firstTitle">营业成本</p>-->
<!-- <div class="subBox">-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">便利店</text>-->
<!-- <text class="value">100,200,600.00</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">餐饮</text>-->
<!-- <text class="value">100,200,600.00</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">客房及其他</text>-->
<!-- <text class="value">100,200,600.00</text>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="firstBox">-->
<!-- <p class="firstTitle">毛利率</p>-->
<!-- <div class="subBox">-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">自营综合毛利率</text>-->
<!-- <text class="value">150%</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">便利店</text>-->
<!-- <text class="value">45%</text>-->
<!-- </div>-->
<!-- <div class="thirdBox">-->
<!-- <text class="thirdTitle">餐饮</text>-->
<!-- <text class="value">65%</text>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
<div style="margin-top: 12px">
@ -249,6 +278,7 @@ export default {
this.month = '0' + this.month
}
this.serviceInfo = JSON.parse(option.serviceInfo)
console.log('this.serviceInfo',this.serviceInfo)
this.serviceInfo.Budget_Degree =this.$util.fmoney(this.serviceInfo.Budget_Degree)
this.getData()
}else {
@ -268,12 +298,19 @@ export default {
title: `${this.serviceInfo.SERVERPART_NAME || this.serviceInfo.Serverpart_Name}年度计划`,
})
}
let storeTime = uni.getStorageSync('lastDay')
if (storeTime){
this.time = storeTime
if (this.month){
const date = new Date()
let y = date.getFullYear()
let time = `${y}-${this.month}`
this.single = this.$util.getThisMonthHave(time)
}else{
let storeTime = uni.getStorageSync('lastDay')
if (storeTime){
this.time = storeTime
}
this.single = this.$util.getThisMonthHave(this.time)
}
this.single = this.$util.getThisMonthHave(this.time)
let nowTime = new Date()
let y = nowTime.getFullYear()
let month = nowTime.getMonth() + 1
@ -319,6 +356,68 @@ export default {
this.endTime = e.detail.value + '-' + d
console.log('e',e)
this.getData(e.detail.value)
//
this.getServiceDate(e.detail.value)
if (this.type === 'month'){
uni.setNavigationBarTitle({
title: `${this.month}${this.serviceInfo.SERVERPART_NAME || this.serviceInfo.Serverpart_Name}计划`,
})
}else{
uni.setNavigationBarTitle({
title: `${this.serviceInfo.SERVERPART_NAME || this.serviceInfo.Serverpart_Name}年度计划`,
})
}
},
async getServiceDate(time){
let reqTime
let date = new Date(time)
let currentDate = new Date()
let nowMonth = currentDate.getMonth() + 1
let y = date.getFullYear()
let m = date.getMonth() + 1
if (m === nowMonth){
let nowYear = currentDate.getFullYear()
let nodDay = currentDate.getDate()
if (nowMonth<10){
nowMonth = '0' + nowMonth
}
if (nodDay<10){
nodDay = '0' + nodDay
}
reqTime = `${nowYear}-${nowMonth}-${nodDay}`
}else{
let howDay = this.$util.getThisMonthDay(time)
if (m<10){
m = '0' + m
}
reqTime = `${y}-${m}-${howDay}`
}
let req = {
Province_Code:'340000',
Statistics_Date:reqTime,
Serverpart_ID:this.serviceInfo.Serverpart_ID,
SPRegionType_ID:this.serviceInfo.SPRegionType_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueBudget',req)
let service = {
Budget_Amount:this.$util.fmoney(data.Result_Data.BudgetMonth_Amount),
Budget_Degree:data.Result_Data.MonthBudget_Degree,
Growth_Rate:data.Result_Data.MonthGrowth_Rate,
Revenue_Amount:this.$util.fmoney(data.Result_Data.RevenueMonth_Amount),
Serverpart_ID:this.serviceInfo.Serverpart_ID,
Serverpart_Name:this.serviceInfo.Serverpart_Name
}
let num = service.Serverpart_Name.indexOf('服务区')
console.log(num)
if (num!==-1){
service.name = service.Serverpart_Name.slice(0,num)
service.unit = service.Serverpart_Name.slice(num,100)
}else{
service.name = service.Serverpart_Name
}
this.serviceInfo = service
console.log('service',service)
},
async getYearData(){
let storeServiceInfo = uni.getStorageSync('currentService')
@ -347,7 +446,9 @@ export default {
let y = date.getFullYear()
let m = this.month
let req = {}
if (nowMonth === m ){
console.log('nowMonth',nowMonth)
console.log('m',m)
if (nowMonth === Number(m) ){
req = {
BUDGETPROJECT_YEAR: y,
STATISTICS_MONTH:`${y}${m}`,
@ -355,13 +456,21 @@ export default {
ACCOUNT_CODE:'6001,6401,6402',
STATISTICS_DATE: time
}
console.log('req',req)
}else{
let reqDate = new Date(changeTime)
let y = reqDate.getFullYear()
let m = reqDate.getMonth() + 1
if (m<10){
m = '0' + m
let reqDate
let m
if (changeTime){
reqDate = new Date(changeTime)
m = reqDate.getMonth() + 1
if (m<10){
m = '0' + m
}
}else{
reqDate = new Date()
m = this.month
}
let y = reqDate.getFullYear()
req = {
BUDGETPROJECT_YEAR: y,
STATISTICS_MONTH: `${y}${m}`,
@ -375,9 +484,13 @@ export default {
this.dataList.forEach(item=>{
if (item.children){
item.children = this.editData(item.children)
if (item.node.ShowRevenue_Amount){
item.node.BUDGETDETAIL_AMOUNT = item.node.BUDGETDETAIL_AMOUNT ? this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT):''
item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
}
}else{
if (item.node.BUDGETDETAIL_AMOUNT){
item.node.BUDGETDETAIL_AMOUNT = this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT)
item.node.BUDGETDETAIL_AMOUNT = item.node.BUDGETDETAIL_AMOUNT ? this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT):''
item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
}else{
item.node.BUDGETDETAIL_AMOUNT = '-'
@ -391,9 +504,13 @@ export default {
value.forEach(item=>{
if (item.children){
item.children = this.editData(item.children)
if (item.node.ShowRevenue_Amount){
item.node.BUDGETDETAIL_AMOUNT = item.node.BUDGETDETAIL_AMOUNT ? this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT) :''
item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
}
}else{
if (item.node.BUDGETDETAIL_AMOUNT){
item.node.BUDGETDETAIL_AMOUNT = this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT)
item.node.BUDGETDETAIL_AMOUNT = item.node.BUDGETDETAIL_AMOUNT ? this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT) :''
item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
}else{
item.node.BUDGETDETAIL_AMOUNT = '-'
@ -645,15 +762,113 @@ export default {
}
.firstBox{
margin-top: 8px;
.valueBox{
display: inline-block;
text-align: right;
.firstTitle{
display: inline-block;
width: 180px;
font-size: 16px;
display: inline-block;
width: 180px;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
text-align: left;
}
.addBox{
display: flex;
align-items: center;
justify-content: flex-end;
.addIcon {
width: 16px;
height: 16px;
margin-right: 2px;
}
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
.value{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #160002;
line-height: 22px;
padding-left: 10px;
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
}
.firstTitle{
display: inline-block;
width: 180px;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
}
.boxTop{
display: flex;
justify-content: space-between;
.firstTitle{
display: inline-block;
width: 180px;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
}
.amount{
display: inline-block;
text-align: right;
.addBox{
display: flex;
align-items: center;
justify-content: flex-end;
.addIcon {
width: 16px;
height: 16px;
margin-right: 2px;
}
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
.value{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 10px;
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
}
}
.valueBox{
display: inline-block;
text-align: right;
@ -693,30 +908,146 @@ export default {
}
.subBox{
margin-top: 4px;
.valueBox{
display: inline-block;
text-align: right;
.subTitle{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 10px;
display: inline-block;
width: 120px;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 10px;
display: inline-block;
width: 120px;
text-align: left;
}
.addBox{
display: flex;
align-items: center;
justify-content: flex-end;
.addIcon {
width: 16px;
height: 16px;
margin-right: 2px;
}
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
.value{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #160002;
line-height: 22px;
padding-left: 10px;
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
}
.subTitle{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 10px;
display: inline-block;
width: 120px;
}
.boxTop{
display: flex;
justify-content: space-between;
.subTitle{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 10px;
display: inline-block;
width: 120px;
}
}
.thirdBox{
display: flex;
justify-content: space-between;
margin-bottom: 8px;
.thirdTitle{
font-size: 12px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 30px;
display: inline-block;
width: 130px;
}
.boxTop{
display: flex;
justify-content: space-between;
.thirdTitle{
font-size: 12px;
font-size: 12px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 30px;
display: inline-block;
width: 130px;
}
.amount{
display: inline-block;
text-align: right;
.addBox{
display: flex;
align-items: center;
justify-content: flex-end;
.addIcon {
width: 16px;
height: 16px;
margin-right: 2px;
}
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
.value{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 30px;
display: inline-block;
width: 130px;
padding-left: 10px;
.type{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
white-space: nowrap;
}
}
}
}
.valueBox{
display: inline-block;
text-align: right;

View File

@ -19,7 +19,7 @@
<view v-if="user.Membership_Id" >
<view class="topTitle">
<p class="title">对客营收</p>
<text class="smallTitle">{{plan.RevenueMonth_Amount?plan.RevenueMonth_Amount:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text>
<text class="smallTitle">{{monthAmountAdd?monthAmountAdd:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text>
<!-- <span class="text">门店上传: <text style="margin-left: 4px" :style="{color:isBig?'red':''}">{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}</text></span>-->
</view>
<view class="box" @click="handlePage">
@ -403,6 +403,7 @@ export default {
{ name: '经营业态', value: 2 },
{ name: '区域经营', value: 3 }],
selectTab:1, //
monthAmountAdd:'',//
mobileData :{}, //
single:'', //
monthAdd:'',//
@ -432,9 +433,11 @@ export default {
option:{},//onLoadoption
isShow:false, //
isShowTitle:0,//
isShowId:0,//id
plan:{},//
ShareShopCountYes:0,//
yesterdayAllPay:0,//
noChangeLastDay: lastDay,
wechatPushSalesList: null, //
seat:{},//
nearServiceInfo:{
@ -446,7 +449,8 @@ export default {
yearNoticeText:'',
thisMonth:0,//
isSuccess:false,//
isReturn : true
isReturn : true,
isSuggestion:false,//
}
},
watch:{
@ -458,8 +462,33 @@ export default {
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
this.isReturn = false
}
if (userInfo.userData.AuthorityInfo['e2fb458b-d1bd-48fa-805e-fc93dc71efb7'] === 1 || userInfo.userData.AuthorityInfo['ea2fc404-d924-4c88-98de-1f4d96137745'] === 1){
this.getSuggestion()
}
this.seat = uni.getStorageSync('seatInfo')
if (!this.seat){
//stroge
wx.getFuzzyLocation({
type:'gcj02',
altitude:true,
success: (res) =>{
let seatInfo = {
latitude:res.latitude,
longitude:res.longitude
}
uni.setStorageSync('seatInfo', seatInfo);
this.seat = seatInfo
}
})
}else{
//
this.nearestService()
}
if (!this.isReturn){
console.log('watch')
this.getData(this.option)
this.handleNoticeMonth()
this.handleNoticeYear()
}
},
deep:true
@ -536,17 +565,18 @@ export default {
this.isReturn = false
}
if (!this.isReturn){
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
console.log('userInfo',userInfo.userData.AuthorityInfo)
//
for(let key in this.toDoMsg){
if (key === 'd405ae13-3388-41c0-a5f6-d11194d0a943' && this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']){
this.isShow = true
this.isShowTitle = this.toDoMsg['d405ae13-3388-41c0-a5f6-d11194d0a943']
}
if (userInfo.userData.AuthorityInfo['e2fb458b-d1bd-48fa-805e-fc93dc71efb7'] === 1 || userInfo.userData.AuthorityInfo['ea2fc404-d924-4c88-98de-1f4d96137745'] === 1){
this.getSuggestion()
}
//option
this.option = option
//
if (this.user.Membership_Id){
console.log('onLoad')
this.getData(option)
}
//
@ -601,6 +631,21 @@ export default {
},
methods:{
...mapActions(['memberLogin','getLoginCode']),
async getSuggestion(){
let req = {
ModuleGuids:'e2fb458b-d1bd-48fa-805e-fc93dc71efb7,ea2fc404-d924-4c88-98de-1f4d96137745',
ProvinceCode:'340000'
}
const data = await request.$webGet('CommercialApi/Suggestion/GetMemberUnreadData',req)
if (data.Result_Data.data){
if (data.Result_Data.data!=='0'){
this.isShow = true
this.isShowTitle = data.Result_Data.data
this.isShowId = data.Result_Data.key
}
}
console.log('data111111111111',data)
},
//
async handleNoticeMonth(){
let date = new Date(this.lastDay)
@ -620,10 +665,12 @@ export default {
PageSize:10
}
const data = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',req)
this.monthNoticeText = data.Result_Data.List[0].ANALYSIS_CONTENT
this.monthNoticeText = data.Result_Data.List[0]?data.Result_Data.List[0].ANALYSIS_CONTENT:''
},
async handleNoticeYear(){
console.log('handleNoticeYear',this.lastDay)
let date = new Date(this.lastDay)
console.log(2222)
let y = date.getFullYear()
let m = date.getMonth() + 1
if(m<10){
@ -640,7 +687,9 @@ export default {
PageSize:10
}
const totalData = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',reqYear)
this.yearNoticeText = totalData.Result_Data.List[0].ANALYSIS_CONTENT
if (totalData.Result_Data.List[0]){
this.yearNoticeText = totalData.Result_Data.List[0].ANALYSIS_CONTENT
}
console.log('this.yearNoticeText ',this.yearNoticeText )
},
async nearestService(){
@ -651,7 +700,7 @@ export default {
latitude:seat.latitude,
}
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
console.log('data',data)
console.log('data1',data)
let res = {
SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//
SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//
@ -765,7 +814,12 @@ export default {
this.$util.toNextRoute('redirectTo', '/pages/register/register')
},
handleSearch(){
this.$util.toNextRoute('navigateTo', '/pages/suggestion/suggestion')
let req = {
SuggestionIds:this.isShowId
}
request.$webGet('CommercialApi/Suggestion/RecordReadingLog',req).then(()=>{
this.$util.toNextRoute('navigateTo', '/pages/suggestion/suggestion')
})
},
//
onRefresh(){
@ -911,11 +965,12 @@ export default {
ShowCompareRate: true
}
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
console.log('res222222',res)
flag3 = true
// data
let result = res.Result_Data
for(let key in result){
if (key!=='RevenuePushModel' && key!=='GrowthRate'){
if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount'){
let all = 0
//
result[key].forEach(item=>{
@ -931,7 +986,7 @@ export default {
})
}
}
this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount)
this.modelProgress = result.BusinessTypeList
this.regionProgress = result.BusinessTradeList
this.areaProgress = result.SPRegionList
@ -967,12 +1022,12 @@ export default {
bindDateChange(e){
let isOnRefresh = false
let startTime = new Date(this.startDate).getTime()
let endTime = new Date(this.lastDay).getTime() - 8 * 3600 * 1000 //
let endTime = new Date(this.noChangeLastDay).getTime() - 8 * 3600 * 1000 //
const date = new Date(e.detail.value).getTime() - 8 * 3600 * 1000
let startDate = new Date(this.startDate)
let startMonth = startDate.getMonth() + 1
let startDay = startDate.getDate()
let endDate = new Date(this.lastDay)
let endDate = new Date(this.noChangeLastDay)
let endMonth = endDate.getMonth() + 1
let endDay = endDate.getDate()
console.log('this.startDate',this.startDate)