<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase.php');?>
<link rel="stylesheet" type="text/css" href="<?php echo mvc::$cfg['ADMIN_URL'];?>static/css/product.css?ver=1522226299">
<script type="text/javascript" src="<?php echo mvc::$cfg['ADMIN_URL'];?>static/js/order.js?ver=<?php echo mvc::$cfg['VER']['js'];?>"></script>
<div class="maintb" id="order-detail-main">
	<div id="order-detail-nav">
		<div class="navrow">
	        <ul class="navrow_ul">
	            <li>
	                <a href="<?php echo mvc::$cfg['ADMIN_URI'];?>pjlProduct/purchaseOfferView?poId=<?php echo $_GET['poId'];?>">基本信息</a>
	            </li>
	            <li class="active">
	                <a href="<?php echo mvc::$cfg['ADMIN_URI'];?>pjlProduct/purchaseOfferOrder?poId=<?php echo $_GET['poId'];?>">订单</a>
	            </li>
	        </ul>
	    </div>
	</div>
	<div id="basic-info" class="extend_box">
		<table class="table table-bordered">
			<colgroup>
			<col width="100" align="right">
			</colgroup>
			<tbody>
				<?php if (!empty($orderInfo)){?>
				<tr>
					<th class="text-right">订单编号：</th>
					<td><?php echo $orderInfo['ord_id'];?></td>
				</tr>
				<tr>
					<th class="text-right">订单状态：</th>
					<td><?php echo $orderStatusDes[$orderInfo['ord_status']];?></td>
				</tr>			
				<tr>
					<th class="text-right">下单时间：</th>
					<td><?php if($orderInfo['ord_atime']>0){echo date('Y-m-d H:i:s',$orderInfo['ord_atime']);}?></td>
				</tr>

				<?php if($orderInfo['ord_status']!='creat'){?>
					<?php if($orderInfo['ord_pay_time']){ ?>
					<tr>
						<th class="text-right">付款时间：</th>
						<td><?php if($orderInfo['ord_pay_time']>0){echo date('Y-m-d H:i:s',$orderInfo['ord_pay_time']);}?></td>
					</tr>
					<?php } ?>
				<?php }elseif($orderInfo['ord_status']=='send'||$orderInfo['ord_status']=='completed'){?>
					<tr>
						<th class="text-right">发货时间：</th>
						<td><?php if($orderInfo['ord_send_time']>0){echo date('Y-m-d H:i:s',$orderInfo['ord_send_time']);}?></td>
					</tr>
				<?php }elseif($orderInfo['ord_status']=='completed'){ ?>
					<tr>
						<th class="text-right">确认时间：</th>
						<td><?php if($orderInfo['ord_coplete_time']>0){echo date('Y-m-d H:i:s',$orderInfo['ord_coplete_time']);}?></td>
					</tr>
				<?php } ?>
				<tr>
					<th class="text-right">应付款：</th>
					<td class="red"><?php echo sprintf('%.2f',$orderInfo['ord_money']);?></td>
				</tr>
				<tr>
					<th class="text-right">卖家店铺：</th>
					<td>
						<?php echo $orderInfo['shop_name'];?>
					</td>
				</tr>
				<?php if(!empty($orderInfo['shop_tel'])){ ?>
				<tr>
					<th class="text-right">卖家电话：</th>
					<td><?php echo $orderInfo['shop_tel'];?></td>
				</tr>
				<?php } ?>
				<tr>
					<th class="text-right">买家账户：</th>
					<td><?php echo $orderInfo['u_name'];?></td>
				</tr>
				<tr>
					<th class="text-right">收件人：</th>
					<td><?php echo $orderInfo['name']; ?></td>
				</tr>
				<tr>
					<th class="text-right">收件地址：</th>
					<td><?php echo $orderInfo['addr'];?></td>
				</tr>
				<tr>
					<th class="text-right">联系方式：</th>
					<td><?php echo $orderInfo['tel'];?></td>
				</tr>
				<tr>
					<th class="text-right">运送方式：</th>
					<td>
						快递
					</td>
				</tr>
				<?php if (!empty($orderInfo['ord_freight_money'])){?>
				<tr>
					<th class="text-right">运费：</th>
					<td><?php echo $orderInfo['ord_freight_money'];?></td>
				</tr>
				<?php }?>

				<tr>
					<th class="text-right">买家留言：</th>
					<td>
						<?php echo empty($orderInfo['ord_remark'])?'无':$orderInfo['ord_remark'];?>
					</td>
				</tr>
				<!-- 订单详细 -->
				<tr>
					<th class="text-right">订单详细：</th>
					<td>
						<div><label>车型：</label><?php echo $orderInfo['model'];?></div>
						<div class="img-box"><label>订单图片：</label>
							<?php if(!empty($orderInfo['ord_pur_imgs'])){
								foreach ($orderInfo['ord_pur_imgs'] as $key => $value) {?>
									<div class="img-li"><img src="<?php echo mvc::$cfg['FILE_CENTER']['pjl']['url_get'].'&c=purchase&f='.$value.mvc::$cfg['FILE_CENTER']['pjl']['get_uri'];?>" onclick="ORDER.showImg(this);"></div>
								<?php }}else{echo '无';}?>
							<div class="clear"></div>
						</div>
						<div class="order-detail-list">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th width="500px">配件信息</th>
										<th>单价(元)</th>
										<th>数量</th>
										<th>总价</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach($orderInfo['proArr'] as $k=>$v){?>
									<tr>
										<td>
											<?php echo $v['odp_pup_name'];?>
										</td>
										<td class="red2"><?php echo sprintf('%.2f',$v['odp_price']);?></td>
										<td><?php echo $v['odp_count'];?></td>
										<td class="red2"><?php echo sprintf('%.2f',($v['odp_money']));?></td>
									</tr>
									<?php }?>
								</tbody>
							</table>
							</div>
						</td>
					</tr>
				<?php }else{?>
					<tr><td colspan="10" class="orange center"><span>没有订单信息</span></td></tr>
				<?php }?>
				</tbody>
			</table>
	</div>
</div>
<div class="modal in" id="layer_box" tabindex="-1" role="dialog" aria-labelledby="layer_box">
	<div class="modal-dialog lg" role="document">
		<div class="modal-content">
			<div class="showImgBox">
				<img src="">
			</div>
		</div>
	</div>
</div>

<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
