Commit fa290fb1 by sunchao

重要标签样式调整&电子报聘注册页样式调整、基本信息必填正则判断

parent 0d2e5d20
...@@ -156,23 +156,6 @@ export class LifeCommonService { ...@@ -156,23 +156,6 @@ export class LifeCommonService {
return str.replace(/<[^>]+>/g, "");//去掉所有的html标记 return str.replace(/<[^>]+>/g, "");//去掉所有的html标记
} }
/**
* 姓名正则
*/
nameValid(name) {
const NAME_REGEXP = /(^[\u4e00-\u9fa5]{1}[\u4e00-\u9fa5\.·()()。]{0,48}[\u4e00-\u9fa5]{1}$)|(^[a-zA-Z]{1}[a-zA-Z\s]{0,48}[a-zA-Z]{1}$)/;
return NAME_REGEXP.test(name);
}
/**
* 手机号码正则
* @param no
* @returns {boolean}
*/
mobileNoValid(no) {
const MOBILE_REGEXP = /^(1)\d{10}$/;
return MOBILE_REGEXP.test(no);
}
getFileName(str) { getFileName(str) {
let strArr = str.split('?'); let strArr = str.split('?');
let k = strArr[0], appU = k.split('/'); let k = strArr[0], appU = k.split('/');
...@@ -479,4 +462,43 @@ export class LifeCommonService { ...@@ -479,4 +462,43 @@ export class LifeCommonService {
return row; return row;
} }
} }
/**
* 姓名正则
*/
nameValid(name) {
const NAME_REGEXP = /(^[\u4e00-\u9fa5]{1}[\u4e00-\u9fa5\.·()()。]{0,48}[\u4e00-\u9fa5]{1}$)|(^[a-zA-Z]{1}[a-zA-Z\s]{0,48}[a-zA-Z]{1}$)/;
return NAME_REGEXP.test(name);
}
/**
* 手机号码正则
* @param no
* @returns {boolean}
*/
mobileNoValid(no) {
const MOBILE_REGEXP = /^(1)\d{10}$/;
return MOBILE_REGEXP.test(no);
}
/**
* 邮箱正则
*/
emailValid(email) {
const EMAIL_REGEXP = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/;
return EMAIL_REGEXP.test(email);
}
//检测字符串是否只有中文、英文、数字
checkCEN(val) {
const cen_reg = /^[A-Za-z0-9\u4e00-\u9fa5]+$/;
return cen_reg.test(val);
}
/**
* 检测统一社会信用代码只能是数字和字母
* @param val
* @returns {boolean}
*/
checkTaxNo(val) {
const taxNo_reg = /[a-zA-Z0-9]{5,20}/;
return taxNo_reg.test(val);
}
} }
...@@ -44,13 +44,16 @@ ...@@ -44,13 +44,16 @@
</li> </li>
</ng-container> </ng-container>
</ul> </ul>
<div class="important_mark" [ngStyle]="{'bottom':addTrack.taskType == 2?'-35%':'5px'}">
<span [ngClass]="{'circle':addTrack.taskImportantTag==true}" (click)="addTrack.taskImportantTag=!addTrack.taskImportantTag"></span>
<div>重要标签</div>
</div>
</div> </div>
<div class="part_wrapper part2"> <div class="part_wrapper part2">
<div style="font-size: 18px;">选择任务需要的时间</div> <div style="display: flex;justify-content: space-between;">
<div style="font-size: 18px;">选择任务需要的时间</div>
<div class="important_mark">
<span [ngClass]="{'circle':addTrack.taskImportantTag==true}" (click)="addTrack.taskImportantTag=!addTrack.taskImportantTag"></span>
<div>重要标签</div>
</div>
</div>
<div class="timeContent"> <div class="timeContent">
<div class="picker_list"> <div class="picker_list">
<PickerView [data]="seasons" [cols]='3' [cascade]="false" [ngModel]="addTrack.taskTimeFrom" [indicatorStyle]="{'background':'#f6f6f6','border-radius':'50px','z-index':'0'}" (ngModelChange)="onChange($event,1)"></PickerView> <PickerView [data]="seasons" [cols]='3' [cascade]="false" [ngModel]="addTrack.taskTimeFrom" [indicatorStyle]="{'background':'#f6f6f6','border-radius':'50px','z-index':'0'}" (ngModelChange)="onChange($event,1)"></PickerView>
......
...@@ -68,14 +68,11 @@ ul,ol{ ...@@ -68,14 +68,11 @@ ul,ol{
} }
.important_mark{ .important_mark{
position: absolute;
right: 3%;
font-size: 12px; font-size: 12px;
color: #a0a0a0; color: #a0a0a0;
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 5px;
z-index: 100;
span{ span{
width: 15px; width: 15px;
height: 15px; height: 15px;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<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"> <input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.name" (blur)="bs(2)">
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>证件类型</span> <span>证件类型</span>
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
<span>证件号</span> <span>证件号</span>
<input type="text" class="form-control" (blur)="bs(1)" [(ngModel)]="editEmployBasicInfo.idNo"> <input type="text" class="form-control" (blur)="bs(1)" [(ngModel)]="editEmployBasicInfo.idNo">
</div> </div>
<List [className]="'date-picker-list'"> <List [className]="'date-picker-list'">
<ListItem <ListItem
DatePicker DatePicker
...@@ -30,17 +29,18 @@ ...@@ -30,17 +29,18 @@
[arrow]="'horizontal'" [arrow]="'horizontal'"
[mode]="'date'" [mode]="'date'"
[minDate] ="minDate" [minDate] ="minDate"
[maxDate] = "maxDate"
[(ngModel)]="showPractitionerBirthdate" [(ngModel)]="showPractitionerBirthdate"
(onOk)="onOk($event)" (onOk)="onOk($event)"
[disabled]="editEmployBasicInfo.idTypeId==1" [disabled]="editEmployBasicInfo.idTypeId==1"
> >
生日 出生日期
</ListItem> </ListItem>
</List> </List>
<div class="contentItem"> <div class="contentItem">
<span>性别</span> <span>性别</span>
<select class="form-control" [(ngModel)]="editEmployBasicInfo.gender" [disabled]="editEmployBasicInfo.idTypeId==1"> <select class="form-control" [(ngModel)]="editEmployBasicInfo.gender" [disabled]="editEmployBasicInfo.idTypeId==1" (blur)="bs(null)">
<option value=null>请选择</option> <option value=null>请选择</option>
<option value='1'></option> <option value='1'></option>
<option value="2"></option> <option value="2"></option>
...@@ -63,12 +63,12 @@ ...@@ -63,12 +63,12 @@
<div class="contentItem"> <div class="contentItem">
<span>居住地址</span> <span>居住地址</span>
<div> <div>
<input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.residentAddress"> <input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.residentAddress" (blur)="bs(3)">
</div> </div>
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>E-mail</span> <span>E-mail</span>
<div><input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.email"></div> <div><input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.email" (blur)="bs(4)"></div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -20,6 +20,7 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -20,6 +20,7 @@ export class EmployeeBasicInfoComponent implements OnInit {
addressInfo:any; addressInfo:any;
provinces:Array<any>; provinces:Array<any>;
minDate:any = new Date('1900-01-01'); minDate:any = new Date('1900-01-01');
maxDate:any = new Date();
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) { }
...@@ -60,7 +61,6 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -60,7 +61,6 @@ export class EmployeeBasicInfoComponent implements OnInit {
console.log(result) console.log(result)
this.editEmployBasicInfo.practitionerBirthdate = this.currentDateFormat(result, 'yyyy-mm-dd'); this.editEmployBasicInfo.practitionerBirthdate = this.currentDateFormat(result, 'yyyy-mm-dd');
this.showPractitionerBirthdate = result; this.showPractitionerBirthdate = result;
console.log(this.editEmployBasicInfo)
} }
idTypeChange(e){ idTypeChange(e){
...@@ -70,20 +70,42 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -70,20 +70,42 @@ export class EmployeeBasicInfoComponent implements OnInit {
this.editEmployBasicInfo.idType = idType.name; this.editEmployBasicInfo.idType = idType.name;
} }
} }
console.log(this.editEmployBasicInfo)
} }
/** /**
* 1.证件号 * 1.证件号
* 2.姓名
* 3.居住地址
* 4.email
*/ */
bs(type) { bs(type) {
this.lifeCommonService.scrollTo(); this.lifeCommonService.scrollTo();
if (type) { if (type===1) {
if(type === 1 && this.editEmployBasicInfo.idTypeId==1){ if(this.editEmployBasicInfo.idNo){
if(this.editEmployBasicInfo.idNo){ this.editEmployBasicInfo.idNo = this.editEmployBasicInfo.idNo.trim();
this.editEmployBasicInfo.idNo = this.editEmployBasicInfo.idNo.trim(); if(this.editEmployBasicInfo.idTypeId==1){
//身份证
this.idCardInput(this.editEmployBasicInfo.idNo);
}else{
if(!this.lifeCommonService.checkTaxNo(this.editEmployBasicInfo.idNo)){
this.openPopInfo('证件号码错误');
}
} }
this.idCardInput(this.editEmployBasicInfo.idNo); }
}
if(type===2){
if(this.editEmployBasicInfo.name){
this.editEmployBasicInfo.name = this.editEmployBasicInfo.name.trim();
}
}
if(type===3){
if(this.editEmployBasicInfo.residentAddress){
this.editEmployBasicInfo.residentAddress = this.editEmployBasicInfo.residentAddress.trim()
}
}
if(type===4){
if(this.editEmployBasicInfo.email){
this.editEmployBasicInfo.email = this.editEmployBasicInfo.email.trim();
} }
} }
} }
...@@ -93,7 +115,7 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -93,7 +115,7 @@ export class EmployeeBasicInfoComponent implements OnInit {
* 身份证号码输入,获取生日和性别 * 身份证号码输入,获取生日和性别
*/ */
idCardInput(val) { idCardInput(val) {
if (val && val.length === 18) { if (val) {
if (!this.lifeCommonService.IdCodeValid(val).pass) { if (!this.lifeCommonService.IdCodeValid(val).pass) {
this.openPopInfo(this.lifeCommonService.IdCodeValid(val).msg) this.openPopInfo(this.lifeCommonService.IdCodeValid(val).msg)
return; return;
...@@ -101,11 +123,55 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -101,11 +123,55 @@ export class EmployeeBasicInfoComponent implements OnInit {
this.editEmployBasicInfo.practitionerBirthdate = this.lifeCommonService.dateFormat(this.lifeCommonService.IdCodeValid(val).birthDay, 'yyyy-MM-dd'); this.editEmployBasicInfo.practitionerBirthdate = this.lifeCommonService.dateFormat(this.lifeCommonService.IdCodeValid(val).birthDay, 'yyyy-MM-dd');
this.editEmployBasicInfo.gender = this.lifeCommonService.IdCodeValid(val).gender; this.editEmployBasicInfo.gender = this.lifeCommonService.IdCodeValid(val).gender;
this.showPractitionerBirthdate = new Date(this.editEmployBasicInfo.practitionerBirthdate); this.showPractitionerBirthdate = new Date(this.editEmployBasicInfo.practitionerBirthdate);
console.log(this.showPractitionerBirthdate)
} }
} }
next(){ next(){
if(!this.editEmployBasicInfo.name){
this.openPopInfo('请输入您的姓名!')
return;
}else{
if(!this.lifeCommonService.nameValid(this.editEmployBasicInfo.name)){
this.openPopInfo('请输入您的真实姓名!')
}
}
if(!this.editEmployBasicInfo.idTypeId || !this.editEmployBasicInfo.idType){
this.openPopInfo('请选择您的证件类型!')
return;
}
if(!this.editEmployBasicInfo.idNo){
this.openPopInfo('请输入您的证件号!')
return;
}else{
if(!this.lifeCommonService.checkTaxNo(this.editEmployBasicInfo.idNo)){
this.openPopInfo('证件号码错误')
}
}
if(!this.editEmployBasicInfo.practitionerBirthdate){
this.openPopInfo('请选择您的出生日期!')
return;
}
if(!this.editEmployBasicInfo.gender){
this.openPopInfo('请选择您的性别!')
return;
}
if(!this.editEmployBasicInfo.provinceId && !this.editEmployBasicInfo.cityId){
this.openPopInfo('请选择您的户籍!')
return;
}
if(!this.editEmployBasicInfo.residentAddress){
this.openPopInfo('请输入您的居住地址!')
return;
}
if(!this.editEmployBasicInfo.email){
this.openPopInfo('请输入您的email!')
return;
}else{
if(!this.lifeCommonService.emailValid(this.editEmployBasicInfo.email)){
this.openPopInfo('email格式错误!')
return;
}
}
this.myService.saveBasicInfo(this.editEmployBasicInfo).subscribe((res)=>{ this.myService.saveBasicInfo(this.editEmployBasicInfo).subscribe((res)=>{
if(res['success']){ if(res['success']){
this.router.navigate(['/work_experience'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); this.router.navigate(['/work_experience'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
...@@ -115,6 +181,7 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -115,6 +181,7 @@ export class EmployeeBasicInfoComponent implements OnInit {
}) })
} }
// 打开弹窗 // 打开弹窗
openPopInfo(message) { openPopInfo(message) {
this.isNeedAlert = true; this.isNeedAlert = true;
...@@ -125,6 +192,10 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -125,6 +192,10 @@ export class EmployeeBasicInfoComponent implements OnInit {
}; };
} }
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
// 选择地址信息 // 选择地址信息
selectedArea(type) { selectedArea(type) {
// this.sendRemoveScrollContent.emit(1); // this.sendRemoveScrollContent.emit(1);
......
...@@ -7,26 +7,27 @@ ...@@ -7,26 +7,27 @@
<div class="contentDetail employ"> <div class="contentDetail employ">
<div class="contentItem"> <div class="contentItem">
<span>最高学历:如本科、专科、硕士</span> <span>最高学历:如本科、专科、硕士</span>
<select class="form-control" name="" id=""> <select class="form-control" name="" id="" [(ngModel)]="lastGraduateGradeId" (ngModelChange)="selectEducationLevel($event)">
<option value="">请选择</option> <option value=null>请选择</option>
<option [value]="idType.id" *ngFor="let idType of this.idTypesList"> <option [value]="educationLevel.id" *ngFor="let educationLevel of educationLevelList">
{{idType.name}} {{educationLevel.name}}
</option> </option>
</select> </select>
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>毕业学校</span> <span>毕业学校</span>
<input class="form-control" [(ngModel)]="lastGraduateSchool"/>
</div> </div>
<div class="contentItem" style="border:none;"> <div class="contentItem" style="border:none;">
<span>毕业证</span> <span>毕业证</span>
<div></div> <div></div>
</div> </div>
</div> </div>
<div class="photo_wrapper"> <div class="photo_wrapper" *ngIf="!certificationVxUrl">
<img src="assets/images/camera.png" alt="" /> <img src="assets/images/camera.png" alt="" />
<div style="margin-top: 10px;">点击添加毕业证照片</div> <div style="margin-top: 10px;" (click)="selectPic()">点击添加毕业证照片</div>
</div> </div>
<img src="{{certificationVxUrl}}" alt="毕业证照片" *ngIf="certificationVxUrl">
<div class="tips"> <div class="tips">
<p>(jpg,png 文件大小不大于1mb)</p> <p>(jpg,png 文件大小不大于1mb)</p>
</div> </div>
...@@ -34,4 +35,5 @@ ...@@ -34,4 +35,5 @@
<footer class="fixed" (click)="next()"> <footer class="fixed" (click)="next()">
保存并下一步 保存并下一步
</footer> </footer>
</div> </div>
\ No newline at end of file <ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
import { Component, OnInit } from '@angular/core'; import { Component, OnInit ,ChangeDetectorRef} 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";
declare const wx: any;
@Component({ @Component({
selector: 'ydlife-employee-education', selector: 'ydlife-employee-education',
templateUrl: './employee-education.component.html', templateUrl: './employee-education.component.html',
...@@ -10,9 +10,17 @@ import { LifeCommonService } from "../../../common/life-common.service"; ...@@ -10,9 +10,17 @@ import { LifeCommonService } from "../../../common/life-common.service";
}) })
export class EmployeeEducationComponent implements OnInit { export class EmployeeEducationComponent implements OnInit {
hiringBasicInfoId:any; hiringBasicInfoId:any;
educationLevelList:Array<any>;
lastGraduateGrade:string = null;
lastGraduateGradeId:string = null;
lastGraduateSchool:string;
certificationVxUrl:string;
serverId: any;
toastDialog: boolean;
toastInfo: any;
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,private changeDetectorRef: ChangeDetectorRef) {
} }
...@@ -20,10 +28,82 @@ export class EmployeeEducationComponent implements OnInit { ...@@ -20,10 +28,82 @@ export class EmployeeEducationComponent 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.educationLevelQuery();
} }
next(){ next(){
this.router.navigate(['/personal_statement'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
lastGraduateGrade:this.lastGraduateGrade,
lastGraduateSchool:this.lastGraduateSchool,
certificationVxUrl:this.certificationVxUrl
}
this.myService.saveLastGraduateGrade(param).subscribe((res)=>{
if(res['success']){
this.router.navigate(['/personal_statement'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
// 教育等级查询
educationLevelQuery() {
this.myService.educationLevelQuery().subscribe(res => {
if (res['success']) {
this.educationLevelList = res['data']['educationLevelList']
}
})
}
//选择教育等级
selectEducationLevel(event){
this.lastGraduateGradeId = event;
for(let educationLevel of this.educationLevelList){
if(event == educationLevel.id){
this.lastGraduateGrade = educationLevel.name;
}
}
}
selectPic(){
// 5.1 拍照、本地选图
const t = this;
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
const THIS = t;
wx.uploadImage({
localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (response) {
THIS.serverId = response.serverId; // 返回图片的服务器端ID
const m = {
mediaId: response.serverId,
origin: 'ydLife'
};
THIS.myService.mediaGet(m).subscribe(async e => {
if (e['success']) {
THIS.certificationVxUrl = e['data']['imgUrl'];
THIS.changeDetectorRef.markForCheck();
THIS.changeDetectorRef.detectChanges();
} else {
alert(e['message']);
}
});
}
});
}
});
} }
} }
...@@ -77,7 +77,6 @@ export class EmployeeIdCardComponent implements OnInit { ...@@ -77,7 +77,6 @@ export class EmployeeIdCardComponent implements OnInit {
origin: 'ydLife' origin: 'ydLife'
}; };
THIS.myService.mediaGet(m).subscribe(async e => { THIS.myService.mediaGet(m).subscribe(async e => {
alert(e['data'])
if (e['success']) { if (e['success']) {
if(type=='front'){ if(type=='front'){
THIS.frontVxUrl = e['data']['imgUrl']; THIS.frontVxUrl = e['data']['imgUrl'];
......
<div class="invitation_wrapper"> <div class="invitation_wrapper">
<img src="assets/images/banner.jpg" alt="邀请" /> <img src="assets/images/banner.jpg" alt="邀请" />
<div class="invitation_content"> <div class="invitation_content">
<p *ngIf="type=='inviter'">您将邀请{{invitatorName}}</p> <p *ngIf="type=='inviter'">您将邀请{{inviteeName}}</p>
<p *ngIf="type=='invitees'">{{invitatorName}}邀请您</p> <p *ngIf="type=='invitees'">{{invitatorName}}邀请您</p>
<p>加入银盾保险经纪</p> <p>加入银盾保险经纪</p>
</div> </div>
......
...@@ -11,10 +11,13 @@ import { environment } from '../../../../environments/environment'; ...@@ -11,10 +11,13 @@ import { environment } from '../../../../environments/environment';
export class InvitationComponent implements OnInit { export class InvitationComponent implements OnInit {
//判断邀请人/被邀请人 //判断邀请人/被邀请人
type: string; type: string;
//邀请人名字
invitatorName:string; invitatorName:string;
lifeCustomerInfo: any; lifeCustomerInfo: any;
deviceType:any; deviceType:any;
hiringBasicInfoId:any; hiringBasicInfoId:any;
//被邀请人
inviteeName:string;
constructor(private myService: MyService, constructor(private myService: MyService,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService, public lifeCommonService: LifeCommonService,
...@@ -26,7 +29,8 @@ export class InvitationComponent implements OnInit { ...@@ -26,7 +29,8 @@ export class InvitationComponent implements OnInit {
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null; this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
this.type = this.activatedRoute.snapshot.data[0]['type']; this.type = this.activatedRoute.snapshot.data[0]['type'];
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.invitatorName = this.activatedRoute.snapshot.queryParams.name?this.activatedRoute.snapshot.queryParams.name:null; this.invitatorName = this.activatedRoute.snapshot.queryParams.invitatorName?this.activatedRoute.snapshot.queryParams.invitatorName:null;
this.inviteeName = this.activatedRoute.snapshot.queryParams.inviteeName?this.activatedRoute.snapshot.queryParams.inviteeName:null;
this.deviceType = this.lifeCommonService.checkDeviceType(); this.deviceType = this.lifeCommonService.checkDeviceType();
} }
...@@ -38,7 +42,7 @@ export class InvitationComponent implements OnInit { ...@@ -38,7 +42,7 @@ export class InvitationComponent implements OnInit {
this.lifeCommonService.wxShare( this.lifeCommonService.wxShare(
`${this.lifeCustomerInfo.practitionerBasicInfo.name}`, `${this.lifeCustomerInfo.practitionerBasicInfo.name}`,
'您的好友向你发出了邀请。加入靠谱的团队、一起做靠谱的事。', '您的好友向你发出了邀请。加入靠谱的团队、一起做靠谱的事。',
`https://${window.location.host}/ydLife/invitees?hiringBasicInfoId=${this.hiringBasicInfoId}`, `https://${window.location.host}/ydLife/invitees?hiringBasicInfoId=${this.hiringBasicInfoId}&invitatorName=${this.invitatorName}`,
imgUrl); imgUrl);
}else{ }else{
alert('请在手机微信端发送邀请'); alert('请在手机微信端发送邀请');
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<span class="page_mark"> 3/8</span> <span class="page_mark"> 3/8</span>
</div> </div>
<div class="content"> <div class="content">
<div class="photo_wrapper" (click)="selectPic('add')" *ngIf="!vxUrl"> <div class="photo_wrapper" (click)="selectPic()" *ngIf="!vxUrl">
<img src="assets/images/camera.png" alt="" style="width: 29px;height: 29px;margin-bottom: 20px;"/> <img src="assets/images/camera.png" alt="" style="width: 29px;height: 29px;margin-bottom: 20px;"/>
<div>点击添加</div> <div>点击添加</div>
</div> </div>
<img alt="个人照片" src="{{vxUrl}}" *ngIf="vxUrl" (click)="selectPic('edit')"> <img alt="个人照片" src="{{vxUrl}}" *ngIf="vxUrl" (click)="selectPic()">
<div class="tips"> <div class="tips">
<p>2寸照片,一年之内近照</p> <p>2寸照片,一年之内近照</p>
<p>(请勿使用生活照,大小小于1mb)</p> <p>(请勿使用生活照,大小小于1mb)</p>
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit,ChangeDetectorRef } 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 { ChangeDetectorRef } from '@angular/core';
declare const wx: any; declare const wx: any;
@Component({ @Component({
selector: 'ydlife-personal-photos', selector: 'ydlife-personal-photos',
...@@ -26,8 +25,7 @@ export class PersonalPhotosComponent implements OnInit { ...@@ -26,8 +25,7 @@ export class PersonalPhotosComponent implements OnInit {
} }
selectPic(){
selectPic(type){
// 5.1 拍照、本地选图 // 5.1 拍照、本地选图
const t = this; const t = this;
wx.chooseImage({ wx.chooseImage({
...@@ -47,7 +45,6 @@ export class PersonalPhotosComponent implements OnInit { ...@@ -47,7 +45,6 @@ export class PersonalPhotosComponent implements OnInit {
origin: 'ydLife' origin: 'ydLife'
}; };
THIS.myService.mediaGet(m).subscribe(async e => { THIS.myService.mediaGet(m).subscribe(async e => {
alert(e['data'])
if (e['success']) { if (e['success']) {
THIS.vxUrl = e['data']['imgUrl']; THIS.vxUrl = e['data']['imgUrl'];
THIS.changeDetectorRef.markForCheck(); THIS.changeDetectorRef.markForCheck();
......
...@@ -6,24 +6,13 @@ ...@@ -6,24 +6,13 @@
</div> </div>
<div class="content"> <div class="content">
<ul> <ul>
<li class="selected"> <li *ngFor="let personalStatements of dropOptionsInfoList" (click)="selectStatements(personalStatements)"
<span> 未有犯罪记录</span> [ngClass]="{'selected':personalStatements.selected}">
<span class="iconfont icon-ar-r" ></span> <span> {{personalStatements.dropOptionName}}</span>
</li> <span class="iconfont icon-gougou" *ngIf="personalStatements.selected"></span>
<li>
<span>未有失信纪录</span>
<span class="iconfont icon-ar-r" ></span>
</li>
<li>
<span>未在公信平台存有纪录</span>
<span class="iconfont icon-ar-r" ></span>
</li>
<li>
<span>曾报聘于其他保险机构</span>
<span class="iconfont icon-ar-r" ></span>
</li> </li>
</ul> </ul>
<textarea class="form-control" cols="10" rows="5" placeholder="输入报聘"></textarea> <textarea class="form-control" cols="10" rows="5" placeholder="输入报聘" #autofocusFlag ></textarea>
</div> </div>
<footer class="fixed" (click)="next()"> <footer class="fixed" (click)="next()">
保存并下一步 保存并下一步
...@@ -62,4 +51,5 @@ ...@@ -62,4 +51,5 @@
<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
...@@ -26,7 +26,33 @@ ...@@ -26,7 +26,33 @@
ul li.selected{ ul li.selected{
background: #72B968; background: #72B968;
color: #fff; color: #fff;
.ok-icon {
display: inline-block;
width: 10px;
height: 3px;
background: #00a5e0;
line-height: 0;
font-size: 0;
font-weight: 100;
vertical-align: middle;
-webkit-transform: rotate(45deg);
outline: 0;
margin-right: 8px;
}
/*勾的css样式 右侧部分 */
.ok-icon:after {
content: '/';
display: block;
width: 20px;
height: 3px;
background: #00a5e0;
-webkit-transform: rotate(-90deg) translateY(-50%) translateX(50%);
outline: 0;
margin-right: 8px;
}
} }
textarea{ textarea{
background: #F8F8F8; background: #F8F8F8;
border: 0; border: 0;
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit,ViewChild,ElementRef } from '@angular/core';
import { ActivatedRoute,Router } from "@angular/router"; import { ActivatedRoute,Router } from "@angular/router";
import { MyService } from '../../my.service'; import { MyService } from '../../my.service';
import { LifeCommonService } from "../../../common/life-common.service"; import { LifeCommonService } from "../../../common/life-common.service";
...@@ -9,9 +9,15 @@ import { LifeCommonService } from "../../../common/life-common.service"; ...@@ -9,9 +9,15 @@ import { LifeCommonService } from "../../../common/life-common.service";
styleUrls: ['./personal-statement.component.scss'] styleUrls: ['./personal-statement.component.scss']
}) })
export class PersonalStatementComponent implements OnInit { export class PersonalStatementComponent implements OnInit {
@ViewChild('autofocusFlag') elementView: ElementRef;
//判断是个人声明还是合同确认 //判断是个人声明还是合同确认
type:any; type:any;
hiringBasicInfoId:any; hiringBasicInfoId:any;
dropOptionsInfoList:Array<any>;
isNeedAlert: boolean;
dialogInfo: any;
autofocusFlag:boolean;
dropOptionsInfoListParam:any;
constructor(private myService: MyService, constructor(private myService: MyService,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService, public lifeCommonService: LifeCommonService,
...@@ -23,13 +29,68 @@ export class PersonalStatementComponent implements OnInit { ...@@ -23,13 +29,68 @@ export class PersonalStatementComponent implements OnInit {
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;
console.log(this.type) console.log(this.type)
if(this.type==="personal_statement"){
this.dropOptionsQuery()
}
} }
next(){ next(){
if(this.type == 'personal_statement'){ if(this.type == 'personal_statement'){
this.router.navigate(['/contract'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); this.savePersonalStatements()
// this.router.navigate(['/contract'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else if(this.type == 'contract'){ }else if(this.type == 'contract'){
this.router.navigate(['/signature'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); this.router.navigate(['/signature'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
} }
} }
dropOptionsQuery(){
this.myService.dropOptionsQuery({code:'EHiring_Personal_Statements'}).subscribe((res)=>{
if(res['success']){
this.dropOptionsInfoList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'];
}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' }],
};
}
selectStatements(personalStatements){
personalStatements.selected = !personalStatements.selected;
if(personalStatements.id == '241' && personalStatements.selected == true){
//点击曾经报聘输入报聘自动获取焦点
this.elementView.nativeElement.focus();
}
}
savePersonalStatements(){
for(let i=0;i<this.dropOptionsInfoList.length;i++){
this.dropOptionsInfoList[i]['personalStatements'] = this.dropOptionsInfoList[i]['dropOptionName'];
this.dropOptionsInfoList[i]['personalStatementsId'] = this.dropOptionsInfoList[i]['id'];
if(this.dropOptionsInfoList[i]['selected'] == true){
this.dropOptionsInfoList[i]['status'] = 1;
}else{
this.dropOptionsInfoList[i]['status'] = 0;
}
// this.dropOptionsInfoListParam = this.dropOptionsInfoListParam.push(
// {hiringBasicInfoId:this.hiringBasicInfoId,
// personalStatements:this.dropOptionsInfoList[i]['dropOptionName'],
// personalStatementsId:this.dropOptionsInfoList[i]['id'],
// status:this.dropOptionsInfoList[i]['status']
// }
// )
}
console.log(this.dropOptionsInfoListParam)
}
} }
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</div> </div>
<footer style="width: 80%;margin-top: 30px;" (click)="checkVerificationCode()">下一步</footer> <footer style="width: 80%;margin-top: 30px;" (click)="checkVerificationCode()">下一步</footer>
<img style="position: absolute;bottom: 0;left: 0;" src="assets/images/register_bg.png" alt=""> <img style="position: relative;bottom: 0;left: 0;z-index: 1;" src="assets/images/register_bg.png" alt="">
</div> </div>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert> <ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast> <ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
.register_wrapper{ .register_wrapper{
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
position: relative;
img.logo{ img.logo{
width: 25%; width: 25%;
margin-top: 20%; margin-top: 15%;
} }
.weui-form__control-area{ .weui-form__control-area{
width: 80%; width: 80%;
......
...@@ -454,4 +454,25 @@ export class MyService { ...@@ -454,4 +454,25 @@ export class MyService {
return this.http return this.http
.post(url, JSON.stringify(param)); .post(url, JSON.stringify(param));
} }
//学历
saveLastGraduateGrade(param){
const url = this.ydapi + '/practitionerHiring/saveLastGraduateGrade';
return this.http
.post(url, JSON.stringify(param));
}
//银行信息保存
saveBankAccount(param){
const url = this.ydapi + '/practitionerHiring/saveBankAccount';
return this.http
.post(url, JSON.stringify(param));
}
//个人申明
savePersonalStatements(param){
const url = this.ydapi + '/practitionerHiring/savePersonalStatements';
return this.http
.post(url, JSON.stringify(param));
}
} }
...@@ -45,6 +45,7 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -45,6 +45,7 @@ export class RecruitingDetailComponent implements OnInit {
practitionerLevelInfos:Array<any>; practitionerLevelInfos:Array<any>;
practitionerList:Array<any>; practitionerList:Array<any>;
hiringBasicInfoId:any; hiringBasicInfoId:any;
practitionerName:any;
constructor( constructor(
private activateRoute: ActivatedRoute, private activateRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService, public lifeCommonService: LifeCommonService,
...@@ -59,11 +60,14 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -59,11 +60,14 @@ export class RecruitingDetailComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.practitionerName = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerBasicInfo']['name'];
this.isPC = this.lifeCommonService.checkDeviceType(); this.isPC = this.lifeCommonService.checkDeviceType();
//潜在增员id //潜在增员id
this.potentialId = Number(this.activateRoute.snapshot.paramMap.get('id')); this.potentialId = Number(this.activateRoute.snapshot.paramMap.get('id'));
//状态 //状态
this.status = this.activateRoute.snapshot.queryParams['status']; this.status = this.activateRoute.snapshot.queryParams['status'];
this.hiringBasicInfoId = this.activateRoute.snapshot.queryParams['hiringBasicInfoId']?this.activateRoute.snapshot.queryParams['hiringBasicInfoId']:null;
this.dropOptionsQuery(1); this.dropOptionsQuery(1);
this.educationLevelQuery(); this.educationLevelQuery();
if (this.potentialId === 0) { if (this.potentialId === 0) {
...@@ -81,8 +85,6 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -81,8 +85,6 @@ export class RecruitingDetailComponent implements OnInit {
} }
//获取基本信息 //获取基本信息
this.recruitListQuery(); this.recruitListQuery();
this.employQuery = new EmployQuery(this.employQuery.name,null,null,this.potentialId,null,null,null,null,null,null,null,null,null,null,null,null)
} }
selectTab(id) { selectTab(id) {
...@@ -103,6 +105,12 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -103,6 +105,12 @@ export class RecruitingDetailComponent implements OnInit {
this.employQuery.name = this.editRecruiting.name; this.employQuery.name = this.editRecruiting.name;
this.practitionerTypeAndLevelQuery(); this.practitionerTypeAndLevelQuery();
this.practitionerListQuery(); this.practitionerListQuery();
//初始化被邀请人信息
if(this.hiringBasicInfoId){
this.queryMembershipByHiringBasicInfoId();
}else{
this.employQuery = new EmployQuery(this.employQuery.name,null,null,this.potentialId,null,null,null,null,null,null,null,null,null,null,null,null)
}
} }
} else { } else {
this.selectedId = 1; this.selectedId = 1;
...@@ -464,7 +472,7 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -464,7 +472,7 @@ export class RecruitingDetailComponent implements OnInit {
} }
invite(){ invite(){
this.router.navigate(['/inviter'], { queryParams: { name: this.employQuery.name ,hiringBasicInfoId:this.hiringBasicInfoId} }); this.router.navigate(['/inviter'], { queryParams: { inviteeName: this.employQuery.name ,hiringBasicInfoId:this.hiringBasicInfoId,invitatorName:this.practitionerName} });
} }
/** /**
...@@ -525,4 +533,24 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -525,4 +533,24 @@ export class RecruitingDetailComponent implements OnInit {
return; return;
} }
} }
queryMembershipByHiringBasicInfoId(){
this.myService.queryMembershipByHiringBasicInfoId({hiringBasicInfoId:this.hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
const membership = res['data']['membership'];
this.employQuery = membership;
this.employQuery.name = this.editRecruiting.name;
this.employQuery.practitionerPotentialId = this.potentialId;
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
this.employQuery = new EmployQuery(this.employQuery.name,null,null,this.potentialId,null,null,null,null,null,null,null,null,null,null,null,null)
}
})
}
} }
...@@ -17,6 +17,7 @@ export class RecruitingComponent implements OnInit { ...@@ -17,6 +17,7 @@ export class RecruitingComponent implements OnInit {
//控制弹框 //控制弹框
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
hiringBasicInfoId:any;
constructor(private router: Router, private myService: MyService,private activatedRoute: ActivatedRoute) { constructor(private router: Router, private myService: MyService,private activatedRoute: ActivatedRoute) {
this.pageType = this.activatedRoute.snapshot.data[0]['type']; this.pageType = this.activatedRoute.snapshot.data[0]['type'];
} }
...@@ -70,7 +71,7 @@ export class RecruitingComponent implements OnInit { ...@@ -70,7 +71,7 @@ export class RecruitingComponent implements OnInit {
isJumpToDetail(potentialId,recruitingItem?:any){ isJumpToDetail(potentialId,recruitingItem?:any){
if(this.pageType == 'recruiting'){ if(this.pageType == 'recruiting'){
this.router.navigate([`/recruiting/${potentialId}`], { queryParams: { status: this.selectedId} }); this.router.navigate([`/recruiting/${potentialId}`], { queryParams: { status: this.selectedId,hiringBasicInfoId:recruitingItem.hiringBasicInfoId} });
}else{ }else{
if(!this.selectedRecruiting){ if(!this.selectedRecruiting){
this.selectedRecruiting = recruitingItem; this.selectedRecruiting = recruitingItem;
......
...@@ -169,6 +169,7 @@ footer.fixed{ ...@@ -169,6 +169,7 @@ footer.fixed{
height: 56px; height: 56px;
line-height: 56px; line-height: 56px;
border-radius: 0; border-radius: 0;
z-index: 100;
} }
.page_mark{ .page_mark{
width: 40px; width: 40px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment