|
@@ -136,10 +136,8 @@ class Orderback extends \app\BaseController
|
|
|
if($receive===""){
|
|
|
return error_show(1004,"参数receive不能为空");
|
|
|
}
|
|
|
- $errorlist = isset($this->post['errorlist']) && $this->post['errorlist']!=="" ? $this->post['errorlist']:"";
|
|
|
- if($errorlist===""){
|
|
|
- return error_show(1004,"参数errorlist不能为空");
|
|
|
- }
|
|
|
+ $errorlist = isset($this->post['errorlist']) && $this->post['errorlist']!=="" ? $this->post['errorlist']:[];
|
|
|
+
|
|
|
$remark = isset($this->post['remark']) && $this->post['remark']!=="" ? trim($this->post['remark']):"";
|
|
|
$info['received_num'] = $receive;
|
|
|
$info['normal_num'] = $normal;
|
|
@@ -150,6 +148,10 @@ class Orderback extends \app\BaseController
|
|
|
try{
|
|
|
$up=Db::name("order_back")->save($info);
|
|
|
if($up){
|
|
|
+ if(empty($errorlist)){
|
|
|
+ Db::commit();
|
|
|
+ return app_show(0,'更新成功');
|
|
|
+ }
|
|
|
$temp =[];
|
|
|
foreach($errorlist as $value){
|
|
|
$data=[];
|
|
@@ -184,10 +186,7 @@ class Orderback extends \app\BaseController
|
|
|
if(empty($info)){
|
|
|
return error_show(1004,"未找到数据");
|
|
|
}
|
|
|
- $errorlist = isset($this->post['errorlist']) && $this->post['errorlist']!=="" ? $this->post['errorlist']:"";
|
|
|
- if($errorlist===""){
|
|
|
- return error_show(1004,"参数errorlist不能为空");
|
|
|
- }
|
|
|
+ $errorlist = isset($this->post['errorlist']) && $this->post['errorlist']!=="" ? $this->post['errorlist']:[];
|
|
|
$status = isset($this->post['status']) && $this->post['status']!=="" ? intval($this->post['status']):"";
|
|
|
if($status===""){
|
|
|
return error_show(1004,"参数status不能为空");
|
|
@@ -198,6 +197,10 @@ class Orderback extends \app\BaseController
|
|
|
$info['updatetime'] = date("Y-m-d H:i:s");
|
|
|
$up=Db::name("order_back")->save($info);
|
|
|
if($up){
|
|
|
+ if(empty($errorlist)){
|
|
|
+ Db::commit();
|
|
|
+ return app_show(0,'更新成功');
|
|
|
+ }
|
|
|
// $temp =[];
|
|
|
foreach($errorlist as $value){
|
|
|
$temp=Db::name("order_backinfo")->where(['id'=>$value["id"],"is_del"=>0,"thNo"=>$thNo])->find();
|