<?php /* D:\phpstudy\PHPTutorial\WWW\liangshan\resources\views/Admin/accessPay.blade.php */ ?>
<?php $__env->startSection('admin'); ?>
<div class="content-wrapper" style="min-height: 810px;">
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h4>充值订单列表</h4>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="/admin/index">首页</a></li>
              <li class="breadcrumb-item active">订单管理</li>
              <li class="breadcrumb-item active">充值订单列表</li>
            </ol>
          </div>
        </div>
      </div>
    </section>
    <!-- <div class="col-xs-3">
        <button class="btn btn-primary add" style="margin-left:17px;margin-bottom:15px">添加文章 +</button>
    </div> -->

    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-md-12">

            <div class="card">
              <div class="card-body p-0">
                <table class="table table-condensed">
                  <tbody>
               
                  <tr style="text-align:center">
                    
                    <th>用户</th>
                    <th>订单号</th>
                    <th>商品</th>
                    <th>金额</th>
                    <th>时间</th>
                    <th>状态</th>
                    <!-- <th style="width: 100px">操作</th> -->
                  </tr>
                  <?php $__currentLoopData = $order; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <tr style="text-align:center">
                    <?php $user = DB::table('user') -> where('id',$val -> user_id) -> first();?>
                    <td><img src="<?php echo e($user -> header); ?>" style="height:50px;width:50px;" alt=""><br><?php echo e($user -> nickname); ?></td>
                    <td><?php echo e($val -> goods); ?></td>
                    <td><?php echo e($val -> order_id); ?></td>
                    <td>￥<?php echo e($val -> price); ?></td>
                    <td><?php echo e(date('Y年m月d日 H:i',$val -> time)); ?></td>
                    <td>充值成功</td>
                    <!-- <td>
                        <a href="javascript:void(0)" onclick="edit(<?php echo e($val -> id); ?>)"><i class="fa fa-edit" style="font-size: 16px;" title="修改"></i></a>
                    </td> -->
                  </tr>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody></table>
              </div>
            </div>
          </div>
        </div>
    </section>
  </div>
<script src="/admin/plugins/jquery/jquery.min.js"></script>
<script src="/admin/layer-v3.1.1/layer/layer.js"></script>
<script>
    function status(id,status,order_status)
    {
        if(!id || !status || !order_status){
            layer.alert('参数错误');
            return false;
        }
        var status_text = '操作';
        if(status == 'dqr') {
            status_text = '接收本笔订单';
        }else if(status == 'dqh') {
            status_text = '客户已取货';
        }else if(status == 'dfh') {
            status_text = '发货';
        }else if(status == 'dsd') {
            status_text = '已完成';
        }
        layer.confirm('确认'+ status_text +'吗？', {
            btn: ['确认','取消'] //按钮
            }, function(){
                $.get('/admin/order/status',{id:id,status:order_status},function(res){
                    console.log(res);
                    if(res.code == '1000'){
                        layer.msg(res.result);
                        window.location.reload();
                    }else{
                        layer.msg(res.result);
                    }
                })
        });  
    }
    function edit(id)
    {
        layer.alert('订单修改将尽快完成');
    //   if(!id){
    //     layer.alert('参数错误');
    //     return false;
    //   }
    //   window.location.href="/admin/wenzhang/edit/"+ id;
    }
</script>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('title','充值订单列表'); ?>
<?php $__env->startSection('order','menu-open'); ?>
<?php $__env->startSection('order2','active'); ?>
<?php $__env->startSection('pay','active'); ?>
<?php echo $__env->make('Public.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>