车流分析数据标题内容样式调整

This commit is contained in:
cclu 2023-03-03 14:18:14 +08:00
commit f0ccb7d76c
9 changed files with 480 additions and 161 deletions

View File

@ -18,49 +18,66 @@
<!-- 服务区名称 -->
<text class="content-type-text">{{item.SERVERPART_NAME || ''}}</text>
<!-- 右侧 -->
<!-- 服务区-->
<text class="content-type-text">{{item.SERVERPART_ID || ''}}</text>
<!-- 服务区-->
<text class="content-type-text">{{item.SERVERPART_CODE || ''}}</text>
</view>
<!-- 卡片第三行数据 -->
<view class="uni-flex content-box-cashpay">
<!-- 中间 -->
<!-- 移动支付金额 -->
<text class="content-price">{{item.FACT_AMOUNT != null ? item.FACT_AMOUNT : ''}}</text>
<text class="content-price">{{item.FACT_AMOUNT !== null ?
item.FACT_AMOUNT : ''}}</text>
<text style="font-size: 24upx;"></text>
<!-- 右侧 -->
<!-- 服务区编码 -->
<text class="other-coast">{{item.SERVERPART_CODE || ''}}</text>
<!-- 移动支付金额 -->
<text class="other-coast">{{item.FACT_AMOUNT !== null ?
item.FACT_AMOUNT : ''}}</text>
</view>
<!-- 分割线 -->
<view class="bb1"></view>
<!-- 卡片第四行顶部数据 -->
<view class="uni-flex jc-between align-center" v-if="item.TICKETBILL">
<view class="uni-flex jc-between align-center" v-if="item.TICKETBILL || item.SERVERPART_ID">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 微信支付 -->
<!-- 圆点 -->
<text class="G-icon A-icon"></text>
<span class="content-span">微信支付{{item.TICKETBILL || ''}}</span>
<span class="content-span">微信支付{{item.TICKETBILL !== null ?
item.TICKETBILL : ''}}</span>
</view>
<!-- 右侧 -->
<!-- 服务区内码 -->
<text class="content-span lh15">{{item.SERVERPART_ID !== null ?
item.SERVERPART_ID : ''}}</text>
</view>
<!-- 卡片第四行中间数据 -->
<view class="uni-flex jc-between" v-if="item.OTHERPAY">
<view class="uni-flex jc-between" v-if="item.OTHERPAY || item.SERVERPART_CODE">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 其他支付(支付宝) -->
<!-- 圆点 -->
<p class="B-icon A-icon"></p>
<span class="content-span">支付宝{{item.OTHERPAY || ''}}</span>
<span class="content-span">其他支付(支付宝){{item.OTHERPAY !== null ?
item.OTHERPAY : ''}}</span>
</view>
<!-- 右侧 -->
<!-- 服务区编码 -->
<text class="content-span lh15">{{item.SERVERPART_CODE || ''}}</text>
</view>
<!-- 卡片第四行底部数据 -->
<view class="uni-flex jc-between" v-if="item.SALE_CORRECT">
<view class="uni-flex jc-between" v-if="item.SHOPTRADE || item.SHOPTRADE">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 到账实差 -->
<!-- 行业名称 -->
<!-- 圆点 -->
<p class="G-icon A-icon"></p>
<span class="content-span">到账实差{{item.SALE_CORRECT || ''}}</span>
<span class="content-span">行业名称{{item.SHOPTRADE !== null ?
businesstype[item.SHOPTRADE] : ''}}</span>
</view>
<!-- 右侧 -->
<!-- 行业名称 -->
<text class="content-span lh15">{{item.SHOPTRADE !== null ?
businesstype[item.SHOPTRADE] : ''}}</text>
</view>
</view>
</template>

View File

