Commit 0a251873 by 高淑倩

退款原因

parent a73c41ba
......@@ -15,9 +15,9 @@ wxService.page({
reason: "", // 原因
skuList: [],
tradeId: 0,
proofImgUrls:[] //凭证
proofImgUrls: [] //凭证
},
refundMark: '',
refundMark: '',
cartList: [],
curType: { // 当前选择原因
value: 0,
......@@ -47,7 +47,7 @@ wxService.page({
}],
refundAmount: 0,
checkedColor: 'rgb(203, 60, 60)',
pics:[],
pics: [],
id: ''
},
submitRefund() {
......@@ -60,7 +60,7 @@ wxService.page({
})
return false
}
if (this.data.curType.value == 0) {
wx.showToast({
title: '请选择退款原因',
......@@ -68,7 +68,7 @@ wxService.page({
})
return false
}
console.log('selectGoods', selectGoods)
var refundCreateDto = this.data.refundCreateDto
......@@ -82,11 +82,11 @@ wxService.page({
skuId: item.skuId
}
})
console.log('refundCreateDto', refundCreateDto)
this.handelRequestRefund(refundCreateDto)
this.handelRequestRefund(refundCreateDto)
},
handelRequestRefund(params) {
......@@ -119,36 +119,39 @@ wxService.page({
mask: true
})
const refundReason = {}
const { resonType }= this.data
wxService.post('/sale/refund/reason/buyer/sortAll',refundReason).then(res => {
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
// })
// })
let newReasonList = []
data.forEach((item, index) => {
let params = {
value: '',
name: ''
}
params.name = item.reason
params.value = index
newReasonList.push(params)
})
this.setData({
//resonType
resonType: newReasonList
})
}
}
})
},
// 上传图片
_uploadImg(e){
if (e.detail){
_uploadImg(e) {
if (e.detail) {
this.data.refundCreateDto.proofImgUrls.push(e.detail)
this.setData({
'refundCreateDto.proofImgUrls': this.data.refundCreateDto.proofImgUrls
})
}
},
checkPro(e) {
var index = e.currentTarget.dataset.index
const { cartList } = this.data
......@@ -190,7 +193,7 @@ wxService.page({
cartList[index].count = proNum
this.setData({
cartList: cartList
}, ()=> {
}, () => {
// this.getReturnPrice()
// this.editOk(cartList[e]) //调用完成
})
......@@ -199,7 +202,7 @@ wxService.page({
var index = e.currentTarget.dataset.index
var cartList = this.data.cartList
var proNum = cartList[index].count
console.log('增加数量',proNum)
console.log('增加数量', proNum)
proNum++
......@@ -207,16 +210,16 @@ wxService.page({
this.setData({
cartList: cartList
}, () => {
})
},
inputNum: function (e) { // 输入数量
var newNum = e.detail.value
var order = this.data.cartList
var index = e.currentTarget.dataset.index
var refundNum = order[index].count
console.log('inputNum', index, newNum, refundNum)
if (newNum === '' || newNum === '0') {
......@@ -254,7 +257,6 @@ wxService.page({
onShow: function () {
const { params } = this.options
let detail = JSON.parse(params)
console.log('detail', params, detail.id)
// item.checked
detail.skuVOList.forEach(item => {
......@@ -265,7 +267,7 @@ wxService.page({
cartList: detail.skuVOList,
refundAmount: detail.payAmount,
'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