@@ -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(); | ||||
@@ -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]); | ||||
} | } | ||||
@@ -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){ | ||||
@@ -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(); | ||||
} | } | ||||