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
0a251873
Commit
0a251873
authored
Sep 20, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款原因
parent
a73c41ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
27 deletions
+29
-27
refund.js
src/pages/refund/refund.js
+29
-27
No files found.
src/pages/refund/refund.js
View file @
0a251873
...
...
@@ -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
()
})
...
...
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