Browse Source

bug 修复

lilei 4 years ago
parent
commit
959bb2b6aa
1 changed files with 23 additions and 33 deletions
  1. 23 33
      pages/shopTourOver/shopTourOver.vue

+ 23 - 33
pages/shopTourOver/shopTourOver.vue

@@ -43,54 +43,43 @@
 				console.log(res,'店长签名+++')
 				if(res.status == 200){
 					this.storeManagerSign = res.data
+					this.sign++
+					this.$refs.xdr.subCanvas()
 				}else{
 					this.storeManagerSign = ''
-					// uni.showToast({ icon: 'none', title: res.message })
-					// return
+					uni.showToast({ icon: 'none', title: '店长签名生成失败,请重新提交' })
 				}
-				this.sign++
-				this.isSubmit()
 			},
 			//  巡店人签名 生成图片
 			autographXdr(res){
 				console.log(res,'巡店人签名+++')
 				if(res.status == 200){
 					this.inspectorSign = res.data
+					this.sign++
+					this.isSubmit()
 				}else{
 					this.inspectorSign = ''
-					// uni.showToast({ icon: 'none', title: res.message })
-					// return
+					uni.showToast({ icon: 'none', title: '巡店人签名生成失败,请重新提交' })
 				}
-				this.sign++
-				this.isSubmit()
 			},
 			//  是否提交
 			isSubmit(){
-				if(this.sign == 2){
-					if(this.storeManagerSign && this.inspectorSign){
-						console.log('正常提交')
-						clzConfirm({
-							title: '提示',
-							content: '确定提交本次巡店?',
-							success: function(res) {
-								if (res.confirm || res.index == 0) {
-									// 上传图片后提交代码
-									_this.submitTask()
-								}
+				let _this = this
+				if(this.sign == 2&&this.storeManagerSign && this.inspectorSign){
+					console.log('正常提交')
+					clzConfirm({
+						title: '提示',
+						content: '确定提交本次巡店?',
+						success: function(res) {
+							if (res.confirm || res.index == 0) {
+								// 上传图片后提交代码
+								_this.submitTask()
 							}
-						})
-					}else{
-						if(!this.storeManagerSign){
-							uni.showToast({ icon: 'none', title: '店长签名生成失败,请重新提交' })
-							return
-						}
-						if(!this.inspectorSign){
-							uni.showToast({ icon: 'none', title: '巡店人签名生成失败,请重新提交' })
-							return
 						}
-					}
+					})
+				}else{
+					uni.showToast({ icon: 'none', title: '签名生成失败,请重新提交' })
 				}
-				
 			},
 			// 提交本次任务
 			submitFun(){
@@ -111,15 +100,16 @@
 					return
 				}
 				this.$refs.dz.subCanvas()
-				this.$refs.xdr.subCanvas()
 			},
 			//  提交
 			submitTask(){
 				const _this = this
 				submitTask({
 					id: _this.taskId,
-					inspectorSign: _this.inspectorSign,
-					storeManagerSign: _this.storeManagerSign
+					storeManagerSignBasePath:_this.storeManagerSign,
+					storeManagerSignPath: _this.storeManagerSign,
+					inspectorSignBasePath: _this.inspectorSign,
+					inspectorSignPath:_this.inspectorSign
 				}).then(ret=>{
 					console.log(ret)
 					if(ret.status == 200){