完成售后页和处理页面的撤销申请

This commit is contained in:
赵毅 2025-09-12 10:34:53 +08:00
parent 5cb0984e00
commit fb5ddc3e9a
4 changed files with 30 additions and 11 deletions

View File

@ -6,7 +6,8 @@
<view class="header"> <view class="header">
<view class="company-info"> <view class="company-info">
<text class="company-name">{{ item.commodity_order_item[0].goods_name }}</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> <text class="after-sale-no">{{ item.after_sales_type === 1 ? '退款' : (item.after_sales_type === 2
? '退货瑞款' : '换货') }}</text>
</view> </view>
<text class="order-time">提交订单{{ formatDate(item.create_time) }}</text> <text class="order-time">提交订单{{ formatDate(item.create_time) }}</text>
</view> </view>
@ -74,6 +75,14 @@ export default {
currentAfterSale: this.afterSaleList, currentAfterSale: this.afterSaleList,
}; };
}, },
watch: {
afterSaleList: {
handler(newVal) {
this.currentAfterSale = newVal;
},
deep: true
}
},
methods: { methods: {
getList() { getList() {
const params = { const params = {
@ -128,7 +137,11 @@ export default {
this.getList(); this.getList();
uni.showToast({ uni.showToast({
title: '订单撤销成功', title: '订单撤销成功',
icon: 'success' icon: 'success',
// duration: 1500,
// success: () => {
// this.$emit('revokeApply');
// }
}); });
}); });
} }

View File

@ -16,7 +16,7 @@
<rated /> <rated />
</view> </view>
<view v-if="selectedTab === 8"> <view v-if="selectedTab === 8">
<afterSale :afterSaleList="afterSaleList" /> <afterSale :afterSaleList="afterSaleList" @revokeApply="revokeApply" />
</view> </view>
<view v-else> <view v-else>
<view v-for="(item, index) in orderData" :key="index"> <view v-for="(item, index) in orderData" :key="index">
@ -337,6 +337,7 @@ export default {
}) })
}) })
this.orderData = res.order_list; this.orderData = res.order_list;
this.getAfterSaleList();
}); });
}, },
getAfterSaleList() { getAfterSaleList() {
@ -345,21 +346,25 @@ export default {
} }
request(afterSaleApi.afterSalesList, "POST", params).then((res) => { request(afterSaleApi.afterSalesList, "POST", params).then((res) => {
res.after_sales_list.forEach(item => { res.after_sales_list.forEach(item => {
// 退URL item.commodity_order_item?.forEach(good => {
if (item.return_images) { good.commodity_pic = picUrl + good.commodity_pic;
const images = item.return_images.split(','); })
const processedImages = images.map(img => picUrl + img).join(',');
item.return_images = processedImages;
}
}) })
this.afterSaleList = res.after_sales_list; this.afterSaleList = res.after_sales_list;
}); });
},
//
revokeApply() {
this.getOrderList();
} }
}, },
onLoad(options) { onLoad(options) {
this.getOrderList(); this.getOrderList();
this.getAfterSaleList(); },
onShow() {
this.getOrderList();
}, },
}; };
</script> </script>

View File

@ -548,7 +548,7 @@ export default {
this.currentGGIndex = 0; this.currentGGIndex = 0;
this.refundDescription = ''; this.refundDescription = '';
this.imgList = []; this.imgList = [];
} },
} }
}; };
</script> </script>

View File

@ -194,6 +194,7 @@ export default {
title: '订单撤销成功', title: '订单撤销成功',
icon: 'success' icon: 'success'
}); });
this.$emit('revokeApplySuccess');
}); });
} }
}, },