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
c3bdde9a
Commit
c3bdde9a
authored
Jul 25, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出
parent
fd8499f8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
161 additions
and
65 deletions
+161
-65
index.js
api/bill/index.js
+9
-0
index.js
api/schedule/index.js
+8
-0
billing-daily.vue
components/billing-daily/billing-daily.vue
+62
-34
bill-detail.vue
pages/bill/bill-detail/bill-detail.vue
+47
-22
schedule.vue
pages/index/schedule/schedule.vue
+22
-2
lunc-calendar.vue
.../lunc-calendar/components/lunc-calendar/lunc-calendar.vue
+13
-7
No files found.
api/bill/index.js
View file @
c3bdde9a
...
@@ -7,6 +7,15 @@ export function getList(data) {
...
@@ -7,6 +7,15 @@ export function getList(data) {
})
})
}
}
export
function
get
(
data
)
{
return
request
({
url
:
`/rest/bookRecord/detail`
,
method
:
'GET'
,
data
})
}
export
function
getStatistics
(
data
)
{
export
function
getStatistics
(
data
)
{
return
request
({
return
request
({
url
:
`/rest/bookRecord/statistics`
,
url
:
`/rest/bookRecord/statistics`
,
...
...
api/schedule/index.js
View file @
c3bdde9a
...
@@ -7,6 +7,14 @@ export function getList(data) {
...
@@ -7,6 +7,14 @@ export function getList(data) {
})
})
}
}
export
function
getSign
(
data
)
{
return
request
({
url
:
`/rest/trip/calendar`
,
method
:
'GET'
,
data
})
}
export
function
get
(
data
)
{
export
function
get
(
data
)
{
return
request
({
return
request
({
url
:
`/rest/trip/detail`
,
url
:
`/rest/trip/detail`
,
...
...
components/billing-daily/billing-daily.vue
View file @
c3bdde9a
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<view
class=
"billing-type"
>
<view
class=
"billing-type"
>
<checkbox-groups
:checked=
"form.type"
:custom-style=
"customStyle"
:options=
"billingTypeOptions"
@
handleClick=
"billingTypeChange"
></checkbox-groups>
<checkbox-groups
:checked=
"form.type"
:custom-style=
"customStyle"
:options=
"billingTypeOptions"
@
handleClick=
"billingTypeChange"
></checkbox-groups>
<view
class=
"billing-type-date"
@
click=
"openCalendarPopup"
>
<view
class=
"billing-type-date"
@
click=
"openCalendarPopup"
>
<
text>
{{
form
.
happenTime
}}
</text
>
<
view
class=
"billing-type-date-text"
>
{{
form
.
happenTime
}}
</view
>
<u-icon
name=
"arrow-down-fill"
class=
"billing-type-date-icon"
></u-icon>
<u-icon
name=
"arrow-down-fill"
class=
"billing-type-date-icon"
></u-icon>
</view>
</view>
</view>
</view>
...
@@ -55,9 +55,10 @@ import CheckboxGroups from '@/components/checkbox-groups/checkbox-groups.vue';
...
@@ -55,9 +55,10 @@ import CheckboxGroups from '@/components/checkbox-groups/checkbox-groups.vue';
import
CalendarPopup
from
'@/components/calendar-popup/calendar-popup.vue'
;
import
CalendarPopup
from
'@/components/calendar-popup/calendar-popup.vue'
;
import
BillingCategory
from
'./components/billing-category.vue'
;
import
BillingCategory
from
'./components/billing-category.vue'
;
import
{
billingTypeOptions
}
from
'@/utils/options/bill'
;
import
{
billingTypeOptions
}
from
'@/utils/options/bill'
;
import
{
indexBaseUrl
,
UPLOAD_FILE_HOST
}
from
'@/utils/config.js'
;
import
{
indexBaseUrl
,
UPLOAD_FILE_HOST
}
from
'@/utils/config.js'
;
import
upload
from
'@/utils/upload'
;
import
upload
from
'@/utils/upload'
;
import
{
getBillTypes
,
add
}
from
'@/api/bill/daily.js'
;
import
{
getBillTypes
,
add
}
from
'@/api/bill/daily.js'
;
import
{
get
}
from
'@/api/bill/index.js'
;
import
{
getQiNiuToken
}
from
'@/api/upload/index.js'
;
import
{
getQiNiuToken
}
from
'@/api/upload/index.js'
;
export
default
{
export
default
{
name
:
'billing-daily'
,
name
:
'billing-daily'
,
...
@@ -124,11 +125,14 @@ export default {
...
@@ -124,11 +125,14 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
init
();
this
.
getBillTypeOptions
();
this
.
getQiniuToken
();
},
},
methods
:
{
methods
:
{
init
()
{
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
getBillTypeOptions
();
this
.
getQiniuToken
();
},
async
getBillTypeOptions
()
{
async
getBillTypeOptions
()
{
try
{
try
{
let
{
data
}
=
await
getBillTypes
({
type
:
this
.
form
.
type
});
let
{
data
}
=
await
getBillTypes
({
type
:
this
.
form
.
type
});
...
@@ -161,19 +165,37 @@ export default {
...
@@ -161,19 +165,37 @@ export default {
//TODO handle the exception
//TODO handle the exception
}
}
},
},
open
()
{
open
(
id
)
{
this
.
form
=
{
this
.
getQiniuToken
();
type
:
'INCOME'
,
if
(
id
)
{
address
:
''
,
this
.
id
=
id
;
happenTime
:
''
,
this
.
getDetail
()
amount
:
''
,
}
else
{
classificationId
:
''
,
this
.
form
=
{
attach
:
null
,
type
:
'INCOME'
,
latitude
:
''
,
address
:
''
,
longitude
:
''
happenTime
:
''
,
amount
:
''
,
classificationId
:
''
,
attach
:
null
,
latitude
:
''
,
longitude
:
''
};
this
.
show
=
true
;
}
},
async
getDetail
()
{
try
{
let
{
data
}
=
await
get
({
id
:
this
.
id
});
data
.
classificationId
=
data
.
classification
.
id
;
data
.
type
=
data
.
type
.
code
;
data
.
happenTime
=
this
.
parseTime
(
data
.
happenTime
,
'{y}-{m}-{d}'
)
this
.
form
=
data
;
this
.
show
=
true
;
}
catch
(
e
)
{
console
.
log
(
e
);
//TODO handle the exception
}
}
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
show
=
true
;
},
},
close
()
{
close
()
{
this
.
show
=
false
;
this
.
show
=
false
;
...
@@ -191,7 +213,7 @@ export default {
...
@@ -191,7 +213,7 @@ export default {
this
.
form
.
longitude
=
longitude
;
this
.
form
.
longitude
=
longitude
;
},
},
fail
(
err
)
{
fail
(
err
)
{
console
.
log
(
'chooseLocation_fail:'
,
err
);
console
.
log
(
'chooseLocation_fail:'
,
err
);
}
}
});
});
},
},
...
@@ -203,11 +225,11 @@ export default {
...
@@ -203,11 +225,11 @@ export default {
break
;
break
;
}
}
}
}
if
(
title
)
{
if
(
title
)
{
this
.
showToast
(
title
)
this
.
showToast
(
title
)
;
return
false
return
false
;
}
}
this
.
save
()
this
.
save
()
;
},
},
async
save
()
{
async
save
()
{
let
title
=
this
.
form
.
id
?
'修改'
:
'新增'
;
let
title
=
this
.
form
.
id
?
'修改'
:
'新增'
;
...
@@ -215,8 +237,8 @@ export default {
...
@@ -215,8 +237,8 @@ export default {
await
add
(
this
.
form
);
await
add
(
this
.
form
);
this
.
showToast
(
title
+
'成功'
,
true
);
this
.
showToast
(
title
+
'成功'
,
true
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
show
=
false
;
this
.
show
=
false
;
this
.
$emit
(
"afterSave"
)
this
.
$emit
(
'afterSave'
);
},
1500
);
},
1500
);
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
showToast
(
title
+
'失败'
);
this
.
showToast
(
title
+
'失败'
);
...
@@ -231,7 +253,7 @@ export default {
...
@@ -231,7 +253,7 @@ export default {
// 点击确认
// 点击确认
calculatorSure
(
e
)
{
calculatorSure
(
e
)
{
console
.
log
(
'calculatorSure'
,
e
);
console
.
log
(
'calculatorSure'
,
e
);
this
.
beforeSave
()
this
.
beforeSave
()
;
},
},
// 日历
// 日历
calendarChange
(
e
)
{
calendarChange
(
e
)
{
...
@@ -261,17 +283,16 @@ export default {
...
@@ -261,17 +283,16 @@ export default {
}
}
},
},
async
handleClickChangeImage
()
{
async
handleClickChangeImage
()
{
try
{
try
{
// 上传图片
// 上传图片
let
res
=
await
upload
.
getPhoto
(
this
.
upload
.
qiniuToken
)
let
res
=
await
upload
.
getPhoto
(
this
.
upload
.
qiniuToken
);
uni
.
hideLoading
()
uni
.
hideLoading
()
;
let
{
hash
,
key
}
=
res
let
{
hash
,
key
}
=
res
;
this
.
form
.
attach
=
[
UPLOAD_FILE_HOST
+
key
]
this
.
form
.
attach
=
[
UPLOAD_FILE_HOST
+
key
];
}
catch
(
e
)
{
}
catch
(
e
)
{
uni
.
hideLoading
()
uni
.
hideLoading
()
;
//TODO handle the exception
//TODO handle the exception
}
}
}
}
}
}
};
};
...
@@ -321,7 +342,6 @@ export default {
...
@@ -321,7 +342,6 @@ export default {
justify-content
:
space-between
;
justify-content
:
space-between
;
&
-date
{
&
-date
{
padding
:
0
18upx
;
padding
:
0
18upx
;
height
:
48upx
;
background
:
#f6f7fa
;
background
:
#f6f7fa
;
border-radius
:
8upx
;
border-radius
:
8upx
;
display
:
flex
;
display
:
flex
;
...
@@ -329,6 +349,14 @@ export default {
...
@@ -329,6 +349,14 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
font-size
:
24upx
;
font-size
:
24upx
;
color
:
#333333
;
color
:
#333333
;
&
-text
{
text-align
:
right
;
width
:
140rpx
;
height
:
48upx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
&
-icon
{
&
-icon
{
color
:
#8d8d8d
;
color
:
#8d8d8d
;
margin-left
:
16upx
;
margin-left
:
16upx
;
...
...
pages/bill/bill-detail/bill-detail.vue
View file @
c3bdde9a
...
@@ -2,25 +2,27 @@
...
@@ -2,25 +2,27 @@
<!-- 账单详情 -->
<!-- 账单详情 -->
<view
class=
"bill-detail"
>
<view
class=
"bill-detail"
>
<view
class=
"card"
>
<view
class=
"card"
>
<view
class=
"card-icon"
></view>
<view
class=
"card-icon"
>
<view
class=
"card-icon-image"
>
<image
:src=
"billBaseUrl + detail.classification.bookDetailIcon"
mode=
""
v-if=
"detail.classification && detail.classification.bookDetailIcon"
></image>
</view>
</view>
<view
class=
"card-head"
>
<view
class=
"card-head"
>
<view
class=
"card-title"
>
{{
detail
.
money
}}
</view>
<view
class=
"card-title"
>
{{
detail
.
classification
&&
detail
.
classification
.
name
}}
</view>
<view
class=
"card-subtitle"
>
{{
detail
.
money
}}
</view>
<view
class=
"card-subtitle"
>
{{
detail
.
amount
}}
</view>
</view>
</view>
<view
class=
"card-line"
></view>
<view
class=
"card-line"
></view>
<view
class=
"card-bdoy"
>
<view
class=
"card-bdoy"
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"item-label"
>
{{
item
.
label
}}
</view>
<view
class=
"item-label"
>
{{
item
.
label
}}
</view>
<view
class=
"item-value"
>
<view
class=
"item-value"
>
<text
v-if=
"item.value === 'createdTime'"
>
<text
class=
"item-value-repair"
v-if=
"item.value === 'remark' && detail.repairId"
>
点击查看维修账单
</text>
<text
v-if=
"detail.createdTime && detail.time"
>
{{
detail
.
createdTime
+
' '
+
detail
.
time
}}
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
||
''
}}
</text>
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"card-bdoy-images"
v-if=
"detail.
images
"
>
<view
class=
"card-bdoy-images"
v-if=
"detail.
attach
"
>
<view
class=
"card-bdoy-images-item"
v-for=
"(item, index) in detail.
images
"
:key=
"index"
>
<view
class=
"card-bdoy-images-item"
v-for=
"(item, index) in detail.
attach
"
:key=
"index"
>
<image
:src=
"item
.url"
v-if=
"item.url
"
@
click=
"preview(item, index)"
></image>
<image
:src=
"item
"
v-if=
"item
"
@
click=
"preview(item, index)"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -30,7 +32,7 @@
...
@@ -30,7 +32,7 @@
</view>
</view>
</view>
</view>
<PopInput
title=
"删除提醒"
type=
"text"
sureText=
"确定"
content=
"确认删除该账单?"
:visible
.
sync=
"showConfirm"
@
click=
"handleConfirm"
/>
<PopInput
title=
"删除提醒"
type=
"text"
sureText=
"确定"
content=
"确认删除该账单?"
:visible
.
sync=
"showConfirm"
@
click=
"handleConfirm"
/>
<billing-daily
ref=
"billing-daily"
:type=
"type"
></billing-daily>
<billing-daily
ref=
"billing-daily"
:type=
"type"
@
afterSave=
"afterSave"
></billing-daily>
</view>
</view>
</
template
>
</
template
>
...
@@ -38,7 +40,8 @@
...
@@ -38,7 +40,8 @@
import
AbButton
from
'@/components/common/ab-button.vue'
;
import
AbButton
from
'@/components/common/ab-button.vue'
;
import
PopInput
from
'@/components/pop-input-view'
;
import
PopInput
from
'@/components/pop-input-view'
;
import
BillingDetails
from
'@/components/billing-daily/billing-daily.vue'
;
import
BillingDetails
from
'@/components/billing-daily/billing-daily.vue'
;
import
{
repairDetail
}
from
'@/api/maintain/index.js'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
get
}
from
'@/api/bill/index.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
AbButton
,
AbButton
,
...
@@ -47,6 +50,7 @@ export default {
...
@@ -47,6 +50,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
billBaseUrl
,
showConfirm
:
false
,
showConfirm
:
false
,
id
:
''
,
id
:
''
,
type
:
''
,
type
:
''
,
...
@@ -65,17 +69,16 @@ export default {
...
@@ -65,17 +69,16 @@ export default {
'font-size'
:
'32rpx'
'font-size'
:
'32rpx'
},
},
detail
:
{
detail
:
{
name
:
'餐饮'
,
name
:
''
,
money
:
'-16.00'
,
amount
:
''
,
createdTime
:
'2022-07-10'
,
happenTime
:
''
,
time
:
'14:00'
,
remark
:
''
,
remark
:
'这家饭店的面有点难吃还很贵'
,
attach
:
[]
images
:
[
1
,
1
,
1
,
1
]
},
},
list
:
[
list
:
[
{
{
label
:
'账单时间:'
,
label
:
'账单时间:'
,
value
:
'
created
Time'
value
:
'
happen
Time'
},
},
{
{
label
:
'账单备注:'
,
label
:
'账单备注:'
,
...
@@ -96,10 +99,18 @@ export default {
...
@@ -96,10 +99,18 @@ export default {
}
}
}
}
},
},
onShow
()
{
if
(
this
.
id
)
{
this
.
getDetail
();
}
},
methods
:
{
methods
:
{
afterSave
(){
this
.
getDetail
();
},
async
getDetail
()
{
async
getDetail
()
{
try
{
try
{
let
res
=
await
repairDetail
({
id
:
this
.
id
});
let
res
=
await
get
({
id
:
this
.
id
});
let
{
code
,
data
,
msg
}
=
res
;
let
{
code
,
data
,
msg
}
=
res
;
this
.
detail
=
data
;
this
.
detail
=
data
;
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -110,7 +121,11 @@ export default {
...
@@ -110,7 +121,11 @@ export default {
this
.
showConfirm
=
true
;
this
.
showConfirm
=
true
;
},
},
toEdit
()
{
toEdit
()
{
this
.
$refs
[
'billing-daily'
].
open
();
if
(
this
.
detail
.
repairId
){
}
else
{
this
.
$refs
[
'billing-daily'
].
open
(
this
.
detail
.
id
);
}
},
},
handleConfirm
()
{
handleConfirm
()
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -119,7 +134,7 @@ export default {
...
@@ -119,7 +134,7 @@ export default {
});
});
},
},
preview
(
item
,
index
)
{
preview
(
item
,
index
)
{
let
urls
=
this
.
detail
.
images
.
map
(
item
=>
item
.
url
)
;
let
urls
=
this
.
detail
.
attach
;
// 预览图片
// 预览图片
uni
.
previewImage
({
uni
.
previewImage
({
urls
:
urls
,
urls
:
urls
,
...
@@ -170,6 +185,13 @@ page {
...
@@ -170,6 +185,13 @@ page {
top
:
0
;
top
:
0
;
left
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
&
-image
{
width
:
76upx
;
height
:
76upx
;
}
}
}
&
-title
{
&
-title
{
color
:
#8d8d8d
;
color
:
#8d8d8d
;
...
@@ -203,6 +225,9 @@ page {
...
@@ -203,6 +225,9 @@ page {
&
-value
{
&
-value
{
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
28upx
;
font-size
:
28upx
;
&
-repair
{
color
:
$default-color
;
}
}
}
}
}
&
-images
{
&
-images
{
...
...
pages/index/schedule/schedule.vue
View file @
c3bdde9a
...
@@ -25,6 +25,7 @@ import MidPopup from '@/components/mid-popup/mid-popup.vue';
...
@@ -25,6 +25,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"
export
default
{
export
default
{
components
:
{
components
:
{
MidPopup
,
MidPopup
,
...
@@ -38,12 +39,12 @@ export default {
...
@@ -38,12 +39,12 @@ export default {
{
{
date
:
'2022-07-08'
,
date
:
'2022-07-08'
,
// title: '张三生日',
// title: '张三生日',
info
:
'八月初四张三生日'
//
info: '八月初四张三生日'
},
},
{
{
date
:
'2022-07-09'
,
date
:
'2022-07-09'
,
// title: '生日',
// title: '生日',
info
:
'八月初四张三生日'
//
info: '八月初四张三生日'
},
},
{
{
date
:
'2022-07-12'
date
:
'2022-07-12'
...
@@ -51,12 +52,15 @@ export default {
...
@@ -51,12 +52,15 @@ export default {
}
}
],
],
date
:
''
,
date
:
''
,
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
.
getList
();
this
.
getList
();
this
.
getSignList
()
},
},
onShow
()
{
onShow
()
{
if
(
!
this
.
firstEnter
)
{
if
(
!
this
.
firstEnter
)
{
...
@@ -81,13 +85,29 @@ export default {
...
@@ -81,13 +85,29 @@ export default {
},
},
monthChange
(
e
)
{
monthChange
(
e
)
{
console
.
log
(
'monthChange'
,
e
);
console
.
log
(
'monthChange'
,
e
);
let
{
date
}
=
e
this
.
month
=
this
.
parseTime
(
date
,
'{y}-{m}'
)
+
'-01'
;
this
.
getSignList
()
},
},
chooseMonth
(
selDate
)
{
chooseMonth
(
selDate
)
{
console
.
log
(
'selDate'
,
selDate
);
console
.
log
(
'selDate'
,
selDate
);
let
{
date
}
=
e
this
.
month
=
this
.
parseTime
(
date
,
'{y}-{m}'
)
+
'-01'
;
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
(){
try
{
let
params
=
{
month
:
this
.
month
}
let
res
=
await
getSign
(
params
)
}
catch
(
e
){
//TODO handle the exception
}
}
}
}
}
};
};
...
...
uni_modules/lunc-calendar/components/lunc-calendar/lunc-calendar.vue
View file @
c3bdde9a
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
</view>
</view>
</picker>
</picker>
</view>
</view>
<view
class=
"head-icon head-icon-right"
@
click=
"$u.throttle(goNextMonth, 500)"
v-if=
"shouChangeBtn"
><u-icon
name=
"arrow-right"
size=
"26"
></u-icon></view>
<view
class=
"head-icon head-icon-right"
@
click=
"$u.throttle(goNextMonth, 500)"
v-if=
"shouChangeBtn"
><u-icon
name=
"arrow-right"
size=
"26"
></u-icon></view>
<!--
<view
class=
"go-to-today"
v-show=
"showToday"
@
click=
"goToday"
>
回到今天
</view>
-->
<!--
<view
class=
"go-to-today"
v-show=
"showToday"
@
click=
"goToday"
>
回到今天
</view>
-->
</view>
</view>
...
@@ -114,7 +114,7 @@ export default {
...
@@ -114,7 +114,7 @@ export default {
allDataArr
:
[],
//轮播数组
allDataArr
:
[],
//轮播数组
tranIndex
:
1
,
//轮播所在位置
tranIndex
:
1
,
//轮播所在位置
selDate
:
{},
//当前轮播日期信息 -> year, month, day, week
selDate
:
{},
//当前轮播日期信息 -> year, month, day, week
selectDate
:{},
//当前选中的日期信息
selectDate
:
{},
//当前选中的日期信息
today
:
{},
//今天日期 -> year, month, day, week
today
:
{},
//今天日期 -> year, month, day, week
tranDuration
:
500
,
//轮播时间(单位毫秒)
tranDuration
:
500
,
//轮播时间(单位毫秒)
showToday
:
false
,
//显示回到今天(非当月才显示)
showToday
:
false
,
//显示回到今天(非当月才显示)
...
@@ -162,6 +162,9 @@ export default {
...
@@ -162,6 +162,9 @@ export default {
month
:
nd
.
getMonth
()
+
1
,
month
:
nd
.
getMonth
()
+
1
,
day
:
nd
.
getDate
()
day
:
nd
.
getDate
()
};
};
this
.
$emit
(
'chooseMonth'
,{
date
:
year
+
'-'
+
month
+
'-'
+
day
})
this
.
initDateTime
(
date
);
this
.
initDateTime
(
date
);
},
},
setPickValue
()
{
setPickValue
()
{
...
@@ -287,7 +290,8 @@ export default {
...
@@ -287,7 +290,8 @@ export default {
this
.
$emit
(
'monthChange'
,
{
this
.
$emit
(
'monthChange'
,
{
year
:
new
Date
().
getFullYear
(),
year
:
new
Date
().
getFullYear
(),
month
:
new
Date
().
getMonth
()
+
1
,
month
:
new
Date
().
getMonth
()
+
1
,
type
:
'today'
type
:
'today'
,
date
:
this
.
date
});
});
},
},
//点击上月按钮
//点击上月按钮
...
@@ -317,7 +321,8 @@ export default {
...
@@ -317,7 +321,8 @@ export default {
this
.
$emit
(
'monthChange'
,
{
this
.
$emit
(
'monthChange'
,
{
year
:
preMonth
.
year
,
year
:
preMonth
.
year
,
month
:
preMonth
.
month
,
month
:
preMonth
.
month
,
type
:
'pre'
type
:
'pre'
,
date
:
this
.
date
});
});
},
},
//获取下下月数据
//获取下下月数据
...
@@ -333,7 +338,8 @@ export default {
...
@@ -333,7 +338,8 @@ export default {
this
.
$emit
(
'monthChange'
,
{
this
.
$emit
(
'monthChange'
,
{
year
:
nextMonth
.
year
,
year
:
nextMonth
.
year
,
month
:
nextMonth
.
month
,
month
:
nextMonth
.
month
,
type
:
'next'
type
:
'next'
,
date
:
this
.
date
});
});
},
},
//获取上月的月份
//获取上月的月份
...
@@ -406,7 +412,7 @@ export default {
...
@@ -406,7 +412,7 @@ export default {
// 仅点击天数时返回日期
// 仅点击天数时返回日期
if
(
flag
)
{
if
(
flag
)
{
this
.
$emit
(
'dayChange'
,
returnData
);
this
.
$emit
(
'dayChange'
,
returnData
);
this
.
selectDate
=
returnData
this
.
selectDate
=
returnData
;
}
}
this
.
setPickValue
();
this
.
setPickValue
();
}
}
...
@@ -433,7 +439,7 @@ export default {
...
@@ -433,7 +439,7 @@ export default {
line-height
:
80rpx
;
line-height
:
80rpx
;
margin
:
0
40rpx
;
margin
:
0
40rpx
;
}
}
.head-month-inner
{
.head-month-inner
{
width
:
100%
;
width
:
100%
;
line-height
:
80rpx
;
line-height
:
80rpx
;
}
}
...
...
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