<?php /* Smarty version Smarty-3.1.8, created on 2015-11-24 14:47:07
         compiled from "D:\wwwroot\o2o\htdocs\themes\default\xiche\mcenter\order\rob.html" */ ?>
<?php /*%%SmartyHeaderCode:256305653cddb370357-80030234%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4f0dcf1154cec9b593820fa129bd50d69fe72642' => 
    array (
      0 => 'D:\\wwwroot\\o2o\\htdocs\\themes\\default\\xiche\\mcenter\\order\\rob.html',
      1 => 1448334721,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '256305653cddb370357-80030234',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5653cddb481a92_13732003',
  'variables' => 
  array (
    'type_name' => 0,
    'items' => 0,
    'item' => 0,
    'goods' => 0,
    'pager' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5653cddb481a92_13732003')) {function content_5653cddb481a92_13732003($_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/mcenter/block/mheader.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

</head>

<body>
<header>
	<i class="left"><a id="icon_goback" href="<?php echo smarty_function_link(array('ctl'=>'xiche/mcenter/main'),$_smarty_tpl);?>
"></a></i>
    <div class="title">订单列表-<?php echo $_smarty_tpl->tpl_vars['type_name']->value;?>
</div>
    <i class="right"></i>
</header>
<section id="order" class="page_center_box">
    <div class="order_list_box">
  <?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['item']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['items']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
$_smarty_tpl->tpl_vars['item']->_loop = true;
?>
        <div class="order_list">
            <div class="state">
            	<div class="fl">
                	<p><?php echo $_smarty_tpl->tpl_vars['item']->value['mobile'];?>
</p>
                    <P class="pointcl"><?php echo smarty_modifier_format($_smarty_tpl->tpl_vars['item']->value['fuwu_time'],'Y-m-d H:i');?>
</P>
                </div>
                <div class="fr">

                        <?php if ($_smarty_tpl->tpl_vars['item']->value['order_status']==2){?>
                	<a rel="<?php echo $_smarty_tpl->tpl_vars['item']->value['order_id'];?>
" href="javascript:void(0);" class="btn btns"><em></em>抢单</a>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['item']->value['order_status']==3){?>
                	<a href="#" class="btn">开始洗车</a>
                        <?php }?>
                        <?php if ($_smarty_tpl->tpl_vars['item']->value['order_status']==4){?>
                        <a href="#" class="btn bg_1">订单完成</a>
                        <?php }?>
                        

                </div>
                <div class="clear"></div>
            </div>
            <div class="infor">
                <div class="fl">

                    <p><em class="ico_1"></em><?php echo $_smarty_tpl->tpl_vars['item']->value['car'];?>
</p>
                    <p><em class="ico_2"></em><?php echo $_smarty_tpl->tpl_vars['item']->value['addr'];?>
</p>
                    <p><em class="ico_3"></em><?php echo $_smarty_tpl->tpl_vars['goods']->value[$_smarty_tpl->tpl_vars['item']->value['goods_id']]['title'];?>
</p>


                </div>
                <div class="fr"></div>
                <div class="clear"></div>

                <p class="total">￥<?php echo $_smarty_tpl->tpl_vars['item']->value['price'];?>
<a href="<?php echo smarty_function_link(array('ctl'=>'xiche/mcenter/order:detail','order_id'=>$_smarty_tpl->tpl_vars['item']->value['order_id']),$_smarty_tpl);?>
" class="fr fontcl1 see_more">查看详情<em></em></a></p>


            </div>
        </div>
  <?php }
if (!$_smarty_tpl->tpl_vars['item']->_loop) {
?>
    <style>
        .wl_order_list_box{text-align: center;}
    </style>
    <div class="order_no">
        <img src="/themes/default/mobile/static/images/orderIco2.png">
        <h2>今日暂时没有新单</h2>
        <p class="graycl">好洗车，就找我</p>
    </div>
    <?php } ?>
    </div>
    <style>
        .page-list{height:0.2rem;line-height:0.2rem;}
        .page-list em,.page-list a,.page-list strong{height:0.2rem;line-height:0.2rem;padding:0.02rem 0.08rem;margin:0 0.04rem;}
        .page-list em{color:#333333;padding:0;margin:0;}
        .page-list a{border:1px solid #e2e2e2;background:#ffffff;color:#2cca77;}
        .page-list strong{border:1px solid #e2e2e2;background:#2cca77;color:#ffffff;}
    </style>
    <div class="page-list"><?php echo $_smarty_tpl->tpl_vars['pager']->value['pagebar'];?>
</div>
</section>
    
    
    <script type="text/javascript">
            require(["zepto", "underscore", "frozen"], function ($, _, fz) {
                $(".btns").click(function () {
                    var dia = $.dialog({
                        title: '温馨提示',
                        content: '您确定要抢单吗？抢单后请在规定的时间内完成！',
                        button: ["确认", "取消"],
                    });
                    var link = "<?php echo smarty_function_link(array('ctl'=>'xiche/mcenter/order/qiang'),$_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, stayTime: 2000});
                                } else {
                                    $.tips({content: ret.message, stayTime: 2000});
                                    setTimeout(function () {
                                        var link = "<?php echo smarty_function_link(array('ctl'=>'xiche/mcenter/order:detail','order_id'=>$_smarty_tpl->tpl_vars['item']->value['order_id']),$_smarty_tpl);?>
"; 
                                        window.location.href = link;
                                    }, 1000)
                                }
                            }, 'json');
                        }
                    });
                });
            });
        </script>
    
</body>
</html><?php }} ?>