Fix:3315 【礼品功能】待发货订单退款详情页不要显示物流信息

This commit is contained in:
linxi
2025-02-28 16:03:30 +08:00
parent 1baf5de741
commit c3d6b25a5e
6 changed files with 70 additions and 23 deletions
+8
View File
@@ -47,4 +47,12 @@ export function getGiftCardSendNotice(data) {
*/ */
export function getGiftCardSendOrderAmount(key, data) { export function getGiftCardSendOrderAmount(key, data) {
return request.post("giftCard/computed/" + key, data); return request.post("giftCard/computed/" + key, data);
}
/**
* 再送一份
* @param {*} data
*/
export function getGiftCardResend(data) {
return request.post("/giftCard/makeAgain", data);
} }
+2 -1
View File
@@ -29,7 +29,7 @@
</view> </view>
</view> </view>
<!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因{{ orderInfo.refundRejectReason }}</view> --> <!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因{{ orderInfo.refundRejectReason }}</view> -->
<view v-if="orderInfo._status._type == -1 || orderInfo._status._type == -2 || orderInfo._status._type == 4 || orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)"> <view v-if="orderInfo.deliveryId !== null && orderInfo._status._type == -1 || orderInfo._status._type == -2 || orderInfo._status._type == 4 || orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)">
<view v-if="index < 2 || showMoreDeliver" v-for="(delivery, index) in orderInfo.deliveryInfo" :key="index" class="v12-radius-20 v12-white v12-pa-3 v12-mt-4"> <view v-if="index < 2 || showMoreDeliver" v-for="(delivery, index) in orderInfo.deliveryInfo" :key="index" class="v12-radius-20 v12-white v12-pa-3 v12-mt-4">
<view> <view>
<text class="v12-secondary-dark-text v12-font-28">{{ delivery.deliveryName }}{{ delivery.deliveryId }}</text> <text class="v12-secondary-dark-text v12-font-28">{{ delivery.deliveryName }}{{ delivery.deliveryId }}</text>
@@ -554,6 +554,7 @@ export default {
// this.$forceUpdate() // this.$forceUpdate()
}, },
getExpressInfo(delivery, i) { getExpressInfo(delivery, i) {
if(delivery.deliveryId === null) return
let params = { let params = {
orderCode: this.orderInfo.id, orderCode: this.orderInfo.id,
shipperCode: delivery.deliverySn, shipperCode: delivery.deliverySn,
+11 -1
View File
@@ -9,6 +9,7 @@
<view class="cover-picker"> <view class="cover-picker">
<view class="cover-title">选择封面</view> <view class="cover-title">选择封面</view>
<swiper <swiper
:current="currentIndex"
:autoplay="false" :autoplay="false"
:circular="true" :circular="true"
:indicator-dots="false" :indicator-dots="false"
@@ -43,6 +44,10 @@
<script> <script>
export default { export default {
props: { props: {
index: {
type: Number,
default: 0
},
show: { show: {
type: Boolean, type: Boolean,
default: true default: true
@@ -62,7 +67,12 @@ export default {
}, },
data() { data() {
return { return {
currentIndex: 0 currentIndex: this.index
}
},
watch: {
index(val) {
this.currentIndex = val
} }
}, },
methods: { methods: {
+1 -1
View File
@@ -236,7 +236,7 @@ export default {
} }
.auto-text-color { .auto-text-color {
color: #fff; color: #fff;
font-size: 28rpx; font-size: 32rpx;
opacity: 0.8; opacity: 0.8;
margin-top: 150rpx; margin-top: 150rpx;
width: 400rpx; width: 400rpx;
+9 -5
View File
@@ -12,7 +12,9 @@
<!-- 标题 --> <!-- 标题 -->
<view class="title">赠礼须知</view> <view class="title">赠礼须知</view>
<!-- 富文本内容 --> <!-- 富文本内容 -->
<u-parse :content="richText" /> <view class="text-wrap">
<u-parse :content="richText" />
</view>
</view> </view>
</u-popup> </u-popup>
</view> </view>
@@ -36,10 +38,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.popup-content { .text-wrap{
width: 600rpx;
height: 800rpx; height: 800rpx;
overflow: auto; overflow: auto;
}
.popup-content {
width: 600rpx;
padding:0 40rpx 40rpx 40rpx; padding:0 40rpx 40rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
.title { .title {
@@ -48,10 +52,10 @@ export default {
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
margin-bottom: 30rpx;
position: sticky;
top: 0; top: 0;
background: #fff; background: #fff;
background-color: #fff;
z-index: 11;
} }
.close-btn { .close-btn {
+39 -15
View File
@@ -107,7 +107,7 @@
<view class="gift-submit" @click="showPayPicker = true">付款并赠送</view> <view class="gift-submit" @click="showPayPicker = true">付款并赠送</view>
</view> </view>
<view class="btn-wrap v12-mt-16 v12-justify-center" v-if="isPayOk"> <view class="btn-wrap v12-mt-16 v12-justify-center" v-if="isPayOk">
<view class="gift-submit">再送一份</view> <view class="gift-submit" @click="makeAgain">再送一份</view>
</view> </view>
<view class="tip-wrap v12-justify-center"> <view class="tip-wrap v12-justify-center">
<view class="tip-text v12-mr-1">好友未收下礼包将于24小时后自动退款</view> <view class="tip-text v12-mr-1">好友未收下礼包将于24小时后自动退款</view>
@@ -119,6 +119,7 @@
:list="coverList" :list="coverList"
:product="goodsInfo.productInfo" :product="goodsInfo.productInfo"
@confirm="onCoverConfirm" @confirm="onCoverConfirm"
:index="defaultIndex"
:message="message" :message="message"
/> />
<passkeyborad <passkeyborad
@@ -139,7 +140,8 @@
<script> <script>
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard' import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
import { getGiftCardSendOrderConfirm, getGiftCardSendOrder, getGiftCardSendOrderAmount } from '@/api/gift' import { getGiftCardSendOrderConfirm, getGiftCardSendOrder, getGiftCardSendOrderAmount, getGiftCardResend } from '@/api/gift'
import { weappPay } from "@/libs/wechat";
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
import giftTips from './components/giftTips.vue' import giftTips from './components/giftTips.vue'
import CoverPicker from './components/CoverPicker.vue' import CoverPicker from './components/CoverPicker.vue'
@@ -176,7 +178,9 @@ export default {
payType: '', payType: '',
isPayOk: false, isPayOk: false,
giftKey: '', giftKey: '',
payPrice: 0 payPrice: 0,
orderId: '',
defaultIndex:0
} }
}, },
onLoad(opts) { onLoad(opts) {
@@ -200,8 +204,27 @@ export default {
}) })
}, },
methods: { methods: {
makeAgain() {
const params = {
orderId: this.orderId,
}
getGiftCardResend(params).then(res => {
this.isPayOk = false
this.coverList = [...res.data.giftCardTemplates, res.data.specialGiftCardTemplate]
this.cartId = res.data.cartInfo[0].id
this.giftNotice = res.data.giftCardGiftNotice
this.orderKey = res.data.orderKey
this.goodsInfo = res.data.cartInfo[0]
this.templateId = res.data.specialGiftCardTemplate.id
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
console.log(this.defaultIndex, 'defaultIndex');
this.selectedCover = res.data.specialGiftCardTemplate.cover
this.giftImage = res.data.specialGiftCardTemplate.image
this.couponId = ''
this.computedPrice(this.goodsInfo.cartNum)
})
},
messageChange(e) { messageChange(e) {
console.log(e);
this.message = e.substring(0, 30) this.message = e.substring(0, 30)
}, },
numberChange(e) { numberChange(e) {
@@ -247,6 +270,8 @@ export default {
this.templateId = res.data.specialGiftCardTemplate.id this.templateId = res.data.specialGiftCardTemplate.id
this.selectedCover = res.data.specialGiftCardTemplate.cover this.selectedCover = res.data.specialGiftCardTemplate.cover
this.giftImage = res.data.specialGiftCardTemplate.image this.giftImage = res.data.specialGiftCardTemplate.image
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
console.log(this.defaultIndex, 'defaultIndex');
if(!this.couponId) { if(!this.couponId) {
this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || '' this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || ''
} }
@@ -329,6 +354,7 @@ export default {
}); });
this.isPayOk = true; this.isPayOk = true;
this.giftKey = data.giftCard.code; this.giftKey = data.giftCard.code;
this.orderId = data.result.orderId || ''
break; break;
case "WECHAT_H5_PAY": case "WECHAT_H5_PAY":
// H5支付 // H5支付
@@ -341,12 +367,13 @@ export default {
// 小程序支付 // 小程序支付
weappPay(data.result.jsConfig).finally(() => { weappPay(data.result.jsConfig).finally(() => {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
this.isPayOk = true; this.isPayOk = true;
this.giftKey = data.giftCard.code; this.giftKey = data.giftCard.code;
this.orderId = data.result.orderId || ''
}); });
break; break;
@@ -358,13 +385,10 @@ export default {
break; break;
} }
}) .catch(err => { }) .catch(err => {
console.log(err);
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: title:"创建订单失败",
err.msg ||
err.response.data.msg ||
err.response.data.message ||
"创建订单失败",
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });