1086 lines
36 KiB
Vue
1086 lines
36 KiB
Vue
<template>
|
||
<view class="order-details" style="padding: 30rpx;">
|
||
<!-- 给header上与data上加on为退款订单-->
|
||
<view class=" v12-pa-3 v12-white" :class="refundOrder ? 'on' : ''" style="border-radius: 20rpx;">
|
||
<!-- <view class="status-img-box">
|
||
<image class="status-img" :src="getStatusImg(orderInfo)" mode=""></image>
|
||
</view> -->
|
||
<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" :class="{'fails-bg': orderInfo._status._type == -3}">{{ orderInfo._status._msg }}</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>
|
||
<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 @click="goAddress" class="v12-btn cancel v12-dark-text v12-dark-border v12-radius-40" v-if="status.type == -2 || status.type == -3">修改地址</view> -->
|
||
</div>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因:{{ orderInfo.refundRejectReason }}</view> -->
|
||
<view @click="goLogistics(orderInfo)" class="v12-radius-20 v12-white v12-pa-3 v12-mt-4" v-if="orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)">
|
||
<view >
|
||
<text class="v12-secondary-dark-text v12-font-28">{{ orderInfo.deliveryName }}:{{ orderInfo.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(orderInfo.orderId)">
|
||
复制
|
||
</text>
|
||
</view>
|
||
<view class="v12-mt-2 v12-justify-between">
|
||
<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.reason }}</view>
|
||
</view>
|
||
<view>
|
||
<uni-icons type="right" size="20" color="#707070"></uni-icons>
|
||
</view>
|
||
</view>
|
||
<view class="v12-mt-2">
|
||
<text class="v12-dark-text v12-font-24">{{ orderInfo.estimatedDeliveryTime }}</text>
|
||
</view>
|
||
</view>
|
||
<template v-if="!refundOrder">
|
||
<view class="code-box flex jc-center ai-center" v-if="orderInfo.isTickets===1 && orderInfo._status._type==2">
|
||
<image class="code-img" :src="orderInfo.code"/>
|
||
</view>
|
||
<template v-else>
|
||
<div class="writeOff" v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1"
|
||
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">
|
||
<view class="v12-justify-between">
|
||
<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="" v-if="orderInfo.cartInfo &&( d === orderInfo.cartInfo.length - 1)">
|
||
<view class="v12-justify-between v12-mt-3 v12-dark-text">
|
||
<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-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-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-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-mt-3">
|
||
<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 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="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||
<view class="bnt v12-primary-text v12-primary-border cancel" @click="goGoodsReturn(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="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" :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="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 :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} 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 {
|
||
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: {}
|
||
};
|
||
},
|
||
computed: {
|
||
refundOrder() {
|
||
return this.orderInfo.refund_status > 0;
|
||
},
|
||
...mapGetters(["userInfo"])
|
||
},
|
||
onShow() {
|
||
this.id = this.$yroute.query.id;
|
||
this.getDetail();
|
||
},
|
||
// inject: ["app"],
|
||
mounted: function () {
|
||
this.id = this.$yroute.query.id;
|
||
},
|
||
methods: {
|
||
copyClipboard,
|
||
getExpressInfo() {
|
||
let params = {
|
||
orderCode: this.orderInfo.id,
|
||
shipperCode: this.orderInfo.deliverySn,
|
||
logisticCode: this.orderInfo.deliveryId
|
||
};
|
||
express(params)
|
||
.then(res => {
|
||
this.logistics = res.data || {}
|
||
console.log(this.logistics);
|
||
})
|
||
.catch(err => {
|
||
// uni.showToast({
|
||
// title:
|
||
// err.msg || err.response.data.msg || err.response.data.message,
|
||
// icon: "none",
|
||
// duration: 2000
|
||
// });
|
||
});
|
||
},
|
||
goLogistics(order) {
|
||
this.$yrouter.push({
|
||
path: "/pages/order/Logistics/index",
|
||
query: {
|
||
id: order.orderId
|
||
}
|
||
});
|
||
},
|
||
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.navigateTo({
|
||
url: '/pages/order/OrderSubmission/index?id=' + ids.join(',') + '&address=' + JSON.stringify(addressInfo)
|
||
})
|
||
})
|
||
},
|
||
goAddress() {
|
||
uni.navigateTo({
|
||
url:'/pages/user/address/AddressManagement/index'
|
||
})
|
||
},
|
||
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 }
|
||
});
|
||
},
|
||
goOrderDetails(order) {
|
||
this.$yrouter.push({
|
||
path: "/pages/order/OrderDetails/index",
|
||
query: {
|
||
id: order.orderId
|
||
}
|
||
});
|
||
},
|
||
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) {
|
||
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;
|
||
}
|
||
orderDetail(id)
|
||
.then(res => {
|
||
this.orderInfo = res.data;
|
||
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;
|
||
}
|
||
this.system_store = res.data.systemStore || {};
|
||
this.mapKey = res.data.mapKay;
|
||
this.setOfflinePayStatus(this.orderInfo.offlinePayStatus);
|
||
this.getExpressInfo()
|
||
})
|
||
.catch(err => {
|
||
uni.showToast({
|
||
title: err.response.data.msg,
|
||
icon: "none",
|
||
duration: 2000
|
||
});
|
||
});
|
||
},
|
||
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">
|
||
.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;
|
||
}
|
||
}
|
||
</style>
|