|
@@ -12,7 +12,13 @@
|
|
|
<h3>{{ this.status.name }}!</h3>
|
|
<h3>{{ this.status.name }}!</h3>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-adderss">
|
|
<div class="box-adderss">
|
|
|
- <div v-if="this.status.orderStatus !== 'CREATED' && this.status.orderStatus !== 'PAYED'">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ this.status.orderStatus !== 'CREATED' &&
|
|
|
|
|
+ this.status.orderStatus !== 'PAYED' &&
|
|
|
|
|
+ this.status.orderStatus !== 'CANCELED'
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<div class="box-adderss-con" @click="logistics">
|
|
<div class="box-adderss-con" @click="logistics">
|
|
|
<img src="../static/imgs/dingdan_icon_wuliu@3x.png" alt="" />
|
|
<img src="../static/imgs/dingdan_icon_wuliu@3x.png" alt="" />
|
|
|
<div class="box-con-top">
|
|
<div class="box-con-top">
|
|
@@ -132,6 +138,7 @@
|
|
|
<div
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'COMPETED'"
|
|
v-if="this.status.orderStatus === 'COMPETED'"
|
|
|
class="box-btn-left"
|
|
class="box-btn-left"
|
|
|
|
|
+ @click="deletes"
|
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_02@3x.png)` }"
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_02@3x.png)` }"
|
|
|
>
|
|
>
|
|
|
删除订单
|
|
删除订单
|
|
@@ -155,6 +162,7 @@
|
|
|
<div
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'SEND'"
|
|
v-if="this.status.orderStatus === 'SEND'"
|
|
|
class="box-btn-right"
|
|
class="box-btn-right"
|
|
|
|
|
+ @click="comfrim"
|
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
|
>
|
|
>
|
|
|
确认收货
|
|
确认收货
|
|
@@ -171,6 +179,7 @@
|
|
|
<div
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'PAYED'"
|
|
v-if="this.status.orderStatus === 'PAYED'"
|
|
|
class="box-btn-right"
|
|
class="box-btn-right"
|
|
|
|
|
+ @click="comfrim"
|
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
|
>
|
|
>
|
|
|
确认收货
|
|
确认收货
|
|
@@ -186,6 +195,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'CREATED'"
|
|
v-if="this.status.orderStatus === 'CREATED'"
|
|
|
|
|
+ @click="pay"
|
|
|
class="box-btn-right"
|
|
class="box-btn-right"
|
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
|
>
|
|
>
|
|
@@ -195,28 +205,24 @@
|
|
|
<div
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'CANCELED'"
|
|
v-if="this.status.orderStatus === 'CANCELED'"
|
|
|
class="box-btn-left2"
|
|
class="box-btn-left2"
|
|
|
- @click="cancel"
|
|
|
|
|
|
|
+ @click="deletes"
|
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_03@3x.png)` }"
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_03@3x.png)` }"
|
|
|
>
|
|
>
|
|
|
- 取消订单
|
|
|
|
|
|
|
+ 删除订单
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
v-if="this.status.orderStatus === 'CANCELED'"
|
|
v-if="this.status.orderStatus === 'CANCELED'"
|
|
|
class="box-btn-right"
|
|
class="box-btn-right"
|
|
|
|
|
+ @click="again"
|
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
:style="{ backgroundImage: `url(/native/imgs/btn_01@3x.png)` }"
|
|
|
>
|
|
>
|
|
|
- 立即支付
|
|
|
|
|
|
|
+ 重新购买
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <van-dialog
|
|
|
|
|
- custom-style="height:450px;overflow-y: auto;"
|
|
|
|
|
- use-slot
|
|
|
|
|
- title="快递详情"
|
|
|
|
|
- :show="show"
|
|
|
|
|
- :showConfirmButton="false"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="dialog-con">
|
|
|
|
|
|
|
+ <van-popup :show="show" custom-style="background:transparent;border-radius: 12px 12px 0 0;" use-slot>
|
|
|
|
|
+ <div class="popup-con">
|
|
|
|
|
+ <div class="popup-top">快递详情</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span>物流快递:{{ this.logisTics.expName }}</span>
|
|
<span>物流快递:{{ this.logisTics.expName }}</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -224,13 +230,18 @@
|
|
|
<span>物流单号:{{ this.logisTics.number }}</span>
|
|
<span>物流单号:{{ this.logisTics.number }}</span>
|
|
|
<span class="dialog-cv" @click="logisticCopy">复制</span>
|
|
<span class="dialog-cv" @click="logisticCopy">复制</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="dialog-border"></div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<van-steps :steps="stepsList" direction="vertical">
|
|
<van-steps :steps="stepsList" direction="vertical">
|
|
|
<div>{{ stepsList.text }}</div>
|
|
<div>{{ stepsList.text }}</div>
|
|
|
<div>{{ stepsList.desc }}</div>
|
|
<div>{{ stepsList.desc }}</div>
|
|
|
</van-steps>
|
|
</van-steps>
|
|
|
- </van-dialog>
|
|
|
|
|
|
|
+ <img
|
|
|
|
|
+ @click="logisticShow"
|
|
|
|
|
+ style="height:40px;width:40px;margin-left:150px;margin-top:30px"
|
|
|
|
|
+ src="../static/imgs/icon_tanchuang_close@3x.png"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ />
|
|
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -251,15 +262,17 @@ export default {
|
|
|
status: [],
|
|
status: [],
|
|
|
logisTics: [],
|
|
logisTics: [],
|
|
|
stepsList: [],
|
|
stepsList: [],
|
|
|
- stepsShow: []
|
|
|
|
|
|
|
+ stepsShow: [],
|
|
|
|
|
+ caseId: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- logistics() {
|
|
|
|
|
- this.show = true;
|
|
|
|
|
|
|
+ logisticShow() {
|
|
|
|
|
+ this.show = false;
|
|
|
},
|
|
},
|
|
|
getFn() {
|
|
getFn() {
|
|
|
this.$http.get('/orderInfo/get/' + this.$mp.query.id).then(res => {
|
|
this.$http.get('/orderInfo/get/' + this.$mp.query.id).then(res => {
|
|
|
|
|
+ this.caseId = res.caseId;
|
|
|
this.status = res;
|
|
this.status = res;
|
|
|
this.addressList = res.address;
|
|
this.addressList = res.address;
|
|
|
this.total = res.total;
|
|
this.total = res.total;
|
|
@@ -304,6 +317,78 @@ export default {
|
|
|
this.stepsShow = res.logistic.result.list[0];
|
|
this.stepsShow = res.logistic.result.list[0];
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ again() {
|
|
|
|
|
+ this.navigateTo('/pages/details?id=' + this.caseId);
|
|
|
|
|
+ },
|
|
|
|
|
+ logistics() {
|
|
|
|
|
+ // 查看物流
|
|
|
|
|
+ this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
|
|
|
|
|
+ this.logisTics = res.logistic.result;
|
|
|
|
|
+ let steps = [];
|
|
|
|
|
+ res.logistic.result.list.forEach(item => {
|
|
|
|
|
+ let newStep = {
|
|
|
|
|
+ desc: item.status,
|
|
|
|
|
+ text: item.time
|
|
|
|
|
+ };
|
|
|
|
|
+ steps.push(newStep);
|
|
|
|
|
+ });
|
|
|
|
|
+ this.stepsList = steps;
|
|
|
|
|
+ });
|
|
|
|
|
+ this.show = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ comfrim() {
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '确定收货?',
|
|
|
|
|
+ success: res => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.$http.post('/orderInfo/finish', { orderInfoId: this.$mp.query.id }).then(res => {
|
|
|
|
|
+ wx.hideLoading();
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: '收货成功'
|
|
|
|
|
+ });
|
|
|
|
|
+ this.getFn();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ pay() {
|
|
|
|
|
+ wx.showLoading({
|
|
|
|
|
+ title: '加载中'
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/orderInfo/pay', { orderInfoId: this.$mp.query.id, transactionId: '111' })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ 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: '支付失败'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ wx.hideLoading();
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ title: e.error,
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
cancel() {
|
|
cancel() {
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -316,7 +401,25 @@ export default {
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
title: '订单已取消'
|
|
title: '订单已取消'
|
|
|
});
|
|
});
|
|
|
- this.status.orderStatus = 'CANCELED';
|
|
|
|
|
|
|
+ this.getFn();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ deletes() {
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '确定删除订单?',
|
|
|
|
|
+ success: res => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.$http.post('orderInfo/delete', { orderInfoId: this.$mp.query.id }).then(res => {
|
|
|
|
|
+ wx.hideLoading();
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: '订单已删除'
|
|
|
|
|
+ });
|
|
|
|
|
+ this.navigateTo('/pages/details?id=' + this.caseId);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -361,10 +464,20 @@ export default {
|
|
|
/deep/ .van-step__circle-container {
|
|
/deep/ .van-step__circle-container {
|
|
|
height: 0;
|
|
height: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+ /deep/ .van-steps {
|
|
|
|
|
+ height: 307px;
|
|
|
|
|
+ width: 336px;
|
|
|
|
|
+ overflow: auto !important;
|
|
|
|
|
+ border-radius: 0 0 12px 12px;
|
|
|
|
|
+ }
|
|
|
padding-bottom: 140px;
|
|
padding-bottom: 140px;
|
|
|
|
|
+ padding: 102px 0 140px 0;
|
|
|
.box-top {
|
|
.box-top {
|
|
|
height: 102px;
|
|
height: 102px;
|
|
|
background: #ff6c00;
|
|
background: #ff6c00;
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ top: 0;
|
|
|
p {
|
|
p {
|
|
|
height: 34px;
|
|
height: 34px;
|
|
|
font-size: 24px;
|
|
font-size: 24px;
|
|
@@ -663,8 +776,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .dialog-con {
|
|
|
|
|
- margin: 12px 0 0 9px;
|
|
|
|
|
|
|
+ .popup-con {
|
|
|
|
|
+ padding: 12px 0 20px 9px;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ .popup-top {
|
|
|
|
|
+ height: 22px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #000000;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ padding: 50px 0 15px 0;
|
|
|
|
|
+ }
|
|
|
span {
|
|
span {
|
|
|
height: 20px;
|
|
height: 20px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
@@ -684,12 +807,6 @@ export default {
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
margin-left: 8px;
|
|
margin-left: 8px;
|
|
|
}
|
|
}
|
|
|
- .dialog-border {
|
|
|
|
|
- width: 315px;
|
|
|
|
|
- height: 1px;
|
|
|
|
|
- background: #f2f4f5;
|
|
|
|
|
- margin: 10px 0 15px 0;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
.steps-con {
|
|
.steps-con {
|
|
|
display: flex;
|
|
display: flex;
|