uview u-table 合并单元格

        <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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值