Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
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
李俊赕
self-support
Commits
11cf6ca3
Commit
11cf6ca3
authored
Jun 25, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 备件去掉搜索
parent
db22cdc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
27 deletions
+2
-27
parts.vue
src/pages/order/parts.vue
+2
-27
No files found.
src/pages/order/parts.vue
View file @
11cf6ca3
<
template
>
<
template
>
<view
class=
"u-flex det-wrap"
>
<view
class=
"u-flex det-wrap"
>
<view
class=
"search"
>
<u-search
:clearabled=
"true"
:action-style=
"searchStyle"
bg-color=
"#fff"
v-model=
"keyword"
@
custom=
"searchParts"
@
search=
"searchParts"
></u-search>
</view>
<view
class=
"content"
v-if=
"lists.length > 0"
>
<view
class=
"content"
v-if=
"lists.length > 0"
>
<scroll-view
style=
"height: 100%;"
scroll-y=
"true"
>
<scroll-view
style=
"height: 100%;"
scroll-y=
"true"
>
<select-parts
<select-parts
...
@@ -56,16 +45,10 @@
...
@@ -56,16 +45,10 @@
},
},
data
()
{
data
()
{
return
{
return
{
lists
:
[],
lists
:
[]
keyword
:
''
}
}
},
},
computed
:
{
computed
:
{
searchStyle
()
{
return
{
color
:
"#2272FF"
};
},
// 配件数
// 配件数
partNum
()
{
partNum
()
{
return
this
.
lists
.
reduce
((
counter
,
{
checked
})
=>
checked
?
counter
+=
1
:
counter
,
0
)
return
this
.
lists
.
reduce
((
counter
,
{
checked
})
=>
checked
?
counter
+=
1
:
counter
,
0
)
...
@@ -85,10 +68,7 @@
...
@@ -85,10 +68,7 @@
},
},
methods
:
{
methods
:
{
getReserve
()
{
getReserve
()
{
const
params
=
{
this
.
$u
.
api
.
getMyReserve
().
then
(
res
=>
{
keyword
:
this
.
keyword
}
this
.
$u
.
api
.
getMyReserve
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
const
data
=
res
.
data
||
[]
const
data
=
res
.
data
||
[]
this
.
lists
=
data
.
map
(
v
=>
{
this
.
lists
=
data
.
map
(
v
=>
{
...
@@ -101,11 +81,6 @@
...
@@ -101,11 +81,6 @@
}
}
})
})
},
},
// 搜索配件
searchParts
(
val
)
{
this
.
keyword
=
val
this
.
getReserve
()
},
numChange
(
val
,
index
)
{
numChange
(
val
,
index
)
{
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
val
)
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
val
)
},
},
...
...
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