Pārlūkot izejas kodu

调整瑞恒运行记录填报注气量判断

Zimo 2 dienas atpakaļ
vecāks
revīzija
103f7b083b
1 mainītis faili ar 16 papildinājumiem un 2 dzēšanām
  1. 16 2
      pages/recordFilling/detail.vue

+ 16 - 2
pages/recordFilling/detail.vue

@@ -1461,10 +1461,24 @@ const onSubmit = async () => {
         taskId.value &&
         !noGasTasks.value.includes(taskId.value)
       ) {
+        // if (dailyInjectGasTime.fillContent > 0) {
+        //   if (nonSumItem.fillContent <= 0) {
+        //     uni.showToast({
+        //       title: "当日运转时间大于0,注气量也需要大于0",
+        //       icon: "none",
+        //     });
+        //     return;
+        //   }
+        // }
         if (dailyInjectGasTime.fillContent > 0) {
-          if (nonSumItem.fillContent <= 0) {
+          const hasDailyGasInjection =
+            nonSumItem.fillContent !== undefined &&
+            nonSumItem.fillContent !== null &&
+            nonSumItem.fillContent !== "";
+
+          if (!hasDailyGasInjection) {
             uni.showToast({
-              title: "当日运转时间大于0,注气量也需要大于0",
+              title: "当日运转时间大于0,需要填写当日注气量",
               icon: "none",
             });
             return;