Commit e021da7a by daqian

refund_preview

parent 17e2e9da
......@@ -54,40 +54,51 @@ wxService.page({
submitRefund() {
var selectGoods = this.data.cartList.filter(item => item.checked)
if (selectGoods.length == 0) {
wx.showToast({
title: '请选择退款商品',
icon: 'none'
})
return false
}
if (this.data.curType.value == 0) {
wx.showToast({
title: '请选择退款原因',
icon: 'none'
// if (selectGoods.length == 0) {
// wx.showToast({
// title: '请选择退款商品',
// icon: 'none'
// })
// return false
// }
// if (this.data.curType.value == 0) {
// wx.showToast({
// title: '请选择退款原因',
// icon: 'none'
// })
// return false
// }
let skulist = [];
selectGoods.forEach(item=>{
const {skuId,count} = item;
skulist.push({
skuId,
count
})
return false
}
console.log('selectGoods', selectGoods)
var refundCreateDto = this.data.refundCreateDto
// refundCreateDto.reason = this.data.curType.value // 退款原因
refundCreateDto.reason = this.data.curType.name // 退款原因
refundCreateDto.skuList = selectGoods.map(function (item) {
return {
amount: item.amount,
count: item.count,
skuId: item.skuId
}
})
});
console.log('selectGoods', skulist)
this.reFundPreview({skuList:skulist})
// var refundCreateDto = this.data.refundCreateDto
// refundCreateDto.reason = this.data.curType.name // 退款原因
// refundCreateDto.skuList = selectGoods.map(function (item) {
// return {
// amount: item.amount,
// count: item.count,
// skuId: item.skuId
// }
// })
console.log('refundCreateDto', refundCreateDto)
// console.log('refundCreateDto', refundCreateDto)
this.handelRequestRefund(refundCreateDto)
// this.handelRequestRefund(refundCreateDto)
},
handelRequestRefund(params) {
......@@ -300,27 +311,27 @@ wxService.page({
this.getReasonList()
})
},
reFundPreview(cartPro) {
reFundPreview(cartPro={}) {
// /refund/buyer/preview
console.log("cartPro", cartPro)
// console.log("cartPro", cartPro)
const params = {
refundCreateDto: {}
refundCreateDto: {...cartPro}
}
// wx.showLoading({
// title: '加载中',
// mask: true
// })
// wxService.post(`/sale/refund/buyer/preview`).then(res => {
// if (res) {
// const { result, data } = res.data
// if (result == 0) {
// wx.hideLoading()
wx.showLoading({
title: '加载中',
mask: true
})
wxService.post(`/sale/refund/buyer/preview`,params).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
// } else {
} else {
// }
// }
// })
}
}
})
},
/**
* 生命周期函数--监听页面隐藏
......
......@@ -193,7 +193,7 @@
"id": 23,
"name": "退款申请",
"pathName": "pages/refund/refund",
"query": "params={\"id\":\"625052614006149120\",\"memberId\":\"598914337624711168\",\"status\":\"P\",\"skuVOList\":[{\"productId\":\"621299229465513984\",\"productCode\":\"apple-123456\",\"productName\":\"苹果\",\"skuId\":\"621748042009415680\",\"skuCode\":\"sku-apple-red\",\"skuSpec\":\"颜色:红色\",\"count\":5,\"price\":0.01,\"discount\":0,\"discountFromCoupon\":0,\"mainImgUrl\":\"https://img3.bigaka.com/test/1002/201909/20190911/10026d8d6769-249c-4cf6-b555-3cd8c3d2644f.png\",\"amount\":0.05}],\"createTime\":\"2019-09-21 19:35:56\",\"payTime\":\"2019-09-21 19:36:07\",\"freightMoney\":10,\"logistic\":{\"receiverId\":\"624293464875606016\",\"receiverInfo\":\"上海,上海市,浦东新区,浦东,张三,020-8116788\"},\"payAmount\":10.05,\"promotionDiscount\":0,\"coouponDiscount\":0,\"skuAmount\":0.05,\"skuCount\":5}",
"query": "params={\"id\":\"625333960830095360\",\"memberId\":\"598914337624711168\",\"status\":\"P\",\"skuVOList\":[{\"productId\":\"624190866919264256\",\"productCode\":\"bianma-zyh-1yuan\",\"productName\":\"zyh标准1元商品-棒棒糖\",\"skuId\":\"624250996851478528\",\"skuCode\":\"sku-zhenzhibang-strawberry\",\"skuSpec\":\"口味:草莓\",\"count\":1,\"price\":0.7,\"discount\":0,\"discountFromCoupon\":0,\"mainImgUrl\":\"https://img3.bigaka.com/test/1002/201909/20190919/1002cd48315e-ef68-49d1-9411-d0eea0cfc0dd.jpg\",\"amount\":0.7},{\"productId\":\"623232471294676992\",\"productCode\":\"guniangguo\",\"productName\":\"姑娘果\",\"skuId\":\"623232471298871296\",\"skuCode\":\"sku-gunaingguo-huang\",\"skuSpec\":\"颜色:黄\",\"count\":4,\"price\":0.01,\"discount\":0,\"discountFromCoupon\":0,\"mainImgUrl\":\"https://img3.bigaka.com/test/1002/201909/20190916/10025624b093-23d7-44bc-9f55-2e070bab726b.jpg\",\"amount\":0.04}],\"createTime\":\"2019-09-22 14:13:54\",\"payTime\":\"2019-09-22 14:14:34\",\"freightMoney\":10,\"logistic\":{\"receiverId\":\"624293464875606016\",\"receiverInfo\":\"上海,上海市,浦东新区,浦东,张三,020-8116788\"},\"payAmount\":10.74,\"promotionDiscount\":0,\"coouponDiscount\":0,\"skuAmount\":0.74,\"skuCount\":5}",
"scene": null
},
{
......
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