Prechádzať zdrojové kódy

fix:瑞恒运行记录填报注气量修复判断条件错误

Zimo 3 týždňov pred
rodič
commit
f6164cfd29
1 zmenil súbory, kde vykonal 13 pridanie a 7 odobranie
  1. 13 7
      pages/recordFilling/detail.vue

+ 13 - 7
pages/recordFilling/detail.vue

@@ -1441,6 +1441,11 @@ const onSubmit = async () => {
 
     const otherNptTime = nonSumList.find((i) => i.name === "其他非生产时间H");
     const runtimeItem = nonSumList.find((i) => i.name === "当日运转时间H");
+
+    const dailyInjectGasTime = nonSumList.find(
+      (i) => i.description === "dailyInjectGasTime"
+    );
+
     const isRuntime24 =
       runtimeItem &&
       (runtimeItem.fillContent == 24 || runtimeItem.fillContent == "24");
@@ -1450,13 +1455,14 @@ const onSubmit = async () => {
         nonSumItem.description === "dailyGasInjection" &&
         deptName.value === "rh"
       ) {
-        if (runtimeItem.fillContent > 0 && nonSumItem.fillContent > 0) {
-        } else {
-          uni.showToast({
-            title: "当日运转时间大于0,注气量也需要大于0",
-            icon: "none",
-          });
-          return;
+        if (dailyInjectGasTime.fillContent > 0) {
+          if (nonSumItem.fillContent <= 0) {
+            uni.showToast({
+              title: "当日运转时间大于0,注气量也需要大于0",
+              icon: "none",
+            });
+            return;
+          }
         }
       }