Browse Source

'销售退货单流程'针对'2待专员审核'节点,将待办数据推给供应商负责人

wufeng 2 years ago
parent
commit
58a78f6626
1 changed files with 8 additions and 3 deletions
  1. 8 3
      app/admin/controller/Reorder.php

+ 8 - 3
app/admin/controller/Reorder.php

@@ -654,10 +654,15 @@ class Reorder extends Base
             $info["updatetime"]=date("Y-m-d H:i:s");
             $up = Db::name("sale_return")->save($info);
             if($up) {
-                $process = ["order_code" => $code, "order_id" => $info['id'], "order_status" => $status,  "order_type"=>"XSTHD",'before_status'=>$temp,'holder_id'=>$info['apply_id']];
-                ProcessOrder::AddProcess($this->post['token'], $process);
+
+                //如果是节点2(待专员审核),要将待办数据推给供应商负责人
+                if ($info['status'] == 2) $process = ["order_code" => $code, "order_id" => $info['id'], "order_status" => $status, "order_type" => "XSTHD", 'before_status' => $temp, 'wait_id' => $info['person_id'], 'wait_name' => $info['person']];
+                else $process = ["order_code" => $code, "order_id" => $info['id'], "order_status" => $status, "order_type" => "XSTHD", 'before_status' => $temp, 'holder_id' => $info['apply_id']];
+
+                ProcessOrder::AddProcess(['id' => $this->uid, 'nickname' => $this->uname], $process);
+
                 $ste = ["order_code" => $code, "status" => $temp, "action_remark" => '', "action_type" => "status"];
-                ActionLog::logAdd($this->post['token'], $ste,  "XSTHD", $status, $info);
+                ActionLog::logAdd(['id' => $this->uid, 'nickname' => $this->uname], $ste, "XSTHD", $status, $info);
                 if ($status == 4) {
                     if ($info['is_addr'] == 1) {
                         if (isset($addr) && !empty($addr)) {