Commit 1693714e by 连敬荣

取消供应商名称搜索

parent bed76a47
Showing with 27 additions and 19 deletions
......@@ -241,25 +241,32 @@ class CommonModel extends Model
}
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);
$lieIntracodeModel = new LieIntracodeModel();
$lieSupplierChannelModel = new LieSupplierChannelModel();
$code_id = $lieIntracodeModel->getCodeId($user_id);
if(empty($code_id)){
$channel_id = -1;
}else{
$channel_id = $code_id[0]['code_id'];
}
// $supplierInfo = $lieSupplierChannelModel->adminGetSupplierName($supplier_name);
// var_dump($supplierInfo);
// exit();
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");
//// $code_id = DB::connection('mysql')->select("select code_id as channel_id from lie_intracode where admin_id = ".$user_id);
// $lieIntracodeModel = new LieIntracodeModel();
// $lieSupplierChannelModel = new LieSupplierChannelModel();
// $code_id = $lieIntracodeModel->getCodeId($user_id);
// if(empty($code_id)){
// $channel_id = -1;
// }else{
// $channel_id = $code_id[0]['code_id'];
// }
//
//// $supplierInfo = $lieSupplierChannelModel->adminGetSupplierName($supplier_name);
//// var_dump($supplierInfo);
//// exit();
// 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 1");
// 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");
// echo json_encode($supplierInfo,JSON_UNESCAPED_UNICODE) ;
$supplierInfo = array();
$supplierInfoParam = array(
"value" => -1,
"name" => $supplier_name
);
array_push($supplierInfo,$supplierInfoParam);
echo json_encode($supplierInfo,JSON_UNESCAPED_UNICODE) ;
}
}
\ No newline at end of file
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