<!--pages/workBench/components/reading/index.wxml-->
<van-field
    value="{{ parkName }}"
    placeholder="请选择园区"
    label="园区"
    readonly
    border="{{ false }}"
    use-button-slot
    title-width="100rpx"
>
    <van-button slot="button" size="small" type="primary" bind:click="onParkFocus">
      选择
    </van-button>
</van-field>

<search-select 
    show="{{show}}" 
    title="{{title}}" 
    type="{{type}}" 
    park="{{park}}"
    bindconfirm="onConfirm"
    bindcancel="onConcal"
/>

<van-empty description="请先选择园区" wx:if="{{!park}}" />

<view wx:else>
    <van-cell 
        wx:for="{{list}}"
        wx:key="id"
        title="{{item.readingRouteName}}" 
        label="包含{{item.meterRoute}}个抄表点"    
    >
        <view slot="right-icon">
            <van-button 
                type="primary" 
                size="small" 
                type="primary" 
                bind:tap="changeStartStatus"
                custom-style="margin-right: 20rpx;"
                data-id="{{item.id}}"
                wx:if="{{item.status === 0}}"
            > 开始抄表 </van-button>
            <van-button 
                type="primary" 
                size="small" 
                bind:tap="jumpToReading"
                data-id="{{item.id}}"
                custom-style="margin-right: 20rpx;"
                wx:if="{{item.status === 1}}"
            > 去抄表 </van-button>
            <van-button 
                size="small" 
                type="danger" 
                bind:tap="changeEndStatus"
                data-id="{{item.id}}"
                wx:if="{{item.status === 1}}"
            > 结束抄表 </van-button>
        </view>
    </van-cell>
</view>
