|
@@ -42,14 +42,25 @@ class Contract extends BaseController
|
|
|
$post = UtilService::getMore(
|
|
$post = UtilService::getMore(
|
|
|
[
|
|
[
|
|
|
['page', 1],
|
|
['page', 1],
|
|
|
- ['phone',''], //甲方uid或者电话
|
|
|
|
|
- ['to_phone',''], //乙方uid或者电话
|
|
|
|
|
- ['contract_no', ''],
|
|
|
|
|
- ['status',''],
|
|
|
|
|
|
|
+ ['uid',''], //甲方uid
|
|
|
|
|
+ ['name',''], //甲方姓名
|
|
|
|
|
+ ['phone',''], //甲方电话
|
|
|
|
|
+ ['to_uid',''], //乙方uid
|
|
|
|
|
+ ['to_name',''], //乙方姓名
|
|
|
|
|
+ ['to_phone',''], //乙方电话
|
|
|
|
|
+ ['contract_id', ''], //订单id
|
|
|
|
|
+ ['contract_no', ''], //订单编号
|
|
|
|
|
+ ['status',''],//状态 0未确认 1已签约 2已到期 -1取消签约
|
|
|
['time',[]],
|
|
['time',[]],
|
|
|
], $request
|
|
], $request
|
|
|
);
|
|
);
|
|
|
$where = [];
|
|
$where = [];
|
|
|
|
|
+ if(!empty($post['uid'])){
|
|
|
|
|
+ $where[]=["uid","=",$post['uid']];
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!empty($post['name'])){
|
|
|
|
|
+ $where[]=["name","like","%{$post["name"]}%"];
|
|
|
|
|
+ }
|
|
|
if(!empty($post['phone'])){
|
|
if(!empty($post['phone'])){
|
|
|
$where[]=["phone","=",$post['phone']];
|
|
$where[]=["phone","=",$post['phone']];
|
|
|
}
|
|
}
|
|
@@ -60,11 +71,20 @@ class Contract extends BaseController
|
|
|
// $where[]=["o.uid","=",$m['uid']];
|
|
// $where[]=["o.uid","=",$m['uid']];
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
|
|
+ if(!empty($post['to_uid'])){
|
|
|
|
|
+ $where[]=["to_uid","=",$post['to_uid']];
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!empty($post['to_name'])){
|
|
|
|
|
+ $where[]=["to_name","like","%{$post["to_name"]}%"];
|
|
|
|
|
+ }
|
|
|
if(!empty($post['to_phone'])){
|
|
if(!empty($post['to_phone'])){
|
|
|
$where[]=["to_phone","=",$post['to_phone']];
|
|
$where[]=["to_phone","=",$post['to_phone']];
|
|
|
}
|
|
}
|
|
|
if(!empty($post['contract_no'])){
|
|
if(!empty($post['contract_no'])){
|
|
|
- $where[]=["contract_no","=",$post['contract_no']];
|
|
|
|
|
|
|
+ $where[]=["contract_no","like","%{$post["contract_no"]}%"];
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!empty($post['contract_id'])){
|
|
|
|
|
+ $where[]=["contract_id","=",$post['contract_id']];
|
|
|
}
|
|
}
|
|
|
if(!empty($post['status'])){
|
|
if(!empty($post['status'])){
|
|
|
$where[]=["status","=",$post['status']];
|
|
$where[]=["status","=",$post['status']];
|
|
@@ -219,7 +239,7 @@ class Contract extends BaseController
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
if(!empty($post['nickname'])){
|
|
if(!empty($post['nickname'])){
|
|
|
- $where[]=["nickname","like",$post['nickname']];
|
|
|
|
|
|
|
+ $where[]=["nickname","like","%{$post["name"]}%"];
|
|
|
}
|
|
}
|
|
|
if(!empty($post['contract_id'])){
|
|
if(!empty($post['contract_id'])){
|
|
|
$where[]=["contract_id","=",$post['contract_id']];
|
|
$where[]=["contract_id","=",$post['contract_id']];
|
|
@@ -296,7 +316,7 @@ class Contract extends BaseController
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
if(!empty($post['nickname'])){
|
|
if(!empty($post['nickname'])){
|
|
|
- $where[]=["nickname","like",$post['nickname']];
|
|
|
|
|
|
|
+ $where[]=["nickname","like","%{$post["name"]}%"];
|
|
|
}
|
|
}
|
|
|
if(!empty($post['contract_id'])){
|
|
if(!empty($post['contract_id'])){
|
|
|
$where[]=["contract_id","=",$post['contract_id']];
|
|
$where[]=["contract_id","=",$post['contract_id']];
|