对接售后模块部分接口

This commit is contained in:
赵毅 2025-09-11 18:04:54 +08:00
parent 6bf7d78776
commit 998a14c878
13 changed files with 230 additions and 126 deletions

View File

@ -1,5 +1,9 @@
export const apiArr = {
orderList: '/api/v2/wechat/commodity/order', // 商品订单列表
afterSalesList: '/api/v2/wechat/commodity/after-sales/list', // 商品订单售后列表
afterSaleCreate: "/api/v2/wechat/commodity/after-sales/refund-info/create", //商品订单售后信息创建
cancelOrConfirm: "/api/v2/wechat/commodity/order/cancel_or_confirm", //商品订单确认收货或取消
isAllow: "/api/v2/wechat/commodity/after-sales/is-allow", //判断订单是否能申请售后
revokeApply: "/api/v2/wechat/commodity/after-sales/revoke-apply", //撤销售后申请
changeGoodsList: "/api/v2/wechat/commodity/after-sales/change-goods-list", //商品售后换货商品列表
};

View File

@ -1,3 +0,0 @@
export const apiArr = {
orderList: '/api/v2/wechat/commodity/order', // 商品订单列表
}

View File

@ -93,8 +93,7 @@
.goods-desc {
font-size: 26rpx;
color: #ff4d4f;
background-color: #fff2f0;
color: #999999;
padding: 4rpx 12rpx;
border-radius: 8rpx;
display: inline-block;

View File

@ -5,9 +5,8 @@
<!-- 头部信息 -->
<view class="header">
<view class="company-info">
<text class="company-name">{{ item.commodity_order_item[0].goods_name || '衡水喜屏传媒有限公司'
}}</text>
<text class="after-sale-no">退货退款</text>
<text class="company-name">{{ item.commodity_order_item[0].goods_name }}</text>
<text class="after-sale-no">{{ item.after_sales_type === 1 ? '退款' : (item.after_sales_type === 2 ? '退货瑞款' : '换货') }}</text>
</view>
<text class="order-time">提交订单{{ formatDate(item.create_time) }}</text>
</view>
@ -22,7 +21,7 @@
{{ ite.goods_name }}
<text class="refund-amount">退款¥{{ ite.sales_price }}</text>
</text>
<text class="goods-desc">{{ ite.after_sales_reason }}</text>
<text class="goods-desc">{{ ite.goods_spec }}</text>
<view class="price-count">
<text class="goods-price">¥{{ ite.sales_price }}/</text>
<text class="goods-count">x{{ ite.count }}</text>
@ -43,7 +42,7 @@
<!-- 操作按钮 -->
<view class="action-buttons">
<button class="modify-btn" @click="modifyApplication">修改申请</button>
<button class="cancel-btn" @click="cancelApplication">撤销申请</button>
<button class="cancel-btn" @click="cancelApplication(item)">撤销申请</button>
</view>
</view>
</view>
@ -53,6 +52,7 @@
<script>
import afterSaleData from './afterSale.json';
import { apiArr } from "../../../api/afterSale";
import {
isPhone,
picUrl,
@ -62,15 +62,32 @@ import {
} from '../../../utils';
export default {
props: {
afterSaleList: {
type: Array,
default: () => []
}
},
data() {
return {
currentAfterSale: afterSaleData
// currentAfterSale: afterSaleData
currentAfterSale: this.afterSaleList,
};
},
onLoad() {
},
methods: {
getList() {
const params = {
user_id: uni.getStorageSync('userId'),
}
request(apiArr.afterSalesList, "POST", params).then((res) => {
res.after_sales_list.forEach(item => {
item.commodity_order_item?.forEach(good => {
good.commodity_pic = picUrl + good.commodity_pic;
})
})
this.currentAfterSale = res.after_sales_list;
});
},
getStatusText(status) {
//
const statusMap = {
@ -98,14 +115,22 @@ export default {
modifyApplication() {
console.log('修改申请');
},
cancelApplication() {
cancelApplication(item) {
uni.showModal({
title: '提示',
content: '确定要撤销退款申请吗?',
success: (res) => {
if (res.confirm) {
console.log('撤销申请');
uni.navigateBack();
const params = {
id: item.id,
}
request(apiArr.revokeApply, "POST", params).then((res) => {
this.getList();
uni.showToast({
title: '订单撤销成功',
icon: 'success'
});
});
}
}
});
@ -116,8 +141,7 @@ export default {
// NavgateTo(`/packages/myOrders/refundOver/index?item=${JSON.stringify(item)}`); //退
// NavgateTo(`/packages/myOrders/changeInfo/index?item=${JSON.stringify(item)}`); //
}
}
},
};
</script>

View File

@ -1,6 +1,6 @@
page {
background-color: #f6f7fb;
padding-bottom: 0;
padding-bottom: 50rpx;
min-height: 100vh;
}

View File

@ -5,7 +5,7 @@
:class="['tabItem', selectedTab === index ? 'active2' : '']" @click="selectTab(index, item)">
{{ item.category_name }}
</view>
</view>
<view class="content">
@ -16,7 +16,7 @@
<rated />
</view>
<view v-if="selectedTab === 8">
<afterSale />
<afterSale :afterSaleList="afterSaleList" />
</view>
<view v-else>
<view v-for="(item, index) in orderData" :key="index">
@ -63,7 +63,7 @@
<button class="pay-btn" @click="confirmReceiving(item)">确认收货</button>
</view>
<view class="btn-group" v-if="item.order_status === 5">
<text class="afterSaleNum">{{item.commodity_order_item_list.length}}笔售后</text>
<text class="afterSaleNum">{{ item.commodity_order_item_list.length }}笔售后</text>
<button class="cancel-btn" @click="afterSale(item)">退换/售后</button>
<button class="pay-btn" @click="cancelOrder">评价</button>
</view>
@ -93,7 +93,7 @@
<!-- 退换 售后 - 选择退款原因 -->
<!-- 售后弹窗组件 -->
<after-sale-popup :afterSaleGoods.sync="afterSaleGoods" ref="afterSalePopupRef"
<after-sale-popup :afterSaleGoods.sync="afterSaleGoods" :orderItem="afterSaleOrderItem" ref="afterSalePopupRef"
@refundSubmitted="handleRefundSubmitted" />
<!-- 无售后商品 -->
@ -117,7 +117,6 @@ import {
upload,
NavgateTo
} from '../../../utils';
import { apiArr } from "../../../api/order";
import { apiArr as afterSaleApi } from "../../../api/afterSale";
import Rated from "../rated/rated.vue";
import AwaitRated from "../awaitRated/awaitRated.vue";
@ -151,13 +150,16 @@ export default {
{ category_name: "售后" },
],
selectedTab: 0,
orderData: orderMockData,
// orderData: orderMockData,
orderData: [],
showPopup: false,//
afterSaleGoods: [],//
afterSaleOrderItem: {},//
noSalePopup: false,//
showTkPopup: false,//退
afterSaleItem: '',//
afterSaleList: [],//
};
},
methods: {
@ -182,35 +184,58 @@ export default {
cancel_reason: data.reason,
}
request(afterSaleApi.cancelOrConfirm, "POST", params).then((res) => {
console.log("🚀 ~ handleOrderCancelled ~ res:", res)
this.getOrderList();
});
},
//
afterSale(item) {
console.log("🚀 ~ afterSale ~ item:", item)
this.afterSaleGoods = item.commodity_order_item_list;
//
this.afterSaleOrderItem = item;
this.$refs.afterSalePopupRef.openAfterSalePopup();
console.log(item.id);
console.log(item.id);
//
// request(afterSaleApi.isAllow, "POST", {
// order_id: item.id,
// }).then((res) => {
// console.log("🚀 ~ afterSale ~ res:", res)
// if (res.data.is_allow_after_sales) {
// this.afterSaleGoods = res.data.allow_items;
// // this.selectedAsGood = item.commodity_order_item_list[0].id;
// this.$refs.afterSalePopupRef.openAfterSalePopup();
// } else {
// this.noSalePopup = true
// }
// });
// request(afterSaleApi.isAllow, "POST", {
// order_id: item.id,
// }).then((res) => {
// console.log("🚀 ~ afterSale ~ res:", res)
// if (res.data.is_allow_after_sales) {
// this.afterSaleGoods = res.data.allow_items;
// // this.selectedAsGood = item.commodity_order_item_list[0].id;
// this.$refs.afterSalePopupRef.openAfterSalePopup();
// } else {
// this.noSalePopup = true
// }
// });
},
// 退
handleRefundSubmitted(data) {
console.log("🚀 ~ handleRefundSubmitted ~ handleRefundSubmitted:", this.afterSaleOrderItem)
console.log("🚀 ~ handleRefundSubmitted ~ 退款申请提交成功:", data);
const params = {
nick_name: uni.getStorageSync("nickName"),
order_id: this.afterSaleOrderItem.id,
goods_ids: this.afterSaleOrderItem.commodity_order_item_list.map(item => item.goods_id),
after_sales_type: data.afterSalesType,
after_sales_reason: data.refundReason,
refund_amount: this.afterSaleOrderItem.total_amount,
application_description: data.refundDescription,
// URL
application_images: data.imgList && data.imgList.length > 0 ?
data.imgList.map(img => img.url).join(',') : '',
order_status: 5,
receiving_address: data.merchantAddress,
change_goods_id: data.changeServiceId
}
console.log("🚀 ~ handleRefundConfirmed ~ parasm:", params)
// request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
// this.getOrderList();
// });
},
@ -219,11 +244,11 @@ export default {
this.afterSaleItem = item;
this.showTkPopup = true
},
//
viewLogistics(item) {
},
//
viewLogistics(item) {
},
// 退
handleRefundConfirmed(data) {
@ -232,6 +257,7 @@ export default {
const params = {
nick_name: uni.getStorageSync("nickName"),
order_id: this.afterSaleItem.id,
goods_ids: this.afterSaleItem.commodity_order_item_list.map(item => item.goods_id),
after_sales_type: 1,
after_sales_reason: data.reason,
refund_amount: this.afterSaleItem.total_amount,
@ -239,7 +265,7 @@ export default {
}
console.log("🚀 ~ handleRefundConfirmed ~ parasm:", params)
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
console.log("🚀 ~ handleRefundConfirmed ~ res:", res)
this.getOrderList();
});
},
@ -256,14 +282,14 @@ export default {
}
console.log("🚀 ~ confirmReceiving ~ params:", params)
request(afterSaleApi.cancelOrConfirm, "POST", params).then((res) => {
console.log("🚀 ~ handleRefundConfirmed ~ res:", res)
this.getOrderList();
});
}
},
});
},
goToPay(item) {
console.log(item);
console.log(item);
},
toDetails(item) {
NavgateTo(
@ -301,16 +327,39 @@ export default {
},
getOrderList() {
request(apiArr.orderList, "POST", {
request(afterSaleApi.orderList, "POST", {
order_status: this.selectedTab,
user_id: uni.getStorageSync("userId"),
}).then((res) => {
//
res.order_list.forEach(item => {
item.commodity_order_item_list.forEach(good => {
good.commodity_pic = picUrl + good.commodity_pic;
})
})
this.orderData = res.order_list;
});
},
getAfterSaleList() {
const params = {
user_id: uni.getStorageSync('userId'),
}
request(afterSaleApi.afterSalesList, "POST", params).then((res) => {
res.after_sales_list.forEach(item => {
// 退URL
if (item.return_images) {
const images = item.return_images.split(',');
const processedImages = images.map(img => picUrl + img).join(',');
item.return_images = processedImages;
}
})
this.afterSaleList = res.after_sales_list;
});
}
},
onLoad(options) {
this.getOrderList();
this.getAfterSaleList();
},
};
</script>

View File

@ -173,6 +173,8 @@
"create_time": "2024-08-22 14:50:33",
"update_time": "2024-08-22 18:30:15",
"after_sales_count": 1,
"supplier_address": "供应商收货地址",
"supplier_phone": "11111111111",
"commodity_order_item_list": [
{
"id": 50005,

View File

@ -427,7 +427,6 @@
}
.itemSize {
width: 30%;
font-size: 26rpx;
color: #333;
background: #F6F7FB;
@ -447,7 +446,6 @@
height: 100rpx;
margin-right: 30rpx;
border-radius: 20rpx;
border:1rpx solid red;
}
.itemSize_top{

View File

@ -19,13 +19,14 @@
</view>
<view class="asGoodsInfo" v-for="(item, index) in afterSaleGoods" :key="index">
<view class="asGoodInfo" @click="selectAsGood(item)">
<view :class="['radio asGoodRadio', selectedAsGood == item.id ? 'active' : '']"></view>
<view :class="['radio asGoodRadio', selectedAsGood == item.goods_id ? 'active' : '']">
</view>
<view class="asGoodTag tag-img" v-if="item.is_support_same_day === 1">当日达</view>
<image :src="item.commodity_pic" class="asGoodImg"></image>
<view class="asGoodDetail">
<view class="asGoodTitle">
<text class="asGoodTag asGoodTag1" v-if="item.is_support_same_day === 1">当日达</text>
{{ item.goods_name}}
{{ item.goods_name }}
</view>
<view class="asGoodDesc">{{ item.goods_spec }}</view>
<view class="asGoodPrice">¥{{ item.cost_price }}/</view>
@ -50,7 +51,7 @@
@click="selectAfterSaleType2(0)">
退货退款</view>
<view :class="['asTab2', selectedAfterSaleType2 === 1 ? 'active' : '']"
@click="selectAfterSaleType2(1)">退
@click="selectAfterSaleType2(1)">退
</view>
</view>
<view class="reason-list" v-if="selectedAfterSaleType2 === 0">
@ -79,7 +80,6 @@
<view class="refund-title">确认退款信息</view>
<view class="refund-item">
<view class="refund-label">服务类型<text class="required">*</text></view>
<view class="refund-value" @click="openAfterSalePopup2('serviceType')">
{{ selectedServiceType || '请选择服务类型' }}
<text class="arrow-right"></text>
@ -173,20 +173,21 @@
<view class="refund-item">
<view class="refund-label">换货商品<text class="required">*</text></view>
<view class="refund-value" @click="changeGood()">
{{ changeServiceType || '请选择需要换的商品' }}
{{ changeServiceName || '请选择需要换的商品' }}
<text class="arrow-right"></text>
</view>
</view>
<view class="text-wrapper_8">
<text class="text_41">高尚</text>
<text class="text_42">15901518415</text>
<text class="text_41">{{ orderItem.receiving_name }}</text>
<text class="text_42">{{ orderItem.receiving_phone }}</text>
</view>
<view class="block_15">
<view class="address-view">
<text> {{ merchantAddress }} </text>
<text> {{ orderItem.receiving_address }} </text>
<view class="copy-icon" @click="copyRefundNo"></view>
</view>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/af_update_address.png" class="icon_2"></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/af_update_address.png"
class="icon_2"></image>
</view>
<view class="hr"></view>
<view class="refund-item2">
@ -215,13 +216,14 @@
<view class="popup-header-view" @click="closeSize">取消</view>
</view>
<view class="itemSize_top">
<image :src="changeImg" class="itemSize-img"></image>
<image :src="currentGG.commodity_pic" class="itemSize-img"></image>
<view class="itemSize_info">
<view class="itemSize_name">{{ changeName }}</view>
<view class="itemSize_price">{{ changePrice }}/</view>
<view class="itemSize_name">{{ currentGG.goods_name }}</view>
<view class="itemSize_price">{{ currentGG.sales_price }}/{{ currentGG.goods_unit }}
</view>
</view>
</view>
<view class="itemSize" v-for="(item, index) in info.commodity_goods_info_list" :key="item.id"
<view class="itemSize" v-for="(item, index) in changeGoodsList" :key="item.id"
@click="changeGG(item, index)" :class="index == currentGGIndex ? 'itemSize_active' : ''">
{{ item.goods_name }} {{ item.goods_spec }} / {{ item.goods_unit }}
</view>
@ -230,11 +232,23 @@
</template>
<script>
import { upload, picUrl } from '../../../../../utils';
import {
isPhone,
picUrl,
request,
upload,
NavgateTo
} from '../../../../../utils';
import { apiArr } from "../../../../../api/afterSale";
export default {
name: 'AfterSalePopup',
props: {
orderItem: {
type: Object,
default: () => ({})
},
afterSaleGoods: {
type: Array,
default: () => []
@ -247,25 +261,22 @@ export default {
afterSalePopup3: false,
selectedAsGood: '',
selectedAfterSaleType: 0, // 0:退/退, 1:
selectedAfterSaleType2: 0, // 0:退/退, 1:退
selectedAfterSaleType2: 0, // 0:退/退, 1:退
selectedAsReason: 0,
selectedReason: 0,//
selectedServiceType: '',
selectedRefundReason: '',
changeRefundReason: '', //
changeServiceType: '', //
changeServiceName: '', //
changeServiceId: '', // id
changeGoodsList: [], //
showSize: false,//
changeImg: "",
changeName: "",
changePrice: "",
currentGG: {},//
currentGGIndex: 0,
afterSalesType: 0, // 1:退 2:退退 3:
refundAmount: 0,
maxRefundAmount: 0,
postage: 0,
refundDescription: '',
refundMethod: '自行寄回',
merchantAddress: '衡水市路北街道中心北大街世纪名城41号楼',
merchantContact: '高尚 18032753127',
imgList: [],
applyRefundReasons: [
'商品质量问题',
@ -294,7 +305,7 @@ export default {
openAfterSalePopup() {
this.$nextTick(() => {
if (this.afterSaleGoods && this.afterSaleGoods.length > 0) {
this.selectedAsGood = this.afterSaleGoods[0].id;
this.selectedAsGood = this.afterSaleGoods[0].goods_id;
this.afterSalePopup = true;
}
})
@ -302,7 +313,7 @@ export default {
//
selectAsGood(item) {
this.selectedAsGood = item.id;
this.selectedAsGood = item.goods_id;
},
//
@ -328,10 +339,18 @@ export default {
//
selectAfterSaleType(index) {
if (index === 1) {
this.afterSalesType = 3;
}
this.selectedAfterSaleType = index;
},
selectAfterSaleType2(index) {
if(index === 1) {
this.afterSalesType = 1;
}else{
this.afterSalesType = 2;
}
this.selectedAfterSaleType2 = index;
},
@ -379,7 +398,7 @@ export default {
// 退
confirmAfterSaleCancel2() {
const afterSaleTypes = ['退货退款', '退'];
const afterSaleTypes = ['退货退款', '退'];
const selectedType = afterSaleTypes[this.selectedAfterSaleType2];
console.log('选中的售后类型:', selectedType);
@ -394,10 +413,6 @@ export default {
// 退
this.selectedServiceType = selectedType;
this.selectedRefundReason = selectedReasonText;
// 退
this.refundAmount = 4704.00;
this.maxRefundAmount = 53.80;
this.postage = 0.00;
this.selectAsReason(0);
this.afterSalePopup2 = false;
@ -412,8 +427,25 @@ export default {
//
changeGood() {
this.afterSalePopup3 = false;
this.showSize = true;
const params = {
goods_id: this.selectedAsGood,
}
request(apiArr.changeGoodsList, "POST", params).then((res) => {
res.change_goods_list.forEach(item => {
item.commodity_pic = picUrl + item.commodity_pic;
})
this.changeGoodsList = res.change_goods_list;
console.log("🚀 ~ changeGood ~ this.currentGG:", this.currentGG)
if (!this.currentGG.goods_name) {
this.currentGG = this.changeGoodsList.find(item => item.id == this.selectedAsGood);
this.currentGGIndex = this.changeGoodsList.indexOf(this.currentGG);
this.changeServiceName = this.currentGG.goods_name
this.changeServiceId = this.currentGG.id
}
this.afterSalePopup3 = false;
this.showSize = true;
});
},
closeSize() {
@ -422,17 +454,10 @@ export default {
//
changeGG(item, index) {
console.log("🚀 ~ changeGG ~ item:", item);
this.currentGG = item;
this.currentGGIndex = index;
if (this.currentGG.cart_count) {
this.currentNum = this.currentGG.cart_count.count;
} else {
this.currentGG.cart_count = { count: 0 };
}
this.changeImg = item.commodity_pic[0]
this.changeName = item.goods_alias
this.changePrice = item.sales_price
this.changeServiceName = this.currentGG.goods_name
this.changeServiceId = this.currentGG.id
this.afterSalePopup3 = true;
this.showSize = false;
@ -465,26 +490,30 @@ export default {
// 退
submitRefundApplication() {
if (!this.selectedServiceType || !this.selectedRefundReason) {
uni.showToast({
title: '请选择服务类型和退款原因',
icon: 'none'
});
return;
if(this.afterSalesType !== 3) {
if (!this.selectedServiceType || !this.selectedRefundReason) {
uni.showToast({
title: '请选择服务类型和退款原因',
icon: 'none'
});
return;
}
}
//
const refundInfo = {
afterSalesType: this.afterSalesType,
serviceType: this.selectedServiceType,
refundReason: this.selectedRefundReason,
refundAmount: this.refundAmount,
maxRefundAmount: this.maxRefundAmount,
postage: this.postage,
refundReason: this.selectedRefundReason || this.changeRefundReason,
refundAmount: this.orderItem.total_amount,
maxRefundAmount: this.orderItem.total_amount,
postage: 0, // 0
refundDescription: this.refundDescription,
refundMethod: this.refundMethod,
merchantAddress: this.merchantAddress,
merchantContact: this.merchantContact,
imgList: this.imgList
merchantAddress: this.orderItem.receiving_address,
merchantContact: `${this.orderItem.receiving_name} ${this.orderItem.receiving_phone}`,
imgList: this.imgList,
changeServiceId: this.changeServiceId,
};
console.log('提交退款申请:', refundInfo);

View File

@ -49,7 +49,6 @@ export default {
confirmCancel() {
const selectedText = this.cancelReasons[this.selectedReason];
console.log("🚀 ~ confirmCancel ~ 取消原因:", selectedText);
uni.showModal({
title: "取消订单",
content: "千辛万苦挑选的商品,确定要取消吗?",

View File

@ -50,7 +50,6 @@ export default {
confirmRefund() {
const selectedText = this.applyRefundReasons[this.selectedReason];
console.log("🚀 ~ confirmRefund ~ 退款原因:", selectedText);
this.$emit('update:showPopup', false);
this.$emit('refundConfirmed', { reason: selectedText });
uni.showModal({

View File

@ -89,6 +89,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
position: relative;
}
.asGoodTag {
@ -123,12 +124,9 @@
.goods-desc {
font-size: 26rpx;
color: #ff4d4f;
background-color: #fff2f0;
padding: 4rpx 12rpx;
color: #999999;
border-radius: 8rpx;
display: inline-block;
margin: 10rpx 0;
}
.goods-price {
@ -146,10 +144,9 @@
.refund-amount {
font-size: 28rpx;
align-self: flex-start;
margin-top: 20rpx;
font-weight: 500;
position: relative;
left: 140rpx;
position: absolute;
right: 10rpx;
}
.refund-info {
@ -246,7 +243,6 @@
/* 弹窗样式 */
.popup-content {
width: 600rpx;
background-color: #ffffff;
border-radius: 20rpx;
padding: 40rpx;
@ -301,12 +297,13 @@
.continue-btn {
width: 240rpx;
height: 80rpx;
background-color: #f6f7fb;
color: #333333;
background-color: #ffe8e5;
color: #ff370b;
border-radius: 40rpx;
font-size: 28rpx;
line-height: 80rpx;
text-align: center;
border: none;
}
.know-btn {

View File

@ -50,9 +50,10 @@
<text class="asGoodTag asGoodTag1"
v-if="currentAfterSale.commodity_order_item[0].is_support_same_day === 1">当日达</text>
{{ currentAfterSale.commodity_order_item[0].goods_name }}
<text class="refund-amount">退款¥{{ currentAfterSale.refund_amount.toFixed(2) }}</text>
<text class="refund-amount">退款¥{{ currentAfterSale.refund_amount ?
currentAfterSale.refund_amount.toFixed(2) : '0.00' }}</text>
</text>
<text class="goods-desc">{{ ite.after_sales_reason }}</text>
<text class="goods-desc">{{ currentAfterSale.commodity_order_item[0].goods_spec }}</text>
<text class="goods-price">
{{ '¥' + currentAfterSale.commodity_order_item[0].sales_price.toFixed(2) + '/个' }}
<text class="goods-count">X{{ currentAfterSale.commodity_order_item[0].count }}</text>
@ -75,7 +76,8 @@
</view>
<view class="info-item">
<text class="info-label">退款金额<text style="color: #fc3811;">*</text></text>
<text class="info-value amount">{{ '¥' + currentAfterSale.refund_amount.toFixed(2) }}</text>
<text class="info-value amount">{{ '¥' + (currentAfterSale.refund_amount ?
currentAfterSale.refund_amount.toFixed(2) : '0.00') }}</text>
</view>
<view class="info-item">
<text class="info-label">申请时间<text style="color: #fc3811;">*</text></text>
@ -116,6 +118,7 @@
<script>
import { apiArr } from "../../../api/afterSale";
import {
isPhone,
picUrl,
@ -183,10 +186,14 @@ export default {
confirmColor: "#ff4d4f",
success: (res) => {
if (res.confirm) {
//
uni.showToast({
title: '订单撤销成功',
icon: 'success'
const params = {
id: this.currentAfterSale.id,
}
request(apiArr.revokeApply, "POST", params).then((res) => {
uni.showToast({
title: '订单撤销成功',
icon: 'success'
});
});
}
},