From 7f142a79f87a2a7f4b37947fdd3294196bf5a6a3 Mon Sep 17 00:00:00 2001
From: cclu <1106109051@qq.com>
Date: Thu, 14 Mar 2024 18:25:17 +0800
Subject: [PATCH] update
---
package-lock.json | 14 +
package.json | 1 +
pages/index/components/rateCharts.vue | 9 +-
pages/index/index.vue | 95 ++++--
pages/nationalPage/springTravel.vue | 8 +-
pages/revenueStatistics/index.vue | 433 +++++++++++++++++++++++---
6 files changed, 472 insertions(+), 88 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index c3f119e..a2482e4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -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",
diff --git a/package.json b/package.json
index 15a50cc..4a00e33 100644
--- a/package.json
+++ b/package.json
@@ -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"
diff --git a/pages/index/components/rateCharts.vue b/pages/index/components/rateCharts.vue
index 3d35525..1d004bb 100644
--- a/pages/index/components/rateCharts.vue
+++ b/pages/index/components/rateCharts.vue
@@ -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)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 1a3ac18..6f8ba1d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -117,12 +117,12 @@
-
+
-
+
@@ -212,7 +212,7 @@
-
+
驿达入账:{{ydRate}}%
@@ -220,30 +220,40 @@
-
+
-
- 便利店
- 3,100.65
+
+ {{subItem.name}}
+ {{subItem.value?numeral(subItem.value/10000).format('0,0.00'):''}}
- +9.65%
-
-
-
-
- 餐饮客房
- 1,875.23
-
- +23.87%
-
-
-
-
- 商铺租赁
- 4,921.86
-
- +15.02%
+ {{subItem.add}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -268,8 +278,8 @@
对客营收/万元
- 13,268.97
- +14.91%
+ {{showTableData.YearRevenueAmount?numeral(showTableData.YearRevenueAmount/10000).format('0,0.00'):''}}
+ {{showTableData.YearRevenueAdd?`${showTableData.YearRevenueAdd>0?'+':''}${showTableData.YearRevenueAdd}%`:'-'}}
@@ -279,13 +289,13 @@
营业收入/万元
- 13,268.97
- +23.93%
+ {{showTableData.YearAccountRoyalty?numeral(showTableData.YearAccountRoyalty/10000).format('0,0.00'):''}}
+ {{showTableData.YearAccountAdd?`${showTableData.YearAccountAdd>0?'+':''}${showTableData.YearAccountAdd}%`:'-'}}
-
+
@@ -629,7 +639,7 @@
-
+
驿达入账:{{ydRate}}%
@@ -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%;
diff --git a/pages/nationalPage/springTravel.vue b/pages/nationalPage/springTravel.vue
index 92152bf..1733654 100644
--- a/pages/nationalPage/springTravel.vue
+++ b/pages/nationalPage/springTravel.vue
@@ -45,10 +45,10 @@
-
- {{`${allDateDay}营收数据需等待现场管理员校验完成...`}}
- {{`预计早上10点,请稍等...`}}
-
+
+
+
+
diff --git a/pages/revenueStatistics/index.vue b/pages/revenueStatistics/index.vue
index c49bb0c..87e36a3 100644
--- a/pages/revenueStatistics/index.vue
+++ b/pages/revenueStatistics/index.vue
@@ -21,16 +21,19 @@
- {{item}}
+
+ {{item}}
+
+
- {{thisMonth?thisMonth+'月':''}}
+ {{thisMonth?thisMonth+'月':'累计'}}
对客营收
/万元
@@ -38,22 +41,22 @@
- +14.91%
+ {{topDetail.RevenueINC?topDetail.RevenueINC.increaseRate<0?`${topDetail.RevenueINC.increaseRate}%`:`+${topDetail.RevenueINC.increaseRate}%` :'-'}}
同比去年
- 13,268.97
+ {{topDetail.RevenueINC ? numeral(topDetail.RevenueINC.curYearData /10000).format('0,0.00'):'-'}}
2024年
- 11,546.32
+ {{topDetail.RevenueINC ? numeral(topDetail.RevenueINC.lYearData / 10000).format('0,0.00'):'-'}}
2023年
增长
- +1,722.65
+ {{topDetail.RevenueINC ? `${topDetail.RevenueINC.increaseData<0?'':'+'}${numeral(topDetail.RevenueINC.increaseData / 10000).format('0,0.00')}`:'-'}}
@@ -73,10 +76,121 @@
外包
餐商铺租赁
+
+
+ 2024年
+ 2023年
+ 增长
+ 增幅
+
+
+
+ {{item.curYearData?numeral(item.curYearData/10000).format('0,0.00'):''}}
+ {{item.lYearData?numeral(item.lYearData/10000).format('0,0.00'):''}}
+ {{item.increaseData?`${item.increaseData<0?'':'+'}${numeral(item.increaseData/10000).format('0,0.00')}`:''}}
+ {{item.increaseRate?`${item.increaseRate<0?'':'+'}${item.increaseRate}%`:''}}
+
+
+
+
+
+
+
+ {{thisMonth?thisMonth+'月':'累计'}}
+ 营业收入
+ /万元
+
+
+
+
+
+ {{topDetail.AccountINC?topDetail.AccountINC.increaseRate<0?`${topDetail.AccountINC.increaseRate}%`:`+${topDetail.AccountINC.increaseRate}%` :'-'}}
+ 同比去年
+
+
+ {{topDetail.AccountINC ? numeral(topDetail.AccountINC.curYearData /10000).format('0,0.00'):'-'}}
+ 2024年
+
+
+ {{topDetail.AccountINC ? numeral(topDetail.AccountINC.lYearData /10000).format('0,0.00'):'-'}}
+ 2023年
+
+
+
+
+ 增长
+ {{topDetail.AccountINC ? `${topDetail.AccountINC.increaseData<0?'':'+'}${numeral(topDetail.AccountINC.increaseData / 10000).format('0,0.00')}`:'-'}}
+
+
+
+
+
+
+ 营收明细
+ /万元
+
+
+
+
+ 类别
+ 自营 (除税)
+ 便利店
+ 餐饮客房
+
+
+
+ 2024年
+ 2023年
+ 增长
+ 增幅
+
+
+ {{item.curYearData?numeral(item.curYearData/10000).format('0,0.00'):''}}
+ {{item.lYearData?numeral(item.lYearData/10000).format('0,0.00'):''}}
+ {{item.increaseData?`${item.increaseData<0?'':'+'}${numeral(item.increaseData/10000).format('0,0.00')}`:''}}
+ {{item.increaseRate?`${item.increaseRate<0?'':'+'}${item.increaseRate}%`:''}}
+
+
+
+
+
+
+
+
+
+
+
+ {{thisMonth?thisMonth+'月':'累计'}}
+ 入区车流
+ /万辆
+
+
+
+
+
+ {{topDetail.BayonetINC?`${topDetail.BayonetINC.increaseRate<0?'':'+'}${topDetail.BayonetINC.increaseRate}%` :'-'}}
+ 同比去年
+
+
+ {{topDetail.BayonetINC ? numeral(topDetail.BayonetINC.curYearData /10000).format('0,0.00'):'-'}}
+ 2024年
+
+
+ {{topDetail.BayonetINC ? numeral(topDetail.BayonetINC.lYearData /10000).format('0,0.00'):'-'}}
+ 2023年
+
+
+
+
+ 增长
+ {{topDetail.BayonetINC ? `${topDetail.BayonetINC.increaseData<0?'':'+'}${numeral(topDetail.BayonetINC.increaseData / 10000).format('0,0.00')}`:'-'}}
+
+
+
@@ -84,12 +198,18 @@