2.5 主营业务明细与历史对比表完善,增加非会员弹窗跳转,调整会员页面文字,财务数据模块单季度增加总值展示
This commit is contained in:
@@ -66,28 +66,48 @@
|
||||
<l-echart ref="chartRef2"></l-echart>
|
||||
</view>
|
||||
<view style="text-align: left; font-size: 26rpx; color: #2B2B2B; font-weight: bold; margin: 20rpx;">
|
||||
主营业务明细与历史对比</view>
|
||||
<view
|
||||
style="display: grid; grid-template-columns: 130rpx repeat(4, 1fr); color: #666666; font-size: 20rpx; font-weight: 500; background-color: #FAFAFC; margin: 20rpx; margin-bottom: 0; padding: 10rpx; box-sizing: border-box;">
|
||||
<view class="flexColumnCenter" v-for="(item, index) in ['业务', '毛利率', '利润', '营收', '营收']" :key="index"
|
||||
style="justify-content: center;"
|
||||
:style="{'text-align': index == 0 ? 'left' : 'center', 'align-items': index == 0 ? 'flex-start' : 'center'}">
|
||||
<view>{{item}}</view>
|
||||
<view v-if="['', '(2025年中报)', '(2025年中报)', '(2025年中报)', '(2024年年报)'][index].length > 0"
|
||||
style="font-size: 18rpx;" :style="{'text-align': index == 0 ? 'left' : 'center'}">
|
||||
{{['', '(2025年中报)', '(2025年中报)', '(2025年中报)', '(2024年年报)'][index]}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
主营业务明细与历史对比</view>
|
||||
<block v-if="productClassificationList.length>0">
|
||||
<view class="table" v-for="(item, index) in productClassificationList[0].products" :key="index"
|
||||
style="display: grid; grid-template-columns: 130rpx repeat(4, 1fr); margin: 0 20rpx; padding: 10rpx;"
|
||||
:style="{'background-color': (index % 2 == 0 ? '#FFFFFF' : '#FAFAFC')}">
|
||||
<view class="item">{{item.content}}</view>
|
||||
<view class="item flexCenter">{{item.profit_margin.toFixed(2)}}%</view>
|
||||
<view class="item flexCenter">{{getNumStr(item.profit)}}</view>
|
||||
<view class="item flexCenter">{{getNumStr(item.revenue)}}</view>
|
||||
<view class="item flexCenter">{{item.content}}</view>
|
||||
<view class="mainBusinessC flex">
|
||||
<view class="businessList">
|
||||
<view class="heading">业务</view>
|
||||
<view class="list">
|
||||
<view class="item flex" v-for="(item, index) in productClassificationList[0].products" :key="index">
|
||||
{{item.content}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="dataC flex1">
|
||||
<view class="headingList">
|
||||
<view class="heading">
|
||||
<view class="flexColumnCenter">
|
||||
<view>毛利率</view>
|
||||
<view>({{productClassificationList[0].report_type}})</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="heading">
|
||||
<view class="flexColumnCenter">
|
||||
<view>利润</view>
|
||||
<view>({{productClassificationList[0].report_type}})</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-for="(item,index) in productClassificationList" :key="index">
|
||||
<view class="heading">
|
||||
<view class="flexColumnCenter">
|
||||
<view>营收</view>
|
||||
<view>({{item.report_type}})</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="dataList" >
|
||||
<view class="dataItem" v-for="(item, index) in productClassificationList[0].products" :key="index">
|
||||
<view class="rowItem">{{item.profit_margin?(item.profit_margin.toFixed(2)+'%'):'-'}}</view>
|
||||
<view class="rowItem">{{item.profit?(getNumStr(item.profit)):'-'}}</view>
|
||||
<view class="rowItem" v-for="(pitem,pindex) in productClassificationList" :key="pindex">{{getTableRevenue(item,pitem)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
<view style="height: 80rpx;"></view>
|
||||
@@ -139,9 +159,9 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
dataZoom:[{
|
||||
type:'slider'
|
||||
}],
|
||||
// dataZoom:[{
|
||||
// type:'slider'
|
||||
// }],
|
||||
series: [
|
||||
{
|
||||
type: 'bar',
|
||||
@@ -209,7 +229,6 @@
|
||||
this.barLineInit()
|
||||
},
|
||||
productClassificationList(newValue) {
|
||||
|
||||
let data = newValue[0].products
|
||||
this.option2.title.text = '主营业务构成('+newValue[0].report_type+')'
|
||||
let pieList = []
|
||||
@@ -282,6 +301,26 @@
|
||||
if(value>15) return {text:'良好',color:'gold'};
|
||||
if(value>10) return {text:'一般',color:'orange'};
|
||||
return {text:'较低',color:'red'};
|
||||
},
|
||||
/**
|
||||
* 遍历数组找出对应的营收
|
||||
* @param {Object} pitem
|
||||
*/
|
||||
getTableRevenue(item,pitem)
|
||||
{
|
||||
|
||||
let index = -1
|
||||
for (let item1 of pitem.products) {
|
||||
if(item1.content==item.content)
|
||||
{
|
||||
index = pitem.products.indexOf(item1)
|
||||
}
|
||||
}
|
||||
if(index>-1)
|
||||
{
|
||||
return getNumStr(pitem.products[index].revenue)
|
||||
}else
|
||||
return '-'
|
||||
},
|
||||
itemClick(index) {
|
||||
uni.navigateTo({
|
||||
@@ -305,5 +344,82 @@
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mainBusinessC
|
||||
{
|
||||
padding: 0 20rpx;
|
||||
overflow: hidden;
|
||||
.businessList
|
||||
{
|
||||
.heading
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
padding: 0 20rpx;
|
||||
width: 160rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
.list
|
||||
{
|
||||
.item
|
||||
{
|
||||
padding: 0 10rpx;
|
||||
height: 60rpx;
|
||||
font-size: 18rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.item:nth-child(2n)
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dataC
|
||||
{
|
||||
width: calc(100% - 160rpx);
|
||||
.headingList
|
||||
{
|
||||
white-space: nowrap;
|
||||
.heading
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 160rpx;
|
||||
height: 80rpx;
|
||||
font-size: 20rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
}
|
||||
.dataList
|
||||
{
|
||||
.dataItem
|
||||
{
|
||||
white-space: nowrap;
|
||||
font-size: 20rpx;
|
||||
color: #666;
|
||||
.rowItem
|
||||
{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
width: 160rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
.dataItem:nth-child(2n)
|
||||
{
|
||||
.rowItem
|
||||
{
|
||||
background-color: #FAFAFC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user