<!--pages/workBench/components/tenement/components/bindMeter/index.wxml-->
<van-dialog
  use-slot
  title="绑定表计"
  show="{{ visible }}"
  show-cancel-button
  bind:confirm="onSubmit"
  bind:close="onClose"
>
  <view class="modalContentWrapper">
    <van-field
        value="{{tenementName}}"
        label="商户名称"
        readonly
        type="textarea"
        autosize="{{true}}"
        title-width="132rpx"
        border="{{false}}"
    />
    <van-field
        value="{{ meterName }}"
        placeholder="请选择电表"
        label="电表"
        readonly
        border="{{ false }}"
        use-button-slot
        title-width="100rpx"
    >
        <van-button slot="button" size="small" type="info" bind:click="onMeterFocus">
        选择
        </van-button>
    </van-field>
    <van-field
        value="{{ status }}"
        label="状态"
        title-width="132rpx"
        border="{{false}}"
        readonly
        type="digit"
    />
    <van-field
        value="{{ readAt }}"
        placeholder="请选择绑定时间"
        label="时间"
        readonly
        border="{{ false }}"
        use-button-slot
        title-width="100rpx"
    >
        <van-button slot="button" size="small" type="info" bind:click="onTimeFocus">
        选择
        </van-button>
    </van-field>
    <van-field
        value="{{ overall }}"
        label="表字"
        title-width="132rpx"
        border="{{false}}"
        bind:change="onChange"
        data-name="overall"
        placeholder="请输入表字"
        type="digit"
    />
    <van-field
        value="{{ critical }}"
        label="尖"
        title-width="132rpx"
        border="{{false}}"
        bind:change="onChange"
        data-name="critical"
        placeholder="请输入有功（尖）"
        type="digit"
    />
    <van-field
        value="{{ peak }}"
        label="峰"
        title-width="132rpx"
        border="{{false}}"
        bind:change="onChange"
        data-name="peak"
        placeholder="请输入有功（峰）"
        type="digit"
    />
    <van-field
        value="{{ overall }}"
        label="平"
        title-width="132rpx"
        border="{{false}}"
        bind:change="onChange"
        data-name="overall"
        placeholder="请输入有功（平）"
        type="digit"
    />
    <van-field
        value="{{ valley }}"
        label="谷"
        title-width="132rpx"
        border="{{false}}"
        bind:change="onChange"
        data-name="valley"
        type="digit"
        placeholder="请输入有功（谷）"
    />
</view>
 
</van-dialog>

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

<date-time-picker 
    show="{{dateTimeShow}}"
    bind:confirm="dateTimeConfirm"
    bind:cancel="dateTimeCancal"
/>
