From 5cb0984e0064a534b97c4f9d46392f0100f80f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Fri, 12 Sep 2025 09:06:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=8F=90=E4=BA=A4=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=97=B6=E5=B0=86=E5=BC=B9=E7=AA=97=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E4=B8=BA=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../myOrders/index/popup/afterSale/index.vue | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) 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 = []; } } };