|
@@ -3,6 +3,7 @@
|
|
namespace App\Service;
|
|
namespace App\Service;
|
|
|
|
|
|
use App\Model\ConstructionInfo;
|
|
use App\Model\ConstructionInfo;
|
|
|
|
+use App\Model\Customer;
|
|
use App\Model\CustomerInfo;
|
|
use App\Model\CustomerInfo;
|
|
use App\Model\Depart;
|
|
use App\Model\Depart;
|
|
use App\Model\Employee;
|
|
use App\Model\Employee;
|
|
@@ -423,6 +424,33 @@ class RangeService extends Service
|
|
return array_column($return,'data_id');
|
|
return array_column($return,'data_id');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //客户联系方式
|
|
|
|
+ public function salesOrderCustomerMessageSearch($data){
|
|
|
|
+ $return = CustomerInfo::where('del_time',0)
|
|
|
|
+ ->where("type",CustomerInfo::type_one)
|
|
|
|
+ ->where('contact_info','LIKE', '%'.$data['contact_info'].'%')
|
|
|
|
+ ->select('customer_id')
|
|
|
|
+ ->get()->toArray();
|
|
|
|
+
|
|
|
|
+ return array_column($return,'customer_id');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //客户创建人
|
|
|
|
+ public function salesOrderCustomerCrtSearch($user,$data){
|
|
|
|
+ $emp_id = Employee::where('del_time',0)
|
|
|
|
+ ->where('emp_name','LIKE', '%'.$data['customer_crt_name'].'%')
|
|
|
|
+ ->select('id')->get()->toArray();
|
|
|
|
+ $emp_id = array_column($emp_id,'id');
|
|
|
|
+
|
|
|
|
+ $model2 = Customer::Clear($user,$data);
|
|
|
|
+ $customer = $model2->where('del_time',0)
|
|
|
|
+ ->whereIn('crt_id', $emp_id)
|
|
|
|
+ ->select('id')
|
|
|
|
+ ->get()->toArray();
|
|
|
|
+
|
|
|
|
+ return array_column($customer,'id');
|
|
|
|
+ }
|
|
|
|
+
|
|
//收付款人搜索
|
|
//收付款人搜索
|
|
public function paymentReceiptSearch($data){
|
|
public function paymentReceiptSearch($data){
|
|
$emp_id = Employee::where('del_time',0)
|
|
$emp_id = Employee::where('del_time',0)
|