Commit 58254264 by zeyang

1.优化赢家平台 商机跟进的时间选择样式和校验

2.赢家平台嵌入SFP智能财策页面
parent ba982ef6
<div class="wrapper"> <div class="wrapper">
<ul class="tab"> <ul class="tab">
<li *ngFor="let titleItem of titleList" (click)="selectTab(titleItem.id)" <li *ngFor="let titleItem of titleList" (click)="selectTab(titleItem.id)"
[ngClass]="{selected:selectedId===titleItem.id}"> [ngClass]="{selected:selectedId===titleItem.id}">
<div style="position: relative;"> <div style="position: relative;">
<h3>{{titleItem.name}} <h3>{{titleItem.name}}
</h3> </h3>
</div> </div>
</li> </li>
</ul> </ul>
<div class="content" *ngIf="selectedId===1"> <div class="content" *ngIf="selectedId===1">
<i class="iconfont icon-bianji" *ngIf="readonlyFlag" (click)="editInfo()"></i> <i class="iconfont icon-bianji" *ngIf="readonlyFlag" (click)="editInfo()"></i>
<i class="iconfont icon-save" *ngIf="!readonlyFlag" (click)="saveInfo()"></i> <i class="iconfont icon-save" *ngIf="!readonlyFlag" (click)="saveInfo()"></i>
<div class="contentDetail"> <div class="contentDetail">
<div class="wrapper_item"> <div class="wrapper_item">
<div class="contentItem"> <div class="contentItem">
<span>姓名</span> <span>姓名</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无姓名':'请输入姓名'}}" <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无姓名':'请输入姓名'}}"
[(ngModel)]="editBusiness.name" [disabled]="readonlyFlag" (blur)="inputBlur()" /> [(ngModel)]="editBusiness.name" [disabled]="readonlyFlag" (blur)="inputBlur()" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>出生日期</span> <span>出生日期</span>
<div> <div>
<ListItem <ListItem DatePicker [mode]="'date'" [disabled]="readonlyFlag" [minDate]="minDate"
DatePicker [maxDate]="today" [(ngModel)]="editBusiness.birthDate" (onOk)="onOk($event)">
[mode]="'date'" <Brief *ngIf="!readonlyFlag">
[disabled]="readonlyFlag" {{editBusiness.birthDate ? (editBusiness.birthDate | date:'yyyy-MM-dd') : '请输入出生日期'}}
[minDate]="minDate" </Brief>
[maxDate] = "today" <Brief *ngIf="readonlyFlag">
[(ngModel)]="editBusiness.birthDate" {{editBusiness.birthDate ? (editBusiness.birthDate | date:'yyyy-MM-dd') : '暂无出生日期信息'}}
(onOk)="onOk($event)"> </Brief>
<Brief *ngIf="!readonlyFlag">{{editBusiness.birthDate ? (editBusiness.birthDate | date:'yyyy-MM-dd') : '请输入出生日期'}}</Brief> </ListItem>
<Brief *ngIf="readonlyFlag">{{editBusiness.birthDate ? (editBusiness.birthDate | date:'yyyy-MM-dd') : '暂无出生日期信息'}}</Brief> </div>
</ListItem> </div>
</div> <div class="contentItem">
</div> <span>年龄</span>
<div class="contentItem"> <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无年龄信息':'请输入年龄'}}"
<span>年龄</span> [(ngModel)]="editBusiness.age" [disabled]="readonlyFlag || editBusiness.birthDate"
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无年龄信息':'请输入年龄'}}" (blur)="inputBlur()" />
[(ngModel)]="editBusiness.age" [disabled]="readonlyFlag || editBusiness.birthDate" (blur)="inputBlur()" /> </div>
</div> <div class="contentItem">
<div class="contentItem"> <span>性别</span>
<span>性别</span> <div class="sexWrapper">
<div class="sexWrapper"> <button class="form-control sex"
<button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='1' && maleFlag && femaleFlag}" [ngClass]="{'sexBtn':editBusiness?.gender=='1' && maleFlag && femaleFlag}"
(click)="selectedGender('1')" [disabled]="readonlyFlag" *ngIf="sexFlag && maleFlag"> (click)="selectedGender('1')" [disabled]="readonlyFlag" *ngIf="sexFlag && maleFlag">
</button> </button>
<button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='2' && maleFlag && femaleFlag}" <button class="form-control sex"
(click)="selectedGender('2')" [disabled]="readonlyFlag" *ngIf="sexFlag && femaleFlag"> [ngClass]="{'sexBtn':editBusiness?.gender=='2' && maleFlag && femaleFlag}"
</button> (click)="selectedGender('2')" [disabled]="readonlyFlag" *ngIf="sexFlag && femaleFlag">
</div> </button>
<input class="form-control" type="text" placeholder="暂无性别信息" *ngIf="!sexFlag" disabled /> </div>
</div> <input class="form-control" type="text" placeholder="暂无性别信息" *ngIf="!sexFlag" disabled />
<div class="contentItem"> </div>
<span>城市</span> <div class="contentItem">
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无城市信息':'请输入城市'}}" <span>城市</span>
[(ngModel)]="editBusiness.address" [disabled]="readonlyFlag" (blur)="inputBlur()" /> <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无城市信息':'请输入城市'}}"
</div> [(ngModel)]="editBusiness.address" [disabled]="readonlyFlag" (blur)="inputBlur()" />
<div class="contentItem"> </div>
<span>血型</span> <div class="contentItem">
<select name="bloodTypeId" id="bloodTypeId" class="form-control" [disabled]="readonlyFlag" <span>血型</span>
[(ngModel)]="editBusiness.bloodTypeId" (blur)="inputBlur()"> <select name="bloodTypeId" id="bloodTypeId" class="form-control" [disabled]="readonlyFlag"
<option value="">{{readonlyFlag ?'暂无血型信息':'请选择血型'}}</option> [(ngModel)]="editBusiness.bloodTypeId" (blur)="inputBlur()">
<option *ngFor="let businessBloodItem of businessBloodList" [value]="businessBloodItem.id"> <option value="">{{readonlyFlag ?'暂无血型信息':'请选择血型'}}</option>
{{businessBloodItem.dropOptionName}}</option> <option *ngFor="let businessBloodItem of businessBloodList" [value]="businessBloodItem.id">
</select> {{businessBloodItem.dropOptionName}}
<!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无血型信息':'请选择血型'}}"--> </option>
<!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.bloodTypeId" (blur)="inputBlur()" />--> </select>
</div> <!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无血型信息':'请选择血型'}}"-->
<div class="contentItem"> <!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.bloodTypeId" (blur)="inputBlur()" />-->
<span>星座</span> </div>
<select name="businessZodiacId" id="businessZodiacId" class="form-control" [disabled]="readonlyFlag" <div class="contentItem">
[(ngModel)]="editBusiness.zodiacTypeId" (blur)="inputBlur()"> <span>星座</span>
<option value="">{{readonlyFlag ?'暂无星座信息':'请选择星座'}}</option> <select name="businessZodiacId" id="businessZodiacId" class="form-control" [disabled]="readonlyFlag"
<option *ngFor="let businessZodiacItem of businessZodiacList" [value]="businessZodiacItem.id"> [(ngModel)]="editBusiness.zodiacTypeId" (blur)="inputBlur()">
{{businessZodiacItem.dropOptionName}}</option> <option value="">{{readonlyFlag ?'暂无星座信息':'请选择星座'}}</option>
</select> <option *ngFor="let businessZodiacItem of businessZodiacList" [value]="businessZodiacItem.id">
<!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无星座信息':'请选择星座'}}"--> {{businessZodiacItem.dropOptionName}}
<!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.zodiacTypeId" (blur)="inputBlur()" />--> </option>
</div> </select>
</div> <!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无星座信息':'请选择星座'}}"-->
<div class="wrapper_item"> <!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.zodiacTypeId" (blur)="inputBlur()" />-->
<div class="contentItem"> </div>
<span>手机</span> </div>
<a *ngIf="opportunityId!=0" style="text-decoration:none;color: #333;margin-right: 12px;" <div class="wrapper_item">
href="tel:{{editBusiness.mobileNo}}"> <div class="contentItem">
<i class="iconfont icon-dianhua" style="color: #e10d0d;"></i> <span>手机</span>
{{editBusiness.mobileNo}}</a> <a *ngIf="opportunityId!=0" style="text-decoration:none;color: #333;margin-right: 12px;"
<input class="form-control" type="text" [(ngModel)]="editBusiness.mobileNo" *ngIf="opportunityId==0" href="tel:{{editBusiness.mobileNo}}">
placeholder="请输入手机号" maxlength="11" (blur)="inputBlur()" /> <i class="iconfont icon-dianhua" style="color: #e10d0d;"></i>
</div> {{editBusiness.mobileNo}}</a>
<div class="contentItem"> <input class="form-control" type="text" [(ngModel)]="editBusiness.mobileNo" *ngIf="opportunityId==0"
<span>微信</span> placeholder="请输入手机号" maxlength="11" (blur)="inputBlur()" />
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无微信':'请输入微信'}}" </div>
[(ngModel)]="editBusiness.weChat" [disabled]="readonlyFlag" (blur)="inputBlur()" /> <div class="contentItem">
<span>微信</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无微信':'请输入微信'}}"
[(ngModel)]="editBusiness.weChat" [disabled]="readonlyFlag" (blur)="inputBlur()" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>其他联系</span> <span>其他联系</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无其他联系方式':'请输入其他联系方式'}}" <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无其他联系方式':'请输入其他联系方式'}}"
[(ngModel)]="editBusiness.otherContacts" [disabled]="readonlyFlag" (blur)="inputBlur()" /> [(ngModel)]="editBusiness.otherContacts" [disabled]="readonlyFlag" (blur)="inputBlur()" />
</div> </div>
</div> </div>
<div class="wrapper_item"> <div class="wrapper_item">
<div class="contentItem"> <div class="contentItem">
<span>预计FYP</span> <span>预计FYP</span>
<input class="form-control" type="number" placeholder="{{readonlyFlag ?'暂无预计FYP':'请输入预计FYP'}}" <input class="form-control" type="number" placeholder="{{readonlyFlag ?'暂无预计FYP':'请输入预计FYP'}}"
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyp" (blur)="inputBlur()" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyp" (blur)="inputBlur()" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>预计FYC</span> <span>预计FYC</span>
<input class="form-control" type="number" placeholder="{{readonlyFlag ?'暂无预计FYC':'请输入预计FYC'}}" <input class="form-control" type="number" placeholder="{{readonlyFlag ?'暂无预计FYC':'请输入预计FYC'}}"
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyc" (blur)="inputBlur()" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyc" (blur)="inputBlur()" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>预计成交件数</span> <span>预计成交件数</span>
<input class="form-control" type="number" placeholder="{{readonlyFlag ?'暂无预计件数':'请输入预计件数'}}" <input class="form-control" type="number" placeholder="{{readonlyFlag ?'暂无预计件数':'请输入预计件数'}}"
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.pieces" (blur)="inputBlur()" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.pieces" (blur)="inputBlur()" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>预计成交时间</span> <span>预计成交时间</span>
<input class="form-control" type="date" placeholder="{{readonlyFlag ?'暂无预计成交时间':'请输入预计成交时间'}}" <input class="form-control" type="date" placeholder="{{readonlyFlag ?'暂无预计成交时间':'请输入预计成交时间'}}"
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.timeToClose" (blur)="inputBlur()" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.timeToClose" (blur)="inputBlur()" />
</div> </div>
</div> </div>
<div class="wrapper_item"> <div class="wrapper_item">
<div class="contentItem"> <div class="contentItem">
<span>商机来源</span> <span>商机来源</span>
<select *ngIf="opportunityId==0" name="businessSourceId" id="businessSourceId" class="form-control" <select *ngIf="opportunityId==0" name="businessSourceId" id="businessSourceId" class="form-control"
[(ngModel)]="editBusiness.sourceFrom" [disabled]="readonlyFlag" (blur)="inputBlur()"> [(ngModel)]="editBusiness.sourceFrom" [disabled]="readonlyFlag" (blur)="inputBlur()">
<option value="">{{readonlyFlag ?'暂无商机来源':'请选择商机来源'}}</option> <option value="">{{readonlyFlag ?'暂无商机来源':'请选择商机来源'}}</option>
<option *ngFor="let businessSourceItem of businessSourceList" [value]="businessSourceItem.id"> <option *ngFor="let businessSourceItem of businessSourceList" [value]="businessSourceItem.id">
{{businessSourceItem.dropOptionName}}</option> {{businessSourceItem.dropOptionName}}
</select> </option>
<input *ngIf="opportunityId!=0" class="form-control" type="text" [(ngModel)]="editBusiness.sourceChannel" </select>
disabled placeholder="{{editBusiness.sourceChannel ?editBusiness.sourceChannel:'暂无商机来源'}}" /> <input *ngIf="opportunityId!=0" class="form-control" type="text"
</div> [(ngModel)]="editBusiness.sourceChannel" disabled
<div class="contentItem"> placeholder="{{editBusiness.sourceChannel ?editBusiness.sourceChannel:'暂无商机来源'}}" />
<span>商机时间</span> </div>
<input class="form-control" type="text" placeholder="商机时间" [(ngModel)]="editBusiness.opportunityDate" <div class="contentItem">
disabled /> <span>商机时间</span>
</div> <input class="form-control" type="text" placeholder="商机时间"
<div class="contentItem"> [(ngModel)]="editBusiness.opportunityDate" disabled />
<span>商机状态</span> </div>
<div style="padding: 6px 12px;color: #e10d0d;font-weight: bold;"> <div class="contentItem">
{{editBusiness.mdDropOptionName?editBusiness.mdDropOptionName:'待跟进'}}</div> <span>商机状态</span>
</div> <div style="padding: 6px 12px;color: #e10d0d;font-weight: bold;">
</div> {{editBusiness.mdDropOptionName?editBusiness.mdDropOptionName:'待跟进'}}
<div class="wrapper_item" style="border: none;margin-bottom: 0;"> </div>
<div class="contentItem"> </div>
<span>派遣专家</span> </div>
<span *ngIf="editBusiness?.expertType == 0" <div class="wrapper_item" style="border: none;margin-bottom: 0;">
style="padding: 6px 10px;border: 1px #e10d0d solid;border-radius: 20px;margin-right: 10px;" <div class="contentItem">
(click)="openPopInfo('申请已收到,会在1个工作日派遣专家')">申请专家支持</span> <span>派遣专家</span>
<span *ngIf="editBusiness?.expertType == 1" style="padding:6px 20px;">派遣中...</span> <span *ngIf="editBusiness?.expertType == 0"
<span *ngIf="editBusiness?.expertType == 2" style="padding: 6px 10px;border: 1px #e10d0d solid;border-radius: 20px;margin-right: 10px;"
style="padding:6px 20px;">{{editBusiness?.expertPractitionerName}}</span> (click)="openPopInfo('申请已收到,会在1个工作日派遣专家')">申请专家支持</span>
</div> <span *ngIf="editBusiness?.expertType == 1" style="padding:6px 20px;">派遣中...</span>
</div> <span *ngIf="editBusiness?.expertType == 2"
<!-- <div class="contentItem"> style="padding:6px 20px;">{{editBusiness?.expertPractitionerName}}</span>
</div>
</div>
<!-- <div class="contentItem">
<span>标签</span> <span>标签</span>
<input class="form-control" type="text" placeholder="标签" [(ngModel)]="editBusiness.name" <input class="form-control" type="text" placeholder="标签" [(ngModel)]="editBusiness.name"
[disabled]="readonlyFlag" /> [disabled]="readonlyFlag" />
</div> --> </div> -->
<div class="wrapper_item" style="border: none;margin-bottom: 0;"> <div class="wrapper_item" style="border: none;margin-bottom: 0;">
<div class="contentItem"> <div class="contentItem">
<span>备注</span> <span>备注</span>
<div style="padding: 6px 15px;"> <div style="padding: 6px 15px;">
<input class="form-control" style="padding: 0;" type="text" [disabled]="readonlyFlag" <input class="form-control" style="padding: 0;" type="text" [disabled]="readonlyFlag"
[(ngModel)]="editBusiness.remark" placeholder="备注信息" (blur)="inputBlur()" /> [(ngModel)]="editBusiness.remark" placeholder="备注信息" (blur)="inputBlur()" />
</div> </div>
</div> </div>
</div> </div>
<!-- 如果是新增商机,不需要打标签--> <!-- 如果是新增商机,不需要打标签-->
<div class="tagWrapper" *ngIf="opportunityId != 0"> <div class="tagWrapper" *ngIf="opportunityId != 0">
<div style="width: 100%;height: 34px;line-height: 34px;">标签</div> <div style="width: 100%;height: 34px;line-height: 34px;">标签</div>
<!-- <div class="tagContent" *ngFor="let tagItem of tagList" (click)="selectTag(tagItem)" <!-- <div class="tagContent" *ngFor="let tagItem of tagList" (click)="selectTag(tagItem)"
[ngClass]="{selected:tagItem.selected}"> [ngClass]="{selected:tagItem.selected}">
{{tagItem.tagName}} {{tagItem.tagName}}
</div> --> </div> -->
<div class="tagContent selected" *ngFor="let tagItem of opportunityCustomerTags"> <div class="tagContent selected" *ngFor="let tagItem of opportunityCustomerTags">
{{tagItem.tagName}} {{tagItem.tagName}}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 咨询问卷 --> <!-- 咨询问卷 -->
<div class="content" *ngIf="selectedId===2 && isSfpShow == false"> <div class="content" *ngIf="selectedId===2 && isSfpShow == false">
<div style="text-align: center;font-size: 16px;margin-top: 10px;" <div style="text-align: center;font-size: 16px;margin-top: 10px;"
*ngIf="opportunitySurveyAnswersList?.length==0 || !opportunitySurveyAnswersList"> *ngIf="opportunitySurveyAnswersList?.length==0 || !opportunitySurveyAnswersList">
暂无问卷信息</div> 暂无问卷信息</div>
<div *ngIf="!(opportunitySurveyAnswersList?.length==0 || !opportunitySurveyAnswersList)"> <div *ngIf="!(opportunitySurveyAnswersList?.length==0 || !opportunitySurveyAnswersList)">
<div class="viewReportBtn" *ngIf="isCompletedQuestionnaire == 3" (click)="viewReport()">查看报告</div> <div class="viewReportBtn" *ngIf="isCompletedQuestionnaire == 3" (click)="viewReport()">查看报告</div>
<div class="viewReportBtn" *ngIf="isCompletedQuestionnaire != 3">暂无报告</div> <div class="viewReportBtn" *ngIf="isCompletedQuestionnaire != 3">暂无报告</div>
</div> </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>
<!-- SFP咨询问卷 -->
<div class="content" *ngIf="selectedId===2 && isSfpShow == true">
<iframe src="http://localhost:4200/salesDetail" style="height: 100%; width: 100%;flex-grow: 1;">
</iframe>
</div>
<!-- 客户告知书 --> <!-- SFP咨询问卷 -->
<div class="content" *ngIf="selectedId===5"> <iframe class="content" *ngIf="selectedId===2 && isSfpShow == true" [src]="transform(iframeUrl)"
<ydlife-e-notice [agreeFlag]="false"></ydlife-e-notice> style="width: 100%;flex-grow: 1;border: medium none;">
<div class="send"> </iframe>
<div (click)="eNoticeState=true;">发送给客户签署</div> <!-- 客户告知书 -->
</div> <div class="content" *ngIf="selectedId===5">
</div> <ydlife-e-notice [agreeFlag]="false"></ydlife-e-notice>
<!-- 商机跟进 --> <div class="send">
<div class="content" *ngIf="selectedId===3"> <div (click)="eNoticeState=true;">发送给客户签署</div>
<ul class="recordLists"> </div>
<li *ngFor="let opportunityRecordItem of opportunityRecordInfos;index as idx"> </div>
<div style="display: flex;justify-content: space-between;height: 25px;"> <!-- 商机跟进 -->
<div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div> <div class="content" *ngIf="selectedId===3">
<div class="opportunityRecordItem"> <ul class="recordLists">
<a *ngIf="opportunityRecordItem.informedOssPath" href="{{opportunityRecordItem.informedOssPath}}" target="_blank"><i class="iconfont icon-pdf" style="color: #C81B1E;margin-right:5px"></i></a> <li *ngFor="let opportunityRecordItem of opportunityRecordInfos;index as idx">
<span [ngStyle]="setBackgroundColor(opportunityRecordItem)">{{opportunityRecordItem.mdDropOptionName?opportunityRecordItem.mdDropOptionName:'待跟进'}}</span> <div style="display: flex;justify-content: space-between;height: 25px;">
</div> <div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div>
</div> <div class="opportunityRecordItem">
<div class="salesNotice"> <a *ngIf="opportunityRecordItem.informedOssPath"
<span> href="{{opportunityRecordItem.informedOssPath}}" target="_blank"><i
<input type="text" class="form-control" [(ngModel)]="opportunityRecordItem.salesNotice" class="iconfont icon-pdf" style="color: #C81B1E;margin-right:5px"></i></a>
[disabled]="remarkId!=opportunityRecordItem.id" (blur)="inputBlur()" /> <span
</span> [ngStyle]="setBackgroundColor(opportunityRecordItem)">{{opportunityRecordItem.mdDropOptionName?opportunityRecordItem.mdDropOptionName:'待跟进'}}</span>
<i *ngIf="remarkId!=opportunityRecordItem.id" class="iconfont icon-bianji" </div>
(click)="editRemark(opportunityRecordItem.id)"></i> </div>
<i *ngIf="remarkId==opportunityRecordItem.id" class="iconfont icon-save" <div class="salesNotice">
(click)="ownOpportunityRecordSave(opportunityRecordItem)"></i> <span>
</div> <input type="text" class="form-control" [(ngModel)]="opportunityRecordItem.salesNotice"
</li> [disabled]="remarkId!=opportunityRecordItem.id" (blur)="inputBlur()" />
<!-- <li> </span>
<i *ngIf="remarkId!=opportunityRecordItem.id" class="iconfont icon-bianji"
(click)="editRemark(opportunityRecordItem.id)"></i>
<i *ngIf="remarkId==opportunityRecordItem.id" class="iconfont icon-save"
(click)="ownOpportunityRecordSave(opportunityRecordItem)"></i>
</div>
</li>
<!-- <li>
<div class="salesNotice">{{(editBusiness.opportunityDate).substr(0,10)}}</div> <div class="salesNotice">{{(editBusiness.opportunityDate).substr(0,10)}}</div>
<div style="display: flex;justify-content: space-between;"> <div style="display: flex;justify-content: space-between;">
<div>商机状态</div> <div>商机状态</div>
<div>待跟进</div> <div>待跟进</div>
</div> </div>
</li> --> </li> -->
</ul> </ul>
<div class="add" *ngIf="status==0" (click)="showToast()"> <div class="add" *ngIf="status==0" (click)="showToast()">
<!-- <i class="iconfont icon-jia" (click)="ownOpportunityRecordSave()"></i> --> <!-- <i class="iconfont icon-jia" (click)="ownOpportunityRecordSave()"></i> -->
<i class="iconfont icon-jiahao"></i> <i class="iconfont icon-jiahao"></i>
</div> </div>
</div> </div>
<div class="toastWrapper toast" *ngIf="isShow" (click)="closeToast()"> <div class="toastWrapper toast" *ngIf="isShow" (click)="closeToast()">
</div> </div>
<!--编辑框--> <!--编辑框-->
<div class="editContainer" *ngIf="isShow"> <div class="editContainer" *ngIf="isShow">
<div> <div>
<div>跟进状态</div> <div>跟进状态</div>
<div style="position:relative"> <div style="position:relative">
<select name="businessStatus" (onChange)="inputBlur()" id="businessStatus" class="form-control" <select name="businessStatus" (onChange)="inputBlur()" id="businessStatus" class="form-control"
[(ngModel)]="opportunityRecordId"> [(ngModel)]="opportunityRecordId">
<option value="null">请选择</option> <option value="null">请选择</option>
<option *ngFor="let businessStatusItem of businessStatusList" value="{{businessStatusItem.id}}"> <option *ngFor="let businessStatusItem of businessStatusList" value="{{businessStatusItem.id}}">
{{businessStatusItem.dropOptionName}} {{businessStatusItem.dropOptionName}}
</option> </option>
</select> </select>
<i class="iconfont icon-xiangxia" style="position: absolute;right: 50px;top: 5px;"></i> <i class="iconfont icon-xiangxia" style="position: absolute;right: 50px;top: 5px;"></i>
</div> </div>
</div> </div>
<div> <div>
<div>备注</div> <div>备注</div>
<div><input type="text" id="remark" class="form-control" placeholder="输入备注信息" [(ngModel)]="salesNotice" <div><input type="text" id="remark" class="form-control" placeholder="输入备注信息" [(ngModel)]="salesNotice"
(blur)="inputBlur()"></div> (blur)="inputBlur()"></div>
</div> </div>
<div> <div>
<div>跟进日期</div> <div>跟进日期</div>
<div><input style="-webkit-appearance: none;" id="time" class="form-control" type="date" <div><input style="-webkit-appearance: none;" id="time" class="form-control" type="date"
[(ngModel)]="opportunityRecordNoticeDate" (blur)="inputBlur()"></div> [(ngModel)]="opportunityRecordNoticeDate" (blur)="inputBlur()"></div>
</div> </div>
<div *ngIf="isSfpShow">
<div>日程开始时间</div>
<div><input type="text" id="remark" class="form-control" placeholder="输入开始时间" [(ngModel)]="taskTimeFrom" (blur)="inputBlur()"></div>
<div>日程结束时间</div>
<div><input type="text" id="remark" class="form-control" placeholder="输入结束时间" [(ngModel)]="taskTimeEnd" (blur)="inputBlur()"></div>
</div>
<ul class="footer"> <div *ngIf="isSfpShow" style="display:flex;font-size: 15px;">
<li (click)="ownOpportunityRecordSave()">确定</li> <!-- <div>日程开始/结束时间</div>
<li (click)="closeToast()">取消</li> <div class="timeContent">
</ul> <div class="picker_list">
</div> <PickerView [data]="seasons" [cols]='3' [cascade]="false" [ngModel]="taskTimeFrom" [indicatorStyle]="{'background':'#f6f6f6','border-radius':'50px','z-index':'0'}" (ngModelChange)="onChange($event,1)"></PickerView>
</div>
<div style="color: #d9dadc;width: 10%;text-align: center;">到</div>
<div class="picker_list">
<PickerView [data]="seasons" [cascade]="false" [cols]='3' [ngModel]="taskTimeEnd" [indicatorStyle]="{'background':'#f6f6f6','border-radius':'50px','z-index':'0'}" (ngModelChange)="onChange($event,2)"></PickerView>
</div>
</div> -->
<div>添加日程时间</div>
<div style="display:flex;">
<div style="width:50%"><input type="Time" id="remark" class="form-control" placeholder="输入开始时间" [(ngModel)]="taskTimeFrom"
(blur)="inputBlur()"></div>
<div style="width:50%"><input type="Time" id="remark" class="form-control" placeholder="输入结束时间" [(ngModel)]="taskTimeEnd"
(blur)="inputBlur()"></div>
</div>
</div>
<!-- 客户告知书弹窗 --> <ul class="footer">
<div class="eNoticeDialog"> <li (click)="ownOpportunityRecordSave()">确定</li>
<div class="eNoticeContent"> <li (click)="closeToast()">取消</li>
<Modal [(ngModel)]="this.eNoticeState" [transparent]="true" [closable]="true" (onClose)="onClose()"> </ul>
<div [ngStyle]="{ height: 300, overflow: 'scroll' }"> </div>
<div class="am-list" style="margin:0;">
<div class="am-list-item"> <!-- 客户告知书弹窗 -->
<InputItem [clear]="true" <div class="eNoticeDialog">
[value]="editBusiness.name" <div class="eNoticeContent">
(onChange)="editBusiness.name = $event">姓名:</InputItem> <Modal [(ngModel)]="this.eNoticeState" [transparent]="true" [closable]="true" (onClose)="onClose()">
</div> <div [ngStyle]="{ height: 300, overflow: 'scroll' }">
<div class="am-list-item"> <div class="am-list" style="margin:0;">
<InputItem [type]="'phone'" <div class="am-list-item">
[value]="editBusiness.mobileNo" <InputItem [clear]="true" [value]="editBusiness.name"
(onChange)="editBusiness.mobileNo = $event">手机号码:</InputItem> (onChange)="editBusiness.name = $event">姓名:</InputItem>
</div> </div>
<div class="am-list-line" style="color: #999;font-size:12px"> <div class="am-list-item">
<p style="margin-bottom: 5px;">(请确保客户姓名和手机号填写正确</p> <InputItem [type]="'phone'" [value]="editBusiness.mobileNo"
<p>将会用于客户签署告知书时的身份验证)</p> (onChange)="editBusiness.mobileNo = $event">手机号码:</InputItem>
</div> </div>
<div class="am-list-item am-list-item-middle"> <div class="am-list-line" style="color: #999;font-size:12px">
<div class="am-list-line"> <p style="margin-bottom: 5px;">(请确保客户姓名和手机号填写正确</p>
<div class="am-list-content" <p>将会用于客户签署告知书时的身份验证)</p>
style="width:100%;color:#fff;text-align:center;background-color: #2179AD;border-radius: 20px;margin:18px auto" </div>
(click)="sendENotice()" <div class="am-list-item am-list-item-middle">
>发送</div> <div class="am-list-line">
</div> <div class="am-list-content"
</div> style="width:100%;color:#fff;text-align:center;background-color: #2179AD;border-radius: 20px;margin:18px auto"
</div> (click)="sendENotice()">发送</div>
</div> </div>
</Modal> </div>
</div> </div>
</div> </div>
</Modal>
</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
.wrapper { .wrapper {
padding-bottom: 40px;
font-size: 16px; font-size: 16px;
background-color: #fff; background-color: #fff;
select { min-height: 90vh;
-webkit-appearance: none; display: flex;
border: none; flex-direction: column;
box-shadow: none;
} select {
.tab { -webkit-appearance: none;
display: flex; border: none;
list-style: none; box-shadow: none;
margin: 10px 0px; }
padding-left: 1%;
li { .tab {
margin-right: 10px; display: flex;
line-height: 30px; list-style: none;
height: 30px; margin: 10px 0px;
flex: 1; padding-left: 1%;
text-align: center;
border: 1px #a9aabb solid; li {
border-radius: 20px; margin-right: 10px;
h3 { line-height: 30px;
font-weight: normal; height: 30px;
font-size: 15px; flex: 1;
} text-align: center;
} border: 1px #a9aabb solid;
li.selected { border-radius: 20px;
// background-color: #ff5a32;
// color: #fff; h3 {
border: 1px #e10d0d solid; font-weight: normal;
} font-size: 15px;
} }
.content { }
padding: 10px 5px;
position: relative; li.selected {
> .iconfont { // background-color: #ff5a32;
width: 55px; // color: #fff;
height: 55px; border: 1px #e10d0d solid;
line-height: 55px; }
border-radius: 50%; }
position: fixed;
left: 42%; .content {
font-size: 24px;
color: #fff; position: relative;
background: #0767bf;
text-align: center; >.iconfont {
bottom: 76px; width: 55px;
} height: 55px;
.contentDetail { line-height: 55px;
margin-top: 15px; border-radius: 50%;
.wrapper_item { position: fixed;
border-bottom: 1px #ddd solid; left: 42%;
margin-bottom: 10px; font-size: 24px;
.contentItem { color: #fff;
display: flex; background: #0767bf;
justify-content: space-between; text-align: center;
align-items: center; bottom: 76px;
// border-bottom: 1px #ddd solid; }
margin: 0 8px 5px 8px;
> span:first-child { .contentDetail {
white-space: nowrap; margin-top: 15px;
}
input.form-control { .wrapper_item {
// width: 60%; border-bottom: 1px #ddd solid;
// margin: 0 5px; margin-bottom: 10px;
background: none;
outline: none; .contentItem {
border: none; display: flex;
text-align: right; justify-content: space-between;
box-shadow: none; align-items: center;
display: flex; // border-bottom: 1px #ddd solid;
flex-wrap: wrap; margin: 0 8px 5px 8px;
font-size: 16px;
} >span:first-child {
input::-webkit-input-placeholder{ white-space: nowrap;
font-size: 16px; }
// color: #0767bf;
} input.form-control {
.sexWrapper { // width: 60%;
display: flex; // margin: 0 5px;
width: 60%; background: none;
justify-content: flex-end; outline: none;
.form-control.sex { border: none;
width: 20%; text-align: right;
margin-left: 5px; box-shadow: none;
border: none; display: flex;
box-shadow: none; flex-wrap: wrap;
font-size: 16px; font-size: 16px;
} }
.form-control.sex.sexBtn {
border: 1px #0767bf solid; input::-webkit-input-placeholder {
} font-size: 16px;
.form-control[disabled] { // color: #0767bf;
background-color: transparent; }
opacity: 1;
} .sexWrapper {
} display: flex;
select.form-control { width: 60%;
direction: rtl; justify-content: flex-end;
font-size: 16px;
} .form-control.sex {
select.form-control[disabled] { width: 20%;
background-color: transparent; margin-left: 5px;
// color: #0767bf; border: none;
} box-shadow: none;
} font-size: 16px;
.contentItem:last-child { }
border-bottom: none;
} .form-control.sex.sexBtn {
} border: 1px #0767bf solid;
}
}
.tagWrapper { .form-control[disabled] {
display: flex; background-color: transparent;
flex-wrap: wrap; opacity: 1;
padding-left: 8px; }
div.tagContent { }
margin: 10px 3px 0 3px;
height: 28px; select.form-control {
line-height: 28px; direction: rtl;
text-align: center; font-size: 16px;
// background-color: #e8e8e8; }
border-radius: 12px;
font-size: 13px; select.form-control[disabled] {
padding: 0 15px; background-color: transparent;
} // color: #0767bf;
div.selected { }
border: 1px #0767bf solid; }
}
} .contentItem:last-child {
.add { border-bottom: none;
position: absolute; }
.iconfont { }
width: 55px;
height: 55px; }
line-height: 55px;
border-radius: 50%; .tagWrapper {
position: fixed; display: flex;
right:42%; flex-wrap: wrap;
font-size: 24px; padding-left: 8px;
color: #fff;
background: #0767bf; div.tagContent {
text-align: center; margin: 10px 3px 0 3px;
bottom: 75px; height: 28px;
font-size: 28px; line-height: 28px;
// color: #ff5933; text-align: center;
font-weight: bold; // background-color: #e8e8e8;
border-radius: 12px;
} font-size: 13px;
} padding: 0 15px;
.answerContent { }
border-bottom: 1px #ddd solid;
margin-bottom: 5px; div.selected {
padding: 5px 0; border: 1px #0767bf solid;
.questionTitle { }
font-weight: 700; }
font-size: 13px;
} .add {
.questionContent { position: absolute;
font-size: 16px;
} .iconfont {
} width: 55px;
.answerContent:last-child { height: 55px;
border-bottom: 0; line-height: 55px;
} border-radius: 50%;
.record { position: fixed;
display: flex; right: 42%;
list-style: none; font-size: 24px;
justify-content: space-between; color: #fff;
li { background: #0767bf;
width: 30%; text-align: center;
text-align: center; bottom: 75px;
height: 30px; font-size: 28px;
line-height: 30px; // color: #ff5933;
} font-weight: bold;
}
.viewReportBtn{ }
position: fixed; }
bottom: 70px;
left: 0; .answerContent {
width: 100%; border-bottom: 1px #ddd solid;
height: 44px; margin-bottom: 5px;
text-align: center; padding: 5px 0;
background: #2179AD;
color: #fff; .questionTitle {
line-height: 44px; font-weight: 700;
} font-size: 13px;
.send{ }
position: fixed;
bottom: 80px; .questionContent {
width: 100%; font-size: 16px;
div{ }
margin: 0 40px; }
height: 40px;
line-height: 40px; .answerContent:last-child {
text-align: center; border-bottom: 0;
color: #fff; }
font-size: 18px;
background: #2179AD; .record {
border-radius: 20px; display: flex;
min-width: 240px; list-style: none;
max-width: 560px; justify-content: space-between;
}
} li {
} width: 30%;
text-align: center;
.editContainer { height: 30px;
padding: 10px; line-height: 30px;
position: fixed; }
bottom: 0; }
width: 100%;
height: 45%; .viewReportBtn {
background-color: #fff; position: fixed;
z-index: 20; bottom: 70px;
-webkit-animation: .5s both slowUp; left: 0;
animation: .5s both slowUp; width: 100%;
min-width: 320px; height: 44px;
max-width: 640px; text-align: center;
margin: 0 auto; background: #2179AD;
> div { color: #fff;
height: 50px; line-height: 44px;
border-bottom: 1px solid #dbdbdb; }
display: flex;
align-items: center; .send {
justify-content: space-between; position: fixed;
> div:first-child { bottom: 80px;
width: 100px; width: 100%;
font-size: 15px;
} div {
> div:last-child { margin: 0 40px;
flex: 1; height: 40px;
} line-height: 40px;
.form-control { text-align: center;
border: none; color: #fff;
box-shadow: none; font-size: 18px;
} background: #2179AD;
} border-radius: 20px;
> div:last-child { min-width: 240px;
border: none; max-width: 560px;
} }
ul.footer { }
display: flex; }
list-style: none;
justify-content: center; .editContainer {
margin-top: 15%; padding: 10px;
li { position: fixed;
width: 30%; bottom: 0;
height: 35px; width: 100%;
line-height: 35px; height: 45%;
text-align: center; background-color: #fff;
background: #e10d0d; z-index: 20;
color: #fff; -webkit-animation: .5s both slowUp;
margin: 0 10px; animation: .5s both slowUp;
border-radius: 10px; min-width: 320px;
} max-width: 640px;
} margin: 0 auto;
}
.recordLists { >div {
li { height: 50px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #dbdbdb;
padding: 5px 10px; display: flex;
background: rgb(251, 251, 251); align-items: center;
} justify-content: space-between;
li:last-child {
border: none; >div:first-child {
} width: 100px;
.opportunityRecordItem { font-size: 15px;
font-size: 15px; }
}
.salesNotice { >div:last-child {
font-size: 14px; flex: 1;
color: #8a8a8a; }
line-height: 1.1;
margin-bottom: 5px; .form-control {
display: flex; border: none;
justify-content: space-between; box-shadow: none;
align-items: center; }
span{ }
width: 85%;
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { >div:last-child {
background-color: #eee; border: none;
opacity: .5; }
border: none;
outline: none; ul.footer {
box-shadow: none; display: flex;
padding-left: 0; list-style: none;
} justify-content: center;
} margin-top: 15%;
.iconfont{
font-size: 18px; li {
} width: 30%;
} height: 35px;
.updatedAt { line-height: 35px;
// font-size: 12px; text-align: center;
// color: #8a8a8a; background: #e10d0d;
// text-align: right; color: #fff;
} margin: 0 10px;
} border-radius: 10px;
.toast { }
position: fixed; }
left: 0; }
right: 0;
min-width: 320px; .recordLists {
max-width: 640px; li {
width: 100%; border-bottom: 1px solid #f0f0f0;
margin: 0 auto; padding: 5px 10px;
z-index: 1; background: rgb(251, 251, 251);
} }
.toastWrapper {
height: 100%; li:last-child {
background-color: rgba(0, 0, 0, .5); border: none;
top: 0; }
}
.am-list-item.am-input-item{ .opportunityRecordItem {
padding-left: 0; font-size: 15px;
} }
}
.salesNotice {
font-size: 14px;
color: #8a8a8a;
line-height: 1.1;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
align-items: center;
span {
width: 85%;
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
background-color: #eee;
opacity: .5;
border: none;
outline: none;
box-shadow: none;
padding-left: 0;
}
}
.iconfont {
font-size: 18px;
}
}
.updatedAt {
// font-size: 12px;
// color: #8a8a8a;
// text-align: right;
}
}
.toast {
position: fixed;
left: 0;
right: 0;
min-width: 320px;
max-width: 640px;
width: 100%;
margin: 0 auto;
z-index: 1;
}
.toastWrapper {
height: 100%;
background-color: rgba(0, 0, 0, .5);
top: 0;
}
.am-list-item.am-input-item {
padding-left: 0;
}
}
\ No newline at end of file
...@@ -3,704 +3,777 @@ import { MyService } from '../my.service'; ...@@ -3,704 +3,777 @@ import { MyService } from '../my.service';
import { ActivatedRoute, Router } 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';
import {environment} from '../../../environments/environment'; import { environment } from '../../../environments/environment';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
@Component({ @Component({
selector: 'ydlife-my-business-detail', selector: 'ydlife-my-business-detail',
templateUrl: './my-business-detail.component.html', templateUrl: './my-business-detail.component.html',
styleUrls: ['./my-business-detail.component.scss'] styleUrls: ['./my-business-detail.component.scss']
}) })
export class MyBusinessDetailComponent implements OnInit { export class MyBusinessDetailComponent implements OnInit {
titleList: Array<any>; titleList : Array<any>;
selectedId: number; selectedId : number;
surveyAnswersList: Array<any>; surveyAnswersList : Array<any>;
readonlyFlag: boolean = true; readonlyFlag : boolean = true;
orderId: number; orderId : number;
sfpMainId:number; sfpMainId : number;
opportunityId: number; opportunityId : number;
opportunitySurveyAnswersList: Array<any>; opportunitySurveyAnswersList : Array<any>;
tagList: Array<any>; tagList : Array<any>;
editBusiness: BusinessQuery = new BusinessQuery(); editBusiness : BusinessQuery = new BusinessQuery();
//商机状态 //商机状态
businessStatusList: Array<any>; businessStatusList : Array<any>;
//经纪人输入商机来源类型 //经纪人输入商机来源类型
businessSourceList: Array<any>; businessSourceList : Array<any>;
//商机星座类型 //商机星座类型
businessZodiacList: Array<any>; businessZodiacList : Array<any>;
//商机血型类型 //商机血型类型
businessBloodList: Array<any>; businessBloodList : Array<any>;
cityFlag: boolean; cityFlag : boolean;
provinceList: Array<any>; provinceList : Array<any>;
provinces: Array<any>; provinces : Array<any>;
//返回的标签列表 //返回的标签列表
opportunityCustomerTags: Array<any>; opportunityCustomerTags : Array<any>;
opportunityRecordInfos: Array<any>; opportunityRecordInfos : Array<any>;
//是否可以跳转预览方案 //是否可以跳转预览方案
isCompletedQuestionnaire: any; isCompletedQuestionnaire : any;
//控制弹框 //控制弹框
toastDialog: boolean; toastDialog : boolean;
toastInfo: any; toastInfo : any;
// 增加还是保存 // 增加还是保存
addStatus: boolean; addStatus : boolean;
// 备注信息 // 备注信息
salesNotice: string; salesNotice : string;
// 跟进时间 // 跟进时间
opportunityRecordNoticeDate: Date; opportunityRecordNoticeDate : Date;
//跟进开始时间 //跟进开始时间
taskTimeFrom: string; taskTimeFrom : string;
//跟进结束时间 //跟进结束时间
taskTimeEnd:string; taskTimeEnd : string;
// 跟进状态 // 跟进状态
opportunityRecordId: number; opportunityRecordId : number;
//性别显示 //性别显示
sexFlag: boolean; sexFlag : boolean;
//显示女 //显示女
femaleFlag: boolean; femaleFlag : boolean;
//显示男 //显示男
maleFlag: boolean; maleFlag : boolean;
isShow: boolean; isShow : boolean;
isSfpShow: boolean; isSfpShow : boolean;
//线索id //线索id
leadsAssignedId: any; leadsAssignedId : any;
//控制tab可不可点 //控制tab可不可点
clickFlag: boolean; clickFlag : boolean;
remarkId: any; remarkId : any;
status: any; status : any;
isNeedAlert: boolean; isNeedAlert : boolean;
dialogInfo: any; dialogInfo : any;
practitionerId:any; practitionerId : any;
// 电子告知书弹窗显示 // 电子告知书弹窗显示
eNoticeState:boolean = false; eNoticeState : boolean = false;
deviceType:number; deviceType : number;
// 获取经纪人信息 // 获取经纪人信息
lifeCustomerInfo:any; lifeCustomerInfo : any;
today:Date = new Date(); today : Date = new Date();
minDate:Date = new Date('1930-01-01') minDate : Date = new Date('1930-01-01');
constructor(private activateRoute: ActivatedRoute, private myService: MyService, iframeUrl : string;
public lifeCommonService: LifeCommonService, private router: Router, ) { seasons:Array<any>;
this.titleList = [ constructor(private activateRoute : ActivatedRoute, private myService : MyService,
{ id: 1, name: '基本信息' }, public lifeCommonService : LifeCommonService, private router : Router, private sanitizer : DomSanitizer,) {
{ id: 3, name: '商机跟进' }, this.titleList = [
{ id: 2, name: '咨询问卷' }, { id: 1, name: '基本信息' },
// { id: 4, name: '咨询报告' }, { id: 3, name: '商机跟进' },
{ id: 5, name: '客户告知书' } { id: 2, name: '咨询问卷' },
] // { id: 4, name: '咨询报告' },
} { id: 5, name: '客户告知书' }
];
ngOnInit() { this.seasons = [
// 获取设备 {label: '06:00',value:1},{label: '06:30',value:2},
this.deviceType = this.lifeCommonService.checkDeviceType(); {label: '07:00',value:3},{label: '07:30',value:4},
this.orderId = this.activateRoute.snapshot.queryParams['orderId']; {label: '08:00',value:5},{label: '08:30',value:6},
this.sfpMainId = this.activateRoute.snapshot.queryParams['sfpMainId']; {label: '09:00',value:7},{label: '09:30', value:8},
if(this.sfpMainId){ {label: '10:00',value:9},{label: '10:30',value:10},
this.isSfpShow = true; {label: '11:00',value:11},{label: '11:30',value:12},
}else{ {label: '12:00',value:13},{label: '12:30',value:14},
this.isSfpShow = false; {label: '13:00',value:15},{label: '13:30',value:16},
} {label: '14:00',value:17},{label: '14:30',value:18},
//商机对应的客户id {label: '15:00',value:19},{label: '15:30',value:20},
this.opportunityId = +this.activateRoute.snapshot.paramMap.get('id'); {label: '16:00',value:21},{label: '16:30',value:22},
//商机id {label: '17:00',value:23},{label: '17:30',value:24},
this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId']; {label: '18:00',value:25},{label: '18:30',value:26},
this.opportunityRecordId = null; {label: '19:00',value:27},{label: '19:30',value:28},
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo')); {label: '20:00',value:29},{label: '20:30',value:30},
this.practitionerId = this.lifeCustomerInfo['practitionerId']; {label: '21:00',value:31},{label: '21:30',value:32},
this.tagQuery(); {label: '22:00',value:33},{label: '22:30',value:34},
//商机状态 {label: '23:00',value:35},{label: '23:30',value:36},
this.dropOptionsQuery('bizchance_promotion_action'); {label: '00:00',value:37}
//经纪人输入商机来源类型 ];
this.dropOptionsQuery('leads_manual_source'); }
//商机星座类型 transform(url : string) : SafeResourceUrl {
this.dropOptionsQuery('leads_manual_zodiac_type'); return this.sanitizer.bypassSecurityTrustResourceUrl(url);
//商机血型类型 }
this.dropOptionsQuery('leads_manual_blood_type'); onChange(result,type) {
//新增商机 if(type===1){
if (Number(this.opportunityId) === 0) { this.taskTimeFrom = result;
this.readonlyFlag = false; }
this.sexFlag = true; if(type===2){
this.maleFlag = true; this.taskTimeEnd = result;
this.femaleFlag = true; }
this.clickFlag = false; }
let myCustomerInfo = JSON.parse(localStorage.getItem('myCustomerInfo')) ngOnInit() {
if(myCustomerInfo){
let birthDate,age;
if(myCustomerInfo.birthDate){
birthDate = myCustomerInfo.birthDate.split('-');
age=this.lifeCommonService.ages(birthDate[0],birthDate[1],birthDate[2]).age;
}else{
age = null;
}
this.editBusiness = new BusinessQuery("",age, myCustomerInfo.name, myCustomerInfo.gender=='女'?2:1, myCustomerInfo.mobileNo, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", null);
}else{
//初始化新增
this.editBusiness = new BusinessQuery("", "", "", 1, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", null);
}
this.selectTab(1);
} else {
this.clickFlag = true;
this.selectTab(1);
//查询商机
setTimeout(() => {
this.ownOpportunityDetailQuery();
}, 300)
}
}
// 日期选择
onOk(e){
console.log(e)
this.editBusiness.age = this.lifeCommonService.ages(e.getFullYear(),e.getMonth() +1,e.getDate()).age;
}
//改为编辑状态出现男女选项
editInfo() {
this.readonlyFlag = false;
this.sexFlag = true;
this.maleFlag = true;
this.femaleFlag = true;
}
selectTab(id) {
if (this.clickFlag == true) {
this.selectedId = id;
} else {
this.selectedId = 1;
}
}
// 查看报告
viewReport(){
window.location.href = `https://${window.location.host}/customizedPlanList/3?orderId=${this.orderId}&customerId=${this.opportunityId}`
}
ownOpportunityDetailQuery() {
const detailParam = {
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
orderId: this.orderId ? Number(this.orderId) : null,
practitionerId: this.practitionerId,
sfpMainId:this.sfpMainId ? Number(this.sfpMainId) : null
}
this.myService.ownOpportunityDetailQuery(detailParam).subscribe((res) => {
if (res['success']) {
this.opportunitySurveyAnswersList = res['data']['opportunityConsultationInfo']['opportunitySurveyAnswersList']
this.editBusiness = res['data']['opportunityBasicInformationInfo'];
this.opportunityCustomerTags = res['data']['opportunityBasicInformationInfo']['opportunityCustomerTags']
this.opportunityRecordInfos = res['data']['opportunityRecordSituationInfo']['opportunityRecordInfos'];
this.isCompletedQuestionnaire = res['data']['opportunityConsultationInfo']['isCompletedQuestionnaire'];
this.status = res['data']['opportunityRecordSituationInfo']['status'];
//如果没有性别显示暂无性别
if (!res['data']['opportunityBasicInformationInfo']['gender']) {
this.sexFlag = false;
} else {
this.sexFlag = true;
if (res['data']['opportunityBasicInformationInfo']['gender'] == 1) {
this.maleFlag = true;
this.femaleFlag = false;
} else {
this.femaleFlag = true;
this.maleFlag = false;
}
}
if (!this.editBusiness.bloodTypeId) {
this.editBusiness.bloodTypeId = '';
}
if (!this.editBusiness.zodiacTypeId) {
this.editBusiness.zodiacTypeId = '';
}
if (!this.editBusiness.sourceFrom) {
this.editBusiness.sourceFrom = '';
}
if (this.opportunityCustomerTags.length > 0) {
for (let i = 0; i < this.opportunityCustomerTags.length; i++) {
for (let j = 0; j < this.tagList.length; j++) {
if (this.opportunityCustomerTags[i]['tagId'] == this.tagList[j]['id']) {
this.tagList[j].selected = true;
} else {
this.tagList[j].selected = false;
}
}
}
}
} else {
this.opportunitySurveyAnswersList = [];
}
})
}
tagQuery() {
this.myService.tagQuery({ tagType: 2, isActive: 1 }).subscribe((res) => {
if (res['success']) {
this.tagList = res['data']['tagVOs'];
}
})
}
//选标签
selectTag(tagItem) {
if (this.readonlyFlag) {
return;
}
this.tagList.forEach((item, idx) => {
if (tagItem.id == item.id) {
this.tagList[idx].selected = !tagItem.selected
}
})
this.editBusiness.opportunityCustomerTags = this.tagList.filter((item) => {
return item.selected == true;
})
}
//选男女
selectedGender(e) {
this.editBusiness.gender = e;
}
// 获取下拉框列表
dropOptionsQuery(dropCode) {
this.myService.dropOptionsQuery({ code: dropCode }).subscribe((res) => {
if (res['success']) {
if (dropCode === 'bizchance_promotion_action') {
this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
} else if (dropCode === 'leads_manual_source') {
this.businessSourceList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
} else if (dropCode === 'leads_manual_zodiac_type') {
this.businessZodiacList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
} else if (dropCode === 'leads_manual_blood_type') {
this.businessBloodList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
}
}
})
}
saveInfo() {
// 如果是新增商机,不需要打标签
let newTag;
if (Number(this.opportunityId) != 0) {
newTag = this.editBusiness.opportunityCustomerTags.map((item) => {
return {
tagId: item.id ? item.id : item.tagId,
tagName: item.tagName
}
})
}
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]*$/;
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;
}
}
if (this.editBusiness.fyp) {
const fypArr = this.editBusiness.fyp.toString().split('.');
if (fypArr.length - 1 == 1) {
if (fypArr[0].length > 10) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyp只能输入最多10位整数!',
timeout: 3000,
align: 'center'
};
return;
}
if (fypArr[1].length > 3) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyp只能输入最多2位小数!',
timeout: 3000,
align: 'center'
};
return;
}
} else if (fypArr.length - 1 > 1) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: 'fyp不能输入多个小数点!',
timeout: 3000,
align: 'center'
};
return;
}
}
if (this.editBusiness.fyc) {
const fycArr = this.editBusiness.fyc.toString().split('.');
if (fycArr.length - 1 == 1) {
if (fycArr[0].length > 10) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyc只能输入最多10位整数!',
timeout: 3000,
align: 'center'
};
return;
}
if (fycArr[1].length > 3) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyc只能输入最多2位小数!',
timeout: 3000,
align: 'center'
};
return;
}
} else if (fycArr.length - 1 > 1) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: 'fyc不能输入多个小数点!',
timeout: 3000,
align: 'center'
};
return;
}
}
if (this.editBusiness.pieces) {
if (!OVERZERO_REG.test(this.editBusiness.pieces)) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计件数只能输入正整数!',
timeout: 3000,
align: 'center'
};
return;
}
}
this.editBusiness = {
...this.editBusiness,
leadsAssignedId: this.leadsAssignedId ? Number(this.leadsAssignedId) : null,
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
opportunityCustomerTags: newTag ? newTag : [],
assignedPractitionerId: this.practitionerId,
fyp: this.editBusiness.fyp ? Number(this.editBusiness.fyp) : null,
fyc: this.editBusiness.fyc ? Number(this.editBusiness.fyc) : null,
sourceFrom: this.editBusiness.sourceFrom ? Number(this.editBusiness.sourceFrom) : null,
birthDate:this.editBusiness.birthDate ? this.lifeCommonService.dateFormat(this.editBusiness.birthDate,'yyyy-MM-dd') : null
}
this.myService.ownOpportunityBasicInformationSave(this.editBusiness).subscribe((res) => {
if (res['success']) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: Number(this.opportunityId) == 0 ? '新增成功!' : '修改成功!',
timeout: 3000,
align: 'center'
};
this.readonlyFlag = true;
if (this.editBusiness.gender) {
this.sexFlag = true;
if (this.editBusiness.gender == '1') {
this.maleFlag = true;
this.femaleFlag = false;
} else {
this.femaleFlag = true;
this.maleFlag = false;
}
} else {
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 }, replaceUrl: true });
this.clickFlag = true;
}
}
this.ownOpportunityDetailQuery();
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
ownOpportunityRecordSave(opportunityRecordItem?: any) {
let param;
if (!opportunityRecordItem) {
const oppDate = new Date(this.opportunityRecordNoticeDate + ' 23:59:59').getTime();
const createDate = new Date(this.editBusiness.opportunityDate).getTime();
// if (nowDate < oppDate) {
// this.toastDialog = true;
// this.toastInfo = {
// status: 1,
// msg: '跟进时间不能大于当前时间!',
// timeout: 3000,
// align: 'center'
// };
// return;
// }
if (oppDate < createDate) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '跟进时间不能在商机之前!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.opportunityRecordId) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '请选择跟进状态!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.salesNotice) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '备注不能为空!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.opportunityRecordNoticeDate) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '跟进时间不能为空!',
timeout: 3000,
align: 'center'
};
return;
}
param = {
id: '',
salesNotice: this.salesNotice,
isActive: 1,
practitionerId: this.practitionerId,
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
mdDropOptionId: this.opportunityRecordId ? Number(this.opportunityRecordId) : null,
noticeDate: this.opportunityRecordNoticeDate,
leadsAssignedId: this.leadsAssignedId ? Number(this.leadsAssignedId) : null,
sfpMainId:this.sfpMainId ? Number(this.sfpMainId) : null,
taskTimeFrom:this.taskTimeFrom,//跟进开始时间
taskTimeEnd:this.taskTimeEnd//跟进结束时间
}
} else {
param = opportunityRecordItem
}
this.myService.ownOpportunityRecordSave(param).subscribe(res => {
if (res['success']) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: opportunityRecordItem ? '修改成功!' : '添加成功!',
timeout: 3000,
align: 'center'
};
this.opportunityRecordId = this.salesNotice = this.opportunityRecordNoticeDate = null;
this.taskTimeFrom = this.taskTimeEnd = null;
this.ownOpportunityDetailQuery();
this.isShow = false;
this.remarkId = '';
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
//添加商机弹框
showToast() {
this.isShow = true;
}
closeToast() {
this.isShow = false;
}
inputBlur() {
window.scrollTo(0, 0)
}
editRemark(id) {
this.remarkId = id
}
openPopInfo(message) {
this.myService.applyForExpertSupport({leadsAssignedId:this.leadsAssignedId,practitionerId:this.practitionerId,opportunityId:this.opportunityId}).subscribe((res)=>{
if(res['success']){
this.ownOpportunityDetailQuery();
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '确认离开', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
// 关闭客户告知书
onClose() {
this.eNoticeState = false;
}
// 发送电子客户告知书,opportunityIdID = CustomerId
sendENotice(){
this.eNoticeState = false;
if(this.deviceType != 3){
alert('请在微信公众号中发送邀请');
return;
}
const param = {
 practitionerId:this.lifeCustomerInfo['practitionerId'],
     leadsAssignedId:this.leadsAssignedId,
     customerName: this.editBusiness.name,
     customerId:this.editBusiness.opportunityId,
     customerMobile: this.editBusiness.mobileNo.replace(/\s/g, ''),
loginId:this.lifeCustomerInfo['customerId']
}
this.myService.saveInformedSheet(param).subscribe(res=>{
if(res['success']){
setTimeout(()=>{
const imgUrl = this.lifeCustomerInfo.practitionerBasicInfo.headImagePath ? this.lifeCustomerInfo.practitionerBasicInfo.headImagePath : `${environment.DOMAINNAME}/ydLife/assets/images/icons/meng.png`;
console.log(imgUrl);
this.lifeCommonService.shareStatusPublish(1);
this.lifeCommonService.wxShare(
'客户告知书和保险经纪服务委托协议签署',
`您的客户告知书和服务委托协议已准备好,请查收并签署,感谢信任和支持。`,
`https://${window.location.host}/ydLife/identify?eNoticeId=${res['data']['id']}`,
imgUrl);
},500)
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
return false;
}
})
}
// 设置样式
setBackgroundColor(e){
let bgColor = 'transparent';
let fontColor = '#666';
if(e.informedOssPath && e.status==0){
bgColor = '#999999';
fontColor = '#fff';
}else if(e.informedOssPath && e.status==1){
bgColor = '#C81B1E';
fontColor = '#fff';
}else{
bgColor = 'transparent';
fontColor = '#666';
}
let style = {
'background-color':bgColor,
'color':fontColor,
'padding':"1px 3px",
'border-radius':"3px"
};
return style;
}
}
// 获取设备
this.deviceType = this.lifeCommonService.checkDeviceType();
this.orderId = this.activateRoute.snapshot.queryParams['orderId'];
this.sfpMainId = this.activateRoute.snapshot.queryParams['sfpMainId'];
if (this.sfpMainId) {
this.isSfpShow = true;
} else {
this.isSfpShow = false;
}
//商机对应的客户id
this.opportunityId = +this.activateRoute.snapshot.paramMap.get('id');
//商机id
this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId'];
this.opportunityRecordId = null;
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo'));
this.practitionerId = this.lifeCustomerInfo['practitionerId'];
this.tagQuery();
//商机状态
this.dropOptionsQuery('bizchance_promotion_action');
//经纪人输入商机来源类型
this.dropOptionsQuery('leads_manual_source');
//商机星座类型
this.dropOptionsQuery('leads_manual_zodiac_type');
//商机血型类型
this.dropOptionsQuery('leads_manual_blood_type');
//新增商机
if (Number(this.opportunityId) === 0) {
this.readonlyFlag = false;
this.sexFlag = true;
this.maleFlag = true;
this.femaleFlag = true;
this.clickFlag = false;
let myCustomerInfo = JSON.parse(localStorage.getItem('myCustomerInfo'))
if (myCustomerInfo) {
let birthDate, age;
if (myCustomerInfo.birthDate) {
birthDate = myCustomerInfo.birthDate.split('-');
age = this.lifeCommonService.ages(birthDate[0], birthDate[1], birthDate[2]).age;
} else {
age = null;
}
this.editBusiness = new BusinessQuery("", age, myCustomerInfo.name, myCustomerInfo.gender == '女' ? 2 : 1, myCustomerInfo.mobileNo, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", null);
} else {
//初始化新增
this.editBusiness = new BusinessQuery("", "", "", 1, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", null);
}
this.selectTab(1);
} else {
this.clickFlag = true;
this.selectTab(1);
//查询商机
setTimeout(() => {
this.ownOpportunityDetailQuery();
}, 300)
}
}
// 日期选择
onOk(e) {
console.log(e)
this.editBusiness.age = this.lifeCommonService.ages(e.getFullYear(), e.getMonth() + 1, e.getDate()).age;
}
//改为编辑状态出现男女选项
editInfo() {
this.readonlyFlag = false;
this.sexFlag = true;
this.maleFlag = true;
this.femaleFlag = true;
}
selectTab(id) {
if (this.clickFlag == true) {
this.selectedId = id;
} else {
this.selectedId = 1;
}
}
// 查看报告
viewReport() {
window.location.href = `https://${window.location.host}/customizedPlanList/3?orderId=${this.orderId}&customerId=${this.opportunityId}`
}
ownOpportunityDetailQuery() {
const detailParam = {
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
orderId: this.orderId ? Number(this.orderId) : null,
practitionerId: this.practitionerId,
sfpMainId: this.sfpMainId ? Number(this.sfpMainId) : null
}
this.myService.ownOpportunityDetailQuery(detailParam).subscribe((res) => {
if (res['success']) {
//拼接iframe url
this.iframeUrl = `${environment.SFPPROJECTURL}/SFP/surveyPages/clientSurvey/clientSurveyInfo?sfpMainId=${this.sfpMainId}&userId=${res['data']['opportunityBasicInformationInfo']['sfpUserId']}`
this.opportunitySurveyAnswersList = res['data']['opportunityConsultationInfo']['opportunitySurveyAnswersList']
this.editBusiness = res['data']['opportunityBasicInformationInfo'];
this.opportunityCustomerTags = res['data']['opportunityBasicInformationInfo']['opportunityCustomerTags']
this.opportunityRecordInfos = res['data']['opportunityRecordSituationInfo']['opportunityRecordInfos'];
this.isCompletedQuestionnaire = res['data']['opportunityConsultationInfo']['isCompletedQuestionnaire'];
this.status = res['data']['opportunityRecordSituationInfo']['status'];
//如果没有性别显示暂无性别
if (!res['data']['opportunityBasicInformationInfo']['gender']) {
this.sexFlag = false;
} else {
this.sexFlag = true;
if (res['data']['opportunityBasicInformationInfo']['gender'] == 1) {
this.maleFlag = true;
this.femaleFlag = false;
} else {
this.femaleFlag = true;
this.maleFlag = false;
}
}
if (!this.editBusiness.bloodTypeId) {
this.editBusiness.bloodTypeId = '';
}
if (!this.editBusiness.zodiacTypeId) {
this.editBusiness.zodiacTypeId = '';
}
if (!this.editBusiness.sourceFrom) {
this.editBusiness.sourceFrom = '';
}
if (this.opportunityCustomerTags.length > 0) {
for (let i = 0; i < this.opportunityCustomerTags.length; i++) {
for (let j = 0; j < this.tagList.length; j++) {
if (this.opportunityCustomerTags[i]['tagId'] == this.tagList[j]['id']) {
this.tagList[j].selected = true;
} else {
this.tagList[j].selected = false;
}
}
}
}
} else {
this.opportunitySurveyAnswersList = [];
}
})
}
tagQuery() {
this.myService.tagQuery({ tagType: 2, isActive: 1 }).subscribe((res) => {
if (res['success']) {
this.tagList = res['data']['tagVOs'];
}
})
}
//选标签
selectTag(tagItem) {
if (this.readonlyFlag) {
return;
}
this.tagList.forEach((item, idx) => {
if (tagItem.id == item.id) {
this.tagList[idx].selected = !tagItem.selected
}
})
this.editBusiness.opportunityCustomerTags = this.tagList.filter((item) => {
return item.selected == true;
})
}
//选男女
selectedGender(e) {
this.editBusiness.gender = e;
}
// 获取下拉框列表
dropOptionsQuery(dropCode) {
this.myService.dropOptionsQuery({ code: dropCode }).subscribe((res) => {
if (res['success']) {
if (dropCode === 'bizchance_promotion_action') {
this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
} else if (dropCode === 'leads_manual_source') {
this.businessSourceList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
} else if (dropCode === 'leads_manual_zodiac_type') {
this.businessZodiacList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
} else if (dropCode === 'leads_manual_blood_type') {
this.businessBloodList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
}
}
})
}
saveInfo() {
// 如果是新增商机,不需要打标签
let newTag;
if (Number(this.opportunityId) != 0) {
newTag = this.editBusiness.opportunityCustomerTags.map((item) => {
return {
tagId: item.id ? item.id : item.tagId,
tagName: item.tagName
}
})
}
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]*$/;
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;
}
}
if (this.editBusiness.fyp) {
const fypArr = this.editBusiness.fyp.toString().split('.');
if (fypArr.length - 1 == 1) {
if (fypArr[0].length > 10) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyp只能输入最多10位整数!',
timeout: 3000,
align: 'center'
};
return;
}
if (fypArr[1].length > 3) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyp只能输入最多2位小数!',
timeout: 3000,
align: 'center'
};
return;
}
} else if (fypArr.length - 1 > 1) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: 'fyp不能输入多个小数点!',
timeout: 3000,
align: 'center'
};
return;
}
}
if (this.editBusiness.fyc) {
const fycArr = this.editBusiness.fyc.toString().split('.');
if (fycArr.length - 1 == 1) {
if (fycArr[0].length > 10) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyc只能输入最多10位整数!',
timeout: 3000,
align: 'center'
};
return;
}
if (fycArr[1].length > 3) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计fyc只能输入最多2位小数!',
timeout: 3000,
align: 'center'
};
return;
}
} else if (fycArr.length - 1 > 1) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: 'fyc不能输入多个小数点!',
timeout: 3000,
align: 'center'
};
return;
}
}
if (this.editBusiness.pieces) {
if (!OVERZERO_REG.test(this.editBusiness.pieces)) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '预计件数只能输入正整数!',
timeout: 3000,
align: 'center'
};
return;
}
}
this.editBusiness = {
...this.editBusiness,
leadsAssignedId: this.leadsAssignedId ? Number(this.leadsAssignedId) : null,
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
opportunityCustomerTags: newTag ? newTag : [],
assignedPractitionerId: this.practitionerId,
fyp: this.editBusiness.fyp ? Number(this.editBusiness.fyp) : null,
fyc: this.editBusiness.fyc ? Number(this.editBusiness.fyc) : null,
sourceFrom: this.editBusiness.sourceFrom ? Number(this.editBusiness.sourceFrom) : null,
birthDate: this.editBusiness.birthDate ? this.lifeCommonService.dateFormat(this.editBusiness.birthDate, 'yyyy-MM-dd') : null
}
this.myService.ownOpportunityBasicInformationSave(this.editBusiness).subscribe((res) => {
if (res['success']) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: Number(this.opportunityId) == 0 ? '新增成功!' : '修改成功!',
timeout: 3000,
align: 'center'
};
this.readonlyFlag = true;
if (this.editBusiness.gender) {
this.sexFlag = true;
if (this.editBusiness.gender == '1') {
this.maleFlag = true;
this.femaleFlag = false;
} else {
this.femaleFlag = true;
this.maleFlag = false;
}
} else {
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 }, replaceUrl: true });
this.clickFlag = true;
}
}
this.ownOpportunityDetailQuery();
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
ownOpportunityRecordSave(opportunityRecordItem ?: any) {
let param;
if (!opportunityRecordItem) {
const oppDate = new Date(this.opportunityRecordNoticeDate + ' 23:59:59').getTime();
const createDate = new Date(this.editBusiness.opportunityDate).getTime();
// if (nowDate < oppDate) {
// this.toastDialog = true;
// this.toastInfo = {
// status: 1,
// msg: '跟进时间不能大于当前时间!',
// timeout: 3000,
// align: 'center'
// };
// return;
// }
if (oppDate < createDate) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '跟进时间不能在商机之前!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.opportunityRecordId) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '请选择跟进状态!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.salesNotice) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '备注不能为空!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.opportunityRecordNoticeDate) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '跟进时间不能为空!',
timeout: 3000,
align: 'center'
};
return;
}
//如果日程时间选择了一个则两个时间都是必填
if(this.taskTimeFrom || this.taskTimeEnd){
if(!this.taskTimeFrom){
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '日程开始时间不能为空!',
timeout: 3000,
align: 'center'
};
return;
}
if(!this.taskTimeEnd){
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '日程结束时间不能为空!',
timeout: 3000,
align: 'center'
};
return;
}
if(this.taskTimeEnd<this.taskTimeFrom){
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '日程结束时间不能早于开始时间!',
timeout: 3000,
align: 'center'
};
return;
}
}
param = {
id: '',
salesNotice: this.salesNotice,
isActive: 1,
practitionerId: this.practitionerId,
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
mdDropOptionId: this.opportunityRecordId ? Number(this.opportunityRecordId) : null,
noticeDate: this.opportunityRecordNoticeDate,
leadsAssignedId: this.leadsAssignedId ? Number(this.leadsAssignedId) : null,
sfpMainId: this.sfpMainId ? Number(this.sfpMainId) : null,
taskTimeFrom: this.taskTimeFrom,//跟进开始时间
taskTimeEnd: this.taskTimeEnd//跟进结束时间
}
} else {
param = opportunityRecordItem
}
this.myService.ownOpportunityRecordSave(param).subscribe(res => {
if (res['success']) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: opportunityRecordItem ? '修改成功!' : '添加成功!',
timeout: 3000,
align: 'center'
};
this.opportunityRecordId = this.salesNotice = this.opportunityRecordNoticeDate = null;
this.taskTimeFrom = this.taskTimeEnd = null;
this.ownOpportunityDetailQuery();
this.isShow = false;
this.remarkId = '';
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
//添加商机弹框
showToast() {
this.isShow = true;
}
closeToast() {
this.isShow = false;
}
inputBlur() {
window.scrollTo(0, 0)
}
editRemark(id) {
this.remarkId = id
}
openPopInfo(message) {
this.myService.applyForExpertSupport({ leadsAssignedId: this.leadsAssignedId, practitionerId: this.practitionerId, opportunityId: this.opportunityId }).subscribe((res) => {
if (res['success']) {
this.ownOpportunityDetailQuery();
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '确认离开', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
// 关闭客户告知书
onClose() {
this.eNoticeState = false;
}
// 发送电子客户告知书,opportunityIdID = CustomerId
sendENotice() {
this.eNoticeState = false;
if (this.deviceType != 3) {
alert('请在微信公众号中发送邀请');
return;
}
const param = {
practitionerId: this.lifeCustomerInfo['practitionerId'],
leadsAssignedId: this.leadsAssignedId,
customerName: this.editBusiness.name,
customerId: this.editBusiness.opportunityId,
customerMobile: this.editBusiness.mobileNo.replace(/\s/g, ''),
loginId: this.lifeCustomerInfo['customerId']
}
this.myService.saveInformedSheet(param).subscribe(res => {
if (res['success']) {
setTimeout(() => {
const imgUrl = this.lifeCustomerInfo.practitionerBasicInfo.headImagePath ? this.lifeCustomerInfo.practitionerBasicInfo.headImagePath : `${environment.DOMAINNAME}/ydLife/assets/images/icons/meng.png`;
console.log(imgUrl);
this.lifeCommonService.shareStatusPublish(1);
this.lifeCommonService.wxShare(
'客户告知书和保险经纪服务委托协议签署',
`您的客户告知书和服务委托协议已准备好,请查收并签署,感谢信任和支持。`,
`https://${window.location.host}/ydLife/identify?eNoticeId=${res['data']['id']}`,
imgUrl);
}, 500)
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
return false;
}
})
}
// 设置样式
setBackgroundColor(e) {
let bgColor = 'transparent';
let fontColor = '#666';
if (e.informedOssPath && e.status == 0) {
bgColor = '#999999';
fontColor = '#fff';
} else if (e.informedOssPath && e.status == 1) {
bgColor = '#C81B1E';
fontColor = '#fff';
} else {
bgColor = 'transparent';
fontColor = '#666';
}
let style = {
'background-color': bgColor,
'color': fontColor,
'padding': "1px 3px",
'border-radius': "3px"
};
return style;
}
}
\ No newline at end of file
...@@ -3,5 +3,6 @@ export const environment = { ...@@ -3,5 +3,6 @@ export const environment = {
BACKEND_URL_CONFIG_VALUE: 'https://m.zuihuibi.cn/api', BACKEND_URL_CONFIG_VALUE: 'https://m.zuihuibi.cn/api',
ORIGINNAME: 'https://m.zuihuibi.cn/ydapi', ORIGINNAME: 'https://m.zuihuibi.cn/ydapi',
DOMAINNAME: 'https://m.zuihuibi.cn/', DOMAINNAME: 'https://m.zuihuibi.cn/',
BAIDU_TONGJI_CODE: '36b1eb7eec3b5dac9f97d887092b5b27' BAIDU_TONGJI_CODE: '36b1eb7eec3b5dac9f97d887092b5b27',
SFPPROJECTURL:'https://m.cffp.org.cn'
}; };
...@@ -6,5 +6,6 @@ export const environment = { ...@@ -6,5 +6,6 @@ export const environment = {
BACKEND_URL_CONFIG_VALUE: 'https://mstage.zuihuibi.cn/api', BACKEND_URL_CONFIG_VALUE: 'https://mstage.zuihuibi.cn/api',
ORIGINNAME: 'https://mstage.zuihuibi.cn/ydapi', ORIGINNAME: 'https://mstage.zuihuibi.cn/ydapi',
DOMAINNAME: 'https://mstage.zuihuibi.cn/', DOMAINNAME: 'https://mstage.zuihuibi.cn/',
BAIDU_TONGJI_CODE: '84be9b9eaaca51048f32bb160ccad2e6' BAIDU_TONGJI_CODE: '84be9b9eaaca51048f32bb160ccad2e6',
SFPPROJECTURL:'https://mstage.zuihuibi.cn'
}; };
...@@ -8,5 +8,7 @@ export const environment = { ...@@ -8,5 +8,7 @@ export const environment = {
BACKEND_URL_CONFIG_VALUE: 'https://mdev.zuihuibi.cn/api', BACKEND_URL_CONFIG_VALUE: 'https://mdev.zuihuibi.cn/api',
ORIGINNAME: 'https://mdev.zuihuibi.cn/ydapi', ORIGINNAME: 'https://mdev.zuihuibi.cn/ydapi',
DOMAINNAME: 'https://mdev.zuihuibi.cn/', DOMAINNAME: 'https://mdev.zuihuibi.cn/',
BAIDU_TONGJI_CODE: 'e8fa107d82e0471d097d545225aeed64' BAIDU_TONGJI_CODE: 'e8fa107d82e0471d097d545225aeed64',
// SFPPROJECTURL:'http://localhost:5173'
SFPPROJECTURL:'https://mdev.zuihuibi.cn'
}; };
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