|
@@ -713,7 +713,9 @@ class Resign extends Base
|
|
|
];
|
|
|
$in= Db::name("purchease_order")->insert($data,true);
|
|
|
if($in>0){
|
|
|
- $order=["order_type"=>'CGD',"order_code"=>$data['cgdNo'],"order_id"=>$in, "order_status"=>$data['status'],"before_status"=>0];
|
|
|
+ //当采购单是节点0待与供应商确认,推给供应商负责人
|
|
|
+ if(!isset($supplier)) $supplier = Db::name("supplier")->where(["code"=>$purse['supplier']])->find();
|
|
|
+ $order=["order_type"=>'CGD',"order_code"=>$data['cgdNo'],"order_id"=>$in, "order_status"=>$data['status'],"before_status"=>0,'wait_id'=>$supplier['personid'],'wait_name'=>$supplier['person']];
|
|
|
ProcessOrder::AddProcess($this->post['token'],$order);
|
|
|
$ste = ["order_code"=>$inw,"status"=>$data['status'],"action_remark"=>'',"action_type"=>"create"];
|
|
|
ActionLog::logAdd($this->post['token'],$ste,"CGD",$data['status'],$data);
|
|
@@ -941,7 +943,7 @@ class Resign extends Base
|
|
|
$order = ["order_code" => $cgdCode, "status" => 0, "action_remark" => '', "action_type" => "create"];
|
|
|
GoodLog::LogAdd($this->post['token'], $good_data, 'CGD');
|
|
|
ActionLog::logAdd($this->post['token'], $order, "CGD", 0, $good);
|
|
|
- $process = ["order_code" => $cgdCode, "order_id" => $up, "order_status" => $cg['status'], "order_type" => 'CGD',"before_status"=>0,'holder_id'=>Db::name('supplier')->where(['code' => $cg['supplierNo'], 'is_del' => 0])->value('personid', 0)];
|
|
|
+ $process = ["order_code" => $cgdCode, "order_id" => $up, "order_status" => $cg['status'], "order_type" => 'CGD',"before_status"=>0,'holder_id'=>$supplier['personid'],'wait_id'=>$supplier['personid'],'wait_name'=>$supplier['person']];
|
|
|
ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
$info['wsm_code'] = $wsm_code;
|
|
|
$old_info_status = $info['status'];
|