|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
|
|
|
namespace app\admin\controller;
|
|
|
+use app\admin\model\ActionLog;
|
|
|
use think\App;
|
|
|
use think\facade\Db;
|
|
|
|
|
@@ -84,6 +85,8 @@ class After extends \app\BaseController
|
|
|
"updatetime"=>date("Y-m-d H:i:s")
|
|
|
];
|
|
|
$create = Db::name("order_return")->insert($in);
|
|
|
+ $orde = ["order_code"=>$returnCode,"status"=>$in['status'],"action_remark"=>'',"action_type"=>"create"];
|
|
|
+ ActionLog::logAdd($this->post['token'],$orde,'zxd',0,$orde);
|
|
|
if($create){
|
|
|
Db::commit();
|
|
|
return app_show(0,"售后申请单新建成功");
|
|
@@ -211,10 +214,13 @@ class After extends \app\BaseController
|
|
|
if($remark!=''){
|
|
|
$info['remark'] =$remark;
|
|
|
}
|
|
|
+ $var=$info['status'];
|
|
|
$info['status']=$status;
|
|
|
$info['updatetime']=date("Y-m-d H:i:s");
|
|
|
$up =Db::name("order_return")->save($info);
|
|
|
if($up){
|
|
|
+ $order = ["order_code"=>$info['returnCode'],"status"=>$var,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
+ ActionLog::logAdd($this->post['token'],$order,"zxd", $info['status'],$this->post);
|
|
|
return app_show(0,"更新成功");
|
|
|
}else{
|
|
|
return error_show(1004,"更新失败");
|
|
@@ -265,6 +271,7 @@ class After extends \app\BaseController
|
|
|
}
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
+ $var=$info['status'];
|
|
|
$info['status']=$info['order_type']==1?3:4;
|
|
|
$info['updatetime']=date("Y-m-d H:i:s");
|
|
|
$up =Db::name("order_return")->save($info);
|
|
@@ -289,6 +296,8 @@ class After extends \app\BaseController
|
|
|
}
|
|
|
$in=Db::name("order_returninfo")->save($returninfo);
|
|
|
if($in){
|
|
|
+ $order = ["order_code"=>$info['returnCode'],"status"=>$var,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
+ ActionLog::logAdd($this->post['token'],$order,$info['status'],$order);
|
|
|
Db::commit();
|
|
|
return app_show(0,"更新成功");
|
|
|
}
|
|
@@ -353,12 +362,14 @@ class After extends \app\BaseController
|
|
|
}
|
|
|
$return_info['post_fee'] = $fee;
|
|
|
Db::startTrans();
|
|
|
-
|
|
|
try{
|
|
|
+ $str=$info['status'];
|
|
|
$info['status']=$info['order_type']==1?4:5;
|
|
|
$info['updatetime']=date("Y-m-d H:i:s");
|
|
|
$up =Db::name("order_return")->save($info);
|
|
|
if($up){
|
|
|
+ $order = ["order_code"=>$info['orderCode'],"status"=>$str,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
+ ActionLog::logAdd($this->post['token'],$order,"zxd",$info['status'],$order);
|
|
|
$in=Db::name("order_returninfo")->save($return_info);
|
|
|
if($in){
|
|
|
$data=[
|
|
@@ -386,6 +397,8 @@ class After extends \app\BaseController
|
|
|
];
|
|
|
$back =Db::name("order_back")->insert($data);
|
|
|
if($back){
|
|
|
+ $order = ["order_code"=>$info['orderCode'],"status"=>$str,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
+ ActionLog::logAdd($this->post['token'],$order,"zxd", $info['status'],$order);
|
|
|
Db::commit();
|
|
|
return app_show(0,"更新成功");
|
|
|
}
|
|
@@ -437,6 +450,7 @@ class After extends \app\BaseController
|
|
|
}
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
+ $stat=$info['status'];
|
|
|
$info['status']=3;
|
|
|
$info['is_th']=$isth;
|
|
|
$info['updatetime']=date("Y-m-d H:i:s");
|
|
@@ -464,6 +478,8 @@ class After extends \app\BaseController
|
|
|
}
|
|
|
$in=Db::name("order_returninfo")->save($returninfo);
|
|
|
if($in){
|
|
|
+ $order = ["order_code"=>$info['orderCode'],"status"=>$stat,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
+ ActionLog::logAdd($this->post['token'],$order,"zxd",3,$order);
|
|
|
Db::commit();
|
|
|
return app_show(0,"更新成功");
|
|
|
}
|