twt il y a 3 ans
Parent
commit
c524af2940

+ 16 - 7
operatingCompany/pages/entryReport/entered.vue

@@ -170,6 +170,7 @@
 					var name='';
 					var categoryList=[]
 					console.log(this.list)
+					
 					this.list.forEach(item=>{
 						var obj={
 							categoryID:item.categoryID,
@@ -190,12 +191,7 @@
 								isRequired:v.isRequired,
 								itemList:[]
 							}
-							if(v.isRequired==1){
-								if(!v.check){
-									go=false
-									name=v.checkName
-								}
-							}
+							
 							
 							v.itemList.forEach(i=>{
 								var itemObj={
@@ -213,7 +209,20 @@
 							categoryList.push(obj);
 						
 					})
-								
+					var a = JSON.parse(JSON.stringify(this.list));
+					a.reverse();
+					console.log(a)
+				    a.forEach(item=>{
+						item.sectionList.forEach(v=>{
+							if(v.isRequired==1){
+								if(!v.check){
+									go=false
+									name=v.checkName
+								}
+							}
+						})
+					})
+					//return false;
 					console.log('categoryList')
 					console.log(categoryList)
 					if(!go){

+ 20 - 13
operatingCompany/pages/entryReport/entryredItem.vue

@@ -163,19 +163,23 @@
 					count:num, 
 				    success: (chooseImageRes) => {
 				        const tempFilePaths = chooseImageRes.tempFilePaths;
-				        uni.uploadFile({
-				            url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
-				            filePath: tempFilePaths[0],
-				            name: 'file',
-				            formData: {
-				                'user': 'test'
-				            },
-				            success: (uploadFileRes) => {
-				                console.log(JSON.parse(uploadFileRes.data).data );
-								item.imgArr=item.imgArr.concat(JSON.parse(uploadFileRes.data).data) ;
-								that.categoryList.splice(1,0)
-				            }
-				        }); 
+						tempFilePaths.forEach(v=>{
+							uni.uploadFile({
+							    url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
+							    filePath: v,
+							    name: 'file',
+							    formData: {
+							        'user': 'test'
+							    },
+							    success: (uploadFileRes) => {
+							        console.log(JSON.parse(uploadFileRes.data).data );
+									console.log(item.imgArr)
+									item.imgArr=item.imgArr.concat(JSON.parse(uploadFileRes.data).data) ;
+									that.categoryList.splice(1,0)
+							    }
+							}); 
+						})
+				     
 						/* that.$http('accompany/SuperCheckSheet/uploadFile', tempFilePaths[0], 'POST').then(res => {
 							
 						}) */
@@ -203,6 +207,8 @@
 						
 					}else if(item.itemValue===''){
 						go=false
+					}else if(!item.itemValue){
+						go=false
 					}
 				})
 				console.log(this.categoryList[this.index1].sectionList[this.index2].itemList)
@@ -214,6 +220,7 @@
 					});
 					return false;
 				}
