Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
82a950ba
Commit
82a950ba
authored
Dec 16, 2020
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报聘基本信息保存
parent
2a3fac0f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
431 additions
and
120 deletions
+431
-120
src/app/common/life-common.service.ts
+211
-36
src/app/common/picker/picker.component.scss
+1
-1
src/app/domain/employBasicQuery.ts
+4
-60
src/app/my/application-process/employee-basic-info/employee-basic-info.component.html
+42
-14
src/app/my/application-process/employee-basic-info/employee-basic-info.component.ts
+120
-1
src/app/my/application-process/employee-info/employee-info.component.html
+6
-6
src/app/my/application-process/employee-info/employee-info.component.ts
+3
-1
src/app/my/application-process/register/register.component.ts
+1
-1
src/app/my/my.service.ts
+21
-0
src/styles.scss
+22
-0
No files found.
src/app/common/life-common.service.ts
View file @
82a950ba
...
@@ -242,42 +242,6 @@ export class LifeCommonService {
...
@@ -242,42 +242,6 @@ export class LifeCommonService {
date
:
now
.
day
(
idx
).
format
(
'YYYY-MM-DD'
)
date
:
now
.
day
(
idx
).
format
(
'YYYY-MM-DD'
)
};
};
});
});
// var date = new Date();
// var year = date.getFullYear();
// var month = date.getMonth();
// var week = date.getDay();
// // if(week ==0){
// // week = 7;
// // }
// var month = month + 1;
// //获取今天是几号
// var day = date.getDate();
// // 本周内今天的前几天的数量
// var leftNum = week;
// // 本周内今天的后几天的数量
// var rightNum = 6 - week;
// // 本周内今天的前几天
// for (var i = 1; i <= leftNum; i++) {
// this.weekArr[i].week = week- i
// this.weekArr[i].day = day - i;
// this.weekArr[i]['date'] = year + '-' + (month>9?month:'0'+month) + '-' + (day - i);
// }
// // 本周内今天的后几天
// for (var i = 1; i <= rightNum; i++) {
// this.weekArr[i + week].week = week + i ;
// this.weekArr[i + week].day = day + i ;
// this.weekArr[i + week]['date'] = year + '-' + (month>9?month:'0'+month) + '-' + (day + i);
// }
// // 今天
// this.weekArr[week].week = week;
// this.weekArr[week].day = day;
// this.weekArr[week]['date'] = year + '-' + (month>9?month:'0'+month) + '-' + day;
// this.weekArr[week].selected = true;
// return this.weekArr;
}
}
//获取星期
//获取星期
...
@@ -304,4 +268,215 @@ export class LifeCommonService {
...
@@ -304,4 +268,215 @@ export class LifeCommonService {
return
'周日'
;
return
'周日'
;
}
}
}
}
scrollTo
()
{
window
.
scrollTo
(
0
,
0
);
}
/**
* 通过起保日期
* 计算年龄
* effectiveStartDate,
* @param year
* @param month
* @param day
* @returns {any}
*/
ages
(
year
,
month
,
day
)
{
// 是否从投保日计算生日1.是 0.不是 默认值0
let
effectiveStartBirthday
;
const
selectedProduct
=
localStorage
.
getItem
(
'selectedProduct'
);
if
(
selectedProduct
)
{
if
(
JSON
.
parse
(
selectedProduct
).
planPara
&&
(
JSON
.
parse
(
selectedProduct
).
planPara
.
effectiveStartBirthday
||
(
JSON
.
parse
(
selectedProduct
).
planPara
.
effectiveStartBirthday
==
0
)))
{
effectiveStartBirthday
=
JSON
.
parse
(
selectedProduct
).
planPara
.
effectiveStartBirthday
;
}
else
{
effectiveStartBirthday
=
0
;
}
}
let
policyStartDate
;
const
timeRange
=
sessionStorage
.
getItem
(
'timeRange'
);
if
(
timeRange
)
{
policyStartDate
=
JSON
.
parse
(
timeRange
).
startDate
;
}
else
{
(
policyStartDate
=
new
Date
()).
setDate
(
new
Date
().
getDate
()
+
1
);
}
// 'Y'是年,'D'是天
const
age
=
{
age
:
null
,
ageUnit
:
'Y'
};
let
d
;
let
returnAge
;
const
birthYear
=
year
;
const
birthMonth
=
month
;
const
birthDay
=
day
;
if
(
effectiveStartBirthday
==
0
)
{
d
=
new
Date
(
policyStartDate
);
}
else
{
d
=
new
Date
();
}
const
nowYear
=
d
.
getFullYear
();
const
nowMonth
=
d
.
getMonth
()
+
1
;
const
nowDay
=
d
.
getDate
();
if
(
nowYear
===
birthYear
)
{
returnAge
=
(
new
Date
(
nowYear
+
'/'
+
nowMonth
+
'/'
+
nowDay
).
getTime
()
-
new
Date
(
year
+
'/'
+
month
+
'/'
+
day
).
getTime
())
/
(
24
*
3600
*
1000
);
age
.
ageUnit
=
'D'
;
}
else
{
const
ageDiff
=
nowYear
-
birthYear
;
// 年之差
if
(
ageDiff
>
0
)
{
if
(
nowMonth
===
birthMonth
)
{
const
dayDiff
=
nowDay
-
birthDay
;
// 日之差
if
(
dayDiff
<
0
)
{
returnAge
=
ageDiff
-
1
;
}
else
{
returnAge
=
ageDiff
;
}
}
else
{
const
monthDiff
=
nowMonth
-
birthMonth
;
// 月之差
if
(
monthDiff
<
0
)
{
returnAge
=
ageDiff
-
1
;
}
else
{
returnAge
=
ageDiff
;
}
}
}
else
{
returnAge
=
-
1
;
// 返回-1 表示出生日期输入错误 晚于今天
}
}
age
.
age
=
returnAge
;
return
age
;
// 返回周岁年龄
}
/**
* 身份证号码校验,并获取生日、性别、年龄
* @param code
* @returns {{pass: boolean, msg: string, birthDay: number, gender: null, age: null, ageUnit: string}}
* @constructor
*/
IdCodeValid
(
code
)
{
if
(
code
)
{
// 身份证号合法性验证
// 支持15位和18位身份证号
// 支持地址编码、出生日期、校验位验证
const
city
=
{
11
:
'北京'
,
12
:
'天津'
,
13
:
'河北'
,
14
:
'山西'
,
15
:
'内蒙古'
,
21
:
'辽宁'
,
22
:
'吉林'
,
23
:
'黑龙江 '
,
31
:
'上海'
,
32
:
'江苏'
,
33
:
'浙江'
,
34
:
'安徽'
,
35
:
'福建'
,
36
:
'江西'
,
37
:
'山东'
,
41
:
'河南'
,
42
:
'湖北 '
,
43
:
'湖南'
,
44
:
'广东'
,
45
:
'广西'
,
46
:
'海南'
,
50
:
'重庆'
,
51
:
'四川'
,
52
:
'贵州'
,
53
:
'云南'
,
54
:
'西藏 '
,
61
:
'陕西'
,
62
:
'甘肃'
,
63
:
'青海'
,
64
:
'宁夏'
,
65
:
'新疆'
,
81
:
'香港'
,
82
:
'澳门'
,
83
:
'台湾'
,
91
:
'国外 '
};
// 出生年月日校验 前正则限制起始年份为1900;
const
year
=
code
.
substr
(
6
,
4
);
// 身份证年
const
month
=
code
.
substr
(
10
,
2
);
// 身份证月
const
date
=
code
.
substr
(
12
,
2
);
// 身份证日
const
birth
=
new
Date
(
year
+
'-'
+
month
+
'-'
+
date
);
const
time
=
Date
.
parse
(
year
+
'-'
+
month
+
'-'
+
date
);
// 身份证日期时间戳date
const
now_time
=
Date
.
parse
(
new
Date
().
toDateString
());
const
dates
=
(
new
Date
(
year
,
month
,
0
)).
getDate
();
// 身份证当月天数
const
gender
=
code
.
substr
(
16
,
1
);
let
row
=
{
'pass'
:
true
,
'msg'
:
'验证成功'
,
'birthDay'
:
time
,
'gender'
:
null
,
'age'
:
null
,
'ageUnit'
:
'Y'
};
if
(
parseInt
(
gender
%
2
+
''
,
0
)
===
1
)
{
row
.
gender
=
'1'
;
}
else
{
row
.
gender
=
'2'
;
}
row
.
age
=
this
.
ages
(
birth
.
getFullYear
(),
birth
.
getMonth
()
+
1
,
birth
.
getDate
()).
age
;
row
.
ageUnit
=
this
.
ages
(
birth
.
getFullYear
(),
birth
.
getMonth
()
+
1
,
birth
.
getDate
()).
ageUnit
;
if
(
!
code
||
!
/^
\d{6}(
19|20
)?\d{2}(
0
[
1-9
]
|1
[
012
])(
0
[
1-9
]
|
[
12
]\d
|3
[
01
])\d{3}(\d
|
[
xX
])
$/
.
test
(
code
))
{
row
=
{
'pass'
:
false
,
'msg'
:
'身份证号格式错误'
,
'birthDay'
:
null
,
'gender'
:
null
,
'age'
:
null
,
'ageUnit'
:
'Y'
};
}
else
if
(
!
city
[
code
.
substr
(
0
,
2
)])
{
row
=
{
'pass'
:
false
,
'msg'
:
'身份证号地址编码错误'
,
'birthDay'
:
null
,
'gender'
:
null
,
'age'
:
null
,
'ageUnit'
:
'Y'
};
}
else
if
(
time
>
now_time
||
date
>
dates
)
{
row
=
{
'pass'
:
false
,
'msg'
:
'出生日期不合规'
,
'birthDay'
:
null
,
'gender'
:
null
,
'age'
:
null
,
'ageUnit'
:
'Y'
}
}
else
{
// 18位身份证需要验证最后一位校验位
if
(
code
.
length
==
18
)
{
code
=
code
.
split
(
''
);
// ∑(ai×Wi)(mod 11)
// 加权因子
const
factor
=
[
7
,
9
,
10
,
5
,
8
,
4
,
2
,
1
,
6
,
3
,
7
,
9
,
10
,
5
,
8
,
4
,
2
];
// 校验位
const
parity
=
[
1
,
0
,
'X'
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
];
let
sum
=
0
;
let
ai
=
0
;
let
wi
=
0
;
for
(
let
i
=
0
;
i
<
17
;
i
++
)
{
ai
=
code
[
i
];
wi
=
factor
[
i
];
sum
+=
ai
*
wi
;
}
if
(
parity
[
sum
%
11
]
!=
code
[
17
].
toUpperCase
())
{
row
=
{
'pass'
:
false
,
'msg'
:
'身份证号校验位错误'
,
'birthDay'
:
null
,
'gender'
:
null
,
'age'
:
null
,
'ageUnit'
:
'Y'
};
}
}
}
return
row
;
}
}
}
}
src/app/common/picker/picker.component.scss
View file @
82a950ba
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
-webkit-box-flex
:
1
;
-webkit-box-flex
:
1
;
-webkit-flex
:
1
;
-webkit-flex
:
1
;
flex
:
1
;
flex
:
1
;
color
:
#
576B95
;
color
:
#
108ee9
;
}
}
.weui-picker__action
:last-child
{
.weui-picker__action
:last-child
{
...
...
src/app/domain/employBasicQuery.ts
View file @
82a950ba
export
class
EmployBasicQuery
{
export
class
EmployBasicQuery
{
constructor
(
constructor
(
public
id
?:
number
,
public
id
?:
number
,
/**
* FK ag_acl_practitioner.id 邀请人
*/
public
inviteePractitionerId
?:
number
,
/**
* 報聘经纪人姓名
*/
public
name
?:
string
,
public
name
?:
string
,
/**
* 報聘经纪人姓名电话
*/
public
mobileNo
?:
number
,
public
mobileNo
?:
number
,
/**
* FK ag_md_id_type.id
*/
public
idTypeId
?:
number
,
public
idTypeId
?:
number
,
/**
* 報聘经纪人姓名证件类型
*/
public
idType
?:
string
,
public
idType
?:
string
,
/**
* 報聘经纪人姓名证件号
*/
public
idNo
?:
number
,
public
idNo
?:
number
,
//1=Male, 2=Female
/**
* 1=Male, 2=Female
*/
public
gender
?:
string
,
public
gender
?:
string
,
/**
* 報聘经纪人姓名生日
*/
public
practitionerBirthdate
?:
string
,
public
practitionerBirthdate
?:
string
,
/**
* 户籍省份 FK ag_md_province.id
*/
public
provinceId
?:
number
,
public
provinceId
?:
number
,
/**
* 户籍省份名
*/
public
provinceName
?:
string
,
public
provinceName
?:
string
,
/**
* 户籍城市FK ag_md_city.id
*/
public
cityId
?:
number
,
public
cityId
?:
number
,
/**
* 户籍城市名
*/
public
cityName
?:
string
,
public
cityName
?:
string
,
/**
* 居住地址
*/
public
residentAddress
?:
string
,
public
residentAddress
?:
string
,
/**
* 从业人员微信号
*/
public
wechatId
?:
number
,
public
wechatId
?:
number
,
/**
* email地址
*/
public
email
?:
string
public
email
?:
string
)
{
)
{
}
}
}
}
\ No newline at end of file
src/app/my/application-process/employee-basic-info/employee-basic-info.component.html
View file @
82a950ba
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
<div
class=
"contentDetail employ"
>
<div
class=
"contentDetail employ"
>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
姓名
</span>
<span>
姓名
</span>
<input
type=
"text"
class=
"form-control"
[(
ngModel
)]="
editEmployBasicInfo
.
name
"
>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
证件类型
</span>
<span>
证件类型
</span>
<select
class=
"form-control"
name=
""
id=
"
"
>
<select
class=
"form-control"
(
ngModelChange
)="
idTypeChange
($
event
);
bs
(
null
)"
[
ngModel
]="
editEmployBasicInfo
.
idTypeId
"
>
<option
value=
""
>
请选择
</option>
<option
value=
null
>
请选择
</option>
<option
[
value
]="
idType
.
id
"
*
ngFor=
"let idType of this.idTypesList"
>
<option
[
value
]="
idType
.
id
"
*
ngFor=
"let idType of this.idTypesList"
>
{{idType.name}}
{{idType.name}}
</option>
</option>
...
@@ -20,31 +20,59 @@
...
@@ -20,31 +20,59 @@
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
证件号
</span>
<span>
证件号
</span>
<input
type=
"text"
class=
"form-control"
(
blur
)="
bs
(
1
)"
[(
ngModel
)]="
editEmployBasicInfo
.
idNo
"
>
</div>
<div
class=
"contentItem"
>
<span>
生日
</span>
<div></div>
</div>
</div>
<List
[
className
]="'
date-picker-list
'"
>
<ListItem
DatePicker
[
extra
]="
currentDateFormat
(
showPractitionerBirthdate
,
'
yyyy-mm-dd
')"
[
arrow
]="'
horizontal
'"
[
mode
]="'
date
'"
[
minDate
]
="
minDate
"
[(
ngModel
)]="
showPractitionerBirthdate
"
(
onOk
)="
onOk
($
event
)"
>
生日
</ListItem>
</List>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
性别
</span>
<span>
性别
</span>
<div></div>
<select
class=
"form-control"
[(
ngModel
)]="
editEmployBasicInfo
.
gender
"
>
<option
value=
null
>
请选择
</option>
<option
value=
'1'
>
男
</option>
<option
value=
"2"
>
女
</option>
</select>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
户籍
</span>
<span>
户籍
</span>
<div></div>
<div>
<span
class=
"cursor"
(
click
)="
selectedArea
(
1
)"
>
<span
*
ngIf=
"!addressInfo || addressInfo && !addressInfo?.province?.value"
>
请选择
</span>
<span
*
ngIf=
"addressInfo"
>
{{addressInfo?.province?.value}}{{addressInfo?.city?.value ? " - "+addressInfo?.city?.value : ''}}
</span>
<i
class=
"iconfont icon-xiangxia"
style=
"margin-left: 14px;color: #8a8a8a;font-size: 14px;"
></i>
</span>
<ydlife-picker
*
ngIf=
"houseFlag"
[
provinceLists
]="
provinces
"
[
limitStep
]="
areaLimitStep
"
(
selectedArea
)="
getAreaInfo
($
event
,
1
)"
></ydlife-picker>
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
居住地址
</span>
<span>
居住地址
</span>
<div></div>
<div>
<input
type=
"text"
class=
"form-control"
[(
ngModel
)]="
editEmployBasicInfo
.
residentAddress
"
>
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
E-mail
</span>
<span>
E-mail
</span>
<div
></div>
<div><input
type=
"text"
class=
"form-control"
[(
ngModel
)]="
editEmployBasicInfo
.
email
"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer
class=
"fixed"
(
click
)="
next
()"
>
<footer
class=
"fixed"
(
click
)="
next
()"
>
保存并下一步
保存并下一步
</footer>
</footer>
</div>
</div>
\ No newline at end of file
<ydlife-alert
*
ngIf=
"isNeedAlert"
[
dialogInfo
]="
dialogInfo
"
(
popInfo
)="
getPopInfo
()"
></ydlife-alert>
\ No newline at end of file
src/app/my/application-process/employee-basic-info/employee-basic-info.component.ts
View file @
82a950ba
...
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
...
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import
{
MyService
}
from
'../../my.service'
;
import
{
MyService
}
from
'../../my.service'
;
import
{
ActivatedRoute
,
Router
}
from
"@angular/router"
;
import
{
ActivatedRoute
,
Router
}
from
"@angular/router"
;
import
{
LifeCommonService
}
from
"../../../common/life-common.service"
;
import
{
LifeCommonService
}
from
"../../../common/life-common.service"
;
import
{
EmployBasicQuery
}
from
'../../../domain/employBasicQuery'
;
@
Component
({
@
Component
({
selector
:
'ydlife-employee-basic-info'
,
selector
:
'ydlife-employee-basic-info'
,
...
@@ -11,6 +12,14 @@ import { LifeCommonService } from "../../../common/life-common.service";
...
@@ -11,6 +12,14 @@ import { LifeCommonService } from "../../../common/life-common.service";
export
class
EmployeeBasicInfoComponent
implements
OnInit
{
export
class
EmployeeBasicInfoComponent
implements
OnInit
{
idTypesList
:
Array
<
any
>
;
idTypesList
:
Array
<
any
>
;
hiringBasicInfoId
:
any
;
hiringBasicInfoId
:
any
;
editEmployBasicInfo
:
EmployBasicQuery
=
new
EmployBasicQuery
();
isNeedAlert
:
boolean
;
dialogInfo
:
any
;
showPractitionerBirthdate
:
any
;
houseFlag
:
boolean
;
addressInfo
:
any
;
provinces
:
Array
<
any
>
;
minDate
:
any
=
new
Date
(
'1900-01-01'
);
constructor
(
private
activatedRoute
:
ActivatedRoute
,
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
router
:
Router
,
public
lifeCommonService
:
LifeCommonService
,
private
router
:
Router
,
public
lifeCommonService
:
LifeCommonService
,
public
myService
:
MyService
)
{
}
public
myService
:
MyService
)
{
}
...
@@ -19,7 +28,11 @@ export class EmployeeBasicInfoComponent implements OnInit {
...
@@ -19,7 +28,11 @@ export class EmployeeBasicInfoComponent implements OnInit {
const
title
=
this
.
activatedRoute
.
snapshot
.
data
[
0
][
'title'
];
const
title
=
this
.
activatedRoute
.
snapshot
.
data
[
0
][
'title'
];
this
.
lifeCommonService
.
setTitle
(
title
);
this
.
lifeCommonService
.
setTitle
(
title
);
this
.
hiringBasicInfoId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
:
null
;
this
.
hiringBasicInfoId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
:
null
;
this
.
editEmployBasicInfo
.
mobileNo
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
mobileNo
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
mobileNo
:
null
;
this
.
erpInitialize
();
this
.
erpInitialize
();
this
.
provCityQry
();
this
.
showPractitionerBirthdate
=
new
Date
();
this
.
editEmployBasicInfo
=
new
EmployBasicQuery
(
this
.
hiringBasicInfoId
,
null
,
this
.
editEmployBasicInfo
.
mobileNo
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
)
}
}
erpInitialize
(){
erpInitialize
(){
...
@@ -30,7 +43,113 @@ export class EmployeeBasicInfoComponent implements OnInit {
...
@@ -30,7 +43,113 @@ export class EmployeeBasicInfoComponent implements OnInit {
})
})
}
}
currentDateFormat
(
date
,
format
:
string
=
'yyyy-mm-dd HH:MM'
):
any
{
const
pad
=
(
n
:
number
):
string
=>
(
n
<
10
?
`0
${
n
}
`
:
n
.
toString
());
return
format
.
replace
(
'yyyy'
,
date
.
getFullYear
())
.
replace
(
'mm'
,
pad
(
date
.
getMonth
()
+
1
))
.
replace
(
'dd'
,
pad
(
date
.
getDate
()))
.
replace
(
'HH'
,
pad
(
date
.
getHours
()))
.
replace
(
'MM'
,
pad
(
date
.
getMinutes
()))
.
replace
(
'ss'
,
pad
(
date
.
getSeconds
()));
}
onOk
(
result
:
Date
)
{
console
.
log
(
result
)
this
.
editEmployBasicInfo
.
practitionerBirthdate
=
this
.
currentDateFormat
(
result
,
'yyyy-mm-dd'
);
this
.
showPractitionerBirthdate
=
result
;
console
.
log
(
this
.
editEmployBasicInfo
)
}
idTypeChange
(
e
){
this
.
editEmployBasicInfo
.
idTypeId
=
e
;
for
(
let
idType
of
this
.
idTypesList
){
if
(
this
.
editEmployBasicInfo
.
idTypeId
==
idType
.
id
){
this
.
editEmployBasicInfo
.
idType
=
idType
.
name
;
}
}
console
.
log
(
this
.
editEmployBasicInfo
)
}
/**
* 1.证件号
*/
bs
(
type
)
{
this
.
lifeCommonService
.
scrollTo
();
if
(
type
)
{
if
(
type
===
1
&&
this
.
editEmployBasicInfo
.
idTypeId
==
1
){
this
.
idCardInput
(
this
.
editEmployBasicInfo
.
idNo
);
}
}
}
/**
* 身份证号码输入,获取生日和性别
*/
idCardInput
(
val
)
{
if
(
val
&&
val
.
length
===
18
)
{
if
(
!
this
.
lifeCommonService
.
IdCodeValid
(
val
).
pass
)
{
this
.
openPopInfo
(
this
.
lifeCommonService
.
IdCodeValid
(
val
).
msg
)
return
;
}
this
.
editEmployBasicInfo
.
practitionerBirthdate
=
this
.
lifeCommonService
.
dateFormat
(
this
.
lifeCommonService
.
IdCodeValid
(
val
).
birthDay
,
'yyyy-MM-dd'
);
this
.
editEmployBasicInfo
.
gender
=
this
.
lifeCommonService
.
IdCodeValid
(
val
).
gender
;
this
.
showPractitionerBirthdate
=
new
Date
(
this
.
editEmployBasicInfo
.
practitionerBirthdate
);
console
.
log
(
this
.
showPractitionerBirthdate
)
}
}
next
(){
next
(){
this
.
router
.
navigate
([
'/work_experience'
],{
queryParams
:
{
hiringBasicInfoId
:
this
.
hiringBasicInfoId
}
});
this
.
myService
.
saveBasicInfo
(
this
.
editEmployBasicInfo
).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
router
.
navigate
([
'/work_experience'
],{
queryParams
:
{
hiringBasicInfoId
:
this
.
hiringBasicInfoId
}
});
}
else
{
this
.
openPopInfo
(
res
[
'message'
])
}
})
}
// 打开弹窗
openPopInfo
(
message
)
{
this
.
isNeedAlert
=
true
;
this
.
dialogInfo
=
{
title
:
null
,
content
:
{
value
:
message
,
align
:
'center'
},
footer
:
[{
value
:
'我知道了'
,
routerLink
:
''
,
className
:
'weui-dialog__btn_primary'
}],
};
}
// 选择地址信息
selectedArea
(
type
)
{
// this.sendRemoveScrollContent.emit(1);
if
(
type
===
1
)
{
// 户籍地址
this
.
houseFlag
=
true
;
}
}
// 获取地址信息
getAreaInfo
(
e
,
type
)
{
// this.sendRemoveScrollContent.emit(0);
if
(
type
===
1
)
{
// 长期居住地
this
.
addressInfo
=
e
;
this
.
houseFlag
=
false
;
this
.
editEmployBasicInfo
.
provinceId
=
this
.
addressInfo
.
province
.
id
;
this
.
editEmployBasicInfo
.
cityId
=
this
.
addressInfo
.
city
.
id
;
this
.
editEmployBasicInfo
.
provinceName
=
this
.
addressInfo
.
province
.
value
;
this
.
editEmployBasicInfo
.
cityName
=
this
.
addressInfo
.
city
.
value
;
}
}
}
//获取城市地址
provCityQry
(){
this
.
myService
.
provCityQry
().
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
provinces
=
res
[
'data'
].
provinces
;
}
})
}
}
}
src/app/my/application-process/employee-info/employee-info.component.html
View file @
82a950ba
...
@@ -6,27 +6,27 @@
...
@@ -6,27 +6,27 @@
<div
class=
"contentDetail employ"
>
<div
class=
"contentDetail employ"
>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
报聘职级
</span>
<span>
报聘职级
</span>
<div>
{{membership?.mdDropOptionName}}
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
辅导人
</span>
<span>
辅导人
</span>
<div>
{{membership?.mentor}}
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
介绍人
</span>
<span>
介绍人
</span>
<div>
{{membership?.introducer}}
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
体系名
</span>
<span>
体系名
</span>
<div></div>
<div>
{{membership?.subsystem}}
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
体系负责人
</span>
<span>
体系负责人
</span>
<div></div>
<div>
{{membership?.subsystemOwner}}
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
<span>
分公司
</span>
<span>
分公司
</span>
<div></div>
<div>
{{membership?.branch}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/my/application-process/employee-info/employee-info.component.ts
View file @
82a950ba
...
@@ -10,6 +10,7 @@ import { MyService } from '../../my.service';
...
@@ -10,6 +10,7 @@ import { MyService } from '../../my.service';
export
class
EmployeeInfoComponent
implements
OnInit
{
export
class
EmployeeInfoComponent
implements
OnInit
{
hiringBasicInfoId
:
any
;
hiringBasicInfoId
:
any
;
membership
:
any
;
membership
:
any
;
mobileNo
:
string
;
constructor
(
private
activatedRoute
:
ActivatedRoute
,
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
router
:
Router
,
public
lifeCommonService
:
LifeCommonService
,
private
router
:
Router
,
public
lifeCommonService
:
LifeCommonService
,
public
myService
:
MyService
)
{
}
public
myService
:
MyService
)
{
}
...
@@ -18,6 +19,7 @@ export class EmployeeInfoComponent implements OnInit {
...
@@ -18,6 +19,7 @@ export class EmployeeInfoComponent implements OnInit {
const
title
=
this
.
activatedRoute
.
snapshot
.
data
[
0
][
'title'
];
const
title
=
this
.
activatedRoute
.
snapshot
.
data
[
0
][
'title'
];
this
.
lifeCommonService
.
setTitle
(
title
);
this
.
lifeCommonService
.
setTitle
(
title
);
this
.
hiringBasicInfoId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
:
null
;
this
.
hiringBasicInfoId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
hiringBasicInfoId
:
null
;
this
.
mobileNo
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
mobileNo
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
mobileNo
:
null
;
this
.
queryMembershipByHiringBasicInfoId
(
this
.
hiringBasicInfoId
);
this
.
queryMembershipByHiringBasicInfoId
(
this
.
hiringBasicInfoId
);
}
}
...
@@ -29,7 +31,7 @@ export class EmployeeInfoComponent implements OnInit {
...
@@ -29,7 +31,7 @@ export class EmployeeInfoComponent implements OnInit {
}
}
next
(){
next
(){
this
.
router
.
navigate
([
'/employee_basic_info'
],{
queryParams
:
{
hiringBasicInfoId
:
this
.
hiringBasicInfoId
}
});
this
.
router
.
navigate
([
'/employee_basic_info'
],{
queryParams
:
{
hiringBasicInfoId
:
this
.
hiringBasicInfoId
,
mobileNo
:
this
.
mobileNo
}
});
}
}
}
}
src/app/my/application-process/register/register.component.ts
View file @
82a950ba
...
@@ -116,7 +116,7 @@ export class RegisterComponent implements OnInit {
...
@@ -116,7 +116,7 @@ export class RegisterComponent implements OnInit {
};
};
this
.
authService
.
compare
(
compareCodeObj
).
subscribe
((
res
)
=>
{
this
.
authService
.
compare
(
compareCodeObj
).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
if
(
res
[
'success'
]){
this
.
router
.
navigate
([
'/employee_info'
],{
queryParams
:
{
hiringBasicInfoId
:
this
.
hiringBasicInfoId
}
});
this
.
router
.
navigate
([
'/employee_info'
],{
queryParams
:
{
hiringBasicInfoId
:
this
.
hiringBasicInfoId
,
mobileNo
:
this
.
userInfo
.
mobileNo
}
});
}
else
{
}
else
{
this
.
openPopInfo
(
res
[
'message'
]);
this
.
openPopInfo
(
res
[
'message'
]);
}
}
...
...
src/app/my/my.service.ts
View file @
82a950ba
...
@@ -413,4 +413,25 @@ export class MyService {
...
@@ -413,4 +413,25 @@ export class MyService {
return
this
.
http
return
this
.
http
.
post
(
url
,
JSON
.
stringify
({}));
.
post
(
url
,
JSON
.
stringify
({}));
}
}
/**
* 查询省份和城市
* @param planId
* @param insurerId
* @param productId
* @returns {Promise<any|TResult2|TResult1>}
*/
provCityQry
()
{
const
url
=
this
.
API
+
'/metadata/provCityQry'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
({
insurerId
:
11
}));
}
//报聘基本信息
saveBasicInfo
(
param
){
const
url
=
this
.
ydapi
+
'/practitionerHiring/saveBasicInfo'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
}
}
}
src/styles.scss
View file @
82a950ba
...
@@ -179,6 +179,28 @@ footer.fixed{
...
@@ -179,6 +179,28 @@ footer.fixed{
line-height
:
20px
;
line-height
:
20px
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.contentDetail.employ
.am-list-body
{
margin
:
5
.5px
10px
;
.am-list-item
{
padding-left
:
0
;
.am-list-line
{
padding
:
4px
0
9px
0
;
}
.am-list-content
{
color
:
#333
;
font-size
:
15px
;
}
}
}
.
contentDetail
.
employ
.
am-list-body
:
:
before
{
height
:
0
!
important
;
}
.
contentDetail
.
employ
.
am-list-body
:
:
after
{
background-color
:
#e8e8e8
;
-webkit-transform
:
scaleY
(
1
);
transform
:
scaleY
(
1
);
}
@keyframes
slowUp
{
@keyframes
slowUp
{
0
%
{
0
%
{
-webkit-transform
:
translateY
(
100%
);
-webkit-transform
:
translateY
(
100%
);
...
...
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