|
@@ -29,10 +29,11 @@ Page({
|
|
|
refundDetail: {
|
|
refundDetail: {
|
|
|
reason: "",
|
|
reason: "",
|
|
|
amount: "",
|
|
amount: "",
|
|
|
|
|
+ refundAmount: "",
|
|
|
finishTime: "",
|
|
finishTime: "",
|
|
|
applyTime: "",
|
|
applyTime: "",
|
|
|
refundNo: "",
|
|
refundNo: "",
|
|
|
- updateTime:""
|
|
|
|
|
|
|
+ updateTime: ""
|
|
|
},
|
|
},
|
|
|
// 协商历史标题和内容
|
|
// 协商历史标题和内容
|
|
|
negotiateTitle: "",
|
|
negotiateTitle: "",
|
|
@@ -79,7 +80,7 @@ Page({
|
|
|
if (!detail) return;
|
|
if (!detail) return;
|
|
|
|
|
|
|
|
const refundState = progressToState[String(detail.progress)] || 'processing';
|
|
const refundState = progressToState[String(detail.progress)] || 'processing';
|
|
|
-
|
|
|
|
|
|
|
+ console.log(detail, "888")
|
|
|
this.setData({
|
|
this.setData({
|
|
|
rawDetail: detail,
|
|
rawDetail: detail,
|
|
|
aftersaleId: detail.id || '',
|
|
aftersaleId: detail.id || '',
|
|
@@ -87,16 +88,17 @@ Page({
|
|
|
goods: {
|
|
goods: {
|
|
|
name: detail.conditioningProgramName || '',
|
|
name: detail.conditioningProgramName || '',
|
|
|
meta1: detail.convertDose ? `${detail.convertDose}${detail.convertUnit || '次'}` : '',
|
|
meta1: detail.convertDose ? `${detail.convertDose}${detail.convertUnit || '次'}` : '',
|
|
|
- price: String(detail.applyAmount || 0),
|
|
|
|
|
|
|
+ price: String(detail.unitPrice || 0),
|
|
|
image: detail.conditioningProgramPhoto || '',
|
|
image: detail.conditioningProgramPhoto || '',
|
|
|
},
|
|
},
|
|
|
refundDetail: {
|
|
refundDetail: {
|
|
|
reason: detail.reason || '',
|
|
reason: detail.reason || '',
|
|
|
- amount: String(detail.applyAmount || 0),
|
|
|
|
|
|
|
+ amount: String(detail.totalPrice || 0),
|
|
|
|
|
+ refundAmount: String(detail.refundAmount || 0),
|
|
|
finishTime: detail.finishTime || '',
|
|
finishTime: detail.finishTime || '',
|
|
|
applyTime: detail.applyTime || '',
|
|
applyTime: detail.applyTime || '',
|
|
|
refundNo: detail.ref || '',
|
|
refundNo: detail.ref || '',
|
|
|
- updateTime:detail.updateTime || ''
|
|
|
|
|
|
|
+ updateTime: detail.updateTime || ''
|
|
|
},
|
|
},
|
|
|
negotiateTitle: detail.title || '',
|
|
negotiateTitle: detail.title || '',
|
|
|
negotiateContent: (() => {
|
|
negotiateContent: (() => {
|
|
@@ -105,7 +107,7 @@ Page({
|
|
|
return c;
|
|
return c;
|
|
|
})(),
|
|
})(),
|
|
|
handleEndTime: detail.handleEndTime || '',
|
|
handleEndTime: detail.handleEndTime || '',
|
|
|
- refundMaxAmount: String(detail.applyAmount || 0),
|
|
|
|
|
|
|
+ refundMaxAmount: String(detail.totalPrice || 0),
|
|
|
refundProofImages: detail.voucherImgs || [],
|
|
refundProofImages: detail.voucherImgs || [],
|
|
|
refundDesc: detail.remark || '',
|
|
refundDesc: detail.remark || '',
|
|
|
});
|
|
});
|
|
@@ -213,8 +215,8 @@ Page({
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async onSubmitRefundApply() {
|
|
async onSubmitRefundApply() {
|
|
|
- if (!this.data.refundProofImages.length) {
|
|
|
|
|
- wx.showToast({ title: '请上传凭证图片', icon: 'none' });
|
|
|
|
|
|
|
+ if (!this.data.refundProofImages.length && !this.data.refundDesc.trim()) {
|
|
|
|
|
+ wx.showToast({ title: '请上传凭证或填写描述', icon: 'none' });
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
wx.showLoading({ title: '正在提交' });
|
|
wx.showLoading({ title: '正在提交' });
|
|
@@ -293,7 +295,13 @@ Page({
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
onReApply() {
|
|
onReApply() {
|
|
|
- this.setData({ refundAction: 'reApply', refundConfirmPopupVisible: true });
|
|
|
|
|
|
|
+ const originalPrice = String(this.data.rawDetail.totalPrice || 0);
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ refundAction: 'reApply',
|
|
|
|
|
+ refundDetail: { ...this.data.refundDetail, amount: originalPrice },
|
|
|
|
|
+ refundMaxAmount: originalPrice,
|
|
|
|
|
+ refundConfirmPopupVisible: true,
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
onRevoke() {
|
|
onRevoke() {
|