Parcourir la source

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

Zimo il y a 2 jours
Parent
commit
103f7b083b
1 fichiers modifiés avec 16 ajouts et 2 suppressions
  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;