Zimo 3 дней назад
Родитель
Сommit
fae1624dd1
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      pages/ruiDu/compontents/report-form.vue

+ 7 - 1
pages/ruiDu/compontents/report-form.vue

@@ -211,7 +211,13 @@ const handleInputRaw = (val, id, field) => {
 const onInputChange = debounce(handleInputRaw, 500);
 
 const validate = async () => {
-  return await reportFormRef.value.validate();
+  if (istime.value === "true") {
+    return await reportFormRef.value.validateField([
+      "constructionBrief",
+      ...NON_PROD_FIELDS.map(item => item.key),
+      "otherNptReason",
+    ]);
+  } else return await reportFormRef.value.validate();
 };
 
 const submitForm = async () => {