ysy 2 ani în urmă
părinte
comite
c5d7ddc114
1 a modificat fișierele cu 17 adăugiri și 14 ștergeri
  1. 17 14
      pages/pda/feeding/details.vue

+ 17 - 14
pages/pda/feeding/details.vue

@@ -141,23 +141,26 @@
 
 			save() {
 
-				this.List.every(m => {
+				let bol
+				this.List.forEach(e => {
+					if (e.aridRegionList && e.aridRegionList.length > 0) {
+						bol = e.aridRegionList.every(v => v.occupationTime)
+					} else {
+						bol = true
+					}
+				})
 
+				if (!bol) {
+					uni.showToast({
+						title: '请输入干燥时间',
+						icon: 'none'
+					})
+					return false
+				}
 
-				})
 
-				// if(this.objData.aridRegionList.length > 0) {
-				// 			if(!this.objData.aridRegionList[0].occupationTime) {
-				// 				uni.showToast({
-				// 					title: '请输入干燥时间',
-				// 					icon: 'none'
-				// 				})
-				// 				return false
-				// 			}
-				// 		}
-
-				console.log(_arr)
-				return false
+
+			
 				batchSave(this.List).then(res => {
 
 					uni.navigateTo({