Commit 33b48658 by Sweet Zhang

商机跟进

parent f72b29eb
...@@ -94,16 +94,35 @@ ...@@ -94,16 +94,35 @@
<div>暂无方案</div> <div>暂无方案</div>
</div> </div>
<div class="content" *ngIf="selectedId===3"> <div class="content" *ngIf="selectedId===3">
<div class="add">+</div> <!--编辑框-->
<ul class="record" style="margin-top: 15px;"> <div class="editContainer">
<li>日期</li> <div>
<li>商机状态</li> <div>跟进状态</div>
<li>备注</li> <div>
</ul> <select name="businessStatus" id="businessStatus" class="form-control" [(ngModel)]="opportunityRecordId">
<ul class="record" *ngFor="let opportunityRecordItem of opportunityRecordInfos"> <option value="null">请选择</option>
<li>{{(opportunityRecordItem.updatedAt).substr(0,10)}}</li> <option *ngFor="let businessStatusItem of businessStatusList" value="{{businessStatusItem.id}}">{{businessStatusItem.dropOptionName}}</option>
<li>{{lifeCommonService.checkStr(opportunityRecordItem.mdDropOptionId)}}</li> </select>
<li>{{opportunityRecordItem.salesNotice}}</li> </div>
</div>
<div>
<div>备注</div>
<div><input type="text" class="form-control" placeholder="输入备注信息" [(ngModel)]="salesNotice"></div>
</div>
<div>
<div>跟进时间</div>
<div><input type="date" class="form-control" [(ngModel)]="opportunityRecordNoticeDate"></div>
</div>
<div class="add">
<i class="iconfont icon-jia" (click)="ownOpportunityRecordSave()"></i>
</div>
</div>
<ul class="recordLists">
<li *ngFor="let opportunityRecordItem of opportunityRecordInfos">
<div class="opportunityRecordItem">{{lifeCommonService.checkStr(opportunityRecordItem.mdDropOptionId)}}</div>
<div class="salesNotice">{{opportunityRecordItem.salesNotice}}</div>
<div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div>
</li>
</ul> </ul>
</div> </div>
</div> </div>
......
.wrapper{ .wrapper {
.tab{ .tab {
display: flex; display: flex;
list-style: none; list-style: none;
margin: 10px 0px; margin: 10px 0px;
...@@ -12,70 +12,70 @@ ...@@ -12,70 +12,70 @@
text-align: center; text-align: center;
border: 1px #a9aabb solid; border: 1px #a9aabb solid;
border-radius: 20px; border-radius: 20px;
h3{ h3 {
font-weight: normal; font-weight: normal;
font-size: 16px; font-size: 16px;
} }
} }
li.selected{ li.selected {
background-color: #ff5a32; background-color: #ff5a32;
color: #fff; color: #fff;
border: 1px #f0f0f0 solid; border: 1px #f0f0f0 solid;
} }
} }
.content{ .content {
padding: 10px 5px; padding: 10px 5px;
position: relative; position: relative;
.iconfont{ > .iconfont {
position: absolute; position: absolute;
right: 10px; right: 10px;
font-size: 24px; font-size: 24px;
top: -5px; top: -5px;
} }
.contentDetail{ .contentDetail {
margin-top: 15px; margin-top: 15px;
.contentItem{ .contentItem {
display: flex; display: flex;
margin-bottom: 10px; margin-bottom: 10px;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
// border-bottom: 1px #ddd solid; // border-bottom: 1px #ddd solid;
margin: 0 8px 8px 8px; margin: 0 8px 8px 8px;
input.form-control{ input.form-control {
display: inline-block; display: inline-block;
width: 60%; width: 60%;
margin: 0 5px; margin: 0 5px;
background:none; background: none;
outline:none; outline: none;
border:none; border: none;
text-align: right; text-align: right;
box-shadow: none; box-shadow: none;
} }
.sexWrapper{ .sexWrapper {
display: flex; display: flex;
width: 60%; width: 60%;
justify-content: flex-end; justify-content: flex-end;
padding-right: 16px; padding-right: 16px;
.form-control.sex{ .form-control.sex {
width: 20%; width: 20%;
margin-left: 5px; margin-left: 5px;
} }
.form-control.sex.sexBtn{ .form-control.sex.sexBtn {
background-color: #5cb85c; background-color: #5cb85c;
color: #fff; color: #fff;
} }
} }
} }
.contentItem:last-child{ .contentItem:last-child {
border-bottom: none; border-bottom: none;
} }
} }
.tagWrapper{ .tagWrapper {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding-left: 8px; padding-left: 8px;
div.tagContent{ div.tagContent {
width: 25%; width: 25%;
margin: 10px 3px 0 3px; margin: 10px 3px 0 3px;
height: 30px; height: 30px;
...@@ -85,43 +85,40 @@ ...@@ -85,43 +85,40 @@
border-radius: 12px; border-radius: 12px;
cursor: pointer; cursor: pointer;
} }
div.selected{ div.selected {
color: #5cb85c; color: #5cb85c;
background: rgba(91, 184, 92, 0.1); background: rgba(91, 184, 92, 0.1);
} }
} }
.answerContent{ .answerContent {
border-bottom: 1px #ddd solid; border-bottom: 1px #ddd solid;
margin-bottom: 5px; margin-bottom: 5px;
padding: 5px 0; padding: 5px 0;
.questionTitle{ .questionTitle {
font-weight: 700; font-weight: 700;
font-size: 13px; font-size: 13px;
} }
.questionContent{ .questionContent {
font-size: 16px; font-size: 16px;
} }
} }
.answerContent:last-child{ .answerContent:last-child {
border-bottom: 0; border-bottom: 0;
} }
.add{ .add {
width: 30px; justify-content: center;
height: 30px; .iconfont {
line-height: 30px; font-size: 28px;
border-radius: 50%; color: #ff5933;
text-align: center; font-weight: bold;
border: 1px #ddd solid;
position: absolute;
right: 10px;
top: -5px;
} }
.record{ }
.record {
display: flex; display: flex;
list-style: none; list-style: none;
justify-content: space-between; justify-content: space-between;
li{ li {
width: 30%; width: 30%;
text-align: center; text-align: center;
height: 30px; height: 30px;
...@@ -129,4 +126,56 @@ ...@@ -129,4 +126,56 @@
} }
} }
} }
.editContainer {
margin-top: 15px;
background: #ffffff;
padding-left: 10px;
> div {
height: 50px;
border-bottom: 1px solid #dbdbdb;
display: flex;
align-items: center;
justify-content: space-between;
> div:first-child {
width: 100px;
font-size: 15px;
}
> div:last-child {
flex: 1;
}
.form-control {
border: none;
box-shadow: none;
}
}
> div:last-child {
border: none;
}
}
.recordLists {
li {
border-bottom: 1px solid #f0f0f0;
padding: 5px 10px;
background: rgb(251, 251, 251);
}
li:last-child {
border: none;
}
.opportunityRecordItem {
font-size: 15px;
}
.salesNotice {
font-size: 14px;
color: #8a8a8a;
line-height: 1.1;
margin-bottom: 5px;
}
.updatedAt {
font-size: 12px;
color: #8a8a8a;
text-align: right;
}
}
} }
import { Component, OnInit } from '@angular/core'; import {Component, OnInit} from '@angular/core';
import { MyService } from '../my.service'; import {MyService} from '../my.service';
import { ActivatedRoute } from "@angular/router"; import {ActivatedRoute} 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';
@Component({ @Component({
selector: 'ydlife-my-business-detail', selector: 'ydlife-my-business-detail',
templateUrl: './my-business-detail.component.html', templateUrl: './my-business-detail.component.html',
...@@ -30,13 +30,22 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -30,13 +30,22 @@ export class MyBusinessDetailComponent implements OnInit {
//控制弹框 //控制弹框
toastDialog: boolean; toastDialog: boolean;
toastInfo: any; toastInfo: any;
// 增加还是保存
addStatus: boolean;
// 备注信息
salesNotice: string;
// 跟进时间
opportunityRecordNoticeDate: Date;
// 跟进状态
opportunityRecordId: number = null;
constructor(private activateRoute: ActivatedRoute, private myService: MyService, constructor(private activateRoute: ActivatedRoute, private myService: MyService,
public lifeCommonService: LifeCommonService) { public lifeCommonService: LifeCommonService) {
this.titleList = [ this.titleList = [
{ id: 1, name: '基本信息' }, {id: 1, name: '基本信息'},
{ id: 2, name: '咨询问卷' }, {id: 2, name: '咨询问卷'},
{ id: 4, name: '咨询预览' }, {id: 4, name: '咨询预览'},
{ id: 3, name: '商机跟进' } {id: 3, name: '商机跟进'}
] ]
} }
...@@ -45,7 +54,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -45,7 +54,7 @@ export class MyBusinessDetailComponent implements OnInit {
this.orderId = this.activateRoute.snapshot.queryParams['orderId']; this.orderId = this.activateRoute.snapshot.queryParams['orderId'];
this.opportunityId = this.activateRoute.snapshot.paramMap.get('id'); this.opportunityId = this.activateRoute.snapshot.paramMap.get('id');
this.tagQuery(); this.tagQuery();
this.selectTab(1); this.selectTab(3);
this.ownOpportunityDetailQuery(); this.ownOpportunityDetailQuery();
this.dropOptionsQuery(); this.dropOptionsQuery();
...@@ -67,16 +76,16 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -67,16 +76,16 @@ export class MyBusinessDetailComponent implements OnInit {
} }
ownOpportunityDetailQuery() { ownOpportunityDetailQuery() {
// const detailParam = {
// opportunityId: this.opportunityId,
// orderId: this.orderId,
// practitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']
// }
const detailParam = { const detailParam = {
opportunityId: 2, opportunityId: this.opportunityId,
orderId: 8373, orderId: this.orderId,
practitionerId: 1 practitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']
} }
// const detailParam = {
// opportunityId: 2,
// orderId: 8373,
// practitionerId: 1
// }
this.myService.ownOpportunityDetailQuery(detailParam).subscribe((res) => { this.myService.ownOpportunityDetailQuery(detailParam).subscribe((res) => {
if (res['success']) { if (res['success']) {
this.opportunitySurveyAnswersList = res['data']['opportunityConsultationInfo']['opportunitySurveyAnswersList'] this.opportunitySurveyAnswersList = res['data']['opportunityConsultationInfo']['opportunitySurveyAnswersList']
...@@ -103,7 +112,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -103,7 +112,7 @@ export class MyBusinessDetailComponent implements OnInit {
} }
tagQuery() { tagQuery() {
this.myService.tagQuery({ tagType: 2, isActive: 1 }).subscribe((res) => { this.myService.tagQuery({tagType: 2, isActive: 1}).subscribe((res) => {
if (res['success']) { if (res['success']) {
this.tagList = res['data']['tagVOs']; this.tagList = res['data']['tagVOs'];
...@@ -128,9 +137,10 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -128,9 +137,10 @@ export class MyBusinessDetailComponent implements OnInit {
selectedGender(e) { selectedGender(e) {
this.editBusiness.gender = e; this.editBusiness.gender = e;
} }
//商机状态 //商机状态
dropOptionsQuery() { dropOptionsQuery() {
this.myService.dropOptionsQuery({ code: 'bizchance_promotion_action' }).subscribe((res) => { this.myService.dropOptionsQuery({code: 'bizchance_promotion_action'}).subscribe((res) => {
if (res['success']) { if (res['success']) {
this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList']; this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
} }
...@@ -163,4 +173,49 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -163,4 +173,49 @@ export class MyBusinessDetailComponent implements OnInit {
} }
}) })
} }
ownOpportunityRecordSave() {
if (!this.opportunityRecordId && !this.salesNotice) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '跟进状态和备注不能同时为空!',
timeout: 3000,
align: 'center'
};
return;
}
const param = {
id: '',
salesNotice: this.salesNotice,
isActive: 1,
practitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'],
opportunityId: this.opportunityId,
mdDropOptionId: this.opportunityRecordId,
noticeDate: this.opportunityRecordNoticeDate
}
this.myService.ownOpportunityRecordSave(param).subscribe(res => {
console.log(res);
if (res['success']) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '修改成功!',
timeout: 3000,
align: 'center'
};
this.ownOpportunityDetailQuery();
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
} }
...@@ -83,6 +83,13 @@ export class MyService { ...@@ -83,6 +83,13 @@ export class MyService {
return res; return res;
}); });
} }
//经纪人修改商机跟进信息
ownOpportunityRecordSave(param){
const url = this.API + "/practitioner/ownOpportunityRecordSave";
return this.http.post(url, JSON.stringify(param)).pipe(res => {
return res;
});
}
//标签列表查询 //标签列表查询
tagQuery(param) { tagQuery(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