diff --git a/packages/myOrders/index/popup/afterSale/index.vue b/packages/myOrders/index/popup/afterSale/index.vue index 8fea2667..41629584 100644 --- a/packages/myOrders/index/popup/afterSale/index.vue +++ b/packages/myOrders/index/popup/afterSale/index.vue @@ -273,7 +273,10 @@ export default { showSize: false,//选择款式弹窗 currentGG: {},//当前选择的款式 currentGGIndex: 0, - afterSalesType: 0, // 服务类型 1:仅退款 2:退货退款 3:换货 + afterSalesType: 2, // 服务类型 1:仅退款 2:退货退款 3:换货 + + merchantContact: '', // 商家信息 + merchantAddress: '', // 商家地址 refundDescription: '', refundMethod: '自行寄回', @@ -361,6 +364,9 @@ export default { console.log('售后商品 - 选中的售后类型:', selectedType); console.log('选中的售后商品:', this.selectedAsGood); + this.merchantContact = `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone}`; + this.merchantAddress = this.orderItem.supplier_address; + this.afterSalePopup = false; this.afterSalePopup2 = true; }, @@ -510,8 +516,8 @@ export default { postage: 0, // 假设邮费为0 refundDescription: this.refundDescription, refundMethod: this.refundMethod, - merchantAddress: this.orderItem.receiving_address, - merchantContact: `${this.orderItem.receiving_name} ${this.orderItem.receiving_phone}`, + merchantAddress: this.orderItem.supplier_address, + merchantContact: `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone}`, imgList: this.imgList, changeServiceId: this.changeServiceId, }; @@ -520,6 +526,28 @@ export default { this.afterSalePopup3 = false; // 触发父组件事件,传递退款信息 this.$emit('refundSubmitted', refundInfo); + + // 重置弹窗中的数据为默认值 + this.resetAfterSaleData(); + }, + + // 重置售后数据为默认值 + resetAfterSaleData() { + this.selectedAsGood = ''; + this.selectedAfterSaleType = 0; // 0:退货/退款, 1:换货 + this.selectedAfterSaleType2 = 0; // 0:退货/退款, 1:退款 + this.selectedAsReason = 0; + this.selectedReason = 0; // 换货原因 + this.selectedServiceType = ''; + this.selectedRefundReason = ''; + this.changeRefundReason = ''; // 换货原因回显 + this.changeServiceName = ''; // 换货商品回显 + this.changeServiceId = ''; // 换货商品id + this.changeGoodsList = []; // 换货商品列表 + this.currentGG = {}; // 当前选择的款式 + this.currentGGIndex = 0; + this.refundDescription = ''; + this.imgList = []; } } };