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 044f50d0
authored
Jan 14, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
通信
1 parent
e5e57fc6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
147 additions
and
114 deletions
components/HomeFrame/components/Income/DayTips.vue
components/HomeFrame/components/Income/History.vue
components/HomeFrame/components/Income/MyStore.vue
components/HomeFrame/components/Income/Question.vue
components/HomeFrame/components/Income/index.vue
mixin/point.js
utils/recordManager/index.js
ws/workers/AddRecordWorker.js
components/HomeFrame/components/Income/DayTips.vue
View file @
044f50d
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 09:51:43
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-1
3 20:29:45
* @LastEditTime: 2025-01-1
4 17:00:03
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -292,6 +292,9 @@ export default {
handler
(
val
)
{
const
{
merchantId
,
sceneType
,
jobType
,
configCarType
,
goodsTypeList
,
shouldToShopCount
}
=
val
let
flag
=
false
if
(
goodsTypeList
.
length
==
0
)
{
flag
=
true
}
goodsTypeList
.
forEach
(
i
=>
{
if
(
!
i
.
subOrderCount
||
!
i
.
totalPrice
)
{
flag
=
true
...
...
@@ -341,7 +344,7 @@ export default {
this
.
selectKey
=
''
},
getDetail
()
{
const
{
phone
:
staffPhone
,
merchantId
}
=
uni
.
$storage
.
get
(
'userInfo'
)
const
{
phone
:
staffPhone
,
shopMerchantId
:
merchantId
}
=
uni
.
$storage
.
get
(
'userInfo'
)
uni
.
$api
.
pointApi
.
getTipsMessage
({
staffPhone
,
merchantId
}).
then
(
res
=>
{
this
.
tipsList
=
res
||
[]
})
...
...
@@ -447,7 +450,7 @@ export default {
.tips-item
{
padding
:
30
rpx
32
rpx
;
width
:
100%
;
height
:
384
rpx
;
min-
height
:
384
rpx
;
background
:
#ffffff
b3
;
border-radius
:
24
rpx
;
margin-top
:
32
rpx
;
...
...
components/HomeFrame/components/Income/History.vue
View file @
044f50d
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-1
3 16:16:13
* @LastEditTime: 2025-01-1
4 14:03:08
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -27,7 +27,7 @@
</view>
<view
class=
"income-box"
>
<view
class=
"income-header"
>
<text>
{{
year
-
1
}}
年
8
月收入
</text>
<text>
{{
year
-
1
}}
年
{{
monthStr
}}
月收入
</text>
</view>
<view
class=
"income-tips"
>
<view
class=
"sprite-icon icon-tips-b"
></view>
...
...
@@ -91,6 +91,7 @@ export default {
],
width
:
600
,
height
:
420
,
monthStr
:
''
,
canPersent
:
[],
//百分比数组
listIndex
:
0
...
...
@@ -199,6 +200,7 @@ export default {
if
(
this
.
canvasList
[
i
].
num
)
{
this
.
showChart
(
i
)
// 重新绘制图表,如果需要更新显示
const
month
=
this
.
canvasList
[
i
].
date
.
replace
(
/
\D
+/
,
''
)
this
.
monthStr
=
month
this
.
monthSalaryDetail
(
this
.
year
-
1
+
'-'
+
month
)
}
...
...
@@ -254,7 +256,7 @@ export default {
continue
}
// 柱状图上的数据
ctx
.
fillText
(
this
.
canvasList
[
i
].
num
,
33
+
gap
*
i
,
this
.
height
-
this
.
canPersent
[
i
]
-
15
)
ctx
.
fillText
(
this
.
canvasList
[
i
].
num
,
15
+
gap
*
i
,
this
.
height
-
this
.
canPersent
[
i
]
-
15
)
// if (this.canPersent[i] == 0) {
// i++
...
...
components/HomeFrame/components/Income/MyStore.vue
View file @
044f50d
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-10 14:54:29
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-1
3 16:23:05
* @LastEditTime: 2025-01-1
4 16:30:24
* @FilePath: \gl-tape\components\HomeFrame\components\Income\MyStore.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -218,7 +218,7 @@ export default {
},
methods
:
{
getDetail
(
salaryMonth
)
{
uni
.
$api
.
pointApi
.
monthSalaryDetail
({
salaryMonth
}).
then
(
res
=>
{
uni
.
$api
.
pointApi
.
monthSalaryDetail
({
salaryMonth
:
`
${
this
.
year
}
-
${(
this
.
month
+
''
).
padStart
(
2
,
'0'
)}
`
,
calculationDataFlag
:
'Y'
}).
then
(
res
=>
{
this
.
salaryDetail
=
res
||
{}
})
console
.
log
(
this
.
salaryDetail
,
'salaryDetail'
)
...
...
@@ -303,99 +303,99 @@ export default {
<
style
scoped
lang=
"scss"
>
.store-container
{
padding-top
:
32
rpx
;
padding-top
:
toRpx
(
32
)
;
.store-header
{
padding
:
0
36
rpx
;
padding
:
0
toRpx
(
36
)
;
text
{
font-size
:
32
rpx
;
font-size
:
toRpx
(
32
)
;
margin-top
:
-6
rpx
;
color
:
#1a1a1a
;
}
.tab-box
{
margin-left
:
auto
;
width
:
212
rpx
;
height
:
60
rpx
;
width
:
toRpx
(
212
)
;
height
:
toRpx
(
60
)
;
background
:
#f0f6ff00
;
border
:
2
rpx
solid
#e9ecf2
;
border-radius
:
430
rpx
;
border
:
toRpx
(
2
)
solid
#e9ecf2
;
border-radius
:
toRpx
(
430
)
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.tab-item
{
font-size
:
26
rpx
;
font-size
:
toRpx
(
26
)
;
color
:
#666666
;
text-align
:
center
;
width
:
50%
;
&.active
{
width
:
100
rpx
;
height
:
48
rpx
;
line-height
:
48
rpx
;
width
:
toRpx
(
100
)
;
height
:
toRpx
(
48
)
;
line-height
:
toRpx
(
48
)
;
background
:
#ffffff
;
border-radius
:
462
rpx
;
border-radius
:
toRpx
(
462
)
;
color
:
#2d66f7
;
}
}
}
.select-store
{
margin-left
:
38
rpx
;
width
:
336
rpx
;
height
:
60
rpx
;
margin-left
:
toRpx
(
38
)
;
width
:
toRpx
(
336
)
;
height
:
toRpx
(
60
)
;
background
:
#f0f6ff00
;
border
:
2
rpx
solid
#dde9fb
;
border-radius
:
12
rpx
;
padding
:
0
20
rpx
;
border
:
toRpx
(
2
)
solid
#dde9fb
;
border-radius
:
toRpx
(
12
)
;
padding
:
0
toRpx
(
20
)
;
&.ml-auto
{
margin-left
:
auto
;
}
.store-name
{
width
:
260
rpx
;
width
:
toRpx
(
260
)
;
}
.up-icon
{
border-right
:
10
rpx
solid
transparent
;
border-left
:
10
rpx
solid
transparent
;
border-top
:
10
rpx
solid
#000000
;
border-right
:
toRpx
(
10
)
solid
transparent
;
border-left
:
toRpx
(
10
)
solid
transparent
;
border-top
:
toRpx
(
10
)
solid
#000000
;
/* 箭头颜色 */
}
}
}
.store-body
{
padding
:
0
36
rpx
;
margin-top
:
40
rpx
;
padding
:
0
toRpx
(
36
)
;
margin-top
:
toRpx
(
40
)
;
.total-box
{
width
:
20%
;
padding-left
:
30
rpx
;
padding-left
:
toRpx
(
30
)
;
.total-title
{
font-size
:
28
rpx
;
font-size
:
toRpx
(
28
)
;
color
:
#181a1f
;
line-height
:
36
rpx
;
line-height
:
toRpx
(
36
)
;
}
.total-num
{
font-size
:
48
rpx
;
font-size
:
toRpx
(
48
)
;
color
:
#3773f8
;
font-weight
:
600
;
margin-top
:
16
rpx
;
margin-top
:
toRpx
(
16
)
;
text
{
font-size
:
22
rpx
;
font-size
:
toRpx
(
22
)
;
}
}
.total-time
{
margin-top
:
64
rpx
;
font-size
:
24
rpx
;
margin-top
:
toRpx
(
64
)
;
font-size
:
toRpx
(
24
)
;
color
:
#808291
;
}
}
...
...
@@ -405,18 +405,18 @@ export default {
overflow-x
:
auto
;
.month-box
{
margin-left
:
40
rpx
;
margin-left
:
toRpx
(
40
)
;
flex
:
1
;
min-width
:
calc
(
50%
-
40
rpx
);
padding
:
32
rpx
;
min-width
:
calc
(
50%
-
#{
toRpx
(
40
)}
);
padding
:
toRpx
(
32
)
;
background
:
#ffffff
;
border-radius
:
24
rpx
;
border-radius
:
toRpx
(
24
)
;
.month-header
{
text
{
font-size
:
24
rpx
;
font-size
:
toRpx
(
24
)
;
color
:
#808291
;
margin-left
:
16
rpx
;
margin-left
:
toRpx
(
16
)
;
}
}
...
...
@@ -425,23 +425,23 @@ export default {
min-width
:
50%
;
&:last-child
{
margin-left
:
30
rpx
;
margin-left
:
toRpx
(
30
)
;
}
.value-title
{
font-size
:
24
rpx
;
font-size
:
toRpx
(
24
)
;
color
:
#adb0b8
;
line-height
:
36
rpx
;
line-height
:
toRpx
(
36
)
;
}
.value-price
{
font-size
:
32
rpx
;
font-size
:
toRpx
(
32
)
;
color
:
#181a1f
;
line-height
:
60
rpx
;
margin-left
:
4
rpx
;
line-height
:
toRpx
(
60
)
;
margin-left
:
toRpx
(
4
)
;
text
{
font-size
:
24
rpx
;
font-size
:
toRpx
(
24
)
;
}
}
}
...
...
@@ -449,22 +449,22 @@ export default {
.value-detail
{
background
:
#ffffff
;
border-radius
:
16
rpx
;
border-radius
:
toRpx
(
16
)
;
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
margin-top
:
16
rpx
;
margin-top
:
toRpx
(
16
)
;
.detail-item
{
.detail-label
{
font-size
:
24
rpx
;
font-size
:
toRpx
(
24
)
;
color
:
#adb0b8
;
line-height
:
36
rpx
;
line-height
:
toRpx
(
36
)
;
}
.detail-num
{
font-size
:
32
rpx
;
font-size
:
toRpx
(
32
)
;
color
:
#292d33
;
line-height
:
48
rpx
;
line-height
:
toRpx
(
48
)
;
}
}
}
...
...
@@ -473,71 +473,71 @@ export default {
}
.income-body
{
margin-top
:
48
rpx
;
margin-top
:
toRpx
(
48
)
;
background
:
#ffffff
;
border
:
4
rpx
solid
#ffffff
;
border
:
toRpx
(
4
)
solid
#ffffff
;
box-shadow
:
0
0
40
rpx
-8
rpx
#5182cc33
,
inset
0
4
rpx
8
rpx
0
#ffffff80
;
border-radius
:
48
rpx
;
padding
:
32
rpx
36
rpx
;
0
0
toRpx
(
40
)
-8
rpx
#5182cc33
,
inset
0
toRpx
(
4
)
toRpx
(
8
)
0
#ffffff80
;
border-radius
:
toRpx
(
48
)
;
padding
:
toRpx
(
32
)
toRpx
(
36
)
;
.income-header
{
text
{
font-size
:
32
rpx
;
font-size
:
toRpx
(
32
)
;
margin-top
:
-6
rpx
;
color
:
#1a1a1a
;
}
.history-box
{
margin-left
:
auto
;
width
:
184
rpx
;
height
:
60
rpx
;
width
:
toRpx
(
184
)
;
height
:
toRpx
(
60
)
;
background
:
#ffffff
;
border
:
2
rpx
solid
#edeff2
;
border-radius
:
30
rpx
;
border
:
toRpx
(
2
)
solid
#edeff2
;
border-radius
:
toRpx
(
30
)
;
text
{
font-size
:
26
rpx
;
font-size
:
toRpx
(
26
)
;
color
:
#808291
;
margin-left
:
8
rpx
;
margin-left
:
toRpx
(
8
)
;
}
}
}
.income-panel
{
height
:
152
rpx
;
height
:
toRpx
(
152
)
;
width
:
100%
;
padding
:
24
rpx
48
rpx
;
padding
:
toRpx
(
24
)
toRpx
(
48
)
;
background-image
:
linear-gradient
(
180deg
,
#e6f1ff
0%
,
#f9fcff
100%
);
border
:
2
rpx
solid
#ffffff
;
box-shadow
:
inset
0
4
rpx
8
rpx
0
#ffffff80
;
border-radius
:
24
rpx
;
border
:
toRpx
(
2
)
solid
#ffffff
;
box-shadow
:
inset
0
toRpx
(
4
)
toRpx
(
8
)
0
#ffffff80
;
border-radius
:
toRpx
(
24
)
;
box-sizing
:
border-box
;
.panel-up
{
font-size
:
28
rpx
;
font-size
:
toRpx
(
28
)
;
color
:
#808291
;
.time
{
margin-left
:
auto
;
font-size
:
24
rpx
;
font-size
:
toRpx
(
24
)
;
color
:
#808291
;
}
text
{
margin
:
0
16
rpx
;
margin
:
0
toRpx
(
16
)
;
}
}
.panel-bottom
{
font-weight
:
600
;
font-size
:
40
rpx
;
font-size
:
toRpx
(
40
)
;
color
:
#181a1f
;
margin-top
:
10
rpx
;
margin-top
:
toRpx
(
10
)
;
text
{
font-size
:
28
rpx
;
font-size
:
toRpx
(
28
)
;
}
}
}
...
...
@@ -545,56 +545,56 @@ export default {
.income-detail
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
40
rpx
96
rpx
;
padding
:
30
rpx
;
gap
:
toRpx
(
40
)
toRpx
(
96
)
;
padding
:
toRpx
(
30
)
;
.income-detail-item
{
width
:
calc
(
50%
-
96
rpx
);
width
:
calc
(
50%
-
#{
toRpx
(
96
)}
);
.item-label
{
font-weight
:
300
;
font-size
:
26
rpx
;
font-size
:
toRpx
(
26
)
;
color
:
#181a1f
;
margin
:
0
10
rpx
0
16
rpx
;
margin
:
0
toRpx
(
10
)
0
toRpx
(
16
)
;
}
.item-value
{
font-size
:
30
rpx
;
font-size
:
toRpx
(
30
)
;
color
:
#181a1f
;
margin-left
:
auto
;
}
.item-next
{
margin-left
:
24
rpx
;
margin-left
:
toRpx
(
24
)
;
width
:
0
;
height
:
0
;
border-left
:
10
rpx
solid
#808291
;
border-bottom
:
10
rpx
solid
transparent
;
border-top
:
10
rpx
solid
transparent
;
border-left
:
toRpx
(
10
)
solid
#808291
;
border-bottom
:
toRpx
(
10
)
solid
transparent
;
border-top
:
toRpx
(
10
)
solid
transparent
;
/* 箭头颜色 */
}
}
}
.income-footer
{
font-size
:
24
rpx
;
font-size
:
toRpx
(
24
)
;
color
:
#808291
;
padding-left
:
40
rpx
;
padding-bottom
:
60
rpx
;
padding-left
:
toRpx
(
40
)
;
padding-bottom
:
toRpx
(
60
)
;
}
}
.store-footer
{
margin-top
:
40
rpx
;
margin-top
:
toRpx
(
40
)
;
.store-btn
{
width
:
100%
;
height
:
80
rpx
;
height
:
toRpx
(
80
)
;
background-image
:
linear-gradient
(
180deg
,
#61c0ff
0%
,
#2c66f7
100%
);
box-shadow
:
inset
0
0
32
rpx
0
#ffffff80
;
border-radius
:
16
rpx
;
line-height
:
80
rpx
;
font-size
:
28
rpx
;
box-shadow
:
inset
0
0
toRpx
(
32
)
0
#ffffff80
;
border-radius
:
toRpx
(
16
)
;
line-height
:
toRpx
(
80
)
;
font-size
:
toRpx
(
28
)
;
color
:
#ffffff
;
text-align
:
center
;
}
...
...
components/HomeFrame/components/Income/Question.vue
View file @
044f50d
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-14 11:25:37
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-14 13:48:52
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Question.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<Tips
@
close=
"close"
v-if=
"show"
width=
"1288rpx"
:title=
"detail.label"
>
<view
class=
"dailog-body"
slot=
"content"
>
...
...
@@ -10,17 +18,17 @@
</view>
</view>
<template
v-if=
"detail.base"
>
<view
class=
"base-line"
>
<view
class=
"base-line
flex
"
>
<view
class=
"base-label"
>
职级工资
</view>
<view
class=
"base-times"
>
(初级销售)
</view>
<view
class=
"base-value"
>
3,500
</view>
</view>
<view
class=
"base-line"
>
<view
class=
"base-line
flex
"
>
<view
class=
"base-label"
>
应出勤天数
</view>
<view
class=
"base-times"
>
(本月31-4)
</view>
<view
class=
"base-value"
>
27天
</view>
</view>
<view
class=
"base-line"
>
<view
class=
"base-line
flex
"
>
<view
class=
"base-label"
>
实际出勤天数
</view>
<view
class=
"base-times"
>
(截至2025-1-6)
</view>
<view
class=
"base-value"
>
22天
</view>
...
...
@@ -74,6 +82,16 @@ export default {
color
:
#808291
;
}
}
.base-line
{
font-size
:
32
rpx
;
color
:
#1a1a1a
;
line-height
:
50
rpx
;
.base-times
{
margin-left
:
auto
;
color
:
#808291
;
margin-right
:
32
rpx
;
}
}
.dailog-desc
{
font-size
:
32
rpx
;
color
:
#808291
;
...
...
components/HomeFrame/components/Income/index.vue
View file @
044f50d
...
...
@@ -88,7 +88,8 @@ export default {
if
(
res
.
configFlag
==
0
||
(
res
.
configFlag
==
2
&&
phoneList
.
includes
(
phone
)))
{
this
.
isShow
=
true
}
else
{
// return
this
.
isShow
=
false
return
}
this
.
incomeCalculation
()
this
.
start
()
...
...
@@ -121,7 +122,7 @@ export default {
* 点击页面时,清除定时器
*/
handleTouch
()
{
clearInterval
(
this
.
interval
)
this
.
times
=
0
},
close
()
{
this
.
$emit
(
'selectTab'
,
0
)
...
...
mixin/point.js
View file @
044f50d
...
...
@@ -6,7 +6,8 @@ export default {
label
:
'基本工资'
,
icon
:
'jbgz-icon'
,
content
:
'基本工资 = 职级工资÷应出勤天数×实际出勤天数'
,
value
:
'basicSalary'
value
:
'actualBasicSalary'
,
base
:
true
},
{
label
:
'退单冲减'
,
...
...
utils/recordManager/index.js
View file @
044f50d
/*
* @Descripttion:
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2024-06-28 17:12:39
* @LastEditors:
limi
n
* @LastEditTime: 2025-01-
06 09:35:55
* @LastEditors:
前端 qianduan01@didihu.com.c
n
* @LastEditTime: 2025-01-
14 16:56:37
* @FilePath: \gl_tape\utils\recordManager\index.js
*/
// import { singleton } from '../utils.js'
import
AudioManager
from
'./AudioManager.js'
import
DBRecord
from
'./dbRecord.js'
import
Record
from
'./Record.js'
//
import Record from './Record.js'
import
RecordDto
from
'./RecordDto.js'
import
TempRecord
from
'./TempRecord.js'
// const SingleDBTempRecord = singleton(TempRecord)
module
.
exports
=
{
AudioManager
,
DBRecord
,
Record
,
Record
Dto
,
TempRecord
}
module
.
exports
=
{
AudioManager
,
DBRecord
,
RecordDto
,
TempRecord
}
ws/workers/AddRecordWorker.js
View file @
044f50d
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-14 16:49:00
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-14 18:14:20
* @FilePath: \gl-tape\ws\workers\AddRecordWorker.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
RecordDto
}
from
'@/utils/recordManager/index'
export
default
class
AddRecordWorker
{
constructor
()
{}
...
...
@@ -15,7 +23,7 @@ export default class AddRecordWorker {
throw
new
Error
(
`数据格式错误,表中没有
${
key
}
字段`
)
}
})
await
uni
.
$db
TempRecord
.
addRecord
(
record
)
await
uni
.
$db
Manager
.
addRecord
(
record
)
const
msg
=
`写入待上传记录成功 temp record ->
${
JSON
.
stringify
(
record
)}
`
uni
.
$logger
.
local
.
info
(
msg
)
ws
.
send
({
code
:
200
,
msg
})
...
...
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