1416 lines
49 KiB
Vue
1416 lines
49 KiB
Vue
<template>
|
||
<view class="order-details" style="padding: 30rpx;" @click="handleBody" v-if="!loading && orderInfo.isTickets !== undefined">
|
||
<!-- 给header上与data上加on为退款订单-->
|
||
<view class=" v12-pa-3 v12-white" :class="refundOrder ? 'on' : ''" style="border-radius: 20rpx;" v-if="!isGift">
|
||
<!-- <view class="status-img-box">
|
||
<image class="status-img" :src="getStatusImg(orderInfo)" mode=""></image>
|
||
</view> -->
|
||
<view :class="refundOrder ? 'on' : ''">
|
||
<view
|
||
v-if="isGroup && orderInfo._status._type === 2"
|
||
class="state v12-primary-text v12-font-32 v12-font-bold"
|
||
>待使用</view>
|
||
<view
|
||
v-else-if="orderInfo.isTickets === 1 && orderInfo._status._type === 2"
|
||
class="state v12-primary-text v12-font-32 v12-font-bold"
|
||
>待核销</view>
|
||
<view
|
||
v-else
|
||
class="state v12-primary-text v12-font-32 v12-font-bold"
|
||
>{{ getStatus(orderInfo) }}</view>
|
||
<view v-if="isGroup && orderInfo._status._type === 2" class="v12-mt-2 v12-font-24 v12-secondary-dark-text">
|
||
您已下单成功,请联系商家确认具体的入住时间
|
||
</view>
|
||
<view
|
||
v-if="getStatus(orderInfo)!=='待付款'"
|
||
:class="{'fails-bg': orderInfo._status._type === -3}"
|
||
class="v12-mt-2 v12-font-24 v12-secondary-dark-text"
|
||
>
|
||
<view>{{ orderInfo._status._msg }}</view>
|
||
<view v-if="orderInfo._status._type === -3">驳回原因: {{ orderInfo.refundRejectReason }}</view>
|
||
</view>
|
||
<view class="pending-payments flex ai-center v12-mt-2 v12-font-24 v12-secondary-dark-text" v-else>
|
||
<text>需支付{{ orderInfo.payPrice }}元,</text>
|
||
<!-- {{ orderInfo.paymentTimeout }} -->
|
||
剩余<u-count-down format="HH:mm:ss" autoStart :time="$global.diffSSS(orderInfo.paymentTimeout)" />订单将自动取消
|
||
</view>
|
||
<u-divider></u-divider>
|
||
<template v-if="Number(orderInfo.isAddressUpdate) === 1 && [0, 2].includes(Number(orderInfo.addressUpdateStatus))">
|
||
<div class="name v12-mb-3 v12-font-28 v12-font-bold flex ai-center">
|
||
<text class="v12-mr-3"> {{ orderInfo.oldRealName }}</text>
|
||
<text class="phone">{{ orderInfo.oldUserPhone }}</text>
|
||
<text class="v12-font-22 v12-px-2 v12-ml-2 v12-primary-text v12-primary-border" style="border-radius: 8rpx; padding: 2rpx 10rpx;">原地址</text>
|
||
</div>
|
||
<div class="v12-font-28 v12-secondary-dark-text v12-justify-between">
|
||
<text class=" more-t" style="flex: 2;">{{ orderInfo.oldUserAddress }}</text>
|
||
</div>
|
||
|
||
<div class="name v12-mb-3 v12-mt-4 v12-font-28 v12-font-bold flex ai-center">
|
||
<text class="v12-mr-3"> {{ orderInfo.realName }}</text>
|
||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
||
<text class="v12-font-22 v12-px-2 v12-ml-2 v12-primary-text v12-primary-border" style="border-radius: 8rpx; padding: 2rpx 10rpx;">新地址</text>
|
||
</div>
|
||
<div class="v12-font-28 v12-secondary-dark-text v12-justify-between">
|
||
<text class=" more-t" style="flex: 2;">{{ orderInfo.userAddress }}</text>
|
||
</div>
|
||
</template>
|
||
<template v-else>
|
||
<div class="name v12-mb-3 v12-font-28 v12-font-bold">
|
||
<text class="v12-mr-3"> {{ orderInfo.realName }}</text>
|
||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
||
</div>
|
||
<div class="v12-font-28 v12-secondary-dark-text v12-justify-between">
|
||
<text class=" more-t" style="flex: 2;">{{ orderInfo.userAddress }}</text>
|
||
<view v-if="canShowModifyAddress(orderInfo)" @click="goAddress" class="v12-btn cancel v12-dark-text v12-dark-border v12-radius-40" >修改地址</view>
|
||
</div>
|
||
</template>
|
||
|
||
<view
|
||
v-if="!isrefund && Number(orderInfo.isAddressUpdate) === 1 && [0, 2].includes(Number(orderInfo.addressUpdateStatus))"
|
||
class="v12-mt-3"
|
||
>
|
||
<view
|
||
v-if="Number(orderInfo.addressUpdateStatus) === 0"
|
||
class="v12-font-24 v12-primary-text"
|
||
style="background: rgba(246,246,246,0.7); border-radius: 40rpx; padding: 12rpx;"
|
||
>修改地址正在审核中,请耐心等待</view>
|
||
<view
|
||
v-if="Number(orderInfo.addressUpdateStatus) === 2"
|
||
class="v12-font-24 v12-primary-text"
|
||
style="background: rgba(246,246,246,0.7); border-radius: 40rpx; padding: 12rpx;"
|
||
>修改地址审核未通过,{{ orderInfo.addressUpdateReason }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view v-if="orderInfo.deliveryId !== null && ([-1, -2, 3, 4].includes(orderInfo._status._type) || (orderInfo._status._type == 2 && orderInfo.isTickets !== 1))">
|
||
<view
|
||
v-for="(delivery, index) in orderInfo.deliveryInfo"
|
||
:key="index"
|
||
:class="{
|
||
'order-deliver-item-show': index < 2 || showMoreDeliver
|
||
}"
|
||
class="v12-radius-20 v12-white v12-pa-3 v12-mt-4"
|
||
>
|
||
<view class="v12-align-center">
|
||
<text class="v12-secondary-dark-text v12-font-28">{{ delivery.deliveryName }}:{{ delivery.deliveryId }}</text>
|
||
<text class="v12-font-22 v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(delivery.deliveryId)">
|
||
复制
|
||
</text>
|
||
</view>
|
||
<view class="v12-mt-2 v12-justify-between" @click="goLogistics(orderInfo, index)">
|
||
<view class="v12-align-center">
|
||
<view class="v12-align-center v12-mr-2">
|
||
<image class="logo" :src="webUrl+'/orderIcon/car.png'" mode="" style="margin-right:0; width: 32rpx; height:32rpx"/>
|
||
</view>
|
||
<view class="v12-font-28 v12-secondary-dark-text">{{ logistics[index] && logistics[index].Traces && logistics[index].Traces.length > 0 ? logistics[index] && logistics[index].Traces[logistics[index].Traces.length - 1].acceptStation : '暂无轨迹信息'}}</view>
|
||
</view>
|
||
<view>
|
||
<uni-icons type="right" size="20" color="#707070"></uni-icons>
|
||
</view>
|
||
</view>
|
||
<view class="v12-mt-2 time-wrap">
|
||
<text class="v12-dark-text v12-font-24">{{ logistics[index] && logistics[index].Traces && logistics[index].Traces.length > 0 ? logistics[index] && logistics[index].Traces[logistics[index].Traces.length - 1].acceptTime : '' }}</text>
|
||
<view
|
||
v-if="delivery.estimatedTime"
|
||
:style="{
|
||
color: '#297EE0;',
|
||
}"
|
||
class="v12-font-26 time-box"
|
||
>
|
||
<image :src="webUrl+'/orderIcon/787.png'" class="time-bg"></image>
|
||
{{ delivery.estimatedTime }}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="v12-justify-center v12-mt-3" v-if="orderInfo.deliveryInfo.length > 2">
|
||
<u-icon :name="showMoreDeliver ? 'arrow-up' : 'arrow-down'" @click="handleShowMore"></u-icon>
|
||
</view>
|
||
</view>
|
||
<template v-if="!refundOrder">
|
||
<view
|
||
v-if="orderInfo.isTickets === 1 && orderInfo._status._type === 2"
|
||
class="code-box flex jc-center ai-center"
|
||
>
|
||
<view v-if="isGroup && orderInfo.verifyCode" class="v12-primary-text v12-font-28 v12-mb-2">核销码:{{ orderInfo.verifyCode }}</view>
|
||
<image class="code-img" :src="orderInfo.code"/>
|
||
<view class="v12-justify-center v12-align-center v12-mt-2" v-if="isGroup">
|
||
<view class="bnt v12-dark-text v12-dark-border cancel v12-mx-1" @click="call(system_store.phone)">商家电话</view>
|
||
<view class="bnt v12-dark-text v12-dark-border cancel v12-mx-1" @click="showMerchantWechat">商家微信</view>
|
||
</view>
|
||
</view>
|
||
<template v-else>
|
||
<div
|
||
v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1"
|
||
class="writeOff"
|
||
style="margin-top: 30rpx;border-radius: 24rpx;"
|
||
>
|
||
<div class="title">核销信息</div>
|
||
<div class="grayBg">
|
||
<div class="pictrue">
|
||
<img :src="orderInfo.code"/>
|
||
</div>
|
||
</div>
|
||
<div class="gear">
|
||
<img :src="webUrl+'/20230526114305172550.jpg'"/>
|
||
</div>
|
||
<div class="num">{{ orderInfo.verifyCode }}</div>
|
||
<div class="rules">
|
||
<div class="item">
|
||
<div class="rulesTitle acea-row row-middle">
|
||
<span class="iconfont icon-shijian"></span>核销时间
|
||
</div>
|
||
<div class="info">
|
||
每日:
|
||
<span class="time">{{ system_store.dayTime }}</span>
|
||
</div>
|
||
</div>
|
||
<div class="item">
|
||
<div class="rulesTitle acea-row row-middle">
|
||
<span class="iconfont icon-shuoming1"></span>使用说明
|
||
</div>
|
||
<div class="info">可将二维码出示给店员扫描或提供数字核销码</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="map acea-row row-between-wrapper" v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1">
|
||
<div>自提地址信息</div>
|
||
<div class="place cart-color acea-row row-center-wrapper" @click="showChang(orderInfo.systemStore)">
|
||
<span class="iconfont icon-weizhi"></span>查看位置
|
||
</div>
|
||
</div>
|
||
|
||
<div class="address" v-if="orderInfo.shippingType !== 1">
|
||
<div class="name">
|
||
{{ system_store.name }}
|
||
<span class="phone">{{ system_store.phone }}</span>
|
||
<span class="iconfont icon-tonghua font-color-red" :href="'tel:' + system_store.phone"></span>
|
||
</div>
|
||
<div>{{ system_store.address }}</div>
|
||
</div>
|
||
</template>
|
||
</template>
|
||
|
||
<view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white">
|
||
<!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> -->
|
||
<view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in orderInfo.cartInfo" :key="d" @click="goGoodsCon(cart, orderInfo.isGiftCardReceiveBlind)">
|
||
<view class="v12-justify-between" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||
<view class="">
|
||
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.productInfo.image"></image>
|
||
</view>
|
||
<view class="v12-justify-between v12-flex-column v12-ml-2" style="flex: 2">
|
||
<view class="v12-font-28 v12-dark-text v12-font-bold more-t">
|
||
{{ cart.productInfo.storeName }}
|
||
</view>
|
||
<view v-if="cart.productInfo.attrInfo" class="more-t v12-secondary-dark-text v12-font-24">
|
||
{{ cart.productInfo.attrInfo.sku }}
|
||
</view>
|
||
</view>
|
||
<view class="v12-justify-between v12-flex-column v12-dark-text v12-text-right">
|
||
<view class=" ">
|
||
<text class="v12-font-22">
|
||
¥
|
||
</text>
|
||
<text class="v12-font-28">{{ cart.truePrice }}</text>
|
||
</view>
|
||
<view class="v12-font-22">
|
||
<text>x{{ cart.cartNum }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="v12-justify-between" v-else>
|
||
<view class="">
|
||
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="webUrl+'/orderIcon/盲盒礼包.png'"></image>
|
||
</view>
|
||
<view class="v12-justify-between v12-flex-column v12-ml-2 v12-py-2" style="flex: 2">
|
||
<view class="v12-font-28 v12-dark-text v12-font-bold more-t">
|
||
盲盒礼物
|
||
</view>
|
||
<view class="more-t v12-secondary-dark-text v12-font-24">
|
||
待收货后展示商品信息
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="" v-if="orderInfo.cartInfo &&( d === orderInfo.cartInfo.length - 1)">
|
||
<view class="v12-justify-between v12-align-center v12-mt-3 v12-dark-text" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||
<view class="v12-font-24 v12-dark-text">
|
||
商品总价
|
||
</view>
|
||
<view class="v12-text-right">
|
||
<text class="v12-font-22">¥</text>
|
||
<text class="v12-font-28">
|
||
{{ force2Decimal(orderInfo.totalPrice) }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.payPostage > 0">
|
||
<view class="v12-font-24 v12-dark-text">
|
||
运费
|
||
</view>
|
||
<view class="v12-text-right">
|
||
<text class="v12-font-22">¥</text>
|
||
<text class="v12-font-28">
|
||
{{ force2Decimal(orderInfo.payPostage) }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.couponPrice > 0">
|
||
<view class="v12-font-24 v12-dark-text">
|
||
满减优惠
|
||
</view>
|
||
<view class="v12-text-right">
|
||
-
|
||
<text class="v12-font-22">¥</text>
|
||
<text class="v12-font-28">
|
||
{{ force2Decimal(orderInfo.couponPrice) }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.discountPrice > 0 && orderInfo.isGiftCardReceiveBlind === 0">
|
||
<view class="v12-font-24 v12-dark-text">
|
||
商品折扣
|
||
</view>
|
||
<view class="v12-text-right">
|
||
-
|
||
<text class="v12-font-22">¥</text>
|
||
<text class="v12-font-28">
|
||
{{ force2Decimal(orderInfo.discountPrice) }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.useIntegral > 0">
|
||
<view class="v12-font-24 v12-dark-text">
|
||
积分抵扣
|
||
</view>
|
||
<view class="v12-text-right">
|
||
-
|
||
<text class="v12-font-22">¥</text>
|
||
<text class="v12-font-28">
|
||
{{ force2Decimal(orderInfo.deductionPrice) }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
<u-divider></u-divider>
|
||
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||
<view class="v12-font-28 v12-font-bold v12-dark-text">
|
||
实付款
|
||
</view>
|
||
<view class="v12-text-right v12-font-bold v12-primary-text">
|
||
<text class="v12-font-22">¥</text>
|
||
<text class="v12-font-28">
|
||
{{ force2Decimal(orderInfo.payPrice) }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="wrapper v12-radius-20 v12-mt-7" style="margin-top: 30rpx">
|
||
<!-- <view class="item acea-row row-middle"
|
||
style="font-size: 40rpx;color: #080F1A;font-weight: bold;flex-wrap: nowrap;">
|
||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210808003431044270.png'"
|
||
mode=""></image>
|
||
<text style="font-size: 26rpx;color: #080F1A;">订单信息</text>
|
||
</view> -->
|
||
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||
<view class="flex-0">订单编号</view>
|
||
<view class="v12-text-right ">
|
||
{{ orderInfo.orderId }}
|
||
<text class="v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(orderInfo.orderId)">
|
||
复制
|
||
</text>
|
||
<!-- <image @click="copyClipboard(orderInfo.orderId)" style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
|
||
:src="webUrl+'/20210808003517657208.png'" mode=""></image> -->
|
||
</view>
|
||
</view>
|
||
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||
<view class="flex-0">下单时间</view>
|
||
<view class="v12-text-right">
|
||
<text>{{ orderInfo.createTime }}</text>
|
||
</view>
|
||
</view>
|
||
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||
<view class="flex-0">订单类型</view>
|
||
<view class="v12-text-right">{{ orderTypeName }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||
<view class="flex-0">支付状态</view>
|
||
<view class="v12-text-right">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||
<view class="flex-0">支付方式</view>
|
||
<view class="v12-text-right">{{ orderInfo._status._payType }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between v12-font-24 v12-dark-text" v-if="orderInfo.mark">
|
||
<view class="flex-0">买家备注:</view>
|
||
<view class="v12-text-right conttent-left">{{ orderInfo.mark }}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view v-if="false">
|
||
<view class="wrapper" v-if="true">
|
||
<view class="item acea-row row-between">
|
||
<view class="flex-0">配送方式:</view>
|
||
<view class="conter">发货</view>
|
||
</view>
|
||
<view class="item acea-row row-between">
|
||
<view class="flex-0">快递公司:</view>
|
||
<view class="conter">{{ orderInfo.deliveryName || "" }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between">
|
||
<view class="flex-0">快递号:</view>
|
||
<view class="conter">{{ orderInfo.deliveryId || "" }}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="wrapper" v-else>
|
||
<view class="item acea-row row-between">
|
||
<view class="flex-0">配送方式:</view>
|
||
<view class="conter">送货</view>
|
||
</view>
|
||
<view class="item acea-row row-between">
|
||
<view class="flex-0">配送人:</view>
|
||
<view class="conter">{{ orderInfo.deliveryName || "" }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between">
|
||
<view class="flex-0">配送电话:</view>
|
||
<view class="conter acea-row row-middle row-right">
|
||
{{ orderInfo.deliveryId || "" }}
|
||
<text class="copy">拨打</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 退款订单详情 -->
|
||
<view class="wrapper" v-if="false">
|
||
<view class="item acea-row row-between">
|
||
<view>收货人:</view>
|
||
<view class="conter">{{ orderInfo.realName }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between">
|
||
<view>联系电话:</view>
|
||
<view class="conter">{{ orderInfo.userPhone }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between">
|
||
<view>收货地址:</view>
|
||
<view class="conter">{{ orderInfo.userAddress }}</view>
|
||
</view>
|
||
</view>
|
||
<view v-if="false" class="wrapper" style="margin-top: 30rpx;border-radius: 24rpx;">
|
||
<view class="item acea-row row-between" style="flex-wrap: nowrap;">
|
||
<view class="acea-row row-middle" style="font-size: 40rpx;color: #080F1A;font-weight: bold;flex-wrap: nowrap;">
|
||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210808003453973795.png'"
|
||
mode=""></image>
|
||
<text style="font-size: 26rpx;color: #080F1A;">支付金额:</text>
|
||
</view>
|
||
<view class="conter" style="width: auto !important;">¥{{ force2Decimal(orderInfo.totalPrice) }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between" v-if="orderInfo.couponPrice > 0">
|
||
<view class="flex-0">优惠券抵扣:</view>
|
||
<view class="conter">-¥{{ force2Decimal(orderInfo.couponPrice) }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between" v-if="orderInfo.useIntegral > 0">
|
||
<view>积分抵扣:</view>
|
||
<view class="conter">-¥{{ force2Decimal(orderInfo.deductionPrice) }}</view>
|
||
</view>
|
||
<view class="item acea-row row-between" v-if="orderInfo.payPostage > 0">
|
||
<view>运费:</view>
|
||
<view class="conter">¥{{ force2Decimal(orderInfo.payPostage) }}</view>
|
||
</view>
|
||
<view class="actualPay acea-row row-right row-middle">
|
||
<text style="font-size: 24rpx;">实付款:</text>
|
||
<text class="money font-color-red">¥{{ force2Decimal(orderInfo.payPrice) }}</text>
|
||
</view>
|
||
</view>
|
||
<view
|
||
v-if="isGift"
|
||
class="gift-wrap"
|
||
>
|
||
<view class="v12-justify-between v12-align-center">
|
||
<view class="v12-font-28 v12-font-bold v12-align-center">
|
||
<u-icon :name="webUrl + '/icon/gift-primary.png'" size="24"></u-icon>
|
||
{{ `已领取${orderInfo.giftCardInfo.receiveNum}/${orderInfo.giftCardInfo.giftNum}份礼包` }}
|
||
</view>
|
||
<view
|
||
v-if="orderInfo.giftCardInfo.refundNum > 0"
|
||
class="v12-font-bold v12-primary-text v12-font-24"
|
||
>{{ `剩余${orderInfo.giftCardInfo.refundNum}份已退回` }}</view>
|
||
</view>
|
||
<view
|
||
v-for="(receive, index) in orderInfo.giftCardInfo.receiveInfo"
|
||
:key="index"
|
||
class="v12-mt-3 v12-justify-between v12-align-center"
|
||
>
|
||
<view class="v12-font-24">{{ receive.userNickname }}</view>
|
||
<view class="v12-font-24">{{ receive.receiveStatus ? '已领取' : '未领取' }}</view>
|
||
</view>
|
||
</view>
|
||
<view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view>
|
||
<view class="footer acea-row row-right row-middle" v-if="!refundOrder && offlineStatus">
|
||
<template v-if="status.type == 0">
|
||
<view class="v12-justify-between v12-align-center full-width" style="width: 100%">
|
||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||
<view class="v12-justify-between v12-align-center">
|
||
<view class="">
|
||
<text class="v12-font-22 v12-dark1-text">
|
||
共{{ orderInfo.totalNum }}件商品
|
||
</text>
|
||
<text class="v12-font-bold v12-dark-text v12-font-28 v12-mx-2">
|
||
实付款
|
||
</text>
|
||
<text class="v12-font-bold v12-primary-text v12-font-22">
|
||
¥
|
||
</text>
|
||
<text class="v12-font-bold v12-primary-text v12-font-28">
|
||
{{ force2Decimal(orderInfo.payPrice) }}
|
||
</text>
|
||
</view>
|
||
<view class="bnt v12-primary-text v12-primary-border v12-ml-1" @click="subscribePay">立即付款</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="status.type == 1" >
|
||
<view class="v12-justify-between " style="width: 100%">
|
||
<view class="v12-justify-between ">
|
||
<view v-if="orderInfo.isGiftCardReceiveBlind === 0" class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="delayOrder">催发货</view>
|
||
<view v-if="canShowModifyAddress(orderInfo)" class="bnt v12-dark-text v12-dark-border cancel" @click="goAddress">修改地址</view>
|
||
</view>
|
||
<view class="bnt v12-primary-text v12-primary-border cancel" @click="goGoodsReturn2(orderInfo)">申请退款</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="status.type == 2">
|
||
<view class="v12-justify-between " style="width: 100%">
|
||
<view v-if="orderInfo.isGiftCardReceiveBlind === 0" class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||
<view class="" v-else></view>
|
||
<view class="v12-justify-between">
|
||
<view class="btn-more" style="position: relative">
|
||
<view class=" v12-font-24 v12-mr-2" @click.stop="showMore = !showMore">更多</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>
|
||
<!-- <view class="bnt v12-dark-text v12-dark-border default"
|
||
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})"
|
||
v-if="orderInfo.isTickets!==1">查看物流
|
||
</view> -->
|
||
<view class="bnt v12-primary-text v12-primary-border" @click="takeOrder">确认收货</view>
|
||
</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="v12-justify-between">
|
||
<view class="btn-more" style="position: relative">
|
||
<text class=" v12-font-24 v12-mr-2" @click.stop="showMore = !showMore">更多</text>
|
||
<view class="group-float" v-show="showMore" :style="{top: '-32px'}">
|
||
<view class="btn flex jc-center ai-center v12-font-24" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
||
</view>
|
||
</view>
|
||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</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 }})
|
||
" v-if="orderInfo.isTickets!==1">查看物流
|
||
</view> -->
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="status.type == -1">
|
||
<view style="width: 100%">
|
||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||
</view>
|
||
</template>
|
||
<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" @click="buyAgin">再买一单</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="v12-justify-between ">
|
||
|
||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="status.type == 4">
|
||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="delOrder">删除订单</view>
|
||
<!-- <view
|
||
v-if="orderInfo.isTickets !== 1"
|
||
class="bnt v12-dark-text v12-dark-border default"
|
||
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})"
|
||
>查看物流
|
||
</view> -->
|
||
</template>
|
||
<template v-if="status.type == 6">
|
||
<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"
|
||
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"></iframe>
|
||
</view>
|
||
|
||
<passkeyborad v-if="isShowPayPwdPop" :money="orderInfo.payPrice" showMoney :show="isShowPayPwdPop" ref='payPwdPop' @close="pwdPopClose"
|
||
@finish="pwdPopFinish"></passkeyborad>
|
||
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||
import OrderGoods from "@/components/OrderGoods";
|
||
import {orderDetail, orderDelay, aginConfirm, express, applyEditAddress, orderExpectedArrivalTime, groupOrderDetail} 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 = [
|
||
"待付款",
|
||
"待发货",
|
||
"待收货",
|
||
"待评价",
|
||
"已完成",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"待付款"
|
||
];
|
||
const NAME = "OrderDetails";
|
||
|
||
export default {
|
||
name: NAME,
|
||
components: {
|
||
OrderGoods,
|
||
Payment,
|
||
DataFormat,
|
||
passkeyborad
|
||
},
|
||
mixins: [pageListenMixins],
|
||
data: function () {
|
||
return {
|
||
showMoreDeliver: false,
|
||
showExtend: false,
|
||
delayId: '',
|
||
showMore: false,
|
||
isShowPayPwdPop: false,
|
||
offlinePayStatus: 2,
|
||
orderTypeName: "普通订单",
|
||
orderTypeNameStatus: true,
|
||
offlineStatus: true,
|
||
id: "",
|
||
orderInfo: {
|
||
_status: {}
|
||
},
|
||
status: {},
|
||
pay: false,
|
||
payType: ["yue", "weixin"],
|
||
from: this.$deviceType,
|
||
system_store: {},
|
||
mapKay: "",
|
||
mapShow: false,
|
||
payPassword: null,
|
||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||
pageKeyId: Object.freeze('userOrderInfo'),
|
||
logistics: {},
|
||
isGift: false,
|
||
isGroup: false,
|
||
key: "",
|
||
loading: true,
|
||
addressEditOrderId: ""
|
||
};
|
||
},
|
||
computed: {
|
||
isrefund() {
|
||
const status = Number(this.orderInfo._status._type)
|
||
return status< 0
|
||
},
|
||
refundOrder() {
|
||
return this.orderInfo.refund_status > 0;
|
||
},
|
||
...mapGetters(["userInfo"])
|
||
},
|
||
onLoad(opts) {
|
||
this.isGift = Number(opts.isGift || 0) === 1;
|
||
this.isGroup = Number(opts.isGroup || 0) === 1;
|
||
this.key = opts.key || ''
|
||
},
|
||
onShow() {
|
||
const chooseAddress = uni.getStorageSync('updateOrderAddress') || {}
|
||
const addressId = chooseAddress.id || ''
|
||
// 监听到选择收货地址
|
||
if (addressId && this.addressEditOrderId) {
|
||
uni.setStorageSync('updateOrderAddress', {})
|
||
uni.showModal({
|
||
title:'确定修改地址吗?',
|
||
content: '提交后将进入审核流程,请确认是否继续',
|
||
showCancel: true,
|
||
cancelText: '取消',
|
||
confirmText: '确认',
|
||
success:(success)=>{
|
||
if(success.confirm) {
|
||
uni.showLoading()
|
||
applyEditAddress({
|
||
addressId,
|
||
orderId: this.addressEditOrderId
|
||
}).then(() => {
|
||
uni.showToast({
|
||
icon: 'success',
|
||
title: '已提交审核'
|
||
})
|
||
this.getDetail()
|
||
}).finally(() => {
|
||
uni.hideLoading()
|
||
})
|
||
} else {
|
||
this.getDetail()
|
||
}
|
||
},
|
||
complete:(complete)=>{
|
||
this.addressEditOrderId = ''
|
||
}
|
||
})
|
||
} else {
|
||
this.id = this.$yroute.query.id;
|
||
this.isGroup = Number(this.$yroute.query.isGroup || 0) === 1;
|
||
this.key = this.$yroute.query.key || '';
|
||
this.getDetail();
|
||
}
|
||
},
|
||
onUnload() {
|
||
uni.setStorageSync('needRefreshMyOrderList', 1)
|
||
},
|
||
// inject: ["app"],
|
||
mounted: function () {
|
||
this.id = this.$yroute.query.id;
|
||
},
|
||
methods: {
|
||
copyClipboard,
|
||
canShowModifyAddress(order) {
|
||
if (!order || this.isGroup || Number(order.isTickets || 0) === 1) {
|
||
return false
|
||
}
|
||
const type = Number(order._status && order._status._type)
|
||
if (type !== 1) {
|
||
return false
|
||
}
|
||
const isAddressUpdate = Number(order.isAddressUpdate || 0)
|
||
const addressUpdateStatus = Number(order.addressUpdateStatus || 0)
|
||
if (isAddressUpdate === 0) {
|
||
return true
|
||
}
|
||
return false
|
||
},
|
||
//催发货
|
||
delayOrder() {
|
||
uni.showToast({
|
||
icon: 'none',
|
||
title: '您已催促成功,商家正在抓紧备货'
|
||
})
|
||
},
|
||
// 获取预计送达时间
|
||
getDay(delivery, index) {
|
||
const params = {
|
||
orderId: this.orderInfo.orderId,
|
||
deliveryId: delivery.deliveryId,
|
||
deliverySn: delivery.deliverySn
|
||
}
|
||
orderExpectedArrivalTime(params).then(res => {
|
||
if(res.success) {
|
||
this.orderInfo.deliveryInfo[index].estimatedTime = res.data.deliveryTime || ''
|
||
this.$forceUpdate()
|
||
}
|
||
})
|
||
},
|
||
goGoodsCon(item, isGiftCardReceiveBlind) {
|
||
if(isGiftCardReceiveBlind) return
|
||
this.$yrouter.push({
|
||
path: '/pages/shop/GoodsCon/index',
|
||
query: {
|
||
id: item.productId
|
||
}
|
||
})
|
||
},
|
||
handleShowMore() {
|
||
this.showMoreDeliver = !this.showMoreDeliver;
|
||
},
|
||
handleBody() {
|
||
this.showMore = false
|
||
// this.$forceUpdate()
|
||
},
|
||
getExpressInfo(delivery, i) {
|
||
if(delivery.deliveryId === null) return
|
||
let params = {
|
||
orderCode: this.orderInfo.id,
|
||
shipperCode: delivery.deliverySn,
|
||
logisticCode: delivery.deliveryId
|
||
};
|
||
express(params)
|
||
.then(res => {
|
||
const {success, data} = res
|
||
if(success) {
|
||
this.logistics[i] = data || {}
|
||
this.$forceUpdate()
|
||
}
|
||
|
||
})
|
||
.catch(err => {
|
||
// uni.showToast({
|
||
// title:
|
||
// err.msg || err.response.data.msg || err.response.data.message,
|
||
// icon: "none",
|
||
// duration: 2000
|
||
// });
|
||
});
|
||
},
|
||
goLogistics(order, index) {
|
||
this.$yrouter.push({
|
||
path: "/pages/order/Logistics/index",
|
||
query: {
|
||
id: order.orderId,
|
||
index: index
|
||
}
|
||
});
|
||
},
|
||
buyAgin() {
|
||
const params = {
|
||
orderId: this.orderInfo.orderId
|
||
}
|
||
aginConfirm(params).then(res => {
|
||
const ids = res.data.cartInfo.map(e => e.id)
|
||
const addressInfo = res.data.addressInfo
|
||
if (ids.length === 0) return
|
||
uni.redirectTo({
|
||
url: '/pages/order/OrderSubmission/index?id=' + ids.join(',') + '&address=' + JSON.stringify(addressInfo)
|
||
})
|
||
})
|
||
},
|
||
goAddress() {
|
||
this.addressEditOrderId = this.orderInfo.orderId
|
||
uni.setStorageSync('updateOrderSourceAddress', {
|
||
id: this.orderInfo.addressId || this.orderInfo.userAddressId || '',
|
||
realName: this.orderInfo.realName || this.orderInfo.oldRealName || '',
|
||
phone: this.orderInfo.userPhone || this.orderInfo.oldUserPhone || '',
|
||
userAddress: this.orderInfo.userAddress || this.orderInfo.oldUserAddress || ''
|
||
})
|
||
this.$yrouter.push({
|
||
path:'/pages/user/address/AddressManagement/index',
|
||
query: {
|
||
choosMode: 4
|
||
}
|
||
})
|
||
},
|
||
toDelay(id) {
|
||
this.delayId = id;
|
||
this.showExtend = true;
|
||
},
|
||
doneDelay() {
|
||
orderDelay(this.delayId).then(() => {
|
||
this.showExtend = false;
|
||
this.getDetail()
|
||
});
|
||
},
|
||
buyOrder() {
|
||
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
|
||
if (ids.length === 0) return
|
||
uni.navigateTo({
|
||
url: '/pages/order/OrderSubmission/index?id=' + ids
|
||
})
|
||
},
|
||
routerGo(cart) {
|
||
this.$yrouter.push({
|
||
path: "/pages/shop/GoodsEvaluate/index",
|
||
query: { id: cart.unique }
|
||
});
|
||
},
|
||
goRoom(order) {
|
||
const params = {
|
||
goodsId: order.cartInfo[0].productId,
|
||
goodsName: order.cartInfo[0].productInfo.storeName,
|
||
skuStr: order.cartInfo[0].productInfo.attrInfo.sku,
|
||
price: order.cartInfo[0].productInfo.attrInfo.price,
|
||
seckillId: order.cartInfo[0].seckillId,
|
||
cover: order.cartInfo[0].productInfo.attrInfo.image,
|
||
goodsData: '',
|
||
seckillData: ''
|
||
}
|
||
uni.navigateTo({
|
||
url: `/pkg_common/views/room?id=${order.merId}&name=${order.merName}¶ms=${JSON.stringify(params)}`
|
||
})
|
||
},
|
||
force2Decimal(v) {
|
||
return this.$force2Decimal(v);
|
||
},
|
||
getStatus(order) {
|
||
const type = Number(order._status._type);
|
||
let status = "";
|
||
switch (type) {
|
||
case 0:
|
||
status = "待付款";
|
||
break;
|
||
case 1:
|
||
status = "待发货";
|
||
break;
|
||
case 2:
|
||
status = "待收货";
|
||
break;
|
||
case 3:
|
||
status = "待评价";
|
||
break;
|
||
case 4:
|
||
status = "已完成";
|
||
break;
|
||
case -1:
|
||
status = "退款中";
|
||
break;
|
||
case -2:
|
||
status = "已退款";
|
||
break;
|
||
case -3:
|
||
status = "退款失败";
|
||
break;
|
||
}
|
||
return status;
|
||
},
|
||
getStatusImg(order) {
|
||
const type = parseInt(order._status._type);
|
||
let imgUrl = "";
|
||
switch (type) {
|
||
case 0: //待付款
|
||
case 9:
|
||
imgUrl = this.webUrl + '/20230526114342425681.png';
|
||
break;
|
||
case 1: //待发货
|
||
imgUrl = this.webUrl + '/20230526114347797204.png';
|
||
break;
|
||
case 2: //待收货
|
||
imgUrl = this.webUrl + '/20230526114355462982.png';
|
||
break;
|
||
case 3: //待评价
|
||
imgUrl = this.webUrl + '/20230526114414134581.png';
|
||
break;
|
||
case 4: //已完成
|
||
imgUrl = this.webUrl + '/20230526114421118668.png';
|
||
break;
|
||
case -1: //退款中
|
||
imgUrl = this.webUrl + '/20230526114324286938.png';
|
||
break;
|
||
case -2: //已退款
|
||
imgUrl = this.webUrl + '/20230526114329894562.png';
|
||
break;
|
||
case -3: //已驳回
|
||
imgUrl = this.webUrl + '/20230526114336281750.png';
|
||
break;
|
||
}
|
||
return imgUrl;
|
||
},
|
||
subscribePay() {
|
||
uni.requestSubscribeMessage({
|
||
tmplIds: ['7O3wKw7_D4t7yfSOlvecKuOQP8QEPY88uBx2FJg43HE', 'TSmTnGibZ8IxWCiRWOvLxha6-0u7tE-V1-WbDCiPkKU', '9Q6xLHe6HyjkU5Zn5k_2zxYPf2y4MxVyUbOSW8pcZRU'],
|
||
complete: () => this.pay = true
|
||
})
|
||
},
|
||
goGoodsReturn(orderInfo) {
|
||
// fix bug#1631 bug#2488
|
||
if (parseInt(orderInfo._status._type) === 3) {
|
||
if(orderInfo.refundSystemStatus === 0) {
|
||
uni.showToast({
|
||
title: '订单已收货,如需退款请联系商家',
|
||
mask: false,
|
||
icon: 'none',
|
||
duration: 3000
|
||
})
|
||
} else {
|
||
uni.navigateTo({
|
||
url: `/pkg_orders/views/refund?id=${orderInfo.orderId}`
|
||
})
|
||
}
|
||
} else {
|
||
uni.navigateTo({
|
||
url: `/pkg_orders/views/refund?id=${orderInfo.orderId}`
|
||
})
|
||
}
|
||
},
|
||
goGoodsReturn2(orderInfo) {
|
||
this.$yrouter.push({
|
||
path: "/pages/order/GoodsReturn/index",
|
||
query: {
|
||
id: orderInfo.orderId
|
||
}
|
||
})
|
||
},
|
||
goGroupRule(orderInfo) {
|
||
this.$yrouter.push({
|
||
path: "/pages/activity/GroupRule/index",
|
||
query: {
|
||
id: orderInfo.pinkId
|
||
}
|
||
});
|
||
},
|
||
showChang: function (data) {
|
||
// 这里判断是不是微信小程序
|
||
this.$yrouter.push({
|
||
path: "/pages/map/index",
|
||
query: data
|
||
});
|
||
},
|
||
async toYuePay(payPwd) {
|
||
var that = this;
|
||
//网络请求
|
||
await yuePayOrderHandle(this.orderInfo.orderId, "yue", that.from, payPwd);
|
||
that.getDetail();
|
||
this.payPassword = "";
|
||
},
|
||
pwdPopClose() {
|
||
this.isShowPayPwdPop = false;
|
||
},
|
||
pwdPopFinish(payPwd) {
|
||
this.payPassword = payPwd;
|
||
|
||
this.toYuePay(payPwd);
|
||
|
||
this.isShowPayPwdPop = false;
|
||
},
|
||
call: function (phone) {
|
||
uni.makePhoneCall({
|
||
|
||
// 手机号
|
||
phoneNumber: phone,
|
||
|
||
// 成功回调
|
||
success: (res) => {
|
||
console.log('调用成功!')
|
||
},
|
||
|
||
// 失败回调
|
||
fail: (res) => {
|
||
console.log('调用失败!')
|
||
}
|
||
|
||
});
|
||
},
|
||
goBack() {
|
||
if (this.name === "MyOrder") {
|
||
this.$yrouter.back();
|
||
return;
|
||
} else {
|
||
console.log(this);
|
||
this.$yrouter.replace({
|
||
path: "/pages/order/MyOrder/index"
|
||
});
|
||
return;
|
||
}
|
||
},
|
||
cancelOrder() {
|
||
cancelOrderHandle(this.orderInfo.orderId)
|
||
.then(() => {
|
||
setTimeout(() => this.goBack(), 300);
|
||
})
|
||
.catch(() => {
|
||
this.getDetail();
|
||
});
|
||
},
|
||
takeOrder() {
|
||
takeOrderHandle(this.orderInfo.orderId).finally(() => {
|
||
this.getDetail();
|
||
});
|
||
},
|
||
delOrder() {
|
||
delOrderHandle(this.orderInfo.orderId).then(() => {
|
||
this.goBack()
|
||
})
|
||
},
|
||
setOfflinePayStatus: function (status) {
|
||
var that = this;
|
||
that.offlinePayStatus = status;
|
||
if (status === 1 && that.orderTypeNameStatus === true) {
|
||
that.payType.push("offline");
|
||
}
|
||
},
|
||
getOrderStatus: function () {
|
||
let orderInfo = this.orderInfo || {},
|
||
_status = orderInfo._status || {
|
||
_type: 0
|
||
},
|
||
status = {};
|
||
let type = parseInt(_status._type),
|
||
delivery_type = orderInfo.deliveryType,
|
||
seckill_id = orderInfo.seckillId ? parseInt(orderInfo.seckillId) : 0,
|
||
bargain_id = orderInfo.bargainId ? parseInt(orderInfo.bargainId) : 0,
|
||
combination_id = orderInfo.combinationId ?
|
||
parseInt(orderInfo.combinationId) :
|
||
0;
|
||
status = {
|
||
type: type,
|
||
class_status: 0
|
||
};
|
||
if (type == 1 && combination_id > 0) {
|
||
status.type = 6;
|
||
status.class_status = 1;
|
||
} // 查看拼团
|
||
if (type == 2 && delivery_type == "express") status.class_status = 2; // 查看物流
|
||
if (type == 2) status.class_status = 3; // 确认收货
|
||
if (type == 4 || type === 0) status.class_status = 4; // 删除订单
|
||
if (
|
||
!seckill_id &&
|
||
!bargain_id &&
|
||
!combination_id &&
|
||
(type == 3 || type == 4)
|
||
)
|
||
status.class_status = 5; // 再次购买
|
||
if (type == 9) {
|
||
// 线下付款
|
||
status.class_status = 0;
|
||
this.offlineStatus = false
|
||
}
|
||
this.status = status
|
||
},
|
||
getDetail() {
|
||
const id = this.id
|
||
if (!id) {
|
||
uni.showToast({
|
||
title: "订单不存在",
|
||
icon: "none",
|
||
duration: 2000
|
||
})
|
||
return
|
||
}
|
||
uni.showLoading({
|
||
title: '加载中'
|
||
})
|
||
this.loading = true
|
||
orderDetail(id).then(res => {
|
||
this.orderInfo = res.data
|
||
this.orderInfo._status._type = parseInt(this.orderInfo._status._type)
|
||
this.getOrderStatus()
|
||
if (this.orderInfo.combinationId > 0) {
|
||
this.orderTypeName = "拼团订单"
|
||
this.orderTypeNameStatus = false
|
||
} else if (this.orderInfo.bargainId > 0) {
|
||
this.orderTypeName = "砍价订单"
|
||
this.orderTypeNameStatus = false
|
||
} else if (this.orderInfo.seckillId > 0) {
|
||
this.orderTypeName = "秒杀订单"
|
||
this.orderTypeNameStatus = false
|
||
} else if (this.orderInfo.isGiftCardReceive === 1 || this.orderInfo.isGiftCardSend === 1) {
|
||
this.orderTypeName = "礼包订单"
|
||
this.orderTypeNameStatus = false
|
||
}
|
||
this.system_store = res.data.systemStore || {}
|
||
this.mapKey = res.data.mapKay
|
||
this.setOfflinePayStatus(this.orderInfo.offlinePayStatus)
|
||
const statusType = this.orderInfo._status._type
|
||
if([-1, -2, 4, 3].includes(statusType) || (statusType === 2 && this.orderInfo.isTickets !== 1)) {
|
||
for(let i = 0; i < this.orderInfo.deliveryInfo.length; i++) {
|
||
this.orderInfo.deliveryInfo[i].estimatedTime = ''
|
||
this.getExpressInfo(this.orderInfo.deliveryInfo[i], i)
|
||
if (statusType === 2) {
|
||
this.getDay(this.orderInfo.deliveryInfo[i], i)
|
||
}
|
||
}
|
||
}
|
||
}).catch(err => {
|
||
uni.showToast({
|
||
title: err.response.data.msg,
|
||
icon: "none",
|
||
duration: 2000
|
||
})
|
||
}).finally(() => {
|
||
this.loading = false
|
||
uni.hideLoading()
|
||
})
|
||
},
|
||
async toPay(type) {
|
||
var that = this;
|
||
console.log(type, "支付方式");
|
||
|
||
//余额支付需要输入支付密码
|
||
if (type == "yue") {
|
||
this.isShowPayPwdPop = true;
|
||
return;
|
||
} else {
|
||
await payOrderHandle(this.orderInfo.orderId, type, that.from);
|
||
that.getDetail();
|
||
}
|
||
|
||
|
||
}
|
||
}
|
||
};
|
||
</script>
|
||
<style scoped lang="less">
|
||
.btn-more{
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.u-count-down__text{
|
||
color: #999 !important;
|
||
}
|
||
.footer{
|
||
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;
|
||
box-sizing: border-box;
|
||
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.16);
|
||
padding: 0 20rpx;
|
||
background: #fff;
|
||
left: -40px;
|
||
right: 0;
|
||
top: -62px;
|
||
.btn {
|
||
box-sizing: border-box;
|
||
padding: 20rpx 0;
|
||
color: #333;
|
||
font-size: 32rpx;
|
||
line-height: 1;
|
||
}
|
||
|
||
.btn-service {
|
||
border-bottom: 1rpx solid #F0F0F0;
|
||
}
|
||
}
|
||
.bnt{
|
||
font-size: 28rpx !important;
|
||
}
|
||
.geoPage {
|
||
position: fixed;
|
||
width: 100%;
|
||
height: 100%;
|
||
top: 0;
|
||
z-index: 10000;
|
||
}
|
||
|
||
.order-details .writeOff {
|
||
background-color: #fff;
|
||
margin-top: 0.13 * 100rpx;
|
||
padding-bottom: 0.3 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .title {
|
||
font-size: 0.3 * 100rpx;
|
||
color: #282828;
|
||
height: 0.87 * 100rpx;
|
||
border-bottom: 1px solid #f0f0f0;
|
||
padding: 0 0.3 * 100rpx;
|
||
line-height: 0.87 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .grayBg {
|
||
background-color: #f2f5f7;
|
||
width: 5.9 * 100rpx;
|
||
height: 3.84 * 100rpx;
|
||
border-radius: 0.2 * 100rpx 0.2 * 100rpx 0 0;
|
||
margin: 0.5 * 100rpx auto 0 auto;
|
||
padding-top: 0.55 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .grayBg .pictrue {
|
||
width: 2.9 * 100rpx;
|
||
height: 2.9 * 100rpx;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.order-details .writeOff .grayBg .pictrue img {
|
||
width: 100%;
|
||
height: 100%;
|
||
display: block;
|
||
}
|
||
|
||
.order-details .writeOff .gear {
|
||
width: 5.9 * 100rpx;
|
||
height: 0.3 * 100rpx;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.order-details .writeOff .gear img {
|
||
width: 100%;
|
||
height: 100%;
|
||
display: block;
|
||
}
|
||
|
||
.order-details .writeOff .num {
|
||
background-color: #f0c34c;
|
||
width: 5.9 * 100rpx;
|
||
height: 0.84 * 100rpx;
|
||
color: #282828;
|
||
font-size: 0.48 * 100rpx;
|
||
margin: 0 auto;
|
||
border-radius: 0 0 0.2 * 100rpx 0.2 * 100rpx;
|
||
text-align: center;
|
||
padding-top: 0.04 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .rules {
|
||
margin: 0.46 * 100rpx 0.3 * 100rpx 0 0.3 * 100rpx;
|
||
border-top: 0.01 * 100rpx solid #f0f0f0;
|
||
padding-top: 0.1 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .rules .item {
|
||
margin-top: 0.15 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .rules .item .rulesTitle {
|
||
font-size: 0.28 * 100rpx;
|
||
color: #282828;
|
||
}
|
||
|
||
.order-details .writeOff .rules .item .rulesTitle .iconfont {
|
||
font-size: 0.3 * 100rpx;
|
||
color: #333;
|
||
margin-right: 0.08 * 100rpx;
|
||
margin-top: 0.05 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .rules .item .info {
|
||
font-size: 0.28 * 100rpx;
|
||
color: #999;
|
||
margin-top: 0.05 * 100rpx;
|
||
}
|
||
|
||
.order-details .writeOff .rules .item .info .time {
|
||
margin-left: 0.2 * 100rpx;
|
||
}
|
||
|
||
.order-details .map {
|
||
height: 0.86 * 100rpx;
|
||
font-size: 0.3 * 100rpx;
|
||
color: #282828;
|
||
line-height: 0.86 * 100rpx;
|
||
border-bottom: 0.01 * 100rpx solid #f0f0f0;
|
||
margin-top: 0.13 * 100rpx;
|
||
background-color: #fff;
|
||
padding: 0 0.3 * 100rpx;
|
||
}
|
||
|
||
.order-details .map .place {
|
||
font-size: 0.26 * 100rpx;
|
||
width: 1.76 * 100rpx;
|
||
height: 0.5 * 100rpx;
|
||
border-radius: 0.25 * 100rpx;
|
||
line-height: 0.5 * 100rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.order-details .map .place .iconfont {
|
||
font-size: 0.27 * 100rpx;
|
||
height: 0.27 * 100rpx;
|
||
line-height: 0.27 * 100rpx;
|
||
margin: 0.02 * 100rpx 0.03 * 100rpx 0 0;
|
||
}
|
||
|
||
.order-details .address .name .iconfont {
|
||
font-size: 0.34 * 100rpx;
|
||
margin-left: 0.1 * 100rpx;
|
||
}
|
||
|
||
.status-img-box {
|
||
width: 86rpx;
|
||
height: 86rpx;
|
||
background: rgba(255, 255, 255, 1);
|
||
border-radius: 50%;
|
||
position: relative;
|
||
}
|
||
|
||
.status-img {
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.wrapper .item {
|
||
flex-wrap: nowrap;
|
||
|
||
.flex-0 {
|
||
flex-shrink: 0;
|
||
}
|
||
}
|
||
|
||
.code-box {
|
||
margin-top: 30rpx;
|
||
padding: 30rpx;
|
||
background: #fff;
|
||
|
||
.code-img {
|
||
width: 240rpx;
|
||
height: 240rpx;
|
||
}
|
||
}
|
||
|
||
/deep/ .pending-payments {
|
||
font-size: 26rpx;
|
||
letter-spacing: 1px;
|
||
.u-count-down__text {
|
||
font-size: 26rpx;
|
||
line-height: 1;
|
||
}
|
||
}
|
||
|
||
.reject-reason {
|
||
margin-top: 20rpx;
|
||
padding: 20rpx 32rpx;
|
||
border-radius: 24rpx;
|
||
background: #fff;
|
||
color: #FE5261;
|
||
font-size: 26rpx;
|
||
}
|
||
.item {
|
||
.conttent-left {
|
||
text-align: left !important;
|
||
}
|
||
}
|
||
.gift-wrap{
|
||
background: #fff;
|
||
border-radius: 20rpx;
|
||
margin-top: 30rpx;
|
||
padding: 30rpx;
|
||
}
|
||
.time-bg{
|
||
position: absolute;
|
||
height: 38rpx;
|
||
width: 100%;
|
||
}
|
||
.time-box{
|
||
position: relative;
|
||
margin-left: 10rpx;
|
||
}
|
||
.order-deliver-item-show {
|
||
display: block;
|
||
}
|
||
.time-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
</style>
|