This commit is contained in:
cclu 2023-08-04 18:32:57 +08:00
parent 2a491b9775
commit 40faac6de8
5 changed files with 280 additions and 112 deletions

View File

@ -61,7 +61,7 @@
<div class="contentList" v-if="selectTab===2"> <div class="contentList" v-if="selectTab===2">
<div class="contentItem" v-for="(item,index) in tableList" :key="index"> <div class="contentItem" v-for="(item,index) in tableList" :key="index">
<div class="index"> <div class="index">
<div class="boxBg"></div> <div class="boxBg" v-if="index<=2"></div>
<span class="indexText" :style="{fontWeight:index<=2?'bold':'normal'}">{{index + 1}}</span> <span class="indexText" :style="{fontWeight:index<=2?'bold':'normal'}">{{index + 1}}</span>
</div> </div>
<div class="serviceBox"> <div class="serviceBox">
@ -73,8 +73,8 @@
<span class="unit">/</span> <span class="unit">/</span>
</div> </div>
<div class="addBox"> <div class="addBox">
<image class="addIcon" :src="Number(item.VEHICLE_RATE)>100?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':Number(item.VEHICLE_RATE)===100?'':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"/> <image v-if="item.VEHICLE_RATE!==0" class="addIcon" :src="Number(item.VEHICLE_RATE)>100?'/static/images/examine/add.svg':Number(item.VEHICLE_RATE)===100?'':'/static/images/examine/reduce.svg'"/>
<span class="add">{{item.VEHICLE_RATE}}%</span> <span class="add">{{item.VEHICLE_RATE===0?'-':item.VEHICLE_RATE+'%'}}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -787,7 +787,7 @@ export default {
popupType:'center', popupType:'center',
popupShow:false, popupShow:false,
popup:true, popup:true,
selectBigTab:1, selectBigTab:2,
bigTab:[{imgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/home/carTab.svg',text:'车流统计',value:1}, bigTab:[{imgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/home/carTab.svg',text:'车流统计',value:1},
{imgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/home/revenueTab.svg',text:'经营统计',value:2}], {imgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/home/revenueTab.svg',text:'经营统计',value:2}],
smallTab:[{text:'服务区流量排名',value:1},{text:'断面流量排名',value:2},{text:'驶入率排名',value:3}], smallTab:[{text:'服务区流量排名',value:1},{text:'断面流量排名',value:2},{text:'驶入率排名',value:3}],

View File

@ -1,19 +1,33 @@
<template> <template>
<view class="page-card" v-if="!isLoading"> <view class="page-card" v-if="!isLoading">
<view class="head-card" v-show="pageMsg.Serverpart_Name" @tap="toTrend" > <!-- 日期筛选 -->
<div class="uni-flex ai-center screen-box">
<picker mode="date" @change="bindDateChange($event,0)" :value="pageData.searchTime[0]" :end="pageData.endDate" start="2018-12-01" class="screen-unit">
<text>{{pageData.searchTime[0]}}</text>
<text class="uni-icon uni-icon-arrowdown"></text>
</picker>
<text class="mr20"></text>
<picker mode="date" @change="bindDateChange($event,1)" :value="pageData.searchTime[1]" :end="pageData.endDate" start="2018-12-01" class="screen-unit">
<text>{{pageData.searchTime[1]}}</text>
<text class="uni-icon uni-icon-arrowdown"></text>
</picker>
</div>
<!-- @tap="toTrend"-->
<view class="head-card" v-show="pageMsg.Serverpart_Name">
<view class="uni-flex jc-between ai-center text-strong"> <view class="uni-flex jc-between ai-center text-strong">
<view class=""> {{pageMsg.Serverpart_Name}} </view> <view class=""> {{pageMsg.Serverpart_Name}} </view>
<view class=""> ¥{{$util.fmoney(pageMsg.Serverpart_Revenue,2)}} </view> <view class=""> ¥{{$util.fmoney(pageMsg.Serverpart_Revenue,2)}} </view>
</view> </view>
<view class="uni-flex jc-between ai-center"> <view class="uni-flex jc-between ai-center">
<text class=""> {{pageMsg.Serverpart_S||'南/东区'}} &nbsp; &nbsp;¥{{$util.fmoney(pageMsg.Serverpart_RevenueS,2)}}</text> <text class="" v-if="pageMsg.Serverpart_S"> {{pageMsg.Serverpart_S}} &nbsp; &nbsp;¥{{$util.fmoney(pageMsg.Serverpart_RevenueS,2)}}</text>
<text class=""> {{pageMsg.Serverpart_N||'北/西区'}} &nbsp; &nbsp;¥{{$util.fmoney(pageMsg.Serverpart_RevenueN,2)}}</text> <text class="" v-if="pageMsg.Serverpart_N"> {{pageMsg.Serverpart_N}} &nbsp; &nbsp;¥{{$util.fmoney(pageMsg.Serverpart_RevenueN,2)}}</text>
</view> </view>
</view> </view>
<view class="page-list"> <view class="page-list">
<view v-for="(dateItem,i) in pageMsg.revenueReportDetilsDates" :key="i"> <!-- <view v-for="(dateItem,i) in pageMsg.revenueReportDetilsDates" :key="i">-->
<text class="list-date"> {{$util.cutDate(dateItem.Statistics_Date,'MM.DD')}}</text> <!-- <text class="list-date"> {{// $util.cutDate(dateItem.Statistics_Date,'MM.DD')}}</text>-->
<view class="cell-body uni-flex ai-center" v-for="(item,i) in dateItem.revenueReportDetils" :key="i"> <view class="cell-body uni-flex ai-center" v-for="(item,i) in pageMsg.ShopList" :key="i">
<image :src="item.BusinessType_Logo || '/static/images/revenue/operating-shop.png'" mode="aspectFit"></image> <image :src="item.BusinessType_Logo || '/static/images/revenue/operating-shop.png'" mode="aspectFit"></image>
<view class=""> <view class="">
<view class="uni-flex ai-center jc-between"> <view class="uni-flex ai-center jc-between">
@ -21,7 +35,7 @@
<text class="shop-total"> ¥{{$util.fmoney(item.BusinessType_Revenue,2)}}</text> <text class="shop-total"> ¥{{$util.fmoney(item.BusinessType_Revenue,2)}}</text>
</view> </view>
<view class="uni-flex ai-center jc-between"> <view class="uni-flex ai-center jc-between">
<text class="type-text" :class="{'scan':item.Upload_Type==1,'port':item.Upload_Type==2}"> <text style="display: inline-block;width: 20%" class="type-text" :class="{'scan':item.Upload_Type==1,'port':item.Upload_Type==2}">
<template v-if="item.Upload_Type==1"> <template v-if="item.Upload_Type==1">
扫码上传 扫码上传
</template> </template>
@ -35,52 +49,90 @@
<text class="type-text port" >接口传输</text> <text class="type-text port" >接口传输</text>
<text v-else>自动上传</text> --> <text v-else>自动上传</text> -->
</text> </text>
<view class="uni-flex ai-center"> <view class="uni-flex ai-center" style="display: inline-block;width: 80%">
<text class="text-coast">{{item.Serverpart_S||'南/东区'}}: ¥{{$util.fmoney(item.Serverpart_RevenueS,2)}}</text> <div style="display: inline-block;width: 48%;text-align: left;margin-right: 4%" class="text-coast">
<text class="text-coast">{{item.Serverpart_N||'北/西区'}}: ¥{{$util.fmoney(item.Serverpart_RevenueN,2)}}</text> <text style="display: inline-block;width: 40px;text-align: left">
{{item.Serverpart_RevenueS===0 || item.Serverpart_RevenueS? `${item.Serverpart_S} `:''}}
</text>
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
{{item.Serverpart_RevenueS===0 || item.Serverpart_RevenueS? `¥${$util.fmoney(item.Serverpart_RevenueS,2)}`:''}}
</text>
</div>
<div style="display: inline-block;width: 48%;text-align: right" class="text-coast">
<text style="display: inline-block;width: 40px;text-align: left">
{{item.Serverpart_RevenueN===0 || item.Serverpart_RevenueN? `${item.Serverpart_N} `:''}}
</text>
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
{{item.Serverpart_RevenueN===0 || item.Serverpart_RevenueN? `¥${$util.fmoney(item.Serverpart_RevenueN,2)}`:''}}
</text>
</div>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- </view>-->
</view> </view>
</view> <view class="" v-if="isLoading && !pageOption.Serverpart_Name">
<view class="" v-if="!isLoading && !pageMsg.Serverpart_Name">
<noFound nodata="true" :text="noDataText"/> <noFound nodata="true" :text="noDataText"/>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import request from '@/util/index.js'
export default { export default {
data() { data() {
let now = new Date()
let nowTime = this.$util.cutDate(now, 'YYYY-MM-DD',-1)
let sTime = this.$util.cutDate(now, 'YYYY-MM-DD', -1)
return { return {
isLoading: true, isLoading: true,
pageData: {
endDate: nowTime,
searchTime: [sTime,nowTime],
msg: {},
isLoading: true,
exsideShow: true,
insideShow: true,
},
pageMsg:{}, pageMsg:{},
pageOption: {}, pageOption: {},
noDataText: '抱歉,没有数据,请稍后重试' noDataText: '抱歉,没有数据,请稍后重试'
} }
}, },
methods: { methods: {
bindDateChange(e,index){
let nowDate = this.pageData.searchTime[index]
if(e.detail.value != nowDate){
this.pageData.searchTime[index] = e.detail.value
this.$forceUpdate()
this.getDetail({st:this.pageData.searchTime[0],et:this.pageData.searchTime[1],id:this.pageOption.id,pcode:this.pageOption.pcode})
}
},
toTrend(){ toTrend(){
this.$util.toNextRoute('navigateTo','/pages/operatingStatements/operatingTrend?name='+this.pageMsg.Serverpart_Name+'&time='+this.pageOption.et+'&id='+this.pageOption.id+'&ProvinceCode='+this.pageOption.pcode) this.$util.toNextRoute('navigateTo','/pages/operatingStatements/operatingTrend?name='+this.pageMsg.Serverpart_Name+'&time='+this.pageOption.et+'&id='+this.pageOption.id+'&ProvinceCode='+this.pageOption.pcode)
}, },
getDetail(obj){ getDetail(obj){
console.log('obj',obj)
let _this = this let _this = this
uni.showLoading({ uni.showLoading({
title:'正在加载...', title:'正在加载...',
mask:true mask:true
}) })
_this.$request.$webGet('WeChat/GetRevenueReportDetils',{ // _this.$request.$webGet('WeChat/GetRevenueReportDetils',{
request.$webGet('CommercialApi/Revenue/GetRevenueReportDetil',{
startTime: obj.st, startTime: obj.st,
endTime: obj.et, endTime: obj.et,
Serverpart_Id: obj.id, serverpartId: obj.id,
pushProvinceCode: obj.pcode provinceCode: obj.pcode
}).then(res=>{ }).then(res=>{
console.log('res',res)
if(res.Result_Code==100) { if(res.Result_Code==100) {
_this.pageMsg = res.Result_Data _this.pageMsg = res.Result_Data
}else if(res.Result_Code==200 || res.Result_Code==999){
_this.noDataText = '暂无数据'
} else{ } else{
_this.noDataText = res.Result_Desc _this.noDataText = res.Result_Desc
} }
@ -92,6 +144,12 @@
}, },
onLoad(op) { onLoad(op) {
this.pageOption = op this.pageOption = op
if (this.pageOption.st){
this.pageData.searchTime[0] = this.pageOption.st
}
if (this.pageOption.et){
this.pageData.searchTime[1] = this.pageOption.et
}
this.getDetail(op) this.getDetail(op)
} }
} }
@ -102,8 +160,41 @@
background-color: #fff; background-color: #fff;
} }
.page-card { .page-card {
margin: 30rpx 20rpx; margin: 0 20rpx 30rpx;
}
.screen-box {
background-color: #fff;
padding: 0 20rpx;
position: sticky;
top: 0;
left: 0;
z-index: 9;
}
.screen-box .screen-unit {
display: flex;
align-items: center;
width: 200rpx;
padding: 0 14rpx;
line-height: 3;
}
.screen-box .mr20 {
margin-right: 20rpx;
color: #95999C;
}
.uni-icon-arrowdown {
font-size: 22rpx;
color: #C7C7C7;
margin-left: 8rpx;
}
.screen-box text {
line-height: 3;
}
.screen-box image{
width: 12rpx;
height: 8rpx;
margin: 0 16rpx;
vertical-align: middle;
} }
.head-card { .head-card {
padding: 30rpx 35rpx; padding: 30rpx 35rpx;
@ -179,9 +270,9 @@
text.text-coast { text.text-coast {
color: #848484; color: #848484;
width: 184rpx; width: 184rpx;
}
text.text-coast + text.text-coast {
text-align: right; text-align: right;
} }
/*text.text-coast + text.text-coast {*/
/* text-align: right;*/
//}
</style> </style>

View File

@ -14,26 +14,55 @@
</div> </div>
<template v-if="!pageData.isLoading && pageData.msg && pageData.msg.Total_Revenue"> <template v-if="!pageData.isLoading && pageData.msg && pageData.msg.Total_Revenue">
<view class="uni-flex ai-center head-card" > <view class="uni-flex ai-center head-card" >
<view class="" @tap="toTrend()"> <!-- @tap="toTrend()"-->
<view>实收总额</view> <view class="topDetail" style="width: 100%">
<view class="label">实收总额</view>
<view class="price-num">¥{{$util.fmoney(pageData.msg.Total_Revenue,2)}}</view> <view class="price-num">¥{{$util.fmoney(pageData.msg.Total_Revenue,2)}}</view>
<view class="detailBox" style="margin-top: 12px">
<view class="detailItem" >
<view class="value">{{$util.fmoney(pageData.msg.Different_Price_More,2)}}</view>
<view class="label">长款金额 <span class="unit">/</span></view>
</view> </view>
<view class="" v-if="pageData.msg && pageData.msg.Province_ExternalAmount"> <view class="detailItem">
<div class="all-diff" @tap="regionType=!regionType"> <view class="value">{{$util.fmoney(pageData.msg.Different_Price_Less,2)}}</view>
<image src="../../static/images/revenue/next.png"></image> <view class="label">短款金额 <span class="unit">/</span></view>
切换
</div>
<view>{{!regionType ?"省内" :"省外"}}实收</view>
<view class="price-num">¥{{!regionType ? $util.fmoney(pageData.msg.Province_InsideAmount,2) : $util.fmoney(pageData.msg.Province_ExternalAmount,2)}}</view>
</view> </view>
<view class="" v-else> <view class="detailItem">
<div class="all-diff" @tap="regionType=!regionType"> <view class="value">{{$util.fmoney(pageData.msg.TotalOffAmount,2)}}</view>
<image src="../../static/images/revenue/next.png"></image> <view class="label">优惠金额 <span class="unit">/</span></view>
切换方向
</div>
<view>{{!regionType ?"东 (南)" :"西 (北)"}}区实收</view>
<view class="price-num">¥{{!regionType ? $util.fmoney(pageData.msg.Revenue_AmountS,2) : $util.fmoney(pageData.msg.Revenue_AmountN,2)}}</view>
</view> </view>
<view class="detailItem">
<view class="value">{{$util.noDecimal(pageData.msg.TicketCount)}}</view>
<view class="label">客单数量<span class="unit">/</span></view>
</view>
<view class="detailItem">
<view class="value">{{$util.fmoney(pageData.msg.TotalCount,2)}}</view>
<view class="label">商品出售 <span class="unit">/</span></view>
</view>
<view class="detailItem">
<view class="value">{{$util.fmoney(pageData.msg.countave,2)}}</view>
<view class="label">商品均价 <span class="unit">/</span></view>
</view>
</view>
</view>
<!-- <view class="" v-if="pageData.msg && pageData.msg.Province_ExternalAmount">-->
<!-- <div class="all-diff" @tap="regionType=!regionType">-->
<!-- <image src="../../static/images/revenue/next.png"></image>-->
<!-- 切换-->
<!-- </div>-->
<!-- <view>{{!regionType ?"省内" :"省外"}}实收</view>-->
<!-- <view class="price-num">¥{{!regionType ? $util.fmoney(pageData.msg.Province_InsideAmount,2) : $util.fmoney(pageData.msg.Province_ExternalAmount,2)}}</view>-->
<!-- </view>-->
<!-- <view class="" v-else>-->
<!-- <div class="all-diff" @tap="regionType=!regionType">-->
<!-- <image src="../../static/images/revenue/next.png"></image>-->
<!-- 切换方向-->
<!-- </div>-->
<!-- <view>{{!regionType ?"东 (南)" :"西 (北)"}}区实收</view>-->
<!-- <view class="price-num">¥{{!regionType ? $util.fmoney(pageData.msg.Revenue_AmountS,2) : $util.fmoney(pageData.msg.Revenue_AmountN,2)}}</view>-->
<!-- </view>-->
</view> </view>
<view class="modle-title"> <view class="modle-title">
<image src="/static/images/revenue/yestoday-region.png" mode="aspectFit"></image> <image src="/static/images/revenue/yestoday-region.png" mode="aspectFit"></image>
@ -69,7 +98,6 @@
<view class="uni-flex ai-center data-number"> <view class="uni-flex ai-center data-number">
<text class="">{{child.Revenue_Proportion}}</text> <text class="">{{child.Revenue_Proportion}}</text>
<text style="flex: 2;">¥{{$util.fmoney(child.Total_Revenue,2)}}</text> <text style="flex: 2;">¥{{$util.fmoney(child.Total_Revenue,2)}}</text>
</view> </view>
</li> </li>
</ul> </ul>
@ -127,6 +155,7 @@
<script> <script>
import {mapState} from 'vuex' import {mapState} from 'vuex'
import request from '@/util/index.js'
export default { export default {
data() { data() {
@ -170,7 +199,6 @@
title:'正在加载', title:'正在加载',
mask:true mask:true
}) })
this.getList() this.getList()
}, },
toggleRegion(item) { toggleRegion(item) {
@ -178,6 +206,7 @@
this.$forceUpdate() this.$forceUpdate()
}, },
toDetail(item){ toDetail(item){
console.log('item',item)
this.$util.toNextRoute('navigateTo', '/pages/operatingStatements/detail?pcode='+item.Province_Code+'&id=' + item.Serverpart_Id + '&st=' + this.pageData.searchTime[0]+ '&et=' + this.pageData.searchTime[1]) this.$util.toNextRoute('navigateTo', '/pages/operatingStatements/detail?pcode='+item.Province_Code+'&id=' + item.Serverpart_Id + '&st=' + this.pageData.searchTime[0]+ '&et=' + this.pageData.searchTime[1])
item.visited = true item.visited = true
this.$forceUpdate() this.$forceUpdate()
@ -185,14 +214,16 @@
getList(){ getList(){
let _this = this let _this = this
let searchTime = this.pageData.searchTime let searchTime = this.pageData.searchTime
_this.$request.$webGet('WeChat/GetRevenueReport',{ // _this.$request.$webGet('WeChat/GetRevenueReport',{
request.$webGet('CommercialApi/Revenue/GetRevenueReport',{
startTime: searchTime[0], startTime: searchTime[0],
endTime: searchTime[1], endTime: searchTime[1],
additionalCode: this.ProvinceCode=='330000' ? '451200,630000' :'' // additionalCode: this.ProvinceCode=='330000' ? '451200,630000' :''
}).then(res=>{ }).then(res=>{
console.log('res',res)
if(res.Result_Code==100) { if(res.Result_Code==100) {
_this.pageData.msg = res.Result_Data _this.pageData.msg = res.Result_Data
_this.pageData.msg.countave = (Number(_this.pageData.msg.Province_InsideAmount) / Number(_this.pageData.msg.TotalCount)).toFixed(2)
res.Result_Data.revenueRegionModels.map(n=>{ res.Result_Data.revenueRegionModels.map(n=>{
n.show = false n.show = false
}) })
@ -204,6 +235,8 @@
} }
_this.ServerpartList = res.Result_Data.revenueRegionModels _this.ServerpartList = res.Result_Data.revenueRegionModels
}else if(res.Result_Code==200 || res.Result_Code==999){
_this.noDataText = '暂无数据'
}else{ }else{
_this.pageData.msg = null _this.pageData.msg = null
_this.noDataText = res.Result_Desc _this.noDataText = res.Result_Desc
@ -268,25 +301,69 @@
} }
.head-card>view { .head-card>view {
width: 330rpx; width: 330rpx;
height: 190rpx; //height: 190rpx;
color: #fff; color: #fff;
text-align: center; text-align: center;
padding-top: 30rpx; padding-top: 30rpx;
font-size: 28rpx; font-size: 28rpx;
border-radius: 24rpx; border-radius: 24rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.head-card .topDetail .detailBox{
width: 100%;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
.head-card .topDetail .label{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fff;
opacity: 0.8;
line-height: 40rpx;
margin-bottom: 2px;
}
.detailBox .detailItem{
width: 33%;
margin-bottom: 16px;
}
.detailBox .detailItem .value{
font-size: 16px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #fff;
line-height: 40rpx;
}
.detailBox .detailItem .label{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fff;
opacity: 0.8;
line-height: 40rpx;
margin-bottom: 2px;
}
.detailBox .detailItem .label .unit{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fff;
line-height: 40rpx;
margin-left: 2px;
}
.head-card>view:first-child { .head-card>view:first-child {
background: linear-gradient(to left,#93a4ec 0%, #4b76e9 100%); background: linear-gradient(to left,#93a4ec 0%, #4b76e9 100%);
} }
.head-card>view:last-child { .head-card>view:last-child {
margin-left: 30rpx; //margin-left: 30rpx;
background: linear-gradient(to left,#8cdade 0%, #82c2ce 100%); background: linear-gradient(to left,#8cdade 0%, #82c2ce 100%);
position: relative; position: relative;
overflow: hidden; //overflow: hidden;
} }
.head-card .price-num { .head-card .price-num {
font-family: 'Bahnschrift Regular'; font-family: 'Bahnschrift Regular';

View File

@ -91,13 +91,13 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
homeUrl: '/pages/operatingStatements/index', homeUrl: '/pages/operatingStatements/index',
imagePath: '/static/images/user/reportForms.svg', imagePath: '/static/images/user/reportForms.svg',
bgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/user/firstBg_3.png', bgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/user/firstBg_3.png',
isNotice:'', isNotice:true,
value: 1, value: 1,
}, },
], ],
}, },
{ {
name: '商业经营', name: '商业画像',
value: 2, value: 2,
list: [ list: [
{ {