完成售后页和处理页面的撤销申请
This commit is contained in:
parent
5cb0984e00
commit
fb5ddc3e9a
@ -6,7 +6,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">{{ 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>
|
||||
<text class="order-time">提交订单:{{ formatDate(item.create_time) }}</text>
|
||||
</view>
|
||||
@ -74,6 +75,14 @@ export default {
|
||||
currentAfterSale: this.afterSaleList,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
afterSaleList: {
|
||||
handler(newVal) {
|
||||
this.currentAfterSale = newVal;
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
const params = {
|
||||
@ -128,7 +137,11 @@ export default {
|
||||
this.getList();
|
||||
uni.showToast({
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
icon: 'success',
|
||||
// duration: 1500,
|
||||
// success: () => {
|
||||
// this.$emit('revokeApply');
|
||||
// }
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<rated />
|
||||
</view>
|
||||
<view v-if="selectedTab === 8">
|
||||
<afterSale :afterSaleList="afterSaleList" />
|
||||
<afterSale :afterSaleList="afterSaleList" @revokeApply="revokeApply" />
|
||||
</view>
|
||||
<view v-else>
|
||||
<view v-for="(item, index) in orderData" :key="index">
|
||||
@ -337,6 +337,7 @@ export default {
|
||||
})
|
||||
})
|
||||
this.orderData = res.order_list;
|
||||
this.getAfterSaleList();
|
||||
});
|
||||
},
|
||||
getAfterSaleList() {
|
||||
@ -345,21 +346,25 @@ export default {
|
||||
}
|
||||
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;
|
||||
}
|
||||
item.commodity_order_item?.forEach(good => {
|
||||
good.commodity_pic = picUrl + good.commodity_pic;
|
||||
})
|
||||
})
|
||||
this.afterSaleList = res.after_sales_list;
|
||||
});
|
||||
},
|
||||
|
||||
// 处理订单撤销成功事件
|
||||
revokeApply() {
|
||||
this.getOrderList();
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.getOrderList();
|
||||
this.getAfterSaleList();
|
||||
},
|
||||
onShow() {
|
||||
this.getOrderList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -548,7 +548,7 @@ export default {
|
||||
this.currentGGIndex = 0;
|
||||
this.refundDescription = '';
|
||||
this.imgList = [];
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -194,6 +194,7 @@ export default {
|
||||
title: '订单撤销成功',
|
||||
icon: 'success'
|
||||
});
|
||||
this.$emit('revokeApplySuccess');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user