Commit cc0f1281 by sunchao

申请专家

parent f219fdff
......@@ -6,7 +6,7 @@
"start": "ng serve --host 192.168.124.107",
"buildDev": "ng build -c=dev --prod",
"buildStage": "ng build -c=stage --prod",
"buildProd": "ng build -c=production --prod ",
"buildProd": "ng build -c=production --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
......
......@@ -124,7 +124,6 @@ export class LoginComponent implements OnInit, OnDestroy {
} else if (!this.MOBILE_REGEXP.test(this.userInfo.mobileNo)) {
this.openPopInfo('手机号不正确');
}
}
// 倒计时
......
......@@ -21,7 +21,10 @@ export class BusinessQuery {
public assignedPractitionerId?: any,
public sourceFrom?: any,
public timeToClose?: any,
public leadsAssignedId?: any
public leadsAssignedId?: any,
public expertType?: any,
public expertPractitionerId?: any,
public expertPractitionerName?: any
) {
......
......@@ -131,7 +131,21 @@
{{editBusiness.mdDropOptionName?editBusiness.mdDropOptionName:'待跟进'}}</div>
</div>
</div>
<div class="wrapper_item" style="border: none;margin-bottom: 0;">
<div *ngIf="editBusiness?.expertType==0" style="width: 50%;margin:0 auto;height:40px;line-height:40px;border-radius:20px;text-align: center;border: 1px #e10d0d solid;"
(click)="openPopInfo('申请已收到,会在1个工作日派遣专家')">
<span>申请专家支持</span>
</div>
<div class="contentItem" *ngIf="editBusiness?.expertType==1">
<span>申请中...</span>
</div>
<div class="contentItem">
<div *ngIf="editBusiness?.expertType ==2">
<span>派遣专家</span>
<span>{{editBusiness?.expertPractitionerName}}</span>
</div>
</div>
</div>
<!-- <div class="contentItem">
<span>标签</span>
<input class="form-control" type="text" placeholder="标签" [(ngModel)]="editBusiness.name"
......@@ -240,3 +254,4 @@
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
\ No newline at end of file
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { MyService } from '../my.service';
import { ActivatedRoute, Router } from "@angular/router";
import { BusinessQuery } from '../../domain/businessQuery';
import { LifeCommonService } from '../../common/life-common.service';
@Component({
selector: 'ydlife-my-business-detail',
templateUrl: './my-business-detail.component.html',
......@@ -62,6 +60,9 @@ export class MyBusinessDetailComponent implements OnInit {
clickFlag: boolean;
remarkId: any;
status: any;
isNeedAlert: boolean;
dialogInfo: any;
practitionerId:any;
constructor(private activateRoute: ActivatedRoute, private myService: MyService,
public lifeCommonService: LifeCommonService, private router: Router, ) {
this.titleList = [
......@@ -79,6 +80,7 @@ export class MyBusinessDetailComponent implements OnInit {
//商机id
this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId'];
this.opportunityRecordId = null;
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']
this.tagQuery();
//商机状态
this.dropOptionsQuery('bizchance_promotion_action');
......@@ -134,7 +136,7 @@ export class MyBusinessDetailComponent implements OnInit {
const detailParam = {
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
orderId: this.orderId ? Number(this.orderId) : null,
practitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']
practitionerId: this.practitionerId
}
this.myService.ownOpportunityDetailQuery(detailParam).subscribe((res) => {
if (res['success']) {
......@@ -393,7 +395,7 @@ export class MyBusinessDetailComponent implements OnInit {
leadsAssignedId: this.leadsAssignedId ? Number(this.leadsAssignedId) : null,
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
opportunityCustomerTags: newTag ? newTag : [],
assignedPractitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerId,
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
......@@ -494,7 +496,7 @@ export class MyBusinessDetailComponent implements OnInit {
id: '',
salesNotice: this.salesNotice,
isActive: 1,
practitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'],
practitionerId: this.practitionerId,
opportunityId: this.opportunityId ? Number(this.opportunityId) : null,
mdDropOptionId: this.opportunityRecordId ? Number(this.opportunityRecordId) : null,
noticeDate: this.opportunityRecordNoticeDate,
......@@ -545,6 +547,34 @@ export class MyBusinessDetailComponent implements OnInit {
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;
}
}
......@@ -331,4 +331,10 @@ export class MyService {
// document.body.removeChild(link);
// })
}
applyForExpertSupport(param){
const url = this.ydapi + '/practitioner/applyForExpertSupport';
return this.http
.post(url, JSON.stringify(param));
}
}
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