Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-app-project
Project
Project
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
李星剑
hs-app-project
Commits
2249a9cb
Commit
2249a9cb
authored
Dec 21, 2021
by
阮藤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相关代码上传
parent
1cc83710
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
24 deletions
+33
-24
search.vue
src/pages/home/components/search.vue
+15
-3
styleEntrustment.vue
src/pages/home/styleEntrustment.vue
+18
-21
No files found.
src/pages/home/components/search.vue
View file @
2249a9cb
<
template
>
<
template
>
<!-- 搜索界面 -->
<!-- 搜索界面 -->
<view
class=
""
>
<view
class=
""
>
<u-navbar
:is-back=
"true"
:background=
"
{ backgroundColor: '#F5F5F5' }" title="">
<u-navbar
:is-back=
"true"
:b
orderBottom=
"false"
:b
ackground=
"
{ backgroundColor: '#F5F5F5' }" title="">
<view
class=
"slot-wrap"
>
<view
class=
"slot-wrap"
>
<view
class=
"search-wrap"
>
<view
class=
"search-wrap"
>
<u-search
<u-search
...
@@ -18,8 +18,9 @@
...
@@ -18,8 +18,9 @@
</u-navbar>
</u-navbar>
<!-- 列表 -->
<!-- 列表 -->
<view
class=
"home_con_order u-p-l-30 u-p-r-30"
>
<view
class=
"home_con_order u-p-l-30 u-p-r-30"
>
<view
class=
"u-m-t-30"
@
click=
"searchEng(item.materialName)"
v-for=
"item in fiabricList"
>
<view
class=
"u-flex u-m-t-30 hs-height-120 u-border-bottom"
@
click=
"searchEng(item.materialName)"
v-for=
"item in fiabricList"
>
<text>
{{
item
.
materialName
}}
</text>
<image
class=
"hs-img-48 u-m-r-20"
src=
"@/static/images/home/search@2x.png"
mode=
""
></image>
<text
class=
"u-font-28 u-flex-1 text-cut"
v-html=
"brightenKeyword(item.materialName,value)"
></text>
</view>
</view>
</view>
</view>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
...
@@ -43,6 +44,14 @@ export default {
...
@@ -43,6 +44,14 @@ export default {
this
.
state
=
option
.
state
;
this
.
state
=
option
.
state
;
},
},
methods
:
{
methods
:
{
brightenKeyword
(
val
,
keyword
)
{
val
=
val
+
''
;
if
(
val
.
indexOf
(
keyword
)
!==
-
1
&&
keyword
!==
''
)
{
return
val
.
replace
(
keyword
,
'<font color="#AF8D66">'
+
keyword
+
'</font>'
);
}
else
{
return
val
;
}
},
filterSwitch
()
{
filterSwitch
()
{
const
val
=
this
.
state
;
const
val
=
this
.
state
;
switch
(
val
)
{
switch
(
val
)
{
...
@@ -115,4 +124,7 @@ export default {
...
@@ -115,4 +124,7 @@ export default {
margin
:
0
20rpx
;
margin
:
0
20rpx
;
flex
:
1
;
flex
:
1
;
}
}
.ver_middle
{
vertical-align
:
middle
;
}
</
style
>
</
style
>
src/pages/home/styleEntrustment.vue
View file @
2249a9cb
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
<view
class=
"u-flex u-row-center u-flex-1 hs-weight-600 u-font-36"
>
<view
class=
"u-flex u-row-center u-flex-1 hs-weight-600 u-font-36"
>
<text
v-if=
"searchFlag"
class=
"map-wrap-text"
>
款式委托
</text>
<text
v-if=
"searchFlag"
class=
"map-wrap-text"
>
款式委托
</text>
<u-search
<u-search
v-
if
=
"!searchFlag"
v-
show
=
"!searchFlag"
class=
"u-m-r-24"
class=
"u-m-r-24"
bg-color=
"#fff"
bg-color=
"#fff"
@
click=
'searchCli'
@
click=
"searchCli"
:disabled=
"true"
:disabled=
"true"
border-color=
"#d5aa7a"
border-color=
"#d5aa7a"
placeholder=
"请输入面料名称"
placeholder=
"请输入面料名称"
...
@@ -47,8 +47,8 @@
...
@@ -47,8 +47,8 @@
<view
class=
"content"
:style=
"{ bottom: footerHeight + 'px', top: headerHeight + 'px' }"
>
<view
class=
"content"
:style=
"{ bottom: footerHeight + 'px', top: headerHeight + 'px' }"
>
<!-- list -->
<!-- list -->
<view
class=
"u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20"
>
<view
class=
"u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20"
>
<!-- entrustmentList -->
<!-- entrustmentList
v-if="!isEmpty"
-->
<view
v-if=
"!isEmpty"
class=
"u-m-b-20 bd_rad1 u-p-30"
@
click=
"detaileCli(item)"
v-for=
"item in entrustmentList"
:key=
"item.id"
style=
"background: #fff;"
>
<view
class=
"u-m-b-20 bd_rad1 u-p-30"
@
click=
"detaileCli(item)"
v-for=
"item in entrustmentList"
:key=
"item.id"
style=
"background: #fff;"
>
<view
class=
"u-m-b-30 u-flex justify-between"
>
<view
class=
"u-m-b-30 u-flex justify-between"
>
<view
class=
"entrus_list_title u-font-32"
>
{{ item.materialName }}
</view>
<view
class=
"entrus_list_title u-font-32"
>
{{ item.materialName }}
</view>
<view
class=
"u-font-28"
>
{{ item.status | filterStatus }}
</view>
<view
class=
"u-font-28"
>
{{ item.status | filterStatus }}
</view>
...
@@ -176,20 +176,6 @@ export default {
...
@@ -176,20 +176,6 @@ export default {
onHide
()
{
onHide
()
{
this
.
enable
=
false
;
this
.
enable
=
false
;
},
},
onPullDownRefresh
()
{
this
.
pages
.
size
=
5
;
this
.
entrustmentPage
();
this
.
toBeSelectedQuantity
();
this
.
orderTicketExceptionNum
();
this
.
noSampleOrder
();
},
// 上拉加载更多
onReachBottom
()
{
if
(
this
.
total
>
this
.
entrustmentList
.
length
)
{
this
.
pages
.
size
=
this
.
pages
.
size
+
5
;
this
.
entrustmentPage
();
}
},
onPageScroll
(
object
)
{
onPageScroll
(
object
)
{
this
.
statusBtn
=
false
;
this
.
statusBtn
=
false
;
if
(
this
.
timeOut
)
{
if
(
this
.
timeOut
)
{
...
@@ -198,13 +184,26 @@ export default {
...
@@ -198,13 +184,26 @@ export default {
this
.
timeOut
=
setTimeout
(()
=>
{
this
.
timeOut
=
setTimeout
(()
=>
{
this
.
statusBtn
=
true
;
this
.
statusBtn
=
true
;
},
1000
);
},
1000
);
let
a
=
JSON
.
stringify
(
object
);
if
(
object
.
scrollTop
>=
this
.
headerHeight
)
{
if
(
object
.
scrollTop
>=
this
.
headerHeight
)
{
this
.
background
.
backgroundColor
=
'rgba(245,245,245,1)'
;
this
.
background
.
backgroundColor
=
'rgba(245,245,245,1)'
;
}
else
{
}
else
{
this
.
background
.
backgroundColor
=
'rgba(245,245,245,0)'
;
this
.
background
.
backgroundColor
=
'rgba(245,245,245,0)'
;
}
}
},
},
onPullDownRefresh
()
{
this
.
pages
.
size
=
5
;
this
.
entrustmentPage
();
this
.
toBeSelectedQuantity
();
this
.
orderTicketExceptionNum
();
this
.
noSampleOrder
();
},
// 上拉加载更多
onReachBottom
()
{
if
(
this
.
total
>
this
.
entrustmentList
.
length
)
{
this
.
pages
.
size
=
this
.
pages
.
size
+
5
;
this
.
entrustmentPage
();
}
},
computed
:
{
computed
:
{
isEmpty
()
{
isEmpty
()
{
return
this
.
entrustmentList
.
length
===
0
?
true
:
false
;
return
this
.
entrustmentList
.
length
===
0
?
true
:
false
;
...
@@ -243,7 +242,6 @@ export default {
...
@@ -243,7 +242,6 @@ export default {
setOffestTop
()
{
setOffestTop
()
{
let
systemInfo
=
uni
.
getSystemInfoSync
();
let
systemInfo
=
uni
.
getSystemInfoSync
();
let
topPx
=
systemInfo
.
statusBarHeight
+
44
;
// 顶部状态栏+沉浸式自定义顶部导航
let
topPx
=
systemInfo
.
statusBarHeight
+
44
;
// 顶部状态栏+沉浸式自定义顶部导航
console
.
log
(
systemInfo
,
topPx
);
this
.
offsetTop
=
topPx
/
(
uni
.
upx2px
(
topPx
)
/
topPx
);
// px转rpx
this
.
offsetTop
=
topPx
/
(
uni
.
upx2px
(
topPx
)
/
topPx
);
// px转rpx
},
},
// 选款总数
// 选款总数
...
@@ -391,7 +389,6 @@ export default {
...
@@ -391,7 +389,6 @@ export default {
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
overflow
:
auto
;
}
}
.custom-style
{
.custom-style
{
color
:
#fff
;
color
:
#fff
;
...
...
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