<!--pages/workBench/components/recharge/components/waitApprove/index.wxml-->
<searchSelectWrapper label="园区" placeholder="请选择园区" text="{{parkName}}" bind:search="onParkFocus" />

<searchSelectWrapper label="关键字" placeholder="请输入关键字" text="{{meterName}}" bind:searchKeyword="onSearchKeyword" type="inputSearch" />
<view>
    <view wx:if="{{list.length}}">
        <view class="operate" wx:if="{{status === 2}}">
            <view style="margin-top: 60rpx; margin-bottom: 60rpx;display: flex; justify-content: center; align-items: center;">
                <van-button type="info" size="small" style="margin-right: 30rpx;" bind:click="handleApprove" data-status="0" disabled="{{!record}}"> 同意 </van-button>
                <van-button size="small" bind:click="handleClear" disabled="{{!record}}" bind:click="handleApprove" data-status="1"> 拒绝 </van-button>
            </view>
        </view>
        <view class="tableWrapper">
            <view class="table">
                <view class="thead">
                    <view class="th" style="flex: 0 0 80rpx; display: {{status === 2 ? 'block' : 'none'}};"> </view>
                    <!-- <view class="th" style="flex: 0 0 0rpx; display: {{status === 1 ? 'block' : 'none'}};"> </view> -->
                    <view class="th" style="flex: 0 0 130rpx;"> 商户名字</view>
                    <view class="th" style="flex: 0 0 150rpx;"> 充值金额 </view>
                    <view class="th" style="flex: 0 0 150rpx; display: {{status === 1 ? 'block' : 'none'}};">状态</view>
                    <view class="th"  style="flex: 0 0 150rpx;">提交时间</view>
                    <view class="th"style="flex: 0 0 120rpx; justify-content: flex-end; display: flex; align-items: center;"> 操作 </view>
                </view>
                <view class="tbody">
                    <van-radio-group value="{{ record }}" bind:change="onChangeSelectRecharge">
                        <block wx:for="{{list}}" wx:for-index="itemIndex" wx:key="item">
                            <view class="tr" style="display: flex; align-items: center; ">
                                <view class="th" style="flex: 0 0 80rpx; ; display: {{status === 2 ? 'block' : 'none'}};">
                                    <van-radio wx:if="{{status === 2}}" name="{{item.id}}"></van-radio>
                                </view>
                                <view class="th" style="flex: 0 0 130rpx;">
                                    {{ item.tenement.shortName }}
                                </view>
                                <view class="th" style="flex: 0 0 150rpx;">
                                    {{ item.money }}
                                </view>
                                <view class="th" style="flex: 0 0 150rpx; display: {{status === 1 ? 'block' : 'none'}};">
                                    <view class="tag">{{item.orderStatus}}</view>
                                </view>
                                <view class="th" style="flex: 0 0 150rpx; font-size: 30rpx;">
                                    {{item.topTime}}
                                </view>
                                <view class="th" style="flex: 0 0 120rpx; justify-content: flex-end; display: flex; align-items: center;">
                                    <van-icon name="ellipsis" size="24px" bind:tap="showActionMenu" data-id="{{item.id}}" class="more-icon" />
                                    <van-action-sheet show="{{ currentActionSheet === item.id }}" actions="{{ actionItems }}" bind:close="hideActionMenu" bind:select="onMenuSelect" data-id="{{item.id}}" close-on-click-action />
                                </view>
                            </view>

                        </block>
                    </van-radio-group>
                </view>
            </view>
        </view>

        <pagination currentIndex="{{page}}" totalPage="{{totalPage}}" bind:pagingChange="onChangePage" />

    </view>
    <empty bind:refresh="init" wx:else />

</view>

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

<van-dialog use-slot title="审核" show="{{ approveShow }}" show-cancel-button bind:close="onApproveClose" bind:confirm="onApproveConfirm">
    <van-field label="拒绝理由" value="{{ reason }}" placeholder="请输入拒绝理由" bind:change="onChangeReason" />
</van-dialog>