Commit f183ca51 by 高淑倩

撤销退款

parent 31a0852c
......@@ -177,6 +177,29 @@ if(currentIndex == 5){
handelCancelRefund(e){
const { id } = e.currentTarget.dataset
console.log('取消退款', id )
this.handelRevokeRefund(id)
},
handelRevokeRefund(id) {
wx.showLoading({
title: '加载中',
mask: true
})
const params = {id}
wxService.post(`/sale/refund/buyer/cancel`,params).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
wx.showToast({
title: '撤销退款成功',
icon: 'none'
});
setTimeout(() => {
wxService.router('/pages/order/order')
},200)
}
}
})
},
// 订单详情
handelDetail(e) {
......
......@@ -10,8 +10,8 @@ wxService.page({
* 页面的初始数据
*/
data: {
showApplyRefundModal:false,
id:'',
showApplyRefundModal: false,
id: '',
refundDetail: null
},
......@@ -27,14 +27,37 @@ wxService.page({
*/
onShow: function () {
const { id } = this.options
if(id) {
if (id) {
this.setData({
id
},()=>{
}, () => {
this.getRfDetail(id)
})
}
},
handelRevokeRefund() {
const { id } = this.data
wx.showLoading({
title: '加载中',
mask: true
})
const params = {id}
wxService.post(`/sale/refund/buyer/cancel`,params).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
wx.showToast({
title: '撤销退款成功',
icon: 'none'
});
setTimeout(() => {
wxService.router('/pages/order/order')
},200)
}
}
})
},
getRfDetail(id) {
wx.showLoading({
title: '加载中',
......@@ -52,21 +75,21 @@ wxService.page({
}
})
},
copy(e){
copy(e) {
wx.setClipboardData({
//准备复制的数据
data: e.currentTarget.dataset.content,
success: function (res) {
wx.showToast({
title: '复制成功',
icon:'none'
icon: 'none'
});
}
});
},
//填写物流信息
tapWriteLogis(){
tapWriteLogis() {
console.log('222')
this.setData({
showApplyRefundModal: true
......
......@@ -113,7 +113,7 @@
</view>
<view class="cancel">
<button class="btn btn-primary btn-lg">撤销退款</button>
<button class="btn btn-primary btn-lg" bindtap="handelRevokeRefund">撤销退款</button>
</view>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment