Browse Source

轮胎保胎号校验

liyuan 2 days ago
parent
commit
12736d4a45
1 changed files with 8 additions and 0 deletions
  1. 8 0
      pages/home/insurance/details.vue

+ 8 - 0
pages/home/insurance/details.vue

@@ -783,6 +783,7 @@
 				if (!this.carNoVerify(this.form.vehicleNumber)) {
 					return
 				}
+        let tyreNoList = []
 				for (let item of this.form.tireInsuranceFilesList) {
           if (!item.tyreNo) {
             return uni.showToast({
@@ -796,6 +797,12 @@
               icon: 'none'
             });
           }
+          if (tyreNoList.indexOf(item.tyreNo) !== -1) {
+            return uni.showToast({
+              title: `轮胎${item.affiliatedWithGroup }的胎号重复,请检查轮胎${item.affiliatedWithGroup }的胎号是否正确`,
+              icon: 'none'
+            });
+          }
 					if (item.fileUrl == null) {
 						return uni.showToast({
 							title: `请上传轮胎${item.affiliatedWithGroup }的${+ item.fileProperties == 1 ?
@@ -803,6 +810,7 @@
 							icon: 'none'
 						});
 					}
+          tyreNoList.push(item.tyreNo);
 				}
 				let obj = {
 					...this.form,