<scroll-view scroll-x="true" show-scrollbar="true" scroll-left="750rpx" class="u-p-t-10 scroll-view">
<u-table>
<u-tr>
<u-th width="1550rpx">{{yearMonth}}月度总利润表</u-th>
</u-tr>
<u-tr style="background-color: white;">
<u-th width="200rpx">类别</u-th>
<u-th width="350rpx">项目</u-th>
<u-th width="200rpx">数量</u-th>
<u-th width="200rpx">总收入</u-th>
<u-th width="200rpx">成本价</u-th>
<u-th width="200rpx">成本总额</u-th>
<u-th width="200rpx">总利润</u-th>
</u-tr>
<view v-for="(item,index) in list" :key="index">
<u-tr v-if="item.moneyTotal">
<u-td width="200rpx" class="utd" style="font-weight: bold;">{{item.title}}</u-td>
<u-td width="1350rpx" style="padding: 0;border: none;background-color: #fff;">
<u-tr v-for="(subItem,subIndex) in item.list" :key="subIndex">
<u-td width="350rpx" class="utd">{{subItem.unitName}}</u-td>
<u-td width="200rpx" class="utd">{{subItem.weightNet}}</u-td>
<u-td width="200rpx" class="utd">{{subItem.moneyTotal|formatThousands}}</u-td>
<u-td width="200rpx" class="utd">{{subItem.costPrice|formatThousands}}</u-td>
<u-td width="200rpx" class="utd">{{subItem.costMoney|formatThousands}}</u-td>
<u-td width="200rpx" class="utd">{{subItem.moneyTotal|formatThousands}}</u-td>
</u-tr>
</u-td>
</u-tr>
<u-tr v-if="item.moneyTotal">
<u-td width="750rpx" class="utd" style="font-weight: bold;">合计</u-td>
<u-td width="200rpx" class="utd">{{item.moneyTotal|formatThousands}}</u-td>
<u-td width="200rpx" class="utd"></u-td>
<u-td width="200rpx" class="utd">{{item.costMoney|formatThousands}}</u-td>
<u-td width="200rpx" class="utd">{{item.moneyTotal|formatThousands}}</u-td>
</u-tr>
<u-tr v-if="!item.moneyTotal">
<u-td width="200rpx" class="utd" style="font-weight: bold;">{{item.title}}</u-td>
<u-td width="1350rpx" style="padding: 0;border: none;background-color: #fff;">
<u-tr>
<u-th width="1150rpx" class="utd">项目</u-th>
<u-th width="200rpx" class="utd">金额</u-th>
</u-tr>
<u-tr v-for="(subItem,subIndex) in item.list" :key="subIndex">
<u-td width="1150rpx" class="utd">{{subItem.unitName}}</u-td>
<u-td width="200rpx" class="utd">{{subItem.profitMoney|formatThousands}}</u-td>
</u-tr>
</u-td>
</u-tr>
<u-tr v-if="!item.moneyTotal">
<u-td width="1350rpx" class="utd" style="font-weight: bold;">合计</u-td>
<u-td width="200rpx" class="utd">{{item.profitMoney|formatThousands}}</u-td>
</u-tr>
</view>
<u-tr>
<u-td width="1350rpx" class="utd" style="background-color: #FFFF00;font-weight: bold;">月度总利润</u-td>
<u-td width="200rpx" class="utd" style="background-color: #FFFF00;">{{hj|formatThousands}}</u-td>
</u-tr>
</u-table>
</scroll-view>
uview u-table 合并单元格
最新推荐文章于 2025-03-17 08:57:15 发布