|
@@ -492,7 +492,7 @@ class Consult extends BaseController
|
|
|
$this->post = $this->request->filter('trim')->post();
|
|
|
$page = isset($this->post['page']) && $this->post['page'] !== "" ? intval($this->post['page']) : "1";
|
|
|
$size = isset($this->post['size']) && $this->post['size'] !== "" ? intval($this->post['size']) : "10";
|
|
|
- $where = [['cb.is_del', "=", 0]];
|
|
|
+ $where = [['cb.is_del', "=", 0], ['c.status', '<>', 5]];
|
|
|
$zxNo = isset($this->post['zxNo']) && $this->post['zxNo'] !== "" ? trim($this->post['zxNo']) : "";
|
|
|
if ($zxNo !== "") {
|
|
|
$where[] = ['cb.zxNo', 'like', '%' . $zxNo . '%'];
|
|
@@ -538,13 +538,20 @@ class Consult extends BaseController
|
|
|
if ($company_name !== "") $where[] = ["cb.createrid", 'in', get_company_item_user_by_name($company_name)];
|
|
|
|
|
|
|
|
|
- $count = Db::name('consult_bids')->alias('cb')->where($where)->count();
|
|
|
+ $count = Db::name('consult_bids')
|
|
|
+ ->alias('cb')
|
|
|
+ ->leftJoin("depart_user u", "u.uid=cb.createrid AND u.is_del=0")
|
|
|
+ ->leftJoin("consult_info c", "c.infoNo=cb.infoNo")
|
|
|
+ ->where($where)
|
|
|
+ ->count();
|
|
|
+
|
|
|
$total = ceil($count / $size);
|
|
|
$page = $page >= $total ? $total : $page;
|
|
|
$list = Db::name('consult_bids')
|
|
|
->alias('cb')
|
|
|
->field('cb.*,u.itemid')
|
|
|
->leftJoin("depart_user u", "u.uid=cb.createrid AND u.is_del=0")
|
|
|
+ ->leftJoin("consult_info c", "c.infoNo=cb.infoNo")
|
|
|
->where($where)
|
|
|
->page($page, $size)
|
|
|
->order('cb.addtime', 'desc')
|