Commit 70095582 by Chao Sun

Merge branch 'dev' of http://139.224.139.2:9091/Sweet/ydLife into dev

parents 3b404253 8b278a91
......@@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --host 192.168.1.25",
"start": "ng serve --host 192.168.1.169",
"build": "ng build -c=dev --prod",
"test": "ng test",
"lint": "ng lint",
......@@ -48,4 +48,4 @@
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}
\ No newline at end of file
}
export class BusinessQuery {
constructor(
public opportunityId?: string,
public age?: string,
public name?: string,
public gender?: string,
public mobileNo?: string,
public weChat?: string,
public otherContacts?: string,
public sourceChannel?: string,
public address?: string,
public opportunityDate?: string,
public opportunityCustomerTags?: any
) {
constructor(public opportunityId?: string,
public age?: string,
public name?: string,
public gender?: string,
public mobileNo?: string,
public weChat?: string,
public otherContacts?: string,
public sourceChannel?: string,
public address?: string,
public opportunityDate?: string,
public opportunityCustomerTags?: any,
public zodiacTypeId?: any,
public zodiacType?: any,
public bloodTypeId?: any,
public bloodType?: any,
public fyp?: any,
public fyc?: any,
public pieces?: any,
public remark?: any,
public assignedPractitionerId?: any,
public timeToClose?: any) {
}
}
\ No newline at end of file
}
}
......@@ -42,13 +42,21 @@
</div>
<div class="contentItem">
<span>血型</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无血型信息':'请选择血型'}}"
[disabled]="readonlyFlag" (blur)="inputBlur()" />
<select name="bloodTypeId" id="bloodTypeId" class="form-control" [disabled]="readonlyFlag">
<option value="">{{readonlyFlag ?'暂无血型信息':'请选择血型'}}</option>
<option *ngFor="let businessBloodItem of businessBloodList" value="businessBloodItem.id">{{businessBloodItem.dropOptionName}}</option>
</select>
<!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无血型信息':'请选择血型'}}"-->
<!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.bloodTypeId" (blur)="inputBlur()" />-->
</div>
<div class="contentItem">
<span>星座</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无星座信息':'请选择星座'}}"
[disabled]="readonlyFlag" (blur)="inputBlur()" />
<select name="businessZodiacId" id="businessZodiacId" class="form-control" [disabled]="readonlyFlag">
<option value="">{{readonlyFlag ?'暂无星座信息':'请选择星座'}}</option>
<option *ngFor="let businessZodiacItem of businessZodiacList" value="businessZodiacItem.id">{{businessZodiacItem.dropOptionName}}</option>
</select>
<!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无星座信息':'请选择星座'}}"-->
<!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.zodiacTypeId" (blur)="inputBlur()" />-->
</div>
</div>
<div class="wrapper_item">
......@@ -57,7 +65,7 @@
<a style="text-decoration:none;color: #333;margin-right: 16px;" href="tel:{{editBusiness.mobileNo}}">
<i class="iconfont icon-dianhua" style="color: #e10d0d;"></i>
{{editBusiness.mobileNo}}</a>
<!-- <input class="form-control" type="text" [(ngModel)]="editBusiness.mobileNo" disabled /> -->
<input class="form-control" type="text" [(ngModel)]="editBusiness.mobileNo" *ngIf="opportunityId==0" />
</div>
<div class="contentItem">
<span>微信</span>
......@@ -76,28 +84,32 @@
<div class="contentItem">
<span>预计FYP</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计FYP':'请输入预计FYP'}}"
[disabled]="readonlyFlag" />
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyp" />
</div>
<div class="contentItem">
<span>预计FYC</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计FYC':'请输入预计FYP'}}"
[disabled]="readonlyFlag" />
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyc"/>
</div>
<div class="contentItem">
<span>预计成交件数</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计件数':'请输入预计件数'}}"
[disabled]="readonlyFlag" />
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.pieces" />
</div>
<div class="contentItem">
<span>预计成交时间</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计成交时间':'请输入预计成交时间'}}"
[disabled]="readonlyFlag" />
[disabled]="readonlyFlag" [(ngModel)]="editBusiness.timeToClose" />
</div>
</div>
<div class="wrapper_item">
<div class="contentItem">
<span>商机来源</span>
<input class="form-control" type="text" [(ngModel)]="editBusiness.sourceChannel" disabled />
<select name="businessSourceId" id="businessSourceId" class="form-control" [disabled]="readonlyFlag">
<option value="">{{readonlyFlag ?'暂无商机来源':'请选择商机来源'}}</option>
<option *ngFor="let businessSourceItem of businessSourceList" value="businessSourceItem.id">{{businessSourceItem.dropOptionName}}</option>
</select>
<!--<input class="form-control" type="text" [(ngModel)]="editBusiness.sourceChannel" disabled />-->
</div>
<div class="contentItem">
<span>商机时间</span>
......@@ -119,12 +131,13 @@
<div class="wrapper_item" style="border: none;margin-bottom: 0;">
<div class="contentItem">
<span>备注</span>
<div style="padding: 6px 15px;padding: 6px 15px;color: #e10d0d;font-weight: bold;">
{{editBusiness.mdDropOptionName?editBusiness.mdDropOptionName:'待跟进'}}</div>
<div style="padding: 6px 15px;padding: 6px 15px;">
<input class="form-control" type="text" [(ngModel)]="editBusiness.remark" disabled placeholder="备注信息"/>
</div>
</div>
</div>
<div class="tagWrapper">
<!-- 如果是新增商机,不需要打标签-->
<div class="tagWrapper" *ngIf="opportunityId == 0">
<div style="width: 100%;height: 34px;line-height: 34px;">标签</div>
<!-- <div class="tagContent" *ngFor="let tagItem of tagList" (click)="selectTag(tagItem)"
[ngClass]="{selected:tagItem.selected}">
......@@ -207,4 +220,4 @@
</ul>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
.wrapper {
select{
select {
-webkit-appearance: none;
border: none;
box-shadow: none;
}
.tab {
display: flex;
......@@ -45,21 +47,19 @@
}
.contentDetail {
margin-top: 15px;
.wrapper_item{
.wrapper_item {
border-bottom: 1px #ddd solid;
margin-bottom: 10px;
.contentItem {
display: flex;
margin-bottom: 10px;
justify-content: space-between;
align-items: center;
// border-bottom: 1px #ddd solid;
margin: 0 8px 5px 8px;
> span:first-child{
> span:first-child {
white-space: nowrap;
}
input.form-control {
display: inline-block;
// width: 60%;
margin: 0 5px;
background: none;
......@@ -70,7 +70,7 @@
display: flex;
flex-wrap: wrap;
}
.sexWrapper {
display: flex;
width: 60%;
......@@ -88,14 +88,21 @@
.form-control[disabled] {
background-color: transparent;
opacity: 1;
}
}
select.form-control {
direction: rtl;
}
select.form-control[disabled] {
background-color: transparent;
color: #999;
}
}
.contentItem:last-child {
border-bottom: none;
}
}
}
.tagWrapper {
display: flex;
......@@ -112,7 +119,7 @@
padding: 0 15px;
}
div.selected {
border: 1px #0767bf solid;
border: 1px #0767bf solid;
}
}
.add {
......@@ -132,7 +139,7 @@
font-size: 28px;
// color: #ff5933;
font-weight: bold;
}
}
.answerContent {
......@@ -164,8 +171,6 @@
}
.editContainer {
margin-top: 15px;
background: #ffffff;
padding: 10px;
position: fixed;
bottom: 0;
......@@ -199,12 +204,12 @@
> div:last-child {
border: none;
}
ul.footer{
ul.footer {
display: flex;
list-style: none;
justify-content: center;
margin-top: 15%;
li{
li {
width: 30%;
height: 35px;
line-height: 35px;
......@@ -250,9 +255,9 @@
margin: 0 auto;
z-index: 1;
}
.toastWrapper {
height: 100%;
background-color: rgba(0,0,0,.5);
top: 0;
.toastWrapper {
height: 100%;
background-color: rgba(0, 0, 0, .5);
top: 0;
}
}
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { MyService } from '../my.service';
import { ActivatedRoute } from "@angular/router";
import { BusinessQuery } from '../../domain/businessQuery';
import { LifeCommonService } from '../../common/life-common.service';
import {Component, OnInit, AfterViewInit} from '@angular/core';
import {MyService} from '../my.service';
import {ActivatedRoute} from "@angular/router";
import {BusinessQuery} from '../../domain/businessQuery';
import {LifeCommonService} from '../../common/life-common.service';
@Component({
......@@ -21,8 +21,15 @@ export class MyBusinessDetailComponent implements OnInit {
opportunityId: string;
opportunitySurveyAnswersList: Array<any>;
tagList: Array<any>;
editBusiness: BusinessQuery = new BusinessQuery()
editBusiness: BusinessQuery = new BusinessQuery();
//商机状态
businessStatusList: Array<any>;
//经纪人输入商机来源类型
businessSourceList: Array<any>;
//商机星座类型
businessZodiacList: Array<any>;
//商机血型类型
businessBloodList: Array<any>;
cityFlag: boolean;
provinceList: Array<any>;
provinces: Array<any>;
......@@ -53,13 +60,14 @@ export class MyBusinessDetailComponent implements OnInit {
leadsAssignedId: string;
//控制tab可不可点
clickFlag: boolean;
constructor(private activateRoute: ActivatedRoute, private myService: MyService,
public lifeCommonService: LifeCommonService) {
public lifeCommonService: LifeCommonService) {
this.titleList = [
{ id: 1, name: '基本信息' },
{ id: 2, name: '咨询问卷' },
{ id: 4, name: '咨询报告' },
{ id: 3, name: '商机跟进' }
{id: 1, name: '基本信息'},
{id: 2, name: '咨询问卷'},
{id: 4, name: '咨询报告'},
{id: 3, name: '商机跟进'}
]
}
......@@ -69,7 +77,14 @@ export class MyBusinessDetailComponent implements OnInit {
this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId'];
this.opportunityRecordId = null;
this.tagQuery();
this.dropOptionsQuery();
//商机状态
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;
......@@ -155,7 +170,7 @@ export class MyBusinessDetailComponent implements OnInit {
}
tagQuery() {
this.myService.tagQuery({ tagType: 2, isActive: 1 }).subscribe((res) => {
this.myService.tagQuery({tagType: 2, isActive: 1}).subscribe((res) => {
if (res['success']) {
this.tagList = res['data']['tagVOs'];
}
......@@ -182,22 +197,34 @@ export class MyBusinessDetailComponent implements OnInit {
this.editBusiness.gender = e;
}
//商机状态
dropOptionsQuery() {
this.myService.dropOptionsQuery({ code: 'bizchance_promotion_action' }).subscribe((res) => {
// 获取下拉框列表
dropOptionsQuery(dropCode) {
this.myService.dropOptionsQuery({code: dropCode}).subscribe((res) => {
if (res['success']) {
this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
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() {
const newTag = this.editBusiness.opportunityCustomerTags.map((item) => {
return {
tagId: item.id ? item.id : item.tagId,
tagName: item.tagName
}
})
// 如果是新增商机,不需要打标签
let newTag;
if (this.opportunityId != 0) {
newTag = this.editBusiness.opportunityCustomerTags.map((item) => {
return {
tagId: item.id ? item.id : item.tagId,
tagName: item.tagName
}
})
}
const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/;
if (this.editBusiness.age) {
if (!OVERZERO_REG.test(this.editBusiness.age)) {
......@@ -225,7 +252,8 @@ export class MyBusinessDetailComponent implements OnInit {
}
this.editBusiness = {
...this.editBusiness,
opportunityCustomerTags: newTag
opportunityCustomerTags: newTag,
assignedPractitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerId
}
this.myService.ownOpportunityBasicInformationSave(this.editBusiness).subscribe((res) => {
if (res['success']) {
......@@ -254,7 +282,6 @@ export class MyBusinessDetailComponent implements OnInit {
}
ownOpportunityRecordSave() {
const oppDate = new Date(this.opportunityRecordNoticeDate + ' 23:59:59').getTime();
const createDate = new Date(this.editBusiness.opportunityDate).getTime();
......@@ -348,6 +375,7 @@ export class MyBusinessDetailComponent implements OnInit {
showToast() {
this.isShow = true;
}
closeToast() {
this.isShow = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment