|
@@ -136,6 +136,8 @@ class Purchin extends BaseController
|
|
|
$data['wsm_addr'].=isset($wsmcode['wsm_addr']) ? $wsmcode['wsm_addr']:"";
|
|
|
$check = Db::name("purchease_info")->where(['wsm_in_code'=>$incode,"is_del"=>0])->select();
|
|
|
$info['checkinfo']= $check;
|
|
|
+ $return = Db::name("purchease_return")->where(['wsm_in_code'=>$incode,"is_del"=>0])->find();
|
|
|
+ $info['return']= $return;
|
|
|
return app_show(0,'获取成功',$info);
|
|
|
}
|
|
|
|
|
@@ -309,7 +311,7 @@ class Purchin extends BaseController
|
|
|
}else{
|
|
|
$order = ["order_code"=>$good['good_type_code'],"status"=>1,"action_remark"=>'', "action_type"=>"edit"];
|
|
|
}
|
|
|
- $good['usable_stock']+=$info['send_num'];
|
|
|
+ $good['usable_stock']+=$info['wsm_num'];
|
|
|
$good['total_stock']=$good['usable_stock']+$good['wait_out_stock'];
|
|
|
$good['updatetime'] = date("Y-m-d H:i:s");
|
|
|
$upd= Db::name("good_stock")->save($good);
|
|
@@ -369,8 +371,6 @@ class Purchin extends BaseController
|
|
|
return error_show(1004,"参数mobile 不为空");
|
|
|
}
|
|
|
$error_remark = isset($this->post['error_remark']) &&$this->post['error_remark']!=="" ? trim($this->post['error_remark']):"" ;
|
|
|
- $post_code = isset($this->post['post_code']) &&$this->post['post_code']!=="" ? trim($this->post['post_code']):"" ;
|
|
|
- $post_company = isset($this->post['post_company']) &&$this->post['post_company']!=="" ? trim($this->post['post_company']):"" ;
|
|
|
$remark = isset($this->post['remark']) &&$this->post['remark']!=="" ? trim($this->post['remark']):"" ;
|
|
|
$result = GetUserInfo($this->post['token']);
|
|
|
if((!empty($result) && $result['code']!=0) ||empty($result) ){
|
|
@@ -380,7 +380,7 @@ class Purchin extends BaseController
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
|
|
|
- $info['status'] = 3;
|
|
|
+ $info['status'] =3;
|
|
|
$info['updatetime'] = date("Y-m-d H:i:s");
|
|
|
$up= Db::name("purchease_in")->save($info);
|
|
|
if($up){
|
|
@@ -393,8 +393,8 @@ class Purchin extends BaseController
|
|
|
"return_addr"=>$addr,
|
|
|
"return_mobile"=>$mobile,
|
|
|
"error_remark"=>$error_remark,
|
|
|
- "post_code"=>$post_code,
|
|
|
- "post_company"=>$post_company,
|
|
|
+ "post_code"=>"",
|
|
|
+ "post_company"=>"",
|
|
|
"remark"=>$remark ,
|
|
|
"apply_id"=>$userinfo['id'],
|
|
|
"apply_name"=>$userinfo['nickname'],
|