<div class="col-xs-24 btn-lg"></div>
<form class="form-add-watch" method="post" style="background:#fafafa;" action="<?php echo site_url('apps/workflow/index/do_add_work'); ?>">
  <input type="hidden" name="wf_sn" value="<?php if(isset($wf_sn)) echo $wf_sn; ?>">
  <input type="hidden" name="mail_title" value="补休申请">
  <div class="col-xs-24 zhiban-top">
    <div class="col-xs-5"><input type="hidden" class="datepicker noshadow noborder" style="font-size:14px;color:#666;width:100px;" name="wf_time" value="<?php $cdate=date('Y-m-d');if(isset($wf_time)) $cdate=$wf_time; echo $cdate; ?>" /></div>
    <div class="col-xs-14 text-center">
        <select name="wf_wt_sn" class="noshadow hidden-xs" style="border:1px solid #ddd;height:24px;width:110px;">
          <?php foreach ($typelist as $t) { ?>
            <option value="<?php echo $t->wt_sn.'@'.$t->wt_step; ?>" <?php if(isset($wf_wt_sn) && $wf_wt_sn==$t->wt_sn.'@'.$t->wt_step) echo 'selected' ?>><?php echo $t->wt_name; ?></option>
          <?php } ?>
        </select> 
        <input type="text" name="wf_user" class="text-center noshadow" style="border:1px solid #ddd;width:100px;" value="<?php $userdata=$this->session->userdata('admin_chtcdn'); if(!isset($wf_user)) {echo $userdata['OPI_Name'];}else{echo $wf_user;} ?>" placeholder="姓名">
    </div>
    <div class="col-xs-5">
      <?php if (!isset($wf_sn) || empty($wf_sn)) { ?>
        <button type="button" class="btn btn-danger pull-right btn-add-watch" onclick="$(this).button('loading');setTimeout(function(){ajaxSubmit('.form-add-watch')},500);">提  交</button>
      <?php } ?>
    </div>
  </div>
  <legend></legend>

  <div class="<?php if (!isset($wf_sn)) { echo 'col-xs-20 col-md-offset-2';}else{echo 'col-xs-24';} ?>">
    <h1 class="text-center">
      职工请假单
    </h1>
    <h4 class="col-xs-24">部门： <input type="text" name="rest_department" value="电子商务部" style="border:none;"></h4> 
    <table width="100%" border="0" class="resttable table_form_input table table-bordered">
      <tr>
        <td width="10%" height="60" align="center" valign="middle">姓　　名</td>
        <td height="60" colspan="2" valign="middle"><input type="text" name="apply_user" class="form-control" value="<?php $userdata=$this->session->userdata('admin_chtcdn'); if(!isset($apply_user)) {echo $userdata['OPI_Name'];}else{echo $apply_user;} ?>"></td>
        <td width="14%" height="60" align="center" valign="middle">请假天数</td>
        <td height="60" valign="middle">
            <select class="form-control" name="rest_days">
              <?php for ($i=0; $i < 6; $i++) { ?>
                <option value="<?php echo $i; ?>" <?php if((isset($rest_days) && $rest_days==$i) || $i==1) echo 'selected'; ?>> <?php echo $i; ?>天</option>
              <?php } ?>
            </select>
        </td>
        <td height="60" valign="middle">
            <select class="form-control" name="rest_days2">
              <option value="0" <?php if(isset($rest_days2) && $rest_days2==0) echo 'selected'; ?>>+ 0天</option>
              <option value="3.5" <?php if(isset($rest_days2) && $rest_days2==3.5) echo 'selected'; ?>>+ 0.5天</option>
            </select>
        </td>
      </tr>
      <tr>
        <td height="60" align="center" valign="middle">请假类别</td>
        <td height="60" colspan="5" valign="middle"><input type="text" name="rest_type" class="form-control" placeholder="年度年休假、事假、病假、婚假、产假、丧假、补休" value="<?php echo isset($rest_type)?$rest_type:'补休'; ?>" ></td>
      </tr>
      <tr>
        <td height="60" align="center" valign="middle">起止时间</td>
        <td height="60" colspan="2" valign="middle"><input type="text" name="rest_start_date" class="form-control datepicker" style="background:none;" value="<?php echo isset($rest_start_date)?$rest_start_date:''; ?>" placeholder="　从　　年　　月　　日"></td>
        <td height="60" align="center" valign="middle">至</td>
        <td height="60" colspan="2" valign="middle"><input type="text" name="rest_end_date" class="form-control datepicker" style="background:none;" value="<?php echo isset($rest_end_date)?$rest_end_date:''; ?>" placeholder="　　年　　月　　日"></td>
      </tr>
      <tr>
        <td height="60" align="center" valign="middle">休假地址</td>
        <td height="60" colspan="2" valign="middle"><input type="text" name="rest_province" class="form-control" value="<?php echo isset($rest_province)?$rest_province:'　　广西省'; ?>" placeholder="　　广西省"></td>
        <td height="60" colspan="2" valign="middle"><input type="text" name="rest_city" class="form-control" value="<?php echo isset($rest_city)?$rest_city:'　　　桂林市'; ?>" placeholder="　　　桂林市"></td>
        <td height="60" colspan="1" valign="middle"><input type="text" name="rest_county" class="form-control" value="<?php echo isset($rest_county)?$rest_county:''; ?>" placeholder="　　　　　　县"></td>
      </tr>
      <tr>
        <td width="10%" height="200" align="center" valign="middle">部门意见</td>
        <td width="13%" height="200" align="center" valign="middle"><textarea name="rest_department_ad" class="form-control" <?php if (!isset($wf_sn) || empty($wf_sn) || (isset($is_verify_user) && $is_verify_user==0)) echo 'readonly'; ?>><?php echo isset($rest_department_ad)?$rest_department_ad:''; ?></textarea></td>
        <td width="13%" height="200" align="center" valign="middle">办公室意见</td>
        <td width="14%" height="200" align="center" valign="middle"><textarea name="rest_workhouse_ad" class="form-control" <?php if (!isset($wf_sn) || empty($wf_sn) || (isset($is_verify_user) && $is_verify_user==0)) echo 'readonly'; ?>><?php echo isset($rest_workhouse_ad)?$rest_workhouse_ad:''; ?></textarea></td>
        <td width="14%" height="200" align="center" valign="middle">总经理室意见</td>
        <td width="36%" height="200" align="center" valign="middle"><textarea name="rest_ceo_ad" class="form-control" <?php if (!isset($wf_sn) || empty($wf_sn) || (isset($is_verify_user) && $is_verify_user==0)) echo 'readonly'; ?>><?php echo isset($rest_ceo_ad)?$rest_ceo_ad:''; ?></textarea></td>
      </tr>
    </table>

  </div>
  
  
  <script type="text/javascript">
    $('.datepicker').datepicker({
      dateFormat:"yy-mm-dd"
    });
  </script>
</form>