<!--pages/workBenchNew/components/uninstallMeter/index.wxml-->
<navigator canBack="{{true}}" title="拆表" />

<view class="wrapper">
    <searchSelectWrapper 
        label="当前时间" 
        placeholder="请选择园区"
        useSlot
        type=""
        hideBorder="{{true}}"
    >
        <view> {{time}} </view>
    </searchSelectWrapper>
    <searchSelectWrapper 
    label="选择园区" 
    placeholder="请选择园区"
    text="{{parkName}}"
    bind:search="onParkFocus"
    required="{{true}}"
/>

<searchSelectWrapper 
    label="选择电表" 
    placeholder="请选择电表"
    text="{{meterName}}"
    bind:search="onMeterFocus"
    required="{{true}}"
/>
<searchSelectWrapper 
    label="原因" 
    placeholder="请输入原因"
    text="reason"
    type="input"
    bind:changeText="changeReason"
/>
<searchSelectWrapper 
    label="图片" 
    useSlot="{{true}}"
    type=""
    hideBorder="{{true}}"
>
    <view style="display: flex; align-items: center;">
        <view>
            <van-button type="info" size="small" bind:click="uploadImage" custom-style="margin-right: 20rpx;"> 上传 </van-button>
            <view style="margin-top: 20rpx" wx:if="{{!!url}}">
                <van-button type="danger" size="small" bind:click="clearImage" custom-style="margin-right: 20rpx;"> 清除 </van-button>
            </view>
        </view>
        <van-image wx:if="{{!!url}}" width="100" height="100" src="{{url}}" custom-style="margin-left: 20rpx;" bind:tap="showImage" />
    </view>

</searchSelectWrapper>
<searchSelectWrapper 
    label="总" 
    placeholder="请输入总"
    type="input"
    bind:changeText="changeOverall"
    wx:if="{{meterInfo.tenement}}"
/>
<searchSelectWrapper 
    label="尖" 
    placeholder="请输入尖"
    type="input"
    bind:changeText="changeCritical"
    wx:if="{{meterInfo.tenement}}"
/>
<searchSelectWrapper 
    label="峰" 
    placeholder="请输入峰"
    type="input"
    bind:changeText="changePeak"
    wx:if="{{meterInfo.tenement}}"
/>
<searchSelectWrapper 
    label="平" 
    placeholder="请输入平"
    type="input"
    bind:changeText="changeFlat"
    wx:if="{{meterInfo.tenement}}"
/>
<searchSelectWrapper 
    label="谷" 
    placeholder="请输入谷"
    type="input"
    bind:changeText="changeValley"
    wx:if="{{meterInfo.tenement}}"
/>
<searchSelectWrapper 
    label="深谷" 
    placeholder="请输入深谷"
    type="input"
    bind:changeText="changeDeepValley"
    wx:if="{{meterInfo.tenement}}"
/>
<view class="operate">
    <view class="submit"> <van-button type="info" block bind:click="onSubmit"> 提交 </van-button> </view>
    <view class="cancel"> <van-button block bind:tap="goback"> 返回 </van-button> </view>
</view>
</view>



<search-select 
    show="{{show}}" 
    title="{{title}}" 
    type="{{type}}" 
    park="{{park}}"
    bindconfirm="onConfirm"
    bindcancel="onCancel"
    wx:if="{{show}}"
/>

<van-popup 
    show="{{ imageShow }}" 
    bind:close="onClose"
    z-index="99999"
>
    <van-image 
        width="100vw"
        height="99.1vh"
        fit="contain"
        src="{{url}}" 
        bind:click="onClose"
    />
</van-popup>