Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
a867a070
Commit
a867a070
authored
Jul 14, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 维修订单
parent
54d297cb
Pipeline
#2774
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
310 additions
and
1 deletion
+310
-1
index.vue
components/navbar-right/index.vue
+78
-0
pages.json
pages.json
+13
-0
index.vue
pages/index/index.vue
+34
-1
index.vue
pages/maintain-bill/index.vue
+185
-0
No files found.
components/navbar-right/index.vue
0 → 100644
View file @
a867a070
<
template
>
<u-navbar
:back-text=
"title"
:back-text-style=
"backTextStyle"
:background=
"background"
:border-bottom=
"false"
>
<view
class=
"slot-wrap"
slot=
"right"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleClickRight, 500)"
>
<view
v-if=
"image"
class=
"image-view"
><image
:src=
"image"
></image></iamge></view>
<view>
{{
text
}}
</view>
</view>
</u-navbar>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
,
default
:
''
,
},
text
:
{
type
:
String
,
default
:
'导出账单'
,
},
image
:
{
type
:
String
,
default
:
''
,
},
background
:
{
type
:
Object
,
default
()
{
return
{
'background-color'
:
'transparent'
}
},
},
backTextStyle
:
{
type
:
Object
,
default
()
{
return
{
color
:
'#191C27'
,
'font-size'
:
'weight'
,
'font-size'
:
'32rpx'
,
'margin-left'
:
'8rpx'
}
},
},
},
data
()
{
return
{}
},
computed
:
{},
methods
:
{
handleClickRight
()
{
this
.
$emit
(
'click'
)
},
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.slot-wrap
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
160rpx
;
height
:
48rpx
;
border-radius
:
24rpx
;
background-color
:
#ffffff
;
color
:
#333333
;
font-size
:
24rpx
;
margin-right
:
8rpx
;
.image-view
{
width
:
20rpx
;
height
:
24rpx
;
margin-right
:
8rpx
;
}
}
</
style
>
pages.json
View file @
a867a070
...
@@ -59,6 +59,19 @@
...
@@ -59,6 +59,19 @@
}
}
]
]
},
{
"root"
:
"pages/maintain-bill"
,
"pages"
:
[{
"path"
:
"index"
,
"name"
:
"maintain-bill"
,
"style"
:
{
"navigationBarTitleText"
:
"维修记账"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
}]
}],
}],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
...
...
pages/index/index.vue
View file @
a867a070
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
<view
class=
"left-view"
>
本月结余(元)
</view>
<view
class=
"left-view"
>
本月结余(元)
</view>
<view
<view
class=
"right-view"
class=
"right-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleSelectDate, 500)"
@
click=
"$u.throttle(handleSelectDate, 500)"
>
>
<view
class=
"date-view"
>
{{
date
}}
</view>
<view
class=
"date-view"
>
{{
date
}}
</view>
...
@@ -134,6 +135,7 @@
...
@@ -134,6 +135,7 @@
><view>
领取3天体验资格
</view></view
><view>
领取3天体验资格
</view></view
>
>
</PopNormal>
</PopNormal>
<u-toast
ref=
"uToast"
/>
<mid-popup
ref=
"midPopup"
></mid-popup>
<mid-popup
ref=
"midPopup"
></mid-popup>
<u-tabbar
<u-tabbar
:list=
"tabbar"
:list=
"tabbar"
...
@@ -230,7 +232,7 @@ export default {
...
@@ -230,7 +232,7 @@ export default {
return
[
return
[
{
{
image
:
this
.
baseUrl
+
'beijing@3x.png'
,
image
:
this
.
baseUrl
+
'beijing@3x.png'
,
path
:
''
,
path
:
'
pages/maintain-bill/index
'
,
name
:
'维修记账'
,
name
:
'维修记账'
,
},
},
{
{
...
@@ -309,6 +311,9 @@ export default {
...
@@ -309,6 +311,9 @@ export default {
},
},
handleClickTool
(
path
)
{
handleClickTool
(
path
)
{
if
(
!
this
.
checkVip
())
return
if
(
!
this
.
checkVip
())
return
uni
.
navigateTo
({
url
:
path
});
},
},
handleClickOperate
(
path
)
{
handleClickOperate
(
path
)
{
if
(
!
this
.
checkVip
())
return
if
(
!
this
.
checkVip
())
return
...
@@ -327,6 +332,34 @@ export default {
...
@@ -327,6 +332,34 @@ export default {
formatCount
(
count
)
{
formatCount
(
count
)
{
return
(
Math
.
trunc
(
count
*
100
)
/
100
).
toFixed
(
2
)
return
(
Math
.
trunc
(
count
*
100
)
/
100
).
toFixed
(
2
)
},
},
toLogin
()
{
this
.
$refs
.
uToast
.
show
({
duration
:
1500
,
title
:
'请先登录'
,
type
:
'error'
,
callback
:
()
=>
{
this
.
$u
.
route
({
url
:
'pages/login/index'
});
}
});
},
// 朋友圈
onShareTimeline
(
res
)
{
return
{
title
:
'咖营-你喜欢的“大咖”都在这里'
,
path
:
'/pages/index/find'
// imageUrl: ''
};
},
// 好友
onShareAppMessage
(
res
)
{
return
{
title
:
'咖营-你喜欢的“大咖”都在这里'
,
path
:
'/pages/index/find'
// imageUrl: ''
};
}
},
},
}
}
</
script
>
</
script
>
...
...
pages/maintain-bill/index.vue
0 → 100644
View file @
a867a070
<
template
>
<view
class=
"maintain-bill"
>
<NavbarRight
title=
"维修记账"
text=
"导出账单"
:image=
"outImage"
@
click=
"handlClickOut"
/>
<view
class=
"search-bar"
>
<u-search
:clearabled=
"true"
:show-action=
"false"
bg-color=
"#FFFFFF"
v-model=
"keyword"
height=
"80"
search-icon-color=
"#bdbdbd"
color=
"#333333"
placeholder=
"搜索维修单号、客户姓名/手机、维修备注"
placeholder-color=
"#CCCCCC"
:search-icon=
"searchImage"
@
custom=
"search"
@
search=
"search"
:input-style=
"
{ 'font-size': '26rpx', color: '#333333' }"
>
</u-search>
</view>
<view
class=
"content-view"
>
<view
class=
"title-view"
>
<view
class=
"left-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleSelectDate, 500)"
>
<view
class=
"date-view"
>
{{
date
||
'全部时段'
}}
</view>
<u-icon
name=
"arrow-down-fill"
color=
"#8D8D8D"
size=
"24"
></u-icon>
</view>
<view
class=
"right-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleSelectFilter, 500)"
>
<view
:class=
"['icon-view',
{ filter: filter }]">
<u-icon
name=
"checkbox-mark"
v-if=
"filter"
color=
"#02a074"
size=
"24"
></u-icon>
</view>
<view
class=
"date-view"
>
只看欠款
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
export
default
{
components
:
{
NavbarRight
,
},
data
()
{
return
{
keyword
:
''
,
date
:
''
,
filter
:
false
,
lists
:
[],
}
},
computed
:
{
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
},
outImage
()
{
return
this
.
baseUrl
+
'daochuzhangdan@3x.png'
},
searchImage
()
{
return
this
.
baseUrl
+
'sousuo@3x.png'
},
},
onLoad
()
{
uni
.
$on
(
'maintain-bill'
,
(
res
)
=>
{
this
.
updateItem
(
res
.
id
,
true
)
})
},
onUnload
()
{
uni
.
$off
(
'maintain-bill'
)
},
onShow
()
{},
methods
:
{
toDetail
(
item
)
{
this
.
$u
.
route
({
url
:
'pages/maintain-bill/detail'
,
type
:
'navigateTo'
,
params
:
{
billId
:
item
.
id
,
},
})
},
init
()
{},
updateItem
(
id
,
state
)
{
for
(
var
item
of
this
.
lists
)
{
if
(
item
.
id
==
id
)
{
item
.
echoMap
.
joinState
=
state
}
}
},
handleClickOut
()
{},
handleSelectFilter
()
{
this
.
filter
=
!
this
.
filter
},
search
()
{
this
.
$u
.
route
({
url
:
'pages/maintain-bill/search'
,
params
:
{
keyword
:
this
.
keyword
,
},
})
},
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.maintain-bill
{
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
background-color
:
#f6f7fa
;
.search-bar
{
margin
:
0rpx
24rpx
16rpx
24rpx
;
padding
:
0rpx
16rpx
;
background-color
:
#ffffff
;
border-radius
:
40rpx
;
height
:
80rpx
;
/
deep
/
.u-icon__icon
{
color
:
#bdbdbd
!
important
;
font-size
:
34rpx
!
important
;
}
}
.content-view
{
height
:
100%
;
overflow
:
auto
;
padding
:
0
24rpx
44rpx
24rpx
;
.title-view
{
color
:
#333333
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin
:
24rpx
0
;
.left-view
{
font-size
:
32rpx
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
.date-view
{
margin-right
:
16rpx
;
}
}
.right-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
font-size
:
28rpx
;
.icon-view
{
width
:
32rpx
;
height
:
32rpx
;
border-radius
:
8rpx
;
border
:
2rpx
solid
#333333
;
margin-right
:
16rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
&
.filter
{
border
:
2rpx
solid
#02a074
;
}
}
}
}
}
}
</
style
>
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