Sfoglia il codice sorgente

优化返回后刷新

zhengkaixin 10 mesi fa
parent
commit
1e545db638

+ 1 - 1
pagesFinance/MyInvoice/invoiceManagement.vue

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

+ 11 - 3
pagesFinance/MyInvoice/issueInvoice.vue

@@ -98,6 +98,7 @@
 				saveAll:"",
 				saveAll:"",
 				startDate:"",
 				startDate:"",
 				endDate:"",
 				endDate:"",
+				eventChannel:null,
 			};
 			};
 		},
 		},
 		onShow() {
 		onShow() {
@@ -105,6 +106,8 @@
 			
 			
 		},
 		},
 		onLoad(op) {
 		onLoad(op) {
+			
+		
 			if(op.id){
 			if(op.id){
 				this.id=op.id;
 				this.id=op.id;
 			}
 			}
@@ -138,9 +141,13 @@
 					startDate:this.startDate,
 					startDate:this.startDate,
 					endDate:this.endDate,
 					endDate:this.endDate,
 				}).then((res) => {
 				}).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.hideLoading()
 					uni.redirectTo({
 					uni.redirectTo({
@@ -167,6 +174,7 @@
 					endDate:this.endDate,
 					endDate:this.endDate,
 				}).then((res) => {
 				}).then((res) => {
 					
 					
+					eventChannel.emit('refreshData');
 					uni.hideLoading()
 					uni.hideLoading()
 					this.selectObj=res.data.invoiceType
 					this.selectObj=res.data.invoiceType
 					if(!res.data.invoiceType){
 					if(!res.data.invoiceType){