<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
    <view slot="info" class="container main">
        <view class="one">
            <form catchsubmit="onSubmit">
                <view class="content">
                    <view class="label">比赛名称</view>
                    <view class="value">
                        <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
                            <view class="input">{{form.match_name||'请选择赛事'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">赛事组别</view>
                    <view class="value">
                        <picker bindchange="grpupChange" name="grouping_id" value="{{form.grouping_id}}" range-key='name' range="{{groupingList}}">
                            <view class="input">{{form.grouping_name||'请选择赛事组别'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">组内项目</view>
                    <view class="value">
                        <picker bindchange="projectChange" name="project_id" value="{{form.project_id}}" range-key='name' range="{{projectList}}">
                            <view class="input">{{form.project_name||'请选择组内项目'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content" style="display: none;">
                    <view class="label">组内项目类别</view>
                    <view class="value">
                        <input type="text" name="type" value="{{form.type}}" placeholder="请输入组内项目类别" disabled />
                    </view>
                </view>
                <view class="content">
                    <view class="label">赛程分组</view>
                    <view class="value">
                        <picker bindchange="teamChange" name="team_id" value="{{form.team_id}}" range-key='name' range="{{raceTeamList}}">
                            <view class="input">{{form.team_name||'请选择赛程分组'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content" wx:if="{{form.type=='单打'}}">
                    <view class="label">选手一</view>
                    <view class="value">
                        <picker bindchange="playeroneChange" name="player_one" value="{{form.player_one}}" range-key='name' range="{{personList}}">
                            <view class="input">{{form.player_one_name||'请选择选手一'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content" wx:if="{{form.type=='单打'}}">
                    <view class="label">选手二</view>
                    <view class="value">
                        <picker bindchange="playertwoChange" name="player_two" value="{{form.player_two}}" range-key='name' range="{{personList}}">
                            <view class="input">{{form.player_two_name||'请选择选手二'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content" wx:if="{{form.type=='双打'}}">
                    <view class="label">选手一</view>
                    <view class="value">
                        <picker bindchange="playeroneChange" name="player_one" value="{{form.player_one}}" range-key='names' range="{{personList}}">
                            <view class="input">{{form.player_one_name||'请选择选手一'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content" wx:if="{{form.type=='双打'}}">
                    <view class="label">选手二</view>
                    <view class="value">
                        <picker bindchange="playertwoChange" name="player_two" value="{{form.player_two}}" range-key='names' range="{{personList}}">
                            <view class="input">{{form.player_two_name||'请选择选手二'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">比赛场地</view>
                    <view class="value">
                        <picker bindchange="groundChange" name="ground_id" value="{{form.ground_id}}" range-key='name' range="{{groundList}}">
                            <view class="input">{{form.ground_name||'请选择比赛场地'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">裁判</view>
                    <view class="value">
                        <picker bindchange="refereeChange" name="referee_id" value="{{form.referee_id}}" range-key='name' range="{{refereeList}}">
                            <view class="input">{{form.referee_name||'请选择裁判'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">比赛日期</view>
                    <view class="value">
                        <picker mode="date" bindchange="startdateChange" name="start_date" value="{{form.start_date}}">
                            <view class="input">{{form.start_date||'请选择比赛日期'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">比赛时间</view>
                    <view class="value">
                        <picker mode="time" bindchange="starttimeChange" name="start_time" value="{{form.start_time}}">
                            <view class="input">{{form.start_time||'请选择比赛时间'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="btn">
                    <button type="primary" size="mini" formType="submit">提交保存</button>
                </view>
            </form>
        </view>
    </view>
</mobile-main>