Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
e021da7a
Commit
e021da7a
authored
Sep 22, 2019
by
daqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refund_preview
parent
17e2e9da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
43 deletions
+54
-43
refund.js
src/pages/refund/refund.js
+53
-42
project.config.json
src/project.config.json
+1
-1
No files found.
src/pages/refund/refund.js
View file @
e021da7a
...
@@ -54,40 +54,51 @@ wxService.page({
...
@@ -54,40 +54,51 @@ wxService.page({
submitRefund
()
{
submitRefund
()
{
var
selectGoods
=
this
.
data
.
cartList
.
filter
(
item
=>
item
.
checked
)
var
selectGoods
=
this
.
data
.
cartList
.
filter
(
item
=>
item
.
checked
)
if
(
selectGoods
.
length
==
0
)
{
//
if (selectGoods.length == 0) {
wx
.
showToast
({
//
wx.showToast({
title
:
'请选择退款商品'
,
//
title: '请选择退款商品',
icon
:
'none'
//
icon: 'none'
})
//
})
return
false
//
return false
}
//
}
if
(
this
.
data
.
curType
.
value
==
0
)
{
//
if (this.data.curType.value == 0) {
wx
.
showToast
({
//
wx.showToast({
title
:
'请选择退款原因'
,
//
title: '请选择退款原因',
icon
:
'none'
//
icon: 'none'
})
//
})
return
false
//
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
{
let
skulist
=
[];
amount
:
item
.
amount
,
selectGoods
.
forEach
(
item
=>
{
count
:
item
.
count
,
const
{
skuId
,
count
}
=
item
;
skuId
:
item
.
skuId
skulist
.
push
({
}
skuId
,
count
})
})
});
console
.
log
(
'selectGoods'
,
skulist
)
this
.
reFundPreview
({
skuList
:
skulist
})
// var refundCreateDto = this.data.refundCreateDto
// refundCreateDto.reason = this.data.curType.name // 退款原因
console
.
log
(
'refundCreateDto'
,
refundCreateDto
)
// refundCreateDto.skuList = selectGoods.map(function (item) {
// return {
// amount: item.amount,
// count: item.count,
// skuId: item.skuId
// }
// })
this
.
handelRequestRefund
(
refundCreateDto
)
// console.log('refundCreateDto', refundCreateDto)
// this.handelRequestRefund(refundCreateDto)
},
},
handelRequestRefund
(
params
)
{
handelRequestRefund
(
params
)
{
...
@@ -300,27 +311,27 @@ wxService.page({
...
@@ -300,27 +311,27 @@ wxService.page({
this
.
getReasonList
()
this
.
getReasonList
()
})
})
},
},
reFundPreview
(
cartPro
)
{
reFundPreview
(
cartPro
=
{}
)
{
// /refund/buyer/preview
// /refund/buyer/preview
console
.
log
(
"cartPro"
,
cartPro
)
//
console.log("cartPro", cartPro)
const
params
=
{
const
params
=
{
refundCreateDto
:
{}
refundCreateDto
:
{
...
cartPro
}
}
}
//
wx.showLoading({
wx
.
showLoading
({
//
title: '加载中',
title
:
'加载中'
,
//
mask: true
mask
:
true
//
})
})
// wxService.post(`/sale/refund/buyer/preview`
).then(res => {
wxService
.
post
(
`/sale/refund/buyer/preview`
,
params
).
then
(
res
=>
{
//
if (res) {
if
(
res
)
{
//
const { result, data } = res.data
const
{
result
,
data
}
=
res
.
data
//
if (result == 0) {
if
(
result
==
0
)
{
//
wx.hideLoading()
wx
.
hideLoading
()
//
} else {
}
else
{
//
}
}
//
}
}
//
})
})
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
...
...
src/project.config.json
View file @
e021da7a
...
@@ -193,7 +193,7 @@
...
@@ -193,7 +193,7 @@
"id"
:
23
,
"id"
:
23
,
"name"
:
"退款申请"
,
"name"
:
"退款申请"
,
"pathName"
:
"pages/refund/refund"
,
"pathName"
:
"pages/refund/refund"
,
"query"
:
"params={
\"
id
\"
:
\"
625
052614006149120
\"
,
\"
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
\"
:
\"
625
333960830095360
\"
,
\"
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
"scene"
:
null
},
},
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment