Commit 637975d7 by Chao Sun

商机保存后跳转

parent ed769d62
...@@ -137,7 +137,8 @@ ...@@ -137,7 +137,8 @@
<div class="contentItem"> <div class="contentItem">
<span>备注</span> <span>备注</span>
<div style="padding: 6px 15px;padding: 6px 15px;"> <div style="padding: 6px 15px;padding: 6px 15px;">
<input class="form-control" type="text" [(ngModel)]="editBusiness.remark" disabled placeholder="备注信息" /> <input class="form-control" type="text" [disabled]="readonlyFlag" [(ngModel)]="editBusiness.remark"
placeholder="备注信息" />
</div> </div>
</div> </div>
</div> </div>
......
.wrapper { .wrapper {
padding-bottom: 40px;
select { select {
-webkit-appearance: none; -webkit-appearance: none;
border: none; border: none;
...@@ -42,7 +43,7 @@ ...@@ -42,7 +43,7 @@
color: #fff; color: #fff;
background: #0767bf; background: #0767bf;
text-align: center; text-align: center;
bottom: 30px; bottom: 0;
left: 42%; left: 42%;
} }
.contentDetail { .contentDetail {
...@@ -70,11 +71,6 @@ ...@@ -70,11 +71,6 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
select{
option.gray{
color: #ccc;
}
}
.sexWrapper { .sexWrapper {
display: flex; display: flex;
width: 60%; width: 60%;
......
import { Component, OnInit, AfterViewInit } from '@angular/core'; import { Component, OnInit, AfterViewInit } from '@angular/core';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute, Router } from "@angular/router";
import { BusinessQuery } from '../../domain/businessQuery'; import { BusinessQuery } from '../../domain/businessQuery';
import { LifeCommonService } from '../../common/life-common.service'; import { LifeCommonService } from '../../common/life-common.service';
...@@ -62,7 +62,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -62,7 +62,7 @@ export class MyBusinessDetailComponent implements OnInit {
clickFlag: boolean; clickFlag: boolean;
constructor(private activateRoute: ActivatedRoute, private myService: MyService, constructor(private activateRoute: ActivatedRoute, private myService: MyService,
public lifeCommonService: LifeCommonService) { public lifeCommonService: LifeCommonService, private router: Router, ) {
this.titleList = [ this.titleList = [
{ id: 1, name: '基本信息' }, { id: 1, name: '基本信息' },
{ id: 2, name: '咨询问卷' }, { id: 2, name: '咨询问卷' },
...@@ -73,7 +73,9 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -73,7 +73,9 @@ export class MyBusinessDetailComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.orderId = this.activateRoute.snapshot.queryParams['orderId']; this.orderId = this.activateRoute.snapshot.queryParams['orderId'];
//商机对应的客户id
this.opportunityId = this.activateRoute.snapshot.paramMap.get('id'); this.opportunityId = this.activateRoute.snapshot.paramMap.get('id');
//商机id
this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId']; this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId'];
this.opportunityRecordId = null; this.opportunityRecordId = null;
this.tagQuery(); this.tagQuery();
...@@ -226,6 +228,51 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -226,6 +228,51 @@ export class MyBusinessDetailComponent implements OnInit {
} }
}) })
} }
if (!this.editBusiness.name) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '姓名不能为空!',
timeout: 3000,
align: 'center'
};
return;
} else {
this.editBusiness.name = this.editBusiness.name.trim();
if (!this.lifeCommonService.nameValid(this.editBusiness.name)) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '不要乱输姓名哦!',
timeout: 3000,
align: 'center'
};
return;
}
}
if (!this.editBusiness.mobileNo) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '手机号不能为空!',
timeout: 3000,
align: 'center'
};
return;
} else {
this.editBusiness.mobileNo = this.editBusiness.mobileNo.trim()
if (!this.lifeCommonService.mobileNoValid(this.editBusiness.mobileNo)) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '输入手机号码错误',
timeout: 3000,
align: 'center'
};
return;
}
}
const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/; const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/;
if (this.editBusiness.age) { if (this.editBusiness.age) {
if (!OVERZERO_REG.test(this.editBusiness.age)) { if (!OVERZERO_REG.test(this.editBusiness.age)) {
...@@ -248,7 +295,6 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -248,7 +295,6 @@ export class MyBusinessDetailComponent implements OnInit {
}; };
return; return;
} }
} }
} }
this.editBusiness = { this.editBusiness = {
...@@ -278,6 +324,14 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -278,6 +324,14 @@ export class MyBusinessDetailComponent implements OnInit {
} else { } else {
this.sexFlag = false; this.sexFlag = false;
} }
//新增的时候要刷新页面
if (Number(this.opportunityId) == 0) {
if (res['data']['opportunityId'] && res['data']['leadsAssignedId']) {
this.opportunityId = res['data']['opportunityId'];
this.leadsAssignedId = res['data']['leadsAssignedId'];
this.router.navigate([`/business${this.opportunityId}`], { queryParams: { leadsAssignedId: this.leadsAssignedId } });
}
}
} }
}) })
} }
......
...@@ -13,7 +13,6 @@ export class MyBusinessComponent implements OnInit { ...@@ -13,7 +13,6 @@ export class MyBusinessComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.ownOpportunityQuery() this.ownOpportunityQuery()
} }
ownOpportunityQuery() { ownOpportunityQuery() {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<span>学历</span> <span>学历</span>
<select class="form-control" [(ngModel)]="editRecruiting.educationLevel" [disabled]="readonlyFlag" <select class="form-control" [(ngModel)]="editRecruiting.educationLevel" [disabled]="readonlyFlag"
style=" direction: rtl;"> style=" direction: rtl;">
<option value=''>请选择学历</option> <option value=''>{{readonlyFlag ?'暂无学历信息':'请选择学历'}}</option>
<option *ngFor="let educationLevelItem of educationLevelList" [value]="educationLevelItem.id"> <option *ngFor="let educationLevelItem of educationLevelList" [value]="educationLevelItem.id">
{{educationLevelItem.name}} {{educationLevelItem.name}}
</option> </option>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<span>招募来源</span> <span>招募来源</span>
<select class="form-control" [(ngModel)]="editRecruiting.resourceDropMasterId" [disabled]="readonlyFlag" <select class="form-control" [(ngModel)]="editRecruiting.resourceDropMasterId" [disabled]="readonlyFlag"
style=" direction: rtl;"> style=" direction: rtl;">
<option value=''>请选择招募来源</option> <option value="">{{readonlyFlag ?'暂无招募来源':'请选择招募来源'}}</option>
<option *ngFor="let resourceItem of resourceList" [value]="resourceItem.id"> <option *ngFor="let resourceItem of resourceList" [value]="resourceItem.id">
{{resourceItem.dropOptionName}} {{resourceItem.dropOptionName}}
</option> </option>
......
...@@ -100,6 +100,10 @@ ...@@ -100,6 +100,10 @@
.contentItem:last-child { .contentItem:last-child {
border-bottom: none; border-bottom: none;
} }
select.form-control[disabled] {
background-color: transparent;
color: #999;
}
} }
.tagWrapper { .tagWrapper {
display: flex; display: flex;
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute, Router } from "@angular/router";
import { LifeCommonService } from '../../common/life-common.service'; import { LifeCommonService } from '../../common/life-common.service';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
import { RecruitingQuery } from '../../domain/recruitingQuery'; import { RecruitingQuery } from '../../domain/recruitingQuery';
...@@ -39,7 +39,8 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -39,7 +39,8 @@ export class RecruitingDetailComponent implements OnInit {
constructor( constructor(
private activateRoute: ActivatedRoute, private activateRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService, public lifeCommonService: LifeCommonService,
private myService: MyService) { private myService: MyService,
private router: Router) {
this.titleList = [ this.titleList = [
{ id: 1, name: '基本信息' }, { id: 1, name: '基本信息' },
{ id: 2, name: '简历' }, { id: 2, name: '简历' },
...@@ -63,6 +64,7 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -63,6 +64,7 @@ export class RecruitingDetailComponent implements OnInit {
} else { } else {
this.clickFlag = true; this.clickFlag = true;
this.selectTab(1); this.selectTab(1);
this.editRecruiting.resourceDropMasterId = ''
} }
} }
...@@ -204,6 +206,26 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -204,6 +206,26 @@ export class RecruitingDetailComponent implements OnInit {
timeout: 3000, timeout: 3000,
align: 'center' align: 'center'
}; };
this.readonlyFlag = true;
if (this.editRecruiting.gender) {
this.sexFlag = true;
if (this.editRecruiting.gender == '1') {
this.maleFlag = true;
this.femaleFlag = false;
} else {
this.femaleFlag = true;
this.maleFlag = false;
}
} else {
this.sexFlag = false;
}
//新增的时候要刷新页面
if (Number(this.id) == 0) {
if (res['data']['opportunityId'] && res['data']['leadsAssignedId']) {
this.id = res['data']['opportunityId'];
this.router.navigate([`/recruiting${this.id}`]);
}
}
} else { } else {
this.toastDialog = true; this.toastDialog = true;
this.toastInfo = { this.toastInfo = {
......
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