作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

order

... ... @@ -30,15 +30,31 @@ use EasyWeChat\Payment\Order;
class AdminOrderController extends AdminBaseController{
public function index(){
$where=array();
if (!empty($param['order_no'])){
$where['order_no']=['like','%'.$param['order_no'].'%'];
}
if (!empty($param['hospital'])){
$where['hospital']=$param['hospital'];
}
if (!empty($param['start_number'])&&!empty($param['end_number'])){
$where['serial_number']=['between',[$param['start_number'],$param['end_number']]];
}
$Order=new OrderModel();
$data=$Order->alias('a')
->field('a.*,b.serial_number,b.hospital')
->join('equipment b','a.mac_address=b.mac_address')
->where($where)
->paginate(10)->each(function ($item){
$item['time']=($item['end_time']-$item['start_time'])/3600;
return $item;
});
$this->assign('data',$data);
$this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : '');
$this->assign('order_no', isset($param['order_no']) ? $param['order_no'] : '');
$this->assign('start_number', isset($param['start_number']) ? $param['start_number'] : '');
$this->assign('end_number', isset($param['end_number']) ? $param['end_number'] : '');
return $this->fetch();
}
}
\ No newline at end of file
... ...
... ... @@ -13,9 +13,6 @@
所属医院:
<input type="text" class="form-control" name="hospital" style="width: 200px;"
value="{$hospital|default=''}" placeholder="请输入关键字...">
备注:
<input type="text" class="form-control" name="note" style="width: 200px;"
value="{$note|default=''}" placeholder="请输入关键字...">
设备编号:
<input type="text" class="form-control" name="start_number"
value="{$start_number|default=''}"
... ... @@ -27,11 +24,6 @@
<a class="btn btn-danger" href="{:url('AdminArticle/index')}">清空</a>
</form>
<form class="js-ajax-form" action="" method="post">
<div class="table-actions">
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
data-action="{:url('AdminArticle/publish',array('yes'=>1))}" data-subcheck="true">批量新增
</button>
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
... ... @@ -58,41 +50,6 @@
</tr>
</foreach>
</table>
<!--<div class="table-actions">-->
<!--<notempty name="category">-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/listOrder')}">{:lang('SORT')}-->
<!--</button>-->
<!--</notempty>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/publish',array('yes'=>1))}" data-subcheck="true">发布-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/publish',array('no'=>1))}" data-subcheck="true">取消发布-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/top',array('yes'=>1))}" data-subcheck="true">置顶-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/top',array('no'=>1))}" data-subcheck="true">取消置顶-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/recommend',array('yes'=>1))}" data-subcheck="true">推荐-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/recommend',array('no'=>1))}" data-subcheck="true">取消推荐-->
<!--</button>-->
<!--&lt;!&ndash;-->
<!--<notempty name="category">-->
<!--<button class="btn btn-primary btn-sm js-articles-move" type="button">批量移动</button>-->
<!--</notempty>-->
<!--<button class="btn btn-primary btn-sm js-articles-copy" type="button">批量复制</button>-->
<!--&ndash;&gt;-->
<!--<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/delete')}" data-subcheck="true" data-msg="您确定删除吗?">-->
<!--{:lang('DELETE')}-->
<!--</button>-->
<!--</div>-->
<ul class="pagination">{$page|default=''}</ul>
</form>
</div>
... ...