Commit 748db9fb by Chao Sun

我的商机优化

parent 7ac1ccb1
...@@ -26,12 +26,14 @@ ...@@ -26,12 +26,14 @@
<span>性别</span> <span>性别</span>
<div class="sexWrapper"> <div class="sexWrapper">
<button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='1'}" <button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='1'}"
(click)="selectedGender('1')" [disabled]="readonlyFlag"> (click)="selectedGender('1')" [disabled]="readonlyFlag" *ngIf="sexFlag">
</button> </button>
<button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='2'}" <button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='2'}"
(click)="selectedGender('2')" [disabled]="readonlyFlag"> (click)="selectedGender('2')" [disabled]="readonlyFlag" *ngIf="sexFlag">
</button> </button>
</div> </div>
<input class="form-control" type="text" placeholder="暂无性别信息" *ngIf="!sexFlag" disabled />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>手机</span> <span>手机</span>
...@@ -87,13 +89,16 @@ ...@@ -87,13 +89,16 @@
</div> </div>
<div class="content" *ngIf="selectedId===2"> <div class="content" *ngIf="selectedId===2">
<div style="text-align: center;font-size: 16px;margin-top: 10px;" *ngIf="opportunitySurveyAnswersList?.length==0">
暂无问卷信息</div>
<div class="answerContent" *ngFor="let surveyItem of opportunitySurveyAnswersList"> <div class="answerContent" *ngFor="let surveyItem of opportunitySurveyAnswersList">
<div class="questionTitle">{{surveyItem.questionName}}</div> <div class="questionTitle">{{surveyItem.questionName}}</div>
<div class="questionContent">{{surveyItem.optionName}}</div> <div class="questionContent">{{surveyItem.optionName}}</div>
</div> </div>
</div> </div>
<div class="content" *ngIf="selected===4"> <div class="content" *ngIf="selectedId===4">
<div *ngIf="isCompletedQuestionnaire!=1">暂无方案</div> <div style="text-align: center;font-size: 16px;margin-top: 10px;" *ngIf="isCompletedQuestionnaire!=3">暂无方案</div>
</div> </div>
<div class="content" *ngIf="selectedId===3"> <div class="content" *ngIf="selectedId===3">
<!--编辑框--> <!--编辑框-->
...@@ -128,11 +133,8 @@ ...@@ -128,11 +133,8 @@
<div style="display: flex;justify-content: space-between;"> <div style="display: flex;justify-content: space-between;">
<div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div> <div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div>
<div class="opportunityRecordItem">{{lifeCommonService.checkStr(opportunityRecordItem.mdDropOptionId)}}</div> <div class="opportunityRecordItem">{{lifeCommonService.checkStr(opportunityRecordItem.mdDropOptionId)}}</div>
</div> </div>
<div class="salesNotice">{{opportunityRecordItem.salesNotice}}</div> <div class="salesNotice">{{opportunityRecordItem.salesNotice}}</div>
</li> </li>
</ul> </ul>
......
...@@ -41,7 +41,8 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -41,7 +41,8 @@ export class MyBusinessDetailComponent implements OnInit {
opportunityRecordNoticeDate: Date; opportunityRecordNoticeDate: Date;
// 跟进状态 // 跟进状态
opportunityRecordId: number; opportunityRecordId: number;
//性别显示
sexFlag: boolean;
constructor(private activateRoute: ActivatedRoute, private myService: MyService, constructor(private activateRoute: ActivatedRoute, private myService: MyService,
public lifeCommonService: LifeCommonService) { public lifeCommonService: LifeCommonService) {
this.titleList = [ this.titleList = [
...@@ -67,12 +68,13 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -67,12 +68,13 @@ export class MyBusinessDetailComponent implements OnInit {
editInfo() { editInfo() {
this.readonlyFlag = false; this.readonlyFlag = false;
this.sexFlag = true;
} }
selectTab(id) { selectTab(id) {
this.selectedId = id; this.selectedId = id;
if (id === 4) { if (id === 4) {
if (this.isCompletedQuestionnaire == 1) { if (this.isCompletedQuestionnaire == 3) {
window.location.href = `https://${window.location.host}/customizedPlanList/3?orderId=${this.orderId}&customerId=${this.opportunityId}` window.location.href = `https://${window.location.host}/customizedPlanList/3?orderId=${this.orderId}&customerId=${this.opportunityId}`
// window.location.href = `https://${window.location.host}/customizedPlanList/3?orderId=8373` // window.location.href = `https://${window.location.host}/customizedPlanList/3?orderId=8373`
...@@ -109,6 +111,11 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -109,6 +111,11 @@ export class MyBusinessDetailComponent implements OnInit {
this.opportunityCustomerTags = res['data']['opportunityBasicInformationInfo']['opportunityCustomerTags'] this.opportunityCustomerTags = res['data']['opportunityBasicInformationInfo']['opportunityCustomerTags']
this.opportunityRecordInfos = res['data']['opportunityRecordInfos']; this.opportunityRecordInfos = res['data']['opportunityRecordInfos'];
this.isCompletedQuestionnaire = res['data']['opportunityConsultationInfo']['isCompletedQuestionnaire']; this.isCompletedQuestionnaire = res['data']['opportunityConsultationInfo']['isCompletedQuestionnaire'];
if (!res['data']['opportunityBasicInformationInfo']['gender']) {
this.sexFlag = false;
} else {
this.sexFlag = true;
}
if (this.opportunityCustomerTags.length > 0) { if (this.opportunityCustomerTags.length > 0) {
for (let i = 0; i < this.opportunityCustomerTags.length; i++) { for (let i = 0; i < this.opportunityCustomerTags.length; i++) {
for (let j = 0; j < this.tagList.length; j++) { for (let j = 0; j < this.tagList.length; j++) {
...@@ -178,6 +185,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -178,6 +185,7 @@ export class MyBusinessDetailComponent implements OnInit {
} }
}) })
const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/; const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/;
if (this.editBusiness.age) {
if (!OVERZERO_REG.test(this.editBusiness.age)) { if (!OVERZERO_REG.test(this.editBusiness.age)) {
if (parseInt(this.editBusiness.age) > 100) { if (parseInt(this.editBusiness.age) > 100) {
this.toastDialog = true; this.toastDialog = true;
...@@ -200,7 +208,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -200,7 +208,7 @@ export class MyBusinessDetailComponent implements OnInit {
} }
} }
}
this.editBusiness = { this.editBusiness = {
...this.editBusiness, ...this.editBusiness,
opportunityCustomerTags: newTag opportunityCustomerTags: newTag
...@@ -215,6 +223,11 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -215,6 +223,11 @@ export class MyBusinessDetailComponent implements OnInit {
align: 'center' align: 'center'
}; };
this.readonlyFlag = true; this.readonlyFlag = true;
if (this.editBusiness.gender) {
this.sexFlag = true;
} else {
this.sexFlag = false;
}
} }
}) })
} }
......
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