guo 3 lat temu
rodzic
commit
e75658e65d

+ 44 - 33
operatingCompany/pages/entryReport/entryReport.vue

@@ -246,55 +246,58 @@
 				})
 			},
 			goEntered(item) {
-	            console.log(item)
-				if(item.State){
-					if(item.maxTime<30){
-						var that=this;
+				console.log(item)
+				if (item.State) {
+					if (item.maxTime < 30) {
+						var that = this;
 						console.log(item.maxTime)
-						if(item.maxTime == null||item.maxTime===''){
+						if (item.maxTime == null || item.maxTime === '') {
 							that.$store.commit('mutationsCategoryList', '');
 							that.$store.commit('mutationssuggestList', '')
 							uni.navigateTo({
-								url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName + '&Contactor=' + item.Contactor
+								url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName +
+									'&Contactor=' + item.Contactor
 							})
-						}else{
-						uni.showModal({
-						    title: '提示',
-						    content: '距上次提交报告:'+item.maxTime+'天,是否继续录入?',
-						    success: function (res) {
-						        if (res.confirm) {
-						          that.$store.commit('mutationsCategoryList', '');
-						          that.$store.commit('mutationssuggestList', '')
-						          uni.navigateTo({
-						          	url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName + '&Contactor=' + item.Contactor
-						          })
-													 
-						        } else if (res.cancel) {
-						            console.log('用户点击取消');
-						        }
-						    }
-						});	
+						} else {
+							uni.showModal({
+								title: '提示',
+								content: '距上次提交报告:' + item.maxTime + '天,是否继续录入?',
+								success: function(res) {
+									if (res.confirm) {
+										that.$store.commit('mutationsCategoryList', '');
+										that.$store.commit('mutationssuggestList', '')
+										uni.navigateTo({
+											url: 'entered?shopId=' + item.shopId + '&ShopName=' + item
+												.ShopName + '&Contactor=' + item.Contactor
+										})
+
+									} else if (res.cancel) {
+										console.log('用户点击取消');
+									}
+								}
+							});
 						}
-						
-						
-						
-					}else{
+
+
+
+					} else {
 						this.$store.commit('mutationsCategoryList', '');
 						this.$store.commit('mutationssuggestList', '')
 						uni.navigateTo({
-							url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName + '&Contactor=' + item.Contactor
+							url: 'entered?shopId=' + item.shopId + '&ShopName=' + item.ShopName + '&Contactor=' +
+								item.Contactor
 						})
 					}
-				}else{
+				} else {
 					uni.showToast({
 						title: '未查询到检测套餐信息',
 						icon: 'none',
 						duration: 2000,
 					});
 				}
-		
-				
-				
+
+
+
 			},
 			search(val) {
 				// console.log(val);
@@ -313,7 +316,15 @@
 
 			},
 			goAddress(v) {
-                console.log(v)
+				console.log(v)
+				if (!v.lat) {
+					uni.showToast({
+							title: '该门店未设置定位',
+							icon: 'none',
+							duration: 2000,
+						});
+						return
+				}
 				uni.openLocation({
 					latitude: Number(v.lat),
 					longitude: Number(v.lng),

+ 1 - 0
operatingCompany/pages/reportManage/reportDetail.vue

@@ -378,6 +378,7 @@
 					return false;
 				}
 				uni.openLocation({
+					
 					latitude:Number(that.info.shopInfo.lat),
 					longitude:Number(that.info.shopInfo.lng),
 					name:that.info.shopInfo.shopName,

+ 9 - 1
operatingCompany/pages/team/manageStore.vue

@@ -129,7 +129,15 @@
 				})
 			},
 
-			goAddress(v) {
+			goAddress(v) {
+				if (!v.lat) {
+					uni.showToast({
+							title: '该门店未设置定位',
+							icon: 'none',
+							duration: 2000,
+						});
+						return
+				}
 				uni.openLocation({
 					latitude: Number(v.lat),
 					longitude: Number(v.lng),

+ 10 - 2
operatingCompany/pages/teamStore/teamStore.vue

@@ -181,8 +181,16 @@
 					url:'../entryReport/historyReport?shopId=' + item.shopId
 				})
 			},
-			goAddress(v) {
-
+			goAddress(v) {
+				console.log(v);
+				if (!v.lat) {
+					uni.showToast({
+							title: '该门店未设置定位',
+							icon: 'none',
+							duration: 2000,
+						});
+						return
+				}
 				uni.openLocation({
 					latitude: Number(v.lat),
 					longitude: Number(v.lng),