This commit is contained in:
@@ -219,15 +219,21 @@ export default {
|
|||||||
this.returnQty++
|
this.returnQty++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmReturn() {
|
async confirmReturn() {
|
||||||
if (this.returnQty <= 0 || this.returnQty > this.currentItem.returnableQty) {
|
if (this.returnQty <= 0 || this.returnQty > this.currentItem.returnableQty) {
|
||||||
uni.showToast({ title: '退货数量无效', icon: 'none' })
|
uni.showToast({ title: '退货数量无效', icon: 'none' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.showToast({ title: '退货成功', icon: 'success' })
|
|
||||||
// TODO: 调用后端创建退货订单
|
try {
|
||||||
this.closePopup()
|
await orderApi.refundOrder(this.currentItem.orderId)
|
||||||
this.loadReturnableGoods()
|
uni.showToast({ title: '退货成功', icon: 'success' })
|
||||||
|
this.closePopup()
|
||||||
|
this.loadReturnableGoods()
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
uni.showToast({ title: e.message || '退货失败', icon: 'none' })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user