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

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

@@ -544,7 +544,7 @@ class After extends Base
                     //库存品不允许供应商审核,只允许走2-11-4-12-5流程
                     break;
                 case 9:
-                    if ((($info['is_receive'] == 1) && (in_array($param['status'], [2, 4]) == false) || (($info['is_receive'] == 0) && (in_array($param['status'], [2, 5]) == false)))) throw new Exception('选项错误');
+                    if (in_array($param['status'], [2, 4]) == false) throw new Exception('选项错误');
                     if ($param['status'] == 2 && $param['remark'] == '') throw new Exception('remark不能为空');
                     if ($param['status'] == 4) {
                     	$info['return_tag'] = 1;
@@ -556,12 +556,11 @@ class After extends Base
                     break;
                 case 2:
 
-                    if ((($info['is_receive'] == 1) && (in_array($param['status'], [10, 11]) == false) || (($info['is_receive'] == 0) && (in_array($param['status'], [10, 5]) == false)))) throw new Exception('选项错误');
-                    if ($info['order_type'] == 1 && $param['status'] != 11) throw new Exception('选项错误');//库存品不允许供应商审核,只允许走2-11-4-12-5流程
-
+                    if ((($info['order_type'] == 1) && (in_array($param['status'], [10, 11]) == false)
+                    || (($info['order_type'] != 1) && (in_array($param['status'], [10,4]) == false)))) throw new Exception('选项错误');
                     break;
                 case 10:
-                    if ((($info['is_receive'] == 1) && (in_array($param['status'], [2, 4]) == false) || (($info['is_receive'] == 0) && (in_array($param['status'], [2, 5]) == false)))) throw new Exception('选项错误');
+                    if (in_array($param['status'], [2, 4]) == false) throw new Exception('选项错误');
                     if ($param['status'] == 2 && $param['remark'] == '') throw new Exception('remark不能为空');
 
                     if ($param['status'] == 4) {