|
@@ -87,7 +87,6 @@ class Order extends Backend
|
|
|
$customer = Db::name('order')->where('product','neq','')->field('id,product')->limit(20)->select();
|
|
$customer = Db::name('order')->where('product','neq','')->field('id,product')->limit(20)->select();
|
|
|
}
|
|
}
|
|
|
$this->assign('customer',$customer);
|
|
$this->assign('customer',$customer);
|
|
|
-
|
|
|
|
|
//营销部=>经办
|
|
//营销部=>经办
|
|
|
$yxjb = Db::name('personnel')->where('bid',"=",1)->where('position','=',"yxjb")->order('name desc')->select();
|
|
$yxjb = Db::name('personnel')->where('bid',"=",1)->where('position','=',"yxjb")->order('name desc')->select();
|
|
|
//营销部=>审核
|
|
//营销部=>审核
|
|
@@ -162,12 +161,23 @@ class Order extends Backend
|
|
|
$this->error(__('You have no permission'));
|
|
$this->error(__('You have no permission'));
|
|
|
}
|
|
}
|
|
|
if (false === $this->request->isPost()) {
|
|
if (false === $this->request->isPost()) {
|
|
|
- //营销部=>经办
|
|
|
|
|
|
|
+ $ids = input('ids');
|
|
|
|
|
+ $order = Db::name('order')->field('user_name,examine,customer')->where('id',"=",$ids)->find();
|
|
|
|
|
+ //查询公司
|
|
|
|
|
+ $customer_name = Db::name('customer')->field('id,customer_name')->where('customer_name','=',$order['customer'])->find();
|
|
|
|
|
+ $this->assign('customer_name',$customer_name);
|
|
|
|
|
+ $customer = Db::name('customer')->field('customer_name')->select();
|
|
|
|
|
+ $this->assign('customer',$customer);
|
|
|
|
|
+ //查询 经办 审核
|
|
|
$yxjb = Db::name('personnel')->where('bid',"=",1)->where('position','=',"yxjb")->order('name desc')->select();
|
|
$yxjb = Db::name('personnel')->where('bid',"=",1)->where('position','=',"yxjb")->order('name desc')->select();
|
|
|
- //营销部=>审核
|
|
|
|
|
$yxsh = Db::name('personnel')->where('bid',"=",1)->where('position','=',"yxsh")->order('name desc')->select();
|
|
$yxsh = Db::name('personnel')->where('bid',"=",1)->where('position','=',"yxsh")->order('name desc')->select();
|
|
|
|
|
+ $personnel_yxjb = Db::name('personnel')->where('name','=',$order['user_name'])->find();
|
|
|
|
|
+ $personnel_yxsh = Db::name('personnel')->where('name','=',$order['examine'])->find();
|
|
|
$this->assign('yxjb',$yxjb);
|
|
$this->assign('yxjb',$yxjb);
|
|
|
$this->assign('yxsh',$yxsh);
|
|
$this->assign('yxsh',$yxsh);
|
|
|
|
|
+ $this->assign('personnel_yxjb',$personnel_yxjb);
|
|
|
|
|
+ $this->assign('personnel_yxsh',$personnel_yxsh);
|
|
|
|
|
+
|
|
|
$this->view->assign('row', $row);
|
|
$this->view->assign('row', $row);
|
|
|
return $this->view->fetch();
|
|
return $this->view->fetch();
|
|
|
}
|
|
}
|
|
@@ -366,26 +376,31 @@ class Order extends Backend
|
|
|
//关联客户管理中:客户名称 => 订货单位
|
|
//关联客户管理中:客户名称 => 订货单位
|
|
|
public function customer_customer(){
|
|
public function customer_customer(){
|
|
|
$params = input('customer');
|
|
$params = input('customer');
|
|
|
|
|
+ $user_info = Session::get('admin');
|
|
|
|
|
+ $map = [];
|
|
|
|
|
+ if($user_info['id'] !== 1){
|
|
|
|
|
+ $map['company_id'] = $user_info['company_id'];
|
|
|
|
|
+ }
|
|
|
if ($params){
|
|
if ($params){
|
|
|
- $customer = Db::name('customer')->where('customer_name','like','%'.$params.'%')->select();
|
|
|
|
|
|
|
+ $customer = Db::name('customer')->where('customer_name','like','%'.$params.'%')->where($map)->select();
|
|
|
}else{
|
|
}else{
|
|
|
- $customer = Db::name('customer')->where('customer_name','neq','')->field('id,customer_name')->limit(20)->select();
|
|
|
|
|
|
|
+ $customer = Db::name('customer')->where('customer_name','neq','')->where($map)->field('id,customer_name')->limit(20)->select();
|
|
|
}
|
|
}
|
|
|
$result = ['rows'=>$customer];
|
|
$result = ['rows'=>$customer];
|
|
|
return json($result);
|
|
return json($result);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//关联订单品名
|
|
//关联订单品名
|
|
|
- public function order_product(){
|
|
|
|
|
- $params = input('product');
|
|
|
|
|
- if ($params){
|
|
|
|
|
- $customer = Db::name('order')->where('product','like','%'.$params.'%')->select();
|
|
|
|
|
- }else{
|
|
|
|
|
- $customer = Db::name('order')->where('product','neq','')->field('id,product')->limit(20)->select();
|
|
|
|
|
- }
|
|
|
|
|
- $total = count($customer);
|
|
|
|
|
- $result = ['total'=>$total,'rows'=>$customer];
|
|
|
|
|
- return json($result);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// public function order_product(){
|
|
|
|
|
+// $params = input('product');
|
|
|
|
|
+// if ($params){
|
|
|
|
|
+// $customer = Db::name('order')->where('product','like','%'.$params.'%')->select();
|
|
|
|
|
+// }else{
|
|
|
|
|
+// $customer = Db::name('order')->where('product','neq','')->field('id,product')->limit(20)->select();
|
|
|
|
|
+// }
|
|
|
|
|
+// $total = count($customer);
|
|
|
|
|
+// $result = ['total'=>$total,'rows'=>$customer];
|
|
|
|
|
+// return json($result);
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
}
|
|
}
|