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
20a08b68
Commit
20a08b68
authored
Jul 15, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
05e03c93
a867a070
Pipeline
#2775
canceled with stages
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
624 additions
and
45 deletions
+624
-45
index.vue
components/bill-list/index.vue
+0
-1
index.vue
components/navbar-right/index.vue
+78
-0
index.vue
components/pop-normal/index.vue
+192
-0
pages.json
pages.json
+13
-0
index.vue
pages/index/index.vue
+149
-44
index.vue
pages/maintain-bill/index.vue
+185
-0
uni.scss
uni.scss
+7
-0
No files found.
components/bill-list/index.vue
View file @
20a08b68
...
...
@@ -56,7 +56,6 @@ export default {
},
watch
:
{
list
()
{
console
.
log
(
'----------'
)
this
.
loading
=
false
}
},
...
...
components/navbar-right/index.vue
0 → 100644
View file @
20a08b68
<
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
>
components/pop-normal/index.vue
0 → 100644
View file @
20a08b68
<
template
>
<u-popup
v-model=
"show"
safe-area-inset-bottom
border-radius=
"24"
mode=
"center"
width=
"86%"
:closeable=
"false"
@
close=
"handleClose"
>
<view
class=
"pop-normal-view"
>
<view
class=
"title-view"
>
{{
title
}}
</view>
<view
class=
"content-view"
>
<slot
/>
</view>
<view
class=
"buttons-view"
>
<view
class=
"left-view"
>
<u-button
open-type=
"share"
v-if=
"isShare"
:custom-style=
"customCancel"
@
click=
"handleClickCancel"
>
<view
class=
"cancel-view"
>
<view
class=
"cancel-image"
><image
:src=
"cancelImage"
></image
></view>
<view>
{{
cancelText
}}
</view>
</view></u-button
>
<u-button
v-else
:custom-style=
"customCancel"
@
click=
"handleClickCancel"
>
<view
class=
"cancel-view"
>
{{
cancelText
}}
</view>
</u-button>
</view>
<view
class=
"right-view"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickConfirm"
>
<view
class=
"confirm-view"
>
{{
confirmText
}}
</view>
</u-button>
</view>
</view>
<view
class=
"bottom-tip"
>
{{
bottomTip
}}
</view>
</view>
</u-popup>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
,
default
:
'温馨提示'
,
},
visible
:
{
type
:
Boolean
,
default
:
false
,
},
cancelText
:
{
type
:
String
,
default
:
'分享领体验'
,
},
confirmText
:
{
type
:
String
,
default
:
'开通会员'
,
},
bottomTip
:
{
type
:
String
,
default
:
'※ 体验会员,仅非会员用户领取,每个ID限领1次'
,
},
isShare
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{
show
:
false
,
}
},
watch
:
{
visible
(
val
)
{
this
.
show
=
val
},
},
computed
:
{
cancelImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'fenxiang@3x.png'
},
customCancel
()
{
return
{
color
:
'transparent'
,
height
:
'96rpx'
,
width
:
'264rpx'
,
border
:
'2rpx solid #02A074'
,
'border-radius'
:
'16rpx'
,
}
},
customConFirm
()
{
return
{
color
:
'transparent'
,
'background-color'
:
'#02A074'
,
height
:
'96rpx'
,
width
:
'264rpx'
,
}
},
},
methods
:
{
changeVisibleValue
(
val
)
{
this
.
show
=
val
this
.
$emit
(
'update:visible'
,
val
)
},
handleClickConfirm
()
{
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'confirm'
,
this
.
type
)
},
handleClose
()
{
this
.
changeVisibleValue
(
false
)
},
handleClickCancel
()
{
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'cancel'
,
this
.
type
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pop-normal-view
{
text-align
:
center
;
padding
:
24rpx
32rpx
;
background-image
:
linear-gradient
(
to
bottom
,
#f4fffc
0%
,
#ffffff
50%
);
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40rpx
;
margin
:
32rpx
0
24rpx
0
;
}
.content-view
{
padding
:
20rpx
32rpx
;
color
:
#191c27
;
font-size
:
32rpx
;
min-height
:
240rpx
;
line-height
:
54rpx
;
}
.buttons-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
32rpx
;
.left-view
{
.cancel-view
{
color
:
#02a074
;
height
:
96rpx
;
line-height
:
96rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.cancel-image
{
width
:
32rpx
;
height
:
32rpx
;
margin-right
:
14rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
}
.right-view
{
margin-left
:
30rpx
;
.confirm-view
{
color
:
#ffffff
;
height
:
96rpx
;
line-height
:
96rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
}
}
.bottom-tip
{
text-align
:
left
;
color
:
#8d8d8d
;
font-size
:
24rpx
;
}
}
</
style
>
pages.json
View file @
20a08b68
...
...
@@ -133,6 +133,19 @@
}
]
},
{
"root"
:
"pages/maintain-bill"
,
"pages"
:
[{
"path"
:
"index"
,
"name"
:
"maintain-bill"
,
"style"
:
{
"navigationBarTitleText"
:
"维修记账"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
}]
}],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
pages/index/index.vue
View file @
20a08b68
<
template
>
<view
class=
"index-view"
>
<u-navbar
<
!--
<
u-navbar
:is-back=
"false"
:border-bottom=
"false"
:background=
"background"
></u-navbar>
<view
class=
"content-view"
>
></u-navbar>
-->
<view
class=
"content-view"
:style=
"'padding-top: ' + paddingTop + 'px'"
>
<view
class=
"head-view"
>
<view
class=
"left-view"
>
<view
class=
"logo-image"
></view>
...
...
@@ -29,6 +29,7 @@
<view
class=
"left-view"
>
本月结余(元)
</view>
<view
class=
"right-view"
hover-class=
"u-hover-class"
@
click=
"$u.throttle(handleSelectDate, 500)"
>
<view
class=
"date-view"
>
{{
date
}}
</view>
...
...
@@ -87,7 +88,7 @@
<view
class=
"title-view"
>
收支明细
</view>
<view
class=
"tip-view"
>
展示近3天数据
</view>
</view>
<BillList
:list=
"list"
@
select=
"handleSelectCell"
/>
<BillList
:list=
"list"
@
select=
"handleSelectCell"
/>
<!--
<view
class=
"list-view"
v-if=
"list.length > 0"
>
<view
class=
"list-day-view"
...
...
@@ -120,6 +121,21 @@
<NoData
v-else
imageWidth=
"374"
text=
"当前暂无收支明细"
/>
-->
</view>
</view>
<u-picker
:default-time=
"date"
mode=
"time"
v-model=
"showDatePicker"
:params=
"params"
@
confirm=
"handleComfirmDate"
></u-picker>
<PopNormal
:visible
.
sync=
"visible"
:isShare=
"true"
>
<view
><view>
非常抱歉,
<text
class=
"red-text"
>
您没有体验权限
</text></view
><view>
请您“
<text
class=
"red-text"
>
开通会员
</text>
”或“
<text
class=
"red-text"
>
分享同行好友群”
</text></view
><view>
领取3天体验资格
</view></view
>
</PopNormal>
<u-toast
ref=
"uToast"
/>
<mid-popup
ref=
"midPopup"
></mid-popup>
<u-tabbar
:list=
"tabbar"
...
...
@@ -131,60 +147,71 @@
</
template
>
<
script
>
let
systemInfo
=
uni
.
getSystemInfoSync
()
import
MidPopup
from
'@/components/mid-popup/mid-popup.vue'
// import CellBill from '@/components/cell-bill-list/index.vue'
// import NoData from '@/components/no-data'
import
BillList
from
'@/components/bill-list'
import
PopNormal
from
'@/components/pop-normal'
import
{
tabbar
}
from
'@/utils/settings.js'
import
{
addBind
}
from
'@/api/login/index.js'
export
default
{
components
:
{
MidPopup
,
BillList
,
// CellBill,
// NoData
BillList
,
PopNormal
,
// CellBill,
// NoData
},
data
()
{
return
{
tabbar
,
showDatePicker
:
false
,
visible
:
false
,
weather
:
{
temperature
:
'29℃'
},
location
:
'深圳'
,
date
:
this
.
$u
.
timeFormat
(
new
Date
().
getTime
(),
'yyyy
年mm月
'
),
date
:
this
.
$u
.
timeFormat
(
new
Date
().
getTime
(),
'yyyy
-mm
'
),
info
:
{
money
:
45
,
in
:
23
,
out
:
89
,
isVip
:
true
,
},
list
:
[
{
week
:
"今天"
,
day
:
"2022-09-08"
,
week
:
'今天'
,
day
:
'2022-09-08'
,
list
:
[
{
type
:
'1'
,
name
:
'餐饮'
,
detail
:
'吃了一碗拉面'
,
time
:
'11:02'
,
count
:
'24.9'
},
{
type
:
'1'
,
name
:
'旅游'
,
detail
:
'国庆十日游,住宿、吃饭,范德萨发撒的范德萨范大师范德萨范范德萨范德萨发撒发范德萨发大水东方大厦'
,
time
:
'11:02'
,
count
:
'3000'
}
],
{
type
:
'1'
,
name
:
'餐饮'
,
detail
:
'吃了一碗拉面'
,
time
:
'11:02'
,
count
:
'24.9'
,
},
{
type
:
'1'
,
name
:
'旅游'
,
detail
:
'国庆十日游,住宿、吃饭,范德萨发撒的范德萨范大师范德萨范范德萨范德萨发撒发范德萨发大水东方大厦'
,
time
:
'11:02'
,
count
:
'3000'
,
},
],
},
{
weak
:
"昨天"
,
day
:
"2022-09-07"
,
weak
:
'昨天'
,
day
:
'2022-09-07'
,
list
:
[
{
type
:
'1'
,
name
:
'餐饮'
,
detail
:
'吃了一碗拉面'
,
time
:
'11:02'
,
count
:
'24.9'
}
],
{
type
:
'1'
,
name
:
'餐饮'
,
detail
:
'吃了一碗拉面'
,
time
:
'11:02'
,
count
:
'24.9'
,
},
],
},
],
}
...
...
@@ -205,7 +232,7 @@ export default {
return
[
{
image
:
this
.
baseUrl
+
'beijing@3x.png'
,
path
:
''
,
path
:
'
pages/maintain-bill/index
'
,
name
:
'维修记账'
,
},
{
...
...
@@ -239,7 +266,31 @@ export default {
},
]
},
paddingTop
()
{
var
top
=
systemInfo
.
safeAreaInsets
.
top
// #ifdef APP-PLUS || H5
return
44
+
top
// #endif
// #ifdef MP
return
(
systemInfo
.
platform
==
'ios'
?
44
:
48
)
+
top
// #endif
},
params
()
{
return
{
year
:
true
,
month
:
true
,
day
:
false
,
hour
:
false
,
minute
:
false
,
second
:
false
,
}
},
dateString
()
{
var
string
=
this
.
date
.
replace
(
/-/g
,
'/'
)
return
this
.
$u
.
timeFormat
(
new
Date
(
string
).
getTime
(),
'yyyy年mm月'
)
},
},
onLoad
()
{},
onReady
()
{
addBind
({})
},
...
...
@@ -251,28 +302,79 @@ export default {
}
return
true
},
handleSelectDate
()
{},
handleClickTool
(
path
)
{},
handleClickOperate
(
path
)
{},
handleSelectCell
(
id
)
{},
handleSelectDate
()
{
this
.
showDatePicker
=
true
},
handleComfirmDate
(
date
)
{
console
.
log
(
date
)
this
.
date
=
`
${
date
.
year
}
-
${
date
.
month
}
`
},
handleClickTool
(
path
)
{
if
(
!
this
.
checkVip
())
return
uni
.
navigateTo
({
url
:
path
});
},
handleClickOperate
(
path
)
{
if
(
!
this
.
checkVip
())
return
},
handleSelectCell
(
id
)
{
console
.
log
(
'-----------'
,
id
)
},
checkVip
()
{
if
(
this
.
info
.
isVip
)
{
return
true
}
else
{
this
.
visible
=
true
return
false
}
},
formatCount
(
count
)
{
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
>
<
style
lang=
"scss"
scoped
>
.index-view
{
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.content-view
{
height
:
100%
;
overflow-x
:
scroll
;
height
:
100%
;
overflow-x
:
scroll
;
padding
:
0rpx
24rpx
80rpx
24rpx
;
margin-bottom
:
-60rpx
;
margin-bottom
:
-60rpx
;
.head-view
{
display
:
flex
;
...
...
@@ -467,7 +569,7 @@ export default {
// display: flex;
// justify-content: space-between;
// align-items: center;
// padding: 24rpx 24rpx 8rpx 24rpx;
// padding: 24rpx 24rpx 8rpx 24rpx;
// .left-view {
// display: flex;
// align-items: center;
...
...
@@ -496,5 +598,8 @@ export default {
// }
}
}
.red-text
{
color
:
#FC524D
;
}
}
</
style
>
pages/maintain-bill/index.vue
0 → 100644
View file @
20a08b68
<
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
>
uni.scss
View file @
20a08b68
...
...
@@ -75,6 +75,13 @@ $uni-font-size-subtitle:26px;
$uni-color-paragraph
:
#3F536E
;
// 文章段落颜色
$uni-font-size-paragraph
:
15px
;
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
/* uni.scss */
@import
'uview-ui/theme.scss'
;
// 引入自定义全局scss变量
...
...
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