<!--index.wxml-->
<cu-custom bgColor="bg-darkblue" isBack="{{true}}" isRelaunch="{{false}}">
  <view slot="content" style="color:#FFFFFF;">培训报名</view>
</cu-custom>

<view class="train-type">
  <view class="type-box">
    <image src="../../images/icons/type1.png" style="width: 110rpx;" mode="widthFix"></image>
    <picker bindchange="bindPickerChange" value="{{typeIdx}}" range="{{typeList}}">
      科目类型: 
      <view class="picker">
        {{typeList[typeIdx]}}
      </view>
    </picker>
  </view>
  <view class="type-box" wx:if="{{signTyleList && signTyleList.length>0}}">
    <image src="../../images/icons/type2.png" style="width: 110rpx;" mode="widthFix"></image>
    <picker bindchange="bindSignPickerChange" value="{{signTypeIdx}}" range="{{signTyleList}}" wx:if="{{signTyleList && signTyleList.length>0}}">
      报名工种: 
      <view class="picker">
        {{signTyleList[signTypeIdx]}}
      </view>
    </picker>
  </view>
</view>

<view class="org-list">
  <view class="org-box {{item.applyStatus == 'applyTrue'?'signable':'unsignable'}}" wx:for="{{orgList}}" wx:key="index">
    <view class="org-name">{{item.institutionName}}</view>
    <view class="org-add">
      <text>地址：</text>{{item.institutionAddress}}
    </view>
    <view class="org-info">
      <text>开班人数：</text>{{item.applyUserNum1}}人 
    </view>
    <view class="org-info">
      <text>已报人数：</text>{{item.applyUserNum2}}人 
    </view>
    <view class="org-info">
      <text>过审人数：</text>{{item.applyUserNum3}}人
    </view>
    <view class="org-sign" bindtap="doSign" wx:if="{{item.applyStatus == 'applyTrue'}}" data-org="{{item.institutionId}}">报名</view>
    <view class="org-sign signed" wx:elif="{{item.applyStatus == 'applyFalse'}}">已报名</view>
    <view class="org-sign lose" wx:else>机构已开班</view>
  </view>
</view>