Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27ac2a086d | ||
|
|
df87d0f9c8 | ||
|
|
7aeff7ece1 | ||
|
|
7dcba7c04b |
@@ -102,6 +102,17 @@ export function postOrderRefund(data) {
|
|||||||
return request.post("/order/refund/verify", data);
|
return request.post("/order/refund/verify", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消退款申请
|
||||||
|
* @param uni
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function cancelOrderRefund(uni) {
|
||||||
|
return request.post("/order/refund/cancel", {
|
||||||
|
uni
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认收货
|
* 确认收货
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
<text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text>
|
<text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="v12-justify-between v12-align-center v12-py-1">
|
<view v-if="!isLotteryOrder()" class="v12-justify-between v12-align-center v12-py-1">
|
||||||
<view class="v12-font-24 v12-dark-text v12-align-center">
|
<view class="v12-font-24 v12-dark-text v12-align-center">
|
||||||
<text>优惠券</text>
|
<text>优惠券</text>
|
||||||
<view class="v12-align-center v12-ml-1" v-if="couponTitle">
|
<view class="v12-align-center v12-ml-1" v-if="couponTitle">
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- v9 优惠券开始 -->
|
<!-- v9 优惠券开始 -->
|
||||||
<u-popup
|
<u-popup
|
||||||
v-if="show"
|
v-if="!isLotteryOrder() && show"
|
||||||
:show="show"
|
:show="show"
|
||||||
:round="10"
|
:round="10"
|
||||||
mode="bottom"
|
mode="bottom"
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
@close="close"
|
@close="close"
|
||||||
>
|
>
|
||||||
<CouponsPopup
|
<CouponsPopup
|
||||||
v-if="couponList.usable.length > 0 && show"
|
v-if="!isLotteryOrder() && couponList.usable.length > 0 && show"
|
||||||
:two-list="couponList"
|
:two-list="couponList"
|
||||||
@change="changeCoupons"
|
@change="changeCoupons"
|
||||||
@close="close"
|
@close="close"
|
||||||
@@ -452,6 +452,25 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isNullOrEmpty,
|
isNullOrEmpty,
|
||||||
|
isLotteryOrder() {
|
||||||
|
const cartInfo = Array.isArray(this.orderGroupInfo && this.orderGroupInfo.cartInfo)
|
||||||
|
? this.orderGroupInfo.cartInfo
|
||||||
|
: []
|
||||||
|
return Boolean(
|
||||||
|
this.lotteryRecordId ||
|
||||||
|
this.$yroute.query.from === 'countyLottery' ||
|
||||||
|
Number(this.$yroute.query.drawActivityId || 0) > 0 ||
|
||||||
|
cartInfo.some(item => Number(
|
||||||
|
item.drawActivityId ||
|
||||||
|
(item.productInfo && item.productInfo.drawActivityId) ||
|
||||||
|
0
|
||||||
|
) > 0)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
getOrderCouponId() {
|
||||||
|
if (this.isLotteryOrder()) return 0
|
||||||
|
return this.couponList.usable.length === 0 ? 0 : (this.couponId || 0)
|
||||||
|
},
|
||||||
couponMax(e) {
|
couponMax(e) {
|
||||||
// this.couponTitle = e.couponTitle
|
// this.couponTitle = e.couponTitle
|
||||||
// this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
|
// this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
|
||||||
@@ -477,12 +496,17 @@ export default {
|
|||||||
postOrderComputed(this.orderGroupInfo.orderKey, {
|
postOrderComputed(this.orderGroupInfo.orderKey, {
|
||||||
addressId: this.addressInfo.id,
|
addressId: this.addressInfo.id,
|
||||||
useIntegral: this.useIntegral ? 1 : 0,
|
useIntegral: this.useIntegral ? 1 : 0,
|
||||||
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId,
|
couponId: this.getOrderCouponId(),
|
||||||
usePoints: this.usePointsCheck ? 1 : 0,
|
usePoints: this.usePointsCheck ? 1 : 0,
|
||||||
shipping_type: parseInt(this.shipping_type) + 1
|
shipping_type: parseInt(this.shipping_type) + 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.couponList = res.data.result.couponList
|
this.couponList = res.data.result.couponList
|
||||||
if(!f) {
|
if (this.isLotteryOrder()) {
|
||||||
|
this.couponTitle = ''
|
||||||
|
if (this.couponId !== 0) {
|
||||||
|
this.couponId = 0
|
||||||
|
}
|
||||||
|
} else if(!f) {
|
||||||
this.couponId = res.data.result.defaultCouponId
|
this.couponId = res.data.result.defaultCouponId
|
||||||
}
|
}
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
@@ -683,7 +707,7 @@ export default {
|
|||||||
phone: this.contactsTel,
|
phone: this.contactsTel,
|
||||||
addressId: this.addressInfo.id,
|
addressId: this.addressInfo.id,
|
||||||
useIntegral: this.useIntegral ? 1 : 0,
|
useIntegral: this.useIntegral ? 1 : 0,
|
||||||
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId || 0,
|
couponId: this.getOrderCouponId(),
|
||||||
usePoints: this.usePointsNumber || 0,
|
usePoints: this.usePointsNumber || 0,
|
||||||
payType: this.active,
|
payType: this.active,
|
||||||
pinkId: this.pinkId,
|
pinkId: this.pinkId,
|
||||||
@@ -811,11 +835,13 @@ export default {
|
|||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
showCouponsPopup() {
|
showCouponsPopup() {
|
||||||
|
if (this.isLotteryOrder()) return
|
||||||
if (this.couponList.usable.length === 0) return
|
if (this.couponList.usable.length === 0) return
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
// v9-2
|
// v9-2
|
||||||
changeCoupons(item) {
|
changeCoupons(item) {
|
||||||
|
if (this.isLotteryOrder()) return
|
||||||
if(!item) return
|
if(!item) return
|
||||||
if (this.couponList.usable.length === 0) return
|
if (this.couponList.usable.length === 0) return
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
|
|||||||
@@ -554,8 +554,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == -1">
|
<template v-if="status.type == -1">
|
||||||
<view style="width: 100%">
|
<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="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border cancel" @click="cancelRefund">取消退款</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == -2">
|
<template v-if="status.type == -2">
|
||||||
@@ -654,7 +655,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||||
import OrderGoods from "@/components/OrderGoods";
|
import OrderGoods from "@/components/OrderGoods";
|
||||||
import {orderDetail, orderDelay, aginConfirm, express, applyEditAddress, orderExpectedArrivalTime, groupOrderDetail} from "@/api/order";
|
import {orderDetail, orderDelay, aginConfirm, express, applyEditAddress, orderExpectedArrivalTime, groupOrderDetail, cancelOrderRefund} from "@/api/order";
|
||||||
import Payment from "@/components/Payment";
|
import Payment from "@/components/Payment";
|
||||||
import DataFormat from "@/components/DataFormat";
|
import DataFormat from "@/components/DataFormat";
|
||||||
import {copyClipboard} from "@/utils";
|
import {copyClipboard} from "@/utils";
|
||||||
@@ -1166,6 +1167,39 @@ export default {
|
|||||||
this.getDetail();
|
this.getDetail();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
cancelRefund() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '取消退款申请',
|
||||||
|
content: '确认取消退款申请吗?',
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '再想想',
|
||||||
|
confirmText: '确认取消',
|
||||||
|
confirmColor: '#C52733 ',
|
||||||
|
success: (res) => {
|
||||||
|
if (!res.confirm) return;
|
||||||
|
uni.showLoading({
|
||||||
|
title: '取消中'
|
||||||
|
});
|
||||||
|
cancelOrderRefund(this.orderInfo.orderId).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg || '已取消退款申请',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
this.getDetail();
|
||||||
|
}).catch((err) => {
|
||||||
|
const message = err.msg || (err.response && err.response.data && (err.response.data.msg || err.response.data.message)) || '取消退款失败';
|
||||||
|
uni.showToast({
|
||||||
|
title: message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
});
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
takeOrder() {
|
takeOrder() {
|
||||||
takeOrderHandle(this.orderInfo.orderId).finally(() => {
|
takeOrderHandle(this.orderInfo.orderId).finally(() => {
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
|
|||||||
@@ -29,6 +29,13 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card form-card">
|
<view class="card form-card">
|
||||||
|
<view class="form-card-header">
|
||||||
|
<view class="form-card-title">填写收货地址</view>
|
||||||
|
<view class="select-address-entry" @click="chooseExistingAddress">
|
||||||
|
<text class="select-address-text" style="margin-bottom: 4rpx;">选择现有地址 </text>
|
||||||
|
<u-icon name="arrow-right" size="14" color="#BD3124"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<text class="label">收货人</text>
|
<text class="label">收货人</text>
|
||||||
<input v-model="form.realName" class="input" placeholder="请填写收货人" placeholder-style="color:#b2b2b2;" />
|
<input v-model="form.realName" class="input" placeholder="请填写收货人" placeholder-style="color:#b2b2b2;" />
|
||||||
@@ -190,6 +197,7 @@ export default {
|
|||||||
this.fetchRealnameStatus()
|
this.fetchRealnameStatus()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.handleChooseAddress()
|
||||||
const done = uni.getStorageSync('countyClaimAuthDone')
|
const done = uni.getStorageSync('countyClaimAuthDone')
|
||||||
const needAutoSubmit = uni.getStorageSync('countyClaimNeedAutoSubmit')
|
const needAutoSubmit = uni.getStorageSync('countyClaimNeedAutoSubmit')
|
||||||
if (done && (this.waitSubmitAfterRealname || needAutoSubmit)) {
|
if (done && (this.waitSubmitAfterRealname || needAutoSubmit)) {
|
||||||
@@ -219,6 +227,41 @@ export default {
|
|||||||
goBack() {
|
goBack() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
|
chooseExistingAddress() {
|
||||||
|
uni.setStorageSync('sourceAddress', {
|
||||||
|
realName: this.form.realName || '',
|
||||||
|
phone: this.form.phone || '',
|
||||||
|
userAddress: `${this.address.province || ''}${this.address.city || ''}${this.address.district || ''}${this.form.detail || ''}`,
|
||||||
|
province: this.address.province || '',
|
||||||
|
city: this.address.city || '',
|
||||||
|
district: this.address.district || '',
|
||||||
|
detail: this.form.detail || ''
|
||||||
|
})
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: '/pages/user/address/AddressManagement/index',
|
||||||
|
query: {
|
||||||
|
choosMode: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleChooseAddress() {
|
||||||
|
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
|
||||||
|
if (!chooseAddress.id) return
|
||||||
|
uni.setStorageSync('chooseAddress', {})
|
||||||
|
this.fillAddressForm(chooseAddress)
|
||||||
|
},
|
||||||
|
fillAddressForm(address = {}) {
|
||||||
|
this.form.realName = address.realName || address.real_name || ''
|
||||||
|
this.form.phone = address.phone || ''
|
||||||
|
this.form.detail = address.detail || ''
|
||||||
|
this.address = {
|
||||||
|
province: address.province || '',
|
||||||
|
city: address.city || '',
|
||||||
|
district: address.district || '',
|
||||||
|
city_id: address.city_id || address.cityId || address.city_id
|
||||||
|
}
|
||||||
|
this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`.trim()
|
||||||
|
},
|
||||||
getCityList() {
|
getCityList() {
|
||||||
getCity().then(res => {
|
getCity().then(res => {
|
||||||
this.district = res.data || []
|
this.district = res.data || []
|
||||||
@@ -585,6 +628,31 @@ export default {
|
|||||||
padding: 0 24rpx 24rpx;
|
padding: 0 24rpx 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-card-header {
|
||||||
|
min-height: 88rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 2rpx dashed #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-card-title {
|
||||||
|
color: #262626;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-address-entry {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #BD3124;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-address-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.form-row {
|
.form-row {
|
||||||
min-height: 92rpx;
|
min-height: 92rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user