Commit ed769d62 by Chao Sun

新增商机微调

parent 70095582
...@@ -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.169", "start": "ng serve --host 192.168.1.25",
"build": "ng build -c=dev --prod", "build": "ng build -c=dev --prod",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
...@@ -48,4 +48,4 @@ ...@@ -48,4 +48,4 @@
"tslint": "~5.11.0", "tslint": "~5.11.0",
"typescript": "~3.2.2" "typescript": "~3.2.2"
} }
} }
\ No newline at end of file
export class BusinessQuery { export class BusinessQuery {
constructor(public opportunityId?: string, constructor(public opportunityId?: string,
public age?: string, public age?: string,
public name?: string, public name?: string,
public gender?: string, public gender?: any,
public mobileNo?: string, public mobileNo?: string,
public weChat?: string, public weChat?: string,
public otherContacts?: string, public otherContacts?: string,
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 zodiacTypeId?: any,
public zodiacType?: any, public zodiacType?: any,
public bloodTypeId?: any, public bloodTypeId?: any,
public bloodType?: any, public bloodType?: any,
public fyp?: any, public fyp?: any,
public fyc?: any, public fyc?: any,
public pieces?: any, public pieces?: any,
public remark?: any, public remark?: any,
public assignedPractitionerId?: any, public assignedPractitionerId?: any,
public timeToClose?: any) { public timeToClose?: any) {
} }
......
...@@ -44,28 +44,32 @@ ...@@ -44,28 +44,32 @@
<span>血型</span> <span>血型</span>
<select name="bloodTypeId" id="bloodTypeId" class="form-control" [disabled]="readonlyFlag"> <select name="bloodTypeId" id="bloodTypeId" class="form-control" [disabled]="readonlyFlag">
<option value="">{{readonlyFlag ?'暂无血型信息':'请选择血型'}}</option> <option value="">{{readonlyFlag ?'暂无血型信息':'请选择血型'}}</option>
<option *ngFor="let businessBloodItem of businessBloodList" value="businessBloodItem.id">{{businessBloodItem.dropOptionName}}</option> <option *ngFor="let businessBloodItem of businessBloodList" value="businessBloodItem.id">
{{businessBloodItem.dropOptionName}}</option>
</select> </select>
<!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无血型信息':'请选择血型'}}"--> <!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无血型信息':'请选择血型'}}"-->
<!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.bloodTypeId" (blur)="inputBlur()" />--> <!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.bloodTypeId" (blur)="inputBlur()" />-->
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>星座</span> <span>星座</span>
<select name="businessZodiacId" id="businessZodiacId" class="form-control" [disabled]="readonlyFlag"> <select name="businessZodiacId" id="businessZodiacId" class="form-control" [disabled]="readonlyFlag">
<option value="">{{readonlyFlag ?'暂无星座信息':'请选择星座'}}</option> <option value="">{{readonlyFlag ?'暂无星座信息':'请选择星座'}}</option>
<option *ngFor="let businessZodiacItem of businessZodiacList" value="businessZodiacItem.id">{{businessZodiacItem.dropOptionName}}</option> <option *ngFor="let businessZodiacItem of businessZodiacList" value="businessZodiacItem.id">
{{businessZodiacItem.dropOptionName}}</option>
</select> </select>
<!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无星座信息':'请选择星座'}}"--> <!--<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无星座信息':'请选择星座'}}"-->
<!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.zodiacTypeId" (blur)="inputBlur()" />--> <!--[disabled]="readonlyFlag" [(ngModel)]="editBusiness.zodiacTypeId" (blur)="inputBlur()" />-->
</div> </div>
</div> </div>
<div class="wrapper_item"> <div class="wrapper_item">
<div class="contentItem"> <div class="contentItem">
<span>手机</span> <span>手机</span>
<a style="text-decoration:none;color: #333;margin-right: 16px;" href="tel:{{editBusiness.mobileNo}}"> <a *ngIf="opportunityId!=0" 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" *ngIf="opportunityId==0" /> <input class="form-control" type="text" [(ngModel)]="editBusiness.mobileNo" *ngIf="opportunityId==0"
placeholder="请输入手机号" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>微信</span> <span>微信</span>
...@@ -89,7 +93,7 @@ ...@@ -89,7 +93,7 @@
<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" [(ngModel)]="editBusiness.fyc"/> [disabled]="readonlyFlag" [(ngModel)]="editBusiness.fyc" />
</div> </div>
<div class="contentItem"> <div class="contentItem">
<span>预计成交件数</span> <span>预计成交件数</span>
...@@ -107,7 +111,8 @@ ...@@ -107,7 +111,8 @@
<span>商机来源</span> <span>商机来源</span>
<select name="businessSourceId" id="businessSourceId" class="form-control" [disabled]="readonlyFlag"> <select name="businessSourceId" id="businessSourceId" class="form-control" [disabled]="readonlyFlag">
<option value="">{{readonlyFlag ?'暂无商机来源':'请选择商机来源'}}</option> <option value="">{{readonlyFlag ?'暂无商机来源':'请选择商机来源'}}</option>
<option *ngFor="let businessSourceItem of businessSourceList" value="businessSourceItem.id">{{businessSourceItem.dropOptionName}}</option> <option *ngFor="let businessSourceItem of businessSourceList" value="businessSourceItem.id">
{{businessSourceItem.dropOptionName}}</option>
</select> </select>
<!--<input class="form-control" type="text" [(ngModel)]="editBusiness.sourceChannel" disabled />--> <!--<input class="form-control" type="text" [(ngModel)]="editBusiness.sourceChannel" disabled />-->
</div> </div>
...@@ -132,22 +137,23 @@ ...@@ -132,22 +137,23 @@
<div class="contentItem"> <div class="contentItem">
<span>备注</span> <span>备注</span>
<div style="padding: 6px 15px;padding: 6px 15px;"> <div style="padding: 6px 15px;padding: 6px 15px;">
<input class="form-control" type="text" [(ngModel)]="editBusiness.remark" disabled placeholder="备注信息"/> <input class="form-control" type="text" [(ngModel)]="editBusiness.remark" disabled placeholder="备注信息" />
</div>
</div> </div>
</div> </div>
</div>
<!-- 如果是新增商机,不需要打标签--> <!-- 如果是新增商机,不需要打标签-->
<div class="tagWrapper" *ngIf="opportunityId == 0"> <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}">
{{tagItem.tagName}} {{tagItem.tagName}}
</div> --> </div> -->
<div class="tagContent selected" *ngFor="let tagItem of opportunityCustomerTags"> <div class="tagContent selected" *ngFor="let tagItem of opportunityCustomerTags">
{{tagItem.tagName}} {{tagItem.tagName}}
</div>
</div> </div>
</div>
</div>
</div> </div>
<div class="content" *ngIf="selectedId===2"> <div class="content" *ngIf="selectedId===2">
<div style="text-align: center;font-size: 16px;margin-top: 10px;" <div style="text-align: center;font-size: 16px;margin-top: 10px;"
...@@ -220,4 +226,4 @@ ...@@ -220,4 +226,4 @@
</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
...@@ -70,7 +70,11 @@ ...@@ -70,7 +70,11 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
select{
option.gray{
color: #ccc;
}
}
.sexWrapper { .sexWrapper {
display: flex; display: flex;
width: 60%; width: 60%;
......
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({
...@@ -62,12 +62,12 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -62,12 +62,12 @@ export class MyBusinessDetailComponent implements OnInit {
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: '商机跟进' }
] ]
} }
...@@ -92,6 +92,8 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -92,6 +92,8 @@ export class MyBusinessDetailComponent implements OnInit {
this.maleFlag = true; this.maleFlag = true;
this.femaleFlag = true; this.femaleFlag = true;
this.clickFlag = false; this.clickFlag = false;
//初始化新增
this.editBusiness = new BusinessQuery("", "", "", 1, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
this.selectTab(1); this.selectTab(1);
} else { } else {
this.clickFlag = true; this.clickFlag = true;
...@@ -123,7 +125,6 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -123,7 +125,6 @@ export class MyBusinessDetailComponent implements OnInit {
} else { } else {
this.selectedId = 1; this.selectedId = 1;
} }
} }
ownOpportunityDetailQuery() { ownOpportunityDetailQuery() {
...@@ -170,7 +171,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -170,7 +171,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'];
} }
...@@ -199,7 +200,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -199,7 +200,7 @@ export class MyBusinessDetailComponent implements OnInit {
// 获取下拉框列表 // 获取下拉框列表
dropOptionsQuery(dropCode) { dropOptionsQuery(dropCode) {
this.myService.dropOptionsQuery({code: dropCode}).subscribe((res) => { this.myService.dropOptionsQuery({ code: dropCode }).subscribe((res) => {
if (res['success']) { if (res['success']) {
if (dropCode === 'bizchance_promotion_action') { if (dropCode === 'bizchance_promotion_action') {
this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList']; this.businessStatusList = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
...@@ -217,7 +218,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -217,7 +218,7 @@ export class MyBusinessDetailComponent implements OnInit {
saveInfo() { saveInfo() {
// 如果是新增商机,不需要打标签 // 如果是新增商机,不需要打标签
let newTag; let newTag;
if (this.opportunityId != 0) { if (Number(this.opportunityId) != 0) {
newTag = this.editBusiness.opportunityCustomerTags.map((item) => { newTag = this.editBusiness.opportunityCustomerTags.map((item) => {
return { return {
tagId: item.id ? item.id : item.tagId, tagId: item.id ? item.id : item.tagId,
......
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