zouling 11 hónapja
szülő
commit
d619047bba

+ 7 - 1
pages/index/index.vue

@@ -251,6 +251,7 @@
 		}
 	},
 	onUnload() {
+		uni.$off('refreshfoodlist')
 		uni.$off('refreshdatalist')
 	},
 	onLoad: function() {
@@ -261,12 +262,17 @@
 				this.marTop=692-Number(this.nvaHeight*2)-16;
 			}
 		})
+		uni.$on('refreshfoodlist',(e) => {
+			this.getcount();	
+		})
 		uni.$on('refreshdatalist',(e) => {
 			this.reachflag=false;
 			this.pageNum=1;
 			this.list=[];
 			this.getDataFn();
-			this.getcount();
+			if(!e||e!='sh'){
+				this.getcount();
+			}	
 		})
 		
 		this.init()

+ 4 - 2
pages/order/list.vue

@@ -50,7 +50,7 @@
 		}
 	},
 	onLoad: function() {
-		uni.$on('refreshdatalist',(e) => {
+		uni.$on('refreshdatalists',(e) => {
 			this.reachflag=true;
 			this.pageNum=1;
 			this.list=[];
@@ -61,7 +61,7 @@
 		
 	},
 	onUnload() {
-		uni.$off('refreshdatalist')
+		uni.$off('refreshdatalists')
 	},
 	methods:{
 		checkPermi, checkRole,
@@ -101,6 +101,7 @@
 						that.pageNum=1;
 						that.list=[];
 						that.getDataFn();
+						uni.$emit('refreshdatalist')
 						// that.getcount();
 					},1500)
 					
@@ -123,6 +124,7 @@
 						that.pageNum=1;
 						that.list=[];
 						that.getDataFn();
+						uni.$emit('refreshdatalist','sh')
 						// that.getcount();
 					},1500)
 					

+ 8 - 1
pages/order/staffcode.vue

@@ -177,8 +177,13 @@
 						getReservatDel(that.id).then(res=>{
 							if(res.code==200){
 								that.$toast('删除成功')
+								uni.$emit('refreshdatalist')
+								uni.$emit('refreshdatalists')
 								setTimeout(function(){
-									this.$tab.reLaunch('/pages/index/index')
+									uni.navigateBack({
+										delta:1
+									})
+									// that.$tab.reLaunch('/pages/index/index')
 								},1500)
 								
 							}else{
@@ -211,6 +216,8 @@
 						getReservatSh(params).then(res=>{
 							if(res.code==200){
 								that.$toast('审核成功')
+								uni.$emit('refreshdatalist','sh')
+								uni.$emit('refreshdatalists')
 								setTimeout(function(){
 									that.getDataFn();
 									// that.getcount();

+ 0 - 3
work/pages/record/clockin.vue

@@ -88,9 +88,6 @@
 				}
 			})
 		},
-		onUnload() {
-			uni.$off('refreshdatalist')
-		},
 
 		onShow() {},
 		mounted() {

+ 7 - 7
work/pages/record/visitor.vue

@@ -51,12 +51,12 @@
 		}
 	},
 	onLoad: function() {
-		uni.$on('refreshdatalist',(e) => {
-			this.reachflag=true;
-			this.pageNum=1;
-			this.list=[];
-			this.getDataFn();
-		})
+		// uni.$on('refreshdatalist',(e) => {
+		// 	this.reachflag=true;
+		// 	this.pageNum=1;
+		// 	this.list=[];
+		// 	this.getDataFn();
+		// })
 		this.init()
 		this.getDataFn()
 		
@@ -127,7 +127,7 @@
 			})
 		},
 		getDetail(data){
-			this.$tab.navigateTo('/pages/order/staffcode?type=look&id='+data)
+			// this.$tab.navigateTo('/pages/order/staffcode?type=look&id='+data)
 		},
 		getDataFn(){
 			var params={

+ 0 - 3
work/pages/yyorder/meetadd.vue

@@ -196,9 +196,6 @@
 				}
 			})
 		},
-		onUnload() {
-			uni.$off('refreshdatalist')
-		},
 
 		onShow() {},
 		mounted() {

+ 0 - 3
work/pages/yyorder/meeting.vue

@@ -154,9 +154,6 @@
 				}
 			})
 		},
-		onUnload() {
-			uni.$off('refreshdatalist')
-		},
 
 		onShow() {},
 		mounted() {