Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
frontend
/
qqxb-self-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0d7933f5
authored
Jun 24, 2020
by
cocomilk2012
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
1b83de3e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
52 deletions
src/utils/filters.ts
src/views/FlexEmployee.vue
src/views/FlexEmployeeDetial.vue
src/views/PaySlips.vue
src/views/PaySlipsMonth.vue
src/views/SelectIdentity.vue
src/utils/filters.ts
View file @
0d7933f5
import
{
toMoney
,
formatDate
,
isNull
}
from
"../utils/public"
;
import
{
toMoney
,
formatDate
,
isNull
}
from
'../utils/public'
;
//格式化日期
export
const
subDate
=
(
value
:
string
,
startNum
:
number
,
endNum
:
number
)
=>
{
if
(
value
==
null
)
{
return
null
;
}
return
value
.
substring
(
startNum
,
endNum
);
// formatDate(value,'yyyy-MM')
if
(
value
==
null
)
{
return
null
;
}
return
value
.
substring
(
startNum
,
endNum
);
// formatDate(value,'yyyy-MM')
};
export
const
money
=
(
value
:
String
,
isSymbol
:
boolean
,
isConvertPoint
:
boolean
)
=>
{
toMoney
(
value
,
isSymbol
,
isConvertPoint
)
export
const
money
=
(
value
:
String
,
isSymbol
:
boolean
,
isConvertPoint
:
boolean
)
=>
{
toMoney
(
value
,
isSymbol
,
isConvertPoint
);
};
export
const
format
=
(
value
:
String
,
pattern
:
String
)
=>
{
return
value
.
replace
(
/
\d{2}
:
\d{2}
:
\d{2}
/i
,
""
);
return
value
.
replace
(
/
\d{2}
:
\d{2}
:
\d{2}
/i
,
''
);
};
export
const
isEmpty
=
(
value
:
string
)
=>
{
isNull
(
value
);
};
export
const
get_thousand_num
=
(
num
:
number
)
=>
{
return
num
.
toString
().
replace
(
/
\d
+/
,
function
(
n
)
{
// 先提取整数部分
return
n
.
replace
(
/
(\d)(?=(\d{3})
+$
)
/g
,
function
(
$1
)
{
// 对整数部分添加分隔符
return
$1
+
','
;
});
});
};
export
const
isEmpty
=
(
value
:
string
)
=>
{
isNull
(
value
)
}
\ No newline at end of file
src/views/FlexEmployee.vue
View file @
0d7933f5
...
...
@@ -22,7 +22,9 @@
<label>
应收报酬
</label>
<span
>
¥
{{
Payment_receivable
?
Number
(
Payment_receivable
).
toFixed
(
2
)
:
0.0
Payment_receivable
?
Number
(
Payment_receivable
).
toFixed
(
2
)
:
0.0
|
get_thousand_num
}}
</span
>
</p>
...
...
@@ -30,7 +32,9 @@
<label>
已收报酬
</label>
<span
>
¥
{{
receive_receivable
?
Number
(
receive_receivable
).
toFixed
(
2
)
:
0.0
receive_receivable
?
Number
(
receive_receivable
).
toFixed
(
2
)
:
0.0
|
get_thousand_num
}}
</span
>
</p>
...
...
@@ -75,7 +79,7 @@
¥
{{
Number
(
item
.
paidSalary
)
?
Number
(
item
.
paidSalary
).
toFixed
(
2
)
:
0.0
:
0.0
|
get_thousand_num
}}
</h3>
<p
:style=
"matchColor(item.billStatus)"
>
...
...
src/views/FlexEmployeeDetial.vue
View file @
0d7933f5
...
...
@@ -2,7 +2,7 @@
<div
class=
"fe-detial-box"
>
<div
class=
"fe-detial-top"
>
<h4>
任务报酬
</h4>
<h3>
+
{{
item
.
paidSalary
.
toFixed
(
2
)
}}
</h3>
<h3>
+
{{
item
.
paidSalary
.
toFixed
(
2
)
|
get_thousand_num
}}
</h3>
<p
:style=
"matchColor(item.status)"
>
{{
item
.
status
}}
</p>
</div>
<div
class=
"fe-detial-bottom"
>
...
...
src/views/PaySlips.vue
View file @
0d7933f5
...
...
@@ -23,20 +23,12 @@
<hr
/>
<div
class=
"box2"
id=
"main-content"
>
<div
class=
"child"
v-for=
"(itemY, indexY) in obj"
:key=
"indexY"
>
<span
class=
"year font1"
>
{{
itemY
.
year
}}
</span>
<div
class=
"data"
>
<div
class=
"month-list"
v-for=
"(itemM, indexM) in itemY.list"
:key=
"indexM"
>
<div
class=
"month"
>
<span
class=
"font1"
>
{{
Number
(
itemM
.
month
)
}}
月
</span>
<span></span>
<span
class=
"font1"
>
{{
(
itemM
.
sum
?
itemM
.
sum
:
0
).
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"slary"
v-for=
"(itemD, indexD) in itemM.list"
...
...
@@ -48,12 +40,29 @@
@
click=
"toDetail_click(itemD.id)"
>
<span
class=
"font2"
>
工资 |
{{
itemD
.
abbrName
}}
</span>
<span></span>
<span
class=
"font2"
>
{{
Number
(
itemD
.
currentRealWage
).
toFixed
(
2
)
}}
</span>
<span
class=
"font2"
>
¥
{{
Number
(
itemD
.
currentRealWage
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
<span
class=
"arrow_right"
><img
src=
"../assets/images/agent/next_gray.png"
alt
/></span>
</a>
</div>
<div
class=
"month"
>
<span
class=
"font1"
>
{{
itemY
.
year
}}
年-
{{
Number
(
itemM
.
month
)
}}
月
</span
>
<span
class=
"font1"
>
¥
{{
(
itemM
.
sum
?
itemM
.
sum
:
0
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
<span></span>
</div>
</div>
</div>
</div>
...
...
@@ -297,8 +306,14 @@ export default class PaySlips extends Vue {
</
script
>
<
style
lang=
"less"
>
body
{
background
:
#fff
;
}
.main
{
background
:
#fff
;
}
#main-content
{
width
:
9
0%
;
width
:
10
0%
;
}
.pay-item-box2
{
width
:
100%
;
...
...
@@ -354,7 +369,7 @@ export default class PaySlips extends Vue {
.child
{
display
:
grid
;
grid-template-columns
:
72px
auto
;
grid-template-columns
:
100%
;
}
.month-list
{
...
...
@@ -365,15 +380,19 @@ export default class PaySlips extends Vue {
.month
{
display
:
grid
;
grid-template-columns
:
162px
auto
62
px
;
justify-items
:
left
;
grid-template-columns
:
162px
auto
20
px
;
justify-items
:
center
;
margin-bottom
:
16px
;
}
.slary
a
{
display
:
grid
;
grid-template-columns
:
162px
auto
62
px
;
justify-items
:
left
;
grid-template-columns
:
162px
auto
20
px
;
justify-items
:
center
;
margin-bottom
:
16px
;
}
.arrow_right
img
{
width
:
9px
;
height
:
14px
;
}
</
style
>
\ No newline at end of file
src/views/PaySlipsMonth.vue
View file @
0d7933f5
...
...
@@ -4,7 +4,11 @@
<div
class=
"slips-mid-top"
>
<p>
实发工资(元)
</p>
<h3>
<span>
{{
Number
(
obj
[
0
].
currentRealWage
).
toFixed
(
2
)
}}
</span>
<span
>
¥
{{
Number
(
obj
[
0
].
currentRealWage
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
</h3>
</div>
<div
class=
"slips-mid-bottom"
>
...
...
@@ -28,48 +32,68 @@
<div
class=
"pay-detail-box"
>
<p>
<label>
本次收入
</label>
<span>
{{
Number
(
obj
[
0
].
currentRealWage
)
-
Number
(
obj
[
0
].
currentBaseOldInsurance
)
-
Number
(
obj
[
0
].
currentBaseHealthInsurance
)
-
Number
(
obj
[
0
].
currentUnemploymentInsurance
)
-
Number
(
obj
[
0
].
currentFund
)
-
Number
(
obj
[
0
].
currentTaxDeduction
)
}}
</span>
<span
>
¥
{{
(
Number
(
obj
[
0
].
currentRealWage
)
-
Number
(
obj
[
0
].
currentBaseOldInsurance
)
-
Number
(
obj
[
0
].
currentBaseHealthInsurance
)
-
Number
(
obj
[
0
].
currentUnemploymentInsurance
)
-
Number
(
obj
[
0
].
currentFund
)
-
Number
(
obj
[
0
].
currentTaxDeduction
))
|
get_thousand_num
}}
</span
>
</p>
<p>
<label>
养老保险
</label>
<span
class=
"green"
>
-
{{
Number
(
obj
[
0
].
currentBaseOldInsurance
).
toFixed
(
2
)
}}
</span
>
-
{{
Number
(
obj
[
0
].
currentBaseOldInsurance
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
</p>
<p>
<label>
医疗保险
</label>
<span
class=
"green"
>
-
{{
Number
(
obj
[
0
].
currentBaseHealthInsurance
).
toFixed
(
2
)
}}
</span
>
-
{{
Number
(
obj
[
0
].
currentBaseHealthInsurance
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
</p>
<p>
<label>
失业保险
</label>
<span
class=
"green"
>
-
{{
Number
(
obj
[
0
].
currentUnemploymentInsurance
).
toFixed
(
2
)
}}
</span
>
-
{{
Number
(
obj
[
0
].
currentUnemploymentInsurance
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
</p>
<p>
<label>
住房公积金
</label>
<span
class=
"green"
>
-
{{
Number
(
obj
[
0
].
currentFund
).
toFixed
(
2
)
}}
</span
>
-
{{
Number
(
obj
[
0
].
currentFund
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
</p>
<p>
<label>
代扣个税
</label>
<span
class=
"green"
>
-
{{
Number
(
obj
[
0
].
currentTaxDeduction
).
toFixed
(
2
)
}}
</span
>
-
{{
Number
(
obj
[
0
].
currentTaxDeduction
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
</p>
<p
class=
"wages"
>
<label>
实发工资
</label>
<span>
-
{{
Number
(
obj
[
0
].
currentRealWage
).
toFixed
(
2
)
}}
</span>
<span
>
-
{{
Number
(
obj
[
0
].
currentRealWage
).
toFixed
(
2
)
|
get_thousand_num
}}
</span
>
</p>
</div>
</div>
...
...
src/views/SelectIdentity.vue
View file @
0d7933f5
...
...
@@ -8,7 +8,7 @@
</div>
</a>
-->
<a
v-if=
"company_num > 0"
v-if=
"
!no_data &&
company_num > 0"
class=
"si-child"
id=
"dispatch-employee"
@
click=
"toIndex_click"
...
...
@@ -19,7 +19,12 @@
<p>
可查看编辑自己的劳务派遣员工档案信息
</p>
</div>
</a>
<a
class=
"si-child"
id=
"flex-employee"
@
click=
"toFlex_click"
>
<a
class=
"si-child"
id=
"flex-employee"
v-if=
"!no_data"
@
click=
"toFlex_click"
>
<img
src=
"../assets/images/agent/flex-employee.png"
alt
/>
<div
class=
"si-child-desc"
>
<h4>
我是灵活用工员工
</h4>
...
...
@@ -31,13 +36,14 @@
<
script
lang=
'ts'
>
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
{
Toast
}
from
"vant"
;
@
Component
({
components
:
{}
})
export
default
class
SelectIdentity
extends
Vue
{
private
id_no
:
string
=
""
;
private
dispatch_list
:
any
[]
=
[];
private
no_data
:
boolean
=
false
;
get
id_no_encrytion
():
string
{
return
encodeURI
(
window
.
btoa
(
this
.
id_no
));
...
...
@@ -94,7 +100,16 @@ export default class SelectIdentity extends Vue {
localStorage
.
setItem
(
"birthday"
,
res
.
data
.
birthday
);
}
else
{
//TODO: 跳转到实名认证
console
.
log
(
"跳转到实名认证"
,
res
);
console
.
log
(
"您还未实名认证,不可进行查询,请先去【我】的页面,点击头像,进行实名认证后再查询"
);
this
.
no_data
=
true
;
Toast
.
fail
({
duration
:
0
,
message
:
"您还未实名认证,不可进行查询,请先去【我】的页面,点击头像,进行实名认证后再查询"
});
}
})
.
catch
(
err
=>
{
...
...
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