|
|
@@ -6,7 +6,7 @@
|
|
|
<img src="/native/tabbar/icon_kapai_shangjia_da.png" alt="" />
|
|
|
<p>光之城卡牌</p>
|
|
|
</div>
|
|
|
- <!-- <div class="box-tit-seller">{{ this.name }}</div> -->
|
|
|
+ <div class="box-tit-seller">{{ this.name }}</div>
|
|
|
</div>
|
|
|
<div class="box-con-Cards" v-for="(item, index) in orderList" :key="index.id" @click="allorder">
|
|
|
<img :src="item.images" alt="" />
|
|
|
@@ -32,13 +32,37 @@
|
|
|
<div v-if="this.status == 'CREATED'" @click="cancel" class="box-but">取消订单</div>
|
|
|
<div v-if="this.status == 'CREATED'" class="box-but2">立即支付</div>
|
|
|
<div v-if="this.status == 'PAYED'" @click="Apply" class="box-but">申请退款</div>
|
|
|
- <div v-if="this.status == 'PAYED'" class="box-but3">提醒发货</div>
|
|
|
- <div v-if="this.status == 'SEND'" class="box-but">查看物流</div>
|
|
|
+ <div v-if="this.status == 'PAYED'" @click="remind" class="box-but3">提醒发货</div>
|
|
|
+ <div v-if="this.status == 'SEND'" @click="logistics" class="box-but">查看物流</div>
|
|
|
<div v-if="this.status == 'SEND'" class="box-but2">立即支付</div>
|
|
|
<div v-if="this.status == 'COMPETED'" class="box-but">申请售后</div>
|
|
|
- <div v-if="this.status == 'COMPETED'" class="box-but3">提醒发货</div>
|
|
|
+ <div v-if="this.status == 'COMPETED'" @click="remind" class="box-but3">提醒发货</div>
|
|
|
+ <div v-if="this.status == 'CANCELED'" @click="deletes" class="box-but">删除订单</div>
|
|
|
+ <div v-if="this.status == 'CANCELED'" @click="again" class="box-but3">重新购买</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <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>
|
|
|
+ <span>物流快递:{{ this.logisTics.expName }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>物流单号:{{ this.logisTics.number }}</span>
|
|
|
+ <span class="dialog-cv" @click="logisticCopy">复制</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-steps :steps="stepsList" direction="vertical">
|
|
|
+ <div>{{ stepsList.text }}</div>
|
|
|
+ <div>{{ stepsList.desc }}</div>
|
|
|
+ </van-steps>
|
|
|
+ <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>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -53,33 +77,72 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- orderList: []
|
|
|
+ show: false,
|
|
|
+ stepsList: [],
|
|
|
+ logisTics: []
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ orderList() {
|
|
|
+ return this.all.orderBoxDTOS || [];
|
|
|
+ },
|
|
|
+ status() {
|
|
|
+ return this.all.status || '';
|
|
|
+ },
|
|
|
+ id() {
|
|
|
+ return this.all.orderInfoId || 0;
|
|
|
+ },
|
|
|
+ caseId() {
|
|
|
+ return this.all.caseId || 0;
|
|
|
+ },
|
|
|
+ name() {
|
|
|
+ if (this.all.status === 'CREATED') {
|
|
|
+ return '待支付';
|
|
|
+ }
|
|
|
+ if (this.status === 'CANCELED') {
|
|
|
+ return '已取消';
|
|
|
+ }
|
|
|
+ if (this.status === 'PAYED') {
|
|
|
+ return '待发货';
|
|
|
+ }
|
|
|
+ if (this.status === 'COMPETED') {
|
|
|
+ return '已完成';
|
|
|
+ }
|
|
|
+ if (this.status === 'SEND') {
|
|
|
+ return '待收货';
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
- allFn() {
|
|
|
- this.orderList = this.all.orderBoxDTOS;
|
|
|
- this.status = this.all.status;
|
|
|
- this.id = this.all.orderInfoId;
|
|
|
- // if (this.all.status === 'CREATED') {
|
|
|
- // this.name = '待支付';
|
|
|
- // }
|
|
|
- // if (this.status === 'CANCELED') {
|
|
|
- // this.name = '已取消';
|
|
|
- // }
|
|
|
- // if (this.status === 'PAYED') {
|
|
|
- // this.name = '待发货';
|
|
|
- // }
|
|
|
- // if (this.status === 'COMPETED') {
|
|
|
- // this.name = '已完成';
|
|
|
- // }
|
|
|
- // if (this.status === 'SEND') {
|
|
|
- // this.name = '待收货';
|
|
|
- // }
|
|
|
+ logisticShow() {
|
|
|
+ this.show = false;
|
|
|
+ },
|
|
|
+ logistics() {
|
|
|
+ // 查看物流
|
|
|
+ this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.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;
|
|
|
+ },
|
|
|
+ refreash() {
|
|
|
+ this.$emit('refreash');
|
|
|
},
|
|
|
allorder() {
|
|
|
this.navigateTo('/pages/orderdetails?id=' + this.id);
|
|
|
},
|
|
|
+ again() {
|
|
|
+ this.navigateTo('/pages/details?id=' + this.caseId);
|
|
|
+ },
|
|
|
cancel() {
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
@@ -92,32 +155,108 @@ export default {
|
|
|
icon: 'none',
|
|
|
title: '订单已取消'
|
|
|
});
|
|
|
- this.status = 'CANCELED';
|
|
|
+ this.refreash();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deletes() {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定删除订单?',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.$http.post('orderInfo/delete', { orderInfoId: this.id }).then(res => {
|
|
|
+ wx.hideLoading();
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '订单已删除'
|
|
|
+ });
|
|
|
+ this.refreash();
|
|
|
});
|
|
|
- console.log('=====');
|
|
|
- this.allFn();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
Apply() {
|
|
|
- this.$http.post('orderInfo/refund', { orderInfoId: this.id, remark: '' }).then(res => {
|
|
|
- console.log(res);
|
|
|
+ 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: '退款成功'
|
|
|
+ });
|
|
|
+ this.refreash();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ remind() {
|
|
|
+ this.$http.post('orderInfo/remindMy', { orderInfoId: this.id, remark: '' }).then(res => {
|
|
|
+ wx.hideLoading();
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '提醒成功'
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.allFn();
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
+/deep/ .van-step__circle-container {
|
|
|
+ height: 0;
|
|
|
+}
|
|
|
+/deep/ .van-steps {
|
|
|
+ height: 307px;
|
|
|
+ width: 336px;
|
|
|
+ overflow: auto !important;
|
|
|
+ border-radius: 0 0 12px 12px;
|
|
|
+}
|
|
|
.box-con {
|
|
|
background: #ffffff;
|
|
|
border-radius: 12px;
|
|
|
margin: 8px 16px;
|
|
|
padding-bottom: 5px;
|
|
|
+ .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 {
|
|
|
+ height: 20px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #1a1a1a;
|
|
|
+ line-height: 20px;
|
|
|
+ }
|
|
|
+ .dialog-cv {
|
|
|
+ width: 40px;
|
|
|
+ height: 20px;
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid #c8c9cc;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #c8c9cc;
|
|
|
+ line-height: 20px;
|
|
|
+ text-align: center;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.box-con2 {
|
|
|
margin: 16px 16px;
|
|
|
.box-tit {
|