|
@@ -32,6 +32,14 @@ class Purchin extends BaseController
|
|
if($apply_name!=""){
|
|
if($apply_name!=""){
|
|
$where[]=['a.apply_name','like',"%$apply_name%"];
|
|
$where[]=['a.apply_name','like',"%$apply_name%"];
|
|
}
|
|
}
|
|
|
|
+ $apply_id= isset($this->post['apply_id']) && $this->post['apply_id'] !==""? trim($this->post['apply_id']):"";
|
|
|
|
+ if($apply_id!=""){
|
|
|
|
+ $where[]=['a.apply_id','=',$apply_id];
|
|
|
|
+ }
|
|
|
|
+ $status= isset($this->post['status']) && $this->post['status'] !==""? trim($this->post['status']):"";
|
|
|
|
+ if($status!=""){
|
|
|
|
+ $where[]=['a.status','=',$status];
|
|
|
|
+ }
|
|
$start= isset($this->post['start']) && $this->post['start'] !== "" ? $this->post['start']:"";
|
|
$start= isset($this->post['start']) && $this->post['start'] !== "" ? $this->post['start']:"";
|
|
if ($start !="") {
|
|
if ($start !="") {
|
|
$where[]= ["a.sendtime",'>=',$start];
|
|
$where[]= ["a.sendtime",'>=',$start];
|
|
@@ -52,9 +60,9 @@ class Purchin extends BaseController
|
|
if($good_name !=""){
|
|
if($good_name !=""){
|
|
$where[]= ["b.good_name",'like',"%$good_name%"];
|
|
$where[]= ["b.good_name",'like',"%$good_name%"];
|
|
}
|
|
}
|
|
- $supplierNo=isset($this->post['supplierNo']) && $this->post['supplierNo']!==""? trim($this->post['supplierNo']):"";
|
|
|
|
- if($supplierNo !=""){
|
|
|
|
- $where[]= ["b.supplierNo",'like',"%$supplierNo%"];
|
|
|
|
|
|
+ $supplie=isset($this->post['supplier']) && $this->post['supplier']!==""? trim($this->post['supplier']):"";
|
|
|
|
+ if($supplie !=""){
|
|
|
|
+ $where[]= ["b.supplierNo",'like',"%$supplie%"];
|
|
}
|
|
}
|
|
$wsm_code=isset($this->post['wsm_code']) && $this->post['wsm_code']!==""? trim($this->post['wsm_code']):"";
|
|
$wsm_code=isset($this->post['wsm_code']) && $this->post['wsm_code']!==""? trim($this->post['wsm_code']):"";
|
|
if($wsm_code !=""){
|
|
if($wsm_code !=""){
|
|
@@ -77,7 +85,7 @@ class Purchin extends BaseController
|
|
$list = Db::name('purchease_in')->alias('a')->join("purchease_order b","b.cgdNo=a.cgdNo","left")
|
|
$list = Db::name('purchease_in')->alias('a')->join("purchease_order b","b.cgdNo=a.cgdNo","left")
|
|
->where($where)->page($page,$size)
|
|
->where($where)->page($page,$size)
|
|
->field("a.apply_name,a.sendtime,b.order_type,a.status,a.cgdNo,a.wsm_in_code,b.good_name,a.send_num,a.wsm_code,b.good_name,b.good_code,
|
|
->field("a.apply_name,a.sendtime,b.order_type,a.status,a.cgdNo,a.wsm_in_code,b.good_name,a.send_num,a.wsm_code,b.good_name,b.good_code,
|
|
- a.post_company,a.post_code,a.post_fee,a.apply_id,a.wsm_num,a.error_num,a.wait_num,a.status,a.check_name,a.checkid")
|
|
|
|
|
|
+ a.post_company,a.post_code,a.post_fee,a.apply_id,a.wsm_num,a.error_num,a.wait_num,a.status,a.check_name,a.checkid,b.bkcode")
|
|
->order("a.addtime desc")->select();
|
|
->order("a.addtime desc")->select();
|
|
$data=[];
|
|
$data=[];
|
|
foreach ($list as $value){
|
|
foreach ($list as $value){
|