|
@@ -306,10 +306,10 @@ class Activity extends Base
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $stn = ["order_code"=>$activity_code,"status"=>0,"action_remark"=>'',"action_type"=>"create"];
|
|
|
- ActionLog::logAdd($this->post['token'],$stn,"HD",$data['status'],$data);
|
|
|
- $process=["order_code"=>$activity_code,"order_id"=>$inset,"order_status"=>$data['status'],"order_type"=>'HD',"before_status"=>0];
|
|
|
- ProcessOrder::AddProcess($this->post['token'],$process);
|
|
|
+ $stn = ["order_code" => $activity_code, "status" => 0, "action_remark" => '', "action_type" => "create"];
|
|
|
+ ActionLog::logAdd($this->post['token'], $stn, "HD", $data['status'], $data);
|
|
|
+ $process = ["order_code" => $activity_code, "order_id" => $inset, "order_status" => $data['status'], "order_type" => 'HD', "before_status" => 0];
|
|
|
+ ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
|
|
|
Db::commit();
|
|
|
return app_show(0,"新建成功");
|
|
@@ -321,6 +321,7 @@ class Activity extends Base
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //采购定价
|
|
|
public function cost(){
|
|
|
$good_list= isset($this->post['good_list'])&&!empty($this->post['good_list']) ?$this->post['good_list']:"";
|
|
|
if($good_list==""){
|
|
@@ -351,10 +352,17 @@ class Activity extends Base
|
|
|
return error_show(1004,"商品数据更新失败");
|
|
|
}
|
|
|
}
|
|
|
+ $old_activity_status = $activity['status'];
|
|
|
$activity['status']=2;
|
|
|
$activity['updatetime']=date("Y-m-d H:i:s");
|
|
|
$act = Db::name("good_activity")->save($activity);
|
|
|
if($act){
|
|
|
+
|
|
|
+ $stn = ["order_code" => $activity_code, "status" => $old_activity_status, "action_remark" => '', "action_type" => "status"];
|
|
|
+ ActionLog::logAdd($this->post['token'], $stn, "HD", $activity['status'], $activity);
|
|
|
+ $process = ["order_code" => $activity_code, "order_id" => $activity['id'], "order_status" => $activity['status'], "order_type" => 'HD', "before_status" => $old_activity_status];
|
|
|
+ ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
+
|
|
|
Db::commit();
|
|
|
return error_show(0,"商品数据更新成功");
|
|
|
}else{
|
|
@@ -367,6 +375,8 @@ class Activity extends Base
|
|
|
return error_show(1004,$e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //财务定价
|
|
|
public function activity(){
|
|
|
$good_list= isset($this->post['good_list'])&&!empty($this->post['good_list']) ?$this->post['good_list']:"";
|
|
|
if($good_list==""){
|
|
@@ -393,10 +403,17 @@ class Activity extends Base
|
|
|
return error_show(1004,"商品数据更新失败");
|
|
|
}
|
|
|
}
|
|
|
+ $old_activity_status = $activity['status'];
|
|
|
$activity['status']=3;
|
|
|
$activity['updatetime']=date("Y-m-d H:i:s");
|
|
|
$act = Db::name("good_activity")->save($activity);
|
|
|
if($act){
|
|
|
+
|
|
|
+ $stn = ["order_code" => $activity_code, "status" => $old_activity_status, "action_remark" => '', "action_type" => "status"];
|
|
|
+ ActionLog::logAdd($this->post['token'], $stn, "HD", $activity['status'], $activity);
|
|
|
+ $process = ["order_code" => $activity_code, "order_id" => $activity['id'], "order_status" => $activity['status'], "order_type" => 'HD', "before_status" => $old_activity_status];
|
|
|
+ ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
+
|
|
|
Db::commit();
|
|
|
return error_show(0,"商品数据更新成功");
|
|
|
}else{
|
|
@@ -410,6 +427,7 @@ class Activity extends Base
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //财务审核定价
|
|
|
public function exam(){
|
|
|
$good_list= isset($this->post['good_list'])&&!empty($this->post['good_list']) ?$this->post['good_list']:"";
|
|
|
if($good_list==""){
|
|
@@ -437,10 +455,17 @@ class Activity extends Base
|
|
|
return error_show(1004,"商品数据更新失败");
|
|
|
}
|
|
|
}
|
|
|
+ $old_activity_status = $activity['status'];
|
|
|
$activity['status']=4;
|
|
|
$activity['updatetime']=date("Y-m-d H:i:s");
|
|
|
$act = Db::name("good_activity")->save($activity);
|
|
|
if($act){
|
|
|
+
|
|
|
+ $stn = ["order_code" => $activity_code, "status" => $old_activity_status, "action_remark" => '', "action_type" => "status"];
|
|
|
+ ActionLog::logAdd($this->post['token'], $stn, "HD", $activity['status'], $activity);
|
|
|
+ $process = ["order_code" => $activity_code, "order_id" => $activity['id'], "order_status" => $activity['status'], "order_type" => 'HD', "before_status" => $old_activity_status];
|
|
|
+ ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
+
|
|
|
Db::commit();
|
|
|
return error_show(0,"商品数据审核成功");
|
|
|
}else{
|
|
@@ -454,6 +479,7 @@ class Activity extends Base
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //活动详情
|
|
|
public function info(){
|
|
|
$activity_code= isset($this->post['activity_code'])&&$this->post['activity_code']!=="" ?trim($this->post['activity_code']):"";
|
|
|
if($activity_code==""){
|
|
@@ -493,10 +519,10 @@ class Activity extends Base
|
|
|
$up = Db::name("good_activity")->save($activity);
|
|
|
if($up){
|
|
|
|
|
|
- $stn = ["order_code"=>$activity_code,"status"=>$old_status,"action_remark"=>'',"action_type"=>"status"];
|
|
|
- ActionLog::logAdd($this->post['token'],$stn,"HD",$activity['status'],$activity);
|
|
|
- $process=["order_code"=>$activity_code,"order_id"=>$activity['id'],"order_status"=>$activity['status'],"order_type"=>'HD',"before_status"=>$old_status];
|
|
|
- ProcessOrder::AddProcess($this->post['token'],$process);
|
|
|
+ $stn = ["order_code" => $activity_code, "status" => $old_status, "action_remark" => '', "action_type" => "status"];
|
|
|
+ ActionLog::logAdd($this->post['token'], $stn, "HD", $activity['status'], $activity);
|
|
|
+ $process = ["order_code" => $activity_code, "order_id" => $activity['id'], "order_status" => $activity['status'], "order_type" => 'HD', "before_status" => $old_status];
|
|
|
+ ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
|
|
|
return app_show(0,"修改成功");
|
|
|
}else{
|