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
b6172359
Commit
b6172359
authored
Sep 21, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blurNum
parent
115c2666
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
19 deletions
+62
-19
refund.js
src/pages/refund/refund.js
+55
-12
refund.wxml
src/pages/refund/refund.wxml
+1
-1
project.config.json
src/project.config.json
+5
-5
myReleaseDetail.wxml
...ubPackage/page/pages/myReleaseDetail/myReleaseDetail.wxml
+1
-1
No files found.
src/pages/refund/refund.js
View file @
b6172359
...
...
@@ -48,7 +48,8 @@ wxService.page({
refundAmount
:
0
,
checkedColor
:
'rgb(203, 60, 60)'
,
pics
:
[],
id
:
''
id
:
''
,
returnOrder
:
0
},
submitRefund
()
{
var
selectGoods
=
this
.
data
.
cartList
.
filter
(
item
=>
item
.
checked
)
...
...
@@ -194,7 +195,7 @@ wxService.page({
this
.
setData
({
cartList
:
cartList
},
()
=>
{
//
this.getReturnPrice()
this
.
getReturnPrice
()
// this.editOk(cartList[e]) //调用完成
})
},
...
...
@@ -210,33 +211,55 @@ wxService.page({
this
.
setData
({
cartList
:
cartList
},
()
=>
{
this
.
getReturnPrice
()
})
},
inputNum
:
function
(
e
)
{
// 输入数量
blurNum
:
function
(
e
)
{
// 输入数量
debugger
var
newNum
=
e
.
detail
.
value
var
order
=
this
.
data
.
cartList
var
cartList
=
this
.
data
.
cartList
var
index
=
e
.
currentTarget
.
dataset
.
index
var
refundNum
=
order
[
index
].
count
console
.
log
(
'inputNum'
,
index
,
newNum
,
refundNum
)
var
refundNum
=
cartList
[
index
].
count
if
(
newNum
===
''
||
newNum
===
'0'
)
{
newNum
=
1
}
else
{
newNum
=
parseInt
(
newNum
)
if
(
newNum
>
refundNum
)
{
newNum
=
refundNum
}
else
{
newNum
=
newNum
}
}
order
[
index
].
count
=
refundNum
cartList
[
index
].
count
=
newNum
this
.
setData
({
order
:
order
cartList
:
cartList
},
()
=>
{
// this.getReturnPrice()
console
.
log
(
'blurNum'
,
cartList
[
index
],
index
,
newNum
,
refundNum
)
this
.
getReturnPrice
()
})
},
getReturnPrice
()
{
var
cartList
=
this
.
data
.
cartList
var
returnPrice
=
0
for
(
let
i
=
0
;
i
<
cartList
.
length
;
i
++
)
{
if
(
cartList
[
i
].
checked
)
{
returnPrice
+=
cartList
[
i
].
price
*
(
cartList
[
i
].
count
?
cartList
[
i
].
count
:
1
)
}
}
console
.
log
(
'cartList'
,
cartList
,
returnPrice
)
this
.
setData
({
// returnOrder:
})
},
/**
* 生命周期函数--监听页面加载
*/
...
...
@@ -257,7 +280,7 @@ wxService.page({
onShow
:
function
()
{
const
{
params
}
=
this
.
options
let
detail
=
JSON
.
parse
(
params
)
console
.
log
(
"detail"
,
detail
)
console
.
log
(
"detail"
,
detail
)
// item.checked
detail
.
skuVOList
.
forEach
(
item
=>
{
item
.
checked
=
false
...
...
@@ -272,7 +295,27 @@ console.log("detail", detail)
this
.
getReasonList
()
})
},
reFundPreview
()
{
// /refund/buyer/preview
const
params
=
{
refundCreateDto
:
{}
}
// 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()
// } else {
// }
// }
// })
},
/**
* 生命周期函数--监听页面隐藏
*/
...
...
src/pages/refund/refund.wxml
View file @
b6172359
...
...
@@ -26,7 +26,7 @@
class="pro-num-edit-input"
type="number"
data-index="{{index}}"
bind
input="input
Num"
bind
blur="blur
Num"
value="{{item.count}}"
/>
<button class="add-num" data-index="{{index}}" catchtap="addNum">+</button>
...
...
src/project.config.json
View file @
b6172359
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
2
5
,
"current"
:
2
4
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -183,10 +183,10 @@
"scene"
:
null
},
{
"id"
:
2
3
,
"id"
:
2
2
,
"name"
:
"退单详情"
,
"pathName"
:
"pages/refundDetail/refundDetail"
,
"query"
:
"id=6
14542180811411456
"
,
"query"
:
"id=6
25052614006149120
"
,
"scene"
:
null
},
{
...
...
@@ -197,10 +197,10 @@
"scene"
:
null
},
{
"id"
:
2
5
,
"id"
:
2
4
,
"name"
:
"订单详情"
,
"pathName"
:
"pages/orderDetail/orderDetail"
,
"query"
:
"id=6
16360692727025664
"
,
"query"
:
"id=6
25052614006149120
"
,
"scene"
:
null
},
{
...
...
src/subPackage/page/pages/myReleaseDetail/myReleaseDetail.wxml
View file @
b6172359
<!--subPackage/page/pages/myReleaseDetail.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<wxs src="../../
../../
wxs/utils.wxs" module="utils" />
<view class="release-detail">
<!-- <view class="detail-img">
...
...
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