|
|
@@ -93,7 +93,7 @@
|
|
|
<div class="box-buttom">
|
|
|
<div class="box-buttom-con">
|
|
|
<p>订单留言</p>
|
|
|
- <div class="box-buttom-p2">选填,备注对本次交易的说明</div>
|
|
|
+ <div class="box-buttom-p2">{{ status.remark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="box-border-but"></div>
|
|
|
@@ -131,6 +131,7 @@
|
|
|
<van-notice-bar
|
|
|
v-if="this.status.orderStatus === 'SEND'"
|
|
|
color="#FF6C00"
|
|
|
+ background="#ff6c0016"
|
|
|
text="为了保障您的售后服务,收货时请拍摄完整的快递开封视频避免纠纷"
|
|
|
/>
|
|
|
<div class="box-btn">
|
|
|
@@ -171,10 +172,10 @@
|
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'PAYED'"
|
|
|
class="box-btn-left2"
|
|
|
- @click="cancel"
|
|
|
+ @click="Apply"
|
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_03@3x.png)` }"
|
|
|
>
|
|
|
- 取消订单
|
|
|
+ 申请退款
|
|
|
</div>
|
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'PAYED'"
|
|
|
@@ -271,39 +272,55 @@ export default {
|
|
|
this.show = false;
|
|
|
},
|
|
|
getFn() {
|
|
|
- this.$http.get('/orderInfo/get/' + this.$mp.query.id).then(res => {
|
|
|
- this.caseId = res.caseId;
|
|
|
- this.status = res;
|
|
|
- this.addressList = res.address;
|
|
|
- this.total = res.total;
|
|
|
- this.Boxes = res.cardBoxList;
|
|
|
- this.orderInfoId = res.id;
|
|
|
- this.cardCaseInfo = res.cardCase.collection;
|
|
|
- if (this.status.orderStatus === 'CREATED') {
|
|
|
- this.status.label = '待支付';
|
|
|
- this.status.name = '请尽快支付,04分56秒 后未支付将自动取消订单';
|
|
|
- }
|
|
|
- if (this.status.orderStatus === 'CANCELED') {
|
|
|
- this.status.label = '已取消';
|
|
|
- this.status.name = '很遗憾,订单已取消';
|
|
|
- }
|
|
|
- if (this.status.orderStatus === 'PAYED') {
|
|
|
- this.status.label = '待发货';
|
|
|
- this.status.name = '很快就发货了,请耐心等待哦!';
|
|
|
- this.showTimeTab = true;
|
|
|
- }
|
|
|
- if (this.status.orderStatus === 'COMPETED') {
|
|
|
- this.status.label = '已完成';
|
|
|
- this.status.name = '交易成功啦!快去把好物分享给小伙伴吧';
|
|
|
- this.showTimeTab = true;
|
|
|
- }
|
|
|
- if (this.status.orderStatus === 'SEND') {
|
|
|
- this.status.label = '卖家已发货';
|
|
|
- this.status.name = '宝贝正在飞奔到你的怀中!';
|
|
|
- this.showTimeTab = true;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.showLoading();
|
|
|
+ this.$http
|
|
|
+ .get('/orderInfo/get/' + this.$mp.query.id)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res);
|
|
|
+ wx.hideLoading();
|
|
|
+ this.caseId = res.caseId;
|
|
|
+ this.status = res;
|
|
|
+ this.addressList = res.address;
|
|
|
+ this.total = res.total;
|
|
|
+ this.Boxes = res.cardBoxList;
|
|
|
+ this.orderInfoId = res.id;
|
|
|
+ this.cardCaseInfo = res.cardCase.collection;
|
|
|
+ if (this.status.orderStatus === 'CREATED') {
|
|
|
+ this.status.label = '待支付';
|
|
|
+ this.status.name = '请尽快支付,04分56秒 后未支付将自动取消订单';
|
|
|
+ }
|
|
|
+ if (this.status.orderStatus === 'CANCELED') {
|
|
|
+ this.status.label = '已取消';
|
|
|
+ this.status.name = '很遗憾,订单已取消';
|
|
|
+ }
|
|
|
+ if (this.status.orderStatus === 'PAYED') {
|
|
|
+ this.status.label = '待发货';
|
|
|
+ this.status.name = '很快就发货了,请耐心等待哦!';
|
|
|
+ this.showTimeTab = true;
|
|
|
+ }
|
|
|
+ if (this.status.orderStatus === 'COMPETED') {
|
|
|
+ this.status.label = '已完成';
|
|
|
+ this.status.name = '交易成功啦!快去把好物分享给小伙伴吧';
|
|
|
+ this.showTimeTab = true;
|
|
|
+ }
|
|
|
+ if (this.status.orderStatus === 'SEND') {
|
|
|
+ this.status.label = '卖家已发货';
|
|
|
+ this.status.name = '宝贝正在飞奔到你的怀中!';
|
|
|
+ this.showTimeTab = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ wx.hideLoading();
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请返回首页操作'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // setTimeout(() => {
|
|
|
+ // if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
|
|
|
+ // console.log(this.status.orderStatus);
|
|
|
this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
|
|
|
+ wx.hideLoading();
|
|
|
this.logisTics = res.logistic.result;
|
|
|
let steps = [];
|
|
|
res.logistic.result.list.forEach(item => {
|
|
|
@@ -316,13 +333,17 @@ export default {
|
|
|
this.stepsList = steps;
|
|
|
this.stepsShow = res.logistic.result.list[0];
|
|
|
});
|
|
|
+ // }
|
|
|
+ // }, 1000);
|
|
|
},
|
|
|
again() {
|
|
|
this.navigateTo('/pages/details?id=' + this.caseId);
|
|
|
},
|
|
|
logistics() {
|
|
|
+ this.showLoading();
|
|
|
// 查看物流
|
|
|
this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
|
|
|
+ wx.hideLoading();
|
|
|
this.logisTics = res.logistic.result;
|
|
|
let steps = [];
|
|
|
res.logistic.result.list.forEach(item => {
|
|
|
@@ -348,37 +369,62 @@ export default {
|
|
|
icon: 'none',
|
|
|
title: '收货成功'
|
|
|
});
|
|
|
- this.getFn();
|
|
|
+ setTimeout(() => {
|
|
|
+ this.getFn();
|
|
|
+ }, 1000);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ Apply() {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '敬请开放',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ // this.$http.post('orderInfo/refund', { orderInfoId: this.id, remark: '' }).then(res => {
|
|
|
+ // wx.hideLoading();
|
|
|
+ // wx.showToast({
|
|
|
+ // icon: 'none',
|
|
|
+ // title: '退款成功'
|
|
|
+ // });
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.getFn();
|
|
|
+ // }, 1000);
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
pay() {
|
|
|
wx.showLoading({
|
|
|
title: '加载中'
|
|
|
});
|
|
|
this.$http
|
|
|
- .post('/orderInfo/pay', { orderInfoId: this.$mp.query.id, transactionId: '111' })
|
|
|
+ .get('/payDelegation/wxPay', {
|
|
|
+ orderId: this.$mp.query.id
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
- console.log(res);
|
|
|
+ res.package = res.packageValue;
|
|
|
+ // console.log(res);
|
|
|
wx.requestPayment({
|
|
|
- // ...res,
|
|
|
- // success: () => {
|
|
|
- // wx.hideLoading();
|
|
|
- // wx.showToast({
|
|
|
- // title: '支付成功'
|
|
|
- // });
|
|
|
- // // this.$set(this.orderInfo, 'status', 'PAID');
|
|
|
- // },
|
|
|
- // fail: e => {
|
|
|
- // console.log(e);
|
|
|
- // wx.hideLoading();
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: '支付失败'
|
|
|
- // });
|
|
|
- // }
|
|
|
+ ...res,
|
|
|
+ success: () => {
|
|
|
+ wx.hideLoading();
|
|
|
+ wx.showToast({
|
|
|
+ title: '支付成功'
|
|
|
+ });
|
|
|
+ this.getFn();
|
|
|
+ },
|
|
|
+ fail: e => {
|
|
|
+ console.log(e);
|
|
|
+ wx.hideLoading();
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '支付失败'
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
})
|
|
|
.catch(e => {
|
|
|
@@ -401,7 +447,9 @@ export default {
|
|
|
icon: 'none',
|
|
|
title: '订单已取消'
|
|
|
});
|
|
|
- this.getFn();
|
|
|
+ setTimeout(() => {
|
|
|
+ this.getFn();
|
|
|
+ }, 1000);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -419,7 +467,9 @@ export default {
|
|
|
icon: 'none',
|
|
|
title: '订单已删除'
|
|
|
});
|
|
|
- this.navigateTo('/pages/details?id=' + this.caseId);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.navigateTo('/pages/allorder');
|
|
|
+ }, 1000);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -466,7 +516,7 @@ export default {
|
|
|
}
|
|
|
/deep/ .van-steps {
|
|
|
height: 307px;
|
|
|
- width: 336px;
|
|
|
+ width: 334px;
|
|
|
overflow: auto !important;
|
|
|
border-radius: 0 0 12px 12px;
|
|
|
}
|
|
|
@@ -678,7 +728,7 @@ export default {
|
|
|
.box-buttom-p2 {
|
|
|
height: 22px;
|
|
|
font-size: 13px;
|
|
|
- font-weight: 400;
|
|
|
+ font-weight: bold;
|
|
|
color: #c8c9cc;
|
|
|
}
|
|
|
}
|
|
|
@@ -692,15 +742,16 @@ export default {
|
|
|
.box-footer-cr {
|
|
|
display: flex;
|
|
|
span {
|
|
|
- width: 40px;
|
|
|
- height: 20px;
|
|
|
+ width: 38px;
|
|
|
+ height: 18px;
|
|
|
border-radius: 2px;
|
|
|
- border: 1px solid #c8c9cc;
|
|
|
+ border: 2px solid #c8c9cc;
|
|
|
font-size: 12px;
|
|
|
font-weight: 400;
|
|
|
color: #c8c9cc;
|
|
|
- line-height: 20px;
|
|
|
+ line-height: 18px;
|
|
|
text-align: center;
|
|
|
+ margin-right: 3px;
|
|
|
}
|
|
|
}
|
|
|
p {
|