@ -7,15 +7,16 @@
<!-- 左侧 -->
<span>门店简称{{dataDetail.SHOPSHORTNAME || ''}}</span>
<!-- 右侧 -->
<span>行业名称{{dataDetail.SHOPTRADE !== null ?
businesstype[dataDetail.SHOPTRADE] : ''}}</span>
<span>移动支付金额{{dataDetail.FACT_AMOUNT !== null ?
dataDetail.FACT_AMOUNT : ''}}</span>
</view>
<!-- 顶部信息卡片第二行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>服务区名称{{dataDetail.SERVERPART_NAME || ''}}</span>
<!-- 右侧 -->
<span>移动支付金额{{dataDetail.FACT_AMOUNT || ''}}</span>
<span>到账实差{{dataDetail.SALE_CORRECT !== null ?
dataDetail.SALE_CORRECT : ''}}</span>
</view>
</view>
<!-- 详情信息 -->
@ -25,17 +26,6 @@
<!-- 详情信息卡片 -->
<view class="content-detail-box main-card ino-flex ai-center uni-column">
<!-- 单列样式 -->
<!-- 服务区名称 -->
<view class="cellTopStyle">
<span class="fourth-name">服务区名称</span>
<span>{{dataDetail.SERVERPART_NAME || ''}}</span>
</view>
<!-- 行业名称 -->
<view class="cellTopStyle">
<span class="fourth-name">行业名称</span>
<span>{{dataDetail.SHOPTRADE !== null ?
businesstype[dataDetail.SHOPTRADE] : ''}}</span>
</view>
<!-- 服务区编码 -->
<view class="cellTopStyle">
<span class="fourth-name">服务区编码</span>
@ -70,6 +60,17 @@
<span>{{dataDetail.SALE_CORRECT !== null ?
dataDetail.SALE_CORRECT : ''}}</span>
</view>
<!-- 行业名称 -->
<view class="cellTopStyle">
<span class="fourth-name">行业名称</span>
<span>{{dataDetail.SHOPTRADE !== null ?
businesstype[dataDetail.SHOPTRADE] : ''}}</span>
</view>
<!-- 服务区名称 -->
<view class="cellTopStyle">
<span class="fourth-name">服务区名称</span>
<span>{{dataDetail.SERVERPART_NAME || ''}}</span>
</view>
</view>
</view>
</template>
@ -95,7 +96,7 @@
* Api接口地址EShangApiMain/AutoTest/GetShopMobileSummary
*/
getDetail(option) {
this.$request.$webGet("EShangApiMain/AutoTest/GetShopMobileSummary", {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetShopMobileSummary", {
//
SearchStatisticsStartDate: option.SearchStatisticsStartDate,
SearchStatisticsEndDate: option.SearchStatisticsEndDate,

View File

@ -155,25 +155,35 @@
src: '/static/images/expense/type/qb.png',
typeId: -1
},
{
name: '特产',
src: '/static/images/expense/type/qb.png',
typeId: 1002
},
{
name: '箱包',
src: '/static/images/expense/type/qb.png',
typeId: 1004
},
{
name: '便利店',
src: '/static/images/expense/type/qb.png',
typeId: 1005
},
{
name: '水果报刊音像',
name: '工艺品',
src: '/static/images/expense/type/qb.png',
typeId: 1006
typeId: 1007
},
{
name: '水果',
src: '/static/images/expense/type/qb.png',
typeId: 1014
},
{
name: '粽子',
src: '/static/images/expense/type/qb.png',
typeId: 2002
},
{
name: '面食',
src: '/static/images/expense/type/qb.png',
typeId: 2003
},
{
name: '餐饮',
src: '/static/images/expense/type/qb.png',
typeId: 3000
},
],
},
@ -225,7 +235,7 @@
* Api接口地址EShangApiMain/AutoTest/GetShopMobileSummary
*/
getList() {
this.$request.$webGet("EShangApiMain/AutoTest/GetShopMobileSummary", {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetShopMobileSummary", {
SHOPTRADE: this.activeType === -1 ? '' : this.activeType,
SearchStatisticsStartDate: this.searchTime[0],
SearchStatisticsEndDate: this.searchTime[1],
@ -280,9 +290,7 @@
* @param {Object} item
*/
goDetail(item) {
this.$util.toNextRoute('navigateTo', '/pages/autoTest/shopmobilesummary/detail?SHOPSHORTNAME=' +
item.SHOPSHORTNAME + '&SERVERPART_ID=' + item.SERVERPART_ID + '&SearchStatisticsStartDate=' +
this.searchTime[0] + '&SearchStatisticsEndDate=' + this.searchTime[1])
this.$util.toNextRoute('navigateTo', '/pages/autoTest/shopmobilesummary/detail?SearchStatisticsStartDate=' + this.searchTime[0] + '&SearchStatisticsEndDate=' + this.searchTime[1] + '&SHOPSHORTNAME=' + item.SHOPSHORTNAME + '&SERVERPART_ID=' + item.SERVERPART_ID)
},
reloadList() {
this.showPop = false

View File

@ -2,6 +2,7 @@
<div>
<view class="page-body" v-if="showPage">
<AnhHead :today="today" :headMsg="headMsg" :lastDay="lastDay"
:groupType="theRequest&&theRequest.GroupType"
:provinceCode="theRequest&&theRequest.ProvinceCode" @bindDateChange="bindDateChange" :isup="isup"
:nowDay="nowDay" :selectDate="theRequest&&theRequest.time" @toggle="toggleCard"></AnhHead>
<!--营收占比的上面组件 -->
@ -22,9 +23,12 @@
<div class="operation-tab-unit" @tap="selectTab('nowTab',3)"
v-if="areaProgress.length && areaProgress.length>1" :class="{'active':nowTab==3}">区域营收
</div>
<div class="operation-tab-unit" @tap="selectTab('nowTab',4)"
v-if="theRequest.ProvinceCode == 340000 && theRequest.GroupType == 1000" :class="{'active':nowTab==4}">车流分析
</div>
</div>
<div class="operation-content-box">
<div v-show="nowTab==1 " v-if="modelProgress.length>0&& theRequest.ProvinceCode==340000">
<div v-show="nowTab==1" v-if="modelProgress.length>0&& theRequest.ProvinceCode==340000">
<canvas canvas-id="modelCont" id="modelCont" class="operation-content"
@touchstart="touchPie($event,'modelCont')"></canvas>
<div>
@ -56,7 +60,6 @@
</div>
</div>
<div v-show="nowTab==3" v-if="areaProgress.length>0">
<canvas canvas-id="areaCont" id="areaCont" class="operation-content"
@touchstart="touchPie($event,'areaCont')"></canvas>
@ -72,6 +75,33 @@
</div>
</div>
</div>
<div v-show="nowTab==4" v-if="bayonetProgress.length>0">
<div>
<div class="operation-c-list" v-for="(item,o) in bayonetProgress" :key="o">
<div class="operation-cl-unit">
<text>{{item.name}}</text>
</div>
<div style="padding: 10rpx;" class="bayonet-c-list"
v-for="(child,o) in item.list" :key="o">
<div class="operation-cl-unit1">
<text class="server">{{child.name}}</text>
<text class="type" style="color: #868686;">入区流量/断面流量</text>
<text class="carType" style="color: #868686">//小型车</text>
</div>
<ul class="bayonet-cell-area">
<li v-for="(childItem,o) in child.list" :key="o">
<text class="server">{{childItem.name}}:<text style='color: #EF884F;'>{{childItem.bili}}%</text></text>
<text class="type">{{childItem.data}}/{{childItem.flow}}</text>
<text class="carType">{{childItem.LargeVehicle_Count}}/{{childItem.MediumVehicle_Count}}/{{childItem.MinVehicle_Count}}</text>
</li>
</ul>
<!-- <div class="progress">
<div class="bgO" :style="{'width':item.bili+'%'}"></div>
</div> -->
</div>
</div>
</div>
</div>
</div>
</view>
</div>
@ -81,10 +111,10 @@
<view class="uni-inline-item">
<image src="/static/images/revenue/yestoday-region.png" mode="aspectFit"></image>
<text class="strong-text">日结上传</text>
</view>
<view style="font-size: 26rpx;">门店上传&nbsp;&nbsp; <span
class="upload-count">{{headMsg.uploadState}}</span></view>
<view style="font-size: 26rpx;">
门店上传&nbsp;&nbsp; <span class="upload-count">{{headMsg.uploadState}}</span>
</view>
</div>
<template v-if="theRequest && theRequest.GroupType==1020 && regionList.length">
<div v-for="(item,i) in regionList[0].child" :key="i" class=" region-cell" @tap="toDetail(item)">
@ -112,8 +142,6 @@
</div>
</div>
</template>
<!-- 第二种情况 v-if已经区分 -->
<template v-else-if="theRequest && theRequest.GroupType==1000">
<!-- <div class="region-title" :class="{'active':regionShow1}">省内区域</div> -->
<div v-show="regionShow1">
@ -208,6 +236,7 @@
regionProgress: null,
tradeType: null,
areaProgress: null,
bayonetProgress: null,
modelProgress: null,
isup: true,
wechatPushSalesList: null //
@ -244,8 +273,8 @@
if (selectT <= new Date(this.lastDay)) {
this.theRequest.time = e.detail.value
this.theRequest.month = this.$util.cutDate(e.detail.value, 'YYYYMM')
this.sevenDate = [this.$util.cutDate(selectT, 'MM.DD', -13), this.$util.cutDate(
selectT, 'MM.DD', -7)]
this.sevenDate = [this.$util.cutDate(selectT, 'MM.DD', -13),
this.$util.cutDate(selectT, 'MM.DD', -7)]
uni.showLoading({
title: '正在加载...',
mask: true
@ -270,6 +299,7 @@
let canToSeverpartIndex = !provinceId ? this.hasSeverpartIndexAuthority : this.PushAuthority.some(n => {
return n.ProvinceCode == provinceId && n.ShopAnalysisType == 1
})
this.$util.toNextRoute('navigateTo', canToSeverpartIndex ? severpartIndexPath : serverpartUploadPath)
item.visited = true
@ -423,33 +453,41 @@
},
async initData() { //
let _this = this
const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie] =
await anhuiYestodayRevenueData.getData(this.theRequest) //
if (this.theRequest.GroupType !== 1010) {
const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] =
await anhuiYestodayRevenueData.getData(this.theRequest) //
if (this.theRequest.GroupType !== 1010) {
this.regionList = reginList // reginListModel[]
}
//
totalData.tickave = totalData.ticketCount > 0 ? this.$util.fmoney(totalData.cashPay / totalData
.ticketCount, 2) : 0
totalData.countave = totalData.totalCount > 0 ? this.$util.fmoney(totalData.cashPay / totalData
.totalCount, 2) : 0
totalData.tickave = totalData.ticketCount > 0 ? this.$util.fmoney(
totalData.cashPay / totalData.ticketCount, 2) : 0
totalData.countave = totalData.totalCount > 0 ? this.$util.fmoney(
totalData.cashPay / totalData.totalCount, 2) : 0
totalData.totalMoneyShow = this.$util.fmoney(totalData.cashPay) //
totalData.dayOfShow = this.$util.cutDate(this.theRequest.time, 'MM月DD日') //
totalData.budgetamoutShow = totalData.budgetAmount ? _this.$util.fmoney(totalData.budgetAmount) :
0.00 //
totalData.diffBudgetTotal = Math.abs(totalData.budgetAmount - totalData.cashPay) //
totalData.diffBili = totalData.budgetAmount > 0 ? this.$util.fmoney(( totalData.diffBudgetTotal /
totalData.budgetAmount) * 100, 2) : '100' //
totalData.budgetamoutShow = totalData.budgetAmount ?
_this.$util.fmoney(totalData.budgetAmount) : 0.00 //
_this.headMsg = totalData
busniessTypePie.forEach((n, i) => {
if (n.name === '自营') {
//
totalData.diffBudgetTotal = Math.abs(totalData.budgetAmount - n.data)
//
totalData.diffBili = totalData.budgetAmount > 0 ?
this.$util.fmoney((totalData.diffBudgetTotal /
totalData.budgetAmount) * 100, 2) : '100'
}
});
this.headMsg = totalData
//
const [progressList, pieList] = this.getProgressData(busniessTypePie, totalData.cashPay)
this.modelProgress = progressList
//
var colors1 = ['#FFAC37', '#6B75B8'];
console.log(pieList)
// console.log(pieList)
this.showPie({
id: 'modelCont',
data: pieList,
@ -473,15 +511,20 @@
const [aprogressList, apieList] = this.getProgressData(busniessAreaPie, totalData.cashPay)
this.areaProgress = aprogressList
//
var colors3 = ['#FFAC37', '#d8ece9', '#f7f5f6', '#b2b7e3', '#F4B27A', '#F3B1C9', '#e0e3f7', '#FFE886',
'#f7f5f6'
];
var colors3 = ['#FFAC37', '#d8ece9', '#f7f5f6', '#b2b7e3', '#F4B27A', '#F3B1C9', '#e0e3f7', '#FFE886', '#f7f5f6'];
this.showPie({
id: 'areaCont',
data: apieList,
colors: colors3,
});
//
if (this.theRequest.GroupType == 1000 && this.theRequest.ProvinceCode == 340000) {
//
const [bayonetList] = this.getBayonetData(bayonetPie)
this.bayonetProgress = bayonetList
}
if (reginList.length) {
this.showPage = true
}
@ -524,6 +567,56 @@
})
return [_data2, _data1];
},
getBayonetData(data) {
var _data1 = [];
let _this = this
data.forEach((n, i) => {
var childData = [];
n.spList.forEach((m, i) => {
//
var _list = [];
m.regionList.forEach((o, i) => {
_list.push({
name: o.name,
data: o.Vehicle_Count,
flow: o.SectionFlow_Count,
bili: o.SectionFlow_Count == 0 ? 100 : _this.$util.fmoney(
(o.Vehicle_Count / o.SectionFlow_Count) * 100, 2),
MinVehicle_Count: o.MinVehicle_Count,
MediumVehicle_Count: o.MediumVehicle_Count,
LargeVehicle_Count: o.LargeVehicle_Count
});
});
_list.sort(function(a, b) {
return b.bili - a.bili
})
childData.push({
name: m.name,
data: m.Vehicle_Count, //+Number(data2[n[0]])
flow: m.SectionFlow_Count,
bili: m.SectionFlow_Count == 0 ? 0 : _this.$util.fmoney(
(m.Vehicle_Count / m.SectionFlow_Count) * 100, 2),
list: _list
});
});
childData.sort(function(a, b) {
return b.bili - a.bili
})
_data1.push({
name: n.name,
index: n.index,
list: childData
});
});
_data1.sort(function(a, b) {
return a.index - b.index
})
return [_data1];
},
async getRankContent() { //
const {
ProvinceCode,
@ -555,6 +648,7 @@
this.opacity = (options.scrollTop - 30) / 68
},
onLoad(option) {
uni.showLoading({
title: '正在加载...'
})
@ -569,8 +663,6 @@
if (this.PushAuthority.length > 0) {
this.theRequest = this.defaultMsg() || {}
console.log('theRequest',this.theRequest)
this.theRequest.time = this.lastDay
this.theRequest.month = this.$util.cutDate(this.lastDay, 'YYYYMM')
this.initData()
@ -972,10 +1064,86 @@
text-align: left;
}
/*车流量分析*/
.bayonet-cell-area {
/* display: none; */
max-height: 460rpx;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.bayonet-cell-area li{
width: 100%;
}
.bayonet-cell-area li .server,.bayonet-cell-area li .carType{
width: 30%;
display: inline-block;
text-align: center;
}
.bayonet-cell-area li .type{
width: 40%;
display: inline-block;
text-align: center;
}
.bayonet-cell-area li:nth-child(2n+1):before {
content: '';
background-color: #5596F9;
width: 8rpx;
height: 8rpx;
border-radius: 8rpx;
display: block;
position: absolute;
left: 0;top: 40%;
}
.bayonet-cell-area li:nth-child(2n):before {
content: '';
background-color: #FE6D67;
width: 8rpx;
height: 8rpx;
border-radius: 8rpx;
display: block;
position: absolute;
left: 0;top: 40%;
}
.bayonet-cell-area li {
width: 100%;
/*display: flex;*/
/*align-items: center;*/
/*justify-content: space-around;*/
position: relative;
}
.bayonet-cell-area li>div {
flex: 2;
}
.bayonet-cell-area li>div:nth-child(1) {
flex: 3;
text-align: left;
}
.bayonet-c-list {
padding: 16rpx 32rpx;
width: 100%;
position: relative;
}
.bayonet-c-list div:before {
content: '';
background: url(/static/images/authority/fwq.png) no-repeat center;
width: 35rpx;
height: 35rpx;
display: inline-block;
position: absolute;
left: 0;top: 7px;
}
.modle-title image {
max-width: 36rpx;
max-height: 36rpx;
}
.line-tab-unit {
@ -1177,12 +1345,22 @@
padding: 16rpx 32rpx;
}
.operation-cl-unit {
display: flex;
align-items: center;
justify-content: space-between;
.operation-cl-unit1 {
width: 100%;
font-size: 26rpx;
display: flex;
justify-content: space-between;
}
.operation-cl-unit1 .type{
width: 40%;
display: inline-block;
text-align: center;
}
.operation-cl-unit1 .server,.operation-cl-unit1 .carType{
width: 30%;
display: inline-block;
text-align: center;
}
.operation-c-list .progress {
width: 288rpx;

View File

@ -49,6 +49,28 @@
</div>
</div>
</div>
<div class="uni-flex jc-between" v-if="provinceCode == 340000 && groupType == 1000 && headMsg.shareShopCount > 0">
<div class="revenue-tag">
<div style="font-size: 24rpx; margin-top: 15rpx;">
分润门店
<span class="amount" style="font-size: 28rpx;padding-left: 0.5em;">
{{headMsg.shareShopCount}}
</span>
</div>
</div>
<div class="revenue-tag">
<div style="font-size: 24rpx; margin-top: 15rpx;">
驿达分润
<span class="amount" style="font-size: 28rpx;padding-left: 0.5em;">
{{ $util.fmoney(headMsg.royaltyPrice) }}
</span>
</div>
<!-- <div style="font-size: 24rpx;">
累计分润
<span class="amount" style="font-size: 28rpx;padding-left: 0.5em;">272,109.93</span>
</div> -->
</div>
</div>
<div class="view-bottom" @click="toggleCard">
<text class="uni-icon uni-icon-arrowup" :class="{'up':isup}"></text>
</div>
@ -56,7 +78,6 @@
<div class="model-content" :class="{'hidden': isup }">
<!-- 营收数据总览 -->
<div class="uni-flex justify-around" style="padding-top:18rpx;" v-if="provinceCode==620000">
<div class="check-unit">
<text>商超营收</text>
<div class="check-price-color">{{$util.fmoney(headMsg.scCashPay,2)}} <text></text></div>
@ -110,7 +131,6 @@
<text>商品均价</text>
<div class="check-price-color">{{$util.fmoney(headMsg.countave,2)}} <text></text></div>
</div>
</div>
<div class="uni-flex justify-around mode-content" style="padding-bottom: 24rpx;" v-if="provinceCode==620000">
<div class="check-unit">
@ -121,89 +141,87 @@
<div class="check-unit"></div>
<div class="check-unit"></div>
</div>
</div>
</div>
</template>
<template v-else>
<view class="revenue-card-cont">
<div class="top-revenue-card">
<div class="uni-flex jc-between header-date ai-center">
<div class="revenue-card-title">对客营收 </div>
<picker mode="date" @change="bindDateChange" :end="{lastDay}" start="2019-12-01" :value="selectDate">
<text class="revenue-date">{{headMsg.dayOfShow}} 星期{{getWeekDay(selectDate)}}</text>
</picker>
</div>
<div class="uni-flex ai-base jc-center center-amount">
<text class="revenue-alltime-amount">
{{headMsg.totalMoneyShow}}
</text>
<span class="amount-unit">()</span>
</div>
<div class="top-revenue-card">
<div class="uni-flex jc-between header-date ai-center">
<div class="revenue-card-title">对客营收 </div>
<picker mode="date" @change="bindDateChange" :end="{lastDay}" start="2019-12-01" :value="selectDate">
<text class="revenue-date">{{headMsg.dayOfShow}} 星期{{getWeekDay(selectDate)}}</text>
</picker>
</div>
<div class="uni-flex jc-between">
<div class="revenue-tag">
<span>计划营收</span>
<div class="amount">{{headMsg.budgetamoutShow}}</div>
</div>
<div class="revenue-tag">
<span>相比计划</span>
<div :class="headMsg.BUDGETAMOUNT< headMsg.totalMoney ? 'up-text-title':'down-text-title'">
{{$util.fmoney(headMsg.diffBudgetTotal) }}
<span style="font-size: 24rpx;margin-left: 12rpx;">{{headMsg.diffBili}}%</span>
</div>
</div>
<div class="uni-flex ai-base jc-center center-amount">
<text class="revenue-alltime-amount">
{{headMsg.totalMoneyShow}}
</text>
<span class="amount-unit">()</span>
</div>
<div class="view-bottom" @click="toggleCard">
<text class="uni-icon uni-icon-arrowup" :class="{'up':isup}"></text>
</div>
<div class="uni-flex jc-between">
<div class="revenue-tag">
<span>计划营收</span>
<div class="amount">{{headMsg.budgetamoutShow}}</div>
</div>
</view>
<div class="model-content" :class="{'hidden': isup }">
<!-- 营收数据总览 -->
<div class="uni-flex justify-around" style="padding-top:18rpx;">
<div class="check-unit">
<text>长款金额</text>
<div class="check-price-color">{{headMsg.DIFFERENT_PRICE_MORE}} <text></text></div>
</div>
<div class="check-unit">
<text>短款金额</text>
<div class="check-price-color">{{headMsg.DIFFERENT_PRICE_LESS}} <text></text></div>
</div>
<div class="check-unit">
<text>客单交易</text>
<div class="check-price-color">{{headMsg.TICKETCOUNT}} <text></text></div>
</div>
<div class="check-unit">
<text>客单均价</text>
<div class="check-price-color">{{headMsg.TICKETAVE}} <text></text></div>
</div>
</div>
<div class="uni-flex justify-around mode-content" style="padding-bottom: 24rpx;">
<div class="check-unit">
<text>优惠金额</text>
<div class="check-price-color">{{headMsg.TOTALOFFAMOUNT}} <text></text></div>
</div>
<div class="check-unit">
<text>移动支付</text>
<div class="check-price-color">{{headMsg.MOBILEPAYMENT}} <text></text></div>
</div>
<div class="check-unit">
<text>商品出售</text>
<div class="check-price-color">{{headMsg.COMMODITY_COUNT}} <text></text></div>
</div>
<div class="check-unit">
<text>商品均价</text>
<div class="check-price-color">{{headMsg.COMMODITYAVE}} <text></text></div>
<div class="revenue-tag">
<span>相比计划</span>
<div :class="headMsg.BUDGETAMOUNT< headMsg.totalMoney ? 'up-text-title':'down-text-title'">
{{$util.fmoney(headMsg.diffBudgetTotal) }}
<span style="font-size: 24rpx;margin-left: 12rpx;">{{headMsg.diffBili}}%</span>
</div>
</div>
</div>
<div class="view-bottom" @click="toggleCard">
<text class="uni-icon uni-icon-arrowup" :class="{'up':isup}"></text>
</div>
</view>
<div class="model-content" :class="{'hidden': isup }">
<!-- 营收数据总览 -->
<div class="uni-flex justify-around" style="padding-top:18rpx;">
<div class="check-unit">
<text>长款金额</text>
<div class="check-price-color">{{headMsg.DIFFERENT_PRICE_MORE}} <text></text></div>
</div>
<div class="check-unit">
<text>短款金额</text>
<div class="check-price-color">{{headMsg.DIFFERENT_PRICE_LESS}} <text></text></div>
</div>
<div class="check-unit">
<text>客单交易</text>
<div class="check-price-color">{{headMsg.TICKETCOUNT}} <text></text></div>
</div>
<div class="check-unit">
<text>客单均价</text>
<div class="check-price-color">{{headMsg.TICKETAVE}} <text></text></div>
</div>
</div>
<div class="uni-flex justify-around mode-content" style="padding-bottom: 24rpx;">
<div class="check-unit">
<text>优惠金额</text>
<div class="check-price-color">{{headMsg.TOTALOFFAMOUNT}} <text></text></div>
</div>
<div class="check-unit">
<text>移动支付</text>
<div class="check-price-color">{{headMsg.MOBILEPAYMENT}} <text></text></div>
</div>
<div class="check-unit">
<text>商品出售</text>
<div class="check-price-color">{{headMsg.COMMODITY_COUNT}} <text></text></div>
</div>
<div class="check-unit">
<text>商品均价</text>
<div class="check-price-color">{{headMsg.COMMODITYAVE}} <text></text></div>
</div>
</div>
</div>
</template>
</view>
</view>
</template>
<script>
export default {
props: ['headMsg', 'today', 'lastDay','nowDay', 'isup','selectDate','provinceCode'],
props: ['headMsg', 'today', 'lastDay','nowDay', 'isup','selectDate','provinceCode', 'groupType'],
methods: {
bindDateChange(e) {

View File

@ -1,6 +1,5 @@
import request from '@/util/index.js'
const methods = {
const methods = {
async getData(obj,isServerPartDetail) { // 获取远程数据
let _this = this
/* ts
@ -36,16 +35,28 @@ const methods = {
// 业态关系
const tradeData = await request.$webGet('CommercialApi/BaseInfo/GetBusinessTradeList', requestParamas)
if(tradeData.Result_Code != 100) return
if (tradeData.Result_Code != 100) return
// 计划营收金额
const budgetAmount= await request.$webGet('CommercialApi/Revenue/GetBudgetExpenseList', requestParamas)
if(budgetAmount.Result_Code != 100) return
const budgetAmount = await request.$webGet('CommercialApi/Revenue/GetBudgetExpenseList', requestParamas)
if (budgetAmount.Result_Code != 100) return
if(isServerPartDetail) { // 是服务区营收推送页面
return _this.getSeverpartReginList(data.Result_Data.List, busniessCounts.Result_Data.List,tradeData.Result_Data.List,budgetAmount.Result_Data.List)
// 移动支付分账数据
const mobileShare = await request.$webGet('CommercialApi/Revenue/GetMobileShare', requestParamas)
if (mobileShare.Result_Code != 100) return
// 片区车流量
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParamas)
if (bayonetCount.Result_Code != 100) return
if (isServerPartDetail) { // 是服务区营收推送页面
return _this.getSeverpartReginList(data.Result_Data.List, busniessCounts.Result_Data.List,
tradeData.Result_Data.List, budgetAmount.Result_Data.List)
}
return _this.getReginList(data.Result_Data.List, busniessCounts.Result_Data.List,tradeData.Result_Data.List,budgetAmount.Result_Data.List) // [reginList, totalData, busniessTypePie, busniessTradePie]
return _this.getReginList(data.Result_Data.List, busniessCounts.Result_Data.List,
tradeData.Result_Data.List, budgetAmount.Result_Data.List,
bayonetCount.Result_Data.List, mobileShare.Result_Data)
// [reginList, totalData, busniessTypePie, busniessTradePie]
},
getTotalShowData(newData, oldData,index) {
// <TotalModel>
@ -118,6 +129,78 @@ const methods = {
return [...list]
},
getBayonetPie(typeName, item, list) { // 车流量数据
const regionData = list.find(n => n.name === item["SPRegionType_Name"])
if (regionData) {
const oldData = regionData.spList.find(m => m.name === item[typeName])
if (oldData) {
oldData.Vehicle_Count = Number((oldData.Vehicle_Count + item.Vehicle_Count).toFixed(2))
oldData.SectionFlow_Count = Number((oldData.SectionFlow_Count + item.SectionFlow_Count).toFixed(2))
oldData.MinVehicle_Count = Number((oldData.MinVehicle_Count + item.MinVehicle_Count).toFixed(2))
oldData.MediumVehicle_Count = Number((oldData.MediumVehicle_Count + item.MediumVehicle_Count).toFixed(2))
oldData.LargeVehicle_Count = Number((oldData.LargeVehicle_Count + item.LargeVehicle_Count).toFixed(2))
const oldRegion = oldData.regionList.find(o => o.name === item["Serverpart_Region"])
if (oldRegion) {
oldRegion.Vehicle_Count = Number((oldRegion.Vehicle_Count + item.Vehicle_Count).toFixed(2))
oldRegion.SectionFlow_Count = Number((oldRegion.SectionFlow_Count + item.SectionFlow_Count).toFixed(2))
oldRegion.MinVehicle_Count = Number((oldRegion.MinVehicle_Count + item.MinVehicle_Count).toFixed(2))
oldRegion.MediumVehicle_Count = Number((oldRegion.MediumVehicle_Count + item.MediumVehicle_Count).toFixed(2))
oldRegion.LargeVehicle_Count = Number((oldRegion.LargeVehicle_Count + item.LargeVehicle_Count).toFixed(2))
}
else{
oldData.regionList.push({
name: item["Serverpart_Region"],
Vehicle_Count: item.Vehicle_Count,
SectionFlow_Count: item.SectionFlow_Count,
MinVehicle_Count: item.MinVehicle_Count,
MediumVehicle_Count: item.MediumVehicle_Count,
LargeVehicle_Count: item.LargeVehicle_Count,
})
}
} else {
regionData.spList.push({
name: item[typeName],
Vehicle_Count: item.Vehicle_Count,
SectionFlow_Count: item.SectionFlow_Count,
MinVehicle_Count: item.MinVehicle_Count,
MediumVehicle_Count: item.MediumVehicle_Count,
LargeVehicle_Count: item.LargeVehicle_Count,
regionList: [{
name: item["Serverpart_Region"],
Vehicle_Count: item.Vehicle_Count,
SectionFlow_Count: item.SectionFlow_Count,
MinVehicle_Count: item.MinVehicle_Count,
MediumVehicle_Count: item.MediumVehicle_Count,
LargeVehicle_Count: item.LargeVehicle_Count,
}]
})
}
} else {
list.push({
name: item["SPRegionType_Name"],
index: item["SPRegionType_Index"],
spList: [{
name: item[typeName],
Vehicle_Count: item.Vehicle_Count,
SectionFlow_Count: item.SectionFlow_Count,
MinVehicle_Count: item.MinVehicle_Count,
MediumVehicle_Count: item.MediumVehicle_Count,
LargeVehicle_Count: item.LargeVehicle_Count,
regionList: [{
name: item["Serverpart_Region"],
Vehicle_Count: item.Vehicle_Count,
SectionFlow_Count: item.SectionFlow_Count,
MinVehicle_Count: item.MinVehicle_Count,
MediumVehicle_Count: item.MediumVehicle_Count,
LargeVehicle_Count: item.LargeVehicle_Count,
}],
}]
})
}
return [...list]
},
getSeverpartReginList(data, shopCountList,tradeList,budgetAmount){
let _this = this
let totalShow = {} // 总营收数据统计
@ -153,13 +236,14 @@ const methods = {
}
return [ totalShow, busniessTypePie, busniessTradePie,busniessTradeFathPie ]
},
getReginList(data, shopCountList,tradeList,budgetAmount) {
getReginList(data, shopCountList,tradeList,budgetAmount,bayonetCount, mobileShare) {
let _this = this
let totalShow = {} // 总营收数据统计
let list = [] // 上传营收列表数据
let busniessTypePie = [] // 经营模式饼图统计数据
let busniessTradePie = [] // 经营业态饼图统计数据
let busniessAreaPie = [] // 区域经营饼图统计数据
let bayonetPie = [] // 区域车流饼图统计数据
let totalUploadCount = 0
data.map(async (n, index) => {
n.show = false
@ -223,13 +307,26 @@ const methods = {
busniessTypePie = _this.getBusniessPie('Business_TypeName', n, busniessTypePie)
busniessTradePie = _this.getBusniessPie('tradename', n, busniessTradePie)
if(this.groupType ==1000){
if (this.groupType == 1000){
busniessAreaPie = _this.getBusniessPie('SPRegionType_Name', n, busniessAreaPie)
}
})
list.sort((a, b) => b.cashpay - a.cashpay)
if (this.groupType == 1000 && _this.provinceCode == 340000) {
// 获取移动支付分账数据
if (mobileShare) {
totalShow.shareShopCount = mobileShare.ShareShop_Count
totalShow.royaltyPrice = mobileShare.Royalty_Price
totalShow.subRoyaltyPrice = mobileShare.SubRoyalty_Price
totalShow.ticketFee = mobileShare.Ticket_Fee
}
// 片区车流量数据
bayonetCount.map(async (n, index) => {
bayonetPie = _this.getBayonetPie('Serverpart_Name', n, bayonetPie)
})
}
totalShow.uploadState = data.filter(n=>n.Revenue_Upload>0).length+'/'+totalUploadCount
totalShow.budgetAmount = 0
if(_this.provinceCode==620000){
@ -239,7 +336,7 @@ const methods = {
if(budgetAmount.length){
totalShow.budgetAmount = budgetAmount[0].BUDGET_AMOUNT
}
return [list, totalShow, busniessTypePie, busniessTradePie,busniessAreaPie]
return [list, totalShow, busniessTypePie, busniessTradePie,busniessAreaPie,bayonetPie]
}
}

View File

@ -1,7 +1,7 @@
{
"appid": "wxa99ef047735c031e",
"compileType": "miniprogram",
"libVersion": "2.24.5",
"libVersion": "2.25.3",
"packOptions": {
"ignore": [],
"include": []

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB