Browse Source

列表优化

dev
nizongfeng 3 years ago
parent
commit
251494acbe
4 changed files with 7 additions and 7 deletions
  1. +2
    -2
      application/admin/controller/CfItem.php
  2. +1
    -1
      application/admin/controller/CfRoomInfo.php
  3. +2
    -2
      application/admin/controller/CfRoomPlan.php
  4. +2
    -2
      application/admin/model/CfHotelInfo.php

+ 2
- 2
application/admin/controller/CfItem.php View File

@@ -214,9 +214,9 @@ class CfItem extends Backend
$keyValue=$this->request->post('keyValue'); $keyValue=$this->request->post('keyValue');
$this->model->field('id,item_name as name,item_unit,item_type,item_memo'); $this->model->field('id,item_name as name,item_unit,item_type,item_memo');
if($keyValue){ if($keyValue){
$this->model->where(['id'=>$keyValue]);
$this->model->where(['id'=>$keyValue,"del_flag"=>0]);
}elseif($name){ }elseif($name){
$this->model->where(['item_name'=>['like','%'.$name.'%']]);
$this->model->where(['item_name'=>['like','%'.$name.'%'],"del_flag"=>0]);
} }
$result= $this->model->select()->toArray(); $result= $this->model->select()->toArray();




+ 1
- 1
application/admin/controller/CfRoomInfo.php View File

@@ -181,7 +181,7 @@ class CfRoomInfo extends Backend
$hotelId=$this->request->get('hotelId'); $hotelId=$this->request->get('hotelId');
$result= $this->model $result= $this->model
->field("id,room_name as name,room_memo") ->field("id,room_name as name,room_memo")
->where("hotel_id","=",$hotelId)->select();
->where(["hotel_id"=>$hotelId,"del_flag"=>0])->select();
return json(['list' => $result]); return json(['list' => $result]);
} }




+ 2
- 2
application/admin/controller/CfRoomPlan.php View File

@@ -53,9 +53,9 @@ class CfRoomPlan extends Backend
$keyValue=$this->request->post('keyValue'); $keyValue=$this->request->post('keyValue');
$this->model->field('id,plan_name as name,purchase_user_id,plan_memo'); $this->model->field('id,plan_name as name,purchase_user_id,plan_memo');
if($keyValue){ if($keyValue){
$this->model->where(['id'=>$keyValue]);
$this->model->where(['id'=>$keyValue,"del_flag"=>0]);
}elseif($name){ }elseif($name){
$this->model->where(['plan_name'=>['like','%'.$name.'%']]);
$this->model->where(['plan_name'=>['like','%'.$name.'%'],"del_flag"=>0]);
} }
$roomId =$this->request->get('room_id'); $roomId =$this->request->get('room_id');
if ($roomId){ if ($roomId){


+ 2
- 2
application/admin/model/CfHotelInfo.php View File

@@ -32,9 +32,9 @@ class CfHotelInfo extends Model
public function getList($name='',$keyValue=''){ public function getList($name='',$keyValue=''){
$this->field('id,hotel_name as name'); $this->field('id,hotel_name as name');
if($keyValue){ if($keyValue){
$this->where(['id'=>$keyValue]);
$this->where(['id'=>$keyValue,"del_flag"=>0]);
}elseif($name){ }elseif($name){
$this->where(['hotel_name'=>['like','%'.$name.'%']]);
$this->where(['hotel_name'=>['like','%'.$name.'%'],"del_flag"=>0]);
} }
return $this->select()->toArray(); return $this->select()->toArray();
} }


Loading…
Cancel
Save