+				//return false;
 				this.categoryList[this.index1].sectionList[this.index2].check=true;
 				uni.navigateBack({
 					delta:1

+ 75 - 1
operatingCompany/pages/entryReport/opinion.vue

@@ -90,8 +90,45 @@
 				this.suggestList.splice(index,1)
 			},
 			zc(){
-				uni.showLoading({ });
+				var goname=true;
+				var gotime=true;
+				var gosuggest=true;
+				this.suggestList.forEach(item=>{
+					if(item.managerName==''){
+						goname=false;
+					}
+					if(item.orderFinishTime==''){
+						gotime=false;
+					}
+					if(item.suggest==''){
+						gosuggest=false;
+					}
+				})
+				if(!goname){
+					uni.showToast({
+					    title: '请填写负责人',
+						 icon:'none',
+					    duration: 2000,
+					});
+					return false;
+				}else if(!gotime){
+					uni.showToast({
+					    title: '请选择预约时间',
+						 icon:'none',
+					    duration: 2000,
+					});
+					return false;
+				}else if(!gosuggest){
+					uni.showToast({
+					    title: '请填写建议',
+						 icon:'none',
+					    duration: 2000,
+					});
+					return false;
+				}
 				console.log(this.suggestList);
+				
+				uni.showLoading({ });
 				this.$http('accompany/SuperCheckSheet/saveSuperCheckSheetSuggest', {
 					sheetID:this.sheetID,
 					
@@ -102,6 +139,7 @@
 				     	 icon:'success',
 				         duration: 2000,
 				     });
+					 //this.$store.commit('mutationsCategoryList',this.categoryList)
 					 setTimeout(function(){
 					 	uni.navigateBack({
 					 		delta:2
@@ -111,6 +149,42 @@
 				})
 			},
 			submit(){
+				var goname=true;
+				var gotime=true;
+				var gosuggest=true;
+				this.suggestList.forEach(item=>{
+					if(item.managerName==''){
+						goname=false;
+					}
+					if(item.orderFinishTime==''){
+						gotime=false;
+					}
+					if(item.suggest==''){
+						gosuggest=false;
+					}
+				})
+				if(!goname){
+					uni.showToast({
+					    title: '请填写负责人',
+						 icon:'none',
+					    duration: 2000,
+					});
+					return false;
+				}else if(!gotime){
+					uni.showToast({
+					    title: '请选择预约时间',
+						 icon:'none',
+					    duration: 2000,
+					});
+					return false;
+				}else if(!gosuggest){
+					uni.showToast({
+					    title: '请填写建议',
+						 icon:'none',
+					    duration: 2000,
+					});
+					return false;
+				}
 				uni.showLoading({ });
 				this.$http('accompany/SuperCheckSheet/saveSuperCheckSheetSuggest', {
 					sheetID:this.sheetID,

+ 9 - 0
operatingCompany/pages/entryReport/remarks.vue

@@ -43,6 +43,15 @@
 				this.shopEvaStar=e.value
 			},
 			submit(){
+				if(this.shopEvaContent.length<10){
+					uni.showToast({
+					    title: '请填写十字以上的评价内容',
+						icon:'none',
+					    duration: 2000,
+					})
+					return false;
+				}
+				
 				
 				uni.showLoading({ });
 				

+ 11 - 2
operatingCompany/pages/entryReport/shopEvaStar.vue

@@ -25,7 +25,7 @@
 			</view>
 		</view>
 		
-		<view class="competeCont">
+		<view class="competeCont" v-if="sheetID">
 			<view class="competeContTitle">对该门店上次行动完成情况打分</view>
 			<view class="xxBox">
 				<uni-rate :max="5" v-model="xx" @change="onXXChange"/>
@@ -79,6 +79,7 @@
 				shopName:'',
 				detailid:'',
 				Contactor:'',
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
@@ -125,7 +126,14 @@
 				this.userEvaStar=e.value
 			},
 			submit(){
-				
+				if(this.userEvaContent.length<10){
+					uni.showToast({
+					    title: '请填写十字以上的评价内容',
+						icon:'none',
+					    duration: 2000,
+					})
+					return false;
+				}
 				uni.showLoading({ });
 				
 				this.$http('accompany/SuperCheckSheet/shopEvaStar', {
@@ -264,6 +272,7 @@
 		font-size: 28rpx;
 		color: #3C3C3C;
 		margin: 0;
+		padding: 0;
 	}
 	.competeCont{
 		margin-top: 20rpx;

+ 2 - 2
operatingCompany/pages/reportManage/reportDetail.vue

@@ -132,10 +132,10 @@
 					<view class="remarksLineTxt1">
 						补充说明
 					</view>
-					<view class="remarksLineTxt2">{{info.shopEvaContent}}</view>
+					<view class="remarksLineTxt2" v-if="info.shopEvaContent">{{info.shopEvaContent}}</view>
 					<view class="timeBox">
 						<view>{{info.shopEvaTime}}</view>
-						<view>{{info.shopEvaOpName}}</view>
+						<view v-if="info.shopEvaOpName">{{info.shopEvaOpName}}</view>
 					</view>
 				</view>
 				

+ 16 - 2
operatingCompany/pages/shop/shopIndex/editWorkDetail.vue

@@ -54,7 +54,7 @@
 					count:1, 
 				    success: (chooseImageRes) => {
 				        const tempFilePaths = chooseImageRes.tempFilePaths;
-				        uni.uploadFile({
+				       /* uni.uploadFile({
 				            url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
 				            filePath: tempFilePaths[0],
 				            name: 'file',
@@ -66,7 +66,21 @@
 								that.imgArr=that.imgArr.concat(JSON.parse(uploadFileRes.data).data) ;
 								
 				            }
-				        }); 
+				        }); */
+						tempFilePaths.forEach(v=>{
+							uni.uploadFile({
+							    url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
+							    filePath: v,
+							    name: 'file',
+							    formData: {
+							        'user': 'test'
+							    },
+							    success: (uploadFileRes) => {
+							        console.log(JSON.parse(uploadFileRes.data).data );
+									that.imgArr=that.imgArr.concat(JSON.parse(uploadFileRes.data).data) ;
+							    }
+							}); 
+						})
 						/* that.$http('accompany/SuperCheckSheet/uploadFile', tempFilePaths[0], 'POST').then(res => {
 							
 						}) */

+ 9 - 1
operatingCompany/pages/shop/shopIndex/editcomplete.vue

@@ -47,6 +47,7 @@
 				userEvaContent:'',
 				userEvaStar:0,
 				xx:0,
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
@@ -72,7 +73,14 @@
 				this.userEvaStar=e.value
 			},
 			submit(){
-				
+				if(this.userEvaContent.length<10){
+					uni.showToast({
+					    title: '请填写十字以上的评价内容',
+						icon:'none',
+					    duration: 2000,
+					})
+					return false;
+				}
 				uni.showLoading({ });
 				
 				this.$http('accompany/SuperCheckSheet/userEva', {