<view class="container">

  <view>
     <!-- 手机号验证 -->
    <view class="add-address" wx:if="{{!hasLogin}}">
      <view class="add-form">
        <view class="form-item">
          <view class="label">手机号</view>
          <view class="content">
            <input class="input" value="{{workerTel}}"  style="width: unset;" bindinput="bindWorkerTel" placeholder="请输入个人联系方式" maxlength="11" type="number" />
            <view bindtap="goValid" style="width: 140rpx;">点击验证</view>
          </view>
        </view>
        </view>
        </view>

        <block  wx:if="{{isExist}}"> 
     <!-- 身份证识别 -->
    <view style="display: flex; justify-content: space-around;height:220rpx;">
      <view class="weui-uploader">
        <view class="weui-uploader__hd">
          <view class="weui-uploader__title">身份证【正面】照片</view>
        </view>
        <view class="weui-uploader__bd">
          <view class="weui-uploader__files" id="uploaderFrontFiles">
            <block>
              <view class="weui-uploader__file" bindtap="previewImage" id="{{idFront}}">
                <image class="weui-uploader__img" src="{{idFront}}" mode="aspectFill" />
              </view>
            </block>
            <view   wx:if="{{showOcr}}" class="weui-uploader__input-box">
              <view class="weui-uploader__input" data-type='front' bindtap="chooseImage"></view>
            </view>
          </view>
        </view>
      </view>
      <view class="weui-uploader">
        <view class="weui-uploader__hd">
          <view class="weui-uploader__title">身份证【反面】照片</view>
        </view>
        <view class="weui-uploader__bd">
          <view class="weui-uploader__files" id="uploaderBackFiles">
            <block >
              <view class="weui-uploader__file" bindtap="previewImage" id="{{idBack}}">
                <image class="weui-uploader__img" src="{{idBack}}" mode="aspectFill" />
              </view>
            </block>
            <view   wx:if="{{showOcr}}"class="weui-uploader__input-box">
              <view class="weui-uploader__input" data-type='back' bindtap="chooseImage"></view>
            </view>
          </view>
        </view>
      </view>
    </view> 
      <view class="ocr-btn"  wx:if="{{showOcr&&showSubmit&&worker.ocrState!=1}}" bindtap="uploadIdFrontImage">确认上传</view>
  
    <view class="add-address">
      <view class="add-form">
      
        <view class="form-item">
          <view class="label">姓名*</view>
          <view class="content">
            <input class="input" value="{{worker.workerName}}" placeholder="自动识别：姓名" disabled="true" />
          </view>
        </view>
        <view class="form-item">
          <view class="label">性别</view>
          <view class="content">
            <input class="input" value="{{worker.gender}}" placeholder="自动识别：性别" disabled="true" />
          </view>
        </view> 
        <view class="form-item">
          <view class="label">民族</view>
          <view class="content">
            <input class="input" value="{{worker.nation}}" placeholder="自动识别：民族" disabled="true" />
          </view>
        </view>
        <view class="form-item">
          <view class="label">籍贯</view>
          <view class="content">
            <input class="input" value="{{worker.nativePlace}}" placeholder="自动识别：籍贯" disabled="true" />
          </view>
        </view>
        <view class="form-item">
          <view class="label">身份证*</view>
          <view class="content">
            <input class="input" type="idcard" value="{{worker.workerIdcard}}" placeholder="自动识别：身份证号" disabled="true" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-m">身份证地址</view>
          <view class="content">
            <input class="input" value="{{worker.idcardAddress}}" placeholder="自动识别：身份证地址" disabled="true" />
          </view>
        </view>
  
        
         <view class="form-item">
          <view class="label label-s">身份证有效期</view>
          <view class="content">
            <input class="input" value="{{worker.idcardStartdate}}{{worker.break}}{{worker.idcardEnddate}}" placeholder="自动识别：身份证有效期" disabled="true" />
          </view>
        </view>
        <view class="ocr-info-warning">以上信息 身份证自动识别带出</view>


        <!-- <view class="form-item">
          <view class="label">工作类型</view>
          <view class="content">
            <input class="input" bindtap="showServiceItem" disabled="true" value="{{worker.workType}}"
              placeholder="请选择个人工作类型或技能" />
          </view>
        </view>
        <view class="form-item">
          <view class="label">工作经验</view>
          <view class="content">
            <input class="input" bindtap="showExperience" disabled="true" value="{{worker.experience}}"
              placeholder="请选择个人工作经验" />
          </view>
        </view> -->
        <!-- <view class="form-item">
          <view class="label">工作城市</view>
          <view class="content">
            <input class="input" value="{{worker.city}}"  bindtap="showCity" disabled="true" placeholder="请选择应聘的城市" />
          </view>
        </view>      -->
				<view class="form-item">
          <view class="label-m label">户口</view>
          <view class="content">
            <input class="input" bindtap="showHukou" disabled="true" value="{{worker.residenceTypeName}}"
              placeholder="请选择户口" />
          </view>
        </view>
				<view class="form-item">
          <view class="label-m label">社保</view>
          <view class="content">
            <input class="input" bindtap="showShebao" disabled="true" value="{{worker.socialSecurityName}}"
              placeholder="请选择社保" />
          </view>
        </view> 

        <view class="form-item">
          <view class="label-m label">学历</view>
          <view class="content">
            <input class="input" bindtap="showEducation" disabled="true" value="{{worker.education}}"
              placeholder="请选择个人学历" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-m">身高</view>
          <view class="content">
            <input class="input" bindinput="bindHeight" value="{{worker.height}}" type="number"
              placeholder="请填写身高" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-m">体重</view>
          <view class="content">
            <input class="input" bindinput="bindWeight" value="{{worker.weight}}" type="number"
              placeholder="请填写体重" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-m">开户行</view>
          <view class="content">
            <input class="input" bindinput="bindBankOfDeposit" value="{{worker.bankOfDeposit}}" 
              placeholder="请填写开户行" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-m">银行卡号</view>
          <view class="content">
            <input class="input" bindinput="bindBankNo" value="{{worker.bankNo}}" type="number" maxlength="19"
              placeholder="请填写银行卡号" />
          </view>
        </view>
         <!-- <view class="form-item">
          <view class="label">联系地址</view>
          <view class="content">
            <input class="input" value="{{worker.contactAddr}}"  bindinput="bindContactAddr" placeholder="请填写目前所住地址" maxlength="30" />
          </view>
        </view> -->
        <!-- <view class="form-item">
          <view class="label label-m">紧急联系人*</view>
          <view class="content">
            <input class="input"  bindinput="bindEmergencyContact" value="{{worker.emergencyContact}}" placeholder="请填写紧急联系人" maxlength="10" />
          </view>
        </view> -->
        <view class="form-item">
          <view class="label label-m">备用电话</view>
          <view class="content">
            <input class="input" bindinput="bindWorkerTel1" value="{{worker.workerTel1}}" type="number"
              placeholder="请填写备用号码" maxlength="11" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-m">健康证编号</view>
          <view class="content">
            <input class="input" value="{{worker.certificateNo}}"  bindinput="bindHealthCert" placeholder="请填写健康证编号" maxlength="32"/>
          </view>
        </view>
        <view class="form-item">
          <view class="label label-m">发证时间</view>
          <view class="content">
            <input class="input" type="date" disabled="true" bindtap="showIssuanceDate" value="{{worker.issuanceDate}}" placeholder="请选择发证时间" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-s">健康证开始时间</view>
          <view class="content">
            <input class="input" type="date" disabled="true" bindtap="showHealthStart" value="{{worker.expirationDateStart}}" placeholder="请选择健康证开始时间" />
          </view>
        </view>
        <view class="form-item">
          <view class="label label-s">健康证结束时间</view>
          <view class="content">
            <input class="input"  disabled="true" bindtap="showHealthEnd" value="{{worker.expirationDateEnd}}" placeholder="请选择健康证结束时间" />
          </view>
        </view>

      </view>
    </view>

    <view style="display: flex; height:220rpx; padding:10px;background:#fff;">
      <view class="weui-uploader">
        <view class="weui-uploader__hd">
          <view class="weui-uploader__title">上传健康证</view>
        </view>
        <view class="weui-uploader__bd">
          <view class="weui-uploader__files"  style="justify-content: flex-start;" id="uploaderFrontFiles">
            <block>
              <view class="weui-uploader__file" bindtap="previewImage" id="{{item}}">
                <image class="weui-uploader__img" src="{{item}}" mode="aspectFill"  wx:for="{{certificateFileUrl}}"/>
              </view>
            </block>
            <!-- wx:if="{{showOcr}}"  wx-if="{{certificateFileUrl.length==0}}"-->
            <view   class="weui-uploader__input-box" >
              <view class="weui-uploader__input" data-type='front' bindtap="uploadHealth"></view>
            </view>
          </view>
        </view>
      </view>
     
    </view> 
    <view style="display: flex; height:220rpx; padding:10px;background:#fff;">
      <view class="weui-uploader">
        <view class="weui-uploader__hd">
          <view class="weui-uploader__title">上传头像</view>
        </view>
        <view class="weui-uploader__bd">
          <view class="weui-uploader__files"  style="justify-content: flex-start;"  id="headPic">
            <block>
              <view class="weui-uploader__file" bindtap="previewImage" id="{{headPic}}">
                <image class="weui-uploader__img" src="{{headPic}}" mode="aspectFill" />
              </view>
            </block>
            <view   class="weui-uploader__input-box">
              <view class="weui-uploader__input" data-type='front' bindtap="uploadHeadPic"></view>
            </view>
          </view>
        </view>
      </view>
     
    </view> 

    <view class="fb-btn" wx:if="{{showSubmit}}" bindtap="submitFeedback">完善信息</view>

    </block>

  </view>

  <van-popup show="{{showExperience}}" position="bottom">
    <van-picker show-toolbar columns="{{experience}}" bind:cancel="onExperienceCancel"
      bind:confirm="onExperienceConfirm" />
  </van-popup>

  <van-popup show="{{showEducation}}" position="bottom">
    <van-picker show-toolbar columns="{{education}}" bind:cancel="onEducationCancel"
      bind:confirm="onEducationConfirm" />
  </van-popup>

  <van-popup show="{{showServiceItem}}" position="bottom">
    <van-picker show-toolbar columns="{{serviceItem}}" bind:cancel="onServiceItemCancel"
      bind:confirm="onServiceItemConfirm" />
  </van-popup>


  <van-popup show="{{showCity}}" position="bottom">
    <van-picker show-toolbar columns="{{citys}}" bind:cancel="onCityCancel"
      bind:confirm="onCityConfirm" />
  </van-popup>


  <van-popup show="{{showHealthStart}}" position="bottom">
    <van-datetime-picker type='date' bind:cancel="onHealthStartCancel"
      bind:confirm="onHealthStartConfirm" min-date="{{minDate}}"/>
  </van-popup>

  <van-popup show="{{showIssuanceDate}}" position="bottom">
    <van-datetime-picker type='date' bind:cancel="onIssuanceDateCancel"
      bind:confirm="onIssuanceDateConfirm" min-date="{{minDate}}"/>
  </van-popup>

  <van-popup show="{{showHealthEnd}}" position="bottom">
    <van-datetime-picker type='date' bind:cancel="onHealthEndCancel"
      bind:confirm="onHealthEndConfirm" min-date="{{minDate}}"/>
  </van-popup>

  <van-popup show="{{showHukou}}" position="bottom">
		<van-picker show-toolbar columns="{{residenceTypeList}}" value-key="value" bind:cancel="onHukouCancel"  bind:confirm="onHukouConfirm" />
  </van-popup>

	<van-popup show="{{showShebao}}" position="bottom">
		<van-picker show-toolbar columns="{{socialSecurityList}}" value-key="value" bind:cancel="onShebaoCancel"  bind:confirm="onShebaoConfirm" />
  </van-popup>
 
</view>