作者 潘浩文
1 个管道 的构建 通过 耗费 1 秒

后台财务与订单模块开发

... ... @@ -116,6 +116,22 @@ class AdminLightOrderController extends AdminBaseController
$this->assign('list',$data);
return $this->fetch();
}
public function index3(){
$id=$this->request->param('id');
$data = Db::name('light_order')
->alias('lo')
->join('light l','lo.light_id=l.id')
->join('users u','lo.users_id=u.id')
->join('temple t','l.temple_id=t.id')
->where('t.id',$id)
->field('lo.*,u.*')
->order('lo.create_time','desc')
->paginate('10');
$this->assign('page',$data->render());
$this->assign('list',$data);
return $this->fetch();
}
/**
* 编辑订单
* @adminMenu(
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">订单列表</a></li>
</ul>
<form method="post" class="js-ajax-form margin-top-20">
<div class="table-actions">
<!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>-->
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="50">ID</th>
<th>下单时间</th>
<th>用户姓名</th>
<th>微信昵称</th>
<th>手机号</th>
<th>支付金额</th>
</tr>
</thead>
<tbody>
<foreach name="list" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{:date('Y-m-d',$vo.pay_time);}</td>
<td>{$vo.user_name}</td>
<td>{$vo.nickname}</td>
<td>{$vo.mobile}</td>
<td>{$vo.money}</td>
</tr>
</foreach>
</tbody>
<tfoot>
<tr>
<th width="50">ID</th>
<th>下单时间</th>
<th>用户姓名</th>
<th>微信昵称</th>
<th>手机号</th>
<th>支付金额</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>-->
</div>
</form>
<ul class="pagination">{$page|default=''}</ul>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...