lilei 4 gadi atpakaļ
vecāks
revīzija
aac84cc972

+ 7 - 6
pages/organization/organization.vue

@@ -126,9 +126,9 @@
 			//  选择门店
 			goPage(item){
 				//  校验是否有历史巡店记录
-				queryCurrentTaskUsing({ storeId: item.tenantId }).then(res => {
+				queryCurrentTaskUsing({ storeId: item.id }).then(res => {
 					if(res.status == 200){
-						if(res.data.state){  //  为true有历史巡店记录
+						if(res.data){  //  为true有历史巡店记录
 							clzConfirm({
 							    title: '提示',
 							    content: '有进行中的巡店任务,是否继续?',
@@ -136,20 +136,21 @@
 								cancelText: '重新开始',
 								buttons: ['继续巡店','重新开始'],
 							    success: function (result) {
+									console.log(result.index)
 							        if (result.confirm || result.index==0) {  //  继续巡店
 										uni.navigateTo({
-											url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&taskId='+ res.data.taskId + '&restart=0&types=video'
+											url: '/pages/shopTour/shopTour?storeId=' + item.id + '&taskId='+ res.data + '&restart=0&types=video'
 										})
-							        }else{  //  重新开始
+							        }else if(result.cancel || result.index==1){  //  重新开始
 										uni.navigateTo({
-											url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&taskId='+ res.data.taskId + '&restart=1&types=video'
+											url: '/pages/shopTour/shopTour?storeId=' + item.id + '&taskId='+ res.data + '&restart=1&types=video'
 										})
 							        }
 							    }
 							})
 						}else{
 							uni.navigateTo({
-								url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&types=video'
+								url: '/pages/shopTour/shopTour?storeId=' + item.id + '&types=video'
 							})
 						}
 					}else{

+ 7 - 6
pages/searchPage/searchPage.vue

@@ -66,9 +66,9 @@
 			//  选择门店
 			goPage(item){
 				//  校验是否有历史巡店记录
-				queryCurrentTaskUsing({ storeId: item.tenantId }).then(res => {
+				queryCurrentTaskUsing({ storeId: item.id }).then(res => {
 					if(res.status == 200){
-						if(res.data.state){  //  为true有历史巡店记录
+						if(res.data){  //  为true有历史巡店记录
 							clzConfirm({
 							    title: '提示',
 							    content: '有进行中的巡店任务,是否继续?',
@@ -76,20 +76,21 @@
 								cancelText: '重新开始',
 								buttons: ['继续巡店','重新开始'],
 							    success: function (result) {
+									console.log(result.index)
 							        if (result.confirm || result.index==0) {  //  继续巡店
 										uni.navigateTo({
-											url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&taskId='+ res.data.taskId + '&restart=0&types=video'
+											url: '/pages/shopTour/shopTour?storeId=' + item.id + '&taskId='+ res.data + '&restart=0&types=video'
 										})
-							        }else{  //  重新开始
+							        }else if(result.cancel || result.index==1){  //  重新开始
 										uni.navigateTo({
-											url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&taskId='+ res.data.taskId + '&restart=1&types=video'
+											url: '/pages/shopTour/shopTour?storeId=' + item.id + '&taskId='+ res.data + '&restart=1&types=video'
 										})
 							        }
 							    }
 							})
 						}else{
 							uni.navigateTo({
-								url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&types=video'
+								url: '/pages/shopTour/shopTour?storeId=' + item.id + '&types=video'
 							})
 						}
 					}else{

+ 6 - 5
pages/videoShopTour/videoShopTour.vue

@@ -77,9 +77,10 @@
 			//  开始巡店
 			goPage(item){
 				//  校验是否有历史巡店记录
-				queryCurrentTaskUsing({ storeId: item.tenantId }).then(res => {
+				queryCurrentTaskUsing({ storeId: item.id }).then(res => {
+					console.log(res,{ storeId: item.id },'---')
 					if(res.status == 200){
-						if(res.data.state){  //  为true有历史巡店记录
+						if(res.data){  //  为true有历史巡店记录
 							clzConfirm({
 							    title: '提示',
 							    content: '有进行中的巡店任务,是否继续?',
@@ -90,18 +91,18 @@
 									console.log(result.index)
 							        if (result.confirm || result.index==0) {  //  继续巡店
 										uni.navigateTo({
-											url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&taskId='+ res.data.taskId + '&restart=0&types=video'
+											url: '/pages/shopTour/shopTour?storeId=' + item.id + '&taskId='+ res.data + '&restart=0&types=video'
 										})
 							        }else if(result.cancel || result.index==1){  //  重新开始
 										uni.navigateTo({
-											url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&taskId='+ res.data.taskId + '&restart=1&types=video'
+											url: '/pages/shopTour/shopTour?storeId=' + item.id + '&taskId='+ res.data + '&restart=1&types=video'
 										})
 							        }
 							    }
 							})
 						}else{
 							uni.navigateTo({
-								url: '/pages/shopTour/shopTour?storeId=' + item.tenantId + '&types=video'
+								url: '/pages/shopTour/shopTour?storeId=' + item.id + '&types=video'
 							})
 						}
 					}else{