Feat(订单详情):订单详情重构(缺再来一单接口,功能未实现)
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<view :class="refundOrder ? 'on' : ''">
|
<view :class="refundOrder ? 'on' : ''">
|
||||||
<view class="state v12-primary-text v12-font-32 v12-font-bold" v-if="orderInfo.isTickets===1 && orderInfo._status._type == 2">待核销</view>
|
<view class="state v12-primary-text v12-font-32 v12-font-bold" v-if="orderInfo.isTickets===1 && orderInfo._status._type == 2">待核销</view>
|
||||||
<view class="state v12-primary-text v12-font-32 v12-font-bold" v-else>{{ getStatus(orderInfo) }}</view>
|
<view class="state v12-primary-text v12-font-32 v12-font-bold" v-else>{{ getStatus(orderInfo) }}</view>
|
||||||
<view v-if="getStatus(orderInfo)!=='待付款'" class="v12-mt-2 v12-font-24 v12-secondary-dark-text">{{ orderInfo._status._msg }}</view>
|
<view v-if="getStatus(orderInfo)!=='待付款'" class="v12-mt-2 v12-font-24 v12-secondary-dark-text" :class="{'fails-bg': orderInfo._status._type == -3}">{{ orderInfo._status._msg }}</view>
|
||||||
<!-- <view class="pending-payments flex ai-center" v-else>
|
<!-- <view class="pending-payments flex ai-center" v-else>
|
||||||
<text>请在</text>
|
<text>请在</text>
|
||||||
<u-count-down :time="$global.diffSSS(this.orderInfo.paymentTimeout)"/>
|
<u-count-down :time="$global.diffSSS(this.orderInfo.paymentTimeout)"/>
|
||||||
@@ -19,7 +19,9 @@
|
|||||||
<text class="v12-mr-3"> {{ orderInfo.realName }}</text>
|
<text class="v12-mr-3"> {{ orderInfo.realName }}</text>
|
||||||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
<text class="phone">{{ orderInfo.userPhone }}</text>
|
||||||
</div>
|
</div>
|
||||||
<div class="v12-font-28 v12-secondary-dark-text more-t">{{ orderInfo.userAddress }}</div>
|
<div class="v12-font-28 v12-secondary-dark-text more-t">
|
||||||
|
<text>{{ orderInfo.userAddress }}</text>
|
||||||
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -321,8 +323,8 @@
|
|||||||
<view class="v12-justify-between">
|
<view class="v12-justify-between">
|
||||||
<view class="" style="position: relative">
|
<view class="" style="position: relative">
|
||||||
<text class="btn-more v12-font-24 v12-mr-2" @click="showMore = !showMore">更多</text>
|
<text class="btn-more v12-font-24 v12-mr-2" @click="showMore = !showMore">更多</text>
|
||||||
<view class="group-float" v-show="showMore">
|
<view class="group-float" v-show="showMore" :style="{top: orderInfo.isExtendedDelivery==0 ? '-60px' : '-32px'}">
|
||||||
<view class="btn flex jc-center ai-center v12-font-24">延长收货</view>
|
<view v-if="orderInfo.isExtendedDelivery==0" class="btn flex jc-center ai-center v12-font-24" @click="toDelay(orderInfo.orderId)">延长收货</view>
|
||||||
<view class="btn flex jc-center ai-center v12-font-24" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
<view class="btn flex jc-center ai-center v12-font-24" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -338,7 +340,7 @@
|
|||||||
<view class="v12-justify-between " style="width: 100%">
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
<view class="v12-justify-between">
|
<view class="v12-justify-between">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" >再买一单</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyOrder">再买一单</view>
|
||||||
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
||||||
<!-- <view class="bnt v12-dark-text v12-dark-border default" @click="
|
<!-- <view class="bnt v12-dark-text v12-dark-border default" @click="
|
||||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
||||||
@@ -355,15 +357,15 @@
|
|||||||
<template v-if="status.type == -2">
|
<template v-if="status.type == -2">
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" >再买一单</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyOrder">再买一单</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == -3">
|
<template v-if="status.type == -3">
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
<view class="">
|
<view class="v12-justify-between ">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" >再买一单</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyOrder">再买一单</view>
|
||||||
<view class="bnt v12-primary-text v12-primary-border">立即评价</view>
|
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -380,6 +382,8 @@
|
|||||||
<view class="bnt v12-primary-text v12-primary-border" @click="goGroupRule(orderInfo)">查看拼团</view>
|
<view class="bnt v12-primary-text v12-primary-border" @click="goGroupRule(orderInfo)">查看拼团</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
<u-modal :show="showExtend" title="确认延长收货时间?" content='每笔订单只能延长一次哦' showCancelButton
|
||||||
|
@cancel="showExtend=false" @confirm="doneDelay"></u-modal>
|
||||||
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
||||||
<view class="geoPage" v-if="mapShow">
|
<view class="geoPage" v-if="mapShow">
|
||||||
<iframe width="100%" height="100%" frameborder="0" scrolling="no"
|
<iframe width="100%" height="100%" frameborder="0" scrolling="no"
|
||||||
@@ -395,13 +399,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||||
import OrderGoods from "@/components/OrderGoods";
|
import OrderGoods from "@/components/OrderGoods";
|
||||||
import {orderDetail} from "@/api/order";
|
import {orderDetail, orderDelay} from "@/api/order";
|
||||||
import Payment from "@/components/Payment";
|
import Payment from "@/components/Payment";
|
||||||
import DataFormat from "@/components/DataFormat";
|
import DataFormat from "@/components/DataFormat";
|
||||||
import {copyClipboard} from "@/utils";
|
import {copyClipboard} from "@/utils";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
import {cancelOrderHandle, delOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle} from "@/libs/order";
|
import {cancelOrderHandle, delOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle} from "@/libs/order";
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
// import {postCartAdd} from "@/api/store";
|
||||||
|
|
||||||
const STATUS = [
|
const STATUS = [
|
||||||
"待付款",
|
"待付款",
|
||||||
@@ -428,6 +433,8 @@ export default {
|
|||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
showExtend: false,
|
||||||
|
delayId: '',
|
||||||
showMore: false,
|
showMore: false,
|
||||||
isShowPayPwdPop: false,
|
isShowPayPwdPop: false,
|
||||||
offlinePayStatus: 2,
|
offlinePayStatus: 2,
|
||||||
@@ -466,6 +473,33 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
copyClipboard,
|
copyClipboard,
|
||||||
|
toDelay(id) {
|
||||||
|
this.delayId = id;
|
||||||
|
this.showExtend = true;
|
||||||
|
},
|
||||||
|
doneDelay() {
|
||||||
|
orderDelay(this.delayId).then(() => {
|
||||||
|
this.showExtend = false;
|
||||||
|
this.getDetail()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
buyOrder() {
|
||||||
|
// console.log(this.orderInfo);
|
||||||
|
// let q = {
|
||||||
|
// productId: this,
|
||||||
|
// cartNum: that.attr.productSelect.cart_num,
|
||||||
|
// new: 1,
|
||||||
|
// uniqueId: that.attr.productSelect !== undefined ?
|
||||||
|
// that.attr.productSelect.unique : ""
|
||||||
|
// };
|
||||||
|
// const ids = this.orderInfo.cartId
|
||||||
|
// console.log(ids);
|
||||||
|
|
||||||
|
// if (ids.length === 0) return
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pages/order/OrderSubmission/index?id=' + ids
|
||||||
|
// })
|
||||||
|
},
|
||||||
routerGo(cart) {
|
routerGo(cart) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: "/pages/shop/GoodsEvaluate/index",
|
path: "/pages/shop/GoodsEvaluate/index",
|
||||||
@@ -514,7 +548,7 @@ export default {
|
|||||||
status = "已退款";
|
status = "已退款";
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
status = "已驳回";
|
status = "退款失败";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
@@ -750,6 +784,13 @@ export default {
|
|||||||
height: 122rpx;
|
height: 122rpx;
|
||||||
border-radius: 40rpx 40rpx 0rpx 0rpx;
|
border-radius: 40rpx 40rpx 0rpx 0rpx;
|
||||||
}
|
}
|
||||||
|
.fails-bg{
|
||||||
|
padding:10rpx;
|
||||||
|
background: rgba(197,39,51,0.2);
|
||||||
|
border-radius: 8rpx;
|
||||||
|
color: #C52733 !important;
|
||||||
|
line-height: 34rpx
|
||||||
|
}
|
||||||
.group-float {
|
.group-float {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 196rpx;
|
width: 196rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user