<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<body>
		<div class="header">
			<div class="header-back"></div>
			<div class="header-title">订单详情</div>
		</div>
		<div class="header-row"></div>
		<div class="main-body">
			
			<div class="row-box flex mgb-5">
				<div class="flex-1 cl2">单号：<?php echo $this->_var['order']['orderno']; ?></div>
				<div class="f12 cl3 mgr-10"><?php echo $this->_var['order']['timeago']; ?></div>
				<div class="cl-primary"><?php echo $this->_var['order']['status_name']; ?></div>
			</div>
			
			<div class="flexlist">
				<?php $_from = $this->_var['prolist']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
				<div class="flexlist-item mgb-0">

					<div gourl="/module.php?m=b2b_product&a=show&id=<?php echo $this->_var['c']['productid']; ?>" class="flexlist-imgbox">
						<image src="<?php echo $this->_var['c']['imgurl']; ?>.100x100.jpg" class="flexlist-img"></image>
					</div>
		
					<div class="flex-1">
						<div class="flexlist-title" gourl="/module.php?m=b2b_product&a=show&id=<?php echo $this->_var['c']['productid']; ?>" target="_blank"><?php echo $this->_var['c']['title']; ?></div>
						<div class="flex">
							<div class="cl2 mgr-10"><?php echo $this->_var['c']['ks_title']; ?></div>
							<div class="cl-num mgr-10">￥<?php echo $this->_var['c']['price']; ?> </div>
							<div class="flex-1"></div>
							<div class="cl2">x <?php echo $this->_var['c']['amount']; ?></div>	
						</div>		
					</div>
				</div>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				 
			</div>
			<div class="row-box mgb-5">
				<div class="flex mgb-5">
					共 <div class="cl-num"><?php echo $this->_var['order']['total_num']; ?></div> 件商品， 合计
					<div class="cl-num">￥<?php echo $this->_var['order']['money']; ?></div>元
				</div>
				<div class="flex mgb-5">
					 
					优惠券<div class="cl-num">-<?php echo $this->_var['order']['coupon_money']; ?>元</div>， 
					运费<div class="cl-num"><?php echo $this->_var['order']['express_money']; ?></div>元
				</div>
				<div class="f14 mgb-5">备注</div>
				<div class="bg-light pd-10 cl3 bd-radius-10">
					<?php echo $this->_var['order']['comment']; ?>
				</div>
			</div>
			<div class="row-box flex mgb-5">
				<img src="<?php echo $this->_var['shop']['imgurl']; ?>.100x100.jpg" class="wh-40 mgr-5" />
				<div class="flex-1"><?php echo $this->_var['shop']['shopname']; ?></div>
				<div gourl="/module.php?m=b2b_guest&a=user&shopid=<?php echo $this->_var['shop']['shopid']; ?>" class="btn-round wh-30 btn-icon icon-service_light flex-c"></div>
			</div>
			<div class="row-box pdt-0 mgb-5">
				 
				<div class="flex-table">
					<div class="flex-table-label">联系人：</div>
					<div class="flex-table-box text-right">
						<?php echo $this->_var['addr']['truename']; ?>
					</div>
				</div>
				<div class="flex-table">
					<div class="flex-table-label">手机：</div>
					<div class="flex-table-box text-right">
						<?php echo $this->_var['addr']['telephone']; ?>
					</div>
				</div>
				<div class="flex-table">
					<div class="flex-table-label">收货地址：</div>
					<div class="flex-table-box text-right">
						<?php echo $this->_var['addr']['address']; ?>
					</div>
				</div>
			</div>
			<?php if ($this->_var['ordercode']): ?>
			<div class="row-box mgb-5">
				<div class="flex flex-center">
					<img class="w100" src="<?php echo $this->_var['orderCodeEwm']; ?>" />
				</div>
				<div class="flex flex-center pd-5">
					到店消费验证码：<?php echo $this->_var['ordercode']; ?>，请勿泄露
				</div>
				 
			</div> 
			<?php endif; ?>
				<?php if ($this->_var['order']['status'] == 0): ?>
				<div class="row-box pdt-0">
					<div class="row-box flex flex-center">
						<div gourl="/module.php?m=b2b_guest&a=user&shopid=<?php echo $this->_var['order']['shopid']; ?>" class="btn btn-outline-primary ">联系客服</div>
						<div class="btn btn-outline-dark mgl-5" id="order-cancel-submit">取消订单</div>
						<?php if ($this->_var['order']['ispay'] == 0): ?>
						<div id="goPay" class="btn-small btn-outline-success mgl-5">去支付</div>
						<?php endif; ?>
					</div>
				</div>
				<?php elseif ($this->_var['order']['status'] == 1): ?>
				<div class="row-box pdt-0">
					<div class="row-box flex flex-center">
						<div gourl="/module.php?m=b2b_guest&a=user&shopid=<?php echo $this->_var['order']['shopid']; ?>" class="btn btn-outline-primary ">联系客服</div>
					</div>
				</div>
				<?php elseif ($this->_var['order']['status'] == 2): ?>
				<div class="row-box pdt-0">
					<div class="row-box flex flex-center">
						<div gourl="/module.php?m=b2b_guest&a=user&shopid=<?php echo $this->_var['order']['shopid']; ?>" class="btn btn-outline-primary mgr-5">联系客服</div>
						<div id="express-search" v="<?php echo $this->_var['order']['express_no']; ?>" class="btn btn-outline-primary mgr-5">查看物流</div>
						<div class="btn btn-outline-primary " id="order-receive-submit">确认收货</div>
					</div>
				</div>	
				<?php elseif ($this->_var['order']['status'] == 3): ?>
				<div class="row-box pdt-0">
					<div class="row-box flex flex-center">
						<div gourl="/module.php?m=b2b_guest&a=user&shopid=<?php echo $this->_var['order']['shopid']; ?>" class="btn btn-outline-primary mgr-5">联系客服</div>
						<?php if ($this->_var['order']['israty'] == 0): ?>
						<div class="btn btn-outline-primary " gourl="/module.php?m=b2b_order&a=raty&orderid=<?php echo $this->_var['order']['orderid']; ?>">去评价</div>
						<?php endif; ?>
					</div>
				</div>	
				<?php endif; ?>
				 
				
		
			
			
			 
		</div>
		<?php echo $this->fetch('footer.html'); ?>
		<script>
			var orderid="<?php echo $this->_var['order']['orderid']; ?>"
		</script>
		<script src="<?php echo $this->_var['skins']; ?>b2b_order/show.js"></script>
	</body>
</html>
