浏览代码

模糊匹配

wufeng 2 年之前
父节点
当前提交
b272297ec1
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      app/admin/controller/Consult.php

+ 4 - 4
app/admin/controller/Consult.php

@@ -24,7 +24,7 @@ class Consult extends Base
         $where=[['a.is_del',"=",0],['b.is_del',"=",0]];
         $infoNo = isset($this->post['zxNo']) && $this->post['zxNo'] !== "" ? trim($this->post['zxNo']) : "";
         if ($infoNo !== "") {
-            $where[] = ['a.infoNo','=',$infoNo];
+            $where[] = ['a.infoNo','like','%'.$infoNo.'%'];
         }
 
         $salesman = isset($this->post['salesman']) && $this->post['salesman'] !== "" ? trim($this->post['salesman']) : "";
@@ -1691,15 +1691,15 @@ class Consult extends Base
         $where=[['is_del',"=",0]];
         $zxNo = isset($this->post['zxNo']) && $this->post['zxNo'] !== "" ? trim($this->post['zxNo']) : "";
         if ($zxNo !== "") {
-            $where[] = ['zxNo','=',$zxNo];
+            $where[] = ['zxNo','like','%'.$zxNo.'%'];
         }
         $infoNo = isset($this->post['infoNo']) && $this->post['infoNo'] !== "" ? trim($this->post['infoNo']) : "";
         if ($infoNo !== "") {
-            $where[] = ['infoNo','=',$infoNo];
+            $where[] = ['infoNo','like','%'.$infoNo.'%'];
         }
         $bidNo = isset($this->post['bidNo']) && $this->post['bidNo'] !== "" ? trim($this->post['bidNo']) : "";
         if ($bidNo !== "") {
-            $where[] = ['bidNo','=',$bidNo];
+            $where[] = ['bidNo','like','%'.$bidNo.'%'];
         }
         $pgNo = isset($this->post['pgNo']) && $this->post['pgNo'] !== "" ? trim($this->post['pgNo']) : "";
         if ($pgNo !== "") {