소스 검색

优化返回后刷新

zhengkaixin 10 달 전
부모
커밋
1e545db638
2개의 변경된 파일12개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      pagesFinance/MyInvoice/invoiceManagement.vue
  2. 11 3
      pagesFinance/MyInvoice/issueInvoice.vue

+ 1 - 1
pagesFinance/MyInvoice/invoiceManagement.vue

@@ -373,7 +373,7 @@
 			},
 			init() {
 				
-				this.getList(true)
+				this.getlist(true)
 			},
 			submit(id){
 				

+ 11 - 3
pagesFinance/MyInvoice/issueInvoice.vue

@@ -98,6 +98,7 @@
 				saveAll:"",
 				startDate:"",
 				endDate:"",
+				eventChannel:null,
 			};
 		},
 		onShow() {
@@ -105,6 +106,8 @@
 			
 		},
 		onLoad(op) {
+			
+		
 			if(op.id){
 				this.id=op.id;
 			}
@@ -138,9 +141,13 @@
 					startDate:this.startDate,
 					endDate:this.endDate,
 				}).then((res) => {
-					
-					const eventChannel = this.getOpenerEventChannel();
-					eventChannel.emit('refreshData');
+					try{
+						var eventChannel = this.getOpenerEventChannel();
+						eventChannel.emit('refreshData');
+					}catch(e){
+						//TODO handle the exception
+					}
+			
 				
 					uni.hideLoading()
 					uni.redirectTo({
@@ -167,6 +174,7 @@
 					endDate:this.endDate,
 				}).then((res) => {
 					
+					eventChannel.emit('refreshData');
 					uni.hideLoading()
 					this.selectObj=res.data.invoiceType
 					if(!res.data.invoiceType){