| 
					
				 | 
			
			
				@@ -43,6 +43,7 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     recordList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     maxPage: 1, // 总分页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     refoundStatus: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    cancelRefoundStatus: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     goodsInfo: {}, // 选中的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -129,12 +130,12 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   formatOrderStatus(status: string) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 订单状态 WAIT_PAY:待付款,  WAIT_USE:待使用, SUCCESS:已完成, CLOSE:已取消 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const template: any = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      WAIT_PAY: '等待付款', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      WAIT_USE: '等待使用', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      PAID: '交易完成', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      CLOSED: '交易取消', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      REFUNDING: '售后中', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      REFUNDED: '售后成功' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      WAIT_PAY: '待付款', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      WAIT_USE: '待使用', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      PAID: '已完成', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      CLOSED: '已取消', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      REFUNDING: '退款中', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      REFUNDED: '退款成功' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return template[status] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -205,7 +206,7 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.onSubmit({orderNo: dataset.orderno}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       wx.navigateTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url: '../orders/order-result?orderNo=' + dataset.orderno 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        url: `../orders/order-result?orderNo=${dataset.orderno}&tabIdx=${this.data.tabIdx}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -311,17 +312,25 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(item.wechatStatus === "REFUNDING") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const refundOrderId = item.refundOrderId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const {data} = await api_userPaymentCancelRefund(refundOrderId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log(data, 'data') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(data.code == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          wx.showToast({ title: '取消退款成功', icon: 'none' }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.onRefoundComfirm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          wx.showToast({ title: data.message, icon: 'none' }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } catch {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        cancelRefoundStatus: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const refundOrderId = item.refundOrderId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const {data} = await api_userPaymentCancelRefund(refundOrderId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(data, 'data') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(data.code == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            wx.showToast({ title: '你已成功取消退款', icon: 'none' }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.onRefoundComfirm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            wx.showToast({ title: data.message, icon: 'none' }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              cancelRefoundStatus: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } catch {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const { orderNo, studentPaymentOrderDetails } = item 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const goodsInfo: any = { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -339,25 +348,28 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsInfo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        cancelRefoundStatus: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         refoundStatus: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   changeRefoundStatus(e: {detail: any}) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      refoundStatus: e.detail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      refoundStatus: e.detail, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      cancelRefoundStatus: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   onRefoundComfirm() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const that = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      refoundStatus: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      refoundStatus: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       that.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         page: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         maxPage: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         recordList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        cancelRefoundStatus: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.getList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 |