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
c2d42b79
Commit
c2d42b79
authored
Jul 25, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日历提醒设置
parent
8f9ded0f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
48 deletions
+71
-48
billing-daily.vue
components/billing-daily/billing-daily.vue
+24
-12
billing-category.vue
components/billing-daily/components/billing-category.vue
+7
-4
bill-detail.vue
pages/bill/bill-detail/bill-detail.vue
+1
-1
schedule.vue
pages/index/schedule/schedule.vue
+36
-30
lunc-calendar.vue
.../lunc-calendar/components/lunc-calendar/lunc-calendar.vue
+3
-1
No files found.
components/billing-daily/billing-daily.vue
View file @
c2d42b79
...
@@ -137,15 +137,11 @@ export default {
...
@@ -137,15 +137,11 @@ export default {
try
{
try
{
let
{
data
}
=
await
getBillTypes
({
type
:
this
.
form
.
type
});
let
{
data
}
=
await
getBillTypes
({
type
:
this
.
form
.
type
});
let
list
=
[];
let
list
=
[];
let
resData
=
[...
data
];
let
resData
=
this
.
deepClone
(
data
);
data
.
forEach
((
item
,
index
)
=>
{
if
(
!
this
.
form
.
classificationId
&&
data
[
0
])
{
if
(
index
===
0
&&
item
.
id
!==
'setting'
)
{
this
.
form
.
classificationId
=
data
[
0
].
id
;
this
.
form
.
classificationId
=
item
.
id
;
}
}
list
=
this
.
chunk
(
resData
,
this
.
limit
);
if
(
index
%
this
.
limit
===
0
)
{
list
.
push
(
resData
.
slice
(
index
,
index
+
this
.
limit
));
}
});
if
(
list
[
list
.
length
-
1
].
length
<
this
.
limit
)
{
if
(
list
[
list
.
length
-
1
].
length
<
this
.
limit
)
{
list
[
list
.
length
-
1
].
push
(
this
.
settingItem
);
list
[
list
.
length
-
1
].
push
(
this
.
settingItem
);
}
else
{
}
else
{
...
@@ -157,6 +153,20 @@ export default {
...
@@ -157,6 +153,20 @@ export default {
console
.
log
(
e
);
console
.
log
(
e
);
}
}
},
},
chunk
(
arr
,
num
)
{
// let j = 0,
// o = j;
let
newArray
=
[];
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
+=
num
)
{
newArray
.
push
(
arr
.
slice
(
i
,
i
+
num
));
}
// while (j
<
arr
.
length
)
{
// j += num;
// newArray.push([arr.slice(o, j)]);
// o = j;
// }
return
newArray
;
},
async
getQiniuToken
()
{
async
getQiniuToken
()
{
try
{
try
{
let
{
data
}
=
await
getQiNiuToken
();
let
{
data
}
=
await
getQiNiuToken
();
...
@@ -169,7 +179,7 @@ export default {
...
@@ -169,7 +179,7 @@ export default {
this
.
getQiniuToken
();
this
.
getQiniuToken
();
if
(
id
)
{
if
(
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
getDetail
()
this
.
getDetail
()
;
}
else
{
}
else
{
this
.
form
=
{
this
.
form
=
{
type
:
'INCOME'
,
type
:
'INCOME'
,
...
@@ -189,8 +199,9 @@ export default {
...
@@ -189,8 +199,9 @@ export default {
let
{
data
}
=
await
get
({
id
:
this
.
id
});
let
{
data
}
=
await
get
({
id
:
this
.
id
});
data
.
classificationId
=
data
.
classification
.
id
;
data
.
classificationId
=
data
.
classification
.
id
;
data
.
type
=
data
.
type
.
code
;
data
.
type
=
data
.
type
.
code
;
data
.
happenTime
=
this
.
parseTime
(
data
.
happenTime
,
'{y}-{m}-{d}'
)
data
.
happenTime
=
this
.
parseTime
(
data
.
happenTime
,
'{y}-{m}-{d}'
);
this
.
form
=
data
;
this
.
form
=
data
;
await
this
.
getBillTypeOptions
();
this
.
show
=
true
;
this
.
show
=
true
;
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
...
@@ -263,6 +274,7 @@ export default {
...
@@ -263,6 +274,7 @@ export default {
billingTypeChange
(
e
)
{
billingTypeChange
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
this
.
form
.
type
=
e
.
value
;
this
.
form
.
type
=
e
.
value
;
this
.
getBillTypeOptions
();
},
},
openCalendarPopup
()
{
openCalendarPopup
()
{
this
.
$refs
[
'calendar-popup'
].
open
();
this
.
$refs
[
'calendar-popup'
].
open
();
...
@@ -349,7 +361,7 @@ export default {
...
@@ -349,7 +361,7 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
font-size
:
24upx
;
font-size
:
24upx
;
color
:
#333333
;
color
:
#333333
;
&
-text
{
&
-text
{
text-align
:
right
;
text-align
:
right
;
width
:
140rpx
;
width
:
140rpx
;
height
:
48upx
;
height
:
48upx
;
...
...
components/billing-daily/components/billing-category.vue
View file @
c2d42b79
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<image
:src=
"billBaseUrl + item.recordSelectedIcon"
mode=
""
v-if=
"item.id === checked || item.id === 'setting'"
></image>
<image
:src=
"billBaseUrl + item.recordSelectedIcon"
mode=
""
v-if=
"item.id === checked || item.id === 'setting'"
></image>
<image
:src=
"billBaseUrl + item.recordIcon"
mode=
""
v-else
></image>
<image
:src=
"billBaseUrl + item.recordIcon"
mode=
""
v-else
></image>
</view>
</view>
<view
class=
"billing-category-item-text"
:class=
"
{'billing-category-item-setting':item.id === 'setting'}">
<view
class=
"billing-category-item-text
ellipsis
"
:class=
"
{'billing-category-item-setting':item.id === 'setting'}">
<text>
{{
item
.
name
}}
</text>
<text>
{{
item
.
name
}}
</text>
<u-icon
name=
"arrow-right"
v-if=
"item.id === 'setting'"
class=
"billing-category-item-setting-icon"
></u-icon>
<u-icon
name=
"arrow-right"
v-if=
"item.id === 'setting'"
class=
"billing-category-item-setting-icon"
></u-icon>
</view>
</view>
...
@@ -83,8 +83,9 @@ export default {
...
@@ -83,8 +83,9 @@ export default {
}
}
}
}
&
-item
{
&
-item
{
height
:
136rpx
;
height
:
140rpx
;
padding
:
0
22upx
;
padding
:
0
12upx
;
width
:
16
.66%
;
padding-bottom
:
32upx
;
padding-bottom
:
32upx
;
font-size
:
28upx
;
font-size
:
28upx
;
color
:
#8d8d8d
;
color
:
#8d8d8d
;
...
@@ -99,9 +100,11 @@ export default {
...
@@ -99,9 +100,11 @@ export default {
border-radius
:
50%
;
border-radius
:
50%
;
}
}
&
-text
{
&
-text
{
width
:
100%
;
text-align
:
center
;
margin-top
:
12upx
;
margin-top
:
12upx
;
font-size
:
20upx
;
font-size
:
20upx
;
line-height
:
2
0
upx
;
line-height
:
2
4
upx
;
color
:
#8d8d8d
;
color
:
#8d8d8d
;
}
}
&
-setting
{
&
-setting
{
...
...
pages/bill/bill-detail/bill-detail.vue
View file @
c2d42b79
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</view>
</view>
<view
class=
"card-bdoy-images"
v-if=
"detail.attach"
>
<view
class=
"card-bdoy-images"
v-if=
"detail.attach"
>
<view
class=
"card-bdoy-images-item"
v-for=
"(item, index) in detail.attach"
:key=
"index"
>
<view
class=
"card-bdoy-images-item"
v-for=
"(item, index) in detail.attach"
:key=
"index"
>
<image
:src=
"item"
v-if=
"item"
@
click=
"preview(item, index)"
></image>
<image
:src=
"item"
mode=
"aspectFit"
v-if=
"item"
@
click=
"preview(item, index)"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/index/schedule/schedule.vue
View file @
c2d42b79
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<view>
<view>
<view
class=
"calendar"
>
<view
class=
"calendar"
>
<lunc-calendar
<lunc-calendar
ref=
"lunc-calendar"
:showLunar=
"true"
:showLunar=
"true"
:showMonthBg=
"false"
:showMonthBg=
"false"
:shouChangeBtn=
"true"
:shouChangeBtn=
"true"
...
@@ -25,7 +26,7 @@ import MidPopup from '@/components/mid-popup/mid-popup.vue';
...
@@ -25,7 +26,7 @@ import MidPopup from '@/components/mid-popup/mid-popup.vue';
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
PlanView
from
'./components/plan-view.vue'
;
import
PlanView
from
'./components/plan-view.vue'
;
import
{
tabbar
}
from
'@/utils/settings.js'
;
import
{
tabbar
}
from
'@/utils/settings.js'
;
import
{
getSign
}
from
"@/api/schedule/index.js"
import
{
getSign
}
from
'@/api/schedule/index.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
MidPopup
,
MidPopup
,
...
@@ -36,31 +37,22 @@ export default {
...
@@ -36,31 +37,22 @@ export default {
return
{
return
{
tabbar
,
tabbar
,
signList
:
[
signList
:
[
{
// {
date
:
'2022-07-08'
,
// date: '2022-07-08'
// title: '张三生日',
// title: '张三生日',
// info: '八月初四张三生日'
// info: '八月初四张三生日'
},
// },
{
date
:
'2022-07-09'
,
// title: '生日',
// info: '八月初四张三生日'
},
{
date
:
'2022-07-12'
// title: '朋友聚会'
}
],
],
date
:
''
,
date
:
''
,
month
:
''
,
month
:
''
,
firstEnter
:
true
firstEnter
:
true
};
};
},
},
onReady
()
{
onReady
()
{
this
.
date
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
date
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
month
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}'
)
+
'-01'
;
this
.
month
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}'
)
+
'-01'
;
this
.
getList
();
this
.
getList
();
this
.
getSignList
()
this
.
getSignList
()
;
},
},
onShow
()
{
onShow
()
{
if
(
!
this
.
firstEnter
)
{
if
(
!
this
.
firstEnter
)
{
...
@@ -85,27 +77,41 @@ export default {
...
@@ -85,27 +77,41 @@ export default {
},
},
monthChange
(
e
)
{
monthChange
(
e
)
{
console
.
log
(
'monthChange'
,
e
);
console
.
log
(
'monthChange'
,
e
);
let
{
date
}
=
e
let
{
date
}
=
e
;
this
.
month
=
this
.
parseTime
(
date
,
'{y}-{m}'
)
+
'-01'
;
this
.
month
=
this
.
parseTime
(
date
,
'{y}-{m}'
)
+
'-01'
;
this
.
getSignList
()
this
.
getSignList
()
;
},
},
chooseMonth
(
selDate
)
{
chooseMonth
(
selDate
)
{
console
.
log
(
'selDate'
,
selDate
);
console
.
log
(
'selDate'
,
selDate
);
let
{
date
}
=
e
let
{
date
}
=
e
;
this
.
month
=
this
.
parseTime
(
date
,
'{y}-{m}'
)
+
'-01'
;
this
.
month
=
this
.
parseTime
(
date
,
'{y}-{m}'
)
+
'-01'
;
this
.
getSignList
()
this
.
getSignList
()
;
},
},
getList
()
{
getList
()
{
this
.
$refs
[
'plan-view'
].
getList
(
this
.
date
);
this
.
$refs
[
'plan-view'
].
getList
(
this
.
date
);
this
.
firstEnter
=
false
;
this
.
firstEnter
=
false
;
},
},
async
getSignList
(){
async
getSignList
()
{
try
{
try
{
let
params
=
{
let
params
=
{
month
:
this
.
month
month
:
this
.
month
};
let
{
data
}
=
await
getSign
(
params
);
if
(
data
)
{
this
.
signList
=
data
.
map
(
item
=>
{
return
{
date
:
item
.
t1
,
info
:
''
,
title
:
''
};
});
console
.
log
(
this
.
signList
)
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"lunc-calendar"
].
init
(
this
.
date
)
})
}
}
let
res
=
await
getSign
(
params
)
}
catch
(
e
)
{
}
catch
(
e
){
console
.
log
(
e
)
//TODO handle the exception
//TODO handle the exception
}
}
}
}
...
...
uni_modules/lunc-calendar/components/lunc-calendar/lunc-calendar.vue
View file @
c2d42b79
...
@@ -246,7 +246,9 @@ export default {
...
@@ -246,7 +246,9 @@ export default {
let
sY
=
new
Date
(
item
.
date
).
getFullYear
();
let
sY
=
new
Date
(
item
.
date
).
getFullYear
();
let
sM
=
new
Date
(
item
.
date
).
getMonth
()
+
1
;
let
sM
=
new
Date
(
item
.
date
).
getMonth
()
+
1
;
let
sD
=
new
Date
(
item
.
date
).
getDate
();
let
sD
=
new
Date
(
item
.
date
).
getDate
();
if
(
sY
==
year
&&
sM
==
month
&&
sD
==
day
)
daySign
=
item
;
if
(
sY
==
year
&&
sM
==
month
&&
sD
==
day
){
daySign
=
item
};
});
});
let
dayInfo
=
{
day
,
sYear
:
year
,
sMonth
:
month
,
week
,
lunar
,
dayLunar
,
isFestival
,
isToday
,
dayType
,
daySign
};
let
dayInfo
=
{
day
,
sYear
:
year
,
sMonth
:
month
,
week
,
lunar
,
dayLunar
,
isFestival
,
isToday
,
dayType
,
daySign
};
let
dayClass
=
this
.
getDayClass
(
dayInfo
);
let
dayClass
=
this
.
getDayClass
(
dayInfo
);
...
...
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