|
@@ -7,11 +7,23 @@
|
|
|
{{ info.goodsList[0] | filterType }}
|
|
|
</view>
|
|
|
|
|
|
+ <view class="content progress"
|
|
|
+ v-if="info.goodsList[0].goodsState == 'APPLY_REFUND' || info.goodsList[0].goodsState == 'REFUNDED'"
|
|
|
+ @click="refundDetail">
|
|
|
+ <view class="progress-title">
|
|
|
+ 退款进度
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="progress-desc">
|
|
|
+ 查看退款详情
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="pay-info">
|
|
|
<view class="goods-info">
|
|
|
<image class="goods-img"
|
|
|
- src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/GOODS_INFO/School.png/5.png"
|
|
|
- mode=""></image>
|
|
|
+ :src="info.goodsList[0].goodsInfo.goodsPath + '?x-oss-process=image/resize,h_164,w_164,m_fixed'" mode="">
|
|
|
+ </image>
|
|
|
<view class="info">
|
|
|
<view class="goods-name">
|
|
|
{{ info.goodsList[0].goodsInfo.goodsName }}
|
|
@@ -35,13 +47,21 @@
|
|
|
出发时间
|
|
|
</view>
|
|
|
<view class="date" @click="openCalendar">
|
|
|
- {{ reserve.reserveTime }}
|
|
|
+ {{ $u.timeFormat(new Date(reserve.reserveTime).getTime(), 'yyyy年mm月dd日') }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="footer" v-if="info.goodsList[0].goodsState == 'WAIT_USE'" @click="toDetailStudy(info.orderNo)">
|
|
|
+ <view class="slogan">
|
|
|
+ 研学在即,课程相信
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ 立即学习
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="card-box"
|
|
|
- v-if="info.goodsList[0].jobFlowMap != 'P802' && info.goodsList[0].goodsState == 'WAIT_USE' && info.goodsList[0].goodsName != '二维码支付'">
|
|
|
+ <view class="card-box" v-if="info.goodsList[0].goodsState == 'WAIT_USE'">
|
|
|
<view class="title-top">
|
|
|
<view class="title-text">
|
|
|
券码信息
|
|
@@ -158,7 +178,7 @@
|
|
|
|
|
|
</view>
|
|
|
|
|
|
- <view class="card-box" style="margin-bottom: 160rpx;">
|
|
|
+ <view class="card-box">
|
|
|
<view class="title-top">
|
|
|
<view class="title-text">
|
|
|
交易信息
|
|
@@ -192,6 +212,52 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="content apply-box" v-if="(info.goodsList[0].goodsState == 'WAIT_USE' ||
|
|
|
+ info.goodsList[0].goodsState == 'USED') &&
|
|
|
+ info.goodsList[0].refundLog.refund != 'REFUSAL_REFUND' &&
|
|
|
+ isRefund() &&
|
|
|
+ info.goodsList[0].jobFlowMap !== 'XiaoJu'" @click="apply">
|
|
|
+ <view class="label">
|
|
|
+ 退款申请
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ 如引发商品争议,可申请平台介入处理
|
|
|
+ </view>
|
|
|
+ <image class="jiantou" src="../../static/jiantou-icon.png" mode=""></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="content apply-box"
|
|
|
+ v-if="info.goodsList[0].refundLog && info.goodsList[0].refundLog.refund == 'REFUSAL_REFUND'">
|
|
|
+ <view class="title">
|
|
|
+ 已拒绝
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ 拒绝理由:{{ info.goodsList[0].refundLog.conclusion }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <template>
|
|
|
+ <view class="content refund-box"
|
|
|
+ v-if="info.goodsList[0].goodsState == 'APPLY_REFUND' || (info.goodsList[0].refundLog && info.goodsList[0].refundLog.remark)">
|
|
|
+ <view class="title">
|
|
|
+ 退款原因
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="refund-msg">
|
|
|
+ {{ info.goodsList[0].refundLog.remark }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <button type="default" :loading="btnLoading" v-if="info.goodsList[0].goodsState == 'APPLY_REFUND'" class="pay-btn"
|
|
|
+ @click="cancelReply">取消退款</button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
+ <button type="default" :loading="btnLoading1"
|
|
|
+ v-if="info.goodsList[0].refundLog && info.goodsList[0].refundLog.refund == 'REFUSAL_REFUND' && !info.goodsList[0].refundLog.platInter"
|
|
|
+ class="pay-btn" @click="refundIntervene">申请介入处理</button>
|
|
|
+
|
|
|
+
|
|
|
<view class="btn-box" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'">
|
|
|
<button class="cancel-btn" @click="cancel" :loading="btnLoading">
|
|
|
取消订单
|
|
@@ -212,12 +278,19 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
info: {
|
|
|
- goodsList: []
|
|
|
+ goodsList: [
|
|
|
+ {
|
|
|
+ goodsState: '',
|
|
|
+ refundLog: {
|
|
|
+ refund: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
reserve: {
|
|
|
persons: [],
|
|
|
},
|
|
|
- codeData: '123',
|
|
|
+ codeData: 'qrcode',
|
|
|
show: false,
|
|
|
loading: false,
|
|
|
pageLoading: true,
|
|
@@ -310,19 +383,14 @@ export default {
|
|
|
},
|
|
|
apply() {
|
|
|
let that = this
|
|
|
- if (this.info.goodsList[0].jobFlowMap == 'XiaoJu') {
|
|
|
- uni.navigateTo({
|
|
|
- url: './webView'
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.navigateTo({
|
|
|
- url: './refund',
|
|
|
- success: function (res) {
|
|
|
- // 通过eventChannel向被打开页面传送数据
|
|
|
- res.eventChannel.emit('orderInfo', that.info)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/my/order/refund',
|
|
|
+ success: function (res) {
|
|
|
+ // 通过eventChannel向被打开页面传送数据
|
|
|
+ res.eventChannel.emit('orderInfo', that.info)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
// 获取订单详情
|
|
|
payDetails(orderNo) {
|
|
@@ -335,7 +403,7 @@ export default {
|
|
|
if (!this.info.goodsList[0].refundLog) {
|
|
|
this.info.goodsList[0].refundLog = {}
|
|
|
}
|
|
|
- if (this.info.goodsList[0].jobFlowMap != 'P802' && this.info.goodsList[0].goodsState == 'WAIT_USE' && this.info.goodsList[0].goodsName != '二维码支付') {
|
|
|
+ if (this.info.goodsList[0].goodsState == 'WAIT_USE') {
|
|
|
|
|
|
qrCode(this.info.goodsList[0].id).then(res => {
|
|
|
this.loading = false
|
|
@@ -350,6 +418,9 @@ export default {
|
|
|
getReserve(orderNo).then(res => {
|
|
|
if (res.state == 'Success') {
|
|
|
this.reserve = res.content
|
|
|
+ if (!this.reserve.persons) {
|
|
|
+ this.reserve.persons = []
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -366,7 +437,7 @@ export default {
|
|
|
} catch (error) {
|
|
|
obj = {}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
cancelOrder(obj).then(res => {
|
|
|
if (res.state == 'Success') {
|
|
|
uni.showToast({
|
|
@@ -452,6 +523,11 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ toDetailStudy(orderNo) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/activity/detail?orderNo=' + orderNo
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -499,19 +575,29 @@ export default {
|
|
|
return (this.info.createTime + 1000 * 60 * 30) - new Date().getTime()
|
|
|
},
|
|
|
payTime() {
|
|
|
- if (this.info.goodsList[0].extend && !JSON.parse(this.info.goodsList[0].extend).hasOwnProperty('account')) {
|
|
|
- if (JSON.parse(this.info.goodsList[0].extend).hasOwnProperty('notifyOrderInfo')) {
|
|
|
- return JSON.parse(this.info.goodsList[0].extend).notifyOrderInfo.payTime
|
|
|
- } else {
|
|
|
- return '-'
|
|
|
+ const goodsList = this.info.goodsList;
|
|
|
+ if (goodsList && goodsList[0] && goodsList[0].extend) {
|
|
|
+ let extend;
|
|
|
+ try {
|
|
|
+ extend = JSON.parse(goodsList[0].extend);
|
|
|
+ } catch (e) {
|
|
|
+ // 如果解析JSON失败,返回默认值 '-'
|
|
|
+ return '-';
|
|
|
}
|
|
|
- } else {
|
|
|
- if (this.info.payment && this.info.payment.paymentTime) {
|
|
|
- return uni.$u.timeFormat(this.info.payment.paymentTime, 'yyyy-mm-dd hh:MM:ss')
|
|
|
- } else {
|
|
|
- return '-'
|
|
|
+ if (!extend.hasOwnProperty('account')) {
|
|
|
+ if (extend.hasOwnProperty('notifyOrderInfo')) {
|
|
|
+ return extend.notifyOrderInfo.payTime;
|
|
|
+ } else {
|
|
|
+ return '-';
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ const payment = this.info.payment;
|
|
|
+ if (payment && payment.paymentTime) {
|
|
|
+ return uni.$u.timeFormat(payment.paymentTime, 'yyyy-mm-dd hh:MM:ss');
|
|
|
+ } else {
|
|
|
+ return '-';
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -604,12 +690,12 @@ export default {
|
|
|
}
|
|
|
|
|
|
.setoff {
|
|
|
- border-top: 1px solid #F0F0F0;
|
|
|
+ border-bottom: 1px solid #F0F0F0;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
font-size: 24rpx;
|
|
|
- padding-top: 24rpx;
|
|
|
+ padding-bottom: 24rpx;
|
|
|
|
|
|
.text {
|
|
|
color: #222222;
|
|
@@ -619,6 +705,21 @@ export default {
|
|
|
color: #AAAAAA;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .footer {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ background: #F9F9F9;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ padding: 24rpx;
|
|
|
+
|
|
|
+ .slogan,
|
|
|
+ .action {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #AAAAAA;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.card-box {
|
|
@@ -723,5 +824,75 @@ export default {
|
|
|
margin-left: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .pay-btn {
|
|
|
+ background: #3B83FF;
|
|
|
+ width: 688rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ line-height: 80rpx;
|
|
|
+ border-radius: 46rpx;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: 50rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .refund-box {
|
|
|
+ .refund-msg {
|
|
|
+ font-weight: 300;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #222222;
|
|
|
+ margin-top: 15rpx;
|
|
|
+ line-height: 40rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .apply-box {
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .label {
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #222222;
|
|
|
+ }
|
|
|
+
|
|
|
+ .value {
|
|
|
+ color: #999999;
|
|
|
+ font-size: 24rpx;
|
|
|
+ margin-top: 15rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .jiantou {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ right: 24rpx;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: 24rpx;
|
|
|
+ height: 24rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ padding: 28rpx 24rpx;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .progress {
|
|
|
+ .progress-title {
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #181818;
|
|
|
+ }
|
|
|
+
|
|
|
+ .progress-desc {
|
|
|
+ font-weight: 300;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #AAAAAA;
|
|
|
+ margin-top: 15rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
</style>
|