This commit is contained in:
cclu 2024-03-14 18:25:17 +08:00
parent 1f7c12375b
commit 7f142a79f8
6 changed files with 472 additions and 88 deletions

14
package-lock.json generated
View File

@ -7,6 +7,7 @@
"dependencies": {
"chinese-lunar-calendar": "^1.0.1",
"moment": "^2.30.1",
"numeral": "^2.0.6",
"sass": "^1.45.1",
"sass-loader": "^10.3.1",
"vuex-persistedstate": "^4.1.0"
@ -786,6 +787,14 @@
"node": ">=0.10.0"
}
},
"node_modules/numeral": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz",
"integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==",
"engines": {
"node": "*"
}
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@ -1813,6 +1822,11 @@
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"numeral": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz",
"integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA=="
},
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",

View File

@ -2,6 +2,7 @@
"dependencies": {
"chinese-lunar-calendar": "^1.0.1",
"moment": "^2.30.1",
"numeral": "^2.0.6",
"sass": "^1.45.1",
"sass-loader": "^10.3.1",
"vuex-persistedstate": "^4.1.0"

View File

@ -33,20 +33,21 @@ export default {
success:{
handler(value){
this.preferPath = ''
let sum = value[0] + value[1]
let sum = value[0] + value[1] + value[2]
if (sum===0){
let res = {
series:[{
data:[{name:'驿站营收',value:0},{name:'未完成',value:0}]
data:[{name:'便利店',value:0},{name:'餐饮客房',value:0},{name:'商铺租赁',value:0}]
}]
}
this.drawCharts(this.name,res)
}else{
let firstRate = Number(((value[0] / sum)*100).toFixed(2))
let secondRate = 100 - Number(firstRate)
let secondRate = Number(((value[1] / sum)*100).toFixed(2))
let thirdRate = 100 - Number(firstRate)- Number(secondRate)
let res = {
series:[{
data:[{name:'驿站营收',value:firstRate},{name:'未完成',value:secondRate}]
data:[{name:'便利店',value:firstRate},{name:'餐饮客房',value:secondRate},{name:'商铺租赁',value:thirdRate}]
}]
}
this.drawCharts(this.name,res)

View File

@ -117,12 +117,12 @@
<!-- ,height:loadMore?'200px':'38px'-->
<div class="storeDetail" :style="{ top: menu.bottom + 13 + 'px',left:0 + 'px'}">
<swiper class="detailBox" previous-margin="40rpx" next-margin="20rpx" :style="{height: loadMore?`1330rpx`:`740rpx`}" @change="handleChangeSelect" :current="selectDetail">
<swiper class="detailBox" previous-margin="40rpx" next-margin="20rpx" :style="{height: loadMore?`1330rpx`:`710rpx`}" @change="handleChangeSelect" :current="selectDetail">
<block v-for="(item,index) in swiperList" :key="index">
<swiper-item :item-id="index" :data-item-id="index" :class="selectMonth === index+1 || selectMonth === ((index+1)%12===0?12:(index+1)%12)?'detailItemBox':'noSelectItemBox'">
<view class="bigBox" v-if="selectMonth === index+1 || selectMonth === ((index+1)%12===0?12:(index+1)%12)">
<view class="box">
<view class="top" style="height: 740rpx;">
<view class="top" style="height: 710rpx;">
<view class="topTop">
<view class="statistics" @click="goToRevenueStatic">
<image class="staticImg" src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex/3stStaticIcon.svg"/>
@ -212,7 +212,7 @@
<view class="moneyRate">
<view class="leftBox" @click="handleShowYDModal" v-if="showRateChart">
<view class="rateChartsBox">
<rateCharts :success="moneyRateList" :colorList="1<=selectMonth && selectMonth<=3?['#DB573B','#FFAB30']:4<=selectMonth && selectMonth<=6?['#137BBD','#5DC1E0']:7<=selectMonth && selectMonth<=9?['#3663CB','#7CADF8']:['#A66A37','#DCA858']" :name="`${selectMonth}rate`"/>
<rateCharts :success="moneyRateList" :colorList="1<=selectMonth && selectMonth<=3?['#1677FE','#456497','#97A9C6']:4<=selectMonth && selectMonth<=6?['#1677FE','#456497','#97A9C6']:7<=selectMonth && selectMonth<=9?['#1677FE','#456497','#97A9C6']:['#1677FE','#456497','#97A9C6']" :name="`${selectMonth}rate`"/>
</view>
<view class="haveNoticeBox" v-if="ydModal" @click.stop="handleShowYDModal">
<text class="label">驿达入账:<text class="value">{{ydRate}}%</text></text>
@ -220,30 +220,40 @@
</view>
</view>
<view class="newRightBox">
<view class="newRightItem">
<view class="newRightItem" v-for="(subItem,subIndex) in profitSharingList" :key="subIndex">
<view class="itemLeft">
<view class="itemIcon" style="background: #1677FE"></view>
<span class="itemName">便利店</span>
<span class="itemValue">3,100.65</span>
<view class="itemIcon" :style="{background:subIndex===0?'#1677FE':subIndex===1?'#456497':subIndex===2?'#97A9C6':''}"></view>
<span class="itemName">{{subItem.name}}</span>
<span class="itemValue">{{subItem.value?numeral(subItem.value/10000).format('0,0.00'):''}}</span>
</view>
<view class="itemRight">+9.65%</view>
</view>
<view class="newRightItem">
<view class="itemLeft">
<view class="itemIcon" style="background: #456497"></view>
<span class="itemName">餐饮客房</span>
<span class="itemValue">1,875.23</span>
</view>
<view class="itemRight">+23.87%</view>
</view>
<view class="newRightItem">
<view class="itemLeft">
<view class="itemIcon" style="background: #97A9C6"></view>
<span class="itemName">商铺租赁</span>
<span class="itemValue">4,921.86</span>
</view>
<view class="itemRight">+15.02%</view>
<view class="itemRight">{{subItem.add}}</view>
</view>
<!-- <view class="newRightItem">-->
<!-- <view class="itemLeft">-->
<!-- <view class="itemIcon" style="background: #1677FE"></view>-->
<!-- <span class="itemName">便利店</span>-->
<!-- <span class="itemValue">3,100.65</span>-->
<!-- </view>-->
<!-- <view class="itemRight">+9.65%</view>-->
<!-- </view>-->
<!-- <view class="newRightItem">-->
<!-- <view class="itemLeft">-->
<!-- <view class="itemIcon" style="background: #456497"></view>-->
<!-- <span class="itemName">餐饮客房</span>-->
<!-- <span class="itemValue">1,875.23</span>-->
<!-- </view>-->
<!-- <view class="itemRight">+23.87%</view>-->
<!-- </view>-->
<!-- <view class="newRightItem">-->
<!-- <view class="itemLeft">-->
<!-- <view class="itemIcon" style="background: #97A9C6"></view>-->
<!-- <span class="itemName">商铺租赁</span>-->
<!-- <span class="itemValue">4,921.86</span>-->
<!-- </view>-->
<!-- <view class="itemRight">+15.02%</view>-->
<!-- </view>-->
</view>
<!-- <view class="rightBox">-->
<!-- <view class="noticeItem">-->
@ -268,8 +278,8 @@
<view class="itemName">对客营收<span class="unit">/万元</span></view>
</view>
<view class="itemBottom">
<span class="revenueNum">13,268.97</span>
<span class="revenueAdd">+14.91%</span>
<span class="revenueNum">{{showTableData.YearRevenueAmount?numeral(showTableData.YearRevenueAmount/10000).format('0,0.00'):''}}</span>
<span class="revenueAdd">{{showTableData.YearRevenueAdd?`${showTableData.YearRevenueAdd>0?'+':''}${showTableData.YearRevenueAdd}%`:'-'}}</span>
</view>
</view>
@ -279,13 +289,13 @@
<view class="itemName">营业收入<span class="unit">/万元</span></view>
</view>
<view class="itemBottom">
<span class="revenueNum">13,268.97</span>
<span class="revenueAdd">+23.93%</span>
<span class="revenueNum">{{showTableData.YearAccountRoyalty?numeral(showTableData.YearAccountRoyalty/10000).format('0,0.00'):''}}</span>
<span class="revenueAdd">{{showTableData.YearAccountAdd?`${showTableData.YearAccountAdd>0?'+':''}${showTableData.YearAccountAdd}%`:'-'}}</span>
</view>
</view>
</view>
<view class="showMoreLoading">
<image @click="handleShowMore" class="showMorenDown" src="/static/images/newIndex/downIconMore.png"/>
<image @click="handleShowMore" class="showMorenDown" src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/downIconMore.png"/>
</view>
<!-- <view class="goBusiness">-->
<!-- &lt;!&ndash; @click="handleGoProject"&ndash;&gt;-->
@ -629,7 +639,7 @@
<view class="moneyRate">
<view class="leftBox" @click="handleShowYDModal" v-if="showRateChart">
<view class="rateChartsBox">
<rateCharts :success="moneyRateList" :colorList="['#2363FF','#B1C8FF']" :name="`${selectMonth}rate`"/>
<rateCharts :success="moneyRateList" :colorList="['#1677FE','#456497','#97A9C6']" :name="`${selectMonth}rate`"/>
</view>
<view class="haveNoticeBox" v-if="ydModal" @click.stop="handleShowYDModal">
<text class="label">驿达入账:<text class="value">{{ydRate}}%</text></text>
@ -1430,6 +1440,7 @@ import SliderPage from "./components/sliderPage.vue";
import UniDataSelect from "../../components/uni-data-select/uni-data-select.vue";
import NumberScroll from "./components/numberScroll.vue";
import moment from "moment";
import numeral from "numeral";
var rincanvas = {};
export default {
components: {SliderPage, RateCharts, MonthCharts, Tabbar,uniPopup,UniDataSelect,NumberScroll},
@ -1556,6 +1567,7 @@ export default {
externalMoney:'',//
currentMoney:'',
showMoreFixed:false,//
profitSharingList:[],// list
}
},
watch:{
@ -1797,6 +1809,7 @@ export default {
uni.stopPullDownRefresh();
},
methods:{
numeral,
...mapActions(['memberLogin','getLoginCode']),
//
handleShowMore(){
@ -2557,9 +2570,9 @@ export default {
request.$webGet('CommercialApi/Revenue/GetSummaryRevenueMonth',req).then(lastData=>{
flag3 = true
let result = lastData.Result_Data
console.log('result2',result)
let progressAll = 0
this.currentPeriodData = result.MonthRevenueModel.CurAccountRoyalty
this.moneyRateList = [this.currentPeriodData.Royalty_Theory,this.currentPeriodData.SubRoyalty_Theory]
let sum = this.currentPeriodData.Royalty_Theory+this.currentPeriodData.SubRoyalty_Theory
console.log('currentPeriodData',this.currentPeriodData)
if(sum===0){
@ -2570,6 +2583,7 @@ export default {
this.shopRate = ((this.currentPeriodData.SubRoyalty_Theory / sum)*100).toFixed(2)
}
console.log('result.BusinessTypeList',result.BusinessTypeList)
let shareList = [{},{},{}]
result.BusinessTypeList.forEach(item=>{
progressAll+=Number(item.value)
let index = (item.value /10000).toString().indexOf('.')
@ -2596,7 +2610,18 @@ export default {
item.addQOQ = null
}
}
//
if (item.name==='便利店'){
shareList[0] = item
}else if(item.name==='餐饮客房'){
shareList[1] = item
}else if(item.name==='商铺租赁'){
shareList[2] = item
}
})
console.log('shareList',shareList)
this.moneyRateList = [Number(shareList[0].value),Number(shareList[1].value),Number(shareList[2].value)]
this.profitSharingList = shareList
this.typeList = result.BusinessTypeList
this.revenueMoney = result.BusinessTypeList[0].showValue
this.externalMoney = result.BusinessTypeList[1].showValue
@ -2628,6 +2653,10 @@ export default {
this.showTableData = result.MonthRevenueModel
console.log('result.MonthRevenueModel',result.MonthRevenueModel)
//
this.showTableData.YearRevenueAdd = (((this.showTableData.YearRevenueAmount - this.showTableData.YearRevenueYOY) / this.showTableData.YearRevenueYOY)*100).toFixed(2)
//
this.showTableData.YearAccountAdd = (((this.showTableData.YearAccountRoyalty - this.showTableData.YearAccountRoyaltyYOY) / this.showTableData.YearAccountRoyaltyYOY)*100).toFixed(2)
if (this.showTableData.RevenueYOY){
this.showTableData.add = Number(((this.showTableData.CashPay-this.showTableData.RevenueYOY)/this.showTableData.RevenueYOY*100).toFixed(2))
this.showTableData.add = this.showTableData.add>0?'+'+this.showTableData.add:this.showTableData.add
@ -3409,7 +3438,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
//padding: 16rpx 16rpx 0;
//background: linear-gradient(135deg, #FFE3BA 0%, #FFF5E5 40%, #FFF1DB 78%, #FFDABC 100%); border-radius: 16rpx;
//margin-top: 32rpx;
margin-top: 48rpx;
margin-top: 32rpx;
.progress{
width: 100%;
height: 18rpx;
@ -3641,7 +3670,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
width: 100%;
background: #F9FAFC;
box-sizing: border-box;
padding: 28rpx 24rpx;
padding: 24rpx 28rpx;
margin-top: 48rpx;
.accountItem{
width: 100%;

View File

@ -45,10 +45,10 @@
</div>
</div>
<div class="waringText" v-if="isShowWarningTime">
<span style="display: block">{{`${allDateDay}营收数据需等待现场管理员校验完成...`}}</span>
<span>{{`预计早上10点请稍等...`}}</span>
</div>
<!-- <div class="waringText" v-if="isShowWarningTime">-->
<!-- <span style="display: block">{{`${allDateDay}营收数据需等待现场管理员校验完成...`}}</span>-->
<!-- <span>{{`预计早上10点请稍等...`}}</span>-->
<!-- </div>-->
</div>
<div class="overAllDataBottom">
<div class="contentTitleBox" style="margin-bottom: 16rpx">

View File

@ -21,16 +21,19 @@
<image class="tabItem" @click="handleChangeTab(2)" :src="selectTab===2?'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/activeSecondTab.png':'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/secondTab.png'"/>
</view>
<scroll-view :style="{top: menu.bottom + 5 + 12 + 40 +'px'}" class="scrollView" :current="currentScroll" scroll-x="true" :scroll-into-view="'item'+selectIndex" scroll-with-animation>
<view :class="currentScroll===`item${index+1}`?'selectScrollItem':'scrollItem'" v-for="(item,index) in selectList" :key="index">{{item}}</view>
<view :style="{height:'100%',width:`${68*selectList.length}px`}">
<view :id="'item'+index" :class="currentScroll===`item${index}`?'selectScrollItem':'scrollItem'" v-for="(item,index) in selectList" :key="index" @click="handleChangMonth(index)">{{item}}</view>
</view>
</scroll-view>
</view>
<view class="content">
<view v-if="selectTab===1">
<!-- 对客营收 -->
<view class="customerRevenue">
<view class="contentRevenue">
<view class="contentTop">
<span class="contentMonth">{{thisMonth?thisMonth+'月':''}}</span>
<span class="contentMonth">{{thisMonth?thisMonth+'月':'累计'}}</span>
<span class="contentTitle">对客营收
<span class="contentUnit">/万元</span>
</span>
@ -38,22 +41,22 @@
<view class="dataBox">
<view class="dataItem">
<span class="dataBigValue">+14.91%</span>
<span class="dataBigValue">{{topDetail.RevenueINC?topDetail.RevenueINC.increaseRate<0?`${topDetail.RevenueINC.increaseRate}%`:`+${topDetail.RevenueINC.increaseRate}%` :'-'}}</span>
<span class="dataLabel">同比去年</span>
</view>
<view class="dataItem">
<span class="dataValue">13,268.97</span>
<span class="dataValue">{{topDetail.RevenueINC ? numeral(topDetail.RevenueINC.curYearData /10000).format('0,0.00'):'-'}}</span>
<span class="dataLabel">2024</span>
</view>
<view class="dataItem">
<span class="dataValue">11,546.32</span>
<span class="dataValue">{{topDetail.RevenueINC ? numeral(topDetail.RevenueINC.lYearData / 10000).format('0,0.00'):'-'}}</span>
<span class="dataLabel">2023</span>
</view>
</view>
<view class="addBox">
增长
<span class="addNumber">+1,722.65</span>
<span class="addNumber">{{topDetail.RevenueINC ? `${topDetail.RevenueINC.increaseData<0?'':'+'}${numeral(topDetail.RevenueINC.increaseData / 10000).format('0,0.00')}`:'-'}}</span>
</view>
<view class="line"></view>
@ -73,7 +76,118 @@
<view class="firstLabel">外包</view>
<view class="secondLabel">餐商铺租赁</view>
</view>
<scroll-view class="tableRight" scroll-x="true">
<view class="labelBox">
<span class="label">2024</span>
<span class="label">2023</span>
<span class="label">增长</span>
<span class="label">增幅</span>
</view>
<view :class="item.type===1?'firstLabelBox':'secondLabelBox'" v-for="(item,index) in pageRevenueList" :key="index">
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.curYearData?numeral(item.curYearData/10000).format('0,0.00'):''}}</span>
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.lYearData?numeral(item.lYearData/10000).format('0,0.00'):''}}</span>
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.increaseData?`${item.increaseData<0?'':'+'}${numeral(item.increaseData/10000).format('0,0.00')}`:''}}</span>
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.increaseRate?`${item.increaseRate<0?'':'+'}${item.increaseRate}%`:''}}</span>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
<!-- 营业收入 -->
<view class="customerRevenue" style="margin-top: 24rpx">
<view class="contentRevenue" style="background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueBg2.png')">
<view class="contentTop">
<span class="contentMonth">{{thisMonth?thisMonth+'月':'累计'}}</span>
<span class="contentTitle">营业收入
<span class="contentUnit">/万元</span>
</span>
</view>
<view class="dataBox">
<view class="dataItem">
<span class="dataBigValue">{{topDetail.AccountINC?topDetail.AccountINC.increaseRate<0?`${topDetail.AccountINC.increaseRate}%`:`+${topDetail.AccountINC.increaseRate}%` :'-'}}</span>
<span class="dataLabel">同比去年</span>
</view>
<view class="dataItem">
<span class="dataValue">{{topDetail.AccountINC ? numeral(topDetail.AccountINC.curYearData /10000).format('0,0.00'):'-'}}</span>
<span class="dataLabel">2024</span>
</view>
<view class="dataItem">
<span class="dataValue">{{topDetail.AccountINC ? numeral(topDetail.AccountINC.lYearData /10000).format('0,0.00'):'-'}}</span>
<span class="dataLabel">2023</span>
</view>
</view>
<view class="addBox">
增长
<span class="addNumber">{{topDetail.AccountINC ? `${topDetail.AccountINC.increaseData<0?'':'+'}${numeral(topDetail.AccountINC.increaseData / 10000).format('0,0.00')}`:'-'}}</span>
</view>
<view class="line"></view>
<view class="tableBox">
<view class="tableTop">
<span class="tableTitle">营收明细</span>
<span class="tableUnit">/万元</span>
</view>
<view class="tableContent" style="height: 304rpx">
<view class="tableLeft">
<view class="label">类别</view>
<view class="firstLabel">自营 (除税)</view>
<view class="firstLabel">便利店</view>
<view class="firstLabel">餐饮客房</view>
</view>
<scroll-view class="tableRight" scroll-x="true">
<view class="labelBox">
<span class="label">2024</span>
<span class="label">2023</span>
<span class="label">增长</span>
<span class="label">增幅</span>
</view>
<view :class="item.type===1?'firstLabelBox':'secondLabelBox'" v-for="(item,index) in pageAccountList" :key="index">
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.curYearData?numeral(item.curYearData/10000).format('0,0.00'):''}}</span>
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.lYearData?numeral(item.lYearData/10000).format('0,0.00'):''}}</span>
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.increaseData?`${item.increaseData<0?'':'+'}${numeral(item.increaseData/10000).format('0,0.00')}`:''}}</span>
<span :class="item.type===1?'firstLabel':'secondLabel'">{{item.increaseRate?`${item.increaseRate<0?'':'+'}${item.increaseRate}%`:''}}</span>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
<!-- 入区车流 -->
<view class="customerRevenue" style="margin-top: 24rpx">
<view class="contentRevenue" style="background-image: url('https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueBg3.png');background-size: cover;padding-bottom: 24rpx">
<view class="contentTop">
<span class="contentMonth">{{thisMonth?thisMonth+'月':'累计'}}</span>
<span class="contentTitle">入区车流
<span class="contentUnit">/万辆</span>
</span>
</view>
<view class="dataBox">
<view class="dataItem">
<span class="dataBigValue">{{topDetail.BayonetINC?`${topDetail.BayonetINC.increaseRate<0?'':'+'}${topDetail.BayonetINC.increaseRate}%` :'-'}}</span>
<span class="dataLabel">同比去年</span>
</view>
<view class="dataItem">
<span class="dataValue">{{topDetail.BayonetINC ? numeral(topDetail.BayonetINC.curYearData /10000).format('0,0.00'):'-'}}</span>
<span class="dataLabel">2024</span>
</view>
<view class="dataItem">
<span class="dataValue">{{topDetail.BayonetINC ? numeral(topDetail.BayonetINC.lYearData /10000).format('0,0.00'):'-'}}</span>
<span class="dataLabel">2023</span>
</view>
</view>
<view class="addBox">
增长
<span class="addNumber">{{topDetail.BayonetINC ? `${topDetail.BayonetINC.increaseData<0?'':'+'}${numeral(topDetail.BayonetINC.increaseData / 10000).format('0,0.00')}`:'-'}}</span>
</view>
</view>
</view>
@ -84,12 +198,18 @@
<view class="bigBox">
<view class="revenueBoxHeader">
<!-- <view class="headerTitle">驿达营收</view>-->
<image class="revenueImg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/revenueItemBg.png"/>
<!-- <image class="revenueImg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/revenueItemBg.png"/>-->
<view class="revenueContent">
<view class="contentTitleBox">
<span class="selectMonth">{{thisMonth?thisMonth+'月':'累计'}}</span>
<span class="contentTitle">驿达入账收入</span>
<span class="contentUnit">/万元</span>
</view>
<view class="sumBox">
<view class="left">
<image class="sumLogo" src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex2/sumLogo.svg"/>
<view class="headerTitle">驿达入账收入</view>
<!-- <view class="headerTitle">驿达入账收入</view>-->
</view>
<view class="sumText">
<!-- <view class="sumMoney">{{pageDataObj.OwnerRevenue?$util.fmoney(pageDataObj.OwnerRevenue/10000,2):'0.00'}}</view>-->
@ -211,10 +331,15 @@
<!-- <view class="headerTitle">商家营收</view>-->
<image class="revenueImg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/entryAdd.png"/>
<view class="revenueContent">
<view class="contentTitleBox">
<span class="selectMonth">{{thisMonth?thisMonth+'月':'累计'}}</span>
<span class="contentTitle">商家入账收入</span>
<span class="contentUnit">/万元</span>
</view>
<view class="sumBox">
<view class="left">
<image class="sumLogo" src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex2/merchantsSum.svg"/>
<view class="headerTitle">商家入账收入</view>
<!-- <view class="headerTitle">商家入账收入</view>-->
</view>
<view class="sumText">
<!-- <view class="sumMoney">{{pageDataObj.MerchantRevenue?$util.fmoney(pageDataObj.MerchantRevenue/10000):"0.00"}}</view>-->
@ -335,7 +460,11 @@
<image class="revenueImg" src="https://eshangtech.com/ShopICO/ahyd-BID/revenueBox/expenditure.png"/>
<view class="revenueContent">
<view class="contentTitleBox">
<span class="selectMonth">{{thisMonth?thisMonth+'月':'累计'}}</span>
<span class="contentTitle">商家营收</span>
<span class="contentUnit">/万元</span>
</view>
<view class="revenueAmount" style="margin-top: 48rpx">
<view class="amountItem">
<view class="itemTop">
@ -477,6 +606,8 @@
</template>
<script>
import request from '@/util/index.js'
import numeral from "numeral";
export default {
data(){
return {
@ -492,37 +623,133 @@ export default {
selectIndex:0,//
selectList:[],//
currentScroll:'',//
useInfo:{},
topDetail:{},// tab1
pageRevenueList:[],//
pageAccountList:[],//
curYear:2024,//
}
},
onLoad(option){
async onLoad(option){
console.log('option',option)
uni.showLoading({
title:'正在加载'
})
//
let systemInfo = uni.getSystemInfoSync()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
uni.setStorageSync('phoneInfo',systemInfo)
this.menu = uni.getMenuButtonBoundingClientRect()
console.log('statusBarHeight',this.statusBarHeight)
console.log('menu',this.menu)
//
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
this.useInfo = JSON.parse(JSON.stringify(userInfo))
if (option.time){
this.lastDay = option.time
const date = new Date(this.lastDay)
let m = date.getMonth() + 1
this.thisMonth = m
for (let i=1;i<=this.thisMonth;i++){
this.selectList.push(`${i}`)
}
this.selectList.unshift('累计')
this.currentScroll = 'item' + this.thisMonth
}
if (option.month){
this.searchText = option.month
const selectDate = new Date(option.month)
let selectYear = selectDate.getFullYear()
this.curYear = selectYear
const nowDate = new Date()
let nowYear = nowDate.getFullYear()
let monthNumber = 0
if (nowYear>selectYear){
monthNumber = 12
}else{
monthNumber = selectDate.getMonth() + 1
}
this.handleGetTableData()
let selectMonth = selectDate.getMonth() + 1
this.thisMonth = selectMonth
this.selectIndex = selectMonth
this.currentScroll = 'item' + this.thisMonth
for (let i=1;i<=monthNumber;i++){
this.selectList.push(`${i}`)
}
this.selectList.unshift('累计')
}
console.log('this.selectList',this.selectList)
await this.handleGetRevenueData()
await this.handleGetTableData()
uni.hideLoading()
},
methods:{
numeral,
async handleGetRevenueData(){
const date = new Date()
let y = date.getFullYear()
let m = date.getMonth() + 1
const type = this.currentScroll.split('item')[1]==='0'?2:1
const req = {
calcType: type,//12
pushProvinceCode: this.useInfo.userData.ProvinceCode || '340000',
curYear: this.curYear,//
compareYear: this.curYear-1,//
StatisticsMonth:this.thisMonth===0?y>this.curYear?12:m:this.thisMonth,//
}
console.log('req',req)
const data = await request.$webGet('CommercialApi/Revenue/GetMonthlyBusinessAnalysis',req)
console.log('data',data)
let res = data.Result_Data.List
if (res && res.length>0){
let everyTop = {}//
let revenueList = [{},{},{},{},{}]//
let accountList = [{},{},{}]//
res.forEach(item=>{
if (item.ServerpartName==='累计'){
everyTop = item
}else if(item.SPRegionTypeId===1){
// SPRegionTypeId===1
revenueList[0] = {...item.RevenueINC, type:1}
accountList[0] = {...item.AccountINC, type:1}
}else if(item.SPRegionTypeId===2){
// SPRegionTypeId===2
revenueList[3] = {...item.RevenueINC, type:1}
// accountList[3] = {...item.AccountINC, type:1}
}else if(item.ServerpartId===1){
revenueList[1] = {...item.RevenueINC, type:2}
accountList[1] = {...item.AccountINC, type:2}
}else if(item.ServerpartId===2){
revenueList[2] = {...item.RevenueINC,type:2}
accountList[2] = {...item.AccountINC,type:2}
}else if(item.ServerpartId===3){
revenueList[4] = {...item.RevenueINC,type:2}
// accountList[4] = {...item.AccountINC,type:2}
}
})
this.topDetail = everyTop
this.pageRevenueList = revenueList
this.pageAccountList = accountList
}
},
async handleChangMonth(index){
this.selectIndex = index
this.currentScroll = 'item' + index
this.thisMonth = index
uni.showLoading({
title:'正在加载'
})
await this.handleGetRevenueData()
await this.handleGetTableData()
uni.hideLoading()
},
handleChangeTab(value){
this.selectTab = value
// if (value===1){
// this.handleGetRevenueData()
// }else{
// this.handleGetTableData()
// }
},
handleBack(){
uni.navigateBack({
@ -538,27 +765,22 @@ export default {
this.OwnerListSum = {}
this.MerchantSum = {}
this.pageDataObj = {}
console.log('e',e)
this.searchText = e.detail.value
this.handleGetTableData()
},
async handleGetTableData(){
uni.showLoading({
title:'正在加载'
})
const date = new Date(this.searchText)
const date = new Date()
let y = date.getFullYear()
let m = date.getMonth() + 1
if (m<10){
m = '0'+m
}
const type = this.currentScroll.split('item')[1]==='0'?2:1
const req = {
calcType: type,//12
pushProvinceCode:'340000',
StatisticsMonth:`${y}${m}`,
StatisticsMonth:`${this.curYear}${this.thisMonth===0?y>this.curYear?12:`${m<10?'0'+m:m}`:`${this.thisMonth<10?'0'+this.thisMonth:this.thisMonth}`}`,
StatisticsDate:this.lastDay
}
const data = await request.$webGet('CommercialApi/Revenue/GetAccountReceivable',req)
console.log('data',data)
if (data.Result_Code===100){
this.pageDataObj = data.Result_Data
let OwnerAcountSum = 0
@ -599,9 +821,7 @@ export default {
}
this.OwnerListSum = OwnerListSum
this.MerchantSum = MerchantSum
console.log('this.pageDataObj',this.pageDataObj)
}
uni.hideLoading()
}
}
}
@ -624,7 +844,9 @@ export default {
top: 0;left: 0;
width: 100%;
z-index: 9999;
//background: linear-gradient(#FF9434 0%,#FE9139 100%);
background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueBackground.png");
background-repeat: no-repeat;
background-size: cover;
box-sizing: border-box;
.headerContent{
width: 100%;
@ -675,7 +897,6 @@ export default {
left: 32rpx;
}
.tabBox{
width: 100%;
display: flex;
align-items: center;
position: absolute;
@ -691,9 +912,8 @@ export default {
height: 70rpx;
position: absolute;
left: 32rpx;
display: flex;
align-items: center;
.scrollItem{
width: 80rpx;
display: inline-block;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
@ -705,6 +925,7 @@ export default {
margin-right: 56rpx;
}
.selectScrollItem{
width: 80rpx;
display: inline-block;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
@ -722,7 +943,7 @@ export default {
width: 80%;
position: absolute;
height: 4rpx;
left: 10%;
left: 0;
bottom: -5px;
background: #fff;
}
@ -768,13 +989,49 @@ export default {
z-index: 2;
width: 100%;
position: relative;
.contentTitleBox{
display: flex;
align-items: center;
.selectMonth{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
line-height: 24rpx;
text-align: left;
font-style: normal;
padding: 4rpx 8rpx;
border-radius: 4rpx;
background: #F2792E;
margin-right: 8rpx;
}
.contentTitle{
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 32rpx;
color: #160002;
line-height: 44rpx;
text-align: left;
font-style: normal;
margin-right: 4rpx;
}
.contentUnit{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #9A9A9A;
line-height: 36rpx;
text-align: left;
font-style: normal;
}
}
.sumBox{
width: 100%;
box-sizing: border-box;
padding: 32rpx 24rpx;
background: #fff;
border-radius: 12rpx;
margin-top: 22rpx;
margin-top: 32rpx;
display: flex;
justify-content: space-between;
.left{
@ -892,7 +1149,10 @@ export default {
}
.ydRevenue{
.revenueBoxHeader{
background: linear-gradient(#FCF3E5 0%, #FDF6EC 22%,#FFFFFF 40%, #FFFFFF 100%);
background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueBg4.png");
background-repeat: no-repeat;
background-size: contain;
//background: linear-gradient(#FCF3E5 0%, #FDF6EC 22%,#FFFFFF 40%, #FFFFFF 100%);
.headerTitle{
color: #EC6C00;
}
@ -900,7 +1160,10 @@ export default {
}
.merchantRevenue{
.revenueBoxHeader{
background: linear-gradient(#E9F5F9 0%, #E9F5F9 22%,#FFFFFF 40%, #FFFFFF 100%);
background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueBg5.png");
background-repeat: no-repeat;
background-size: contain;
//background: linear-gradient(#E9F5F9 0%, #E9F5F9 22%,#FFFFFF 40%, #FFFFFF 100%);
.headerTitle{
color: #018ABD;
}
@ -908,7 +1171,10 @@ export default {
}
.otherData{
.revenueBoxHeader{
background: linear-gradient(#F1F7FF 0%, #FFFFFF 20% , #FFFFFF 100%);
background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueBg6.png");
background-repeat: no-repeat;
background-size: contain;
//background: linear-gradient(#F1F7FF 0%, #FFFFFF 20% , #FFFFFF 100%);
.headerTitle{
color: #096EF7;
}
@ -930,7 +1196,7 @@ export default {
background-repeat: no-repeat;
background-size: contain;
box-sizing: border-box;
padding: 30rpx 22rpx;
padding: 30rpx 22rpx 0;
.contentTop{
display: flex;
align-items: center;
@ -1002,7 +1268,7 @@ export default {
font-weight: bold;
font-size: 36rpx;
color: #160002;
line-height: 44rpx;
line-height: 64rpx;
text-align: left;
font-style: normal;
}
@ -1067,27 +1333,100 @@ export default {
.tableContent{
margin-top: 16rpx;
width: 100%;
height: 448rpx;
height: 460rpx;
display: flex;
.tableLeft{
width: 192rpx;
height: 100%;
background: #FFFFFF;
box-shadow: 4rpx 0rpx 6rpx 0rpx rgba(0,0,0,0.05);
box-sizing: border-box;
padding: 24rpx 0;
padding: 24rpx 0 24rpx;
.label{
width: 100%;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #57607B;
line-height: 32rpx;
line-height: 50rpx;
text-align: left;
font-style: normal;
margin-bottom: 32rpx;
display: inline-block;
height: 50rpx;
}
.firstLabel{
width: 100%;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 28rpx;
color: #160002;
line-height: 40rpx;
text-align: left;
font-style: normal;
margin: 32rpx 0;
}
.secondLabel{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #160002;
line-height: 40rpx;
text-align: left;
font-style: normal;
padding-left: 16rpx;
margin: 32rpx 0;
}
}
.tableRight{
width: calc(100% - 192rpx);
height: 100%;
box-sizing: border-box;
padding: 24rpx 24rpx 0;
.labelBox{
width: 592rpx;
.label{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #57607B;
text-align: left;
font-style: normal;
display: inline-block;
width: 148rpx;
}
}
.firstLabelBox{
width: 592rpx;
height: 40rpx;
margin: 32rpx 0;
.firstLabel{
font-family: DINAlternate, DINAlternate;
font-weight: bold;
font-size: 26rpx;
color: #160002;
line-height: 40rpx;
text-align: left;
font-style: normal;
display: inline-block;
width: 148rpx;
}
}
.secondLabelBox{
width: 592rpx;
height: 40rpx;
margin: 32rpx 0;
.secondLabel{
font-family: DINAlternate, DINAlternate;
font-weight: bold;
font-size: 26rpx;
color: #160002;
line-height: 40rpx;
text-align: left;
font-style: normal;
display: inline-block;
width: 148rpx;
}
}
}
}