Commit 5f0c6d70 by sunchao

控制必填&图片在微信端上传

parent fa290fb1
...@@ -75,6 +75,16 @@ export class LifeCommonService { ...@@ -75,6 +75,16 @@ export class LifeCommonService {
return deviceType; return deviceType;
} }
//检测是否微信浏览器
isWeiXin(){
let ua:any = window.navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
return true;
}else{
return false;
}
}
/** /**
* shareCode生成器 * shareCode生成器
*/ */
......
export class ExperienceQuery { export class ExperienceQuery {
constructor( constructor(
public hiringBasicInfoId?:any,
public workingCompany?:string, public workingCompany?:string,
public position?:string, public position?:string,
public workingStart?:string, public workingStart?:string,
......
<div class="wrapper">
<div class="title">
<div>银行卡号</div>
<span class="page_mark"> 5/8</span>
</div>
<div class="content">
<div class="contentDetail employ">
<div class="contentItem">
<input class="form-control" name="" id="" placeholder="开户行" [(ngModel)]="bankAccountOpening"/>
</div>
<div class="contentItem">
<input class="form-control" placeholder="银行卡号:例如 630 1234 3453 5435" [(ngModel)]="bankAccountId"/>
</div>
<div class="contentItem" style="border:none;">
<input class="form-control" name="" id="" style="text-align: left;padding: 6px 0;" placeholder="再次输入银行卡号以确认"/>
</div>
</div>
</div>
<footer class="fixed" (click)="next()">
保存并下一步
</footer>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
.wrapper {
font-size: 15px;
background: #fff;
min-height: 100%;
select{
-webkit-appearance: none;
}
input::-webkit-input-placeholder {font-size:15px;}
input:-moz-placeholder {font-size:15px;}
input::-moz-placeholder {font-size:15px;}
input:-ms-input-placeholder {font-size:15px;}
.title{
padding: 10px 13px 0 13px;
display: flex;
justify-content: space-between;
font-weight: bold;
align-items: center;
}
.content{
padding: 10px 5px;
position: relative;
.contentDetail {
.contentItem {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 8px 5px 8px;
> span:first-child{
white-space: nowrap;
}
input.form-control,select.form-control {
display: inline-block;
// width: 60%;
background: none;
outline: none;
border: none;
text-align: left;
box-shadow: none;
display: flex;
flex-wrap: wrap;
font-size: 16px;
padding: 6px 0;
}
}
.contentItem:last-child {
border-bottom: none;
}
select.form-control[disabled] {
background-color: transparent;
color: #999;
}
}
.contentDetail.employ .contentItem{
padding: 10px 0;
border-bottom: 1px #e8e8e8 solid;
margin: 0 8px 0 8px;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BankCardComponent } from './bank-card.component';
describe('BankCardComponent', () => {
let component: BankCardComponent;
let fixture: ComponentFixture<BankCardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BankCardComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BankCardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MyService } from '../../my.service';
import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service";
@Component({
selector: 'ydlife-bank-card',
templateUrl: './bank-card.component.html',
styleUrls: ['./bank-card.component.scss']
})
export class BankCardComponent implements OnInit {
hiringBasicInfoId:any;
bankAccountOpening:string;
bankAccountId:string;
toastDialog:boolean;
toastInfo:any;
sureBankAccountId:string;
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService) { }
ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
this.hiringBasicInfoId = this.activatedRoute.snapshot.queryParams.hiringBasicInfoId?this.activatedRoute.snapshot.queryParams.hiringBasicInfoId:null;
}
next(){
const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
bankAccountOpening:this.bankAccountOpening,
bankAccountId:this.bankAccountId
}
this.myService.saveBankAccount(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'
};
}
})
}
}
...@@ -181,7 +181,6 @@ export class EmployeeBasicInfoComponent implements OnInit { ...@@ -181,7 +181,6 @@ export class EmployeeBasicInfoComponent implements OnInit {
}) })
} }
// 打开弹窗 // 打开弹窗
openPopInfo(message) { openPopInfo(message) {
this.isNeedAlert = true; this.isNeedAlert = true;
......
<div class="wrapper"> <div class="wrapper">
<div class="title"> <div class="title">
<div>学历信息</div> <div>学历信息</div>
<span class="page_mark"> 5/8</span> <span class="page_mark"> 4/8</span>
</div> </div>
<div class="content"> <div class="content">
<div class="contentDetail employ"> <div class="contentDetail employ">
...@@ -36,4 +36,5 @@ ...@@ -36,4 +36,5 @@
保存并下一步 保存并下一步
</footer> </footer>
</div> </div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast> <ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file <ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
\ No newline at end of file
...@@ -18,6 +18,8 @@ export class EmployeeEducationComponent implements OnInit { ...@@ -18,6 +18,8 @@ export class EmployeeEducationComponent implements OnInit {
serverId: any; serverId: any;
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
isNeedAlert: boolean;
dialogInfo: any;
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService, private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService,private changeDetectorRef: ChangeDetectorRef) { public myService:MyService,private changeDetectorRef: ChangeDetectorRef) {
...@@ -32,25 +34,39 @@ export class EmployeeEducationComponent implements OnInit { ...@@ -32,25 +34,39 @@ export class EmployeeEducationComponent implements OnInit {
} }
next(){ next(){
const param = { if(!this.lastGraduateGrade){
hiringBasicInfoId:this.hiringBasicInfoId, this.openPopInfo('最高学历不能为空!')
lastGraduateGrade:this.lastGraduateGrade, return;
lastGraduateSchool:this.lastGraduateSchool,
certificationVxUrl:this.certificationVxUrl
} }
this.myService.saveLastGraduateGrade(param).subscribe((res)=>{ if(!this.lastGraduateSchool){
if(res['success']){ this.openPopInfo('毕业学校不能为空!')
this.router.navigate(['/personal_statement'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); return;
}else{ }
this.toastDialog = true; if(!this.certificationVxUrl){
this.toastInfo = { this.openPopInfo('毕业证照片不能为空,请在微信端上传!')
status: 1, return;
msg: res['message'], }
timeout: 3000, if(this.lifeCommonService.isWeiXin()){
align: 'center' 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(['/bank_card'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
} }
// 教育等级查询 // 教育等级查询
...@@ -73,37 +89,56 @@ export class EmployeeEducationComponent implements OnInit { ...@@ -73,37 +89,56 @@ export class EmployeeEducationComponent implements OnInit {
} }
selectPic(){ selectPic(){
// 5.1 拍照、本地选图 if(this.lifeCommonService.isWeiXin()){
const t = this; // 5.1 拍照、本地选图
wx.chooseImage({ const t = this;
count: 1, // 默认9 wx.chooseImage({
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 count: 1, // 默认9
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
success: function (res) { sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 success: function (res) {
const THIS = t; this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.uploadImage({ const THIS = t;
localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得 wx.uploadImage({
isShowProgressTips: 1, // 默认为1,显示进度提示 localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得
success: function (response) { isShowProgressTips: 1, // 默认为1,显示进度提示
THIS.serverId = response.serverId; // 返回图片的服务器端ID success: function (response) {
const m = { THIS.serverId = response.serverId; // 返回图片的服务器端ID
mediaId: response.serverId, const m = {
origin: 'ydLife' mediaId: response.serverId,
}; origin: 'ydLife'
THIS.myService.mediaGet(m).subscribe(async e => { };
if (e['success']) { THIS.myService.mediaGet(m).subscribe(async e => {
THIS.certificationVxUrl = e['data']['imgUrl']; if (e['success']) {
THIS.changeDetectorRef.markForCheck(); THIS.certificationVxUrl = e['data']['imgUrl'];
THIS.changeDetectorRef.detectChanges(); THIS.changeDetectorRef.markForCheck();
} else { THIS.changeDetectorRef.detectChanges();
alert(e['message']); } else {
alert(e['message']);
}
});
} }
}); });
} }
}); });
} }else{
}); this.openPopInfo('请在微信端操作!')
}
}
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
} }
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
} }
<div class="wrapper"> <div class="wrapper">
<div class="title"> <div class="title">
<div>个人证件资料</div> <div>个人证件资料</div>
<span class="page_mark"> 4/8</span> <span class="page_mark"> 3/8</span>
</div> </div>
<div class="sub_title"> <div class="sub_title">
<strong>身份证件</strong> <strong>身份证件</strong>
...@@ -45,4 +45,5 @@ ...@@ -45,4 +45,5 @@
保存并下一步 保存并下一步
</footer> </footer>
</div> </div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast> <ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file <ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
...@@ -19,6 +19,8 @@ export class EmployeeIdCardComponent implements OnInit { ...@@ -19,6 +19,8 @@ export class EmployeeIdCardComponent implements OnInit {
serverId: any; serverId: any;
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
isNeedAlert: boolean;
dialogInfo: any;
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService, private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService,private changeDetectorRef: ChangeDetectorRef) { public myService:MyService,private changeDetectorRef: ChangeDetectorRef) {
...@@ -37,62 +39,93 @@ export class EmployeeIdCardComponent implements OnInit { ...@@ -37,62 +39,93 @@ export class EmployeeIdCardComponent implements OnInit {
} }
next(){ next(){
const param = { if(!this.frontVxUrl){
hiringBasicInfoId:this.hiringBasicInfoId, this.openPopInfo('身份证正面照不能为空,请在微信端上传!')
frontVxUrl:this.frontVxUrl, return;
backVxUrl:this.backVxUrl
} }
this.myService.saveBasicInfo(param).subscribe((res)=>{ if(!this.backVxUrl){
if(res['success']){ this.openPopInfo('身份证反面照不能为空,请在微信端上传!')
this.router.navigate(['/employee_education'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); return;
}else{ }
this.toastDialog = true; if(this.lifeCommonService.isWeiXin()){
this.toastInfo = { const param = {
status: 1, hiringBasicInfoId:this.hiringBasicInfoId,
msg: res['message'], frontVxUrl:this.frontVxUrl,
timeout: 3000, backVxUrl:this.backVxUrl
align: 'center'
};
} }
}) this.myService.saveBasicInfo(param).subscribe((res)=>{
if(res['success']){
this.router.navigate(['/employee_education'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}else{
this.openPopInfo('请在微信端操作!')
}
} }
selectPic(type){ selectPic(type){
// 5.1 拍照、本地选图 if(this.lifeCommonService.isWeiXin()){
const t = this; // 5.1 拍照、本地选图
wx.chooseImage({ const t = this;
count: 1, // 默认9 wx.chooseImage({
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 count: 1, // 默认9
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
success: function (res) { sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 success: function (res) {
const THIS = t; this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.uploadImage({ const THIS = t;
localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得 wx.uploadImage({
isShowProgressTips: 1, // 默认为1,显示进度提示 localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得
success: function (response) { isShowProgressTips: 1, // 默认为1,显示进度提示
THIS.serverId = response.serverId; // 返回图片的服务器端ID success: function (response) {
const m = { THIS.serverId = response.serverId; // 返回图片的服务器端ID
mediaId: response.serverId, const m = {
origin: 'ydLife' mediaId: response.serverId,
}; origin: 'ydLife'
THIS.myService.mediaGet(m).subscribe(async e => { };
if (e['success']) { THIS.myService.mediaGet(m).subscribe(async e => {
if(type=='front'){ if (e['success']) {
THIS.frontVxUrl = e['data']['imgUrl']; if(type=='front'){
THIS.frontVxUrl = e['data']['imgUrl'];
}
if(type=='back'){
THIS.backVxUrl = e['data']['imgUrl'];
}
THIS.changeDetectorRef.markForCheck();
THIS.changeDetectorRef.detectChanges();
} else {
alert(e['message']);
} }
if(type=='back'){ });
THIS.backVxUrl = e['data']['imgUrl']; }
} });
THIS.changeDetectorRef.markForCheck(); }
THIS.changeDetectorRef.detectChanges(); });
} else { }else{
alert(e['message']); this.openPopInfo('请在微信端操作!')
} }
});
}
});
}
});
} }
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
} }
...@@ -45,7 +45,7 @@ export class InvitationComponent implements OnInit { ...@@ -45,7 +45,7 @@ export class InvitationComponent implements OnInit {
`https://${window.location.host}/ydLife/invitees?hiringBasicInfoId=${this.hiringBasicInfoId}&invitatorName=${this.invitatorName}`, `https://${window.location.host}/ydLife/invitees?hiringBasicInfoId=${this.hiringBasicInfoId}&invitatorName=${this.invitatorName}`,
imgUrl); imgUrl);
}else{ }else{
alert('请在手机微信端发送邀请'); alert('请在微信公众号中发送邀请');
} }
} }
......
...@@ -18,4 +18,5 @@ ...@@ -18,4 +18,5 @@
保存并下一步 保存并下一步
</footer> </footer>
</div> </div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast> <ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file <ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
...@@ -14,6 +14,8 @@ export class PersonalPhotosComponent implements OnInit { ...@@ -14,6 +14,8 @@ export class PersonalPhotosComponent implements OnInit {
vxUrl:any = null; vxUrl:any = null;
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
isNeedAlert: boolean;
dialogInfo: any;
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService, private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService,private changeDetectorRef: ChangeDetectorRef) { } public myService:MyService,private changeDetectorRef: ChangeDetectorRef) { }
...@@ -26,56 +28,81 @@ export class PersonalPhotosComponent implements OnInit { ...@@ -26,56 +28,81 @@ export class PersonalPhotosComponent implements OnInit {
} }
selectPic(){ selectPic(){
// 5.1 拍照、本地选图 if(this.lifeCommonService.isWeiXin()){
const t = this; // 5.1 拍照、本地选图
wx.chooseImage({ const t = this;
count: 1, // 默认9 wx.chooseImage({
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 count: 1, // 默认9
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
success: function (res) { sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 success: function (res) {
const THIS = t; this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.uploadImage({ const THIS = t;
localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得 wx.uploadImage({
isShowProgressTips: 1, // 默认为1,显示进度提示 localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得
success: function (response) { isShowProgressTips: 1, // 默认为1,显示进度提示
THIS.serverId = response.serverId; // 返回图片的服务器端ID success: function (response) {
const m = { THIS.serverId = response.serverId; // 返回图片的服务器端ID
mediaId: response.serverId, const m = {
origin: 'ydLife' mediaId: response.serverId,
}; origin: 'ydLife'
THIS.myService.mediaGet(m).subscribe(async e => { };
if (e['success']) { THIS.myService.mediaGet(m).subscribe(async e => {
THIS.vxUrl = e['data']['imgUrl']; if (e['success']) {
THIS.changeDetectorRef.markForCheck(); THIS.vxUrl = e['data']['imgUrl'];
THIS.changeDetectorRef.detectChanges(); THIS.changeDetectorRef.markForCheck();
} else { THIS.changeDetectorRef.detectChanges();
alert(e['message']); } else {
} alert(e['message']);
}); }
} });
}); }
} });
}); }
});
}else{
this.openPopInfo('请在微信端操作!')
}
} }
next(){ next(){
const param = { if(!this.vxUrl){
hiringBasicInfoId:this.hiringBasicInfoId, this.openPopInfo('您的个人照片不能为空,请在微信端上传!')
vxUrl:this.vxUrl return;
} }
this.myService.savePersonPicture(param).subscribe((res)=>{ if(this.lifeCommonService.isWeiXin()){
if(res['success']){ const param = {
this.router.navigate(['/employee_id_card'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); hiringBasicInfoId:this.hiringBasicInfoId,
}else{ vxUrl:this.vxUrl
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
} }
}) this.myService.savePersonPicture(param).subscribe((res)=>{
if(res['success']){
this.router.navigate(['/employee_id_card'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
}
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
} }
} }
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<div class="content"> <div class="content">
<ul> <ul>
<li *ngFor="let personalStatements of dropOptionsInfoList" (click)="selectStatements(personalStatements)" <li *ngFor="let personalStatements of dropOptionsInfoList" (click)="selectStatements(personalStatements)"
[ngClass]="{'selected':personalStatements.selected}"> [ngClass]="{'selected':personalStatements.status}">
<span> {{personalStatements.dropOptionName}}</span> <span> {{personalStatements.dropOptionName}}</span>
<span class="iconfont icon-gougou" *ngIf="personalStatements.selected"></span> <span class="iconfont icon-gougou" *ngIf="personalStatements.status"></span>
</li> </li>
</ul> </ul>
<textarea class="form-control" cols="10" rows="5" placeholder="输入报聘" #autofocusFlag ></textarea> <textarea class="form-control" cols="10" rows="5" placeholder="输入报聘" #autofocusFlag [(ngModel)]="everWork"></textarea>
</div> </div>
<footer class="fixed" (click)="next()"> <footer class="fixed" (click)="next()">
保存并下一步 保存并下一步
...@@ -26,26 +26,10 @@ ...@@ -26,26 +26,10 @@
</div> </div>
<div class="content"> <div class="content">
<ul> <ul>
<li class="selected"> <li class="selected" *ngFor="let contractItem of contractTermsList">
<span>合同条款</span> <span>{{contractItem.termName}}</span>
<span class="iconfont icon-gougou" ></span> <span class="iconfont icon-gougou" ></span>
</li> </li>
<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>
<span>员工说明书</span>
<span class="iconfont icon-ar-r"></span>
</li>
</ul> </ul>
</div> </div>
<footer class="fixed" (click)="next()"> <footer class="fixed" (click)="next()">
......
...@@ -17,7 +17,9 @@ export class PersonalStatementComponent implements OnInit { ...@@ -17,7 +17,9 @@ export class PersonalStatementComponent implements OnInit {
isNeedAlert: boolean; isNeedAlert: boolean;
dialogInfo: any; dialogInfo: any;
autofocusFlag:boolean; autofocusFlag:boolean;
dropOptionsInfoListParam:any; dropOptionsInfoListParam:Array<any> = [];
contractTermsList:Array<any>;
everWork:string;
constructor(private myService: MyService, constructor(private myService: MyService,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService, public lifeCommonService: LifeCommonService,
...@@ -31,13 +33,15 @@ export class PersonalStatementComponent implements OnInit { ...@@ -31,13 +33,15 @@ export class PersonalStatementComponent implements OnInit {
console.log(this.type) console.log(this.type)
if(this.type==="personal_statement"){ if(this.type==="personal_statement"){
this.dropOptionsQuery() this.dropOptionsQuery()
}else{
this.queryContractTerms()
} }
} }
next(){ next(){
if(this.type == 'personal_statement'){ if(this.type == 'personal_statement'){
this.savePersonalStatements()
// this.router.navigate(['/contract'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); // this.router.navigate(['/contract'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
this.savePersonalStatements();
}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} });
} }
...@@ -47,12 +51,17 @@ export class PersonalStatementComponent implements OnInit { ...@@ -47,12 +51,17 @@ export class PersonalStatementComponent implements OnInit {
this.myService.dropOptionsQuery({code:'EHiring_Personal_Statements'}).subscribe((res)=>{ this.myService.dropOptionsQuery({code:'EHiring_Personal_Statements'}).subscribe((res)=>{
if(res['success']){ if(res['success']){
this.dropOptionsInfoList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList']; this.dropOptionsInfoList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'];
this.dropOptionsInfoList.forEach((item)=>{
item.status = 0;
item.userInput = null;
})
}else{ }else{
this.openPopInfo(res['message']) this.openPopInfo(res['message'])
} }
}) })
} }
// 打开弹窗 // 打开弹窗
openPopInfo(message) { openPopInfo(message) {
this.isNeedAlert = true; this.isNeedAlert = true;
...@@ -64,33 +73,52 @@ export class PersonalStatementComponent implements OnInit { ...@@ -64,33 +73,52 @@ export class PersonalStatementComponent implements OnInit {
} }
selectStatements(personalStatements){ selectStatements(personalStatements){
personalStatements.selected = !personalStatements.selected; if( personalStatements.status ==1){
if(personalStatements.id == '241' && personalStatements.selected == true){ personalStatements.status = 0;
}else{
personalStatements.status = 1;
}
if(personalStatements.id == '241' && personalStatements.status == 1){
//点击曾经报聘输入报聘自动获取焦点 //点击曾经报聘输入报聘自动获取焦点
this.elementView.nativeElement.focus(); this.elementView.nativeElement.focus();
} }
} }
savePersonalStatements(){ savePersonalStatements(){
this.dropOptionsInfoListParam = [];
for(let i=0;i<this.dropOptionsInfoList.length;i++){ for(let i=0;i<this.dropOptionsInfoList.length;i++){
this.dropOptionsInfoList[i]['mdDropOptionName'] = this.dropOptionsInfoList[i]['dropOptionName'];
this.dropOptionsInfoList[i]['personalStatements'] = this.dropOptionsInfoList[i]['dropOptionName']; this.dropOptionsInfoList[i]['mdDropOptionId'] = this.dropOptionsInfoList[i]['id'];
this.dropOptionsInfoList[i]['personalStatementsId'] = this.dropOptionsInfoList[i]['id']; if(this.dropOptionsInfoList[i]['id'] =='241'){
if(this.dropOptionsInfoList[i]['selected'] == true){ this.dropOptionsInfoListParam.push({hiringBasicInfoId:this.hiringBasicInfoId,
this.dropOptionsInfoList[i]['status'] = 1; mdDropOptionName:this.dropOptionsInfoList[i]['dropOptionName'],
mdDropOptionId:this.dropOptionsInfoList[i]['id'],
status:this.dropOptionsInfoList[i]['status'],
userInput:this.everWork?this.everWork:null
})
}else{ }else{
this.dropOptionsInfoList[i]['status'] = 0; this.dropOptionsInfoListParam.push({hiringBasicInfoId:this.hiringBasicInfoId,
mdDropOptionName:this.dropOptionsInfoList[i]['dropOptionName'],
mdDropOptionId:this.dropOptionsInfoList[i]['id'],
status:this.dropOptionsInfoList[i]['status'],
userInput:null
})
} }
// 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)
} }
queryContractTerms(){
this.myService.queryContractTerms().subscribe((res)=>{
console.log(res)
if(res['success']){
this.contractTermsList = res['data']['contractTermsList'];
}
})
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
} }
...@@ -75,3 +75,5 @@ ...@@ -75,3 +75,5 @@
</footer> </footer>
</div> </div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast> <ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
...@@ -11,7 +11,7 @@ import { ExperienceQuery } from '../../../domain/experienceQuery'; ...@@ -11,7 +11,7 @@ import { ExperienceQuery } from '../../../domain/experienceQuery';
}) })
export class WorkExperienceComponent implements OnInit { export class WorkExperienceComponent implements OnInit {
hiringBasicInfoId:any; hiringBasicInfoId:any;
addExperience:ExperienceQuery = new ExperienceQuery(null,null,null,null,null); addExperience:ExperienceQuery = new ExperienceQuery(null,null,null,null);
//工作经历列表 //工作经历列表
experienceList:Array<any>; experienceList:Array<any>;
minDate:any = new Date('1900-01-01'); minDate:any = new Date('1900-01-01');
...@@ -21,6 +21,8 @@ export class WorkExperienceComponent implements OnInit { ...@@ -21,6 +21,8 @@ export class WorkExperienceComponent implements OnInit {
//控制弹框 //控制弹框
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
isNeedAlert: boolean;
dialogInfo: 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) {
...@@ -31,13 +33,14 @@ export class WorkExperienceComponent implements OnInit { ...@@ -31,13 +33,14 @@ export class WorkExperienceComponent 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.addExperience = new ExperienceQuery(this.hiringBasicInfoId, null, null,null, null); this.addExperience = new ExperienceQuery(null, null, null,null);
} }
next(){ next(){
const experienceParam = { const experienceParam = {
workingExperienceList:this.experienceList workingExperienceList:this.experienceList,
hiringBasicInfoId:this.hiringBasicInfoId
} }
this.myService.saveWorkingExperience(experienceParam).subscribe((res)=>{ this.myService.saveWorkingExperience(experienceParam).subscribe((res)=>{
if(res['success']){ if(res['success']){
...@@ -60,7 +63,7 @@ export class WorkExperienceComponent implements OnInit { ...@@ -60,7 +63,7 @@ export class WorkExperienceComponent implements OnInit {
this.experienceList.push(this.addExperience) this.experienceList.push(this.addExperience)
this.showworkingStart=null; this.showworkingStart=null;
this.showworkingEnd = null; this.showworkingEnd = null;
this.addExperience = new ExperienceQuery(this.hiringBasicInfoId, null, null,null, null); this.addExperience = new ExperienceQuery(null, null, null,null);
} }
} }
...@@ -88,4 +91,19 @@ export class WorkExperienceComponent implements OnInit { ...@@ -88,4 +91,19 @@ export class WorkExperienceComponent implements OnInit {
this.showworkingEnd =result; this.showworkingEnd =result;
} }
} }
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
} }
...@@ -39,6 +39,8 @@ import { EmployeeEducationComponent } from './application-process/employee-educa ...@@ -39,6 +39,8 @@ import { EmployeeEducationComponent } from './application-process/employee-educa
import { PersonalStatementComponent } from './application-process/personal-statement/personal-statement.component'; import { PersonalStatementComponent } from './application-process/personal-statement/personal-statement.component';
import { SignatureComponent } from './application-process/signature/signature.component'; import { SignatureComponent } from './application-process/signature/signature.component';
import { EmployeeSubmitComponent } from './application-process/employee-submit/employee-submit.component'; import { EmployeeSubmitComponent } from './application-process/employee-submit/employee-submit.component';
import { BankCardComponent } from './application-process/bank-card/bank-card.component';
const myRoutes: Routes = [ const myRoutes: Routes = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] }, { path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
...@@ -81,6 +83,7 @@ const myRoutes: Routes = [ ...@@ -81,6 +83,7 @@ const myRoutes: Routes = [
{ path: 'personal_photos',component:PersonalPhotosComponent,data: [{ title: '银盾经纪人报聘' }] }, { path: 'personal_photos',component:PersonalPhotosComponent,data: [{ title: '银盾经纪人报聘' }] },
{ path: 'employee_id_card',component:EmployeeIdCardComponent,data: [{ title: '银盾经纪人报聘' }] }, { path: 'employee_id_card',component:EmployeeIdCardComponent,data: [{ title: '银盾经纪人报聘' }] },
{ path: 'employee_education',component:EmployeeEducationComponent,data: [{ title: '银盾经纪人报聘' }] }, { path: 'employee_education',component:EmployeeEducationComponent,data: [{ title: '银盾经纪人报聘' }] },
{ path: 'bank_card',component:BankCardComponent,data:[{title:'银盾经纪人报聘'}]},
{ path: 'personal_statement',component:PersonalStatementComponent,data: [{ type:'personal_statement',title: '银盾经纪人报聘' }] }, { path: 'personal_statement',component:PersonalStatementComponent,data: [{ type:'personal_statement',title: '银盾经纪人报聘' }] },
{ path: 'contract',component:PersonalStatementComponent,data: [{ type:'contract',title: '银盾经纪人报聘' }] }, { path: 'contract',component:PersonalStatementComponent,data: [{ type:'contract',title: '银盾经纪人报聘' }] },
{ path: 'signature',component:SignatureComponent,data: [{ title: '银盾经纪人报聘' }]}, { path: 'signature',component:SignatureComponent,data: [{ title: '银盾经纪人报聘' }]},
......
...@@ -47,9 +47,10 @@ import { EmployeeIdCardComponent } from './application-process/employee-id-card/ ...@@ -47,9 +47,10 @@ import { EmployeeIdCardComponent } from './application-process/employee-id-card/
import { EmployeeEducationComponent } from './application-process/employee-education/employee-education.component'; import { EmployeeEducationComponent } from './application-process/employee-education/employee-education.component';
import { PersonalStatementComponent } from './application-process/personal-statement/personal-statement.component'; import { PersonalStatementComponent } from './application-process/personal-statement/personal-statement.component';
import { SignatureComponent } from './application-process/signature/signature.component'; import { SignatureComponent } from './application-process/signature/signature.component';
import { EmployeeSubmitComponent } from './application-process/employee-submit/employee-submit.component' import { EmployeeSubmitComponent } from './application-process/employee-submit/employee-submit.component';
import { BankCardComponent } from './application-process/bank-card/bank-card.component'
@NgModule({ @NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent], declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent],
imports: [ imports: [
CommonModule, CommonModule,
LifeCommonModule, LifeCommonModule,
......
...@@ -475,4 +475,11 @@ export class MyService { ...@@ -475,4 +475,11 @@ export class MyService {
return this.http return this.http
.post(url, JSON.stringify(param)); .post(url, JSON.stringify(param));
} }
//合同文档查询接口
queryContractTerms(){
const url = this.ydapi + '/practitionerHiring/queryContractTerms';
return this.http
.post(url, JSON.stringify({}));
}
} }
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