Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
wx-notification
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 88629861
authored
Jan 26, 2026
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工资推送月报
1 parent
cfeca1dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
173 additions
and
1 deletions
src/api/salary.js
src/views/salary/index.vue
src/api/salary.js
0 → 100644
View file @
8862986
const
url
=
'/rop-dj-staff/router'
export
default
{
/**每月工资条推送-详情 */
getSalaryDetail
(
data
=
{})
{
data
.
method
=
'dj.staff.api.staff.month.salary.send.detai1'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
}
\ No newline at end of file
src/views/salary/index.vue
View file @
8862986
<!-- 工资条-->
<
template
>
<div
class=
"salary-detail"
>
<div
class=
"card"
>
<div
class=
"row"
>
<span
class=
"label"
>
计薪月份
</span>
<span
class=
"value"
>
{{
detail
.
salaryMonth
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
姓名
</span>
<span
class=
"value"
>
{{
detail
.
staffName
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
手机号
</span>
<span
class=
"value"
>
{{
detail
.
staffPhone
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
入职日期
</span>
<span
class=
"value"
>
{{
detail
.
entryDate
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
计薪天数
</span>
<span
class=
"value"
>
{{
detail
.
actualWorkDay
?
detail
.
actualWorkDay
+
'天'
:
'-'
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
基本底薪
</span>
<span
class=
"value"
>
{{
formatMoney
(
detail
.
minimumSalary
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
绩效工资
</span>
<span
class=
"value"
>
{{
formatMoney
(
detail
.
performanceSalary
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
绩效等级
</span>
<span
class=
"value"
>
{{
detail
.
performanceLevel
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
业务提成
</span>
<span
class=
"value"
>
{{
formatMoney
(
detail
.
commissionPrice
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
平板扣款
</span>
<span
class=
"value"
>
{{
formatDeduction
(
detail
.
padDeductMoney
,
true
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
日报扣款
</span>
<span
class=
"value"
>
{{
formatDeduction
(
detail
.
dailyDeductMoney
,
true
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
递延金扣减
</span>
<span
class=
"value"
>
{{
formatDeduction
(
detail
.
deferExpenses
,
true
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
递延金发放
</span>
<span
class=
"value"
>
{{
formatIncomeWithPlus
(
detail
.
deferIncome
,
true
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
其他扣除
</span>
<span
class=
"value"
>
{{
formatDeduction
(
detail
.
otherDeduction
,
true
)
}}
</span>
</div>
<div
class=
"row"
>
<span
class=
"label"
>
其他奖励
</span>
<span
class=
"value"
>
{{
formatIncomeWithPlus
(
detail
.
otherRewards
,
true
)
}}
</span>
</div>
<div
class=
"row total"
>
<span
class=
"label"
>
工资合计
</span>
<span
class=
"value"
>
{{
formatMoney
(
detail
.
salary
)
}}
</span>
</div>
</div>
</div>
</
template
>
<
script
>
import
salaryApi
from
'@/api/salary'
export
default
{
name
:
'SalaryIndex'
,
data
()
{
return
{
detail
:
{
}
}
},
mounted
()
{
this
.
getSalaryDetail
()
},
methods
:
{
getSalaryDetail
(){
salaryApi
.
getSalaryDetail
({
salaryId
:
this
.
$route
.
query
.
uuid
}).
then
(
res
=>
{
this
.
detail
=
res
.
data
})
},
// 金额格式化:¥ + 千分位 + 两位小数
formatMoney
(
value
,
{
showPlus
=
false
,
dashIfEmpty
=
true
}
=
{})
{
console
.
log
(
value
===
null
||
value
===
undefined
||
value
===
''
)
if
(
value
===
null
||
value
===
undefined
||
value
===
''
)
{
return
dashIfEmpty
?
'-'
:
'¥0.00'
}
const
num
=
Number
(
value
)
if
(
isNaN
(
num
))
return
dashIfEmpty
?
'-'
:
'¥0.00'
const
formatted
=
num
.
toFixed
(
2
).
replace
(
/
\B(?=(\d{3})
+
(?!\d))
/g
,
','
)
const
signPrefix
=
showPlus
?
'+'
:
''
return
`
${
signPrefix
}
¥
${
formatted
}
`
},
// 扣减类统一渲染为 -¥
formatDeduction
(
value
,
dashIfEmpty
=
false
)
{
if
(
value
===
null
||
value
===
undefined
||
value
===
''
)
{
return
dashIfEmpty
?
'-'
:
'-¥0.00'
}
const
num
=
Math
.
abs
(
Number
(
value
)
||
0
)
const
formatted
=
num
.
toFixed
(
2
).
replace
(
/
\B(?=(\d{3})
+
(?!\d))
/g
,
','
)
return
`-¥
${
formatted
}
`
},
// 奖励/发放类显示 +¥
formatIncomeWithPlus
(
value
,
dashIfEmpty
=
false
)
{
if
(
value
===
null
||
value
===
undefined
||
value
===
''
)
{
return
dashIfEmpty
?
'-'
:
'+¥0.00'
}
const
num
=
Number
(
value
)
||
0
const
formatted
=
num
.
toFixed
(
2
).
replace
(
/
\B(?=(\d{3})
+
(?!\d))
/g
,
','
)
return
`¥
${
formatted
}
`
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.salary-detail
{
min-height
:
100vh
;
background
:
#ffffff
;
padding
:
16px
;
}
.row
{
display
:
flex
;
align-items
:
center
;
font-size
:
14px
;
margin-bottom
:
16px
;
}
.row
:last-child
{
border-bottom
:
none
;
}
.label
{
width
:
56px
;
color
:
#888888
;
white-space
:
wrap
;
margin-right
:
20px
;
}
.value
{
color
:
#222222
;
}
.total
{
border-top
:
0.5px
solid
#c3c3c366
;
padding-top
:
16px
;
}
.total
.value
{
font-size
:
16px
;
font-weight
:
600
;
}
</
style
>
\ No newline at end of file
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