2.5 主营业务明细与历史对比表完善,增加非会员弹窗跳转,调整会员页面文字,财务数据模块单季度增加总值展示

This commit is contained in:
尚政杰
2026-02-05 17:47:47 +08:00
parent c4cbd5a11f
commit 21e16f543f
86 changed files with 1661 additions and 376 deletions

View File

@@ -44,9 +44,9 @@ const _sfc_main = {
}
}
],
dataZoom: [{
type: "slider"
}],
// dataZoom:[{
// type:'slider'
// }],
series: [
{
type: "bar",
@@ -187,6 +187,22 @@ const _sfc_main = {
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 utils_util.getNumStr(pitem.products[index].revenue);
} else
return "-";
},
itemClick(index) {
common_vendor.index.navigateTo({
url: `/pagesStock/stockCenterDetails/cwDetails?index=${index}`
@@ -225,30 +241,33 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
} : {}) : {}, {
q: common_vendor.sr("chartRef1", "d36e6b92-0"),
r: common_vendor.sr("chartRef2", "d36e6b92-1"),
s: common_vendor.f(["业务", "毛利率", "利润", "营收", "营收"], (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item),
b: ["", "(2025年中报)", "(2025年中报)", "(2025年中报)", "(2024年年报)"][index].length > 0
}, ["", "(2025年中报)", "(2025年中报)", "(2025年中报)", "(2024年年报)"][index].length > 0 ? {
c: common_vendor.t(["", "(2025年中报)", "(2025年中报)", "(2025年中报)", "(2024年年报)"][index]),
d: index == 0 ? "left" : "center"
} : {}, {
e: index,
f: index == 0 ? "left" : "center",
g: index == 0 ? "flex-start" : "center"
});
}),
t: $props.productClassificationList.length > 0
s: $props.productClassificationList.length > 0
}, $props.productClassificationList.length > 0 ? {
v: common_vendor.f($props.productClassificationList[0].products, (item, index, i0) => {
t: common_vendor.f($props.productClassificationList[0].products, (item, index, i0) => {
return {
a: common_vendor.t(item.content),
b: common_vendor.t(item.profit_margin.toFixed(2)),
c: common_vendor.t($data.getNumStr(item.profit)),
d: common_vendor.t($data.getNumStr(item.revenue)),
e: common_vendor.t(item.content),
f: index,
g: index % 2 == 0 ? "#FFFFFF" : "#FAFAFC"
b: index
};
}),
v: common_vendor.t($props.productClassificationList[0].report_type),
w: common_vendor.t($props.productClassificationList[0].report_type),
x: common_vendor.f($props.productClassificationList, (item, index, i0) => {
return {
a: common_vendor.t(item.report_type),
b: index
};
}),
y: common_vendor.f($props.productClassificationList[0].products, (item, index, i0) => {
return {
a: common_vendor.t(item.profit_margin ? item.profit_margin.toFixed(2) + "%" : "-"),
b: common_vendor.t(item.profit ? $data.getNumStr(item.profit) : "-"),
c: common_vendor.f($props.productClassificationList, (pitem, pindex, i1) => {
return {
a: common_vendor.t($options.getTableRevenue(item, pitem)),
b: pindex
};
}),
d: index
};
})
} : {});

View File

@@ -1 +1 @@
<view><block wx:if="{{a}}"><view class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;box-sizing:border-box;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#1DB26F;font-size:30rpx">{{b}}</view><view style="margin-top:10rpx">利润增长</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">成长能力</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">增长动力</text></view><view style="margin-top:10rpx"><text>营收增长</text><text style="color:#1DB26F;margin:0 10rpx">{{c}}%</text><text style="{{e}}">({{d}})</text></view></view></view><view class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#F59B38;font-size:30rpx">{{f}}%</view><view style="margin-top:10rpx">ROE</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">盈利与回报</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">赚钱能力</text></view><view style="margin-top:10rpx"><text style="{{h}}">{{g}}</text><text style="margin-left:10rpx">净利率 {{i}}%|毛利率 {{j}}</text></view></view></view><view wx:if="{{k}}" class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#EC3440;font-size:30rpx">{{l}}%</view><view style="margin-top:10rpx">资产负债率</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">风险与运营</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">安全边际</text></view><view style="margin-top:10rpx"><text style="{{n}}">{{m}}</text><text style="margin-left:10rpx">流动比率 {{o}}|研发费用率 {{p}}%</text></view></view></view></block><view style="text-align:center;font-size:26rpx;color:#2B2B2B;font-weight:bold;margin:20rpx"> 营收与利润趋势</view><view style="height:400rpx"><l-echart class="r" u-r="chartRef1" u-i="d36e6b92-0" bind:__l="__l"></l-echart></view><view style="text-align:left;font-size:26rpx;color:#2B2B2B;font-weight:bold;margin:20rpx">主营业务 </view><view style="height:400rpx"><l-echart class="r" u-r="chartRef2" u-i="d36e6b92-1" bind:__l="__l"></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 wx:for="{{s}}" wx:for-item="item" wx:key="e" class="flexColumnCenter" style="{{'justify-content:center' + ';' + ('text-align:' + item.f + ';' + ('align-items:' + item.g))}}"><view>{{item.a}}</view><view wx:if="{{item.b}}" style="{{'font-size:18rpx' + ';' + ('text-align:' + item.d)}}">{{item.c}}</view></view></view><block wx:if="{{t}}"><view wx:for="{{v}}" wx:for-item="item" wx:key="f" class="table" style="{{'display:grid;grid-template-columns:130rpx repeat(4, 1fr);margin:0 20rpx;padding:10rpx' + ';' + ('background-color:' + item.g)}}"><view class="item">{{item.a}}</view><view class="item flexCenter">{{item.b}}%</view><view class="item flexCenter">{{item.c}}</view><view class="item flexCenter">{{item.d}}</view><view class="item flexCenter">{{item.e}}</view></view></block><view style="height:80rpx"></view></view>
<view><block wx:if="{{a}}"><view class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;box-sizing:border-box;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#1DB26F;font-size:30rpx">{{b}}</view><view style="margin-top:10rpx">利润增长</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">成长能力</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">增长动力</text></view><view style="margin-top:10rpx"><text>营收增长</text><text style="color:#1DB26F;margin:0 10rpx">{{c}}%</text><text style="{{e}}">({{d}})</text></view></view></view><view class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#F59B38;font-size:30rpx">{{f}}%</view><view style="margin-top:10rpx">ROE</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">盈利与回报</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">赚钱能力</text></view><view style="margin-top:10rpx"><text style="{{h}}">{{g}}</text><text style="margin-left:10rpx">净利率 {{i}}%|毛利率 {{j}}</text></view></view></view><view wx:if="{{k}}" class="flex" style="font-size:22rpx;color:#999999;font-weight:500;margin:20rpx;padding:20rpx;border:1rpx solid #F5F5F5;border-radius:10rpx"><view style="width:195rpx"><view style="font-weight:bold;color:#EC3440;font-size:30rpx">{{l}}%</view><view style="margin-top:10rpx">资产负债率</view></view><view><view class="flex"><text style="font-weight:bold;color:#070707;font-size:26rpx;margin-right:10rpx">风险与运营</text><text style="color:#A97F53;font-size:20rpx;padding:2rpx 5rpx;background-color:#F8F4ED;border:1rpx solid #F1E7D8;border-radius:3rpx">安全边际</text></view><view style="margin-top:10rpx"><text style="{{n}}">{{m}}</text><text style="margin-left:10rpx">流动比率 {{o}}|研发费用率 {{p}}%</text></view></view></view></block><view style="text-align:center;font-size:26rpx;color:#2B2B2B;font-weight:bold;margin:20rpx"> 营收与利润趋势</view><view style="height:400rpx"><l-echart class="r" u-r="chartRef1" u-i="d36e6b92-0" bind:__l="__l"></l-echart></view><view style="text-align:left;font-size:26rpx;color:#2B2B2B;font-weight:bold;margin:20rpx">主营业务 </view><view style="height:400rpx"><l-echart class="r" u-r="chartRef2" u-i="d36e6b92-1" bind:__l="__l"></l-echart></view><view style="text-align:left;font-size:26rpx;color:#2B2B2B;font-weight:bold;margin:20rpx"> 主营业务明细与历史对比</view><block wx:if="{{s}}"><view class="mainBusinessC flex"><view class="businessList"><view class="heading">业务</view><view class="list"><view wx:for="{{t}}" wx:for-item="item" wx:key="b" class="item flex">{{item.a}}</view></view></view><scroll-view scroll-x class="dataC flex1"><view class="headingList"><view class="heading"><view class="flexColumnCenter"><view>毛利率</view><view>({{v}})</view></view></view><view class="heading"><view class="flexColumnCenter"><view>利润</view><view>({{w}})</view></view></view><block wx:for="{{x}}" wx:for-item="item" wx:key="b"><view class="heading"><view class="flexColumnCenter"><view>营收</view><view>({{item.a}})</view></view></view></block></view><view class="dataList"><view wx:for="{{y}}" wx:for-item="item" wx:key="d" class="dataItem"><view class="rowItem">{{item.a}}</view><view class="rowItem">{{item.b}}</view><view wx:for="{{item.c}}" wx:for-item="pitem" wx:key="b" class="rowItem">{{pitem.a}}</view></view></view></scroll-view></view></block><view style="height:80rpx"></view></view>

View File

@@ -6,3 +6,56 @@
.table .item.center {
text-align: center;
}
.mainBusinessC {
padding: 0 20rpx;
overflow: hidden;
}
.mainBusinessC .businessList .heading {
background-color: #FAFAFC;
padding: 0 20rpx;
width: 160rpx;
line-height: 80rpx;
font-size: 20rpx;
font-weight: bold;
color: #666;
}
.mainBusinessC .businessList .list .item {
padding: 0 10rpx;
height: 60rpx;
font-size: 18rpx;
font-weight: 500;
color: #666;
}
.mainBusinessC .businessList .list .item:nth-child(2n) {
background-color: #FAFAFC;
}
.mainBusinessC .dataC {
width: calc(100% - 160rpx);
}
.mainBusinessC .dataC .headingList {
white-space: nowrap;
}
.mainBusinessC .dataC .headingList .heading {
background-color: #FAFAFC;
display: inline-flex;
align-items: center;
justify-content: center;
width: 160rpx;
height: 80rpx;
font-size: 20rpx;
color: #666;
}
.mainBusinessC .dataC .dataList .dataItem {
white-space: nowrap;
font-size: 20rpx;
color: #666;
}
.mainBusinessC .dataC .dataList .dataItem .rowItem {
display: inline-flex;
align-items: center;
width: 160rpx;
height: 60rpx;
}
.mainBusinessC .dataC .dataList .dataItem:nth-child(2n) .rowItem {
background-color: #FAFAFC;
}