Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8227837f
authored
Jan 07, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工资
1 parent
9818363b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
454 additions
and
7 deletions
components/HomeFrame/components/Income/Calendar.vue
components/HomeFrame/components/Income/History.vue
components/HomeFrame/components/Income/Password.vue
components/HomeFrame/components/Income/Promotion.vue
components/HomeFrame/components/Income/index.vue
components/HomeFrame/components/Point.vue
components/HomeFrame/index.vue
components/HomeFrame/components/Income/Calendar.vue
0 → 100644
View file @
8227837
<
template
>
<view
class=
"calendar-container"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
<view
class=
"title"
><text>
本月出勤
</text></view>
</view>
<view
class=
"calendar-box"
>
<view
class=
"calendar-years"
>
<view
class=
"calendar-year"
>
{{
year
}}
年
{{
month
}}
月
</view>
</view>
<view
class=
"calendar-body"
>
<view
class=
"calendar-weekdays"
>
<view
class=
"calendar-weekday"
v-for=
"weekday in weekdays"
:key=
"weekday"
>
{{
weekday
}}
</view>
</view>
<view
class=
"calendar-dates"
>
<view
class=
"calendar-date"
v-for=
"(date, index) in dates"
:key=
"index"
>
<template
v-if=
"date"
>
<view
class=
"date-num"
>
{{
date
}}
</view>
<!--
<view
class=
"date-desc"
>
出勤
</view>
-->
<view
class=
"date-desc date-card"
>
未打卡
</view>
</
template
>
</view>
</view>
</view>
</view>
</view>
</template>
<
script
>
export
default
{
name
:
'calendar'
,
props
:
{
// 是否显示周标题
showWeekdays
:
{
type
:
Boolean
,
default
:
true
},
open
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
// 当前所处日期 年月日
nowDate
:
'7'
,
datesd
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
],
// 当前所处年
year
:
new
Date
().
getFullYear
(),
// 当前所处月
month
:
new
Date
().
getMonth
()
+
1
,
weekdays
:
[
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'日'
],
showNextMonth
:
true
//是否显示查看下个月操作箭头,暂时只能看后一个月
}
},
computed
:
{
dates
()
{
const
firstDayOfMonth
=
new
Date
(
this
.
year
,
this
.
month
-
1
,
1
)
const
lastDayOfMonth
=
new
Date
(
this
.
year
,
this
.
month
,
0
)
const
dates
=
[]
for
(
let
i
=
0
,
len
=
this
.
datesd
.
length
;
i
<
len
;
i
++
)
{
dates
.
push
(
this
.
datesd
[
i
])
}
if
(
firstDayOfMonth
.
getDay
()
==
0
)
{
// 第一行只有一天的情况
for
(
let
i
=
1
;
i
<=
6
;
i
++
)
{
dates
.
unshift
(
null
)
}
}
else
{
for
(
let
i
=
1
;
i
<
firstDayOfMonth
.
getDay
();
i
++
)
{
dates
.
unshift
(
null
)
}
}
console
.
log
(
dates
)
return
dates
}
},
watch
:
{
// month: {
// handler() {
// // 日期格式化获取当前月份
// const todayMonth = uni.$jy.formatDate(new Date(), 'M')
// // 日期格式化获取当前年
// const y = uni.$jy.formatDate(new Date(), 'YYYY')
// if (Number(todayMonth) == 12) {
// if (this.year > Number(y)) {
// this.showNextMonth = false
// return
// }
// }
// if (Number(y) < this.year) {
// this.showNextMonth = true
// return
// }
// if (Number(y) == this.year) {
// if (this.month < Number(todayMonth)) {
// this.showNextMonth = true
// return
// }
// let a = Math.abs(this.month - Number(todayMonth))
// if (a == 1) {
// this.showNextMonth = false
// return
// }
// }
// this.showNextMonth = true
// return
// }
// }
},
methods
:
{
/* 上个月 */
prevMonth
()
{
if
(
this
.
month
===
1
)
{
this
.
year
-=
1
this
.
month
=
12
}
else
{
this
.
month
-=
1
}
let
callMonth
=
this
.
month
>=
10
?
String
(
this
.
month
)
:
'0'
+
String
(
this
.
month
)
let
callBackDate
=
String
(
this
.
year
)
+
'-'
+
callMonth
this
.
$emit
(
'prev'
,
callBackDate
)
},
/* 下个月 */
nextMonth
()
{
if
(
this
.
month
===
12
)
{
this
.
year
+=
1
this
.
month
=
1
}
else
{
this
.
month
+=
1
}
let
callMonth
=
this
.
month
>=
10
?
String
(
this
.
month
)
:
'0'
+
String
(
this
.
month
)
let
callBackDate
=
String
(
this
.
year
)
+
'-'
+
callMonth
this
.
$emit
(
'next'
,
callBackDate
)
},
/** 回显每日日期文本
* @param {Object} date
*/
isTodayText
(
date
)
{
if
(
date
===
this
.
nowDate
)
{
return
'今天'
}
// return uni.$jy.formatDate(date, 'D')
},
/* 每日点击事件 */
itemHandle
(
item
)
{
this
.
$emit
(
'item-cilck'
,
item
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.nav-bar
{
width
:
100%
;
height
:
96
rpx
;
margin-top
:
48
rpx
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
pointer-events
:
auto
;
}
.title
{
font-weight
:
700
;
font-size
:
32
rpx
;
color
:
#1a1a1a
;
flex
:
1
;
text-align
:
center
;
text
{
margin-left
:
-96
rpx
;
}
}
}
.calendar-box
{
width
:
calc
(
100vw
-
128
rpx
);
margin
:
30
rpx
auto
0
;
height
:
calc
(
100vh
-
220
rpx
);
background
:
#ffffff
;
border-radius
:
48
rpx
;
padding
:
64
rpx
;
box-sizing
:
border-box
;
.calendar-years
{
color
:
#1a1a1a
;
font-size
:
64
rpx
;
font-weight
:
600
;
}
.calendar-weekdays
{
display
:
flex
;
height
:
80
rpx
;
margin-top
:
30
rpx
;
.calendar-weekday
{
flex
:
1
;
font-size
:
28
rpx
;
color
:
#808291
;
text-align
:
right
;
}
}
.calendar-dates
{
display
:
flex
;
flex-wrap
:
wrap
;
.calendar-date
{
width
:
calc
(
100%
/
7
);
height
:
calc
((
100vh
-
550
rpx
)
/
5
);
padding
:
32
rpx
;
box-sizing
:
border-box
;
border
:
2
rpx
solid
#808291
;
+
.calendar-date
{
border-left
:
none
;
border-top
:
none
;
}
&
:nth-child
(
7n
+
1
)
{
border-left
:
2
rpx
solid
#808291
;
}
&
:nth-child
(
-n
+
7
)
{
border-top
:
2
rpx
solid
#808291
;
}
.date-desc
{
position
:
relative
;
font-size
:
26
rpx
;
margin-top
:
30
rpx
;
padding-left
:
30
rpx
;
&::before
{
content
:
''
;
position
:
absolute
;
width
:
12
rpx
;
top
:
12
rpx
;
left
:
0
rpx
;
height
:
12
rpx
;
background
:
#2cca74
;
border-radius
:
50%
;
}
&
.date-card
{
color
:
#eb4e4e
;
&::before
{
background
:
#eb4e4e
;
}
}
}
}
}
}
</
style
>
components/HomeFrame/components/Income/History.vue
0 → 100644
View file @
8227837
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-07 13:57:40
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<view
class=
"history-container"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
<view
class=
"title"
><text>
历史收入记录
</text></view>
</view>
<view
class=
"history-box"
>
<view
class=
"chart-box"
></view>
<view
class=
"income-box"
></view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.nav-bar
{
width
:
100%
;
height
:
96
rpx
;
margin-top
:
48
rpx
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
pointer-events
:
auto
;
}
.title
{
font-weight
:
700
;
font-size
:
32
rpx
;
color
:
#1a1a1a
;
flex
:
1
;
text-align
:
center
;
text
{
margin-left
:
-96
rpx
;
}
}
}
.history-box
{
width
:
calc
(
100vw
-
128
rpx
);
margin
:
30
rpx
auto
0
;
height
:
calc
(
100vh
-
220
rpx
);
box-sizing
:
border-box
;
display
:
flex
;
.chart-box
{
background
:
#ffffff
;
border-radius
:
48
rpx
;
flex
:
1
;
}
.income-box
{
background-image
:
linear-gradient
(
180deg
,
#faf9f7
0%
,
#ffffff
28%
);
border
:
4
rpx
solid
#ffffff
;
box-shadow
:
inset
0
4
rpx
8
rpx
0
#ffffff80
;
border-radius
:
48
rpx
;
width
:
648
rpx
;
margin-left
:
48
rpx
;
}
}
</
style
>
components/HomeFrame/components/Income/Password.vue
0 → 100644
View file @
8227837
File mode changed
components/HomeFrame/components/Income/Promotion.vue
0 → 100644
View file @
8227837
<
template
>
<view
class=
"calendar-container"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
<view
class=
"title"
><text>
晋升介绍
</text></view>
</view>
<view
class=
"calendar-box"
></view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.nav-bar
{
width
:
100%
;
height
:
96
rpx
;
margin-top
:
48
rpx
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
pointer-events
:
auto
;
}
.title
{
font-weight
:
700
;
font-size
:
32
rpx
;
color
:
#1a1a1a
;
flex
:
1
;
text-align
:
center
;
text
{
margin-left
:
-96
rpx
;
}
}
}
.calendar-box
{
width
:
calc
(
100vw
-
128
rpx
);
margin
:
30
rpx
auto
0
;
height
:
calc
(
100vh
-
220
rpx
);
background
:
#ffffff
;
border-radius
:
48
rpx
;
padding
:
64
rpx
;
box-sizing
:
border-box
;
}
</
style
>
components/HomeFrame/components/Income/index.vue
0 → 100644
View file @
8227837
<
template
>
<view
class=
"income-container"
>
<view
class=
"income-body"
>
<view
class=
"income-store"
>
<view
class=
"store-header"
></view>
<view
class=
"my-store"
></view>
</view>
<view
class=
"income-item"
></view>
<view
class=
"income-item"
></view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.income-container
{
padding-right
:
66
rpx
;
}
.income-body
{
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
column-gap
:
48
rpx
;
height
:
calc
(
100vh
-
260
rpx
);
margin-top
:
32
rpx
;
.income-store
{
.my-store
{
background-image
:
linear-gradient
(
180deg
,
#f4fbfe
0%
,
#ffffff
50%
);
border
:
4
rpx
solid
#ffffff
;
box-shadow
:
inset
0
4
rpx
8
rpx
0
rgba
(
255
,
255
,
255
,
0.5
);
border-radius
:
48
rpx
;
height
:
50vh
;
}
}
.income-item
{
height
:
100%
;
background-image
:
linear-gradient
(
180deg
,
#faf9f7
0%
,
#ffffff
28%
);
border
:
4
rpx
solid
#ffffff
;
box-shadow
:
inset
0
4
rpx
8
rpx
0
rgba
(
255
,
255
,
255
,
0.5
);
border-radius
:
48
rpx
;
}
}
</
style
>
components/HomeFrame/components/Point.vue
View file @
8227837
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-0
6 15:35:1
8
* @LastEditTime: 2025-01-0
7 10:22:2
8
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -11,20 +11,24 @@
...
@@ -11,20 +11,24 @@
<view
class=
"tab-box"
>
<view
class=
"tab-box"
>
<view
@
click=
"selectTab(index)"
:class=
"
{ 'tab-item': true, active: activeIndex == index }" v-for="(i, index) in tabList" :key="index">
{{
i
.
name
}}
</view>
<view
@
click=
"selectTab(index)"
:class=
"
{ 'tab-item': true, active: activeIndex == index }" v-for="(i, index) in tabList" :key="index">
{{
i
.
name
}}
</view>
</view>
</view>
<
point></poi
nt>
<
component
:is=
"tabName"
></compone
nt>
</view>
</view>
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
Point
from
'./Point/index.vue'
import
Point
from
'./Point/index.vue'
import
Income
from
'./Income/index.vue'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
components
:
{
Point
Point
,
Income
},
},
data
()
{
data
()
{
return
{
return
{
activeIndex
:
1
,
activeIndex
:
0
,
componentList
:[
'Point'
,
'Income'
],
tabName
:
'Point'
,
tabList
:[{
tabList
:[{
name
:
'积分权益'
,
name
:
'积分权益'
,
},{
},{
...
@@ -35,6 +39,7 @@ export default {
...
@@ -35,6 +39,7 @@ export default {
methods
:
{
methods
:
{
selectTab
(
index
){
selectTab
(
index
){
this
.
activeIndex
=
index
this
.
activeIndex
=
index
this
.
tabName
=
this
.
componentList
[
index
]
}
}
},
},
}
}
...
...
components/HomeFrame/index.vue
View file @
8227837
...
@@ -69,9 +69,12 @@ import rulePoint from './components/Point/RulePoint.vue'
...
@@ -69,9 +69,12 @@ import rulePoint from './components/Point/RulePoint.vue'
import
LevelPoint
from
'./components/Point/LevelPoint.vue'
import
LevelPoint
from
'./components/Point/LevelPoint.vue'
import
Course
from
'./components/Point/Course.vue'
import
Course
from
'./components/Point/Course.vue'
import
Ranking
from
'./components/Point/Ranking.vue'
import
Ranking
from
'./components/Point/Ranking.vue'
import
Calendar
from
'./components/Income/Calendar.vue'
import
Promotion
from
'./components/Income/Promotion.vue'
import
History
from
'./components/Income/History.vue'
export
default
{
export
default
{
mixins
:
[
myClick
,
uploader
],
mixins
:
[
myClick
,
uploader
],
components
:
{
RecordList
,
CustomerFile
,
LeftSide
,
Point
,
dayPoint
,
rulePoint
,
Course
,
Ranking
,
LevelPoint
},
components
:
{
RecordList
,
CustomerFile
,
LeftSide
,
Point
,
dayPoint
,
rulePoint
,
Course
,
Ranking
,
LevelPoint
,
Calendar
,
Promotion
,
History
},
props
:
{
props
:
{
id
:
[
String
,
Number
],
id
:
[
String
,
Number
],
finishDoneText
:
String
,
finishDoneText
:
String
,
...
@@ -83,8 +86,8 @@ export default {
...
@@ -83,8 +86,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
transfer
:
''
,
transfer
:
''
,
showHome
:
tru
e
,
showHome
:
fals
e
,
pointComponentName
:
'
dayPoint
'
,
pointComponentName
:
'
History
'
,
userInfo
:
{},
userInfo
:
{},
tabIndex
:
0
tabIndex
:
0
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment