<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase.php');?>
<style>
	.proimg {
		max-height: 100px;
		max-width: 100px;
	}
</style>
<div style="margin-top: 5px;margin-right: 10px;width:1280px;">
	<div class="searchParam" id="shop-index-ser-pa">
		<form method="get">
			<b>关键字</b><input type="text"  class="form-control" name="keyword" value="<?php echo $Params['keyword'];?>" placeholder="项目名、客户姓名、电话、车牌、备注">&nbsp;&nbsp;&nbsp;
			<b>账号</b><input type="text"  class="form-control" name="username" value="<?php echo $Params['username'];?>" placeholder="账号名称">&nbsp;&nbsp;&nbsp;
			<b>开单日期</b><input type="text"  class="form-control timeLimit" style="width:150px" autocomplete="off" name="time" value="<?php echo $Params['time'];?>" placeholder="时间段">&nbsp;&nbsp;&nbsp;&nbsp;
			<button type="submit" class="btn btn-primary">查询</button>

		</form>
	</div>
	<table id="shop-list-all" class="table table-bordered table-hover YpTable" style="margin-bottom: 5px;">
		<thead class="Filter Sortable">
			<tr>
				<th class="center Sort"  width="90px"><span>账号</span></th>
                <th class="center Sort"  width="60px;"><span>状态</span></th>
				<th class="center Sort"  width="80px"><span>送修人</span></th>
				<th class="center Sort"  width="80px"><span>送修人电话 </span></th>
                <th class="center Sort"  width="80px"><span>车牌号</span></th>
                <th class="center Sort"  width="80px"><span>车架号</span></th>
				<th class="center Sort"  width="120px"><span>车型</span></th>
				<th class="center Sort"  width="60px"><span>总金额</span></th>
				<th class="center Sort"  width="120px"><span>订单项目</span></th>
				<th class="center Sort">图片</th>
				<th class="center Sort"  width="120px"><span>备注</span></th>
				<th class="center Sort"  width="110px"><span>开单时间</span></th>
				<th class="center Sort"  width="110px"><span>付款/挂单时间</span></th>
			</tr>
		</thead>
		<tbody>
			<?php if(!empty($list)){ ?>
			<?php foreach($list as $k => $v){ ?>
                <tr class="virewer-img" data-replace="240/#|small/small/#|small/#">
                    <td><?php echo $userArr[$v['ord_shopr_id']]['u_name'];?></td>
                    <td>
						<?php if($v['ord_status']==0){?>
							<span class="red">未结算</span>
						<?php }elseif($v['ord_status']==1){?>
							<span class="blue">挂账</span>
						<?php }elseif($v['ord_status']==2){?>
							<span class="green">已收款</span>
						<?php }?>
					</td>
					<td><?php echo $v['ord_cus_name'] ?: ''; ?></td>
                    <td><?php echo $v['ord_cus_tel'] ?: ''; ?></td>
                    <td><?php echo $v['ord_car_numplate']?></td>
					<td><?=$v['ord_car_vin']?></td>
                    <td><?php echo $v['ord_car_modname']?: '';?></td>
					<td><?php echo $v['ord_money']?floatval($v['ord_money']): '';?></td>
					<td>
						<?=$xmArr[$v['ord_id']]['rox_xm_names']?>
					</td>
					<td>
						<?php if($v['ord_licheng_img']){?>
						<a href="javascript:;">
							<img src="<?php echo mvc::$cfg['FILE_CENTER']['pjl']['url_get'].'&c=repair&f='.$v['ord_licheng_img'].mvc::$cfg['FILE_CENTER']['b2c']['get_uri'];?>" class="proimg img_view"/>
						</a>
						<?php }?>
						<?php foreach ($v['ord_imgs'] as $key => $img) { ?>
							<a href="javascript:;">
								<img src="<?php echo mvc::$cfg['FILE_CENTER']['pjl']['url_get'].'&c=repair&f='.$img.mvc::$cfg['FILE_CENTER']['b2c']['get_uri'];?>" class="proimg img_view"/>
							</a>
						<?php }?>
					</td>
					<td><?=$v['ord_remark']?></td>
                    <td>
                        <?=$v['ord_atime']?date('Y-m-d H:i',$v['ord_atime']):''?>
                    </td>
					<td>
                        <?=$v['ord_ctime']?date('Y-m-d H:i',$v['ord_ctime']):''?>
                    </td>
                </tr>
			<?php } ?>
			<?php }else{ ?>
                <tr>
                    <td colspan="12"><div class="shoplist-error-msg">无相关信息！</div></td>
                </tr>
			<?php } ?>
		</tbody>
	</table>
	<?php echo $page;?>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
<script>
	$(document).ready(function(){
		//绑定时间控件
		laydate.render({
			range: true
			,elem: '.timeLimit'
		});
	});
</script>
