wugg 1 year ago
parent
commit
6babd422f0
1 changed files with 4 additions and 5 deletions
  1. 4 5
      app/admin/controller/After.php

+ 4 - 5
app/admin/controller/After.php

@@ -552,6 +552,8 @@ class After extends Base
                         if ($param['mobile'] == '') throw new Exception('联系电话不能为空');
                         if ($param['addr_code'] == '') throw new Exception('省市区编码不能为空');
                         if ($param['addr'] == '') throw new Exception('退货地址不能为空');
+                    }else{
+                    	$info['return_tag'] = 2;
                     }
                     break;
                 case 2:
@@ -569,6 +571,8 @@ class After extends Base
                         if ($param['mobile'] == '') throw new Exception('联系电话不能为空');
                         if ($param['addr_code'] == '') throw new Exception('省市区编码不能为空');
                         if ($param['addr'] == '') throw new Exception('退货地址不能为空');
+                    }else{
+                    	$info['return_tag'] = 2;
                     }
                     break;
             }
@@ -599,13 +603,10 @@ class After extends Base
 
                 //判断 退回供应商 or 退回业务公司
                 if ($info['status'] == 2 && $param['status'] == 11) {
-                    $info['return_tag'] = 2;
                     //退入次品仓,维护
                     $wsm = Db::name('warehouse_info')->where(['is_del' => 0, 'wsm_code' => $param['wsm_code']])->findOrEmpty();
                     if (empty($wsm)) throw new Exception('返回仓库不存在');
                     if ($wsm['wsm_type'] != 4) throw new Exception('不是次品仓');
-
-//                    if ($wsm['wsm_type'] == 4) {
                     Db::name('order_returninfo')->insert([
                         'returnCode' => $param['returnCode'],
                         'return_wsm' => $param['wsm_code'],
@@ -619,7 +620,6 @@ class After extends Base
                         'gys_remark' => '',
                         'addtime' => $date,
                     ]);
-//                    }
 
                 }
 
@@ -628,7 +628,6 @@ class After extends Base
                 $var = $info['status'];
                 $info['status'] = $param['status'];
                 $info['updatetime'] = $date;
-
                 $up = Db::name("order_return")->save($info);
                 if ($up) {