|
@@ -228,8 +228,16 @@ class Orderback extends Base
|
|
|
if($up){
|
|
|
$stn = ["order_code"=>$info['thNo'],"status"=>$str,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
ActionLog::logAdd($this->post['token'],$stn,"CKTHD",$info['status'],$info);
|
|
|
- $process=["order_code"=>$info['thNo'],"order_id"=>$info['id'],"order_status"=>$info['status'],'order_type'=>"CKTHD","before_status"=>$str];
|
|
|
- ProcessOrder::AddProcess($this->post['token'],$process);
|
|
|
+
|
|
|
+ if($info['status'] == 2){
|
|
|
+ //特殊处理,写入到10采购负责人、31库管人员、41库管-张凯旋这三个角色下的所有人
|
|
|
+ $handle_user_list = Db::name('user_role')
|
|
|
+ ->where('is_del', 0)
|
|
|
+ ->whereIn('roleid', [10, 31, 41])
|
|
|
+ ->column('uid');
|
|
|
+ $process = ["order_code" => $info['thNo'], "order_id" => $info['id'], "order_status" => $info['status'], 'order_type' => "CKTHD", "before_status" => $str, 'handle_user_list' => implode(',', $handle_user_list)];
|
|
|
+ }else $process=["order_code"=>$info['thNo'],"order_id"=>$info['id'],"order_status"=>$info['status'],'order_type'=>"CKTHD","before_status"=>$str];
|
|
|
+ ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], $process);
|
|
|
if(empty($errorlist)){
|
|
|
Db::commit();
|
|
|
return app_show(0,'更新成功');
|
|
@@ -373,9 +381,17 @@ class Orderback extends Base
|
|
|
$up=Db::name("order_back")->save($info);
|
|
|
if($up){
|
|
|
$stn = ["order_code"=>$thNo,"status"=>$var,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
- ActionLog::logAdd($this->post['token'],$stn,"CKTHD",$info['status'],$this->post);
|
|
|
- $process=["order_code"=>$info['thNo'],"order_id"=>$info['id'],"order_status"=>$status,"order_type"=>"CKTHD","before_status"=>$var];
|
|
|
- ProcessOrder::AddProcess($this->post['token'],$process);
|
|
|
+ ActionLog::logAdd(['id'=>$this->uid,'nickname'=>$this->uname],$stn,"CKTHD",$info['status'],$this->post);
|
|
|
+
|
|
|
+ if ($status == 2) {
|
|
|
+ //特殊处理,写入到10采购负责人、31库管人员、41库管-张凯旋这三个角色下的所有人
|
|
|
+ $handle_user_list = Db::name('user_role')
|
|
|
+ ->where('is_del', 0)
|
|
|
+ ->whereIn('roleid', [10, 31, 41])
|
|
|
+ ->column('uid');
|
|
|
+ $process = ["order_code" => $info['thNo'], "order_id" => $info['id'], "order_status" => $status, "order_type" => "CKTHD", "before_status" => $var, 'handle_user_list' => implode(',',$handle_user_list)];
|
|
|
+ } else $process = ["order_code" => $info['thNo'], "order_id" => $info['id'], "order_status" => $status, "order_type" => "CKTHD", "before_status" => $var];
|
|
|
+ ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], $process);
|
|
|
Db::commit();
|
|
|
return app_show(0,'更新成功');
|
|
|
}
|
|
@@ -424,8 +440,7 @@ class Orderback extends Base
|
|
|
Db::rollback();
|
|
|
return error_show(1004,"未找到售后单数据");
|
|
|
}
|
|
|
- $sabebn =Db::name("sale_info")->where([["orderCode",'=',$info['orderCode']],["num",">",0]])->select()
|
|
|
- ->toArray();
|
|
|
+ $sabebn =Db::name("sale_info")->where([["orderCode",'=',$info['orderCode']],["num",">",0]])->select()->toArray();
|
|
|
if($param['can_sell_num']!=0&& $param['can_sell_wsm']!=''){
|
|
|
if($sale['is_stock']==1){ //库存品退回原仓库 备库单释放数量 采购单
|
|
|
$param['can_sell_wsm'] = $out['wsm_code'];
|
|
@@ -738,9 +753,18 @@ class Orderback extends Base
|
|
|
}
|
|
|
|
|
|
$stn = ["order_code" => $param['thNo'], "status" => $info['status'], "action_remark" => '', "action_type" => "edit"];
|
|
|
- ActionLog::logAdd($this->post['token'], $stn, "CKTHD", $param['status'], $stn);
|
|
|
- $process = ["order_code" => $param['thNo'], "order_id" => $info['id'], "order_status" => $param['status'], "order_type" =>"CKTHD","before_status"=>$info['status']];
|
|
|
- ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
+ ActionLog::logAdd(['id'=>$this->uid,'nickname'=>$this->uname], $stn, "CKTHD", $param['status'], $stn);
|
|
|
+
|
|
|
+
|
|
|
+ if ($param['status'] == 2) {
|
|
|
+ //特殊处理,写入到10采购负责人、31库管人员、41库管-张凯旋这三个角色下的所有人
|
|
|
+ $handle_user_list = Db::name('user_role')
|
|
|
+ ->where('is_del', 0)
|
|
|
+ ->whereIn('roleid', [10, 31, 41])
|
|
|
+ ->column('uid');
|
|
|
+ $process = ["order_code" => $param['thNo'], "order_id" => $info['id'], "order_status" => $param['status'], "order_type" =>"CKTHD","before_status"=>$info['status'],'handle_user_list'=>implode(',',$handle_user_list)];
|
|
|
+ }else $process = ["order_code" => $param['thNo'], "order_id" => $info['id'], "order_status" => $param['status'], "order_type" =>"CKTHD","before_status"=>$info['status']];
|
|
|
+ ProcessOrder::AddProcess(['id'=>$this->uid,'nickname'=>$this->uname], $process);
|
|
|
|
|
|
Db::commit();
|
|
|
return app_show(0, '操作成功');
|