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

order

@@ -32,6 +32,7 @@ class AdminOrderController extends AdminBaseController{ @@ -32,6 +32,7 @@ class AdminOrderController extends AdminBaseController{
32 public function index(){ 32 public function index(){
33 $Order=new OrderModel(); 33 $Order=new OrderModel();
34 $data=$Order->alias('a') 34 $data=$Order->alias('a')
  35 + ->field('a.*,b.serial_number,b.hospital')
35 ->join('equipment b','a.mac_address=b.mac_address') 36 ->join('equipment b','a.mac_address=b.mac_address')
36 ->paginate(10); 37 ->paginate(10);
37 dump($data->toArray()); 38 dump($data->toArray());
@@ -48,12 +48,12 @@ @@ -48,12 +48,12 @@
48 <tr> 48 <tr>
49 <td><b>{$vo.id}</b></td> 49 <td><b>{$vo.id}</b></td>
50 <td>{$vo.mac_address}</td> 50 <td>{$vo.mac_address}</td>
  51 + <td>{$vo.serial_number}</td>
  52 + <td>{$vo.hospital}</td>
  53 + <td>{$vo.start_time}</td>
  54 + <td>{$vo.end_time}</td>
51 <td>{$vo.mac_address}</td> 55 <td>{$vo.mac_address}</td>
52 - <td>{$vo.mac_address}</td>  
53 - <td>{$vo.mac_address}</td>  
54 - <td>{$vo.mac_address}</td>  
55 - <td>{$vo.mac_address}</td>  
56 - <td>{$vo.mac_address}</td> 56 + <td>{$vo.price}</td>
57 </tr> 57 </tr>
58 </foreach> 58 </foreach>
59 </table> 59 </table>