王智慧 3 лет назад
Родитель
Сommit
9c21d9eb45
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      src/components/ShipInfo.vue

+ 14 - 0
src/components/ShipInfo.vue

@@ -439,6 +439,20 @@ async function submit() {
     });
     return;
   }
+  if (!props.shipInfos[currentIndex.value].contentShipOwnerName) {
+    ElMessage({
+      type: "warning",
+      message: "请填写联系人姓名",
+    });
+    return;
+  }
+  if (!props.shipInfos[currentIndex.value].contentShipOwnerPhone) {
+    ElMessage({
+      type: "warning",
+      message: "请填写联系人手机号",
+    });
+    return;
+  }
   isSubmitLoading.value = true;
   let res = await api.addShip({
     ...props.shipInfos[currentIndex.value],