| @@ -38,6 +38,10 @@ Page({ | |||||
| if (this.data.id) { | if (this.data.id) { | ||||
| this.getDetail(this.data.id) | this.getDetail(this.data.id) | ||||
| } else { | |||||
| this.setData({ | |||||
| isShowBtns: true | |||||
| }) | |||||
| } | } | ||||
| }, | }, | ||||
| @@ -243,7 +243,7 @@ Page({ | |||||
| status = 1 | status = 1 | ||||
| } else if (orderStatus == 3 || orderStatus == 4 || orderStatus == 5) { | } else if (orderStatus == 3 || orderStatus == 4 || orderStatus == 5) { | ||||
| if (refundOrderStatus == 1) { // 退款中 | |||||
| if (refundOrderStatus == 1 || refundOrderStatus == 11) { // 退款中 | |||||
| status = 2 | status = 2 | ||||
| } else if (refundOrderStatus == 3) { //退款成功 | } else if (refundOrderStatus == 3) { //退款成功 | ||||
| status = 3 | status = 3 | ||||
| @@ -572,6 +572,35 @@ Page({ | |||||
| mask: false | mask: false | ||||
| }); | }); | ||||
| }) | }) | ||||
| } else { | |||||
| Http.get({ | |||||
| url: config.api.getStatus, | |||||
| data: { | |||||
| couponOrderId: tempData.couponOrderId, | |||||
| mallTenantId: this.data.mallTenantId || '' | |||||
| } | |||||
| }).then(res => { | |||||
| console.log(res, 'getStatus'); | |||||
| that.setData({ | |||||
| couponOrderStatus: res.data.CouponOrderStatus | |||||
| }); | |||||
| if (res.data.CouponOrderStatus == 1 || res.data.CouponOrderStatus == 3) { | |||||
| /** | |||||
| * 动态改变上一级页面的核销状态 | |||||
| */ | |||||
| // that.getStaticGame() | |||||
| //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 | |||||
| clearInterval(that.data.setInter); | |||||
| clearInterval(that.data.templTiem); | |||||
| that.updetail() | |||||
| that.setData({ | |||||
| mystatus: res.data.CouponOrderStatus | |||||
| }); | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| console.log(err); | |||||
| }) | |||||
| } | } | ||||
| }, 2000); | }, 2000); | ||||
| that.setData({ | that.setData({ | ||||
| @@ -48,7 +48,7 @@ | |||||
| <image class="infoArrow" src="{{chevronUrl}}" mode='widthFix'></image> | <image class="infoArrow" src="{{chevronUrl}}" mode='widthFix'></image> | ||||
| <view tt:if="{{orderStatus != 'noRefund' && orderStatus != 'orderCancel'}}"> | |||||
| <view tt:if="{{orderStatus != 'noRefund' && orderStatus != 'orderCancel' && couponOrderStatus == 0}}"> | |||||
| <pay-button tt:if="{{orderStatus}}" id='payBtn' class="goRefundPayBtn" order-status="{{orderStatus}}" | <pay-button tt:if="{{orderStatus}}" id='payBtn' class="goRefundPayBtn" order-status="{{orderStatus}}" | ||||
| order-id="{{outOrderId}}" refund-id="{{outRefundOrderId}}" bind:refund="handleRefund" | order-id="{{outOrderId}}" refund-id="{{outRefundOrderId}}" bind:refund="handleRefund" | ||||
| bind:applyrefund="applyRefund" bind:error="handleError" /> | bind:applyrefund="applyRefund" bind:error="handleError" /> | ||||
| @@ -97,9 +97,6 @@ | |||||
| </view> | </view> | ||||
| <view class='classif'> | <view class='classif'> | ||||
| <!-- | <!-- | ||||
| couponOrderStatus | couponOrderStatus | ||||
| @@ -131,13 +131,17 @@ function fmtDate(obj) { | |||||
| * @version V 1.0, Created by YWQ, 2022.10.20 | * @version V 1.0, Created by YWQ, 2022.10.20 | ||||
| */ | */ | ||||
| function timestampToTime(timestamp, format) { | function timestampToTime(timestamp, format) { | ||||
| if (!timestamp) return false | |||||
| //时间戳为10位需*1000,时间戳为13位不需乘1000 | //时间戳为10位需*1000,时间戳为13位不需乘1000 | ||||
| const length = timestamp ? timestamp.length : '' | const length = timestamp ? timestamp.length : '' | ||||
| if (length <= 10) { | if (length <= 10) { | ||||
| var date = new Date(timestamp * 1000) | var date = new Date(timestamp * 1000) | ||||
| } else { | } else { | ||||
| var date = new Date(timestamp) | var date = new Date(timestamp) | ||||
| } | } | ||||
| let Y = String(date.getFullYear()) | let Y = String(date.getFullYear()) | ||||
| let M = String(date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) | let M = String(date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) | ||||
| let D = String(date.getDate() + 1 < 10 ? '0' + (date.getDate()) : date.getDate()) | let D = String(date.getDate() + 1 < 10 ? '0' + (date.getDate()) : date.getDate()) | ||||