修改未发货状态下的申请退款的请求接口
This commit is contained in:
parent
80d6fb8cc9
commit
a8168c6db1
@ -8,4 +8,5 @@ export const apiArr = {
|
||||
changeGoodsList: "/api/v2/wechat/commodity/after-sales/change-goods-list", //商品售后换货商品列表
|
||||
updateApply: "/api/v2/wechat/commodity/after-sales/update-apply", //商品订单售后修改申请
|
||||
createReview: "/api/v2/wechat/commodity/review/create", //创建订单评价
|
||||
orderRefund: "/api/v2/wechat/commodity/order/refund", //商品订单退款
|
||||
};
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 退款状态 -->
|
||||
<view class="status-container">
|
||||
<view class="status-container" v-if="showStatus">
|
||||
<view class="status-item" @click="pendingPage(item)">
|
||||
<text class="status-label">{{ getStatusText(item) }}</text>
|
||||
<text class="status-desc">商家将在<text style="color: #e73b05;">{{
|
||||
@ -41,7 +41,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="action-buttons">
|
||||
<view class="action-buttons" v-if="showStatus">
|
||||
<button class="modify-btn" @click="modifyApplication(item)">修改申请</button>
|
||||
<button class="cancel-btn" @click="cancelApplication(item)">撤销申请</button>
|
||||
</view>
|
||||
@ -71,6 +71,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
currentAfterSale: this.afterSaleList,
|
||||
showStatus: true,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -100,6 +101,7 @@ export default {
|
||||
return '已撤销';
|
||||
}
|
||||
if (item.process_status === 2) {
|
||||
this.showStatus = false;
|
||||
return '已完成';
|
||||
} else if (item.process_status === 3) {
|
||||
return '已取消';
|
||||
|
||||
@ -143,10 +143,10 @@ export default {
|
||||
categoryList: [
|
||||
{ category_name: "全部" },
|
||||
{ category_name: "待付款" },
|
||||
{ category_name: "已取消" },
|
||||
{ category_name: "备货中" },
|
||||
{ category_name: "待自提" },
|
||||
{ category_name: "已完成" },
|
||||
{ category_name: "已取消" },
|
||||
{ category_name: "待评价" },
|
||||
{ category_name: "已评价" },
|
||||
{ category_name: "售后" },
|
||||
@ -262,15 +262,10 @@ export default {
|
||||
// 处理退款确认事件
|
||||
handleRefundConfirmed(data) {
|
||||
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,
|
||||
order_status: 3
|
||||
}
|
||||
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
|
||||
request(afterSaleApi.orderRefund, "POST", params).then((res) => {
|
||||
uni.showToast({ title: "退款成功", icon: "none" });
|
||||
this.getOrderList();
|
||||
});
|
||||
},
|
||||
|
||||
@ -144,10 +144,10 @@ export default {
|
||||
categoryList: [
|
||||
{ category_name: "全部" },
|
||||
{ category_name: "待付款" },
|
||||
{ category_name: "已取消" },
|
||||
{ category_name: "待发货" },
|
||||
{ category_name: "配送中" },
|
||||
{ category_name: "已完成" },
|
||||
{ category_name: "已取消" },
|
||||
{ category_name: "待评价" },
|
||||
{ category_name: "已评价" },
|
||||
{ category_name: "售后" },
|
||||
@ -262,16 +262,11 @@ export default {
|
||||
|
||||
// 处理退款确认事件
|
||||
handleRefundConfirmed(data) {
|
||||
const params = {
|
||||
nick_name: uni.getStorageSync("nickName"),
|
||||
const params = {
|
||||
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,
|
||||
order_status: 3
|
||||
}
|
||||
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
|
||||
request(afterSaleApi.orderRefund, "POST", params).then((res) => {
|
||||
uni.showToast({ title: "退款成功", icon: "none" });
|
||||
this.getOrderList();
|
||||
});
|
||||
},
|
||||
|
||||
@ -226,16 +226,10 @@ export default {
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
const params = {
|
||||
nick_name: uni.getStorageSync("nickName"),
|
||||
order_id: this.orderInfo.id,
|
||||
goods_ids: this.orderInfo.commodity_order_item_list.map(item => item.goods_id),
|
||||
after_sales_type: 1,
|
||||
after_sales_reason: '用户申请退款',
|
||||
refund_amount: this.orderInfo.total_amount,
|
||||
order_status: 3
|
||||
}
|
||||
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
|
||||
uni.showToast({ title: "退款申请已提交", icon: "none" });
|
||||
request(afterSaleApi.orderRefund, "POST", params).then((res) => {
|
||||
uni.showToast({ title: "退款成功", icon: "none" });
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user