<!--pages/writeReading/components/meterInfo/index.wxml-->
<view class="wrapper">
    <view class="title" style="display: flex; justify-content: space-between; align-items: center;">
        <text> 电表详情 </text>
        <view class="time">
            <!-- 2025年9月5日 -->
            <van-button size="small" type="info" bind:click="jumpToHistory">
                历史记录
            </van-button>
        </view>
    </view>
    <view class="info">
        <view class="title">
            <view class="address">
                {{ meterInfo.address }}
            </view>
            <view class="meterType">
                <van-tag type="primary" custom-style="width: 100%;" wx:if="{{meterInfo.feeType === 1}}">物业代收1</van-tag> 
                <van-tag type="primary" custom-style="width: 100%;" wx:elif="{{meterInfo.feeType === 2}}">物业代收2</van-tag> 
                <van-tag type="primary" custom-style="width: 100%;" wx:elif="{{meterInfo.feeType === 3}}">物业代收线损</van-tag> 
                <van-tag type="primary" custom-style="width: 100%;" wx:else>华昌宝能收费</van-tag> 
            </view>
            
        </view>
        <view class="detail">
            <van-row gutter="20">
                <van-col span="12">
                    <view class="text">
                        <view class="titleText">
                            编号
                        </view>
                        <view>
                            {{meterInfo.meterSn}}
                        </view>
                    </view>
                </van-col>
                <van-col span="12">
                    <view class="text">
                        <view class="titleText">
                            类型
                        </view>
                        <view wx:if="{{meterInfo.meterBelongType === 0}}">
                            商户电表
                        </view>
                        <view wx:elif="{{meterInfo.meterBelongType === 1}}">
                            公区电表
                        </view>
                        <view wx:elif="{{meterInfo.meterBelongType === 2}}">
                            公摊电表
                        </view>
                    </view>
                </van-col>
                <van-col span="12">
                    <view class="text">
                        <view class="titleText">
                            建筑
                        </view>
                        <!-- <view wx:if="{{meterInfo.enabled}}">
                            正常
                        </view>
                        <view wx:else>
                            停用
                        </view> -->
                        <view> {{ meterInfo.buildingName || "-" }} </view>
                    </view>
                </van-col>
                <van-col span="12">
                    <view class="text">
                        <view class="titleText">
                            楼层
                        </view>
                        <view>
                            {{ meterInfo.floor || "-" }}
                            <!-- {{meterInfo.overall}} -->
                        </view>
                    </view>
                </van-col>
            </van-row>
        </view>
    </view>
</view>