This commit is contained in:
ylj20011123 2025-08-12 17:42:22 +08:00
parent 3da9305716
commit 626b4bc998
2 changed files with 1212 additions and 1086 deletions

View File

@ -17,7 +17,7 @@
<!-- 月份的轮播框 -->
<view class="monthListBox" :style="{ marginTop: menu.bottom + 8 + 'px' }">
<swiper class="swiperBox" previous-margin="40rpx" next-margin="40rpx" :current="selectIndex"
@change="handleChangeSwiper">
@animationfinish="handleChangeSwiper">
<swiper-item class="swiperItem" v-for="(item, index) in monthList" :key="index">
<view class="swiperItemContent"
:class="{ 'is-first': index === 0, 'is-last': index === monthList.length - 1 }">
@ -51,23 +51,21 @@
<view class="monthRevenueBox" v-if="selectIndex === index">
<view class="leftBox" @click="handleShowYDModal">
<view class="rateChartsBox">
<view class="rateChartsBox" v-if="moneyRateList && moneyRateList.length > 0">
<rateCharts :success="moneyRateList"
:colorList="['#1677FE', '#456497', '#97A9C6']"
:name="`${selectIndex}rate`" />
</view>
<view class="haveNoticeBox" v-if="ydModal" @click.stop="handleShowYDModal">
<view class="haveNoticeBox"
v-if="ydModal && modalRateList && modalRateList.length > 0"
@click.stop="handleShowYDModal">
<view class="field">
<view class="label">便利店:</view>
<view class="value">{{ ydRate }}%</view>
<view class="label">自营:</view>
<view class="value">{{ modalRateList[0] }}%</view>
</view>
<view class="field">
<view class="label">餐饮客房:</view>
<view class="value">{{ shopRate }}%</view>
</view>
<view class="field">
<view class="label">商铺租赁:</view>
<view class="value">{{ shopOutRate }}%</view>
<view class="label">外包:</view>
<view class="value">{{ modalRateList[1] }}%</view>
</view>
</view>
</view>
@ -138,12 +136,13 @@
: topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAddNumber < 0
? '#0E9976'
: '',
}"><span class="revenueAddNotice">{{
topShowData && topShowData.MonthRevenueModel &&
topShowData.MonthRevenueModel.YearRevenueAddNumber > 0
? "增长"
: topShowData && topShowData.MonthRevenueModel &&
topShowData.MonthRevenueModel.YearRevenueAddNumber < 0 ? "下降" : "" }}</span>
}">
<span class="revenueAddNotice">{{
topShowData && topShowData.MonthRevenueModel &&
topShowData.MonthRevenueModel.YearRevenueAddNumber > 0
? "增长"
: topShowData && topShowData.MonthRevenueModel &&
topShowData.MonthRevenueModel.YearRevenueAddNumber < 0 ? "下降" : "" }}</span>
{{
topShowData && topShowData.MonthRevenueModel &&
topShowData.MonthRevenueModel.YearRevenueAddNumber
@ -153,9 +152,10 @@
100000000
)
: ""
}}</span>
}}
</span>
<span class="revenueAdd" :style="{
<span class="revenueAdd" v-if="selectIndex === index" :style="{
color:
topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAdd > 0
? '#E83944'
@ -313,7 +313,9 @@ export default {
currentMoney: "",//
page: "/pages/index/index",
otherRealData: [],//
single: ""
single: "",
ydModal: false, // 驿
modalRateList: [],//
}
},
components: {
@ -352,12 +354,16 @@ export default {
// 尿
this.handleGetYNRealData()
uni.setStorageSync("lastDay", this.lastDay);
},
onShow() {
// tabbar tabbar
uni.hideTabBar();
},
methods: {
handleShowYDModal() {
this.ydModal = !this.ydModal;
},
goToRobot() {
this.$util.toNextRoute("navigateTo", `/pages/robot/index`);
// this.$util.toNextRoute("navigateTo", `/pages/testPage/index`);
@ -426,8 +432,12 @@ export default {
//
async handleChangeSwiper(e) {
console.log('e', e);
await this.handleGetTopData(e.target.current)
this.selectIndex = e.target.current
this.topShowData = null
this.moneyRateList = []
this.profitSharingList = []
this.modalRateList = []
await this.handleGetTopData(e.target.current)
},
//
async handleRealRevenue() {
@ -437,7 +447,6 @@ export default {
};
const res = await request.$webGet("CommercialApi/Revenue/GetCurRevenue", req)
this.currentMoney = res.Result_Data.CurRevenueAmount.toFixed(2);
console.log('this.currentMoneythis.currentMoneythis.currentMoney', this.currentMoney);
},
//
@ -468,6 +477,8 @@ export default {
//
let shareList = [{}, {}];
//
let sum = 0
resObj.BusinessTypeList.forEach((item) => {
//
if (item.data) {
@ -494,10 +505,26 @@ export default {
//
if (item.name === "自营") {
shareList[0] = item;
sum += Number(item.value)
} else if (item.name === "外包") {
shareList[1] = item;
sum += Number(item.value)
}
})
console.log('sum', sum);
console.log('shareListshareListshareList', shareList);
let modalListRate = []
if (shareList && shareList.length > 0) {
shareList.forEach((item) => {
modalListRate.push((Number(item.value) / sum * 100).toFixed(2))
})
}
this.modalRateList = modalListRate
this.moneyRateList = [
Number(shareList[0].value),
Number(shareList[1].value)

File diff suppressed because it is too large Load Diff