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
54d297cb
Commit
54d297cb
authored
Jul 14, 2022
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
35d6127f
5fcaa7b4
Pipeline
#2772
canceled with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
230 additions
and
7 deletions
+230
-7
billing-details.vue
components/billing-details/billing-details.vue
+1
-1
account.vue
pages/index/account/account.vue
+37
-2
bill.vue
pages/index/bill/bill.vue
+60
-4
bill-count.vue
pages/index/bill/components/bill-count.vue
+73
-0
index.js
utils/options/bill/index.js
+59
-0
No files found.
components/billing-details/billing-details.vue
View file @
54d297cb
...
@@ -67,7 +67,7 @@ export default {
...
@@ -67,7 +67,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
billingTypeOptions
,
billingTypeOptions
,
show
:
tru
e
,
show
:
fals
e
,
customStyle
:
{
customStyle
:
{
width
:
'104rpx'
,
width
:
'104rpx'
,
height
:
'48rpx'
,
height
:
'48rpx'
,
...
...
pages/index/account/account.vue
View file @
54d297cb
<
template
>
<
template
>
<view>
<view>
<view
class=
"account"
>
<picker
mode=
"date"
:value=
"form.date"
fields=
"month"
@
change=
"chooseMonth"
>
<view
class=
"account-date"
@
click=
"openCalendarPopup"
>
<text>
{{
form
.
date
}}
</text>
<u-icon
name=
"arrow-down-fill"
class=
"account-date-icon"
></u-icon>
</view>
</picker>
</view>
<mid-popup
ref=
"midPopup"
></mid-popup>
<mid-popup
ref=
"midPopup"
></mid-popup>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
</view>
</view>
...
@@ -14,10 +22,18 @@ export default {
...
@@ -14,10 +22,18 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
tabbar
tabbar
,
form
:
{
date
:
''
}
};
};
},
},
methods
:
{
methods
:
{
chooseMonth
(
e
){
console
.
log
(
e
.
detail
)
let
{
value
}
=
e
.
detail
;
this
.
form
.
date
=
value
},
beforeSwitch
(
index
)
{
beforeSwitch
(
index
)
{
if
(
index
===
2
)
{
if
(
index
===
2
)
{
this
.
$refs
[
'midPopup'
].
open
();
this
.
$refs
[
'midPopup'
].
open
();
...
@@ -29,4 +45,23 @@ export default {
...
@@ -29,4 +45,23 @@ export default {
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.account
{
&
-date
{
width
:
196upx
;
height
:
48upx
;
background
:
#FFFFFF
;
border-radius
:
8upx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
24upx
;
color
:
$default-color
;
&
-icon
{
color
:
#8d8d8d
;
margin-left
:
16upx
;
}
}
}
</
style
>
pages/index/bill/bill.vue
View file @
54d297cb
<
template
>
<
template
>
<view>
<view>
<view
class=
"bill"
>
<view
class=
"bill-head"
>
<picker
mode=
"date"
:value=
"defaultDate"
fields=
"month"
@
change=
"chooseMonth"
>
<view
class=
"bill-date"
>
<view
class=
"bill-date-text"
>
{{
form
.
date
}}
</view>
<u-icon
name=
"arrow-down-fill"
class=
"bill-date-icon"
></u-icon>
</view>
</picker>
</view>
<view
class=
"bill-count"
>
<bill-count
ref=
"bill-count"
></bill-count>
</view>
</view>
<mid-popup
ref=
"midPopup"
></mid-popup>
<mid-popup
ref=
"midPopup"
></mid-popup>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
</view>
</view>
...
@@ -7,17 +20,35 @@
...
@@ -7,17 +20,35 @@
<
script
>
<
script
>
import
MidPopup
from
'@/components/mid-popup/mid-popup.vue'
;
import
MidPopup
from
'@/components/mid-popup/mid-popup.vue'
;
import
BillCount
from
'./components/bill-count.vue'
;
import
{
tabbar
}
from
'@/utils/settings.js'
;
import
{
tabbar
}
from
'@/utils/settings.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
MidPopup
MidPopup
,
BillCount
},
},
data
()
{
data
()
{
return
{
return
{
tabbar
tabbar
,
defaultDate
:
""
,
form
:
{
date
:
''
}
};
};
},
},
onLoad
()
{
this
.
initDate
()
},
methods
:
{
methods
:
{
initDate
()
{
this
.
form
.
date
=
this
.
parseTime
(
new
Date
(),
"{y}年{m}月"
)
this
.
defaultDate
=
this
.
parseTime
(
new
Date
(),
"{y}-{m}"
)
},
chooseMonth
(
e
){
let
{
value
}
=
e
.
detail
;
this
.
defaultDate
=
value
this
.
form
.
date
=
this
.
parseTime
(
value
+
'-01'
,
"{y}年{m}月"
)
},
beforeSwitch
(
index
)
{
beforeSwitch
(
index
)
{
if
(
index
===
2
)
{
if
(
index
===
2
)
{
this
.
$refs
[
'midPopup'
].
open
();
this
.
$refs
[
'midPopup'
].
open
();
...
@@ -25,8 +56,33 @@ export default {
...
@@ -25,8 +56,33 @@ export default {
}
}
return
true
;
return
true
;
}
}
}
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.bill
{
padding
:
24upx
;
&
-date
{
width
:
210upx
;
height
:
48upx
;
background
:
#FFFFFF
;
border-radius
:
8upx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
24upx
;
color
:
$default-color
;
padding
:
0
16upx
;
&
-text
{
flex
:
1
;
}
&
-icon
{
margin-left
:
8upx
;
}
}
}
</
style
>
pages/index/bill/components/bill-count.vue
0 → 100644
View file @
54d297cb
<
template
>
<view
class=
"bill-count"
>
<view
class=
"bill-count-item"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"bill-count-item-icon"
><image
:src=
"item.icon"
mode=
""
v-if=
"item.icon"
></image></view>
<view
class=
"bill-count-item-value ellipsis"
>
{{
form
[
item
.
value
]
}}
</view>
<view
class=
"bill-count-item-label"
>
{{
item
.
label
}}
</view>
<view
class=
"bill-count-item-line"
v-if=
"index !== list.length - 1"
></view>
</view>
</view>
</
template
>
<
script
>
import
{
billCountOptions
}
from
'@/utils/options/bill/index.js'
;
export
default
{
data
()
{
return
{
list
:
billCountOptions
,
form
:
{
income
:
'6546546456446.00'
,
disbursement
:
'55.00'
,
surplus
:
'79.00'
}
};
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.bill-count
{
margin
:
24upx
0
;
height
:
204upx
;
display
:
flex
;
// padding: 32upx 0;
background
:
#ffffff
;
border-radius
:
16upx
;
&
-item
{
width
:
33%
;
height
:
100%
;
padding
:
0
24upx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
position
:
relative
;
&
-icon
{
width
:
40upx
;
height
:
40upx
;
}
&
-value
{
width
:
100%
;
text-align
:
center
;
margin-top
:
32upx
;
margin-bottom
:
16upx
;
line-height
:
32upx
;
font-size
:
32upx
;
font-weight
:
bold
;
}
&
-label
{
font-size
:
20upx
;
color
:
#8d8d8d
;
}
&
-line
{
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translateY
(
-50%
);
width
:
2upx
;
height
:
120upx
;
background
:
#F6F7FA
;
}
}
}
</
style
>
utils/options/bill/index.js
0 → 100644
View file @
54d297cb
export
const
billCountOptions
=
[{
value
:
"income"
,
label
:
"本月总收入(元)"
,
icon
:
""
},
{
value
:
"disbursement"
,
label
:
"本月总支出(元)"
,
icon
:
""
},
{
value
:
"surplus"
,
label
:
"本月总结余(元)"
,
icon
:
""
},
]
export
const
billingCategoryOptions
=
[{
value
:
"1"
,
label
:
"交通"
,
icon
:
''
},
{
value
:
"2"
,
label
:
"餐饮"
,
icon
:
''
},
{
value
:
"3"
,
label
:
"服饰"
,
icon
:
''
},
{
value
:
"4"
,
label
:
"购物"
,
icon
:
''
},
{
value
:
"5"
,
label
:
"娱乐"
,
icon
:
''
},
{
value
:
"6"
,
label
:
"教育"
,
icon
:
''
},
{
value
:
"7"
,
label
:
"材料"
,
icon
:
''
},
{
value
:
"8"
,
label
:
"设置"
,
icon
:
''
},
]
\ No newline at end of file
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