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

File diff suppressed because it is too large Load Diff