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 @@ ...@@ -3,7 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --host 192.168.1.25", "start": "ng serve --host 192.168.1.169",
"build": "ng build -c=dev --prod", "build": "ng build -c=dev --prod",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
......
export class BusinessQuery { export class BusinessQuery {
constructor( constructor(public opportunityId?: string,
public opportunityId?: string,
public age?: string, public age?: string,
public name?: string, public name?: string,
public gender?: string, public gender?: string,
...@@ -10,8 +9,17 @@ export class BusinessQuery { ...@@ -10,8 +9,17 @@ export class BusinessQuery {
public sourceChannel?: string, public sourceChannel?: string,
public address?: string, public address?: string,
public opportunityDate?: string, public opportunityDate?: string,
public opportunityCustomerTags?: any 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) {
} }
......
...@@ -42,13 +42,21 @@ ...@@ -42,13 +42,21 @@
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>血型</span> <span>血型</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无血型信息':'请选择血型'}}" <select name="bloodTypeId" id="bloodTypeId" class="form-control" [disabled]="readonlyFlag">
[disabled]="readonlyFlag" (blur)="inputBlur()" /> <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>
<div class="contentItem"> <div class="contentItem">
<span>星座</span> <span>星座</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无星座信息':'请选择星座'}}" <select name="businessZodiacId" id="businessZodiacId" class="form-control" [disabled]="readonlyFlag">
[disabled]="readonlyFlag" (blur)="inputBlur()" /> <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> </div>
<div class="wrapper_item"> <div class="wrapper_item">
...@@ -57,7 +65,7 @@ ...@@ -57,7 +65,7 @@
<a style="text-decoration:none;color: #333;margin-right: 16px;" href="tel:{{editBusiness.mobileNo}}"> <a style="text-decoration:none;color: #333;margin-right: 16px;" href="tel:{{editBusiness.mobileNo}}">
<i class="iconfont icon-dianhua" style="color: #e10d0d;"></i> <i class="iconfont icon-dianhua" style="color: #e10d0d;"></i>
{{editBusiness.mobileNo}}</a> {{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>
<div class="contentItem"> <div class="contentItem">
<span>微信</span> <span>微信</span>
...@@ -76,28 +84,32 @@ ...@@ -76,28 +84,32 @@
<div class="contentItem"> <div class="contentItem">
<span>预计FYP</span> <span>预计FYP</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计FYP':'请输入预计FYP'}}" <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计FYP':'请输入预计FYP'}}"
[disabled]="readonlyFlag" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyp" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>预计FYC</span> <span>预计FYC</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计FYC':'请输入预计FYP'}}" <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无预计FYC':'请输入预计FYP'}}"
[disabled]="readonlyFlag" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyc"/>
</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 ?'暂无预计件数':'请输入预计件数'}}"
[disabled]="readonlyFlag" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.pieces" />
</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 ?'暂无预计成交时间':'请输入预计成交时间'}}"
[disabled]="readonlyFlag" /> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.timeToClose" />
</div> </div>
</div> </div>
<div class="wrapper_item"> <div class="wrapper_item">
<div class="contentItem"> <div class="contentItem">
<span>商机来源</span> <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>
<div class="contentItem"> <div class="contentItem">
<span>商机时间</span> <span>商机时间</span>
...@@ -119,12 +131,13 @@ ...@@ -119,12 +131,13 @@
<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;padding: 6px 15px;color: #e10d0d;font-weight: bold;"> <div style="padding: 6px 15px;padding: 6px 15px;">
{{editBusiness.mdDropOptionName?editBusiness.mdDropOptionName:'待跟进'}}</div> <input class="form-control" type="text" [(ngModel)]="editBusiness.remark" disabled placeholder="备注信息"/>
</div> </div>
</div> </div>
</div> </div>
<div class="tagWrapper"> <!-- 如果是新增商机,不需要打标签-->
<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}">
......
.wrapper { .wrapper {
select{ select {
-webkit-appearance: none; -webkit-appearance: none;
border: none;
box-shadow: none;
} }
.tab { .tab {
display: flex; display: flex;
...@@ -45,21 +47,19 @@ ...@@ -45,21 +47,19 @@
} }
.contentDetail { .contentDetail {
margin-top: 15px; margin-top: 15px;
.wrapper_item{ .wrapper_item {
border-bottom: 1px #ddd solid; border-bottom: 1px #ddd solid;
margin-bottom: 10px; margin-bottom: 10px;
.contentItem { .contentItem {
display: flex; display: flex;
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 5px 8px; margin: 0 8px 5px 8px;
> span:first-child{ > span:first-child {
white-space: nowrap; white-space: nowrap;
} }
input.form-control { input.form-control {
display: inline-block;
// width: 60%; // width: 60%;
margin: 0 5px; margin: 0 5px;
background: none; background: none;
...@@ -90,6 +90,13 @@ ...@@ -90,6 +90,13 @@
opacity: 1; opacity: 1;
} }
} }
select.form-control {
direction: rtl;
}
select.form-control[disabled] {
background-color: transparent;
color: #999;
}
} }
.contentItem:last-child { .contentItem:last-child {
border-bottom: none; border-bottom: none;
...@@ -164,8 +171,6 @@ ...@@ -164,8 +171,6 @@
} }
.editContainer { .editContainer {
margin-top: 15px;
background: #ffffff;
padding: 10px; padding: 10px;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
...@@ -199,12 +204,12 @@ ...@@ -199,12 +204,12 @@
> div:last-child { > div:last-child {
border: none; border: none;
} }
ul.footer{ ul.footer {
display: flex; display: flex;
list-style: none; list-style: none;
justify-content: center; justify-content: center;
margin-top: 15%; margin-top: 15%;
li{ li {
width: 30%; width: 30%;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
...@@ -250,9 +255,9 @@ ...@@ -250,9 +255,9 @@
margin: 0 auto; margin: 0 auto;
z-index: 1; z-index: 1;
} }
.toastWrapper { .toastWrapper {
height: 100%; height: 100%;
background-color: rgba(0,0,0,.5); background-color: rgba(0, 0, 0, .5);
top: 0; top: 0;
} }
} }
import { Component, OnInit, AfterViewInit } from '@angular/core'; import {Component, OnInit, AfterViewInit} 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({
...@@ -21,8 +21,15 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -21,8 +21,15 @@ export class MyBusinessDetailComponent implements OnInit {
opportunityId: string; opportunityId: string;
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>;
//商机星座类型
businessZodiacList: Array<any>;
//商机血型类型
businessBloodList: Array<any>;
cityFlag: boolean; cityFlag: boolean;
provinceList: Array<any>; provinceList: Array<any>;
provinces: Array<any>; provinces: Array<any>;
...@@ -53,13 +60,14 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -53,13 +60,14 @@ export class MyBusinessDetailComponent implements OnInit {
leadsAssignedId: string; leadsAssignedId: string;
//控制tab可不可点 //控制tab可不可点
clickFlag: boolean; clickFlag: boolean;
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: '商机跟进'}
] ]
} }
...@@ -69,7 +77,14 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -69,7 +77,14 @@ export class MyBusinessDetailComponent implements OnInit {
this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId']; this.leadsAssignedId = this.activateRoute.snapshot.queryParams['leadsAssignedId'];
this.opportunityRecordId = null; this.opportunityRecordId = null;
this.tagQuery(); 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) { if (Number(this.opportunityId) === 0) {
this.readonlyFlag = false; this.readonlyFlag = false;
...@@ -155,7 +170,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -155,7 +170,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'];
} }
...@@ -182,22 +197,34 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -182,22 +197,34 @@ export class MyBusinessDetailComponent implements OnInit {
this.editBusiness.gender = e; this.editBusiness.gender = e;
} }
//商机状态 // 获取下拉框列表
dropOptionsQuery() { dropOptionsQuery(dropCode) {
this.myService.dropOptionsQuery({ code: 'bizchance_promotion_action' }).subscribe((res) => { this.myService.dropOptionsQuery({code: dropCode}).subscribe((res) => {
if (res['success']) { if (res['success']) {
if (dropCode === 'bizchance_promotion_action') {
this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList']; 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() { saveInfo() {
const newTag = this.editBusiness.opportunityCustomerTags.map((item) => { // 如果是新增商机,不需要打标签
let newTag;
if (this.opportunityId != 0) {
newTag = this.editBusiness.opportunityCustomerTags.map((item) => {
return { return {
tagId: item.id ? item.id : item.tagId, tagId: item.id ? item.id : item.tagId,
tagName: item.tagName tagName: item.tagName
} }
}) })
}
const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/; const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/;
if (this.editBusiness.age) { if (this.editBusiness.age) {
if (!OVERZERO_REG.test(this.editBusiness.age)) { if (!OVERZERO_REG.test(this.editBusiness.age)) {
...@@ -225,7 +252,8 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -225,7 +252,8 @@ export class MyBusinessDetailComponent implements OnInit {
} }
this.editBusiness = { this.editBusiness = {
...this.editBusiness, ...this.editBusiness,
opportunityCustomerTags: newTag opportunityCustomerTags: newTag,
assignedPractitionerId: JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerId
} }
this.myService.ownOpportunityBasicInformationSave(this.editBusiness).subscribe((res) => { this.myService.ownOpportunityBasicInformationSave(this.editBusiness).subscribe((res) => {
if (res['success']) { if (res['success']) {
...@@ -254,7 +282,6 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -254,7 +282,6 @@ export class MyBusinessDetailComponent implements OnInit {
} }
ownOpportunityRecordSave() { ownOpportunityRecordSave() {
const oppDate = new Date(this.opportunityRecordNoticeDate + ' 23:59:59').getTime(); const oppDate = new Date(this.opportunityRecordNoticeDate + ' 23:59:59').getTime();
const createDate = new Date(this.editBusiness.opportunityDate).getTime(); const createDate = new Date(this.editBusiness.opportunityDate).getTime();
...@@ -348,6 +375,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -348,6 +375,7 @@ export class MyBusinessDetailComponent implements OnInit {
showToast() { showToast() {
this.isShow = true; this.isShow = true;
} }
closeToast() { closeToast() {
this.isShow = false; 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