Commit 37051c38 by Sweet Zhang

增加判断是否可以回退

parent 9a8f4082
...@@ -8,9 +8,26 @@ ...@@ -8,9 +8,26 @@
<textarea class="form-control" cols="30" rows="10" [(ngModel)]="rejectNote" placeholder="请填写备注,字数限制为100字" maxlength="100"></textarea> <textarea class="form-control" cols="30" rows="10" [(ngModel)]="rejectNote" placeholder="请填写备注,字数限制为100字" maxlength="100"></textarea>
</div> </div>
<div id="page" style="border-top: 1px #e1e1e1 solid;"> <div id="page" style="border-top: 1px #e1e1e1 solid;">
<div style="background-color: #fff;color: #333;" (click)="showAlert(0)">拒绝</div> <div style="background-color: #fff;color: #333;" (click)="showAlert(0)">回退</div>
<div style="background-color: #1b5b99;" (click)="showAlert(1)">通过</div> <div style="background-color: #1b5b99;" (click)="showAlert(1)">通过</div>
</div> </div>
<div *ngIf="backToFlag" class="dialogContainer">
<div>
<label for="">请选择退回到哪一环节</label>
<select class="form-control" [(ngModel)]="stepsSeqBackTo">
<option value=null>报聘人</option>
<option value=-2>辅导人</option>
<option value=1>体系负责人</option>
<option value=2>公司运营主管</option>
<option value=3>寿险总经理</option>
<option value=4>公司总经理</option>
</select>
<div class="confirm">
<button class="btn cancel" (click)="backToFlag=false">取消</button>
<button class="btn sure" (click)="hiringApprove();backToFlag=true" style=" margin-left: 15px;background-color: #1b5b99;color:#fff">确认</button>
</div>
</div>
</div>
</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> <ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
\ No newline at end of file
...@@ -9,4 +9,31 @@ ...@@ -9,4 +9,31 @@
.form-control{ .form-control{
font-size: 16px; font-size: 16px;
} }
}
.dialogContainer{
min-width: 320px;
max-width: 640px;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,.5);
display: flex;
justify-content: center;
align-items: center;
>div{
background-color: #fff;
width: 80%;
padding: 20px 15px;
border-radius: 6px;
margin-top: -40%;
.confirm{
margin-top: 20px;
display: flex;
>button{
flex: 1;
}
}
}
} }
\ No newline at end of file
...@@ -19,6 +19,8 @@ export class ApprovalCommentsComponent implements OnInit { ...@@ -19,6 +19,8 @@ export class ApprovalCommentsComponent implements OnInit {
//控制弹框 //控制弹框
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
stepsSeqBackTo:string;
backToFlag:boolean = false;
constructor(private myService:MyService,private _modal: ModalService, private _toast: ToastService,private activatedRoute: ActivatedRoute, constructor(private myService:MyService,private _modal: ModalService, private _toast: ToastService,private activatedRoute: ActivatedRoute,
private router: Router) { } private router: Router) { }
...@@ -31,10 +33,14 @@ export class ApprovalCommentsComponent implements OnInit { ...@@ -31,10 +33,14 @@ export class ApprovalCommentsComponent implements OnInit {
showAlert(approvingStatus) { showAlert(approvingStatus) {
this.approvingStatus = approvingStatus; this.approvingStatus = approvingStatus;
ModalService.alert(`${this.approvingStatus==1?'通过审批':'确认拒绝'}`, `是否确定${this.approvingStatus==1?'通过':'拒绝'}该经纪人报聘?`, [ if(approvingStatus===1){
{ text: '取消', onPress: () => console.log('取消') }, ModalService.alert(`${this.approvingStatus==1?'通过审批':'确认拒绝'}`, `是否确定${this.approvingStatus==1?'通过':'拒绝'}该经纪人报聘?`, [
{ text: '确定', onPress: () => this.hiringApprove()} { text: '取消', onPress: () => console.log('取消') },
]); { text: '确定', onPress: () => this.hiringApprove()}
]);
}else{
this.backToFlag = true;
}
} }
hiringApprove(){ hiringApprove(){
...@@ -49,7 +55,15 @@ export class ApprovalCommentsComponent implements OnInit { ...@@ -49,7 +55,15 @@ export class ApprovalCommentsComponent implements OnInit {
rejectNote:this.rejectNote, rejectNote:this.rejectNote,
interviewAssessment:this.interviewAssessment, interviewAssessment:this.interviewAssessment,
plateform:1, plateform:1,
hiringApproveStepsSeq:sessionStorage.getItem('hiringApproveStepsSeq') hiringApproveStepsSeq:sessionStorage.getItem('hiringApproveStepsSeq'),
stepsSeqBackTo:this.stepsSeqBackTo
}
if(this.stepsSeqBackTo == 'null'){
this.stepsSeqBackTo = null;
}
if(!this.stepsSeqBackTo || parseInt(this.stepsSeqBackTo,0) >= parseInt(sessionStorage.getItem('hiringApproveStepsSeq'),0)){
this.openPopInfo('当前审批环节不可再往前回退!');
return;
} }
this.myService.hiringApprove(param).subscribe((res)=>{ this.myService.hiringApprove(param).subscribe((res)=>{
if(res['success']){ if(res['success']){
......
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