This commit is contained in:
cclu 2023-07-05 19:44:42 +08:00
parent 647a59fd05
commit f0833a6392
5 changed files with 757 additions and 253 deletions

BIN
ahyd_DIB.zip Normal file

Binary file not shown.

View File

@ -5,7 +5,7 @@
<commercial-type :have="0"/> <commercial-type :have="0"/>
</div> </div>
<div class="main" v-if="isHaveData"> <div class="main" v-if="isHaveData">
<div class="header" :style="{backgroundImage: 'url('+ 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/car.svg' +')'}"> <div v-if="!isShowAllProvince" class="header" :style="{backgroundImage: 'url('+ 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/car.svg' +')'}">
<div class="analyse" v-if="analyseText"> <div class="analyse" v-if="analyseText">
<text class="title">分析</text> <text class="title">分析</text>
<text class="content">{{analyseText}}</text> <text class="content">{{analyseText}}</text>
@ -42,7 +42,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="charts">
<div v-if="isShowAllProvince" class="headerTop" :style="{height:(menu.bottom + 6) + 'px'}">
<div class="box" :style="{top:(menu.bottom - (menu.height / 2)) + 'px'}">
<div class="icon" @click="handleBack">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"></image>
</div>
<text class="title">车流画像</text>
<!-- 占位 -->
<div class="seize"></div>
</div>
</div>
<div class="charts" v-if="!isShowAllProvince">
<div class="chartsItem"> <div class="chartsItem">
<div style="display: flex;align-items: center;justify-content: space-between"> <div style="display: flex;align-items: center;justify-content: space-between">
<p class="title">昨日入区车流</p> <p class="title">昨日入区车流</p>
@ -57,7 +68,6 @@
<no-data v-if="!carData.length" :type="'car'"/> <no-data v-if="!carData.length" :type="'car'"/>
</div> </div>
<div class="chartsItem" style="margin-top: 32px"> <div class="chartsItem" style="margin-top: 32px">
<p class="title">月度车流累计</p> <p class="title">月度车流累计</p>
<div> <div>
@ -86,9 +96,9 @@
<div v-if="homePlace.length>0"> <div v-if="homePlace.length>0">
<home-place :selectProvinceName="selectProvinceName" :selectValue="selectValue" :homeData="homePlace" :homeCity="cityPlace" @getHomeDate="getHomeData"/> <home-place :selectProvinceName="selectProvinceName" :selectValue="selectValue" :homeData="homePlace" :homeCity="cityPlace" @getHomeDate="getHomeData"/>
<div style="display: flex"> <div style="display: flex">
<!-- <div class="selectType" >--> <!-- <div class="selectType" >-->
<!-- <view :class="allProvince?'item itemSelect':'item itemUnSelect'" @click="handleAllProvince">全部省份</view>--> <!-- <view :class="allProvince?'item itemSelect':'item itemUnSelect'" @click="handleAllProvince">全部省份</view>-->
<!-- </div>--> <!-- </div>-->
<div class="selectType"> <div class="selectType">
<div :class="carType===item.value?'item itemSelect':'item itemUnSelect'" v-for="(item,index) in carTypeList" :key="index" @click="handleCarType(item)"> <div :class="carType===item.value?'item itemSelect':'item itemUnSelect'" v-for="(item,index) in carTypeList" :key="index" @click="handleCarType(item)">
<div class="text">{{item.name}}</div> <div class="text">{{item.name}}</div>
@ -100,6 +110,7 @@
</div> </div>
<no-data v-if="!homePlace.length" :type="'car'"/> <no-data v-if="!homePlace.length" :type="'car'"/>
</div> </div>
<div class="chartsItem" style="margin-top: 32px"> <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"> <div v-if="carTypeTimeData.series.length>0">
@ -108,6 +119,7 @@
</div> </div>
<no-data v-if="!carTypeTimeData.series.length" :type="'car'"/> <no-data v-if="!carTypeTimeData.series.length" :type="'car'"/>
</div> </div>
<div class="chartsItem" style="margin-top: 32px"> <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"> <div v-if="timeAnalysisData.series.length>0">
@ -116,6 +128,7 @@
</div> </div>
<no-data v-if="!timeAnalysisData.series.length" :type="'car'"/> <no-data v-if="!timeAnalysisData.series.length" :type="'car'"/>
</div> </div>
<div class="chartsItem" style="margin-top: 32px"> <div class="chartsItem" style="margin-top: 32px">
<div class="topItem" > <div class="topItem" >
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车型占比</p> <p class="title">{{thisMonth?thisMonth:'-'}}月入区车型占比</p>
@ -135,11 +148,95 @@
<no-data v-if="!percentEntryData.length" :type="'car'"/> <no-data v-if="!percentEntryData.length" :type="'car'"/>
</div> </div>
</div> </div>
<div v-else class="otherCharts" :style="{paddingTop:(menu.bottom + 18)+'px'}">
<div v-if="regionList.length>0">
<view class="chartsTop">
<view class="left">
<div class="serviceArea" :style="{top : (menu.bottom + 14) + 'px'}" @click="handleGoSelectService">
<div class="picker">
<div class="selectService">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/fixed.svg"></image>
<view class="select">
<view class="content">
<view class="uni-input">{{serviceInfo.SERVERPART_NAME}}</view>
<p class="area" v-if="serviceInfo.Serverpart_ID">{{serviceInfo.SPREGIONTYPE_NAME}}</p>
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
</div>
</div>
</div>
</view>
<view class="right">
<picker mode="date" :value="searchText" :end="lastDay" @change="changeAllProvinceSearch" >
<view class="time">
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ searchText }}</view>
<image class="icon" src="/static/images/index/arrow_bottom.svg"></image>
</view>
</picker>
</view>
</view>
</div>
<div class="list">
<div class="listItem" v-for="(item,index) in regionList" :key="index" @click="handleNoneChild(item)">
<div class="itemTop">
<div class="itemLeft">
<span class="serverName">{{item.name}}</span>
<span class="value">{{item.entry}} / {{item.flow}}</span>
<!-- <span class="value">1,000,000 / 1,000,000</span>-->
</div>
<div class="itemCenter">
<span class="serverName">入区率</span>
<span class="value">{{item.flowRate}}</span>
</div>
<div class="itemRight">
<div style="height: 100%;display: flex;align-items: center;">
<image :style="{transform:item.showChild?`rotate(90deg)`:''}" class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"/>
</div>
</div>
<div class="other">
</div>
</div>
<block v-if="item.showChild">
<scroll-view scroll-y="true" style="height: 400px">
<div class="serviceItem" v-for="(subItem,subIndex) in item.spList" :key="subIndex" :style="{background:subIndex%2===0?'#FCFCFC':'#f7f7f7'}" @click.stop="()=>{}">
<div class="subItemTop">
<div class="serviceItemLeft">
<div style="display: flex;align-items: center">
<image class="leftIcon" src="/static/images/authority/serverpart.png"/>
<span class="name">{{subItem.name}}</span>
</div>
</div>
<div class="serviceItemCenter">
<span class="title">入区流量/断面流量</span>
</div>
<div class="serviceItemRight">
<span class="text">//小车型</span>
</div>
</div>
<div class="subItemBottom">
<div class="subBottomItem" v-for="(thirdItem,thirdIndex) in subItem.regionList" :key="thirdIndex">
<div class="subBottomItemTop">
<div class="topLeft">
<span :class="thirdIndex===0?'position0':'position1'">{{thirdItem.name}}</span>
<span v-if="thirdItem.entryRate!==0 && thirdItem.Vehicle_Count<thirdItem.SectionFlow_Count">:</span>
<span class="rate" :style="{color:thirdItem.entryRate>30 || thirdItem.entryRate<5?'red':''}" v-if="thirdItem.entryRate!==0 && thirdItem.Vehicle_Count<thirdItem.SectionFlow_Count">{{thirdItem.entryRate}}%</span>
</div>
<div class="topCenter">
<span>{{thirdItem.Vehicle_Count}}/{{thirdItem.SectionFlow_Count}}</span>
</div>
<div class="topRight">
<span>{{thirdItem.LargeVehicle_Count}}/{{thirdItem.MediumVehicle_Count}}/{{thirdItem.MinVehicle_Count}}</span>
</div>
</div>
</div>
</div>
</div>
</scroll-view>
</block>
</div>
</div> </div>
<div v-else class="noData">
<div class="box">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/noData.svg"></image>
<p class="text">抱歉,第三方数据未传,无法分析</p>
</div> </div>
</div> </div>
</div> </div>
@ -156,13 +253,15 @@ import MonthTotal from "./components/car/monthTotal.vue";
import NoData from "./components/noData.vue"; import NoData from "./components/noData.vue";
import Analyse from "./components/analyse.vue"; import Analyse from "./components/analyse.vue";
import CommercialType from "./commercialType.vue"; import CommercialType from "./commercialType.vue";
import shopCell from "../everdayRenven/components/listUnit.vue";
import anhuiYestodayRevenueData from "../everdayRenven/components/anhuiYestodayRevenueData";
export default { export default {
name: "carPortrait", name: "carPortrait",
data(){ data(){
const lastDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD', -1) const lastDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD', -1)
return { return {
menu:{}, // menu:{}, //
serviceArray:["123465","123465","123465","123465","123465"], // serviceArray:[], //
serviceIndex:0, // serviceIndex:0, //
area:'片区', // area:'片区', //
labelList:[], // labelList:[], //
@ -188,6 +287,7 @@ export default {
serviceInfo:{}, // serviceInfo:{}, //
backType:'',// backType:'',//
analyseText:'',// analyseText:'',//
statusBarHeight:'',
single:'',// single:'',//
lastDay:lastDay, lastDay:lastDay,
endTime:'', endTime:'',
@ -200,9 +300,16 @@ export default {
selectProvinceName:'',// selectProvinceName:'',//
selectValue:'',// selectValue:'',//
allProvince:true,// allProvince:true,//
isShowAllProvince:false,//
regionList: null,
theRequest: null,
headMsg:null,
searchEndTime:'',
searchText:'',//
} }
}, },
components: { components: {
shopCell,
CommercialType, CommercialType,
Analyse, NoData, PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis,MonthTotal}, Analyse, NoData, PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis,MonthTotal},
computed:{ computed:{
@ -234,12 +341,17 @@ export default {
this.time = storeTime this.time = storeTime
} }
this.single = this.$util.getThisMonthHave(this.time) this.single = this.$util.getThisMonthHave(this.time)
const date = new Date(this.single) this.searchText = this.time
const date = new Date(this.time)
// //
let m = date.getMonth() + 1 let m = date.getMonth() + 1
if (m<10){ if (m<10){
m = '0' + m m = '0' + m
} }
let d = date.getDate()
if (d<10){
d = '0'+ d
}
this.thisMonth = m this.thisMonth = m
let systemInfo = uni.getSystemInfoSync() let systemInfo = uni.getSystemInfoSync()
// //
@ -257,6 +369,20 @@ export default {
}else{ }else{
this.serviceInfo = storeServiceInfo this.serviceInfo = storeServiceInfo
} }
this.theRequest = {
GroupType: 1000,
ProvinceCode: 340000,
ServerpartIds: "",
ShopAnalysisType: 0,
month: `${y}${m}`,
time: `${y}-${m}-${d}`,
}
if (this.serviceInfo.SERVERPART_NAME==='安徽驿达'){
this.isShowAllProvince = true
}
if (this.isShowAllProvince === true){
this.getDetail(this.theRequest)
}else{
// //
this.getServiceInfo() this.getServiceInfo()
// //
@ -273,9 +399,14 @@ export default {
this.getPercentEntry() this.getPercentEntry()
// //
this.getLabelDetail() this.getLabelDetail()
}
}, },
onReady(){ onReady(){
},
onHide(){
this.isShowAllProvince = false
}, },
onUnload() { onUnload() {
this.$util.addUserBehavior() this.$util.addUserBehavior()
@ -284,8 +415,94 @@ export default {
}) })
this.selectProvinceName = '' this.selectProvinceName = ''
this.carType = '' this.carType = ''
this.searchText=''
}, },
methods:{ methods:{
handleNoneChild(obj){
this.regionList.forEach(item=>{
if (item.name === obj.name){
item.showChild = !item.showChild
}
})
},
async getDetail(obj) {
uni.showLoading({
title: '正在加载...'
})
const requestParamas = {
Statistics_Date: obj.time ,
Statistics_Month: obj.month ,
Province_Code: obj.ProvinceCode ,
pushProvinceCode: obj.ProvinceCode ,
Serverpart_ID: obj.GroupType != 1020 ? obj.ServerpartIds : '',
SPRegionType_ID: obj.GroupType == 1020 ? obj.ServerpartIds : '',
// Revenue_Include: 1
}
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParamas)
const res = bayonetCount.Result_Data.List
let bayonetPie = [] //
res.map(async (n, index) => {
bayonetPie = anhuiYestodayRevenueData.getBayonetPie('Serverpart_Name', n, bayonetPie)
})
bayonetPie.forEach((item,index)=>{
let entryNum = 0 //
let flowNum = 0 //
let entryNumNoZero = 0 //
let flowNumNoZero = 0 //
item.spList.forEach(subItem=>{
entryNum+=subItem.Vehicle_Count
flowNum+=subItem.SectionFlow_Count
if (subItem.regionList && subItem.regionList.length>0){
subItem.regionList.forEach(thirdItem=>{
if (thirdItem.SectionFlow_Count===0 || thirdItem.Vehicle_Count===0){
thirdItem.entryRate = 0
}else{
thirdItem.entryRate = Number(((thirdItem.Vehicle_Count / thirdItem.SectionFlow_Count)*100).toFixed(2))
}
if (thirdItem.Vehicle_Count<thirdItem.SectionFlow_Count && thirdItem.Vehicle_Count!==0 && thirdItem.SectionFlow_Count!==0){
entryNumNoZero+=thirdItem.Vehicle_Count
flowNumNoZero+=thirdItem.SectionFlow_Count
}
})
}
})
item.entry = entryNum
item.flow = flowNum
item.flowRate = ((entryNumNoZero / flowNumNoZero)*100).toFixed(2) + '%'
item.showChild = true
})
for (let i=0;i<=bayonetPie.length-1;i++){
for (let j=0;j<=bayonetPie.length - i - 1;j++){
if (bayonetPie[j] && bayonetPie[j + 1] && bayonetPie[j].entry && bayonetPie[j+1].entry){
if (bayonetPie[j].entry < bayonetPie[j+1].entry){
let temp = bayonetPie[j]
bayonetPie[j] = bayonetPie[j + 1]
bayonetPie[j + 1] = temp
}
}
}
}
bayonetPie.forEach(item=>{
for (let i=0;i<=item.spList.length-1;i++){
for (let j=0;j<=item.spList.length - i - 1;j++){
if (item.spList[j] && item.spList[j + 1] && item.spList[j].Vehicle_Count && item.spList[j+1].Vehicle_Count){
if (item.spList[j].Vehicle_Count < item.spList[j+1].Vehicle_Count){
let temp = item.spList[j]
item.spList[j] = item.spList[j + 1]
item.spList[j + 1] = temp
}
}
}
}
})
this.regionList = bayonetPie
uni.hideLoading()
},
// //
handleCarType(selectItem){ handleCarType(selectItem){
if (selectItem.value===this.carType){ if (selectItem.value===this.carType){
@ -337,6 +554,28 @@ export default {
this.tabList = tabList this.tabList = tabList
} }
}, },
async changeAllProvinceSearch(e){
const date = new Date(e.detail.value)
const y = date.getFullYear()
let m = date.getMonth() + 1
if (m<10){
m = '0'+m
}
let d = date.getDate()
if (d<10){
d = '0'+d
}
this.theRequest = {
GroupType: 1000,
ProvinceCode: 340000,
ServerpartIds: "",
ShopAnalysisType: 0,
month: `${y}${m}`,
time: `${y}-${m}-${d}`,
}
await this.getDetail(this.theRequest)
this.searchText = e.detail.value
},
// //
bindDateChange(e){ bindDateChange(e){
const date = new Date(e.detail.value) const date = new Date(e.detail.value)
@ -1029,6 +1268,43 @@ export default {
} }
} }
} }
.headerTop{
width: 100vw;
position: fixed;
top: 0;
left: 0;
z-index: 9999999999999;
background: linear-gradient(180deg, #A2B9E8 0%, #B2C6ED 100%);
.box{
padding: 0 16px;
position: absolute;
box-sizing: border-box;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
transform: translateY(-50%);
.icon{
width: 24px;
height: 24px;
.img{
width: 100%;
height: 100%;
}
}
.title{
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #1C2130;
line-height: 56rpx;
}
.seize{
width: 24px;
height: 24px;
}
}
}
.charts{ .charts{
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
@ -1212,6 +1488,233 @@ export default {
padding-bottom: 32px; padding-bottom: 32px;
} }
} }
.otherCharts{
width: 100%;
box-sizing: border-box;
/*日结上传*/
.chartsTop {
width: 100%;
box-sizing: border-box;
padding: 0 16px;
display: flex;
align-items: center;
justify-content: space-between;
.left{
display: flex;
justify-content: flex-start;
.serviceArea{
box-sizing: border-box;
.picker{
.selectService{
display: flex;
align-items: center;
.img{
width: 40px;
height: 40px;
z-index: 2;
}
.select{
height: 32px;
background: #F8F8FA;
border-radius: 0 16px 16px 0;
transform: translateX(-20px);
box-sizing: border-box;
padding-left: 25px;
display: flex;
align-items: center;
.content{
display: flex;
align-items: center;
.uni-input{
padding: 0;
background: transparent;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
}
.area{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40px;
margin-left: 4px;
}
.rightArrow{
width: 24px;
height: 12px;
}
}
}
}
}
}
}
.right{
.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;
}
}
}
}
.list{
margin-top: 20px;
.listItem{
width: 100%;
box-sizing: border-box;
.itemTop{
width: 100%;
box-sizing: border-box;
padding: 0 16px;
position: relative;
display: flex;
.itemLeft{
display: flex;
flex-direction: column;
align-items: flex-start;
width: 70%;
.serverName{
color: #929292;
}
.value{
font-weight: 700;
}
}
.itemCenter{
display: flex;
flex-direction: column;
align-items: center;
.serverName{
color: #929292;
}
.value{
font-weight: 700;
}
}
.itemRight{
display: inline-block;
height: 100%;
position: absolute;
right: 16px;bottom:0;
.rightArrow{
width: 16px;
height: 16px;
}
}
.other{
width: 0;
}
}
.serviceItem{
width: 100vw;
box-sizing: border-box;
padding: 4px 16px;
.subItemTop{
display: flex;
align-items: center;
.serviceItemLeft{
display: inline-block;
width: 30%;
.leftIcon{
width: 18px;
height: 18px;
}
.name{
position: relative;
}
}
.serviceItemCenter{
display: inline-block;
width: 40%;
text-align: center;
.title{
color: #868686;
}
}
.serviceItemRight{
display: inline-block;
width: 30%;
.text{
color: #868686;
}
}
}
.subItemBottom{
.subBottomItem{
.subBottomItemTop{
width: 100%;
.topLeft{
display: inline-block;
width: 30%;
.position0{
position: relative;
margin-left: 12px;
}
.position0:before{
content:'';
position: absolute;
width: 4px;
height: 4px;
left: -8px;top: calc(50% - 2px);
border-radius: 50%;
background: #5596F9;
}
.position1{
position: relative;
margin-left: 12px;
}
.position1:before{
content:'';
position: absolute;
width: 4px;
height: 4px;
left: -8px;top: calc(50% - 2px);
border-radius: 50%;
background: #FE6D67;
}
.rate{
color: #EF884F;
}
}
.topCenter{
display: inline-block;
width: 40%;
text-align: center;
}
.topRight{
display: inline-block;
width: 30%;
}
}
}
}
}
}
}
}
} }
.noData{ .noData{
width: 100%; width: 100%;

View File

@ -184,7 +184,6 @@
</template> </template>
<template v-else> <template v-else>
<shopCell v-for="(item,i) in regionList" :key="i" :item='item' @toggleShow="toggleShow" :i='i' /> <shopCell v-for="(item,i) in regionList" :key="i" :item='item' @toggleShow="toggleShow" :i='i' />
</template> </template>
</view> </view>
<template v-if="theRequest && theRequest.ProvinceCode==620000"> <template v-if="theRequest && theRequest.ProvinceCode==620000">
@ -305,8 +304,6 @@ export default {
item.visited = true item.visited = true
this.$forceUpdate() this.$forceUpdate()
}, },
selectTab(name, index) { selectTab(name, index) {
this[name] = index this[name] = index
@ -385,6 +382,7 @@ export default {
}); });
}, },
getDetail(obj) { getDetail(obj) {
console.log('obj',obj)
let _this = this let _this = this
this.$request.$webGet('CommercialApi/Revenue/GetServerpartEndAccountList', { this.$request.$webGet('CommercialApi/Revenue/GetServerpartEndAccountList', {
Serverpart_ID: obj.ServerpartIds, Serverpart_ID: obj.ServerpartIds,
@ -399,6 +397,7 @@ export default {
}) })
_this.regionList = res.Result_Data.ShopEndaccountList _this.regionList = res.Result_Data.ShopEndaccountList
console.log('_this.regionList',_this.regionList)
}) })
}, },
getListDetail(data) { getListDetail(data) {
@ -455,10 +454,12 @@ export default {
}, },
async initData() { // async initData() { //
let _this = this let _this = this
console.log('this.theRequest',this.theRequest)
const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] = const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] =
await anhuiYestodayRevenueData.getData(this.theRequest) // await anhuiYestodayRevenueData.getData(this.theRequest) //
if (this.theRequest.GroupType !== 1010) { if (this.theRequest.GroupType !== 1010) {
console.log('reginList',reginList)
this.regionList = reginList // reginListModel[] this.regionList = reginList // reginListModel[]
} }
// //

