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
e86e85ea
Commit
e86e85ea
authored
Mar 29, 2022
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的商机增加出生日期
parent
bb65fed9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
89 additions
and
9 deletions
+89
-9
src/app/common/alert/alert.component.html
+1
-1
src/app/common/alert/alert.component.ts
+2
-2
src/app/domain/businessQuery.ts
+2
-1
src/app/my/my-business-detail/my-business-detail.component.html
+16
-1
src/app/my/my-business-detail/my-business-detail.component.ts
+9
-1
src/app/my/my-business/my-business.component.html
+11
-2
src/app/my/my-business/my-business.component.ts
+37
-0
src/app/my/my.service.ts
+7
-1
src/styles.scss
+4
-0
No files found.
src/app/common/alert/alert.component.html
View file @
e86e85ea
...
...
@@ -9,7 +9,7 @@
</div>
<div
class=
"weui-dialog__ft"
>
<a
href=
"javascript:;"
class=
"weui-dialog__btn"
[
ngClass
]="
footer
.
className
"
*
ngFor=
"let footer of dialogInfo.footer"
(
click
)="
sendInfo
()"
>
{{footer.value}}
</a>
*
ngFor=
"let footer of dialogInfo.footer"
(
click
)="
sendInfo
(
footer
.
value
)"
>
{{footer.value}}
</a>
</div>
</div>
</div>
...
...
src/app/common/alert/alert.component.ts
View file @
e86e85ea
...
...
@@ -21,7 +21,7 @@ export class AlertComponent implements OnInit {
ngOnInit
()
{
}
sendInfo
()
{
this
.
popInfo
.
emit
();
sendInfo
(
e
)
{
this
.
popInfo
.
emit
(
e
);
}
}
src/app/domain/businessQuery.ts
View file @
e86e85ea
...
...
@@ -26,7 +26,8 @@ export class BusinessQuery {
public
expertType
?:
any
,
public
expertPractitionerId
?:
any
,
public
expertPractitionerName
?:
any
,
public
mdDropOptionName
?:
any
public
mdDropOptionName
?:
any
,
public
birthDate
?:
any
,
)
{
...
...
src/app/my/my-business-detail/my-business-detail.component.html
View file @
e86e85ea
...
...
@@ -19,9 +19,24 @@
[(
ngModel
)]="
editBusiness
.
name
"
[
disabled
]="
readonlyFlag
"
(
blur
)="
inputBlur
()"
/>
</div>
<div
class=
"contentItem"
>
<span>
出生日期
</span>
<div>
<ListItem
DatePicker
[
mode
]="'
date
'"
[
disabled
]="
readonlyFlag
"
[
maxDate
]
=
"
today
"
[(
ngModel
)]="
editBusiness
.
birthDate
"
(
onOk
)="
onOk
($
event
)"
>
<Brief
*
ngIf=
"!readonlyFlag"
>
{{editBusiness.birthDate ? (editBusiness.birthDate | date:'yyyy-MM-dd') : '请输入出生日期'}}
</Brief>
<Brief
*
ngIf=
"readonlyFlag"
>
{{editBusiness.birthDate ? (editBusiness.birthDate | date:'yyyy-MM-dd') : '暂无出生日期信息'}}
</Brief>
</ListItem>
</div>
</div>
<div
class=
"contentItem"
>
<span>
年龄
</span>
<input
class=
"form-control"
type=
"text"
placeholder=
"{{readonlyFlag ?'暂无年龄信息':'请输入年龄'}}"
[(
ngModel
)]="
editBusiness
.
age
"
[
disabled
]="
readonlyFlag
"
(
blur
)="
inputBlur
()"
/>
[(
ngModel
)]="
editBusiness
.
age
"
[
disabled
]="
readonlyFlag
||
editBusiness
.
birthDate
"
(
blur
)="
inputBlur
()"
/>
</div>
<div
class=
"contentItem"
>
<span>
性别
</span>
...
...
src/app/my/my-business-detail/my-business-detail.component.ts
View file @
e86e85ea
...
...
@@ -69,6 +69,7 @@ export class MyBusinessDetailComponent implements OnInit {
deviceType
:
number
;
// 获取经纪人信息
lifeCustomerInfo
:
any
;
today
:
Date
=
new
Date
();
constructor
(
private
activateRoute
:
ActivatedRoute
,
private
myService
:
MyService
,
public
lifeCommonService
:
LifeCommonService
,
private
router
:
Router
,
)
{
this
.
titleList
=
[
...
...
@@ -133,6 +134,12 @@ export class MyBusinessDetailComponent implements OnInit {
}
// 日期选择
onOk
(
e
){
console
.
log
(
e
)
this
.
editBusiness
.
age
=
this
.
lifeCommonService
.
ages
(
e
.
getFullYear
(),
e
.
getMonth
()
+
1
,
e
.
getDate
()).
age
;
}
//改为编辑状态出现男女选项
editInfo
()
{
this
.
readonlyFlag
=
false
;
...
...
@@ -419,7 +426,8 @@ export class MyBusinessDetailComponent implements OnInit {
assignedPractitionerId
:
this
.
practitionerId
,
fyp
:
this
.
editBusiness
.
fyp
?
Number
(
this
.
editBusiness
.
fyp
)
:
null
,
fyc
:
this
.
editBusiness
.
fyc
?
Number
(
this
.
editBusiness
.
fyc
)
:
null
,
sourceFrom
:
this
.
editBusiness
.
sourceFrom
?
Number
(
this
.
editBusiness
.
sourceFrom
)
:
null
sourceFrom
:
this
.
editBusiness
.
sourceFrom
?
Number
(
this
.
editBusiness
.
sourceFrom
)
:
null
,
birthDate
:
this
.
editBusiness
.
birthDate
?
this
.
lifeCommonService
.
dateFormat
(
this
.
editBusiness
.
birthDate
,
'yyyy-MM-dd'
)
:
null
}
this
.
myService
.
ownOpportunityBasicInformationSave
(
this
.
editBusiness
).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
])
{
...
...
src/app/my/my-business/my-business.component.html
View file @
e86e85ea
...
...
@@ -38,6 +38,12 @@
<div>
商机来源:{{businessItem.opportunityFrom}}
</div>
<div>
{{(businessItem.opportunityDate).substr(0,10)}}
</div>
</div>
<div
class=
"line"
>
<div></div>
<div><span
(
click
)="
del
(
businessItem
.
leadsAssignedId
)"
>
<i
class=
"iconfont icon-shanchu"
style=
"color: red;font-size: 16px;"
></i>
</span></div>
</div>
</div>
</div>
<div
class=
"footer"
*
ngIf=
"pageType=='linkbusiness'"
(
click
)="
returnAddTask
()"
>
...
...
@@ -47,4 +53,7 @@
<i
class=
"iconfont icon-jiahao"
(
click
)="
addBussiness
()"
></i>
</div>
</div>
<ydlife-toast
*
ngIf=
"toastDialog"
[
toastInfo
]="
toastInfo
"
></ydlife-toast>
\ No newline at end of file
<ydlife-toast
*
ngIf=
"toastDialog"
[
toastInfo
]="
toastInfo
"
></ydlife-toast>
<!-- 删除确认弹窗 -->
<ydlife-alert
*
ngIf=
"isDelFlag"
[
dialogInfo
]="
dialogInfo
"
(
popInfo
)="
popInfo
($
event
)"
></ydlife-alert>
\ No newline at end of file
src/app/my/my-business/my-business.component.ts
View file @
e86e85ea
...
...
@@ -19,6 +19,10 @@ export class MyBusinessComponent implements OnInit {
//控制弹框
toastDialog
:
boolean
;
toastInfo
:
any
;
// 是否要删除
isDelFlag
:
boolean
=
false
;
selectedOpportunityId
:
string
;
dialogInfo
:
any
;
constructor
(
private
myService
:
MyService
,
public
lifeCommonService
:
LifeCommonService
,
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
location
:
Location
)
{
this
.
pageType
=
this
.
activatedRoute
.
snapshot
.
data
[
0
][
'type'
];
}
...
...
@@ -27,6 +31,39 @@ export class MyBusinessComponent implements OnInit {
this
.
ownOpportunityQuery
();
}
del
(
e
){
event
.
stopPropagation
();
this
.
isDelFlag
=
true
;
this
.
selectedOpportunityId
=
e
;
this
.
dialogInfo
=
{
title
:
null
,
content
:
{
value
:
'确认要删除此商机吗?'
,
align
:
'center'
},
footer
:
[{
value
:
'取消'
,
routerLink
:
''
,
className
:
'weui-dialog__btn_primary'
},{
value
:
'确定'
,
routerLink
:
''
,
className
:
''
}],
};
}
popInfo
(
e
){
this
.
isDelFlag
=
false
;
if
(
e
===
'确定'
){
this
.
deleteOpportunity
();
}
}
// 删除商机
deleteOpportunity
(){
this
.
myService
.
deleteOpportunity
({
opportunityId
:
this
.
selectedOpportunityId
,
practitionerId
:
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
]}).
subscribe
(
res
=>
{
this
.
isDelFlag
=
true
;
this
.
dialogInfo
=
{
title
:
null
,
content
:
{
value
:
res
[
'message'
],
align
:
'center'
},
footer
:
[{
value
:
'我知道了'
,
routerLink
:
''
,
className
:
'weui-dialog__btn_primary'
}],
};
if
(
res
[
'success'
]){
this
.
ownOpportunityQuery
();
}
})
}
ownOpportunityQuery
()
{
const
brokerCustomerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'customerId'
];
const
brokerPractitionerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
];
...
...
src/app/my/my.service.ts
View file @
e86e85ea
...
...
@@ -861,6 +861,12 @@ export class MyService {
// 积分规则信息
queryIntegralRuleList
(){
const
url
=
this
.
API
+
"/integral/queryIntegralRuleList"
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
({
isActive
:
1
}))
return
this
.
http
.
post
(
url
,
JSON
.
stringify
({
isActive
:
1
,
integralType
:
1
}))
}
// 删除商机
deleteOpportunity
(
params
){
const
url
=
this
.
ydapi
+
"/practitioner/deleteOpportunity"
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
params
))
}
}
src/styles.scss
View file @
e86e85ea
...
...
@@ -293,4 +293,7 @@ footer.fixed{
}
.am-list-item
{
background-color
:
#f9f9f9
;
}
.contentItem
.am-list-item
{
background-color
:
#fff
;
}
\ No newline at end of file
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