|
@@ -2,7 +2,8 @@
|
|
|
<view class="container">
|
|
|
<view class="order-type-info">
|
|
|
<view class="order-type-title">{{orderType.title}}</view>
|
|
|
- <view class="order-type-text">{{orderType.text}}</view>
|
|
|
+ <view class="order-type-text">{{orderType.text}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="address-info-box">
|
|
|
<view class="address-icon">
|
|
@@ -85,7 +86,7 @@
|
|
|
<view class="order-info-row" v-if="orderData.orderStatus == 6">取消时间:{{orderData.cancelTime}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="order-info-box">
|
|
|
+ <view class="order-info-box" v-if="orderData.evaluateResVO.evaluateContent">
|
|
|
<view class="info-title-box">
|
|
|
<view class="info-title">评价信息</view>
|
|
|
</view>
|
|
@@ -113,10 +114,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- </view> -->
|
|
|
- <uni-goods-nav :fill="true" :options="[]" @click="" @buttonClick="orderHandle" class="order-handle" :buttonGroup="buttonGroup" />
|
|
|
- <u-modal v-model="modalShow" :content="modalContent" @confirm="submitHandle" :async-close="true" :show-cancel-button="true"></u-modal>
|
|
|
- <u-top-tips ref="uTips"></u-top-tips>
|
|
|
+ <!-- </view> -->
|
|
|
+ <uni-goods-nav :fill="true" :options="[]" @click="" @buttonClick="orderHandle" class="order-handle" :buttonGroup="buttonGroup" />
|
|
|
+ <u-modal v-model="modalShow" :content="modalContent" @confirm="submitHandle" :async-close="true" :show-cancel-button="true"></u-modal>
|
|
|
+ <u-top-tips ref="uTips"></u-top-tips>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -124,6 +125,8 @@
|
|
|
const NET = require('@/utils/request')
|
|
|
const API = require('@/config/api')
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
orderType: {
|
|
@@ -169,6 +172,20 @@
|
|
|
orderStatus: options.orderStatus,
|
|
|
}, 'GET').then(res => {
|
|
|
this.orderData = res.data
|
|
|
+ if (this.orderData.addOrderTime) {
|
|
|
+ let tempTime = new Date(this.orderData.addOrderTime).getTime()
|
|
|
+ let addTempTime = new Date(tempTime + 1000*60*60*24)
|
|
|
+ let addYear = addTempTime.getFullYear()
|
|
|
+ let addMonth = addTempTime.getMonth()+1
|
|
|
+ let addDay = addTempTime.getDate()
|
|
|
+ let addHours = addTempTime.getHours()
|
|
|
+ let addMin = addTempTime.getMinutes()
|
|
|
+ let addSeconds = addTempTime.getSeconds()
|
|
|
+ this.orderData.overTime = addYear + '年' + addMonth + '月' + addDay + '日' + addHours + ':' + addMin + ':' + addSeconds
|
|
|
+ // this.orderData.tempTimeArr = this.orderData.addOrderTime.split(' ')
|
|
|
+ // let tempDate = new Date(this.orderData.tempTimeArr[0].replace(/-/g, "/"))
|
|
|
+ // this.orderData.overTime = new Date(tempDate.setDate(tempDate.getDate() + 1))
|
|
|
+ }
|
|
|
if (this.orderData.merchantInfoResVO.products.length && this.orderData.merchantInfoResVO.products[0].productType !=
|
|
|
2 && this.orderData.merchantInfoResVO.products[0].productType != 4) {
|
|
|
this.goodType = 1
|
|
@@ -193,15 +210,26 @@
|
|
|
return v.productType == 1
|
|
|
})
|
|
|
if (!someVaule) {
|
|
|
- this.buttonGroup = [{
|
|
|
- text: '申请售后',
|
|
|
- backgroundColor: '#75BD60',
|
|
|
- color: '#fff'
|
|
|
- }, {
|
|
|
- text: '自助采摘',
|
|
|
- backgroundColor: '#52A63A',
|
|
|
- color: '#fff'
|
|
|
- }]
|
|
|
+ if (this.orderData.merchantInfoResVO.products.every(v => {
|
|
|
+ Number(v.productType)
|
|
|
+ return v.productType == 3
|
|
|
+ })) {
|
|
|
+ this.buttonGroup = [{
|
|
|
+ text: '申请售后',
|
|
|
+ backgroundColor: '#75BD60',
|
|
|
+ color: '#fff'
|
|
|
+ }, {
|
|
|
+ text: '自助采摘',
|
|
|
+ backgroundColor: '#52A63A',
|
|
|
+ color: '#fff'
|
|
|
+ }]
|
|
|
+ } else {
|
|
|
+ this.buttonGroup = [{
|
|
|
+ text: '申请售后',
|
|
|
+ backgroundColor: '#75BD60',
|
|
|
+ color: '#fff'
|
|
|
+ }]
|
|
|
+ }
|
|
|
} else {
|
|
|
this.buttonGroup = [{
|
|
|
text: '申请售后',
|
|
@@ -263,7 +291,8 @@
|
|
|
case 1:
|
|
|
this.orderType = {
|
|
|
title: '等待买家付款',
|
|
|
- text: '订单将于' + this.orderData.addOrderTime + '关闭',
|
|
|
+ text: '订单将于' + this.orderData.overTime + '关闭',
|
|
|
+ date: this.orderData.overTime
|
|
|
}
|
|
|
break;
|
|
|
case 2:
|
|
@@ -330,7 +359,7 @@
|
|
|
if (this.orderData.orderStatus == 2) {
|
|
|
// 自助采摘
|
|
|
uni.navigateTo({
|
|
|
- url: '/pagesGood/pickVideo?orderId=' + this.orderData.orderId
|
|
|
+ url: '/pagesGood/pickVideo?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode
|
|
|
});
|
|
|
} else if (this.orderData.orderStatus == 3) {
|
|
|
if (e.index == 1) {
|
|
@@ -382,12 +411,45 @@
|
|
|
})
|
|
|
} else if (this.handleType == 2) {
|
|
|
// 立即支付
|
|
|
- this.modalShow = false
|
|
|
- setTimeout(() => {
|
|
|
- uni.reLaunch({
|
|
|
- url: '/pagesMain/orderList?type=' + 3
|
|
|
- });
|
|
|
- }, 1000)
|
|
|
+ NET.request(API.payOrder, {
|
|
|
+ mid: uni.getStorageSync("userData").userId,
|
|
|
+ orderCode: this.orderData.orderCode,
|
|
|
+ orderId: this.orderData.orderId,
|
|
|
+ }, 'POST').then(res => {
|
|
|
+ this.modalShow = false
|
|
|
+ uni.requestPayment({
|
|
|
+ provider: 'wxpay',
|
|
|
+ timeStamp: res.data.timeStamp,
|
|
|
+ nonceStr: res.data.nonceStr,
|
|
|
+ package: res.data.packageValue,
|
|
|
+ signType: res.data.signType,
|
|
|
+ paySign: res.data.paySign,
|
|
|
+ success: (payRes) => {
|
|
|
+ console.log('success:' + JSON.stringify(payRes));
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: (error) => {
|
|
|
+ console.log('fail:' + JSON.stringify(error));
|
|
|
+ this.$refs.uTips.show({
|
|
|
+ title: '支付失败',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(error => {
|
|
|
+ this.modalShow = false
|
|
|
+ this.$refs.uTips.show({
|
|
|
+ title: error.data.msg,
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // setTimeout(() => {
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url: '/pagesMain/orderList?type=' + 3
|
|
|
+ // });
|
|
|
+ // }, 1000)
|
|
|
} else if (this.handleType == 3) {
|
|
|
// 确认收货
|
|
|
NET.request(API.confirmOrder, {
|
|
@@ -845,7 +907,8 @@
|
|
|
.assess-info {
|
|
|
width: calc(100% - 62px);
|
|
|
margin-left: 12px;
|
|
|
- float: left;
|
|
|
+ float: left;
|
|
|
+
|
|
|
.assess-name {
|
|
|
height: 18px;
|
|
|
float: left;
|
|
@@ -903,20 +966,21 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.shop-reply-box {
|
|
|
width: 100%;
|
|
|
float: left;
|
|
|
background: #F5F5F5;
|
|
|
border-radius: 5px;
|
|
|
margin-top: 10px;
|
|
|
-
|
|
|
+
|
|
|
.shop-head {
|
|
|
width: 100%;
|
|
|
height: 36px;
|
|
|
float: left;
|
|
|
box-sizing: border-box;
|
|
|
padding: 10px 12px;
|
|
|
-
|
|
|
+
|
|
|
.icondianpu {
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
@@ -925,7 +989,7 @@
|
|
|
font-size: 20px;
|
|
|
margin-right: 8px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.shop-name {
|
|
|
height: 16px;
|
|
|
float: left;
|
|
@@ -935,7 +999,7 @@
|
|
|
line-height: 16px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.shop-reply {
|
|
|
width: 100%;
|
|
|
float: left;
|