Browse Source

修改校验

Qukatie 1 week ago
parent
commit
6f646a6123
1 changed files with 20 additions and 11 deletions
  1. 20 11
      src/views/claimSettlement/detailsPage.vue

+ 20 - 11
src/views/claimSettlement/detailsPage.vue

@@ -148,13 +148,6 @@ export default {
           {
             label: "车牌号",
             prop: "vehicleNumber",
-            rules: [
-              {
-                required: true,
-                message: " ",
-                trigger: "blur",
-              },
-            ],
           },
           {
             label: "规格型号",
@@ -423,18 +416,26 @@ export default {
             if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.consumerPhone)) {
               return this.$message.error("请输入正确电话");
             }
+            if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length == 0) {
+              return this.$message.error("请上传鼓包并向照片");
+            }
             if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length > 1) {
               return this.$message.error("只能上传一张鼓包并向照片");
             }
-            
             if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 2).length == 0) {
               return this.$message.error("请上传轮胎DOT");
             }
             if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 2).length > 1) {
               return this.$message.error("只能上传一张轮胎DOT");
             }
+            if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length == 0) {
+              return this.$message.error("请上传车头照片");
+            }
             if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length > 1) {
-              return this.$message.error("只能上传一张花纹深度");
+              return this.$message.error("只能上传一张车头照片");
+            }
+            if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length == 0) {
+              return this.$message.error("请上传鼓包处照片");
             }
             if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length > 1) {
               return this.$message.error("只能上传一张鼓包处照片");
@@ -485,6 +486,9 @@ export default {
           if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.consumerPhone)) {
             return this.$message.error("请输入正确电话");
           }
+          if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length == 0) {
+            return this.$message.error("请上传鼓包并向照片");
+          }
           if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length > 1) {
             return this.$message.error("只能上传一张鼓包并向照片");
           }
@@ -494,13 +498,18 @@ export default {
           if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 2).length > 1) {
             return this.$message.error("只能上传一张轮胎DOT");
           }
+          if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length == 0) {
+            return this.$message.error("请上传车头照片");
+          }
           if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length > 1) {
-            return this.$message.error("只能上传一张花纹深度");
+            return this.$message.error("只能上传一张车头照片");
+          }
+          if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length == 0) {
+            return this.$message.error("请上传鼓包处照片");
           }
           if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length > 1) {
             return this.$message.error("只能上传一张鼓包处照片");
           }
-
           const loading = this.$loading({
             lock: true,
             text: "加载中",