Commit 02093491 by 高淑倩

退款原因

parent 3204be37
...@@ -47,7 +47,8 @@ wxService.page({ ...@@ -47,7 +47,8 @@ wxService.page({
}], }],
refundAmount: 0, refundAmount: 0,
checkedColor: 'rgb(203, 60, 60)', checkedColor: 'rgb(203, 60, 60)',
pics:[] pics:[],
id: ''
}, },
submitRefund() { submitRefund() {
var selectGoods = this.data.cartList.filter(item => item.checked) var selectGoods = this.data.cartList.filter(item => item.checked)
...@@ -112,7 +113,32 @@ wxService.page({ ...@@ -112,7 +113,32 @@ wxService.page({
}) })
}, },
getReasonList() {
wx.showLoading({
title: '加载中',
mask: true
})
const refundReason = {}
const { resonType }= this.data
wxService.post('/sale/refund/reason/buyer/sortAll',refundReason).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
console.log('data', data)
// data.forEach((item,index)=>{
// resonType.forEach(itemReson=> {
// itemReson.name = item.reason
// itemReson.value = item.index
// })
// })
this.setData({
//resonType
})
}
}
})
},
// 上传图片 // 上传图片
_uploadImg(e){ _uploadImg(e){
if (e.detail){ if (e.detail){
...@@ -228,15 +254,20 @@ wxService.page({ ...@@ -228,15 +254,20 @@ wxService.page({
onShow: function () { onShow: function () {
const { params } = this.options const { params } = this.options
let detail = JSON.parse(params) let detail = JSON.parse(params)
console.log('detail', detail) console.log('detail', params, detail.id)
// item.checked // item.checked
detail.skuVOList.forEach(item => { detail.skuVOList.forEach(item => {
item.checked = false item.checked = false
}) })
this.setData({ this.setData({
id: detail.id,
cartList: detail.skuVOList, cartList: detail.skuVOList,
refundAmount: detail.payAmount, refundAmount: detail.payAmount,
'refundCreateDto.tradeId': detail.id 'refundCreateDto.tradeId': detail.id
},()=>{
// 退款原因列表 /refund/reason/buyer/sortAll
this.getReasonList()
}) })
}, },
......
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