Commit 33b48658 by Sweet Zhang

商机跟进

parent f72b29eb
...@@ -94,17 +94,36 @@ ...@@ -94,17 +94,36 @@
<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>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast> <ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
.wrapper{ .wrapper {
.tab{ .tab {
display: flex; display: flex;
list-style: none; list-style: none;
margin: 10px 0px; margin: 10px 0px;
padding-left: 1%; padding-left: 1%;
li { li {
margin-right: 10px; margin-right: 10px;
line-height: 30px; line-height: 30px;
height: 30px; height: 30px;
width: 25%; width: 25%;
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{
background-color: #ff5a32;
color: #fff;
border: 1px #f0f0f0 solid;
}
} }
.content{ }
padding: 10px 5px; li.selected {
position: relative; background-color: #ff5a32;
.iconfont{ color: #fff;
position: absolute; border: 1px #f0f0f0 solid;
right: 10px; }
font-size: 24px; }
top: -5px; .content {
} padding: 10px 5px;
.contentDetail{ position: relative;
margin-top: 15px; > .iconfont {
.contentItem{ position: absolute;
display: flex; right: 10px;
margin-bottom: 10px; font-size: 24px;
justify-content: space-between; top: -5px;
align-items: center; }
// border-bottom: 1px #ddd solid; .contentDetail {
margin: 0 8px 8px 8px; margin-top: 15px;
input.form-control{ .contentItem {
display: inline-block; display: flex;
width: 60%; margin-bottom: 10px;
margin: 0 5px; justify-content: space-between;
background:none; align-items: center;
outline:none; // border-bottom: 1px #ddd solid;
border:none; margin: 0 8px 8px 8px;
text-align: right; input.form-control {
box-shadow: none; display: inline-block;
} width: 60%;
margin: 0 5px;
.sexWrapper{ background: none;
display: flex; outline: none;
width: 60%; border: none;
justify-content: flex-end; text-align: right;
padding-right: 16px; box-shadow: none;
.form-control.sex{
width: 20%;
margin-left: 5px;
}
.form-control.sex.sexBtn{
background-color: #5cb85c;
color: #fff;
}
}
}
.contentItem:last-child{
border-bottom: none;
}
}
.tagWrapper{
display: flex;
flex-wrap: wrap;
padding-left: 8px;
div.tagContent{
width: 25%;
margin: 10px 3px 0 3px;
height: 30px;
line-height: 30px;
text-align: center;
background-color: #e8e8e8;
border-radius: 12px;
cursor: pointer;
}
div.selected{
color: #5cb85c;
background: rgba(91, 184, 92, 0.1);
}
}
.answerContent{
border-bottom: 1px #ddd solid;
margin-bottom: 5px;
padding: 5px 0;
.questionTitle{
font-weight: 700;
font-size: 13px;
}
.questionContent{
font-size: 16px;
}
}
.answerContent:last-child{
border-bottom: 0;
}
.add{
width: 30px;
height: 30px;
line-height: 30px;
border-radius: 50%;
text-align: center;
border: 1px #ddd solid;
position: absolute;
right: 10px;
top: -5px;
} }
.record{
.sexWrapper {
display: flex; display: flex;
list-style: none; width: 60%;
justify-content: space-between; justify-content: flex-end;
li{ padding-right: 16px;
width: 30%; .form-control.sex {
text-align: center; width: 20%;
height: 30px; margin-left: 5px;
line-height: 30px; }
.form-control.sex.sexBtn {
background-color: #5cb85c;
color: #fff;
} }
} }
} }
.contentItem:last-child {
border-bottom: none;
}
}
.tagWrapper {
display: flex;
flex-wrap: wrap;
padding-left: 8px;
div.tagContent {
width: 25%;
margin: 10px 3px 0 3px;
height: 30px;
line-height: 30px;
text-align: center;
background-color: #e8e8e8;
border-radius: 12px;
cursor: pointer;
}
div.selected {
color: #5cb85c;
background: rgba(91, 184, 92, 0.1);
}
}
.answerContent {
border-bottom: 1px #ddd solid;
margin-bottom: 5px;
padding: 5px 0;
.questionTitle {
font-weight: 700;
font-size: 13px;
}
.questionContent {
font-size: 16px;
}
}
.answerContent:last-child {
border-bottom: 0;
}
.add {
justify-content: center;
.iconfont {
font-size: 28px;
color: #ff5933;
font-weight: bold;
}
}
.record {
display: flex;
list-style: none;
justify-content: space-between;
li {
width: 30%;
text-align: center;
height: 30px;
line-height: 30px;
}
}
}
.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