<?php /* Smarty version Smarty-3.1.8, created on 2016-01-05 15:43:16
         compiled from "D:\wwwroot\o2o\htdocs\themes\default\ucenter\orderlist\index.html" */ ?>
<?php /*%%SmartyHeaderCode:20299565027ee080666-45359811%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b286e105897ae900bdc5a3750af30de501e5ad27' => 
    array (
      0 => 'D:\\wwwroot\\o2o\\htdocs\\themes\\default\\ucenter\\orderlist\\index.html',
      1 => 1448442108,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '20299565027ee080666-45359811',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_565027ee101506_04406425',
  'variables' => 
  array (
    'orderlist' => 0,
    'v' => 0,
    'goods' => 0,
    'MEMBER' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_565027ee101506_04406425')) {function content_565027ee101506_04406425($_smarty_tpl) {?><?php if (!is_callable('smarty_function_link')) include 'D:\\wwwroot\\o2o\\htdocs\\system\\plugins/smarty\\function.link.php';
if (!is_callable('smarty_modifier_format')) include 'D:\\wwwroot\\o2o\\htdocs\\system\\plugins/smarty\\modifier.format.php';
?><?php $_smarty_tpl->tpl_vars['tpl_title'] = new Smarty_variable('登录', null, 0);?>
<!DOCTYPE HTML>
<html>
<head>
<?php echo $_smarty_tpl->getSubTemplate ("xiche/block/sheader.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

</head>
<body>
    
    <script type="text/javascript">
        require(["zepto", "underscore", "frozen"], function($, _, fz) {
            $(document).ready(function () {
               $('#list2').addClass('on');
            });//首页轮播js
        });    
     </script>
     
    
<header>
    <i class="left"><a id="icon_goback"  href="<?php echo smarty_function_link(array('ctl'=>'xiche'),$_smarty_tpl);?>
"></a></i>
    <div class="title">订单</div>
    <i class="right"></i>
</header>
<section id="order" class="page_center_box">
    
    
    <?php if ($_smarty_tpl->tpl_vars['orderlist']->value){?>
	<ul class="box_list">
            
        <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['orderlist']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
	<li>
        	<p class="state"><?php echo smarty_modifier_format($_smarty_tpl->tpl_vars['v']->value['fuwu_time']);?>

                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==0){?><span class="fr fontcl1">等待审核</span><?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==1){?><span class="fr pointcl">待付款</span><?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==2){?><span class="fr">待师傅接单</span><?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==3){?><span class="fr fontcl1">开始洗车</span><?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==4){?><span class="fr graycl ok" style="color:#ff0000;cursor:point;" rel="<?php echo $_smarty_tpl->tpl_vars['v']->value['order_id'];?>
">洗车完成,确认交易</span><?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==5){?><span class="fr graycl">交易完成</span><?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==8){?><span class="fr graycl">已取消</span><?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['order_status']==9){?><span class="fr pointcl">审核未通过</span><?php }?>
                </p>
            <div class="nr">
                <p><em class="ico_1"></em><?php echo $_smarty_tpl->tpl_vars['goods']->value[$_smarty_tpl->tpl_vars['v']->value['goods_id']]['title'];?>
&nbsp;<span style="color:#ff0000;"><?php echo $_smarty_tpl->tpl_vars['v']->value['price'];?>
元</span></p>
                <p><em class="ico_2"></em><?php echo $_smarty_tpl->tpl_vars['v']->value['addr'];?>
</p>
                <p><em class="ico_3"></em><?php echo $_smarty_tpl->tpl_vars['v']->value['car'];?>
<a href="<?php echo smarty_function_link(array('ctl'=>'xiche/order/detail','order_id'=>$_smarty_tpl->tpl_vars['v']->value['order_id']),$_smarty_tpl);?>
" class="fr">订单详情</a></p>
            </div>
        </li>
        
        
        
        
        
        <?php } ?>
        
    </ul>
    
    <?php }else{ ?>
    
    <div class="youhui_no">
		<div class="iconBg icongrayBg"> <i class="ico5"></i> </div>
		<h2>您还没有订单</h2>
        <p class="graycl">赶快去约吧</p>
        <a class="pub_btn" href="<?php echo smarty_function_link(array('ctl'=>'xiche/index'),$_smarty_tpl);?>
">立即洗车</a>
	</div>
    <?php }?>
    
    
    <script>
             require(["zepto", "underscore", "frozen"], function($, _, fz) {
                
                 var suid = '<?php echo $_smarty_tpl->tpl_vars['MEMBER']->value['uid'];?>
';
                if(suid>0){
                   var mobile = '<?php echo $_smarty_tpl->tpl_vars['MEMBER']->value['mobile'];?>
';
                  setInterval(function(){
                      if(mobile.length < 11){
                           window.location.href='<?php echo smarty_function_link(array('ctl'=>"ucenter/set:wxmodifymobile"),$_smarty_tpl);?>
';
                      }
                  },1000) 
                }
                
                
                
                $('.ok').click(function(){
                   
                     var dia = $.dialog({
                        title: '温馨提示',
                        content: '您确定要确认订单吗？确认后该笔订单资金将进入师傅账户！',
                        button: ["确定", "取消"],
                    });
                     
                     
                     var link = "<?php echo smarty_function_link(array('ctl'=>'xiche/order/ok'),$_smarty_tpl);?>
";
                     var order_id = $(this).attr('rel');
                     
                      dia.on("dialog:action", function (e) {
                        if (e.index == 0) {
                            $.post(link,{order_id:order_id},function(ret){
                                if(ret.error){
                                       $.tips({content: ret.message});
                                   }else{
                                       $.tips({content: ret.message});
                                       setTimeout(function(){
                                         location.reload(true);
                                       },1000);
                                   }

                           },'json');

                        }
                        
                  
                   
                });
                
                 });
                
             });
        </script>
    
    
    
    
</section>
<?php echo $_smarty_tpl->getSubTemplate ("xiche/block/sfooter.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

</body>
</html><?php }} ?>