View File

@ -352,6 +352,7 @@ const methods = {
if(budgetAmount.length){ if(budgetAmount.length){
totalShow.budgetAmount = budgetAmount[0].BUDGET_AMOUNT totalShow.budgetAmount = budgetAmount[0].BUDGET_AMOUNT
} }
console.log('list',list)
return [list, totalShow, busniessTypePie, busniessTradePie,busniessAreaPie,bayonetPie] return [list, totalShow, busniessTypePie, busniessTradePie,busniessAreaPie,bayonetPie]
} }
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="main"> <view class="main">
<view class="header" :style="{height:loadMore?'290px':'500px'}"> <view class="header" :style="{height:loadMore?'310px':'520px'}">
<image class="headerBg" src="https://eshangtech.com/ShopICO/ahyd-BID/index/indexBg.png"></image> <image class="headerBg" src="https://eshangtech.com/ShopICO/ahyd-BID/index/indexBg.png"></image>
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}"> <div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }"> <view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
@ -19,7 +19,10 @@
<view v-if="user.Membership_Id" > <view v-if="user.Membership_Id" >
<view class="topTitle"> <view class="topTitle">
<p class="title">对客营收</p> <p class="title">对客营收</p>
<view style="display: flex;flex-direction: column;text-align: right">
<text class="smallTitle">{{monthAmountAdd?monthAmountAdd:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text> <text class="smallTitle">{{monthAmountAdd?monthAmountAdd:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text>
<text class="smallTitle">{{yearAmountAdd?yearAmountAdd:'-'}}<text class="month">(年度累计)</text></text>
</view>
<!-- 移位置 不确定会不会加回去 先注释 --> <!-- 移位置 不确定会不会加回去 先注释 -->
<!-- <span class="text">门店上传: <text style="margin-left: 4px" :style="{color:isBig?'red':''}">{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}</text></span>--> <!-- <span class="text">门店上传: <text style="margin-left: 4px" :style="{color:isBig?'red':''}">{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}</text></span>-->
</view> </view>
@ -142,27 +145,127 @@
<text class="name">{{ item.name }}</text> <text class="name">{{ item.name }}</text>
</view> </view>
</div> </div>
<div class="detailType"> <!-- <div class="detailType">-->
<view v-for="(item, index) in detailTypeList" :key="index" class="item"> <!-- <view v-for="(item, index) in detailTypeList" :key="index" class="item">-->
<!-- <view class="box">-->
<!-- <p class="title">-->
<!-- {{ item.name }}<text class="unit">{{ item.unit }}</text>-->
<!-- </p>-->
<!-- <p class="money" v-if="index===0 || index===2">{{ item.value }}</p>-->
<!-- <p class="money" v-else>{{ item.yesterValue }}</p>-->
<!-- <view v-if="index === 0 || index === 2" class="active">-->
<!-- <image v-if="Number(item.add)!==0" class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>-->
<!-- <text v-if="Number(item.add)!==0" class="add" :style="{color:Number(item.add)<0?'#07C160':'#FA5151'}">{{ item.add?Math.abs(item.add):'' }}</text>-->
<!-- <text v-if="Number(item.add)!==0" class="yesterday">(相比昨日)</text>-->
<!-- </view>-->
<!-- <view class="otherBox" v-else>-->
<!-- <view class="other">本月累计</view>-->
<!-- <text class="month">{{ item.value }}</text>-->
<!-- </view>-->
<!-- <image :src="item.imgIcon" class="imgIcon"></image>-->
<!-- </view>-->
<!-- </view>-->
<!-- </div>-->
<div class="thisMonth" @click="handlePlanPageGo('month')">
<div class="titleTop">
<p class="title">本月自营计划</p>
<div class="question" @click.stop="handleShowNotice">
<image src="/static/images/index/noticeQuestion.svg"></image>
</div>
<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">
<p class="title"> <view class="top">
{{ item.name }}<text class="unit">{{ item.unit }}</text> <view class="big">
</p> <image class="icon" src="https://eshangtech.com/ShopICO/ahyd-BID/index/thisMonth.svg"></image>
<p class="money" v-if="index===0 || index===2">{{ item.value }}</p>
<p class="money" v-else>{{ item.yesterValue }}</p>
<view v-if="index === 0 || index === 2" class="active">
<image v-if="Number(item.add)!==0" class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text v-if="Number(item.add)!==0" class="add" :style="{color:Number(item.add)<0?'#07C160':'#FA5151'}">{{ item.add?Math.abs(item.add):'' }}</text>
<text v-if="Number(item.add)!==0" class="yesterday">(相比昨日)</text>
</view> </view>
<view class="otherBox" v-else> <view class="text">
<view class="other">本月累计</view> <view class="textTop">
<text class="month">{{ item.value }}</text> <view class="left">
<p class="number">{{plan.percentageMonth?plan.percentageMonth + '%':'-'}}</p>
<p v-if="plan.percentageMonth>=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(monthAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<p class="text">{{monthAdd?Math.abs(monthAdd) + '%':'-'}}</p>
</view>
</view>
</view>
<div class="progressPlan">
<div class="trans" :style="{width:plan.percentageMonth + '%'}"></div>
<!-- <div class=pro :style="{width:(100 - plan.percentageMonth)+ '%'}"></div>-->
<!-- <view class="trans" :style="{width: plan.percentageMonth + '%'}"></view>-->
<!-- <image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/index/progress_orange.png"></image>-->
<!-- <div class=pro :style="{width:(100 - plan.percentageMonth)+ '%'}"></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">{{plan.RevenueMonth_Amount?plan.RevenueMonth_Amount:'-'}}</p>
</view>
<view class="success">
<p class="text">本月计划<text class="unit">/</text></p>
<p class="money">{{plan.BudgetMonth_Amount?plan.BudgetMonth_Amount:'-'}}</p>
</view> </view>
<image :src="item.imgIcon" class="imgIcon"></image>
</view> </view>
</view> </view>
</div> </div>
<div class="thisYear" style="margin-top: 0px" @click="handlePlanPageGo('year')">
<div class="titleTop">
<p class="title">年度自营计划</p>
<div class="question" @click.stop="handleShowNoticeYear">
<image src="/static/images/index/noticeQuestion.svg"></image>
</div>
<div v-if="showNoticeYear" class="titleTopNotice">{{yearNoticeText}}</div>
<div v-if="showNoticeYear" class="meng" @click.stop="handleNoShowNoticeYear"></div>
</div>
<view class="box">
<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">{{plan.percentageYear?plan.percentageYear + '%':'-'}}</p>
<p v-if="plan.percentageYear>=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(yearAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<p class="text">{{yearAdd?Math.abs(yearAdd) + '%':''}}</p>
</div>
</view>
</view>
<div class="progressPlan">
<div class="transYear" :style="{width:plan.percentageYear + '%'}"></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">{{plan.RevenueYear_Amount?plan.RevenueYear_Amount:'-'}}</p>
</view>
<view class="success">
<p class="text">年度计划<text class="unit">/</text></p>
<p class="money">{{plan.BudgetYear_Amount?plan.BudgetYear_Amount:'-'}}</p>
</view>
</view>
</view>
</div>
<div class="propOfReven"> <div class="propOfReven">
<p class="title">营收占比</p> <p class="title">营收占比</p>
@ -247,102 +350,6 @@
</view> </view>
</div> </div>
<div class="thisMonth" @click="handlePlanPageGo('month')">
<div class="titleTop">
<p class="title">本月自营计划</p>
<div class="question" @click.stop="handleShowNotice">
<image src="/static/images/index/noticeQuestion.svg"></image>
</div>
<div v-if="showNotice" class="titleTopNotice">{{monthNoticeText}}</div>
<div v-if="showNotice" class="meng" @click.stop="handleNoShowNotice"></div>
</div>
<view class="box">
<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">{{plan.percentageMonth?plan.percentageMonth + '%':'-'}}</p>
<p v-if="plan.percentageMonth>=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(monthAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<p class="text">{{monthAdd?Math.abs(monthAdd) + '%':'-'}}</p>
</view>
</view>
</view>
<div class="progressPlan">
<div class="trans" :style="{width:plan.percentageMonth + '%'}"></div>
<!-- <div class=pro :style="{width:(100 - plan.percentageMonth)+ '%'}"></div>-->
<!-- <view class="trans" :style="{width: plan.percentageMonth + '%'}"></view>-->
<!-- <image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/index/progress_orange.png"></image>-->
<!-- <div class=pro :style="{width:(100 - plan.percentageMonth)+ '%'}"></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">{{plan.RevenueMonth_Amount?plan.RevenueMonth_Amount:'-'}}</p>
</view>
<view class="success">
<p class="text">本月计划<text class="unit">/</text></p>
<p class="money">{{plan.BudgetMonth_Amount?plan.BudgetMonth_Amount:'-'}}</p>
</view>
</view>
</view>
</div>
<div class="thisYear" style="margin-top: 0px" @click="handlePlanPageGo('year')">
<div class="titleTop">
<p class="title">年度自营计划</p>
<div class="question" @click.stop="handleShowNoticeYear">
<image src="/static/images/index/noticeQuestion.svg"></image>
</div>
<div v-if="showNoticeYear" class="titleTopNotice">{{yearNoticeText}}</div>
<div v-if="showNoticeYear" class="meng" @click.stop="handleNoShowNoticeYear"></div>
</div>
<view class="box">
<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">{{plan.percentageYear?plan.percentageYear + '%':'-'}}</p>
<p v-if="plan.percentageYear>=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(yearAdd)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<p class="text">{{yearAdd?Math.abs(yearAdd) + '%':''}}</p>
</div>
</view>
</view>
<div class="progressPlan">
<div class="transYear" :style="{width:plan.percentageYear + '%'}"></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">{{plan.RevenueYear_Amount?plan.RevenueYear_Amount:'-'}}</p>
</view>
<view class="success">
<p class="text">年度计划<text class="unit">/</text></p>
<p class="money">{{plan.BudgetYear_Amount?plan.BudgetYear_Amount:'-'}}</p>
</view>
</view>
</view>
</div>
</view> </view>
</view> </view>
<!-- isShow--> <!-- isShow-->
@ -432,6 +439,7 @@ export default {
{ name: '区域经营', value: 3 }], { name: '区域经营', value: 3 }],
selectTab:1, // selectTab:1, //
monthAmountAdd:'',// monthAmountAdd:'',//
yearAmountAdd:'',//
mobileData :{}, // mobileData :{}, //
single:'', // single:'', //
monthAdd:'',// monthAdd:'',//
@ -578,7 +586,6 @@ export default {
m = '0' + m m = '0' + m
} }
const time = `${y}-${m}` const time = `${y}-${m}`
console.log('time',time)
howDay = this.$util.getThisMonthDay(time) howDay = this.$util.getThisMonthDay(time)
this.startDate = `${y}-${m}-${howDay - k}` this.startDate = `${y}-${m}-${howDay - k}`
}else{ }else{
@ -824,11 +831,9 @@ export default {
} }
// //
if (option.ProvinceCode) { // if (option.ProvinceCode) { //
console.log('推送')
this.theRequest = option this.theRequest = option
option.time = this.$util.cutDate(option.time, 'YYYY-MM-DD') option.time = this.$util.cutDate(option.time, 'YYYY-MM-DD')
option.month = this.$util.cutDate(option.time, 'YYYYMM') option.month = this.$util.cutDate(option.time, 'YYYYMM')
console.log('type',type)
if (!type){ if (!type){
this.lastDay = this.$util.cutDate(option.time, 'YYYY-MM-DD') this.lastDay = this.$util.cutDate(option.time, 'YYYY-MM-DD')
// //
@ -1019,7 +1024,6 @@ export default {
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price) this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
flag2 = true flag2 = true
// .then(res=>{ // .then(res=>{
// console.log('flag2',res)
// // data // // data
// this.lastDayBillCount = res.Result_Data // this.lastDayBillCount = res.Result_Data
// this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count // this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
@ -1062,14 +1066,15 @@ export default {
const allPriceData = { const allPriceData = {
pushProvinceCode:'340000', pushProvinceCode:'340000',
Statistics_Date:this.lastDay, Statistics_Date:this.lastDay,
ShowCompareRate: true ShowCompareRate: true,
ShowYearRevenue: true
} }
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{ request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
flag3 = true flag3 = true
// data // data
let result = res.Result_Data let result = res.Result_Data
for(let key in result){ for(let key in result){
if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount'){ if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount' && key!=='YearRevenueAmount'){
let all = 0 let all = 0
// //
result[key].forEach(item=>{ result[key].forEach(item=>{
@ -1086,6 +1091,7 @@ export default {
} }
} }
this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount) this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount)
this.yearAmountAdd = result.YearRevenueAmount?this.$util.fmoney(result.YearRevenueAmount):'-'
this.modelProgress = result.BusinessTypeList this.modelProgress = result.BusinessTypeList
this.regionProgress = result.BusinessTradeList this.regionProgress = result.BusinessTradeList
this.areaProgress = result.SPRegionList this.areaProgress = result.SPRegionList
@ -1122,13 +1128,10 @@ export default {
// //
bindDateChange(e){ bindDateChange(e){
let isOnRefresh = false let isOnRefresh = false
console.log('this.startDate',this.startDate)
console.log('this.noChangeLastDay',this.noChangeLastDay)
let startTime = new Date(this.startDate).getTime() let startTime = new Date(this.startDate).getTime()
let endTime = new Date(this.noChangeLastDay).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 const date = new Date(e.detail.value).getTime() - 8 * 3600 * 1000
let startDate = new Date(this.startDate) let startDate = new Date(this.startDate)
console.log('startDate',startDate)
let startMonth = startDate.getMonth() + 1 let startMonth = startDate.getMonth() + 1
let startDay = startDate.getDate() let startDay = startDate.getDate()
let endDate = new Date(this.noChangeLastDay) let endDate = new Date(this.noChangeLastDay)
@ -1140,8 +1143,6 @@ export default {
}else{ }else{
isOnRefresh = true isOnRefresh = true
} }
console.log('isOnRefresh',isOnRefresh)
console.log('timestampToTime(date)',timestampToTime(date))
// //
if (isOnRefresh){ if (isOnRefresh){
this.single = timestampToTime(date) this.single = timestampToTime(date)
@ -1150,8 +1151,6 @@ export default {
this.thisDay = getThisDay(new Date(e.detail.value).getDay()) this.thisDay = getThisDay(new Date(e.detail.value).getDay())
this.onRefresh(true) this.onRefresh(true)
}else{ }else{
console.log('startMonth',startMonth)
console.log('startDay',startDay)
uni.showModal({ uni.showModal({
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据,更多数据请登陆商业综合平台查看`, title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据,更多数据请登陆商业综合平台查看`,
icon:'none', icon:'none',
@ -1338,7 +1337,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-start;
.title { .title {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;