<div style="width:90%;margin:30px auto;">
  <div class="panel panel-primary">
      <div class="panel-heading">
        <h3 class="panel-title">订单搜索</h3>
      </div>
      <div class="panel-body">
        <div class="row">
         <form style="" action="" method="get">
          <div class="col-md-6">
            <input class="form-control" type="text" placeholder="汉特订单号或第三方订单号或电子取票号" name="order" value="<?php echo !empty($order)?"$order":"";?>" autocomplete="off">
          </div>  
		  <div class="col-md-4">
            <select class="form-control" name="web_code">
			  <option value ="分站点查询，默认商旅" disabled="disabled" selected>分站点查询，默认全站</option>
			  <option value ="CHT">商旅</option>
			  <option value ="jp">日本</option>
			  <option value="train_vac">西班牙</option>
			  <option value="train_it">意大利</option>
			  <option value="train_ru">俄罗斯</option>
			  <option value="train_vc">法国</option>
			</select>
          </div>  
		  <div class="col-md-2">
			<select class="form-control" name="channel">
				<option value ="" disabled="disabled" selected>渠道</option>
				<option value ="ctrip">携程</option>
				<option value ="lanhai">澜海</option>
				</select>
		  </div>
		  <!--<div class="col-md-5">
			<input type="text" name="from_date" class="date" value="" class="">
			至
			<input type="text" name="to_date" class="date" value="">
		  </div>-->
          <div class="col-md-5">
            <button type="submit" id="sub" class="btn btn-success btn-sm"><span class="glyphicon glyphicon-search"></span> 搜索</button> 
          </div>    
          </form> 
        </div>  
      </div>
  </div>
	<div class="panel panel-primary">
	    <div class="panel-heading">
	    	<h3 class="panel-title">订单列表</h3>
	    </div>
    	<div class="panel-body">
    		<table class="table table-striped"  style="text-align:center;">
  				<thead>
  					<tr>
  						<th style="text-align:center;">序号</th>
  						<th style="text-align:center;">汉特订单号(商家订单号)</th>
  						<th style="text-align:center;">第三方订单号</th>
  						<th style="text-align:center;">车次</th>
  						<th style="text-align:center;">出发</th>
  						<th style="text-align:center;">到达</th>
  						<th style="text-align:center;">状态</th>						
  						<th style="text-align:center;">外联</th>
  						<th style="text-align:center;">提交时间</th>
						<th style="text-align:center;">所属部门</th>
						<th style="text-align:center;">渠道</th>
						<th style="text-align:center;">出票方式</th>
						<th style="text-align:center;">出票次数</th>
						<th style="text-align:center;">发送邮件</th>
						<th style="text-align:center;">反馈</th>
  						<th style="text-align:center;">操作</th>
  					</tr>
  				</thead>
  				<tbody>
  					<?php $num=0; foreach($data as $v):?>
  					<tr>
  						<td><?php echo ++$num;?></td>
  						<td><?php echo $v->COLI_ID.'('.$v->ts_cold_sn.')';?></td>
  						<td><?php echo $v->ts_ordernumber;?></td>
  						<td><?php echo $v->ts_checi;?></td>
  						<td><?php echo $v->ts_fromstationame;?></td>
  						<td><?php echo $v->ts_tostationame;?></td>
  						<td><?php echo $v->info;?></td>
  						<td><?php echo $v->OPIName;?></td>
  						<td><?php echo $v->ts_subtime;?></td>
						<td><?php echo $v->COLI_WebCode;?></td>
						<td><?php echo $v->ts_channel;?></td>
						<?php 
						if($v->ts_isauto == 1){
							echo '<td>自动</td>';
						}elseif($v->ts_isauto == 0){
							echo '<td>手动</td>';
						}elseif($v->ts_isauto == 3){
							echo '<td>抢票</td>';
						}elseif($v->ts_isauto == 4){
							echo '<td>复查</td>';
						}
						?>
						<td><?php echo $v->ts_autotimes;?></td>
						<?php 
						if($v->ts_sendmail == 1){
							if($v->ts_m_sn){
								echo '<td><a target="_blank" href="http://www.mycht.cn/info.php/apps/train/index/get_mailinfo/'.$v->ts_m_sn.'">是</a></td>';
							}else{
								echo '<td>是</td>';
							}
						}else{
							echo '<td>否</td>';
						}
						?>
						<td><?php echo $v->ts_errormsg;?></td>
  						<td><a target="_blank" href="order?order=<?php echo $v->ts_ordernumber;?>">详情</a></td>
  					</tr>
  				<?php endforeach;?>
  				</tbody>
			</table>
      <div style="text-align:right;"><ul class="pagination"><?php echo $page_link;?></ul></div>
    	</div>
	</div>
</div>