Feat(订单详情):订单详情重构(缺再来一单接口,功能未实现)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<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-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>
|
||||
<text>请在</text>
|
||||
<u-count-down :time="$global.diffSSS(this.orderInfo.paymentTimeout)"/>
|
||||
@@ -19,7 +19,9 @@
|
||||
<text class="v12-mr-3"> {{ orderInfo.realName }}</text>
|
||||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
||||
</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>
|
||||
|
||||
@@ -321,8 +323,8 @@
|
||||
<view class="v12-justify-between">
|
||||
<view class="" style="position: relative">
|
||||
<text class="btn-more v12-font-24 v12-mr-2" @click="showMore = !showMore">更多</text>
|
||||
<view class="group-float" v-show="showMore">
|
||||
<view class="btn flex jc-center ai-center v12-font-24">延长收货</view>
|
||||
<view class="group-float" v-show="showMore" :style="{top: orderInfo.isExtendedDelivery==0 ? '-60px' : '-32px'}">
|
||||
<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>
|
||||
</view>
|
||||
@@ -338,7 +340,7 @@
|
||||
<view class="v12-justify-between " style="width: 100%">
|
||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||
<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-dark-text v12-dark-border default" @click="
|
||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
||||
@@ -355,15 +357,15 @@
|
||||
<template v-if="status.type == -2">
|
||||
<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" >再买一单</view>
|
||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyOrder">再买一单</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="status.type == -3">
|
||||
<view class="v12-justify-between " style="width: 100%">
|
||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||
<view class="">
|
||||
<view class="bnt v12-dark-text v12-dark-border cancel" >再买一单</view>
|
||||
<view class="bnt v12-primary-text v12-primary-border">立即评价</view>
|
||||
<view class="v12-justify-between ">
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
@@ -380,6 +382,8 @@
|
||||
<view class="bnt v12-primary-text v12-primary-border" @click="goGroupRule(orderInfo)">查看拼团</view>
|
||||
</template>
|
||||
</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>
|
||||
<view class="geoPage" v-if="mapShow">
|
||||
<iframe width="100%" height="100%" frameborder="0" scrolling="no"
|
||||
@@ -395,13 +399,14 @@
|
||||
<script>
|
||||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||
import OrderGoods from "@/components/OrderGoods";
|
||||
import {orderDetail} from "@/api/order";
|
||||
import {orderDetail, orderDelay} from "@/api/order";
|
||||
import Payment from "@/components/Payment";
|
||||
import DataFormat from "@/components/DataFormat";
|
||||
import {copyClipboard} from "@/utils";
|
||||
import {mapGetters} from "vuex";
|
||||
import {cancelOrderHandle, delOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle} from "@/libs/order";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
// import {postCartAdd} from "@/api/store";
|
||||
|
||||
const STATUS = [
|
||||
"待付款",
|
||||
@@ -428,6 +433,8 @@ export default {
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
showExtend: false,
|
||||
delayId: '',
|
||||
showMore: false,
|
||||
isShowPayPwdPop: false,
|
||||
offlinePayStatus: 2,
|
||||
@@ -466,6 +473,33 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
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) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsEvaluate/index",
|
||||
@@ -514,7 +548,7 @@ export default {
|
||||
status = "已退款";
|
||||
break;
|
||||
case -3:
|
||||
status = "已驳回";
|
||||
status = "退款失败";
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
@@ -750,6 +784,13 @@ export default {
|
||||
height: 122rpx;
|
||||
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 {
|
||||
position: absolute;
|
||||
width: 196rpx;
|
||||
|
||||
Reference in New Issue
Block a user