|
@@ -445,18 +445,14 @@ class Resign extends Base
|
|
|
if($status===""){
|
|
|
return error_show(1001,'status不能为空');
|
|
|
}
|
|
|
+ if($status==3 && $info['status']==2)return error_show(1001,'备库单已完成无法取消');
|
|
|
$temp = $info['status'];
|
|
|
$info['status']= $status;
|
|
|
$info['updatetime']=date("Y-m-d H:i:s");
|
|
|
$up = Db::name("purchease")->update($info);
|
|
|
if($up){
|
|
|
-
|
|
|
- if($status==1){
|
|
|
- $order = ["order_type" => 'BHD', "order_code" => $info['bk_code'], "order_id" => $info['id'], "order_status" => $status, "before_status" => $temp,'wait_id' => $holder_id, 'wait_name' => $holder_name];
|
|
|
- }else $order = ["order_type" => 'BHD', "order_code" => $info['bk_code'], "order_id" => $info['id'], "order_status" => $status, "before_status" => $temp, 'holder_id' => $info['apply_id']];
|
|
|
$order = ["order_type" => 'BHD', "order_code" => $info['bk_code'], "order_id" => $info['id'], "order_status" => $status, "before_status" => $temp, 'holder_id' => $info['apply_id']];
|
|
|
ProcessOrder::AddProcess($this->post['token'],$order);
|
|
|
-
|
|
|
$ste = ["order_code"=>$info['bk_code'],"status"=> $temp,"action_remark"=>'',"action_type"=>"status"];
|
|
|
ActionLog::logAdd($this->post['token'],$ste,"BHD",$status,$info);
|
|
|
return app_show(0,"更新成功",['bk_code'=>$info['bk_code']]);
|
|
@@ -867,6 +863,9 @@ class Resign extends Base
|
|
|
if($info==false){
|
|
|
return error_show(1002,'未找到备库数据');
|
|
|
}
|
|
|
+ if($info['status']!=1){
|
|
|
+ return error_show(1002,'备库数据状态有误');
|
|
|
+ }
|
|
|
$wsm_code =isset($this->post['wsm_code'])&&$this->post['wsm_code']!=="" ? trim($this->post['wsm_code']):'';
|
|
|
if($wsm_code==""){
|
|
|
return error_show(1002,'备库仓库不能为空');
|