소스 검색

现场巡店+检查是否有历史任务

chenrui 4 년 전
부모
커밋
6b8c589d50

+ 2 - 1
pages/organization/organization.vue

@@ -126,7 +126,8 @@
 			//  选择门店
 			goPage(item){
 				//  校验是否有历史巡店记录
-				queryCurrentTaskUsing({ storeId: item.id }).then(res => {
+				//  type  VIDEO_INSPECTION:视频巡店、SPOT_INSPECTION:现场巡店、POINT_INSPECTION:点检任务
+				queryCurrentTaskUsing({ storeId: item.id, type: 'VIDEO_INSPECTION' }).then(res => {
 					if(res.status == 200){
 						if(res.data){  //  为true有历史巡店记录
 							clzConfirm({

+ 2 - 1
pages/searchPage/searchPage.vue

@@ -66,7 +66,8 @@
 			//  选择门店
 			goPage(item){
 				//  校验是否有历史巡店记录
-				queryCurrentTaskUsing({ storeId: item.id }).then(res => {
+				//  type  VIDEO_INSPECTION:视频巡店、SPOT_INSPECTION:现场巡店、POINT_INSPECTION:点检任务
+				queryCurrentTaskUsing({ storeId: item.id, type: 'VIDEO_INSPECTION' }).then(res => {
 					if(res.status == 200){
 						if(res.data){  //  为true有历史巡店记录
 							clzConfirm({

+ 2 - 2
pages/shopTourOver/shopTourOver.vue

@@ -29,8 +29,8 @@
 		data(){
 			return{
 				isEmpty: [  //  是否为空判断
-					{name: 'handWriting-dz', state: false},
-					{name: 'handWriting-xd', state: false}
+					{name: 'handWriting-dz', state: true},
+					{name: 'handWriting-xd', state: true}
 				],
 				taskId: '',
 				inspectorSign:'', // 巡店人签名

+ 32 - 2
pages/siteInspection/siteInspection.vue

@@ -35,6 +35,7 @@
 <script>
 	import { clzConfirm } from '@/libs/tools.js'
 	import { findStoreList } from '@/api/store.js'
+	import { queryCurrentTaskUsing } from '@/api/task.js'
 	export default{
 		data(){
 			return{
@@ -104,8 +105,37 @@
 			},
 			// 选择门店
 			chooseStore(item){
-				uni.navigateTo({
-					url:"/pages/signIn/signIn?item=" + encodeURIComponent(JSON.stringify(item))
+				//  校验是否有历史巡店记录
+				//  type  VIDEO_INSPECTION:视频巡店、SPOT_INSPECTION:现场巡店、POINT_INSPECTION:点检任务
+				queryCurrentTaskUsing({ storeId: item.id, type: 'SPOT_INSPECTION' }).then(res => {
+					if(res.status == 200){
+						if(res.data){  //  为true有历史巡店记录
+							clzConfirm({
+							    title: '提示',
+							    content: '有进行中的巡店任务,是否继续?',
+								confirmText: '继续巡店',
+								cancelText: '重新开始',
+								buttons: ['继续巡店','重新开始'],
+							    success: function (result) {
+							        if (result.confirm || result.index==0) {  //  继续巡店
+										uni.navigateTo({
+											url: '/pages/shopTour/shopTour?storeId=' + item.id + '&taskId='+ res.data + '&restart=0&types=scene'
+										})
+							        }else if(result.cancel || result.index==1){  //  重新开始
+										uni.navigateTo({
+											url:"/pages/signIn/signIn?item=" + encodeURIComponent(JSON.stringify(item))
+										})
+							        }
+							    }
+							})
+						}else{
+							uni.navigateTo({
+								url:"/pages/signIn/signIn?item=" + encodeURIComponent(JSON.stringify(item))
+							})
+						}
+					}else{
+						uni.showToast({icon: 'none', title: res.message})
+					}
 				})
 			}
 		}

+ 2 - 6
pages/videoShopTour/videoShopTour.vue

@@ -51,12 +51,7 @@
 			init(){
 				this.status = 'loading'
 				// 获取门店列表
-<<<<<<< HEAD
-				findStoreList({}).then(res => {
-					console.log(res)
-=======
 				findStoreList().then(res => {
->>>>>>> a04c42160548c91d3b3161472ffb9a60d7bf146f
 					if(res.status == 200){
 						this.list = res.data || []
 						this.noDataText = '暂无数据'  //  有列表数据时不显示,因此只用默认设置为无数据时所需显示的'暂无数据'即可
@@ -82,7 +77,8 @@
 			//  开始巡店
 			goPage(item){
 				//  校验是否有历史巡店记录
-				queryCurrentTaskUsing({ storeId: item.id, type:"VIDEO_INSPECTION" }).then(res => {
+				//  type  VIDEO_INSPECTION:视频巡店、SPOT_INSPECTION:现场巡店、POINT_INSPECTION:点检任务
+				queryCurrentTaskUsing({ storeId: item.id, type: 'VIDEO_INSPECTION' }).then(res => {
 					if(res.status == 200){
 						if(res.data){  //  为true有历史巡店记录
 							clzConfirm({

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.