<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
    <view slot="info" class="container main">
        <view class="zero one">
            <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入关键词" />
        </view>
        <view class="zero two">
            <scroll-view scroll-y="true" class="scroll-view">
                <view class="list-scroll-view">
                    <view class="list" wx:for="{{list}}" wx:key="item">
                        <view class="name">{{item.user_name}}</view>
                        <view class="other">
                            <view class="other_1">
                                <text>赛事名称：</text>
                                <text>{{item.match_name}}</text>
                            </view>
                            <view class="other_1">
                                <text>是否支付报名费：</text>
                                <text>{{item.pay_status=='0'?'未支付':item.pay_status=='1'?'已支付':item.pay_status=='-1'?'支付失败':item.pay_status=='-2'?'申请退款':item.pay_status=='-3'?'已退款':'暂无'}}</text>
                            </view>
                            <view class="other_1">
                                <text>是否转发朋友圈：</text>
                                <text>{{item.has_turn=='0'?'未转发':'已转发'}}</text>
                            </view>
                        </view>
                        <view class="btn">
                            <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                            <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">信息维护</button>
                            <button type="warn" size="mini" bindtap="toRefund" data-item="{{item}}" wx:if="{{item.pay_status=='1'}}">退款</button>
                        </view>
                    </view>
                </view>
            </scroll-view>
        </view>
    </view>
</mobile-main>
<e-dialog dialog="{{dialog}}" bind:toClose="toClose">
    <view slot="info">
        <view class="dialog_one" wx:if="{{dialog.type=='1'}}">
            <view class="one_1">
                <text>报名用户：</text>
                <text>{{info.user_name||'暂无昵称'}}</text>
            </view>
            <view class="one_1">
                <text>赛事名称：</text>
                <text>{{info.match_name||'暂无'}}</text>
            </view>
            <view class="one_1">
                <text>赛事组别：</text>
                <text>{{info.grouping_name||'暂无'}}</text>
            </view>
            <view class="one_1">
                <text>组别项目：</text>
                <text>{{info.project_name||'暂无'}}</text>
            </view>
            <view class="one_1">
                <text>是否转发了朋友圈：</text>
                <text>{{info.has_turn=='0'?'未转发':'已转发'}}</text>
            </view>
            <view class="one_1">
                <text>支付状态：</text>
                <text>{{info.pay_status=='0'?'未支付':info.pay_status=='1'?'已支付':info.pay_status=='-1'?'支付失败':info.pay_status=='-2'?'申请退款':info.pay_status=='-3'?'已退款':'暂无'}}</text>
            </view>
        </view>
        <view class="dialog_two" wx:elif="{{dialog.type=='2'}}">
            <form catchsubmit="onSubmit">
                <view class="content" style="display: none;">
                    <view class="label">数据id</view>
                    <view class="value"><input name="id" value="{{form.id}}" placeholder="请输入数据id" disabled /></view>
                </view>
                <view class="content">
                    <view class="label">比赛名称</view>
                    <view class="value"> <textarea name="match_name" value="{{form.match_name}}" auto-height placeholder="请输入比赛名称" disabled /></view>
                </view>
                <view class="content">
                    <view class="label">赛事分组</view>
                    <view class="value">
                        <picker mode="selector" bindchange="groupingChange" value="{{form.grouping_id}}" name="grouping_id" range-key='name' range="{{form.grouping}}">
                            <view class="input">{{form.grouping_name||'请选择赛事分组'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">组内项目</view>
                    <view class="value">
                        <picker mode="selector" bindchange="projectChange" value="{{form.project_id}}" name="project_id" range-key='name' range="{{projectList}}">
                            <view class="input">{{form.project_name||'请选择组内项目'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">支付状态</view>
                    <view class="value">
                        <picker mode="selector" bindchange="paystatusChange" value="{{form.pay_status}}" name="pay_status" range-key='label' range="{{statusList}}">
                            <view class="input">{{form.pay_status=='0'?'未支付':form.pay_status=='1'?'已支付':form.pay_status=='-1'?'支付失败':form.pay_status=='-2'?'申请退款':form.pay_status=='-3'?'已退款':'请选择支付状态'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="btn">
                    <button type="primary" size="mini" form-type="submit">提交保存</button>
                </view>
            </form>
        </view>
    </view>
</e-dialog>