cqp 1 vecka sedan
förälder
incheckning
3cd644f73d
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      app/Service/ImportService.php

+ 5 - 1
app/Service/ImportService.php

@@ -1276,20 +1276,24 @@ class ImportService extends Service
 
             // 其他费用
             $is_other_text = $value[$isOtherIdx] ?? '';
+            $is_o_v = 0;
             if (!isset($is_other_map[$is_other_text])) {
                 $errors[] = "第{$displayLine}行:是否其他费用[{$is_other_text}]无效";
             } else {
                 $array[$rowIndex][$isOtherIdx] = $is_other_map[$is_other_text];
+                $is_o_v = $is_other_map[$is_other_text];
             }
 
             $is_direct_text = $value[$isDirectIdx] ?? '';
+            $is_d_v = 0;
             if (!isset($is_direct_map[$is_direct_text])) {
                 $errors[] = "第{$displayLine}行:是否直接投入费用[{$is_direct_text}]无效";
             } else {
                 $array[$rowIndex][$isDirectIdx] = $is_direct_map[$is_direct_text];
+                $is_d_v = $is_direct_map[$is_direct_text];
             }
 
-            if($is_other_text && $is_direct_text) $errors[] = "第{$displayLine}行:是否其他费用与是否直接投入费用不能同时开启";
+            if($is_o_v && $is_d_v) $errors[] = "第{$displayLine}行:是否其他费用与是否直接投入费用不能同时开启";
 
             $sort_v = trim($value[$sortIdx] ?? 0);
             if(! is_numeric($sort_v))  $errors[] = "第{$displayLine}行:排序请填写数字";