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

interface

... ... @@ -35,17 +35,11 @@ class AdminOrderController extends AdminBaseController{
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.eq_name=b.name')
// ->field('a.*,b.serial_number,b.hospital')
// ->join('equipment b','a.eq_name=b.name')
->where($where)
->order('start_time','desc')
->paginate(10);
... ...
... ... @@ -9,16 +9,6 @@
订单号:
<input type="text" class="form-control" name="order_no" style="width: 200px;"
value="{$order_no|default=''}" placeholder="请输入关键字...">
所属医院:
<input type="text" class="form-control" name="hospital" style="width: 200px;"
value="{$hospital|default=''}" placeholder="请输入关键字...">
设备编号:
<input type="text" class="form-control" name="start_number"
value="{$start_number|default=''}"
style="width: 80px;" autocomplete="off">-
<input type="text" class="form-control" name="end_number"
value="{$end_number|default=''}"
style="width: 80px;" autocomplete="off"> &nbsp; &nbsp;
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('AdminOrder/index')}">清空</a>
</form>
... ... @@ -28,8 +18,7 @@
<tr>
<th width="50">ID</th>
<th>订单编号</th>
<th>设备锁编号</th>
<th>所在医院</th>
<th>用户id</th>
<th>开始使用时间</th>
<th>结束使用时间</th>
<th>使用时长</th>
... ... @@ -40,8 +29,7 @@
<tr>
<td><b>{$vo.id}</b></td>
<td>{$vo.order_no}</td>
<td>{$vo.serial_number}</td>
<td>{$vo.hospital}</td>
<td>{$vo.users_id}</td>
<td>{:date('Y-m-d H:i:s',$vo.start_time)}</td>
<td>{:date('Y-m-d H:i:s',$vo.end_time)}</td>
<td>{$vo.time}小时</td>
... ...