Commit 9c463aa2 by sunchao

合同&查询接口对接

parent ef2af2b3
......@@ -6,13 +6,17 @@
<div class="content">
<div class="contentDetail employ">
<div class="contentItem">
<input class="form-control" name="" id="" placeholder="开户行" [(ngModel)]="bankAccountOpening"/>
<input class="form-control" name="" id="" placeholder="开户行" [(ngModel)]="bankAccountOpening"
(blur)="bs()"/>
</div>
<div class="contentItem">
<input class="form-control" placeholder="银行卡号:例如 630 1234 3453 5435" [(ngModel)]="bankAccountId"/>
<input class="form-control" placeholder="银行卡号:例如 630123434535435" [(ngModel)]="bankAccountId"
(blur)="bs(2)" onkeyup="this.value=this.value.replace(/\D/g,'')"/>
</div>
<div class="contentItem" style="border:none;">
<input class="form-control" name="" id="" style="text-align: left;padding: 6px 0;" placeholder="再次输入银行卡号以确认"/>
<input class="form-control" name="" id="" style="text-align: left;padding: 6px 0;" placeholder="再次输入银行卡号以确认"
[(ngModel)]="sureBankAccountId" (blur)="bs(3)" onkeyup="this.value=this.value.replace(/\D/g,'')"/>
</div>
</div>
</div>
......@@ -20,4 +24,5 @@
保存并下一步
</footer>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
......@@ -15,6 +15,8 @@ export class BankCardComponent implements OnInit {
toastDialog:boolean;
toastInfo:any;
sureBankAccountId:string;
isNeedAlert: boolean;
dialogInfo: any;
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService) { }
......@@ -27,6 +29,15 @@ export class BankCardComponent implements OnInit {
}
next(){
if(this.bankAccountId != this.sureBankAccountId){
this.openPopInfo('两次银行卡号不一致!');
return;
}
const pattern = /^\d{16,19}$/;
if(!pattern.test(this.bankAccountId)){
this.openPopInfo('银行账号为16~19位数字,不能包含空格或其他符号');
return;
}
const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
bankAccountOpening:this.bankAccountOpening,
......@@ -46,4 +57,29 @@ export class BankCardComponent implements OnInit {
}
})
}
bs(type) {
this.lifeCommonService.scrollTo();
if(type==2){
this.bankAccountId = this.bankAccountId.replace(/\D/g,'')
}
if(type==3){
this.sureBankAccountId = this.sureBankAccountId.replace(/\D/g,'')
}
}
// 打开弹窗
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;
}
}
......@@ -36,7 +36,10 @@
display: flex;
flex-wrap: wrap;
font-size: 16px;
direction: rtl;
}
select.form-control{
direction: rtl;
}
input[type="date"]{
margin-right: -4.5%;
......
......@@ -33,6 +33,7 @@ export class EmployeeBasicInfoComponent implements OnInit {
this.erpInitialize();
this.provCityQry();
this.editEmployBasicInfo = new EmployBasicQuery(this.hiringBasicInfoId,null,this.editEmployBasicInfo.mobileNo,null,null,null,null,null,null,null,null,null,null,null,null)
this.queryWholeInfo(this.hiringBasicInfoId)
}
erpInitialize(){
......@@ -61,9 +62,14 @@ export class EmployeeBasicInfoComponent implements OnInit {
console.log(result)
this.editEmployBasicInfo.practitionerBirthdate = this.currentDateFormat(result, 'yyyy-mm-dd');
this.showPractitionerBirthdate = result;
console.log(this.editEmployBasicInfo.practitionerBirthdate)
}
idTypeChange(e){
this.editEmployBasicInfo.idNo = null;
this.editEmployBasicInfo.practitionerBirthdate = null;
this.showPractitionerBirthdate = null;
this.editEmployBasicInfo.gender = null;
this.editEmployBasicInfo.idTypeId = e;
for(let idType of this.idTypesList){
if(this.editEmployBasicInfo.idTypeId == idType.id){
......@@ -227,4 +233,23 @@ export class EmployeeBasicInfoComponent implements OnInit {
})
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
if(res['data']['hiringBasicInfo']){
this.editEmployBasicInfo = res['data']['hiringBasicInfo'];
this.showPractitionerBirthdate= new Date(res['data']['hiringBasicInfo']['practitionerBirthdate']);
this.editEmployBasicInfo.practitionerBirthdate = this.currentDateFormat(this.showPractitionerBirthdate, 'yyyy-mm-dd')
if(this.editEmployBasicInfo.cityId || this.editEmployBasicInfo.cityName || this.editEmployBasicInfo.provinceId || this.editEmployBasicInfo.provinceName){
this.addressInfo = {
city:{id:this.editEmployBasicInfo.cityId,value:this.editEmployBasicInfo.cityName},
province:{id:this.editEmployBasicInfo.provinceId,value:this.editEmployBasicInfo.provinceName}
}
}else{
this.addressInfo = null;
}
}
})
}
}
......@@ -20,18 +20,16 @@ export class EmployeeInfoComponent implements OnInit {
this.lifeCommonService.setTitle(title);
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);
}
queryMembershipByHiringBasicInfoId(hiringBasicInfoId){
this.myService.queryMembershipByHiringBasicInfoId({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
console.log(res)
this.membership = res['data']['membership'];
})
this.queryWholeInfo(this.hiringBasicInfoId)
}
next(){
this.router.navigate(['/employee_basic_info'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId,mobileNo:this.mobileNo} });
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
this.membership = res['data']['hiringMemberShip'];
})
}
}
......@@ -24,7 +24,7 @@ export class PersonalPhotosComponent implements OnInit {
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;
this.queryWholeInfo(this.hiringBasicInfoId)
}
selectPic(){
......@@ -70,7 +70,6 @@ export class PersonalPhotosComponent implements OnInit {
this.openPopInfo('您的个人照片不能为空,请在微信端上传!')
return;
}
if(this.lifeCommonService.isWeiXin()){
const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
vxUrl:this.vxUrl
......@@ -88,7 +87,7 @@ export class PersonalPhotosComponent implements OnInit {
};
}
})
}
}
// 打开弹窗
......@@ -105,4 +104,17 @@ export class PersonalPhotosComponent implements OnInit {
getPopInfo() {
this.isNeedAlert = false;
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
console.log(res)
if(res['success']){
this.vxUrl = res['data']['hiringBasicInfo']['personerPictureOssPath']
}else{
this.vxUrl = null;
}
}
})
}
}
......@@ -12,7 +12,7 @@
<span class="iconfont icon-gougou" *ngIf="personalStatements.status"></span>
</li>
</ul>
<textarea class="form-control" cols="10" rows="5" placeholder="输入报聘" #autofocusFlag [(ngModel)]="everWork"></textarea>
<textarea placeholder="输入报聘" #autofocusFlag [(ngModel)]="everWork" *ngIf="everWorkFlag" class="form-control" cols="10" rows="5"></textarea>
</div>
<footer class="fixed" (click)="next()">
保存并下一步
......@@ -26,14 +26,26 @@
</div>
<div class="content">
<ul>
<li class="selected" *ngFor="let contractItem of contractTermsList">
<li *ngFor="let contractItem of contractTermsList" (click)="readContract(contractItem)"
[ngClass]="{'selected':contractItem.confirmStatus}">
<span>{{contractItem.termName}}</span>
<span class="iconfont icon-gougou" ></span>
<span class="iconfont icon-gougou" *ngIf="contractItem.confirmStatus"></span>
</li>
</ul>
</div>
<footer class="fixed" (click)="next()">
<footer class="fixed" (click)="next()" [ngClass]="{default:isAllAgree == false}">
我已全部阅读且同意,下一步
</footer>
</div>
<div class="toastWrapper toast" *ngIf="isShow">
</div>
<div id="toastContent" *ngIf="isShow">
<div class="title">
{{curTitle}}
</div>
<div class="contract" [innerHtml]="curContract"></div>
<div class="agree" (click)="agree(curContractId)">同意</div>
<!--<div>{{curQues|json}}</div>-->
</div>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
\ No newline at end of file
......@@ -59,4 +59,61 @@
outline:none;
}
}
}
\ No newline at end of file
.fixed.default{
background:#C2C2C2;
}
}
.toastWrapper {
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
top: 0;
}
.toast {
position: fixed;
left: 0;
right: 0;
min-width: 320px;
max-width: 640px;
width: 100%;
margin: 0 auto;
z-index: 1;
}
#toastContent {
position: fixed;
bottom: 80px;
width: 90%;
height: 80%;
left: 0;
right: 0;
margin: 0 auto;
background-color: #fff;
z-index: 2;
animation: slowUp .5s ease both;
border-radius: 12px;
overflow: auto;
.title{
text-align: center;
font-weight: bold;
font-size: 16px;
padding: 10px;
}
.contract{
overflow: hidden;
padding: 10px;
}
.agree{
width: 100%;
height: 45px;
line-height: 45px;
background: #C81B1E;
text-align: center;
color: #fff;
font-size: 20px;
font-weight: bold;
}
}
\ No newline at end of file
......@@ -2,7 +2,6 @@ import { Component, OnInit,ViewChild,ElementRef } from '@angular/core';
import { ActivatedRoute,Router } from "@angular/router";
import { MyService } from '../../my.service';
import { LifeCommonService } from "../../../common/life-common.service";
@Component({
selector: 'ydlife-personal-statement',
templateUrl: './personal-statement.component.html',
......@@ -20,6 +19,14 @@ export class PersonalStatementComponent implements OnInit {
dropOptionsInfoListParam:Array<any> = [];
contractTermsList:Array<any>;
everWork:string;
//判断曾经报聘是否可点
everWorkFlag:boolean = false;
isShow: boolean;
curTitle:any;
curContract:any;
curContractId:number;
isAllAgree:boolean = false;
contractTermsConfirmsListParm:Array<any>;
constructor(private myService: MyService,
private activatedRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService,
......@@ -37,10 +44,19 @@ export class PersonalStatementComponent implements OnInit {
}
}
ngOnChanges(){
}
next(){
if(this.type == 'personal_statement'){
this.savePersonalStatements();
}else if(this.type == 'contract'){
this.saveContractTermsConfirms();
if(!this.isAllAgree){
this.openPopInfo('请详细阅读全部条款!')
return;
}
this.router.navigate(['/signature'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}
}
......@@ -54,7 +70,7 @@ export class PersonalStatementComponent implements OnInit {
item.userInput = null;
})
}else{
this.openPopInfo(res['message'])
this.openPopInfo(res['message']);
}
})
}
......@@ -69,15 +85,25 @@ export class PersonalStatementComponent implements OnInit {
};
}
//选择个人声明
selectStatements(personalStatements){
if( personalStatements.status ==1){
personalStatements.status = 0;
}else{
personalStatements.status = 1;
}
if(personalStatements.id == '241' && personalStatements.status == 1){
//点击曾经报聘输入报聘自动获取焦点
this.elementView.nativeElement.focus();
if(personalStatements.id == '241'){
if(personalStatements.status == 1){
this.everWorkFlag = true;
//点击曾经报聘输入报聘自动获取焦点
setTimeout(() => {
this.elementView.nativeElement.focus();
}, 500);
}else{
this.everWork = null;
this.everWorkFlag = false;
}
}
}
......@@ -87,14 +113,14 @@ export class PersonalStatementComponent implements OnInit {
this.dropOptionsInfoList[i]['mdDropOptionName'] = this.dropOptionsInfoList[i]['dropOptionName'];
this.dropOptionsInfoList[i]['mdDropOptionId'] = this.dropOptionsInfoList[i]['id'];
if(this.dropOptionsInfoList[i]['id'] =='241'){
this.dropOptionsInfoListParam.push({hiringBasicInfoId:this.hiringBasicInfoId,
this.dropOptionsInfoListParam.push({
mdDropOptionName:this.dropOptionsInfoList[i]['dropOptionName'],
mdDropOptionId:this.dropOptionsInfoList[i]['id'],
status:this.dropOptionsInfoList[i]['status'],
userInput:this.everWork?this.everWork:null
})
}else{
this.dropOptionsInfoListParam.push({hiringBasicInfoId:this.hiringBasicInfoId,
this.dropOptionsInfoListParam.push({
mdDropOptionName:this.dropOptionsInfoList[i]['dropOptionName'],
mdDropOptionId:this.dropOptionsInfoList[i]['id'],
status:this.dropOptionsInfoList[i]['status'],
......@@ -120,6 +146,9 @@ export class PersonalStatementComponent implements OnInit {
console.log(res)
if(res['success']){
this.contractTermsList = res['data']['contractTermsList'];
this.contractTermsList.forEach((item)=>{
item.confirmStatus = 0;
})
}
})
}
......@@ -129,4 +158,46 @@ export class PersonalStatementComponent implements OnInit {
this.isNeedAlert = false;
}
readContract(contractItem){
this.isShow = true;
this.curContract = contractItem.termNote;
this.curTitle = contractItem.termName;
this.curContractId = contractItem.id;
console.log(contractItem)
}
//同意合同条款
agree() {
this.isShow = false;
for(let i=0;i<this.contractTermsList.length;i++){
if(this.curContractId == this.contractTermsList[i]['id']){
this.contractTermsList[i]['confirmStatus'] = 1;
}
}
this.isAllAgree = this.contractTermsList.every((item)=>{
return item.confirmStatus == 1;
})
}
saveContractTermsConfirms(){
this.contractTermsConfirmsListParm = [];
for(let i=0;i<this.contractTermsList.length;i++){
this.contractTermsConfirmsListParm.push({
contractTermId:this.contractTermsList[i]['id'],
confirmStatus:this.contractTermsList[i]['confirmStatus']
})
}
const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
contractTermsConfirmsList:this.contractTermsConfirmsListParm
}
this.myService.saveContractTermsConfirms(param).subscribe((res)=>{
if(res['success']){
}else{
this.openPopInfo(res['message']);
}
})
}
}
......@@ -20,7 +20,6 @@
[arrow]="'horizontal'"
[mode]="'date'"
[minDate] ="minDate"
[maxDate] = "maxDate"
[(ngModel)]="showworkingStart"
(onOk)="onOk($event,'start')"
>
......
......@@ -36,7 +36,9 @@
display: flex;
flex-wrap: wrap;
font-size: 16px;
direction: rtl;
}
select.form-control{
direction: rtl;
}
input[type="date"]{
margin-right: -4.5%;
......@@ -82,11 +84,15 @@
.experience_list{
background:#F8F8F8;
padding: 10px 13px;
ul li{
display: flex;
justify-content: space-between;
height: 25px;
align-items: center;
}
padding-bottom: 65px;
ul{
margin-bottom: 10px;
li{
display: flex;
justify-content: space-between;
height: 30px;
align-items: center;
}
}
}
}
\ No newline at end of file
......@@ -34,10 +34,17 @@ export class WorkExperienceComponent implements OnInit {
this.lifeCommonService.setTitle(title);
this.hiringBasicInfoId = this.activatedRoute.snapshot.queryParams.hiringBasicInfoId?this.activatedRoute.snapshot.queryParams.hiringBasicInfoId:null;
this.addExperience = new ExperienceQuery(null, null, null,null);
this.queryWholeInfo(this.hiringBasicInfoId)
}
next(){
if(this.experienceList.length ==0){
if(this.addExperience.workingCompany || this.addExperience.position || this.addExperience.workingStart || this.addExperience.workingEnd){
this.experienceList.push(this.addExperience)
}else{
this.experienceList = [];
}
}
const experienceParam = {
workingExperienceList:this.experienceList,
hiringBasicInfoId:this.hiringBasicInfoId
......@@ -106,4 +113,12 @@ export class WorkExperienceComponent implements OnInit {
getPopInfo() {
this.isNeedAlert = false;
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
this.experienceList = res['data']['hiringWorkingExperienceList'];
}
})
}
}
......@@ -400,13 +400,6 @@ export class MyService {
.post(url, JSON.stringify(param));
}
//查询报聘信息
queryMembershipByHiringBasicInfoId(param){
const url = this.ydapi + '/practitionerHiring/queryMembershipByHiringBasicInfoId';
return this.http
.post(url, JSON.stringify(param));
}
//证件类型&保险公司&产品险种查询接口
erpInitialize(){
const url = this.API + "/erp/erpInitialize";
......@@ -482,4 +475,18 @@ export class MyService {
return this.http
.post(url, JSON.stringify({}));
}
//合同文档
saveContractTermsConfirms(param){
const url = this.ydapi + '/practitionerHiring/saveContractTermsConfirms';
return this.http
.post(url, JSON.stringify(param));
}
//被邀请人填写情况查询接口
queryWholeInfo(param){
const url = this.ydapi + '/practitionerHiring/queryWholeInfo';
return this.http
.post(url, JSON.stringify(param));
}
}
......@@ -107,7 +107,7 @@ export class RecruitingDetailComponent implements OnInit {
this.practitionerListQuery();
//初始化被邀请人信息
if(this.hiringBasicInfoId){
this.queryMembershipByHiringBasicInfoId();
this.queryWholeInfo();
}else{
this.employQuery = new EmployQuery(this.employQuery.name,null,null,this.potentialId,null,null,null,null,null,null,null,null,null,null,null,null)
}
......@@ -534,10 +534,10 @@ export class RecruitingDetailComponent implements OnInit {
}
}
queryMembershipByHiringBasicInfoId(){
this.myService.queryMembershipByHiringBasicInfoId({hiringBasicInfoId:this.hiringBasicInfoId}).subscribe((res)=>{
queryWholeInfo(){
this.myService.queryWholeInfo({hiringBasicInfoId:this.hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
const membership = res['data']['membership'];
const membership = res['data']['hiringMemberShip'];
this.employQuery = membership;
this.employQuery.name = this.editRecruiting.name;
this.employQuery.practitionerPotentialId = this.potentialId;
......
......@@ -169,7 +169,7 @@ footer.fixed{
height: 56px;
line-height: 56px;
border-radius: 0;
z-index: 100;
z-index: 1;
}
.page_mark{
width: 40px;
......@@ -202,6 +202,11 @@ footer.fixed{
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
.contract h1,.contract h2{
font-size: 14px;
font-weight: normal;
}
@keyframes slowUp {
0% {
-webkit-transform: translateY(100%);
......
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