Commit 748db9fb by Chao Sun

我的商机优化

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