1
This commit is contained in:
@ -115,12 +115,12 @@ export const updateCartSelect = ({ is_select,cart_id }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 删除购物车
|
// 删除购物车
|
||||||
export const deleteCart = ({ cart_id }) => {
|
export const deleteCart = ({ id }) => {
|
||||||
return request({
|
return request({
|
||||||
url: DELETE_CART,
|
url: DELETE_CART,
|
||||||
method: "post",
|
method: "post",
|
||||||
data: {
|
data: {
|
||||||
cart_id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -57,7 +57,7 @@ export const CANCEL_PET_ORDER = '/order/pet/cancel'
|
|||||||
export const DOUY_REVIEW = '/douyin/goods/order/appointment'
|
export const DOUY_REVIEW = '/douyin/goods/order/appointment'
|
||||||
|
|
||||||
// 取消商城接口
|
// 取消商城接口
|
||||||
export const CANCEL_MALL_ORDER = '/douyin/goods/order/cancel'
|
export const CANCEL_MALL_ORDER = '/douyin/goods/order/refund'
|
||||||
|
|
||||||
// 卡包列表接口
|
// 卡包列表接口
|
||||||
export const USER_HolderList = '/membership/instances'
|
export const USER_HolderList = '/membership/instances'
|
||||||
@ -227,7 +227,7 @@ export const UPDATE_CART_NUM = "/cart/update";
|
|||||||
// 选择购物车商品
|
// 选择购物车商品
|
||||||
export const UPDATE_CART_SELECT = "/cart/select/all";
|
export const UPDATE_CART_SELECT = "/cart/select/all";
|
||||||
// 删除购物车
|
// 删除购物车
|
||||||
export const DELETE_CART = "/product/cart/delete";
|
export const DELETE_CART = "/douyin/goods/order/refund";
|
||||||
|
|
||||||
// 创建订单
|
// 创建订单
|
||||||
export const CREATE_ORDER_NEW = "/product/order/create";
|
export const CREATE_ORDER_NEW = "/product/order/create";
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
<!-- 待预约 -->
|
<!-- 待预约 -->
|
||||||
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
|
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
|
||||||
<view class="order-btns-right">
|
<view class="order-btns-right">
|
||||||
<view class="flex-center fs-24 app-fc-main status-btn" @click.stop="$emit('refund', data)">
|
<view class="flex-center fs-24 app-fc-main status-btn" @click.stop="remindRefund(data.order_id)">
|
||||||
申请退款
|
申请退款
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-center fs-24 app-fc-white status-btn confirm"
|
<view class="flex-center fs-24 app-fc-white status-btn confirm"
|
||||||
@ -135,6 +135,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import PopUpModal from "@/components/PopUpModal.vue";
|
import PopUpModal from "@/components/PopUpModal.vue";
|
||||||
import GoodInfo from "./GoodInfo.vue";
|
import GoodInfo from "./GoodInfo.vue";
|
||||||
|
import {
|
||||||
|
walletTransaction,
|
||||||
|
cancelPetOrderMall,
|
||||||
|
} from "../../../../api/login";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SHOP_ORDER_STATUS,
|
SHOP_ORDER_STATUS,
|
||||||
SHOP_ORDER_UNPAY,
|
SHOP_ORDER_UNPAY,
|
||||||
@ -269,6 +274,30 @@
|
|||||||
this.stopCountDown();
|
this.stopCountDown();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
remindRefund(id) {
|
||||||
|
const data = {
|
||||||
|
id: Number(id),
|
||||||
|
};
|
||||||
|
cancelPetOrderMall(data).then((res) => {
|
||||||
|
const plugin = tt.requirePlugin("lifeServicePlugin");
|
||||||
|
plugin.applyRefund({
|
||||||
|
goodsList:res.data.goodsList,
|
||||||
|
outOrderNo:res.data.outOrderNo,
|
||||||
|
refundInfo:res.data.refundInfo,
|
||||||
|
success(res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '退款成功',
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
const { outRefundNo } = res;
|
||||||
|
tt.showToast({ title: outRefundNo });
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.log("fail", res);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
// 退款回调(组件触发)
|
// 退款回调(组件触发)
|
||||||
handleRefund(event) {
|
handleRefund(event) {
|
||||||
const { status, result, outOrderNo } = event.detail
|
const { status, result, outOrderNo } = event.detail
|
||||||
|
|||||||
@ -2,9 +2,15 @@
|
|||||||
<view class="order-create-container">
|
<view class="order-create-container">
|
||||||
<view class="flex-center order-status">
|
<view class="flex-center order-status">
|
||||||
<!-- 待支付 -->
|
<!-- 待支付 -->
|
||||||
<template v-if="orderData.status === SHOP_ORDER_UNPAY && !orderData.tui_status">
|
<template
|
||||||
|
v-if="orderData.status === SHOP_ORDER_UNPAY && !orderData.tui_status"
|
||||||
|
>
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_unpay.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_unpay.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">待支付</text>
|
<text class="fs-36 app-fc-main app-font-bold">待支付</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="countDownTime > 0" class="fs-24 app-fc-main status-tips">
|
<view v-if="countDownTime > 0" class="fs-24 app-fc-main status-tips">
|
||||||
@ -16,31 +22,47 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 待发货 -->
|
<!-- 待发货 -->
|
||||||
<template v-if="orderData.status === SHOP_ORDER_UNSLIVER && !orderData.tui_status">
|
<template
|
||||||
|
v-if="orderData.status === SHOP_ORDER_UNSLIVER && !orderData.tui_status"
|
||||||
|
>
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_ungo.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_ungo.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">待预约</text>
|
<text class="fs-36 app-fc-main app-font-bold">待预约</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fs-24 app-fc-main status-tips">
|
<view class="fs-24 app-fc-main status-tips"> 已付款,待预约 </view>
|
||||||
已付款,待预约
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 待收货 -->
|
<!-- 待收货 -->
|
||||||
<template v-if="
|
<template
|
||||||
|
v-if="
|
||||||
orderData.status === SHOP_ORDER_UNRECEIVE && !orderData.tui_status
|
orderData.status === SHOP_ORDER_UNRECEIVE && !orderData.tui_status
|
||||||
">
|
"
|
||||||
|
>
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_go.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_go.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">待收货</text>
|
<text class="fs-36 app-fc-main app-font-bold">待收货</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fs-24 app-fc-main status-tips"> 已发货,等待收货 </view>
|
<view class="fs-24 app-fc-main status-tips"> 已发货,等待收货 </view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 已签收 -->
|
<!-- 已签收 -->
|
||||||
<template v-if="orderData.status === SHOP_ORDER_UNREMARK && !orderData.tui_status">
|
<template
|
||||||
|
v-if="orderData.status === SHOP_ORDER_UNREMARK && !orderData.tui_status"
|
||||||
|
>
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_done.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_done.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">已签收</text>
|
<text class="fs-36 app-fc-main app-font-bold">已签收</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fs-24 app-fc-main status-tips">
|
<view class="fs-24 app-fc-main status-tips">
|
||||||
@ -49,17 +71,29 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 已完成 -->
|
<!-- 已完成 -->
|
||||||
<template v-if="orderData.status === SHOP_ORDER_DONE && !orderData.tui_status">
|
<template
|
||||||
|
v-if="orderData.status === SHOP_ORDER_DONE && !orderData.tui_status"
|
||||||
|
>
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_done.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_done.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">已完成</text>
|
<text class="fs-36 app-fc-main app-font-bold">已完成</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 已取消 -->
|
<!-- 已取消 -->
|
||||||
<template v-if="orderData.status === SHOP_ORDER_CANCEL && !orderData.tui_status">
|
<template
|
||||||
|
v-if="orderData.status === SHOP_ORDER_CANCEL && !orderData.tui_status"
|
||||||
|
>
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_cancel.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_cancel.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">已取消</text>
|
<text class="fs-36 app-fc-main app-font-bold">已取消</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -67,7 +101,11 @@
|
|||||||
<!-- 申请售后-等待平台确认 -->
|
<!-- 申请售后-等待平台确认 -->
|
||||||
<template v-if="orderData.tui_status === SHOP_ORDER_AFTERSALE">
|
<template v-if="orderData.tui_status === SHOP_ORDER_AFTERSALE">
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/refund_undo.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/refund_undo.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">等待平台确认</text>
|
<text class="fs-36 app-fc-main app-font-bold">等待平台确认</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fs-24 app-fc-main status-tips">
|
<view class="fs-24 app-fc-main status-tips">
|
||||||
@ -78,7 +116,11 @@
|
|||||||
<!-- 申请售后-退款成功 -->
|
<!-- 申请售后-退款成功 -->
|
||||||
<template v-if="orderData.tui_status === SHOP_ORDER_AFTERSALE_DONE">
|
<template v-if="orderData.tui_status === SHOP_ORDER_AFTERSALE_DONE">
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_done.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_done.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">退款成功</text>
|
<text class="fs-36 app-fc-main app-font-bold">退款成功</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fs-24 app-fc-main status-tips">
|
<view class="fs-24 app-fc-main status-tips">
|
||||||
@ -89,10 +131,17 @@
|
|||||||
<!-- 申请售后-退款驳回 -->
|
<!-- 申请售后-退款驳回 -->
|
||||||
<template v-if="orderData.tui_status === SHOP_ORDER_AFTERSALE_REJECT">
|
<template v-if="orderData.tui_status === SHOP_ORDER_AFTERSALE_REJECT">
|
||||||
<view class="flex-row-center">
|
<view class="flex-row-center">
|
||||||
<image class="status-icon" src="./static/order_cancel.png" mode="widthFix" />
|
<image
|
||||||
|
class="status-icon"
|
||||||
|
src="./static/order_cancel.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<text class="fs-36 app-fc-main app-font-bold">退款驳回</text>
|
<text class="fs-36 app-fc-main app-font-bold">退款驳回</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fs-24 app-fc-main flex-center refund-btn" @click="showRefundModal = true">
|
<view
|
||||||
|
class="fs-24 app-fc-main flex-center refund-btn"
|
||||||
|
@click="showRefundModal = true"
|
||||||
|
>
|
||||||
查看驳回原因
|
查看驳回原因
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -145,16 +194,29 @@
|
|||||||
<!-- 商品信息 -->
|
<!-- 商品信息 -->
|
||||||
<view class="info-cell goods-info-cell">
|
<view class="info-cell goods-info-cell">
|
||||||
<template>
|
<template>
|
||||||
<view class="goods-item" v-for="(item, index) in orderData.products" :key="index">
|
<view
|
||||||
<image class="goods-img" :src="item.product_pic" mode="aspectFill" @click="jumpToGoodDetails(item)" />
|
class="goods-item"
|
||||||
|
v-for="(item, index) in orderData.products"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
class="goods-img"
|
||||||
|
:src="item.product_pic"
|
||||||
|
mode="aspectFill"
|
||||||
|
@click="jumpToGoodDetails(item)"
|
||||||
|
/>
|
||||||
<view class="goods-content" @click="jumpToGoodDetails(item)">
|
<view class="goods-content" @click="jumpToGoodDetails(item)">
|
||||||
<view class="goods-row-first">
|
<view class="goods-row-first">
|
||||||
<view class="goods-name">{{ item.product_name || "" }}</view>
|
<view class="goods-name">{{ item.product_name || "" }}</view>
|
||||||
<text class="goods-price">¥{{ item.product_actual_price || 0 }}</text>
|
<text class="goods-price"
|
||||||
|
>¥{{ item.product_actual_price || 0 }}</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-row-second">
|
<view class="goods-row-second">
|
||||||
<view class="goods-spec">
|
<view class="goods-spec">
|
||||||
{{ item.shuxing_name || "" }}{{ item.shuxing_name && item.price_name ? ";" : "" }}{{ item.price_name || "" }}
|
{{ item.shuxing_name || ""
|
||||||
|
}}{{ item.shuxing_name && item.price_name ? ";" : ""
|
||||||
|
}}{{ item.price_name || "" }}
|
||||||
</view>
|
</view>
|
||||||
<text class="goods-count">共{{ item.number || 1 }}件</text>
|
<text class="goods-count">共{{ item.number || 1 }}件</text>
|
||||||
</view>
|
</view>
|
||||||
@ -165,11 +227,13 @@
|
|||||||
|
|
||||||
<view class="info-cell pay-cell">
|
<view class="info-cell pay-cell">
|
||||||
<view class="flex-row-between pay-price">
|
<view class="flex-row-between pay-price">
|
||||||
<text class="pay-label">
|
<text class="pay-label"> 商品总价 </text>
|
||||||
商品总价
|
|
||||||
</text>
|
|
||||||
<text class="pay-total">
|
<text class="pay-total">
|
||||||
¥{{ [SHOP_ORDER_AFTERSALE_DONE].includes(orderData.tui_status) ? refundPrice : orderData.actual_price }}
|
¥{{
|
||||||
|
[SHOP_ORDER_AFTERSALE_DONE].includes(orderData.tui_status)
|
||||||
|
? refundPrice
|
||||||
|
: orderData.actual_price
|
||||||
|
}}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -196,15 +260,26 @@
|
|||||||
<text class="order-value">{{ formatTime(orderData.shou_time) }}</text>
|
<text class="order-value">{{ formatTime(orderData.shou_time) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="[SHOP_ORDER_CANCEL].includes(orderData.status) && !orderData.tui_status && orderData.quxiao_time"
|
v-if="
|
||||||
class="flex-row-between order-row">
|
[SHOP_ORDER_CANCEL].includes(orderData.status) &&
|
||||||
|
!orderData.tui_status &&
|
||||||
|
orderData.quxiao_time
|
||||||
|
"
|
||||||
|
class="flex-row-between order-row"
|
||||||
|
>
|
||||||
<text class="order-label">取消时间</text>
|
<text class="order-label">取消时间</text>
|
||||||
<text class="order-value">{{ formatTime(orderData.quxiao_time) }}</text>
|
<text class="order-value">{{ formatTime(orderData.quxiao_time) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="
|
<view
|
||||||
[SHOP_ORDER_AFTERSALE, SHOP_ORDER_AFTERSALE_DONE, SHOP_ORDER_AFTERSALE_REJECT].includes(orderData.tui_status) &&
|
v-if="
|
||||||
orderData.tui_yuanyin
|
[
|
||||||
" class="flex-row-between order-row">
|
SHOP_ORDER_AFTERSALE,
|
||||||
|
SHOP_ORDER_AFTERSALE_DONE,
|
||||||
|
SHOP_ORDER_AFTERSALE_REJECT,
|
||||||
|
].includes(orderData.tui_status) && orderData.tui_yuanyin
|
||||||
|
"
|
||||||
|
class="flex-row-between order-row"
|
||||||
|
>
|
||||||
<text class="order-label">售后事项</text>
|
<text class="order-label">售后事项</text>
|
||||||
<text class="order-value">{{ orderData.tui_yuanyin }}</text>
|
<text class="order-value">{{ orderData.tui_yuanyin }}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -241,20 +316,28 @@
|
|||||||
|
|
||||||
<view class="place-view"></view>
|
<view class="place-view"></view>
|
||||||
|
|
||||||
<view v-if="
|
<view
|
||||||
|
v-if="
|
||||||
[
|
[
|
||||||
SHOP_ORDER_UNPAY,
|
SHOP_ORDER_UNPAY,
|
||||||
SHOP_ORDER_UNSLIVER,
|
SHOP_ORDER_UNSLIVER,
|
||||||
SHOP_ORDER_UNRECEIVE,
|
SHOP_ORDER_UNRECEIVE,
|
||||||
SHOP_ORDER_DONE,
|
SHOP_ORDER_DONE,
|
||||||
SHOP_ORDER_UNREMARK
|
SHOP_ORDER_UNREMARK,
|
||||||
].includes(orderData.status)
|
].includes(orderData.status)
|
||||||
&& showBeforeSaleOrderStatus
|
"
|
||||||
" class="bottom-view">
|
class="bottom-view"
|
||||||
|
:class="{ 'two-buttons': showTwoButtons }"
|
||||||
|
>
|
||||||
<!-- 待支付 -->
|
<!-- 待支付 -->
|
||||||
<template v-if="[SHOP_ORDER_UNPAY].includes(orderData.status)">
|
<template
|
||||||
|
v-if="
|
||||||
|
[SHOP_ORDER_UNPAY].includes(orderData.status) &&
|
||||||
|
showBeforeSaleOrderStatus
|
||||||
|
"
|
||||||
|
>
|
||||||
<view class="handle-btn" @click.stop="showCancelModal = true">
|
<view class="handle-btn" @click.stop="showCancelModal = true">
|
||||||
<text class="fs-32 btnColor" style="color: #FF19A0;">取消订单</text>
|
<text class="fs-32 btnColor" style="color: #ff19a0">取消订单</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="handle-btn" @click.stop="pay">
|
<view class="handle-btn" @click.stop="pay">
|
||||||
<text class="fs-32 btnColor">立即支付</text>
|
<text class="fs-32 btnColor">立即支付</text>
|
||||||
@ -263,9 +346,11 @@
|
|||||||
|
|
||||||
<!-- 待发货 -->
|
<!-- 待发货 -->
|
||||||
<template v-if="[SHOP_ORDER_UNSLIVER].includes(orderData.status)">
|
<template v-if="[SHOP_ORDER_UNSLIVER].includes(orderData.status)">
|
||||||
<!-- 抖音退款组件 -->
|
<!-- 抖音退款组件 - 只有在没有售后状态或售后被驳回时显示 -->
|
||||||
<view class="refund-btn-wrapper">
|
<view v-if="showBeforeSaleOrderStatus" class="handle-btn refund-btn" @click.stop="remindRefund(orderData.order_id)">
|
||||||
<pay-button-sdk
|
<text class="fs-32 btnColor" style="color: #ff19a0">立即退款</text>
|
||||||
|
</view>
|
||||||
|
<!-- <pay-button-sdk
|
||||||
mode={{1}}
|
mode={{1}}
|
||||||
:order-id="orderData.order_no"
|
:order-id="orderData.order_no"
|
||||||
:order-status="1"
|
:order-status="1"
|
||||||
@ -280,8 +365,8 @@
|
|||||||
style="width:280rpx;height:100rpx;text-align:center;line-height: 100rpx;"
|
style="width:280rpx;height:100rpx;text-align:center;line-height: 100rpx;"
|
||||||
@refund="handleRefundSuccess"
|
@refund="handleRefundSuccess"
|
||||||
@error="handleRefundError"
|
@error="handleRefundError"
|
||||||
/>
|
/> -->
|
||||||
</view>
|
<!-- 立即预约按钮始终显示 -->
|
||||||
<view class="handle-btn" @click.stop="remindSliver">
|
<view class="handle-btn" @click.stop="remindSliver">
|
||||||
<text class="fs-32 btnColor">立即预约</text>
|
<text class="fs-32 btnColor">立即预约</text>
|
||||||
</view>
|
</view>
|
||||||
@ -316,28 +401,66 @@
|
|||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<good-info-modal v-if="showGoodInfoModal" :goods="orderData.goods_list" @close="showGoodInfoModal = false"
|
<good-info-modal
|
||||||
@clickGoodImg="jumpToGoodDetails" @clickGoodInfo="jumpToGoodDetails" />
|
v-if="showGoodInfoModal"
|
||||||
|
:goods="orderData.goods_list"
|
||||||
|
@close="showGoodInfoModal = false"
|
||||||
|
@clickGoodImg="jumpToGoodDetails"
|
||||||
|
@clickGoodInfo="jumpToGoodDetails"
|
||||||
|
/>
|
||||||
|
|
||||||
<recharge-coupon-modal v-if="showCouponModal" :couponList="couponList" :price="payPrice" :showOptBtn="true"
|
<recharge-coupon-modal
|
||||||
@useCoupon="useCoupon" @close="showCouponModal = false" />
|
v-if="showCouponModal"
|
||||||
|
:couponList="couponList"
|
||||||
|
:price="payPrice"
|
||||||
|
:showOptBtn="true"
|
||||||
|
@useCoupon="useCoupon"
|
||||||
|
@close="showCouponModal = false"
|
||||||
|
/>
|
||||||
|
|
||||||
<contact-modal v-if="showContact" :data="configInfo" @close="showContact = false" />
|
<contact-modal
|
||||||
|
v-if="showContact"
|
||||||
|
:data="configInfo"
|
||||||
|
@close="showContact = false"
|
||||||
|
/>
|
||||||
|
|
||||||
<pop-up-modal v-if="showCancelModal" content="确定要退款吗?" @confirm="orderCancel"
|
<pop-up-modal
|
||||||
@cancel="showCancelModal = false" />
|
v-if="showCancelModal"
|
||||||
|
content="确定要退款吗?"
|
||||||
|
@confirm="orderCancel"
|
||||||
|
@cancel="showCancelModal = false"
|
||||||
|
/>
|
||||||
|
|
||||||
<success-modal v-if="showRemindSliver" title="提醒成功" message="已通知商家,请耐心等待商家发货" @close="showRemindSliver = false"
|
<success-modal
|
||||||
@ok="showRemindSliver = false" />
|
v-if="showRemindSliver"
|
||||||
|
title="提醒成功"
|
||||||
|
message="已通知商家,请耐心等待商家发货"
|
||||||
|
@close="showRemindSliver = false"
|
||||||
|
@ok="showRemindSliver = false"
|
||||||
|
/>
|
||||||
|
|
||||||
<success-modal v-if="showRefundModal" class="reject-modal" :showImg="false" title="驳回原因"
|
<success-modal
|
||||||
:message="orderData.tui_msg" @close="showRefundModal = false" @ok="showRefundModal = false" />
|
v-if="showRefundModal"
|
||||||
|
class="reject-modal"
|
||||||
|
:showImg="false"
|
||||||
|
title="驳回原因"
|
||||||
|
:message="orderData.tui_msg"
|
||||||
|
@close="showRefundModal = false"
|
||||||
|
@ok="showRefundModal = false"
|
||||||
|
/>
|
||||||
|
|
||||||
<sliver-info v-if="showSliverRouteModal" :orderId="orderId" :orderInfo="orderData"
|
<sliver-info
|
||||||
@close="showSliverRouteModal = false" />
|
v-if="showSliverRouteModal"
|
||||||
|
:orderId="orderId"
|
||||||
|
:orderInfo="orderData"
|
||||||
|
@close="showSliverRouteModal = false"
|
||||||
|
/>
|
||||||
|
|
||||||
<call-modal :phone-number="managerPhoneNum" v-if="isShowCallManagerModal"
|
<call-modal
|
||||||
@close="isShowCallManagerModal = false" />
|
:phone-number="managerPhoneNum"
|
||||||
|
v-if="isShowCallManagerModal"
|
||||||
|
@close="isShowCallManagerModal = false"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -355,18 +478,16 @@ import DraggableContact from "@/components/DraggableContact.vue";
|
|||||||
import {
|
import {
|
||||||
walletTransaction,
|
walletTransaction,
|
||||||
cancelPetOrderRefund,
|
cancelPetOrderRefund,
|
||||||
cancelPetOrderMall
|
cancelPetOrderMall,
|
||||||
} from "../../../api/login";
|
} from "../../../api/login";
|
||||||
|
|
||||||
|
import { getConfig } from "../../../api/config";
|
||||||
import {
|
|
||||||
getConfig
|
|
||||||
} from "../../../api/config";
|
|
||||||
import {
|
import {
|
||||||
cancelOrder,
|
cancelOrder,
|
||||||
confirmOrder,
|
confirmOrder,
|
||||||
getShopOrderDetails,
|
getShopOrderDetails,
|
||||||
payOrder,
|
payOrder,
|
||||||
|
deleteCart,
|
||||||
remindOrder,
|
remindOrder,
|
||||||
} from "../../../api/shop";
|
} from "../../../api/shop";
|
||||||
import {
|
import {
|
||||||
@ -381,12 +502,9 @@ import {
|
|||||||
SHOP_ORDER_UNREMARK,
|
SHOP_ORDER_UNREMARK,
|
||||||
ORDER_TYPE_ADDRESS,
|
ORDER_TYPE_ADDRESS,
|
||||||
ORDER_TYPE_BYCAR,
|
ORDER_TYPE_BYCAR,
|
||||||
ORDER_TYPE_BYPET
|
ORDER_TYPE_BYPET,
|
||||||
} from "@/constants/app.business";
|
} from "@/constants/app.business";
|
||||||
import {
|
import { jumpToWeChat, imgPrefix } from "@/utils/common";
|
||||||
jumpToWeChat,
|
|
||||||
imgPrefix
|
|
||||||
} from "@/utils/common";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -398,7 +516,7 @@ import {
|
|||||||
SuccessModal,
|
SuccessModal,
|
||||||
SliverInfo,
|
SliverInfo,
|
||||||
CallModal,
|
CallModal,
|
||||||
DraggableContact
|
DraggableContact,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -418,9 +536,12 @@ import {
|
|||||||
orderData: {},
|
orderData: {},
|
||||||
showGoodInfoModal: false,
|
showGoodInfoModal: false,
|
||||||
showCouponModal: false,
|
showCouponModal: false,
|
||||||
couponList: Array.from({
|
couponList: Array.from(
|
||||||
length: 5
|
{
|
||||||
}, (v, k) => k),
|
length: 5,
|
||||||
|
},
|
||||||
|
(v, k) => k
|
||||||
|
),
|
||||||
couponInfo: null,
|
couponInfo: null,
|
||||||
showContact: false,
|
showContact: false,
|
||||||
configInfo: {
|
configInfo: {
|
||||||
@ -451,6 +572,24 @@ import {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
// 判断是否显示两个按钮
|
||||||
|
showTwoButtons() {
|
||||||
|
// 待支付状态显示两个按钮
|
||||||
|
if (
|
||||||
|
this.orderData.status === SHOP_ORDER_UNPAY &&
|
||||||
|
this.showBeforeSaleOrderStatus
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// 待发货状态且没有售后时显示两个按钮
|
||||||
|
if (
|
||||||
|
this.orderData.status === SHOP_ORDER_UNSLIVER &&
|
||||||
|
this.showBeforeSaleOrderStatus
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
goodsImgs() {
|
goodsImgs() {
|
||||||
return (this.orderData?.goods_list || [])
|
return (this.orderData?.goods_list || [])
|
||||||
.map((item) => item.goods_pic)
|
.map((item) => item.goods_pic)
|
||||||
@ -469,19 +608,22 @@ import {
|
|||||||
return +this.orderData?.refund_fee || 0;
|
return +this.orderData?.refund_fee || 0;
|
||||||
},
|
},
|
||||||
showBeforeSaleOrderStatus() {
|
showBeforeSaleOrderStatus() {
|
||||||
return !this.orderData.tui_status || this.orderData.tui_status === SHOP_ORDER_AFTERSALE_REJECT
|
return (
|
||||||
|
!this.orderData.tui_status ||
|
||||||
|
this.orderData.tui_status === SHOP_ORDER_AFTERSALE_REJECT
|
||||||
|
);
|
||||||
},
|
},
|
||||||
carNumber() {
|
carNumber() {
|
||||||
return this.orderData?.car_info?.car_no || ''
|
return this.orderData?.car_info?.car_no || "";
|
||||||
},
|
},
|
||||||
managerPhoneNum() {
|
managerPhoneNum() {
|
||||||
return this.orderData?.guanjia_info?.mobile || ''
|
return this.orderData?.guanjia_info?.mobile || "";
|
||||||
},
|
},
|
||||||
managerName() {
|
managerName() {
|
||||||
return this.orderData?.guanjia_info?.name || ''
|
return this.orderData?.guanjia_info?.name || "";
|
||||||
},
|
},
|
||||||
guanjiaPic() {
|
guanjiaPic() {
|
||||||
return this.orderData?.guanjia_info?.guanjia_pic || ''
|
return this.orderData?.guanjia_info?.guanjia_pic || "";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -494,7 +636,7 @@ import {
|
|||||||
const windowHeight = systemInfo.windowHeight;
|
const windowHeight = systemInfo.windowHeight;
|
||||||
// 计算底部距离:calc(35vh - 130rpx - 48rpx) 转换为rpx
|
// 计算底部距离:calc(35vh - 130rpx - 48rpx) 转换为rpx
|
||||||
// 35vh = windowHeight * 0.35,转换为rpx (750rpx = windowHeight px)
|
// 35vh = windowHeight * 0.35,转换为rpx (750rpx = windowHeight px)
|
||||||
const vh35InRpx = (windowHeight * 0.35 / windowHeight) * 750;
|
const vh35InRpx = ((windowHeight * 0.35) / windowHeight) * 750;
|
||||||
this.contactBtnBottom = vh35InRpx - 130 - 48;
|
this.contactBtnBottom = vh35InRpx - 130 - 48;
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -530,9 +672,33 @@ import {
|
|||||||
useCoupon(data) {
|
useCoupon(data) {
|
||||||
this.showCouponModal = false;
|
this.showCouponModal = false;
|
||||||
this.couponInfo = {
|
this.couponInfo = {
|
||||||
...data
|
...data,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
remindRefund(id) {
|
||||||
|
const data = {
|
||||||
|
id: Number(id),
|
||||||
|
};
|
||||||
|
cancelPetOrderMall(data).then((res) => {
|
||||||
|
const plugin = tt.requirePlugin("lifeServicePlugin");
|
||||||
|
plugin.applyRefund({
|
||||||
|
goodsList:res.data.goodsList,
|
||||||
|
outOrderNo:res.data.outOrderNo,
|
||||||
|
refundInfo:res.data.refundInfo,
|
||||||
|
success(res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '退款成功',
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
const { outRefundNo } = res;
|
||||||
|
tt.showToast({ title: outRefundNo });
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.log("fail", res);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 取消订单
|
// 取消订单
|
||||||
orderCancel() {
|
orderCancel() {
|
||||||
@ -543,7 +709,7 @@ import {
|
|||||||
});
|
});
|
||||||
const data = {
|
const data = {
|
||||||
order_id: Number(this.orderId),
|
order_id: Number(this.orderId),
|
||||||
}
|
};
|
||||||
cancelPetOrderMall(data).then((res) => {
|
cancelPetOrderMall(data).then((res) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
this.showCancelModal = false;
|
this.showCancelModal = false;
|
||||||
@ -580,7 +746,7 @@ import {
|
|||||||
type: 4,
|
type: 4,
|
||||||
total_fee: Number(this.orderData.actual_price),
|
total_fee: Number(this.orderData.actual_price),
|
||||||
order_id: this.orderData.order_id,
|
order_id: this.orderData.order_id,
|
||||||
order_no:this.orderData.order_no
|
order_no: this.orderData.order_no,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
tt.pay({
|
tt.pay({
|
||||||
orderInfo: {
|
orderInfo: {
|
||||||
@ -605,8 +771,6 @@ import {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 提醒发货
|
// 提醒发货
|
||||||
remindSliver() {
|
remindSliver() {
|
||||||
@ -633,7 +797,7 @@ import {
|
|||||||
title: "暂无评价",
|
title: "暂无评价",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/client/remark/details?remarkId=${this.orderData.pinglun_id}`,
|
url: `/pages/client/remark/details?remarkId=${this.orderData.pinglun_id}`,
|
||||||
@ -686,7 +850,10 @@ import {
|
|||||||
// 按钮高度约120rpx
|
// 按钮高度约120rpx
|
||||||
const btnHeight = 120;
|
const btnHeight = 120;
|
||||||
|
|
||||||
newBottom = Math.max(0, Math.min(newBottom, windowHeight * 2 - btnHeight));
|
newBottom = Math.max(
|
||||||
|
0,
|
||||||
|
Math.min(newBottom, windowHeight * 2 - btnHeight)
|
||||||
|
);
|
||||||
|
|
||||||
// right始终保持为0
|
// right始终保持为0
|
||||||
this.contactBtnRight = 0;
|
this.contactBtnRight = 0;
|
||||||
@ -709,15 +876,15 @@ import {
|
|||||||
},
|
},
|
||||||
// 退款成功回调
|
// 退款成功回调
|
||||||
handleRefundSuccess(e) {
|
handleRefundSuccess(e) {
|
||||||
console.log('退款成功:', e.detail)
|
console.log("退款成功:", e.detail);
|
||||||
uni.showToast({ title: '退款申请已提交', icon: 'success' })
|
uni.showToast({ title: "退款申请已提交", icon: "success" });
|
||||||
this.getOrderDetail()
|
this.getOrderDetail();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 退款错误回调
|
// 退款错误回调
|
||||||
handleRefundError(e) {
|
handleRefundError(e) {
|
||||||
console.error('退款错误:', e.detail)
|
console.error("退款错误:", e.detail);
|
||||||
uni.showToast({ title: e.detail.message || '退款失败', icon: 'none' })
|
uni.showToast({ title: e.detail.message || "退款失败", icon: "none" });
|
||||||
},
|
},
|
||||||
|
|
||||||
formatSecond(seconds) {
|
formatSecond(seconds) {
|
||||||
@ -737,7 +904,7 @@ import {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #F7F8FA;
|
background: #f7f8fa;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
|
||||||
.order-status {
|
.order-status {
|
||||||
@ -804,7 +971,7 @@ import {
|
|||||||
|
|
||||||
.address-name {
|
.address-name {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
|
|
||||||
.address-phone {
|
.address-phone {
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
@ -829,14 +996,13 @@ import {
|
|||||||
width: 34rpx;
|
width: 34rpx;
|
||||||
height: 34rpx;
|
height: 34rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sliver-text {
|
.sliver-text {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -880,7 +1046,7 @@ import {
|
|||||||
.goods-name {
|
.goods-name {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -891,7 +1057,7 @@ import {
|
|||||||
.goods-price {
|
.goods-price {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -940,7 +1106,7 @@ import {
|
|||||||
|
|
||||||
.payment-text {
|
.payment-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -963,19 +1129,19 @@ import {
|
|||||||
|
|
||||||
.pay-label {
|
.pay-label {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #9B939A;
|
color: #9b939a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pay-value {
|
.pay-value {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-row {
|
.coupon-row {
|
||||||
.coupon-price {
|
.coupon-price {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #FF19A0;
|
color: #ff19a0;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -989,12 +1155,12 @@ import {
|
|||||||
|
|
||||||
.pay-label {
|
.pay-label {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pay-total {
|
.pay-total {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #FF19A0;
|
color: #ff19a0;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1045,12 +1211,12 @@ import {
|
|||||||
|
|
||||||
.order-label {
|
.order-label {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #9B939A;
|
color: #9b939a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-value {
|
.order-value {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #3D3D3D;
|
color: #3d3d3d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1118,11 +1284,16 @@ import {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding-top: 12rpx;
|
padding-top: 12rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
// 两个按钮时左右分布
|
||||||
|
&.two-buttons {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.refund-btn-wrapper {
|
.refund-btn-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@ -1149,10 +1320,20 @@ import {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 最后一个按钮的特殊样式(优先级最高)
|
// 退款按钮保持粉色边框白色背景样式
|
||||||
|
.handle-btn.refund-btn {
|
||||||
|
border: 2rpx solid #ff19a0 !important;
|
||||||
|
background: transparent !important;
|
||||||
|
|
||||||
|
.btnColor {
|
||||||
|
color: #ff19a0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 最后一个按钮(立即预约)保持粉色背景白色文字样式
|
||||||
.handle-btn:last-child {
|
.handle-btn:last-child {
|
||||||
border: 2rpx solid #FF19A0 !important;
|
border: 2rpx solid #ff19a0 !important;
|
||||||
background: #FF19A0 !important;
|
background: #ff19a0 !important;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
@ -1181,8 +1362,8 @@ import {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.contact-btn {
|
.contact-btn {
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
background-color: #FF19A0;
|
background-color: #ff19a0;
|
||||||
border-radius: 257px;
|
border-radius: 257px;
|
||||||
padding: 6rpx 8rpx;
|
padding: 6rpx 8rpx;
|
||||||
transform: translateY(-8px);
|
transform: translateY(-8px);
|
||||||
@ -1226,6 +1407,5 @@ import {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user