| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
- <view>
- <view class="top-data">
- <view wx:for="{{topData}}" wx:for-item="tdItem" wx:for-index="tdIndex" wx:key="tdIndex" style="{{'width:'+(100/topData.length)+'%;'}}">
- <view>
- <view wx:if="{{tdItem.type === 'amount'}}" style="display: flex;align-items: baseline;justify-content: center;"><text style="font-size: 12px;">¥</text>{{tdItem.value ? numberFormat.toThousandCents(tdItem.value) : '0.00'}}</view>
- <view wx:else>{{tdItem.value}}</view>
- </view>
- <view>
- {{tdItem.title}}
- </view>
- </view>
- </view>
- <view class="header">
- <view style="width:34rpx;"></view>
- <view style="width: calc(100% - 34rpx);display: flex;">
- <view style="{{'width:'+colItem.width+';text-align:'+(colItem.align?conItem.align:'center')}}" wx:for="{{columns}}" wx:for-item="colItem" wx:for-index="colIndex" wx:key="colIndex">{{colItem.title}}</view>
- </view>
- </view>
- <view wx:if="{{tableData && tableData.length>0}}" class="data">
- <view wx:for="{{tableData}}" wx:for-item="tableDataItem" wx:for-index="tableDataIndex" wx:key="tableDataIndex" style="display: flex;background: #fff;padding: 0 19rpx;">
- <view style="{{'width:34rpx;position: relative;border-bottom:'+(tableDataIndex!==tableData.length-1?1:0)+'px solid #E9F0FE;display: flex;align-items: center;'}}">
- <image style="position: absolute;width: 28.79rpx;height: 21.81rpx;top:15rpx;left:-19rpx;" wx:if="{{tableDataIndex<=2}}" src="{{'../../../static/img/index'+(tableDataIndex+1)+'.png'}}" />
- <view style="font-family: 'DIN Alternate';font-style: normal;font-weight: 700;font-size: 9px;color: #1B365D;" wx:else>{{tableDataIndex<=8?('0'+(tableDataIndex+1)):(tableDataIndex+1)}}</view>
- </view>
- <view style="width: calc(100% - 34rpx);display: flex;">
- <view class="cell" style="{{'width:'+col2Item.width+';border-bottom:'+(tableDataIndex!==tableData.length-1?1:0)+'px solid #E9F0FE;text-align:'+(col2Item.align?con2Item.align:'center')}}" wx:for="{{columns}}" wx:for-item="col2Item" wx:for-index="col2Index" wx:key="col2Index">
- <span wx:if="{{col2Item.type === 'amount'}}" style="display: inline-block;text-align: left;word-break: break-all;">
- <text style="font-size: 10px;" wx:if="{{(tableDataItem[col2Item.name] || tableDataItem[col2Item.name] === 0)}}">¥</text>
- {{tableDataItem[col2Item.name] ? numberFormat.toThousandCents(tableDataItem[col2Item.name]) : (!col2Item.ifNull?'0.00':col2Item.ifNull)}}
- </span>
- <span wx:else style="display: inline-block;text-align: left;word-break: break-all;">
- {{col2Item.before && (tableDataItem[col2Item.name] || tableDataItem[col2Item.name]===0)?col2Item.before:''}}
- {{(tableDataItem[col2Item.name] || tableDataItem[col2Item.name]===0)?tableDataItem[col2Item.name]:(col2Item.ifNull?col2Item.ifNull:'')}}
- {{col2Item.after && (tableDataItem[col2Item.name] || tableDataItem[col2Item.name]===0)?col2Item.after:''}}
- </span>
- </view>
- </view>
- </view>
- </view>
- <view wx:else style="line-height: 200rpx;color: #95A8CB;width:100%;font-family: 'PingFang SC';font-style: normal;font-weight: 400;font-size: 14px;background:#fff;text-align: center;">
- <view>暂无数据</view>
- </view>
- </view>
- <view style="width:100%;height:15rpx;border-radius: 0px 0px 15rpx 15rpx;background: #fff;"></view>
|