Commit 6993606c by 连敬荣

新增报价公司匹配报价人

parent f89e8515
Showing with 5 additions and 0 deletions
...@@ -243,6 +243,11 @@ class CommonModel extends Model ...@@ -243,6 +243,11 @@ class CommonModel extends Model
public function getSupplierList($supplier_name,$user_id){ public function getSupplierList($supplier_name,$user_id){
$code_id = DB::connection('mysql')->select("select code_id as channel_id from lie_intracode where admin_id = ".$user_id); $code_id = DB::connection('mysql')->select("select code_id as channel_id from lie_intracode where admin_id = ".$user_id);
$channel_id = $code_id[0]['channel_id']; $channel_id = $code_id[0]['channel_id'];
if ($channel_id == 10000){
$supplierInfo = DB::connection('ass')->select("select supplier_id as value, supplier_name as name from lie_supplier_channel where status = 2 and supplier_name like '%".$supplier_name."%' limit 10");
echo json_encode($supplierInfo,JSON_UNESCAPED_UNICODE) ;
exit();
}
$supplierInfo = DB::connection('ass')->select("select supplier_id as value, supplier_name as name from lie_supplier_channel where status = 2 and supplier_name like '%".$supplier_name."%' and channel_uid like '%".$channel_id."%' limit 10"); $supplierInfo = DB::connection('ass')->select("select supplier_id as value, supplier_name as name from lie_supplier_channel where status = 2 and supplier_name like '%".$supplier_name."%' and channel_uid like '%".$channel_id."%' limit 10");
echo json_encode($supplierInfo,JSON_UNESCAPED_UNICODE) ; echo json_encode($supplierInfo,JSON_UNESCAPED_UNICODE) ;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment