|
@@ -9,13 +9,19 @@
|
|
|
<div class="container">
|
|
<div class="container">
|
|
|
<div class="box-top">
|
|
<div class="box-top">
|
|
|
<p>{{ status.label }}</p>
|
|
<p>{{ status.label }}</p>
|
|
|
- <h3>{{ status.name }}</h3>
|
|
|
|
|
|
|
+ <h3 v-if="status.orderStatus !== 'CREATED'">{{ status.name }}</h3>
|
|
|
|
|
+ <h3 v-if="status.orderStatus == 'CREATED'">
|
|
|
|
|
+ 未支付将在,<span v-if="minters < 10">0</span>{{ minters }}分<span v-if="seconds < 10">0</span
|
|
|
|
|
+ >{{ seconds }} 后自动取消订单
|
|
|
|
|
+ </h3>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-adderss">
|
|
<div class="box-adderss">
|
|
|
<div
|
|
<div
|
|
|
v-if="
|
|
v-if="
|
|
|
status.orderStatus !== 'CREATED' &&
|
|
status.orderStatus !== 'CREATED' &&
|
|
|
status.orderStatus !== 'PAYED' &&
|
|
status.orderStatus !== 'PAYED' &&
|
|
|
|
|
+ status.orderStatus !== 'REFUND' &&
|
|
|
|
|
+ status.orderStatus !== 'REFUNDED' &&
|
|
|
status.orderStatus !== 'CANCELED'
|
|
status.orderStatus !== 'CANCELED'
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
@@ -41,18 +47,24 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-border"></div>
|
|
<div class="box-border"></div>
|
|
|
- <div class="message">
|
|
|
|
|
|
|
+ <div class="message" v-if="status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'">
|
|
|
<p>买家留言:</p>
|
|
<p>买家留言:</p>
|
|
|
<span>{{ status.remark }}</span>
|
|
<span>{{ status.remark }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-bg"></div>
|
|
<div class="box-bg"></div>
|
|
|
- <div class="box-tit">
|
|
|
|
|
|
|
+ <div class="box-tit" v-if="status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'">
|
|
|
<div>
|
|
<div>
|
|
|
<img :src="store.logo" alt="" />
|
|
<img :src="store.logo" alt="" />
|
|
|
<p>{{ store.storeName }}</p>
|
|
<p>{{ store.storeName }}</p>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="box-tit-seller" @click="seller">共{{ status.length }}件商品</div>
|
|
|
|
|
|
|
+ <!-- <div class="box-tit-seller">共{{ status.cardBoxList.length }}件商品</div> -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="box-tit2" v-if="status.orderStatus == 'REFUND' || status.orderStatus == 'REFUNDED'">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p>退款商品</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="box-tit-seller">共{{ status.cardBoxList.length }}件商品</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-for="(item, index) in Boxes" :key="index.id">
|
|
<div v-for="(item, index) in Boxes" :key="index.id">
|
|
|
<div class="box-con">
|
|
<div class="box-con">
|
|
@@ -83,7 +95,7 @@
|
|
|
<div class="box-buttom">
|
|
<div class="box-buttom">
|
|
|
<div class="box-buttom-con">
|
|
<div class="box-buttom-con">
|
|
|
<p>邮费</p>
|
|
<p>邮费</p>
|
|
|
- <p class="box-buttom-p">¥10</p>
|
|
|
|
|
|
|
+ <p class="box-buttom-p">¥{{ postage || 0 }}</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-buttom">
|
|
<div class="box-buttom">
|
|
@@ -92,7 +104,18 @@
|
|
|
<p class="box-buttom-p3">¥{{ total }}</p>
|
|
<p class="box-buttom-p3">¥{{ total }}</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="status.orderStatus !== 'CREATED'" class="box-buttom">
|
|
|
|
|
|
|
+ <div class="box-buttom" v-if="status.orderStatus == 'REFUND' || status.orderStatus == 'REFUNDED'">
|
|
|
|
|
+ <div class="box-buttom-con">
|
|
|
|
|
+ <p>退款金额</p>
|
|
|
|
|
+ <p class="box-buttom-p3">¥{{ total }}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ status.orderStatus !== 'CREATED' && status.orderStatus !== 'REFUND' && status.orderStatus !== 'REFUNDED'
|
|
|
|
|
+ "
|
|
|
|
|
+ class="box-buttom"
|
|
|
|
|
+ >
|
|
|
<div class="box-buttom-con">
|
|
<div class="box-buttom-con">
|
|
|
<p>支付方式</p>
|
|
<p>支付方式</p>
|
|
|
<p class="box-buttom-p">微信支付</p>
|
|
<p class="box-buttom-p">微信支付</p>
|
|
@@ -100,7 +123,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-border-but"></div>
|
|
<div class="box-border-but"></div>
|
|
|
<!-- 下单时间 -->
|
|
<!-- 下单时间 -->
|
|
|
- <div class="box-footer">
|
|
|
|
|
|
|
+ <div class="box-footer" v-if="status.orderStatus !== 'CANCELED' && status.orderStatus !== 'CREATED'">
|
|
|
<div class="box-footer-con">
|
|
<div class="box-footer-con">
|
|
|
<p>订单编号</p>
|
|
<p>订单编号</p>
|
|
|
<div class="box-footer-cr">
|
|
<div class="box-footer-cr">
|
|
@@ -121,7 +144,7 @@
|
|
|
<p class="box-footer-p">{{ status.paidTime }}</p>
|
|
<p class="box-footer-p">{{ status.paidTime }}</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="box-footer">
|
|
|
|
|
|
|
+ <div class="box-footer" v-if="status.orderStatus !== 'CANCELED' && status.orderStatus !== 'CREATED'">
|
|
|
<div class="box-footer-con">
|
|
<div class="box-footer-con">
|
|
|
<p>成交时间</p>
|
|
<p>成交时间</p>
|
|
|
<p class="box-footer-p">{{ status.paidTime }}</p>
|
|
<p class="box-footer-p">{{ status.paidTime }}</p>
|
|
@@ -147,6 +170,15 @@
|
|
|
<img src="/native/imgs/btn_01@3x.png" alt="" />
|
|
<img src="/native/imgs/btn_01@3x.png" alt="" />
|
|
|
<span>联系买家</span>
|
|
<span>联系买家</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 售后中 -->
|
|
|
|
|
+ <div v-if="status.orderStatus === 'REFUND'" class="box-btn-left2" @click="Buyers">
|
|
|
|
|
+ <img src="/native/imgs/btn_04@3x.png" alt="" />
|
|
|
|
|
+ <span>联系买家</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="status.orderStatus === 'REFUND'" class="box-btn-right">
|
|
|
|
|
+ <img src="/native/imgs/btn_01@3x.png" alt="" />
|
|
|
|
|
+ <span>同意退款</span>
|
|
|
|
|
+ </div>
|
|
|
<!-- 待发货 -->
|
|
<!-- 待发货 -->
|
|
|
<div v-if="status.orderStatus === 'PAYED'" class="box-btn-left2" @click="cancel">
|
|
<div v-if="status.orderStatus === 'PAYED'" class="box-btn-left2" @click="cancel">
|
|
|
<img src="/native/imgs/btn_04@3x.png" alt="" />
|
|
<img src="/native/imgs/btn_04@3x.png" alt="" />
|
|
@@ -218,13 +250,70 @@ export default {
|
|
|
logisTics: [],
|
|
logisTics: [],
|
|
|
stepsList: [],
|
|
stepsList: [],
|
|
|
stepsShow: [],
|
|
stepsShow: [],
|
|
|
- store: []
|
|
|
|
|
|
|
+ store: {},
|
|
|
|
|
+ postage: {},
|
|
|
|
|
+ user: {},
|
|
|
|
|
+ minters: 0,
|
|
|
|
|
+ seconds: 0,
|
|
|
|
|
+ allTime: 5 * 60 - 1,
|
|
|
|
|
+ closeTime: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
logisticShow() {
|
|
logisticShow() {
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
},
|
|
},
|
|
|
|
|
+ initTime(dingdanId, initTime) {
|
|
|
|
|
+ let oldTime = new Date(initTime).valueOf();
|
|
|
|
|
+ let newTime = new Date().valueOf();
|
|
|
|
|
+ let matchedTime = undefined;
|
|
|
|
|
+ let matchedTime1 = undefined;
|
|
|
|
|
+ if (oldTime) {
|
|
|
|
|
+ matchedTime = newTime - oldTime;
|
|
|
|
|
+ matchedTime1 = this.allTime - parseInt(matchedTime / 1000);
|
|
|
|
|
+ if (matchedTime1 > 0) {
|
|
|
|
|
+ this.timeout(matchedTime1);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // this.getFn();
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (dingdanId) {
|
|
|
|
|
+ this.timeout(this.allTime);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ timeout(time) {
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ _this.minters = parseInt(time / 60) > 0 ? parseInt(time / 60) : 0;
|
|
|
|
|
+ _this.seconds = parseInt(time - _this.minters * 60);
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (_this.minters > 0) {
|
|
|
|
|
+ _this.closeTime = setInterval(() => {
|
|
|
|
|
+ _this.seconds--;
|
|
|
|
|
+ if (_this.seconds <= 0) {
|
|
|
|
|
+ _this.minters--;
|
|
|
|
|
+ if (_this.minters == -1) {
|
|
|
|
|
+ _this.minters = 0;
|
|
|
|
|
+ _this.seconds = 0;
|
|
|
|
|
+ clearInterval(_this.closeTime);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.seconds = 60;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.closeTime = setInterval(() => {
|
|
|
|
|
+ _this.seconds--;
|
|
|
|
|
+ if (_this.seconds <= 0) {
|
|
|
|
|
+ _this.seconds = 0;
|
|
|
|
|
+ clearInterval(_this.closeTime);
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ console.log(err);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
getFn() {
|
|
getFn() {
|
|
|
this.showLoading();
|
|
this.showLoading();
|
|
|
this.$http
|
|
this.$http
|
|
@@ -232,20 +321,30 @@ export default {
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
this.hideLoading();
|
|
this.hideLoading();
|
|
|
this.status = res;
|
|
this.status = res;
|
|
|
|
|
+ this.user = res.user;
|
|
|
this.addressList = res.address;
|
|
this.addressList = res.address;
|
|
|
this.total = res.total;
|
|
this.total = res.total;
|
|
|
this.store = res.store;
|
|
this.store = res.store;
|
|
|
this.Boxes = res.cardBoxList;
|
|
this.Boxes = res.cardBoxList;
|
|
|
this.orderInfoId = res.id;
|
|
this.orderInfoId = res.id;
|
|
|
|
|
+ this.postage = res.cardCase.postage;
|
|
|
this.cardCaseInfo = res.cardCase.collection;
|
|
this.cardCaseInfo = res.cardCase.collection;
|
|
|
if (this.status.orderStatus === 'CREATED') {
|
|
if (this.status.orderStatus === 'CREATED') {
|
|
|
this.status.label = '买家待支付';
|
|
this.status.label = '买家待支付';
|
|
|
- this.status.name = '未支付将自动取消订单';
|
|
|
|
|
|
|
+ this.initTime(this.orderInfoId, this.status.createdAt);
|
|
|
}
|
|
}
|
|
|
if (this.status.orderStatus === 'CANCELED') {
|
|
if (this.status.orderStatus === 'CANCELED') {
|
|
|
this.status.label = '交易关闭';
|
|
this.status.label = '交易关闭';
|
|
|
this.status.name = '很遗憾,订单已取消';
|
|
this.status.name = '很遗憾,订单已取消';
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.status.orderStatus === 'REFUND') {
|
|
|
|
|
+ this.status.label = '买家申请退款';
|
|
|
|
|
+ this.status.name = '请尽快处理';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.status.orderStatus === 'REFUNDED') {
|
|
|
|
|
+ this.status.label = '退款成功';
|
|
|
|
|
+ this.status.name = '退款成功,72小时内退还';
|
|
|
|
|
+ }
|
|
|
if (this.status.orderStatus === 'PAYED') {
|
|
if (this.status.orderStatus === 'PAYED') {
|
|
|
this.status.label = '待发货';
|
|
this.status.label = '待发货';
|
|
|
this.status.name = '订单支付成功,处理发货';
|
|
this.status.name = '订单支付成功,处理发货';
|
|
@@ -286,17 +385,8 @@ export default {
|
|
|
// }
|
|
// }
|
|
|
// }, 1000);
|
|
// }, 1000);
|
|
|
},
|
|
},
|
|
|
- deliver() {
|
|
|
|
|
- wx.showToast({
|
|
|
|
|
- title: '敬请开放',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
Buyers() {
|
|
Buyers() {
|
|
|
- wx.showToast({
|
|
|
|
|
- title: '敬请开放',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.navigateTo('/pages/chat?toUserId=' + this.store.userId + '&toName=' + this.user.nickname);
|
|
|
},
|
|
},
|
|
|
logistics() {
|
|
logistics() {
|
|
|
this.showLoading();
|
|
this.showLoading();
|
|
@@ -325,24 +415,6 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- sales() {
|
|
|
|
|
- wx.showToast({
|
|
|
|
|
- title: '敬请开放',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- seller() {
|
|
|
|
|
- wx.showToast({
|
|
|
|
|
- title: '敬请开放',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- Apply() {
|
|
|
|
|
- wx.showToast({
|
|
|
|
|
- title: '敬请开放',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
cancel() {
|
|
cancel() {
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -553,6 +625,24 @@ export default {
|
|
|
line-height: 22px;
|
|
line-height: 22px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .box-tit2 {
|
|
|
|
|
+ .flex();
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ margin: 20px 20px 0 20px;
|
|
|
|
|
+ p {
|
|
|
|
|
+ height: 22px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #000000;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .box-tit-seller {
|
|
|
|
|
+ height: 22px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
.box-con {
|
|
.box-con {
|
|
|
height: 90px;
|
|
height: 90px;
|
|
|
background: #ffffff;
|
|
background: #ffffff;
|