Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
a22c4e4d
Commit
a22c4e4d
authored
Mar 11, 2020
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的商机基本信息
parent
be1732aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
46 deletions
+51
-46
package.json
+1
-1
src/app/my/my-business-detail/my-business-detail.component.html
+6
-10
src/app/my/my-business-detail/my-business-detail.component.ts
+44
-35
No files found.
package.json
View file @
a22c4e4d
...
@@ -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.
68.102
"
,
"build"
:
"ng build -c=dev --prod"
,
"build"
:
"ng build -c=dev --prod"
,
"test"
:
"ng test"
,
"test"
:
"ng test"
,
"lint"
:
"ng lint"
,
"lint"
:
"ng lint"
,
...
...
src/app/my/my-business-detail/my-business-detail.component.html
View file @
a22c4e4d
...
@@ -26,10 +26,10 @@
...
@@ -26,10 +26,10 @@
<span>
性别
</span>
<span>
性别
</span>
<div
class=
"sexWrapper"
>
<div
class=
"sexWrapper"
>
<button
class=
"form-control sex"
[
ngClass
]="{'
sexBtn
'
:editBusiness
?.
gender=
='1'}"
<button
class=
"form-control sex"
[
ngClass
]="{'
sexBtn
'
:editBusiness
?.
gender=
='1'}"
(
click
)="
selectedGender
('
1
')"
>
男
(
click
)="
selectedGender
('
1
')"
[
disabled
]="
readonlyFlag
"
>
男
</button>
</button>
<button
class=
"form-control sex"
[
ngClass
]="{'
sexBtn
'
:editBusiness
?.
gender=
='2'}"
<button
class=
"form-control sex"
[
ngClass
]="{'
sexBtn
'
:editBusiness
?.
gender=
='2'}"
(
click
)="
selectedGender
('
2
')"
>
女
</button>
(
click
)="
selectedGender
('
2
')"
[
disabled
]="
readonlyFlag
"
>
女
</button>
</div>
</div>
</div>
</div>
<div
class=
"contentItem"
>
<div
class=
"contentItem"
>
...
@@ -69,16 +69,16 @@
...
@@ -69,16 +69,16 @@
<span>
商机状态
</span>
<span>
商机状态
</span>
<div>
{{lifeCommonService.checkStr(editBusiness.mdDropOptionId)}}
</div>
<div>
{{lifeCommonService.checkStr(editBusiness.mdDropOptionId)}}
</div>
</div>
</div>
<div
class=
"contentItem"
>
<
!-- <
div class="contentItem">
<span>标签</span>
<span>标签</span>
<input class="form-control" type="text" placeholder="标签" [(ngModel)]="editBusiness.name"
<input class="form-control" type="text" placeholder="标签" [(ngModel)]="editBusiness.name"
[disabled]="readonlyFlag" />
[disabled]="readonlyFlag" />
</div>
</div>
-->
</div>
</div>
<div
class=
"tagWrapper"
>
<div
class=
"tagWrapper"
>
<div
style=
"width: 100%;"
>
请选择客户
标签
</div>
<div
style=
"width: 100%;"
>
标签
</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>
</div>
...
@@ -98,7 +98,4 @@
...
@@ -98,7 +98,4 @@
<li>
备注
</li>
<li>
备注
</li>
</ul>
</ul>
</div>
</div>
<ydlife-picker
*
ngIf=
"cityFlag"
[
provinceLists
]="
provinces
"
[
limitStep
]="
areaLimitStep
"
(
selectedArea
)="
getAreaInfo
($
event
,
1
)"
></ydlife-picker>
</div>
</div>
\ No newline at end of file
src/app/my/my-business-detail/my-business-detail.component.ts
View file @
a22c4e4d
import
{
Component
,
OnInit
,
Output
,
Input
,
EventEmitter
}
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'
;
...
@@ -9,7 +9,6 @@ import { LifeCommonService } from '../../common/life-common.service';
...
@@ -9,7 +9,6 @@ import { LifeCommonService } from '../../common/life-common.service';
styleUrls
:
[
'./my-business-detail.component.scss'
]
styleUrls
:
[
'./my-business-detail.component.scss'
]
})
})
export
class
MyBusinessDetailComponent
implements
OnInit
{
export
class
MyBusinessDetailComponent
implements
OnInit
{
@
Output
()
sendRemoveScrollContent
=
new
EventEmitter
();
titleList
:
Array
<
any
>
;
titleList
:
Array
<
any
>
;
selectedId
:
number
;
selectedId
:
number
;
surveyAnswersList
:
Array
<
any
>
;
surveyAnswersList
:
Array
<
any
>
;
...
@@ -23,6 +22,8 @@ export class MyBusinessDetailComponent implements OnInit {
...
@@ -23,6 +22,8 @@ export class MyBusinessDetailComponent implements OnInit {
cityFlag
:
boolean
;
cityFlag
:
boolean
;
provinceList
:
Array
<
any
>
;
provinceList
:
Array
<
any
>
;
provinces
:
Array
<
any
>
;
provinces
:
Array
<
any
>
;
//返回的标签列表
opportunityCustomerTags
:
Array
<
any
>
;
constructor
(
private
activateRoute
:
ActivatedRoute
,
private
myService
:
MyService
,
constructor
(
private
activateRoute
:
ActivatedRoute
,
private
myService
:
MyService
,
public
lifeCommonService
:
LifeCommonService
)
{
public
lifeCommonService
:
LifeCommonService
)
{
this
.
titleList
=
[
this
.
titleList
=
[
...
@@ -35,16 +36,11 @@ export class MyBusinessDetailComponent implements OnInit {
...
@@ -35,16 +36,11 @@ export class MyBusinessDetailComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
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
.
selectTab
(
1
);
this
.
selectTab
(
1
);
this
.
ownOpportunityDetailQuery
();
this
.
ownOpportunityDetailQuery
();
this
.
tagQuery
();
this
.
dropOptionsQuery
();
this
.
dropOptionsQuery
();
// 获取省份
this
.
myService
.
provinceqry
({
insurerId
:
11
}).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
provinces
=
res
[
'data'
].
provinceList
;
}
})
}
}
editInfo
()
{
editInfo
()
{
...
@@ -67,32 +63,50 @@ export class MyBusinessDetailComponent implements OnInit {
...
@@ -67,32 +63,50 @@ export class MyBusinessDetailComponent implements OnInit {
practitionerId
:
1
practitionerId
:
1
}
}
this
.
myService
.
ownOpportunityDetailQuery
(
detailParam
).
subscribe
((
res
)
=>
{
this
.
myService
.
ownOpportunityDetailQuery
(
detailParam
).
subscribe
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
opportunitySurveyAnswersList
=
res
[
'data'
][
'opportunityConsultationInfo'
][
'opportunitySurveyAnswersList'
]
this
.
opportunitySurveyAnswersList
=
res
[
'data'
][
'opportunityConsultationInfo'
][
'opportunitySurveyAnswersList'
]
this
.
editBusiness
=
res
[
'data'
][
'opportunityBasicInformationInfo'
]
this
.
editBusiness
=
res
[
'data'
][
'opportunityBasicInformationInfo'
];
this
.
opportunityCustomerTags
=
res
[
'data'
][
'opportunityBasicInformationInfo'
][
'opportunityCustomerTags'
]
if
(
this
.
opportunityCustomerTags
.
length
>
0
){
for
(
let
i
=
0
;
i
<
this
.
opportunityCustomerTags
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
tagList
.
length
;
j
++
){
if
(
this
.
opportunityCustomerTags
[
i
][
'tagId'
]
==
this
.
tagList
[
j
][
'id'
]){
this
.
tagList
[
j
].
selected
=
true
;
}
else
{
this
.
tagList
[
j
].
selected
=
false
;
}
}
}
console
.
log
(
this
.
tagList
)
}
}
else
{
}
else
{
this
.
opportunitySurveyAnswersList
=
[];
this
.
opportunitySurveyAnswersList
=
[];
}
}
})
})
}
}
saveInfo
()
{
}
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'
];
}
}
})
})
}
}
//选标签
//选标签
selectTag
(
tagItem
)
{
selectTag
(
tagItem
)
{
tagItem
.
selected
=
!
tagItem
.
selected
;
this
.
tagList
.
forEach
((
item
,
idx
)
=>
{
console
.
log
(
tagItem
)
if
(
tagItem
.
id
==
item
.
id
){
this
.
tagList
[
idx
].
selected
=!
tagItem
.
selected
}
})
this
.
editBusiness
.
opportunityCustomerTags
=
this
.
tagList
.
filter
((
item
)
=>
{
return
item
.
selected
==
true
;
})
}
}
//选男女
//选男女
...
@@ -102,29 +116,24 @@ export class MyBusinessDetailComponent implements OnInit {
...
@@ -102,29 +116,24 @@ export class MyBusinessDetailComponent implements OnInit {
//商机状态
//商机状态
dropOptionsQuery
()
{
dropOptionsQuery
()
{
this
.
myService
.
dropOptionsQuery
({
code
:
'bizchance_promotion_action'
}).
subscribe
((
res
)
=>
{
this
.
myService
.
dropOptionsQuery
({
code
:
'bizchance_promotion_action'
}).
subscribe
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
businessStatusList
=
res
[
'data'
][
'dropMasterInfoList'
][
'0'
][
'dropOptionsInfoList'
];
this
.
businessStatusList
=
res
[
'data'
][
'dropMasterInfoList'
][
'0'
][
'dropOptionsInfoList'
];
}
}
})
})
}
}
// 选择地址信息
saveInfo
(){
selectedArea
()
{
const
newTag
=
this
.
editBusiness
.
opportunityCustomerTags
.
map
((
item
)
=>
{
this
.
sendRemoveScrollContent
.
emit
(
1
);
return
{
tagId
:
item
.
id
?
item
.
id
:
item
.
tagId
,
this
.
cityFlag
=
true
;
tagName
:
item
.
tagName
}
}
})
// 获取地址信息
getAreaInfo
(
e
,
type
)
{
this
.
editBusiness
=
{
this
.
sendRemoveScrollContent
.
emit
(
0
);
...
this
.
editBusiness
,
this
.
cityFlag
=
false
;
opportunityCustomerTags
:
newTag
}
console
.
log
(
this
.
editBusiness
)
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment