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
7508be99
authored
Jun 01, 2020
by
e
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
updata
parent
1675047a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
46 deletions
package-lock.json
package.json
src/utils/public.ts
src/views/FlexEmployee.vue
src/views/FlexEmployeeDetial.vue
package-lock.json
View file @
7508be99
...
...
@@ -6494,6 +6494,11 @@
"minimist"
:
"^1.2.5"
}
},
"moment"
:
{
"version"
:
"2.26.0"
,
"resolved"
:
"https://registry.npm.taobao.org/moment/download/moment-2.26.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.26.0.tgz"
,
"integrity"
:
"sha1-Xh+Cxrr8pug+gIswyHBe7Q3L05o="
},
"move-concurrently"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz"
,
...
...
@@ -7140,7 +7145,8 @@
"version"
:
"2.2.2"
,
"resolved"
:
"https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz"
,
"integrity"
:
"sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"pify"
:
{
"version"
:
"4.0.1"
,
...
...
package.json
View file @
7508be99
...
...
@@ -14,6 +14,7 @@
"
axios
"
:
"^0.19.2"
,
"
core-js
"
:
"^2.6.11"
,
"
fastclick
"
:
"^1.0.6"
,
"
moment
"
:
"^2.26.0"
,
"
oidc-client
"
:
"^1.10.1"
,
"
qs
"
:
"^6.9.4"
,
"
vant
"
:
"^2.2.0"
,
...
...
src/utils/public.ts
View file @
7508be99
...
...
@@ -507,4 +507,39 @@ export function CheckPlatform() {
}
else
{
return
""
;
}
}
\ No newline at end of file
}
/**
* 金钱转换
* @param num 要转换的金钱
* @param isSymbol 是否显示金钱符号 默认:true
* @param isConvertPoint 是否转换成分显示 默认:厘转分
*/
export
function
toMoney
(
num
:
any
,
isSymbol
:
boolean
=
true
,
isConvertPoint
:
any
=
false
){
if
(
num
)
{
if
(
isNaN
(
num
))
{
return
;
}
num
=
typeof
num
==
"string"
?
parseFloat
(
num
)
:
num
//判断是否是字符串如果是字符串转成数字
if
(
isConvertPoint
){
num
=
num
/
100
;
}
num
=
num
.
toFixed
(
2
);
//保留两位
num
=
parseFloat
(
num
);
//转成数字
num
=
num
.
toLocaleString
();
//转成金额显示模式
//判断是否有小数
if
(
num
.
indexOf
(
"."
)
==
-
1
)
{
num
=
"¥"
+
num
+
".00"
;
}
else
{
num
=
num
.
split
(
"."
)[
1
].
length
<
2
?
"¥"
+
num
+
"0"
:
"¥"
+
num
;
}
if
(
!
isSymbol
){
num
=
num
.
replace
(
"¥"
,
""
);
}
return
num
;
//返回的是字符串23,245.12保留2位小数
}
else
{
return
num
=
0.00
;
}
}
src/views/FlexEmployee.vue
View file @
7508be99
<
template
>
<!-- 1、已接单 进行中 #077AEC 2、已拒回 #FF9100 3、已完成 #95989E-->
<div
class=
"fe-bigbox"
>
<div>
<div
v-if=
"taskRecordList!=null"
>
<div
class=
"person-information"
>
<div
class=
"person-information-top"
>
<div
class=
"person-information-left"
>
...
...
@@ -22,7 +22,7 @@
<p>
完成任务
</p>
</div>
<div
class=
"person-information-bottom-child"
id=
"person-information-ysbc"
>
<h3>
{{
Payment_receivable
}}
</h3>
<h3>
{{
Payment_receivable
|
money
(
true
,
false
)
}}
</h3>
<p>
应收报酬
</p>
</div>
<div
class=
"person-information-bottom-child"
id=
"person-information-yysbc"
>
...
...
@@ -36,7 +36,6 @@
<div
class=
"fe-list-title"
>
<h3>
任务记录
</h3>
</div>
<a
class=
"fe-list-child"
href=
"javascript:void(0)"
...
...
@@ -45,13 +44,13 @@
@
click=
"toDetail(item.id)"
>
<div
class=
"fe-list-child-left"
>
<h3>
{{
item
.
title
}}
</h3>
<p>
{{
item
.
date
}}
</p>
<h3>
{{
item
.
description
}}
</h3>
<p>
{{
item
.
createTime
|
format
}}
</p>
</div>
<div
class=
"fe-list-child-right"
>
<div
class=
"fe-list-child-right-desc"
>
<h3>
¥
{{
item
.
price
}}
</h3>
<p>
{{
item
.
state
}}
</p>
<h3>
{{
item
.
paidSalary
|
money
(
true
,
true
)
}}
</h3>
<p>
{{
item
.
billStatus
}}
</p>
</div>
<img
src=
"../assets/images/agent/next_gray.png"
alt
/>
</div>
...
...
@@ -59,7 +58,7 @@
</div>
</div>
</div>
<div
class=
"empty_data"
style=
"display:none"
>
<div
class=
"empty_data"
v-else
>
<p>
您在亲亲小保未从事灵活用工的相关任务
<br
/>
暂无相关记录
...
...
@@ -69,9 +68,19 @@
</
template
>
<
script
lang=
'ts'
>
// let moment = require("moment");
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
{
toMoney
,
formatDate
}
from
"../utils/public"
;
@
Component
@
Component
({
filters
:
{
money
:
(
value
:
String
,
isSymbol
:
boolean
,
isConvertPoint
:
boolean
)
=>
toMoney
(
value
,
isSymbol
,
isConvertPoint
),
format
:
(
value
:
String
,
pattern
:
String
)
=>
{
return
value
.
replace
(
/
\d{2}
:
\d{2}
:
\d{2}
/i
,
""
);
}
}
})
export
default
class
FlexEmployee
extends
Vue
{
private
name
:
string
=
"迪丽热巴"
;
private
birthday
:
string
=
"1987-10-16"
;
...
...
@@ -79,26 +88,30 @@ export default class FlexEmployee extends Vue {
private
perform_work
:
string
=
""
;
private
Payment_receivable
:
string
=
""
;
private
receive_receivable
:
string
=
""
;
private
taskRecordList
:
any
=
[
{
id
:
1
,
title
:
"市场推广-地推"
,
date
:
"2020-02-02"
,
price
:
"9999.99"
,
state
:
"已接单"
}
];
private
fullName
:
string
=
""
;
private
taskRecordList
:
any
=
[];
private
toDetail
(
id
:
any
):
void
{
this
.
$router
.
push
({
name
:
"FlexEmployeeDetial"
,
query
:
{
aaa
:
'000'
}
});
this
.
$router
.
push
({
name
:
"FlexEmployeeDetial"
,
query
:
{
id
}
});
}
crea
ted
()
{
moun
ted
()
{
let
params
=
{
idNo
:
this
.
$route
.
query
.
id_no
};
this
.
$server
.
EmployeeService
.
getAgileWorker
(
params
).
then
((
res
:
any
)
=>
{
// console.log('res='+JSON.stringify(res))
res
.
alCount
==
null
?
this
.
accept_work
==
"0"
:
this
.
accept_work
=
res
.
alCount
;
console
.
log
(
"res="
+
JSON
.
stringify
(
res
));
res
.
alCount
==
null
?
(
this
.
accept_work
=
"0"
)
:
(
this
.
accept_work
=
res
.
alCount
);
// 已结任务
res
.
comCount
==
null
?
(
this
.
perform_work
=
"0"
)
:
(
this
.
perform_work
=
res
.
comCount
);
// 完成任务
this
.
Payment_receivable
=
res
.
receivableSalary
;
// 应收报酬
res
.
receivedSalary
==
null
?
(
this
.
receive_receivable
=
"0"
)
:
(
this
.
receive_receivable
=
res
.
receivedSalary
);
// 已收报酬
this
.
taskRecordList
=
res
.
taskList
;
// 任务记录
localStorage
.
setItem
(
"taskList"
,
JSON
.
stringify
(
res
.
taskList
));
});
}
}
...
...
@@ -187,6 +200,7 @@ export default class FlexEmployee extends Vue {
background-color
:
#ffffff
;
border-radius
:
12px
12px
0px
0px
;
padding
:
0
16px
;
height
:
100%
;
}
.fe-list-title
{
width
:
100%
;
...
...
@@ -212,6 +226,7 @@ export default class FlexEmployee extends Vue {
line-height
:
22px
;
font-weight
:
500
;
margin-top
:
15px
;
height
:
22px
;
}
.fe-list-child-left
p
{
color
:
#95989e
;
...
...
src/views/FlexEmployeeDetial.vue
View file @
7508be99
...
...
@@ -2,8 +2,8 @@
<div
class=
"fe-detial-box"
>
<div
class=
"fe-detial-top"
>
<h4>
任务报酬
</h4>
<h3>
+
{{
money
}}
</h3>
<p>
{{
status
}}
</p>
<h3>
+
{{
item
.
paidSalary
|
money
}}
</h3>
<p>
{{
item
.
status
}}
</p>
</div>
<div
class=
"fe-detial-bottom"
>
<div
class=
"fe-detial-bottom-title"
>
...
...
@@ -13,34 +13,36 @@
<p>
收款账户
</p>
</div>
<div
class=
"fe-detial-bottom-detial"
>
<p>
{{
company
}}
</p>
<p>
{{
task_count
}}
</p>
<p>
{{
dat
e
}}
</p>
<p>
{{
account
}}
</p>
<p>
{{
item
.
fullName
}}
</p>
<p>
{{
item
.
description
}}
</p>
<p>
{{
item
.
payTim
e
}}
</p>
<p>
{{
item
.
banko
}}
</p>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
'vue-property-decorator'
@
Component
export
default
class
FlexEmployee
extends
Vue
{
private
money
:
number
=
9999.99
;
private
status
:
string
=
'待发放'
;
private
company
:
string
=
''
;
private
task_count
:
string
=
'市场推广-地推'
;
private
date
:
string
=
'2020-5-29'
;
private
account
:
string
=
'622254889999888900'
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
{
toMoney
}
from
"@/utils/public"
;
private
toDetail
(
id
:
any
):
void
{
this
.
$router
.
push
({
name
:
'FlexEmployeeDetial'
,
query
:{
id
:
id
}})
}
create
(){
//this.company=this.$route.query.aaa:string
@
Component
({
filters
:
{
money
:
(
value
:
String
)
=>
toMoney
(
value
,
false
,
true
)
}
})
export
default
class
FlexEmployee
extends
Vue
{
private
item
:
any
;
};
created
()
{
let
id
=
this
.
$route
.
query
.
id
;
let
task_info
=
localStorage
.
getItem
(
"taskList"
);
if
(
task_info
!=
null
)
{
let
tasks
=
JSON
.
parse
(
task_info
);
this
.
item
=
tasks
.
find
((
x
:
any
)
=>
x
.
id
==
id
);
}
}
}
</
script
>
<
style
lang=
"less"
>
...
...
@@ -89,6 +91,7 @@ export default class FlexEmployee extends Vue {
color
:
#3d4047
;
font-size
:
14px
;
line-height
:
30px
;
height
:
30px
;
text-align
:
right
;
}
</
style
>
\ No newline at end of file
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