This commit is contained in:
cclu 2023-04-13 20:55:51 +08:00
parent d29a5fc4e7
commit 99ce5e8233
17 changed files with 1426 additions and 187 deletions

View File

@ -131,6 +131,12 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "serviceDetail",
"style": {
"navigationBarTitleText": ""
}
}
]
},

View File

@ -28,7 +28,7 @@
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">业态适配型</p>
<p class="title">业态交易值占比</p>
<div v-if="businessTypeList.series[0].data.length>0">
<business-format :data="businessTypeList"/>
<analyse :analyseInfo="{analysisins_type: 1405,analysisins_format: 2000}" />
@ -233,17 +233,18 @@ 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)
const data = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeRevenue',req)
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),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))})
res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2)),number:Number(item.data)})
}
})
let result= {
@ -263,32 +264,41 @@ export default {
Serverpart_ID:this.serviceInfo.Serverpart_ID
}
const data = await request.$webGet('CommercialApi/Revenue/GetTransactionConvert',req)
console.log('data123123',data)
let customerOrder = []
let customerMax = 0
let carLit = []
let carLitMax = 0
data.Result_Data.TransactionList.data.forEach(item=>{
let index = item[0]
if (index === 0 ||index === 4 ||index === 8 ||index === 12 ||index === 16||index === 20||index === 23){
if (customerMax<item[1]){
customerMax = item[1]
if (data.Result_Data.TransactionList.data.length>0){
data.Result_Data.TransactionList.data.forEach((item,index)=>{
if (index % 2 === 1 && index!==data.Result_Data.TransactionList.data.length-1){
}else{
if (customerMax<item[1]){
customerMax = item[1]
}
customerOrder.push(item[1])
}
customerOrder.push(item[1])
}
})
data.Result_Data.BayonetList.data.forEach(item=>{
let index = item[0]
if (index === 0 ||index === 4 ||index === 8 ||index === 12 ||index === 16||index === 20||index === 23){
if (carLitMax<item[1]){
carLitMax = item[1]
})
}
if (data.Result_Data.BayonetList.data.length>0){
data.Result_Data.BayonetList.data.forEach((item,index)=>{
if (index % 2 === 1 && index!==data.Result_Data.BayonetList.data.length-1){
}else{
if (carLitMax<item[1]){
carLitMax = item[1]
}
carLit.push(item[1])
}
carLit.push(item[1])
}
})
})
}
let res = {
categories: ["0:00","4:00","8:00","12:00","16:00","20:00","24:00"],
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:[
{
index:0,
@ -304,6 +314,7 @@ export default {
}
]
}
console.log('res',res)
// let res = {
// categories: ["0:00","4:00","8:00","12:00","16:00","20:00","24:00"],

View File

@ -41,7 +41,7 @@
<div class="charts">
<div class="chartsItem">
<div style="display: flex;align-items: center;justify-content: space-between">
<p class="title">入区车流分析</p>
<p class="title">昨日入区车流</p>
<div class="item">
<text class="value">{{time}}</text>
</div>
@ -55,7 +55,7 @@
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车辆累计</p>
<p class="title">月度车流累计</p>
<div>
<month-total :data="monthTotalList"/>
<analyse :analyseInfo="{analysisins_type: 1103,analysisins_format: 2000}" />
@ -87,7 +87,7 @@
<no-data v-else :type="'car'"/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{thisMonth?thisMonth:'-'}}月车辆类型占比-停留时间日均</p>
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分析/日均</p>
<div v-if="carTypeTimeData.series.length>0">
<car-type-time :data="carTypeTimeData"/>
<analyse :analyseInfo="{analysisins_type: 1104,analysisins_format: 2000}" />
@ -95,7 +95,7 @@
<no-data v-else :type="'car'"/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{thisMonth?thisMonth:'-'}}月车车辆类型-停留时间日均</p>
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分布图/日均</p>
<div v-if="timeAnalysisData.series.length>0">
<time-analysis :data="timeAnalysisData"/>
@ -105,10 +105,11 @@
</div>
<div class="chartsItem" style="margin-top: 32px">
<div class="topItem" >
<p class="title">{{thisMonth?thisMonth:'-'}}月入区占比</p>
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车型占比</p>
<div class="box" v-if="allEntry">
<text class="value">{{allEntry?allEntry:'-'}}%</text>
<view class="right">
<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>
</view>
@ -387,12 +388,20 @@ export default {
const data = await request.$webGet('CommercialApi/BigData/GetMonthAnalysis',req)
let monthList = []
let carCount = []
let carCountMax = 0
let moneyCount = []
let monetCountMax = 0
let info = []
data.Result_Data.List.forEach(item=>{
monthList.push(item.Statistics_Month + '月')
carCount.push(Number((item.Vehicle_Count / 10000).toFixed(0)))
moneyCount.push(Number((item.RevenueAmount / 10000).toFixed(0)))
if (carCountMax<item.Vehicle_Count){
carCountMax = item.Vehicle_Count
}
if (monetCountMax<item.RevenueAmount){
monetCountMax = item.RevenueAmount
}
carCount.push(Number((item.Vehicle_Count / 10000)))
moneyCount.push(Number((item.RevenueAmount / 10000)))
// showTip
info.push({
allCarCount : item.Vehicle_Count,
@ -404,8 +413,8 @@ export default {
let res = {
categories: monthList,
series:[{name:'车流量',data:carCount,type:'column',index:0,info:info},
{name:'交易金额',data:moneyCount,type:'line',index:1}]
series:[{name:'车流量',data:carCount,type:'column',index:0,info:info,max:carCountMax / 10000},
{name:'交易金额',data:moneyCount,type:'line',index:1,max:monetCountMax / 10000}]
}
this.monthTotalList = res
@ -485,10 +494,14 @@ export default {
let series = []
result.forEach(item=>{
let stayTime = []
let stayTimeMax = 0
let carType = []
let valueList = []
let typeAll = 0
item.StayTimesList.forEach(subItem=>{
if (stayTimeMax<Number(subItem.value)){
stayTimeMax = Number(subItem.value)
}
stayTime.push(Number(subItem.value))
})
item.VehicleCountList.forEach(subItem=>{
@ -503,7 +516,8 @@ export default {
series.push({
index:1,
name:'停留时间',data:stayTime
name:'停留时间',data:stayTime,
max:stayTimeMax
})
series.push({
index:0,
@ -885,7 +899,7 @@ export default {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #c97e64;
color: #a69e9f;
line-height: 20px;
}
}

View File

@ -1,7 +1,7 @@
<template>
<div class="businessFormat">
<canvas v-if="!formatPath" class="format" canvas-id="businessFormat" id="businessFormat"/>
<image v-if="formatPath" class="format" :src="formatPath"></image>
<canvas class="format" canvas-id="businessFormat" id="businessFormat" @tap="tap"/>
<!-- <image v-if="formatPath" class="format" :src="formatPath"></image>-->
</div>
</template>
@ -31,6 +31,16 @@ export default {
}
},
methods: {
tap(e){
uChartsInstance[e.target.id].showToolTip(e, {
formatter: (item, category, index, opts) => {
console.log('opts',opts)
console.log('index',index)
return item.name + ',客单数量 ' + opts.series[index].number + '笔'
}
});
uChartsInstance[e.target.id].touchLegend(e);
},
//
handleCarData(value) {
let res = value
@ -51,9 +61,9 @@ export default {
rotate: false,
rotateLock: false,
background: "#FFFFFF",
color: ["#1E80FF", "#00C2FF","#6B6FFF","#38C275","#F3BC1B","#ED6B5A","#FF9845","#74839D","#ACB9CD","#CAD0DA"],
color: ["#00C2FF","#6B6FFF","#38C275","#1E80FF", "#F3BC1B","#ED6B5A","#FF9845","#74839D","#ACB9CD","#CAD0DA"],
padding: [5, 5, 5, 5],
dataLabel: true,
dataLabel: false,
enableScroll: false,
title: {
name: '刚需型',
@ -67,9 +77,9 @@ export default {
},
legend: {
show: true,
position: "bottom",
position: "right",
lineHeight: 25,
float: 'left'
float: 'center'
},
extra: {
@ -86,7 +96,7 @@ export default {
}
});
setTimeout( ()=>{
this.canvasToTempImage('businessFormat')
// this.canvasToTempImage('businessFormat')
},2000)
},
canvasToTempImage(id){

View File

@ -1,7 +1,7 @@
<template>
<div class="consumptionCompare">
<canvas v-if="!consumptionPath" class="consumption" canvas-id="consumption" id="consumption"/>
<image v-if="consumptionPath" :src="consumptionPath" class="consumption"></image>
<canvas class="consumption" canvas-id="consumption" id="consumption" @tap="tap"/>
<!-- <image v-if="consumptionPath" :src="consumptionPath" class="consumption"></image>-->
</div>
</template>
@ -31,6 +31,20 @@ export default {
}
},
methods: {
tap(e){
uChartsInstance[e.target.id].showToolTip(e, {
formatter: (item, category, index, opts) => {
console.log('item',item)
if (item.name === 'name'){
return item.name + ':'+ item.data + '笔'
}else{
return item.name + ':'+ item.data + '辆'
}
}
});
uChartsInstance[e.target.id].touchLegend(e);
},
//
handleCarData(value) {
console.log('value',value)
@ -71,8 +85,12 @@ export default {
disableGrid: true,
axisLineColor:"#F2F2F5",
formatter: (val)=>{
if (val==='0:00' || val==='4:00'|| val==='8:00'|| val==='12:00'|| val==='16:00'|| val==='20:00'|| val==='24:00'){
return val
if (val==='0:00' || val==='4:00'|| val==='8:00'|| val==='12:00'|| val==='16:00'|| val==='20:00'|| val==='23:00'){
if (val === '23:00'){
return '24:00'
}else{
return val
}
}else{
return ''
}
@ -99,7 +117,7 @@ export default {
max:_this.getNumber(config.carLitMax),
position: 'right',
titleOffsetY: -5,
titleOffsetX: 5,
titleOffsetX: -15,
axisLineColor:"#F2F2F5"
},
]
@ -123,7 +141,7 @@ export default {
}
});
setTimeout( ()=>{
this.canvasToTempImage('consumption')
// this.canvasToTempImage('consumption')
},2000)
},
canvasToTempImage(id){

View File

@ -52,10 +52,10 @@ export default {
formatter: (item, category, index, opts) =>{
if (this.num===0){
this.num++
return item.name + ":" + opts.series[0].valueList[index] + '辆';
return '日均车辆' + ":" + opts.series[0].valueList[index] + '辆';
}else{
this.num=0
return item.name + ":" + item.data + '分';
return '平均停留' + ":" + item.data + '分';
}
}
});
@ -67,9 +67,21 @@ export default {
categories: value.categories,
series: value.series
}
this.drawCharts('carTypeTime', res)
console.log('value21312',value)
let config = {
max:this.getSplitNumber(value.series[1].max)
}
this.drawCharts('carTypeTime', res,config)
},
drawCharts(id, data) {
getSplitNumber(value){
if (value === 0){
return 5
}else{
let sum = value + value *0.2
return Number((sum / 5).toFixed(0)) * 5
}
},
drawCharts(id, data,config) {
const ctx = uni.createCanvasContext(id, this);
let phoneInfo = uni.getStorageSync('phoneInfo')
this.width = phoneInfo.screenWidth-16
@ -114,7 +126,7 @@ export default {
{
title:'单位: 分钟',
min: 0,
max: 150,
max: config.max,
position: 'right',
titleOffsetY: -5,
titleOffsetX: 5,

View File

@ -23,6 +23,7 @@ export default {
watch: {
data: {
handler(value) {
console.log('monthValue',value)
this.handleCarData(value)
},
immediate:true,
@ -35,10 +36,10 @@ export default {
formatter: (item, category, index, opts) => {
let text = ''
if (item.name === '车流量'){
text = `入区 ${opts.series[0].info[index].allCarCount} 辆, 入区率 ${opts.series[0].info[index].rate} %`
text = `入区 ${opts.series[0].info[index].allCarCount?opts.series[0].info[index].allCarCount:''} 辆, 入区率 ${opts.series[0].info[index].rate?opts.series[0].info[index].rate:''} %`
return text
}else{
return `金额 ${opts.series[0].info[index].money} 元, 单车价值 ${((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2)}`
return `金额 ${opts.series[0].info[index].money?opts.series[0].info[index].money:''} 元, 单车消费 ${opts.series[0].info[index].allCarCount?((opts.series[0].info[index].money) / opts.series[0].info[index].allCarCount).toFixed(2):''}`
}
}
@ -50,9 +51,22 @@ export default {
categories: value.categories,
series: value.series
}
this.drawCharts('monthTotal', res)
let config={
carMax:this.getSplitNumber(value.series[0].max),
moneyMax:this.getSplitNumber(value.series[1].max)
}
console.log('config',config)
this.drawCharts('monthTotal', res, config)
},
drawCharts(id, data) {
getSplitNumber(value){
if (value === 0){
return 5
}else{
let sum = value + value *0.2
return Number((sum / 5).toFixed(0)) * 5
}
},
drawCharts(id, data,config) {
const ctx = uni.createCanvasContext(id, this);
let phoneInfo = uni.getStorageSync('phoneInfo')
let width = phoneInfo.screenWidth-32
@ -89,6 +103,7 @@ export default {
titleOffsetY: -5,
titleOffsetX: 15,
min: 0,
max:config.carMax
},
{
position: "right",
@ -98,6 +113,7 @@ export default {
titleOffsetY: -5,
titleOffsetX: -15,
min: 0,
max:config.moneyMax
}]
},
legend: {

View File

@ -8,11 +8,11 @@
<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>
<p class="text">单车价值 <text class="unit">/</text></p>
</div>
</div>
</div>
@ -30,13 +30,27 @@
<p class="price">{{ info.MonthAvgTicketPrice?info.MonthAvgTicketPrice:'-' }}</p>
<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>
</div>
<div class="item">
<p class="price">{{ info.MonthAvgTicketPrice?info.MonthAvgTicketPrice:'-' }}</p>
<p class="text">单车价值 <text class="unit">/</text></p>
</div>
</div>
<div class="progress">
<div class="box">
<div class="pro">
<div class="big" :style="{width:info.transactionLevel.HighConsumption_Rate +'%'}"></div>
<div class="normal" :style="{width:info.transactionLevel.NormalConsumption_Rate +'%',left:info.transactionLevel.HighConsumption_Rate+'%'}"></div>
<div class="small" :style="{width:info.transactionLevel.LowConsumption_Rate +'%',left:(Number(info.transactionLevel.HighConsumption_Rate) + Number(info.transactionLevel.NormalConsumption_Rate))+'%'}"></div>
<div class="big" :style="{width:info.transactionLevel.HighConsumption_Rate +'%'}" @click="handleShow(0)">
<view class="meng" v-if="genderList[0]">{{'高消费'}}</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>
</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>
</div>
</div>
<div class="type">
<text class="item big">高消费 {{info.transactionLevel.HighConsumption_Rate?info.transactionLevel.HighConsumption_Rate:'-'}}%</text>
@ -60,7 +74,8 @@ export default {
NormalConsumption_Rate:0,
LowConsumption_Rate:0
}
}
},
genderList:[false,false,false]
}
},
props: {
@ -77,6 +92,17 @@ export default {
}
}
},
methods:{
handleShow(num){
console.log(1111)
let list = []
this.genderList.forEach(()=>{
list.push(false)
})
this.genderList = list
this.genderList[num] = true
}
}
}
</script>
@ -109,10 +135,13 @@ export default {
margin-top: 12px;
width: 100%;
display: flex;
flex-flow: wrap;
box-sizing: border-box;
.item{
width:50%;
padding-left: 26px;
box-sizing: border-box;
margin-bottom: 12px;
.price{
font-size: 16px;
font-family: DINAlternate-Bold, DINAlternate;
@ -154,18 +183,60 @@ export default {
height: 100%;
background: #1E80FF;
border-radius: 2px 0 0 2px;
.meng{
width: 70px;
height: 20px;
box-sizing: border-box;
line-height: 20px;
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;
}
}
.normal{
position: absolute;
height: 100%;
background: #ACB9CD;
border-radius: 2px 0 0 2px;
.meng{
width: 70px;
height: 20px;
box-sizing: border-box;
line-height: 20px;
position: absolute;
display: inline-block;
padding: 0 5px;
z-index: 9;
right: 0;top: -20px;
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
}
}
.small{
position: absolute;
height: 100%;
background: #CAD0DA;
border-radius: 2px 0 0 2px;
.meng{
width: 70px;
height: 20px;
box-sizing: border-box;
line-height: 20px;
position: absolute;
display: inline-block;
padding: 0 5px;
z-index: 9;
right: 0;top: -20px;
background: rgba(0,0,0,0.6);
color:#fff;
border-radius: 2px;
}
}
}
.type{

View File

@ -43,7 +43,7 @@ export default {
woman:0,
width:0,//
customerSecondPath:'',//
genderList:[false,false],
genderList:[false,false],
}
},
props: {

View File

@ -13,7 +13,9 @@ export default {
data() {
return {
width:0,
comparePath:''
comparePath:'',
dataList: [],
selectIndex:0
}
},
props: {
@ -27,6 +29,8 @@ export default {
handler(value) {
console.log('营收对比value',value)
this.comparePath = ''
this.dataList = value
this.selectIndex = value.type
this.handleCarData(value)
},
immediate: true,
@ -35,9 +39,21 @@ export default {
},
methods: {
tap(e){
console.log('dataList',this.dataList)
uChartsInstance[e.target.id].showToolTip(e, {
formatter: (item, category, index, opts) => {
return item.name + ":" + item.data;
return item.name + ":" + item.data + '万元'
// if (this.selectIndex===0){
// if (item.name === ''){
// return item.name + ":" + this.dataList.normal[0].data[index] + '';
// }else if(item.name === ''){
// return item.name + ":" + this.dataList.normal[1].data[index] + '';
// }else if(item.name === ''){
// return item.name + ":" + this.dataList.normal[2].data[index] + '';
// }
// } else{
// return item.name + ":" + item.data
// }
}
});
uChartsInstance[e.target.id].touchLegend(e);
@ -45,9 +61,21 @@ export default {
//
handleCarData(value) {
let res = value
this.drawCharts('compare', res)
let config = {
max:this.getSplitNumber(value.max)
}
console.log('value2222222',value)
this.drawCharts('compare', res,config)
},
drawCharts(id, data) {
getSplitNumber(value){
if (value === 0){
return 5
}else{
let sum = value + value *0.2
return Number((sum / 4).toFixed(0)) * 4
}
},
drawCharts(id, data,config) {
const ctx = uni.createCanvasContext(id, this);
let _this = this
let phoneInfo = uni.getStorageSync('phoneInfo')
@ -90,7 +118,9 @@ export default {
fontSize:12,
axisLineColor:'#F2F2F5'
}
]
],
min:0,
max:config.max
},
extra: {
column: {

View File

@ -3,29 +3,29 @@
<div class="item">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/agreement.svg"></image>
<div class="info" style="margin-bottom: 24px;">
<p class="title">合同盈亏<text class="unit">/</text></p>
<p class="value">-1,743,567,98</p>
<p class="title">合同总金额<text class="unit">/</text></p>
<p class="value">{{dataInfo.ContractProfitLoss}}</p>
</div>
</div>
<div class="item" style="margin-bottom: 24px;">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/shopNumber.svg"></image>
<div class="info">
<p class="title">店铺数量<text class="unit">/</text></p>
<p class="value">28</p>
<p class="value">{{dataInfo.ShopCount}}</p>
</div>
</div>
<div class="item">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/add.svg"></image>
<div class="info">
<p class="title">2022日均坪效<text class="unit">/</text></p>
<p class="value">2786.00</p>
<p class="title">欠款金额<text class="unit">/</text></p>
<p class="value">{{dataInfo.SalesPerSquareMeter}}</p>
</div>
</div>
<div class="item">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/overShop.svg"></image>
<div class="info">
<p class="title">半年内到期门店<text class="unit">/</text></p>
<p class="value">6</p>
<p class="title">半年到期合同<text class="unit">/</text></p>
<p class="value">{{dataInfo.ExpiredShopCount}}</p>
</div>
</div>
</div>
@ -36,18 +36,19 @@ export default {
name: "revenueAnalysis",
data() {
return {
dataInfo:{}
}
},
props: {
data: {
type: Array,
default: () => []
type: Object,
default: () => {}
}
},
watch: {
data: {
handler(value) {
this.handleCarData(value)
this.dataInfo = value
}
}
},

View File

@ -26,7 +26,7 @@
</view>
</picker>
</div>
<p class="title">{{thisMonth?thisMonth:'-'}}月客群分析</p>
<p class="title">{{thisMonth?thisMonth:'-'}}月客群特征分析</p>
<div v-if="genderBubbleList.res.length>0">
<customer-second :data="genderBubbleList" />
<analyse :analyseInfo="{analysisins_type: 1203,analysisins_format: 2000}" />
@ -51,7 +51,7 @@
<no-data v-else />
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{thisMonth?thisMonth:'-'}}月业态消费偏好</p>
<p class="title">{{thisMonth?thisMonth:'-'}}月业态客单偏好</p>
<div v-if="businessTypeList.length>0">
<business-type :data="businessTypeList"></business-type>
<analyse :analyseInfo="{analysisins_type: 1206,analysisins_format: 2000}" />

View File

@ -37,8 +37,8 @@
</div>
<div class="subItem">
<div style="display: flex;align-items: center;justify-content: space-between">
<p class="title" style="margin-top: 20px">{{selectTab===0?'营收对比':selectTab===1?'客单对比':selectTab===2?'均价对比':''}}</p>
<text v-if="selectTab===0" style="margin-top: 12px">单位: </text>
<p class="title" style="margin-top: 20px">{{selectTab===0?'营收特征分析':selectTab===1?'客单对比':selectTab===2?'均价对比':''}}</p>
<text v-if="selectTab===0" style="margin-top: 12px">单位: </text>
<text v-if="selectTab===1" style="margin-top: 12px">单位: </text>
<text v-if="selectTab===2" style="margin-top: 12px">单位: </text>
</div>
@ -49,7 +49,7 @@
</div>
<div class="subItem ">
<div style="display: flex;align-items: center;justify-content: space-between">
<p class="title" style="margin-top: 20px">营收趋势</p>
<p class="title" style="margin-top: 20px">营收同比分析</p>
<text style="margin-top: 12px">单位: 万元</text>
</div>
<div v-if="trendsList.series.length>0">
@ -60,7 +60,7 @@
<analyse :analyseInfo="{analysisins_type: selectTab===0?1305:selectTab===1?1306:selectTab===2?1307:'',analysisins_format: 2000}"/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">营收占比</p>
<p class="title">{{month}}月营收类型比例</p>
<div class="progress">
<div class="top">
<div class="left">
@ -88,7 +88,7 @@
<div v-if="showNotice" class="titleTopNotice">{{monthNoticeText}}</div>
<div v-if="showNotice" class="meng" @click.stop="handleNoShowNotice"></div>
</div>
<view class="box">
<view class="box" @click="handleGoServiceInfo('month')">
<view class="top">
<view class="big">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/thisMonth.svg"></image>
@ -137,7 +137,7 @@
<div v-if="showNoticeYear" class="titleTopNotice">{{yearNoticeText}}</div>
<div v-if="showNoticeYear" class="meng" @click.stop="handleNoShowNoticeYear"></div>
</div>
<view class="box">
<view class="box" @click="handleGoServiceInfo('year')">
<view class="top">
<view class="big">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/planYear.svg"></image>
@ -223,9 +223,10 @@ export default {
analyseInfo:{
analysisins_type: 1301
},
monthNoticeText:'',
yearNoticeText:'',
lastDay:''
monthNoticeText:'',
yearNoticeText:'',
lastDay:'',
month:''
}
},
onLoad(option) {
@ -241,6 +242,12 @@ export default {
if (storeTime){
this.time = storeTime
}
let date = new Date(this.time)
let m = date.getMonth() + 1
if (m<10){
m = '0' + m
}
this.month = m
let storeServiceInfo = uni.getStorageSync('currentService')
if (storeServiceInfo){
this.serviceInfo = storeServiceInfo
@ -273,6 +280,53 @@ export default {
this.handleNoticeYear()
},
methods:{
//
handleGoServiceInfo(type){
let serviceInfo = this.serviceInfo
let num = serviceInfo.SERVERPART_NAME.indexOf('服务区')
console.log(num)
if (num!==-1){
serviceInfo.name = serviceInfo.SERVERPART_NAME.slice(0,num)
serviceInfo.unit = serviceInfo.SERVERPART_NAME.slice(num,100)
}else{
serviceInfo.name = serviceInfo.SERVERPART_NAME
}
console.log('this.plan',this.plan)
if (type==='month'){
let service = {
Budget_Amount:this.plan.BudgetMonth_Amount,
Budget_Degree:this.plan.MonthBudget_Degree,
Growth_Rate:this.plan.MonthGrowth_Rate,
Revenue_Amount:this.plan.RevenueMonth_Amount,
Serverpart_ID:serviceInfo.Serverpart_ID,
Serverpart_Name:serviceInfo.SERVERPART_NAME,
name:serviceInfo.name,
unit:serviceInfo.unit
}
const date = new Date(this.time)
let month = date.getMonth() + 1
console.log('service',service)
uni.navigateTo({
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&month=${month}&type=month`
})
}else{
let service = {
Budget_Amount:this.plan.BudgetYear_Amount,
Budget_Degree:this.plan.YearBudget_Degree,
Growth_Rate:this.yearAdd,
Revenue_Amount:this.plan.RevenueYear_Amount,
Serverpart_ID:serviceInfo.Serverpart_ID,
Serverpart_Name:serviceInfo.SERVERPART_NAME,
name:serviceInfo.name,
unit:serviceInfo.unit
}
uni.navigateTo({
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&type=year`
})
}
},
async handleNoticeMonth(){
let date = new Date(this.lastDay)
let y = date.getFullYear()
@ -394,6 +448,7 @@ export default {
}
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueCompare',req)
let RevenueAmount = [] //
let normalAmount = [] //10000
let RevenueMax = 0
let TicketCountList = [] //
let TicketMax = 0
@ -401,13 +456,16 @@ export default {
let AvgTicketMax = 0
data.Result_Data.RevenueAmountList.forEach(item=>{
let list = []
let listNormal = []
item.data.forEach(subItem=>{
let number = (subItem[1] ).toFixed(0)
let number = (subItem[1] / 10000 ).toFixed(2)
if (number>RevenueMax){
RevenueMax = number
}
list.push(number)
listNormal.push(subItem[1])
})
normalAmount.push({name:item.name,data:listNormal})
RevenueAmount.push({name:item.name,data:list})
})
data.Result_Data.TicketCountList.forEach(item=>{
@ -440,6 +498,7 @@ export default {
list:{
categories: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],
series: RevenueAmount,
normal:normalAmount,
max:RevenueMax,
type:0
},

View File

@ -121,7 +121,7 @@
</view>
</view>
</div>
<div class="list" v-for="(item,index) in dataList" :key="index">
<div class="list" v-for="(item,index) in dataList" :key="index" @click="handleToServiceDetail(item)">
<div class="top">
<div class="left">
<p class="title" ><text class="name">{{item.name}}</text>{{item.unit}}</p>
@ -189,7 +189,6 @@ export default {
//
this.month = Number(option.month)
//
console.log('this.lastDay',this.lastDay)
let date = new Date(this.lastDay)
let y = date.getFullYear()
let m = date.getMonth() + 1
@ -200,12 +199,10 @@ export default {
if (d<10){
d = '0' + d
}
console.log('d',d)
//
if (option.month){
if (Number(m) === Number(option.month)){
this.date = `${y}-${m}-${d}`
console.log('this.date',this.date)
}else{
let month
if (this.month<10){
@ -215,13 +212,10 @@ export default {
}
//
let mayDate = `${y}-${month}`
console.log('mayDate',mayDate)
let addDay = this.$util.getThisMonthDay(mayDate)
console.log('addDay',addDay)
this.date = `${mayDate}-${addDay}`
}
}
console.log('this.date',this.date)
//
if (option.item){
this.item = JSON.parse(option.item)
@ -256,6 +250,12 @@ export default {
}
},
methods:{
//
handleToServiceDetail(item){
uni.navigateTo({
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(item)}&month=${this.month?this.month:''}&type=month&select=true`
})
},
async getDateSecond(){
let req = {
StatisticsDate:this.date,
@ -266,7 +266,6 @@ export default {
const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
data.Result_Data.RegionBudgetList.forEach(item=>{
let num = item.Serverpart_Name.indexOf('服务区')
console.log(num)
if (num!==-1){
item.name = item.Serverpart_Name.slice(0,num)
item.unit = item.Serverpart_Name.slice(num,100)
@ -317,7 +316,6 @@ export default {
PageSize:10
}
}
console.log('req222',req)
const data = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',req)
this.monthText = data.Result_Data.List[0].ANALYSIS_CONTENT
this.itemText = data.Result_Data.List[0].ANALYSIS_CONTENT
@ -341,11 +339,9 @@ export default {
ProvinceCode:'340000',
StatisticsType:1
}
console.log('req111',req)
const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
data.Result_Data.RegionBudgetList.forEach(item=>{
let num = item.Serverpart_Name.indexOf('片区')
console.log(num)
if (num!==-1){
item.name = item.Serverpart_Name.slice(0,num)
item.unit = item.Serverpart_Name.slice(num,100)

View File

@ -0,0 +1,944 @@
<template>
<div class="main">
<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===''">
<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>
<view class="box" v-if="type==='month'">
<view class="top">
<view class="big">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/thisMonth.svg"></image>
</view>
<view class="text">
<view class="textTop">
<view class="left">
<p class="number">{{serviceInfo.Budget_Degree?serviceInfo.Budget_Degree + '%':'-'}}</p>
<p v-if="serviceInfo.Budget_Degree>=100" class="desc"><image class="success" src="/static/images/index/successMonth.svg"></image></p>
</view>
<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">{{serviceInfo.Growth_Rate ?Math.abs(serviceInfo.Growth_Rate) + '%':'-'}}</p>
</view>
</view>
</view>
<div class="progressPlan">
<div class="trans" :style="{width:serviceInfo.Budget_Degree > 100 ? '100%' : serviceInfo.Budget_Degree + '%'}"></div>
</div>
</view>
</view>
<view class="bottom">
<view class="success" style="margin-right: 39px">
<p class="text">本月已完成<text class="unit">/</text></p>
<p class="money">{{serviceInfo.Revenue_Amount ?serviceInfo.Revenue_Amount :'-'}}</p>
</view>
<view class="success">
<p class="text">本月计划<text class="unit">/</text></p>
<p class="money">{{serviceInfo.Budget_Amount ?serviceInfo.Budget_Amount :'-'}}</p>
</view>
</view>
</view>
<view class="box" v-if="type==='year'">
<view class="top">
<view class="big">
<image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/planYear.svg"></image>
</view>
<view class="text">
<view class="textTop">
<view class="left">
<p class="number">{{serviceInfo.Budget_Degree?serviceInfo.Budget_Degree + '%':'-'}}</p>
<p v-if="serviceInfo.Budget_Degree>=100" class="desc" style="color: #4E68FF"><image class="success" src="/static/images/index/yearSuccess.svg"></image></p>
</view>
<view class="right">
<text class="comparePlan">比计划 </text>
<div 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">{{serviceInfo.Growth_Rate?Math.abs(serviceInfo.Growth_Rate) + '%':''}}</p>
</div>
</view>
</view>
<div class="progressPlan">
<div class="transYear" :style="{width:serviceInfo.Budget_Degree + '%'}"></div>
<!-- <image class="img" :style="{width: plan.percentageYear + '%'}" src="https://eshangtech.com/ShopICO/ahyd-BID/index/progress_blue.png"></image>-->
<!-- <div class=pro :style="{width:(100 - plan.percentageYear)+ '%'}"></div>-->
</div>
</view>
</view>
<view class="bottom">
<view class="success" style="margin-right: 39px">
<p class="text">年度已完成<text class="unit">/</text></p>
<p class="money">{{serviceInfo.Revenue_Amount?serviceInfo.Revenue_Amount:'-'}}</p>
</view>
<view class="success">
<p class="text">年度计划<text class="unit">/</text></p>
<p class="money">{{serviceInfo.Budget_Amount?serviceInfo.Budget_Amount:'-'}}</p>
</view>
</view>
</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 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>
<!-- <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">
<div v-if="type==='year'" class="monthList" v-for="(item,index) in dataList" :key="index" @click="handleYearItem(item)">
<div class="top">
<div class="left">
<p class="title" ><text class="name">{{item.Statistics_Month}}</text></p>
<div class="value" >{{item.Budget_Degree}}%</div>
</div>
<div class="right">
<text class="comparePlan">比计划 </text>
<div class="box2">
<image class="addIcon" :src="Number(item.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">{{item.Growth_Rate?Math.abs(item.Growth_Rate) + '%':''}}</p>
</div>
</div>
</div>
<div class="progress">
<div class="have" :style="{width:item.Budget_Degree + '%'}"></div>
</div>
<div class="bottom">
<div class="success">
<p class="text">已完成:</p>
<text class="money">{{item.Revenue_Amount}}</text>
</div>
<div class="success">
<p class="text">计划: </p>
<text class="money">{{item.Budget_Amount }}</text>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import request from '@/util/index.js'
export default {
name: "serviceDetail",
data(){
return{
serviceInfo:{},
month:'',
dataList:[],
single:'',//
endData:'',//
type:'',
isSelect:false,
optionTime:''
}
},
onLoad(option){
console.log('option',option)
if (option.select){
this.isSelect = true
}
if (option.type === 'month'){
this.type = option.type
if (option.month){
this.optionTime = option.month
this.month = option.month
}
if (!this.month){
const date = new Date()
this.month = date.getMonth() + 1
}
if (this.month<10){
this.month = '0' + this.month
}
this.serviceInfo = JSON.parse(option.serviceInfo)
this.serviceInfo.Budget_Degree =this.$util.fmoney(this.serviceInfo.Budget_Degree)
this.getData()
}else {
this.type = option.type
this.serviceInfo = JSON.parse(option.serviceInfo)
this.getYearData()
}
},
onShow(){
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}年度计划`,
})
}
let storeTime = uni.getStorageSync('lastDay')
if (storeTime){
this.time = storeTime
}
this.single = this.$util.getThisMonthHave(this.time)
let nowTime = new Date()
let y = nowTime.getFullYear()
let month = nowTime.getMonth() + 1
if (month<10){
month = '0'+ month
}
this.endData = `${y}-${month}`
},
methods:{
handleYearItem(item){
let currentService = uni.getStorageSync('currentService')
let service = {
Budget_Amount:item.Budget_Amount,
Budget_Degree:item.Budget_Degree,
Growth_Rate:item.Growth_Rate,
Revenue_Amount:item.Revenue_Amount,
Serverpart_ID:currentService.Serverpart_ID,
Serverpart_Name:currentService.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
}
let month = item.Statistics_Month
uni.navigateTo({
url:`/pages/commercialBI/serviceDetail?serviceInfo=${JSON.stringify(service)}&month=${month}&type=month`
})
},
//
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
console.log('e',e)
this.getData(e.detail.value)
},
async getYearData(){
let storeServiceInfo = uni.getStorageSync('currentService')
let lastDay = uni.getStorageSync('lastDay')
let req = {
StatisticsDate: lastDay,
ProvinceCode:'340000',
StatisticsType:3,
SPRegionTypeID:storeServiceInfo.SPRegionType_ID,
ServerpartID:storeServiceInfo.Serverpart_ID
}
const totalData = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
console.log('totalData',totalData)
this.dataList = totalData.Result_Data.RegionBudgetList
},
async getData(changeTime){
let time = uni.getStorageSync('lastDay')
let date = ''
if (changeTime){
date = new Date(changeTime)
}else{
date = new Date(time)
}
const nowDate = new Date()
let nowMonth = nowDate.getMonth() + 1
let y = date.getFullYear()
let m = this.month
let req = {}
if (nowMonth === m ){
req = {
BUDGETPROJECT_YEAR: y,
STATISTICS_MONTH:`${y}${m}`,
SERVERPART_ID:this.serviceInfo.Serverpart_ID,
ACCOUNT_CODE:'6001,6401,6402',
STATISTICS_DATE: time
}
}else{
let reqDate = new Date(changeTime)
let y = reqDate.getFullYear()
let m = reqDate.getMonth() + 1
if (m<10){
m = '0' + m
}
req = {
BUDGETPROJECT_YEAR: y,
STATISTICS_MONTH: `${y}${m}`,
SERVERPART_ID:this.serviceInfo.Serverpart_ID,
ACCOUNT_CODE:'6001,6401,6402',
}
}
const totalData = await request.$webGet('CommercialApi/Budget/GetBudgetProjectDetailList',req)
console.log('totalData',totalData)
this.dataList = totalData.Result_Data.List
this.dataList.forEach(item=>{
if (item.children){
item.children = this.editData(item.children)
}else{
if (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 = '-'
}
}
})
this.$forceUpdate()
},
//
editData(value){
value.forEach(item=>{
if (item.children){
item.children = this.editData(item.children)
}else{
if (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 = '-'
}
}
})
return value
},
again(value){
this.editData(value)
}
}
}
</script>
<style scoped lang="scss">
.main{
width: 100%;
min-height: 100vh;
box-sizing: border-box;
padding: 0 16px;
.title{
font-size: 32rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
}
.top{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.title{
font-size: 32rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
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;
}
}
}
}
.box {
width: 100%;
padding: 12px 16px;
box-sizing: border-box;
border-radius: 8px;
background: #f5f2f2;
margin-top: 12px;
.top {
width: 100%;
display: flex;
.big {
width: 40px;
height: 40px;
background: #ffffff;
border-radius: 8px;
border: 1px solid #ebebeb;
display: flex;
justify-content: center;
align-items: center;
margin-right: 8px;
.icon {
width: 20px;
height: 20px;
}
}
.text {
width: calc(100% - 60px);
padding: 2px 0;
.textTop{
display: flex;
align-items: center;
justify-content: space-between;
.left{
display: flex;
align-items: center;
.number {
font-size: 36rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #150002;
line-height: 40rpx;
}
.desc{
display: flex;
align-items: center;
margin-left: 8px;
font-size: 14px;
color: #FF7043;
.success{
width: 20px;
height: 20px;
margin-right: 4px;
}
}
}
.right{
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
.comparePlan{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 36rpx;
white-space: nowrap;
}
.box2{
display: flex;
align-items: center;
.text{
font-size: 14px;
font-family: DINAlternate-Bold, DINAlternate;
color: #150002;
font-weight: bold;
line-height: 40rpx;
}
.addIcon {
width: 16px;
height: 16px;
margin-right: 2px;
}
}
}
}
.progressPlan{
width: 100%;
height: 8px;
border-radius: 5px;
background: #fff;
margin-top: 8px;
position: relative;
overflow: hidden;
.trans{
height: 8px;
position: absolute;
left: 0;top: 0;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_orange.png")no-repeat 100% 100%;
}
.transYear{
height: 8px;
position: absolute;
left: 0;top: 0;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_blue.png")no-repeat 100% 100%;
}
//.img{
// width: 100%;
// height: 100%;
// position: absolute;
// top: 0;
// left: 0;
// z-index:1;
//}
//.pro{
// height: 100%;
// position: absolute;
// top: 0;right: 0;
// background: #fff;
// z-index:2;
//}
}
}
}
.bottom {
display: flex;
margin-top: 16px;
padding-left: 48px;
.success {
.text {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786b6c;
line-height: 40rpx;
margin-bottom: 2px;
.unit {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 40rpx;
margin-left: 2px;
}
}
.money {
font-size: 28rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: 600;
color: #160002;
line-height: 40rpx;
}
}
}
}
.list{
margin-top: 12px;
.item{
width: 100%;
box-sizing: border-box;
padding: 12px;
background: #F5F5F5;
margin-bottom: 12px;
border-radius: 8px;
.bigTitle{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
.name{
color: #150002;
font-size: 18px;
}
}
.firstBox{
margin-top: 8px;
.firstTitle{
display: inline-block;
width: 180px;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
}
.valueBox{
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;
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;
}
}
}
.subBox{
margin-top: 4px;
.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;
}
.valueBox{
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;
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;
}
}
}
.top{
display: flex;
align-items: center;
.thirdTitle{
font-size: 12px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
padding-left: 30px;
}
.right{
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
.comparePlan{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
white-space: nowrap;
}
.box2{
display: flex;
align-items: center;
.text{
font-size: 14px;
font-family: DINAlternate-Bold, DINAlternate;
color: #150002;
font-weight: bold;
line-height: 40rpx;
}
.addIcon {
width: 16px;
height: 16px;
margin-right: 2px;
}
}
}
}
.progressPlan{
width: calc(100% - 30px);
box-sizing: border-box;
margin-left: 30px;
height: 8px;
border-radius: 5px;
background: #fff;
margin-top: 8px;
position: relative;
overflow: hidden;
.trans{
height: 8px;
position: absolute;
left: 0;top: 0;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_orange.png")no-repeat 100% 100%;
}
.transYear{
height: 8px;
position: absolute;
left: 0;top: 0;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_blue.png")no-repeat 100% 100%;
}
}
}
}
}
}
}
.monthList{
width: 100%;
box-sizing: border-box;
padding: 12px;
background: #F5F5F5;
margin-bottom: 12px;
border-radius: 8px;
.top{
display: flex;
align-items: center;
justify-content: space-between;
.left{
display: flex;
align-items: center;
.icon{
width: 20px;
height: 20px;
margin-right: 8px;
}
.title{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 18px;
.name{
color: #150002;
font-size: 18px;
}
}
.value{
font-size: 14px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #FF6D40;
line-height: 16px;
margin-left: 4px;
}
}
.right{
display: flex;
align-items: center;
.comparePlan{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 36rpx;
white-space: nowrap;
}
.box2{
display: flex;
align-items: center;
.text{
font-size: 14px;
font-family: DINAlternate-Bold, DINAlternate;
color: #150002;
font-weight: bold;
line-height: 40rpx;
}
.addIcon {
width: 16px;
height: 16px;
margin-right: 2px;
}
}
}
}
.progress{
width: 100%;
height: 8px;
background: #fff;
border-radius: 6px;
margin: 8px 0 16px;
position: relative;
overflow: hidden;
.have{
position: absolute;
height: 100%;
border-radius: 6px;
top: 0;left: 0;
background:#778CFD;
}
}
.bottom {
display: flex;
justify-content: space-between;
margin-top: 16px;
.success {
width: calc(50% - 4px);
display: flex;
align-items: center;
.text{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
line-height: 20px;
}
.money {
margin-left: 8px;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #a69e9f;
line-height: 20px;
}
}
}
}
}
</style>

View File

@ -395,9 +395,9 @@ export default {
{ imgUrl: '/static/images/index/business_icon.svg', path: '/pages/commercialBI/managePortrait', name: '经营画像' },
{ imgUrl: '/static/images/index/trade.svg', path: '/pages/commercialBI/businessPortrait', name: '交易画像' },
{ imgUrl: '/static/images/index/brand.svg', path: '/pages/commercialBI/formatPortrait', name: '业态品牌' },],
detailTypeList:[{ name: '分润门店', unit: '/个', value: '-',yesterValue:'-', add: '-', imgIcon: '/static/images/index/store.svg' },
detailTypeList:[{ name: '分润门店', unit: '/个', value: '-',yesterValue:'-', add: '', imgIcon: '/static/images/index/store.svg' },
{ name: '驿达分润', unit: '/元', value: '-',yesterValue:'-', imgIcon: '/static/images/index/yidaFenrun.svg' },
{ name: '订单配送', unit: '/单', value: '-',yesterValue:'-', add: '-', imgIcon: '/static/images/index/orderDelivery.svg' },
{ name: '订单配送', unit: '/单', value: '-',yesterValue:'-', add: '', imgIcon: '/static/images/index/orderDelivery.svg' },
{ name: '采购金额', unit: '/元', value: '-',yesterValue:'-', imgIcon: '/static/images/index/purchaseAmount.svg' },],
propOfRevenList:[ { name: '经营模式', value: 1 },
{ name: '经营业态', value: 2 },
@ -446,12 +446,21 @@ export default {
yearNoticeText:'',
thisMonth:0,//
isSuccess:false,//
isReturn : true
}
},
watch:{
user:{
handler:function (value){
this.getData(this.option)
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
console.log(userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee'])
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
this.isReturn = false
}
if (!this.isReturn){
this.getData(this.option)
}
},
deep:true
},
@ -481,82 +490,101 @@ export default {
...mapGetters({'user':'getUser'})
},
onLoad(option){
//
this.single = timestampToTime((new Date(this.lastDay).getTime()))
//
let systemInfo = uni.getSystemInfoSync()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
//
const date = new Date(this.lastDay)
this.thisDay = getThisDay(date.getDay())
this.thisMonth = this.$util.getThisTimeMonth(this.lastDay)
//
uni.setStorageSync('lastDay',this.lastDay)
//
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']
}
}
//option
this.option = option
//
if (this.user.Membership_Id){
this.getData(option)
}
//
//
//
this.seat = uni.getStorageSync('seatInfo')
console.log('this.seat',this.seat)
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()
}
//
this.handleNoticeMonth()
this.handleNoticeYear()
//
this.single = timestampToTime((new Date(this.lastDay).getTime()))
//
let systemInfo = uni.getSystemInfoSync()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
//
console.log('this.lastDay',this.lastDay)
const date = new Date(this.lastDay)
//
let y = date.getFullYear()
let m = date.getMonth() + 1
let d = date.getDate()
let howDay
if (d - 8 <0){
let k = 8 - d
m = m - 1
const time = `${y}-${m}`
howDay = this.$util.getThisMonthDay(time)
this.startDate = `${y}-${m}-${howDay - k}`
}else{
this.startDate = `${y}-${m}-${d - 8}`
let y = date.getFullYear()
let m = date.getMonth() + 1
let d = date.getDate()
let howDay
let day
if (d - 8 <0){
let k = 8 - d
m = m - 1
const time = `${y}-${m}`
howDay = this.$util.getThisMonthDay(time)
if (m<10){
m = '0' + m
}
this.endData = new Date()
setTimeout(()=>{
if (!this.isSuccess){
uni.showToast({
title: '加载失败,请下拉刷新重新加载',
icon: 'none',
duration: 3000
})
}
},10000)
this.startDate = `${y}-${m}-${howDay - k}`
}else{
if (m<10){
m = '0' + m
}
if (d - 8 <10){
day = d - 8
day = '0' + day
}
this.startDate = `${y}-${m}-${day}`
}
this.endData = new Date()
this.thisDay = getThisDay(date.getDay())
this.thisMonth = this.$util.getThisTimeMonth(this.lastDay)
//
uni.setStorageSync('lastDay',this.lastDay)
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
console.log(userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee'])
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
this.isReturn = false
}
if (!this.isReturn){
//
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']
}
}
//option
this.option = option
//
if (this.user.Membership_Id){
this.getData(option)
}
//
//
//
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()
}
//
this.handleNoticeMonth()
this.handleNoticeYear()
console.log('date',date)
setTimeout(()=>{
if (!this.isSuccess){
uni.showToast({
title: '加载失败,请下拉刷新重新加载',
icon: 'none',
duration: 3000
})
}
},10000)
}
},
onShow(){
// tabbar tabbar
@ -648,13 +676,34 @@ export default {
this.showNoticeYear = false
},
handlePlanPageGo(type){
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
if (!this.isReturn){
this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
}else{
uni.showToast({
title: '暂无权限请联系管理员',
icon: 'none'
})
}
},
handlePage(){
this.$util.toNextRoute('navigateTo', `/pages/everdayRenven/index?time=${this.lastDay}`)
if (!this.isReturn){
this.$util.toNextRoute('navigateTo', `/pages/everdayRenven/index?time=${this.lastDay}`)
}else{
uni.showToast({
title: '暂无权限请联系管理员',
icon: 'none'
})
}
},
handleGoTab(item){
this.$util.toNextRoute('navigateTo', `${item.path}?time=${this.lastDay}&serviceInfo=${JSON.stringify(this.nearServiceInfo)}`)
if (!this.isReturn){
this.$util.toNextRoute('navigateTo', `${item.path}?time=${this.lastDay}&serviceInfo=${JSON.stringify(this.nearServiceInfo)}`)
} else{
uni.showToast({
title: '暂无权限请联系管理员',
icon: 'none'
})
}
},
getData(option){
//
@ -926,6 +975,10 @@ export default {
let endDate = new Date(this.lastDay)
let endMonth = endDate.getMonth() + 1
let endDay = endDate.getDate()
console.log('this.startDate',this.startDate)
console.log('date',date)
console.log('endTime',endTime)
console.log('startTime',startTime)
if (date > endTime || date < startTime){
isOnRefresh = false
}else{
@ -938,9 +991,10 @@ export default {
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
this.onRefresh()
}else{
uni.showToast({
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据`,
uni.showModal({
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据,更多数据请登陆商业综合平台查看`,
icon:'none',
showCancel: false,
duration:3000
});
}

View File

@ -307,10 +307,7 @@ export default {
// iconPath: 'https://eshangtech.com/ShopICO/ahyd-BID/service/health.svg',
id: value.Serverpart_ID,
latitude: value.latitude,
longitude: value.longitude,
callout: {
display: 'ALWAYS'
}
longitude: value.longitude
})
// }
this.markers = markers