Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
f42f01d7
提交
f42f01d7
编写于
7月 14, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chitanda 发布系统代码
上级
a46f7f06
变更
49
隐藏空白字符变更
内嵌
并排
正在显示
49 个修改的文件
包含
1357 行增加
和
1357 行删除
+1357
-1357
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+50
-50
competitor-service-base.ts
app_CRM/src/service/competitor/competitor-service-base.ts
+50
-50
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+152
-152
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+82
-82
lead-service-base.ts
app_CRM/src/service/lead/lead-service-base.ts
+369
-369
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+223
-223
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+47
-47
quote-service-base.ts
app_CRM/src/service/quote/quote-service-base.ts
+259
-259
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+50
-50
edit-account-info-form.html
...ccount/edit-account-info-form/edit-account-info-form.html
+2
-2
main-form.html
app_CRM/src/widgets/account/main-form/main-form.html
+2
-2
quick-create-form.html
.../widgets/account/quick-create-form/quick-create-form.html
+2
-2
quick-create-form.html
...widgets/campaign/quick-create-form/quick-create-form.html
+1
-1
edit-comp-pro-form.html
...etitor-product/edit-comp-pro-form/edit-comp-pro-form.html
+1
-1
sal-lit-comp-form.html
...sales-literature/sal-lit-comp-form/sal-lit-comp-form.html
+1
-1
quick-create-form.html
...dgets/competitor/quick-create-form/quick-create-form.html
+1
-1
main-form.html
app_CRM/src/widgets/connection/main-form/main-form.html
+2
-2
book-edit-form.html
...RM/src/widgets/contact/book-edit-form/book-edit-form.html
+1
-1
edit-abstract-form.html
...idgets/contact/edit-abstract-form/edit-abstract-form.html
+3
-3
market-edit-form.html
...rc/widgets/contact/market-edit-form/market-edit-form.html
+1
-1
quick-create-form.html
.../widgets/contact/quick-create-form/quick-create-form.html
+1
-1
edit-child-goal-form.html
...dgets/goal/edit-child-goal-form/edit-child-goal-form.html
+2
-2
quick-create-form.html
...src/widgets/goal/quick-create-form/quick-create-form.html
+2
-2
abstract-edit-form.html
...gets/ibiz-list/abstract-edit-form/abstract-edit-form.html
+1
-1
quick-create-form.html
...idgets/ibiz-list/quick-create-form/quick-create-form.html
+1
-1
by-parent-key-form.html
...dgets/incident/by-parent-key-form/by-parent-key-form.html
+4
-4
edit-child-incident-form.html
...nt/edit-child-incident-form/edit-child-incident-form.html
+4
-4
quick-create-form.html
...widgets/incident/quick-create-form/quick-create-form.html
+4
-4
main-form.html
app_CRM/src/widgets/invoice-detail/main-form/main-form.html
+2
-2
quick-create-form.html
.../widgets/invoice/quick-create-form/quick-create-form.html
+2
-2
main-form.html
...dgets/knowledge-article-incident/main-form/main-form.html
+1
-1
info-knowledge-article-form.html
...o-knowledge-article-form/info-knowledge-article-form.html
+1
-1
edit-comp-lead-form.html
...d-competitor/edit-comp-lead-form/edit-comp-lead-form.html
+1
-1
edit-main-form.html
app_CRM/src/widgets/lead/edit-main-form/edit-main-form.html
+2
-2
qualification-form.html
...c/widgets/lead/qualification-form/qualification-form.html
+2
-2
quick-create-by-list-form.html
.../quick-create-by-list-form/quick-create-by-list-form.html
+1
-1
edit-comp-opp-form.html
...ity-competitor/edit-comp-opp-form/edit-comp-opp-form.html
+1
-1
main-form.html
...c/widgets/opportunity-competitor/main-form/main-form.html
+1
-1
main-form.html
app_CRM/src/widgets/opportunity/main-form/main-form.html
+4
-4
quick-create-form.html
...gets/opportunity/quick-create-form/quick-create-form.html
+3
-3
main-form.html
.../src/widgets/product-association/main-form/main-form.html
+2
-2
pro-prilv-form.html
...ts/product-price-level/pro-prilv-form/pro-prilv-form.html
+5
-5
sal-lit-pro-form.html
...t-sales-literature/sal-lit-pro-form/sal-lit-pro-form.html
+1
-1
main-form.html
...M/src/widgets/product-substitute/main-form/main-form.html
+1
-1
quick-create-form.html
...rc/widgets/quote/quick-create-form/quick-create-form.html
+3
-3
quick-create-form.html
...sales-literature/quick-create-form/quick-create-form.html
+1
-1
soproduct-edit-form.html
...order-detail/soproduct-edit-form/soproduct-edit-form.html
+2
-2
quick-create-form.html
...gets/sales-order/quick-create-form/quick-create-form.html
+2
-2
quick-create-form.html
...src/widgets/task/quick-create-form/quick-create-form.html
+1
-1
未找到文件。
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -64,6 +64,21 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -94,21 +109,6 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -118,9 +118,9 @@ export default class CampaignServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -135,6 +135,21 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -165,26 +180,11 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -212,9 +212,9 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -230,9 +230,9 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -275,6 +275,21 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -305,26 +320,11 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
app_CRM/src/service/competitor/competitor-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -62,6 +62,21 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitorsData
.
length
>
0
){
opportunitycompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
competitorproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
),
'undefined'
)){
competitorproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
)
as
any
);
...
...
@@ -92,21 +107,6 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitorsData
.
length
>
0
){
opportunitycompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class CompetitorServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/competitors`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -133,6 +133,21 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitorsData
.
length
>
0
){
opportunitycompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
competitorproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
),
'undefined'
)){
competitorproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
)
as
any
);
...
...
@@ -163,26 +178,11 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitorsData
.
length
>
0
){
opportunitycompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/competitors/
${
context
.
competitor
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/competitors/
${
context
.
competitor
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class CompetitorServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/competitors/getdraft`
,
isloading
);
res
.
data
.
competitor
=
data
.
competitor
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -258,6 +258,21 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitorsData
.
length
>
0
){
opportunitycompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
competitorproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
),
'undefined'
)){
competitorproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
)
as
any
);
...
...
@@ -288,26 +303,11 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitorsData
.
length
>
0
){
opportunitycompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/competitors/
${
context
.
competitor
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -68,21 +68,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -98,21 +98,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -122,27 +122,27 @@ export default class ContactServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -158,21 +158,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -182,9 +182,9 @@ export default class ContactServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -200,21 +200,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -230,44 +230,44 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -283,26 +283,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -334,15 +334,15 @@ export default class ContactServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -359,16 +359,16 @@ export default class ContactServiceBase extends EntityService {
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -399,21 +399,21 @@ export default class ContactServiceBase extends EntityService {
public
async
AddList
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -429,26 +429,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
...
...
@@ -466,21 +466,21 @@ export default class ContactServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -496,26 +496,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -548,21 +548,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -578,44 +578,44 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -631,26 +631,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -666,21 +666,21 @@ export default class ContactServiceBase extends EntityService {
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -696,26 +696,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
...
...
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -64,11 +64,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -78,12 +78,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaignlists
=
campaignlis
tsData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -93,12 +93,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
let
list
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contac
ts'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontac
ts'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontac
tsData
.
length
>
0
){
list
contac
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
contacts
=
listcontact
sData
;
let
list
accoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
accoun
ts'
),
'undefined'
)){
list
accountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
list
accountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
list
accoun
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -108,12 +108,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontac
tsData
;
let
campaignlist
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlist
s'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaignlist
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
accounts
=
listaccoun
tsData
;
let
listlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listlead
s'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
listleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
listlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -123,7 +123,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
campaignlists
=
campaignlist
sData
;
masterData
.
listleads
=
listlead
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -133,10 +133,10 @@ export default class IBizListServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -151,11 +151,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -165,12 +165,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaignlists
=
campaignlis
tsData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -180,12 +180,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
let
list
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contac
ts'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontac
ts'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontac
tsData
.
length
>
0
){
list
contac
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
contacts
=
listcontact
sData
;
let
list
accoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
accoun
ts'
),
'undefined'
)){
list
accountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
list
accountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
list
accoun
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -195,12 +195,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontac
tsData
;
let
campaignlist
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlist
s'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaignlist
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
accounts
=
listaccoun
tsData
;
let
listlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listlead
s'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
listleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
listlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -210,13 +210,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
campaignlists
=
campaignlist
sData
;
masterData
.
listleads
=
listlead
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -244,10 +244,10 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -263,10 +263,10 @@ export default class IBizListServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
res
.
data
.
ibizlist
=
data
.
ibizlist
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -309,11 +309,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -323,12 +323,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaignlists
=
campaignlis
tsData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -338,12 +338,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
let
list
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contac
ts'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontac
ts'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontac
tsData
.
length
>
0
){
list
contac
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
contacts
=
listcontact
sData
;
let
list
accoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
accoun
ts'
),
'undefined'
)){
list
accountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
list
accountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
list
accoun
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -353,12 +353,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontac
tsData
;
let
campaignlist
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlist
s'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaignlist
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
accounts
=
listaccoun
tsData
;
let
listlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listlead
s'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
listleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
listlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -368,13 +368,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
campaignlists
=
campaignlist
sData
;
masterData
.
listleads
=
listlead
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
app_CRM/src/service/lead/lead-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -79,11 +79,11 @@ export default class LeadServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -93,12 +93,12 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
l
istleads
=
listlead
sData
;
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -108,7 +108,7 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
istleads
=
listlead
sData
;
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -118,17 +118,17 @@ export default class LeadServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -138,12 +138,12 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
l
istleads
=
listlead
sData
;
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -153,7 +153,7 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
istleads
=
listlead
sData
;
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -163,17 +163,17 @@ export default class LeadServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
true
){
let
masterData
:
any
=
{};
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -183,12 +183,12 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
l
istleads
=
listlead
sData
;
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -198,7 +198,7 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
istleads
=
listlead
sData
;
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -208,17 +208,17 @@ export default class LeadServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -228,12 +228,12 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
l
istleads
=
listlead
sData
;
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -243,7 +243,7 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
istleads
=
listlead
sData
;
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -253,16 +253,16 @@ export default class LeadServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -272,12 +272,12 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
let
l
istlead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istlead
s'
),
'undefined'
)){
l
istleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
l
istleadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
l
istlead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
l
istleads
=
listlead
sData
;
let
l
eadcompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
eadcompetitor
s'
),
'undefined'
)){
l
eadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitor
s'
)
as
any
);
if
(
l
eadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitor
sData
.
length
>
0
){
l
eadcompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -287,7 +287,7 @@ export default class LeadServiceBase extends EntityService {
});
}
}
masterData
.
l
istleads
=
listlead
sData
;
masterData
.
l
eadcompetitors
=
leadcompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -297,8 +297,8 @@ export default class LeadServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/leads`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -314,21 +314,6 @@ export default class LeadServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -344,14 +329,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -367,6 +344,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -382,14 +367,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -405,6 +382,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -420,14 +405,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -443,6 +420,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -458,13 +443,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -480,6 +458,13 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -495,10 +480,25 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -539,31 +539,31 @@ export default class LeadServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/leads/
${
context
.
lead
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -580,35 +580,35 @@ export default class LeadServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/getdraft`
,
isloading
);
res
.
data
.
lead
=
data
.
lead
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/getdraft`
,
isloading
);
res
.
data
.
lead
=
data
.
lead
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
/leads/getdraft`
,
isloading
);
res
.
data
.
lead
=
data
.
lead
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/leads/getdraft`
,
isloading
);
res
.
data
.
lead
=
data
.
lead
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/leads/getdraft`
,
isloading
);
res
.
data
.
lead
=
data
.
lead
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -624,21 +624,6 @@ export default class LeadServiceBase extends EntityService {
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -654,14 +639,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -677,6 +654,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -692,14 +677,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -715,6 +692,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -730,14 +715,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -753,6 +730,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -768,10 +753,25 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/leads/
${
context
.
lead
}
/active`
,
data
,
isloading
);
...
...
@@ -789,21 +789,6 @@ export default class LeadServiceBase extends EntityService {
public
async
AddList
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -819,14 +804,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -842,6 +819,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -857,14 +842,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -880,6 +857,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -895,14 +880,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -918,6 +895,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -933,10 +918,25 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/leads/
${
context
.
lead
}
/addlist`
,
data
,
isloading
);
...
...
@@ -969,21 +969,6 @@ export default class LeadServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -999,14 +984,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1022,6 +999,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1037,14 +1022,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1060,6 +1037,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1075,14 +1060,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1098,6 +1075,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1113,10 +1098,25 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -1134,21 +1134,6 @@ export default class LeadServiceBase extends EntityService {
public
async
DisQualification
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1164,14 +1149,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1187,6 +1164,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1202,14 +1187,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1225,6 +1202,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1240,14 +1225,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1263,6 +1240,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1278,10 +1263,25 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/leads/
${
context
.
lead
}
/disqualification`
,
data
,
isloading
);
...
...
@@ -1329,21 +1329,6 @@ export default class LeadServiceBase extends EntityService {
public
async
Qualification
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1359,14 +1344,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1382,6 +1359,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1397,14 +1382,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1420,6 +1397,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1435,14 +1420,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1458,6 +1435,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1473,10 +1458,25 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/leads/
${
context
.
lead
}
/qualification`
,
data
,
isloading
);
...
...
@@ -1494,21 +1494,6 @@ export default class LeadServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1524,14 +1509,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1547,6 +1524,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1562,14 +1547,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1585,6 +1562,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
campaign
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1600,14 +1585,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1623,6 +1600,14 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
lead
){
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1638,13 +1623,6 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
...
...
@@ -1660,6 +1638,13 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
listleadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
),
'undefined'
)){
listleadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listleads'
)
as
any
);
...
...
@@ -1675,10 +1660,25 @@ export default class LeadServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -74,6 +74,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -104,21 +119,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -128,13 +128,28 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -165,21 +180,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -189,13 +189,28 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -226,6 +241,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -241,21 +271,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -286,21 +301,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -310,9 +310,9 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -328,6 +328,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -358,6 +373,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -373,15 +397,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -412,6 +427,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -427,15 +451,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -466,6 +481,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -481,14 +504,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -519,26 +534,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -576,29 +576,29 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -615,32 +615,32 @@ export default class OpportunityServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -656,6 +656,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -686,6 +701,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -701,15 +725,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -740,6 +755,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -755,15 +779,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -794,26 +809,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
...
...
@@ -831,6 +831,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -861,6 +876,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -876,15 +900,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -915,6 +930,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -930,15 +954,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -969,26 +984,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -1021,6 +1021,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1051,6 +1066,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -1066,15 +1090,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1105,6 +1120,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -1120,15 +1144,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1159,6 +1174,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -1174,14 +1197,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1212,26 +1227,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -65,36 +65,36 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
substitute
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
substitute
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
...
...
@@ -119,8 +119,8 @@ export default class ProductServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -136,36 +136,36 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
substitute
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
substitute
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
...
...
@@ -183,8 +183,8 @@ export default class ProductServiceBase extends EntityService {
masterData
.
productassociations
=
productassociationsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/products/
${
context
.
product
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -213,8 +213,8 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -231,8 +231,8 @@ export default class ProductServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
res
.
data
.
product
=
data
.
product
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -291,36 +291,36 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
substitute
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
substitute
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
...
...
@@ -338,8 +338,8 @@ export default class ProductServiceBase extends EntityService {
masterData
.
productassociations
=
productassociationsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products/
${
context
.
product
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
app_CRM/src/service/quote/quote-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -78,21 +78,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -108,21 +93,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -138,6 +108,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -153,21 +138,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -183,6 +153,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -198,21 +183,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -228,6 +198,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -243,20 +228,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -272,6 +243,20 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -287,6 +272,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -296,8 +296,8 @@ export default class QuoteServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -313,21 +313,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -343,14 +328,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -366,6 +343,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -381,14 +366,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -404,6 +381,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -419,14 +404,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -442,6 +419,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -457,13 +442,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -479,6 +457,13 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -494,10 +479,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -538,31 +538,31 @@ export default class QuoteServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -579,35 +579,35 @@ export default class QuoteServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -638,21 +638,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -668,14 +653,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -691,6 +668,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -706,14 +691,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -729,6 +706,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -744,14 +729,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -767,6 +744,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -782,10 +767,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -818,21 +818,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
GenSalesOrder
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -848,14 +833,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -871,6 +848,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -886,14 +871,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -909,6 +886,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -924,14 +909,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -947,6 +924,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -962,10 +947,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
...
...
@@ -983,21 +983,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1013,14 +998,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1036,6 +1013,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1051,14 +1036,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1074,6 +1051,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1089,14 +1074,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1112,6 +1089,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1127,13 +1112,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1149,6 +1127,13 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1164,10 +1149,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
f42f01d7
...
...
@@ -62,6 +62,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliteraturesData
.
length
>
0
){
competitorsalesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -92,21 +107,6 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliteraturesData
.
length
>
0
){
competitorsalesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -133,6 +133,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliteraturesData
.
length
>
0
){
competitorsalesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -163,26 +178,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliteraturesData
.
length
>
0
){
competitorsalesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
res
.
data
.
salesliterature
=
data
.
salesliterature
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -258,6 +258,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliteraturesData
.
length
>
0
){
competitorsalesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -288,26 +303,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliteraturesData
.
length
>
0
){
competitorsalesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
app_CRM/src/widgets/account/edit-account-info-form/edit-account-info-form.html
浏览文件 @
f42f01d7
...
...
@@ -34,7 +34,7 @@
<app-form-item
name=
'parentaccountname'
:itemRules=
"this.rules.parentaccountname"
class=
''
:caption=
"$t('entities.account.edit_accountinfo_form.details.parentaccountname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentaccountname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -69,7 +69,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'defaultpricelevelname'
:itemRules=
"this.rules.defaultpricelevelname"
class=
''
:caption=
"$t('entities.account.edit_accountinfo_form.details.defaultpricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.defaultpricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/account/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -34,7 +34,7 @@
<app-form-item
name=
'parentaccountname'
:itemRules=
"this.rules.parentaccountname"
class=
''
:caption=
"$t('entities.account.main_form.details.parentaccountname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentaccountname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -69,7 +69,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'defaultpricelevelname'
:itemRules=
"this.rules.defaultpricelevelname"
class=
''
:caption=
"$t('entities.account.main_form.details.defaultpricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.defaultpricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/account/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -34,7 +34,7 @@
<app-form-item
name=
'parentaccountname'
:itemRules=
"this.rules.parentaccountname"
class=
''
:caption=
"$t('entities.account.quickcreate_form.details.parentaccountname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentaccountname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -69,7 +69,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'defaultpricelevelname'
:itemRules=
"this.rules.defaultpricelevelname"
class=
''
:caption=
"$t('entities.account.quickcreate_form.details.defaultpricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.defaultpricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/campaign/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.campaign.quickcreate_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/competitor-product/edit-comp-pro-form/edit-comp-pro-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'entity2name'
:itemRules=
"this.rules.entity2name"
class=
''
:caption=
"$t('entities.competitorproduct.edit_comppro_form.details.entity2name')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entity2name.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/competitor-sales-literature/sal-lit-comp-form/sal-lit-comp-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'entityname'
:itemRules=
"this.rules.entityname"
class=
''
:caption=
"$t('entities.competitorsalesliterature.sallitcomp_form.details.entityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/competitor/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.competitor.quickcreate_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/connection/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -32,7 +32,7 @@
<app-form-item
name=
'record1rolename'
:itemRules=
"this.rules.record1rolename"
class=
''
:caption=
"$t('entities.connection.main_form.details.record1rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.record1rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -41,7 +41,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'record2rolename'
:itemRules=
"this.rules.record2rolename"
class=
''
:caption=
"$t('entities.connection.main_form.details.record2rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.record2rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/contact/book-edit-form/book-edit-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.contact.bookedit_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/contact/edit-abstract-form/edit-abstract-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'customername'
:itemRules=
"this.rules.customername"
class=
''
:caption=
"$t('entities.contact.edit_abstract_form.details.customername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.customername.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -176,7 +176,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'originatingleadname'
:itemRules=
"this.rules.originatingleadname"
class=
''
:caption=
"$t('entities.contact.edit_abstract_form.details.originatingleadname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.originatingleadname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -240,7 +240,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.contact.edit_abstract_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/contact/market-edit-form/market-edit-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'originatingleadname'
:itemRules=
"this.rules.originatingleadname"
class=
''
:caption=
"$t('entities.contact.marketedit_form.details.originatingleadname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.originatingleadname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/contact/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'customername'
:itemRules=
"this.rules.customername"
class=
''
:caption=
"$t('entities.contact.quickcreate_form.details.customername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.customername.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/goal/edit-child-goal-form/edit-child-goal-form.html
浏览文件 @
f42f01d7
...
...
@@ -16,7 +16,7 @@
<app-form-item
name=
'parentgoalname'
:itemRules=
"this.rules.parentgoalname"
class=
''
:caption=
"$t('entities.goal.edit_childgoal_form.details.parentgoalname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentgoalname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -25,7 +25,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'metricname'
:itemRules=
"this.rules.metricname"
class=
''
:caption=
"$t('entities.goal.edit_childgoal_form.details.metricname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.metricname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/goal/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -16,7 +16,7 @@
<app-form-item
name=
'parentgoalname'
:itemRules=
"this.rules.parentgoalname"
class=
''
:caption=
"$t('entities.goal.quickcreate_form.details.parentgoalname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentgoalname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -31,7 +31,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'metricname'
:itemRules=
"this.rules.metricname"
class=
''
:caption=
"$t('entities.goal.quickcreate_form.details.metricname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.metricname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/ibiz-list/abstract-edit-form/abstract-edit-form.html
浏览文件 @
f42f01d7
...
...
@@ -54,7 +54,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.ibizlist.abstractedit_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/ibiz-list/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -54,7 +54,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.ibizlist.quickcreate_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/incident/by-parent-key-form/by-parent-key-form.html
浏览文件 @
f42f01d7
...
...
@@ -16,7 +16,7 @@
<app-form-item
name=
'subjectname'
:itemRules=
"this.rules.subjectname"
class=
''
:caption=
"$t('entities.incident.byparentkey_form.details.subjectname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.subjectname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -45,7 +45,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'productname'
:itemRules=
"this.rules.productname"
class=
''
:caption=
"$t('entities.incident.byparentkey_form.details.productname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.productname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -54,7 +54,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'entitlementname'
:itemRules=
"this.rules.entitlementname"
class=
''
:caption=
"$t('entities.incident.byparentkey_form.details.entitlementname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entitlementname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -69,7 +69,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'customername'
:itemRules=
"this.rules.customername"
class=
''
:caption=
"$t('entities.incident.byparentkey_form.details.customername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.customername.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/incident/edit-child-incident-form/edit-child-incident-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'subjectname'
:itemRules=
"this.rules.subjectname"
class=
''
:caption=
"$t('entities.incident.edit_childincident_form.details.subjectname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.subjectname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -51,7 +51,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'primarycontactname'
:itemRules=
"this.rules.primarycontactname"
class=
''
:caption=
"$t('entities.incident.edit_childincident_form.details.primarycontactname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.primarycontactname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -80,7 +80,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'productname'
:itemRules=
"this.rules.productname"
class=
''
:caption=
"$t('entities.incident.edit_childincident_form.details.productname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.productname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -89,7 +89,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'entitlementname'
:itemRules=
"this.rules.entitlementname"
class=
''
:caption=
"$t('entities.incident.edit_childincident_form.details.entitlementname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entitlementname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/incident/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -16,7 +16,7 @@
<app-form-item
name=
'subjectname'
:itemRules=
"this.rules.subjectname"
class=
''
:caption=
"$t('entities.incident.quickcreate_form.details.subjectname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.subjectname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -25,7 +25,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'customername'
:itemRules=
"this.rules.customername"
class=
''
:caption=
"$t('entities.incident.quickcreate_form.details.customername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.customername.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -54,7 +54,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'productname'
:itemRules=
"this.rules.productname"
class=
''
:caption=
"$t('entities.incident.quickcreate_form.details.productname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.productname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -63,7 +63,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'entitlementname'
:itemRules=
"this.rules.entitlementname"
class=
''
:caption=
"$t('entities.incident.quickcreate_form.details.entitlementname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entitlementname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/invoice-detail/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'productname'
:itemRules=
"this.rules.productname"
class=
''
:caption=
"$t('entities.invoicedetail.main_form.details.productname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.productname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -31,7 +31,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'uomname'
:itemRules=
"this.rules.uomname"
class=
''
:caption=
"$t('entities.invoicedetail.main_form.details.uomname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.uomname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/invoice/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.invoice.quickcreate_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -31,7 +31,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'pricelevelname'
:itemRules=
"this.rules.pricelevelname"
class=
''
:caption=
"$t('entities.invoice.quickcreate_form.details.pricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.pricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/knowledge-article-incident/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'incidentname'
:itemRules=
"this.rules.incidentname"
class=
''
:caption=
"$t('entities.knowledgearticleincident.main_form.details.incidentname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.incidentname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/knowledge-article/info-knowledge-article-form/info-knowledge-article-form.html
浏览文件 @
f42f01d7
...
...
@@ -85,7 +85,7 @@
<app-form-item
name=
'subjectname'
:itemRules=
"this.rules.subjectname"
class=
''
:caption=
"$t('entities.knowledgearticle.info_knowledgearticle_form.details.subjectname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.subjectname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/lead-competitor/edit-comp-lead-form/edit-comp-lead-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'entity2name'
:itemRules=
"this.rules.entity2name"
class=
''
:caption=
"$t('entities.leadcompetitor.edit_complead_form.details.entity2name')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entity2name.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/lead/edit-main-form/edit-main-form.html
浏览文件 @
f42f01d7
...
...
@@ -138,7 +138,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.lead.edit_main_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -156,7 +156,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'campaignname'
:itemRules=
"this.rules.campaignname"
class=
''
:caption=
"$t('entities.lead.edit_main_form.details.campaignname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.campaignname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/lead/qualification-form/qualification-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'parentcontactname'
:itemRules=
"this.rules.parentcontactname"
class=
''
:caption=
"$t('entities.lead.qualification_form.details.parentcontactname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentcontactname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -19,7 +19,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'parentaccountname'
:itemRules=
"this.rules.parentaccountname"
class=
''
:caption=
"$t('entities.lead.qualification_form.details.parentaccountname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentaccountname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/list-lead/quick-create-by-list-form/quick-create-by-list-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'entity2name'
:itemRules=
"this.rules.entity2name"
class=
''
:caption=
"$t('entities.listlead.quickcreatebylist_form.details.entity2name')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entity2name.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/opportunity-competitor/edit-comp-opp-form/edit-comp-opp-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'entityname'
:itemRules=
"this.rules.entityname"
class=
''
:caption=
"$t('entities.opportunitycompetitor.edit_compopp_form.details.entityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/opportunity-competitor/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'entity2name'
:itemRules=
"this.rules.entity2name"
class=
''
:caption=
"$t('entities.opportunitycompetitor.main_form.details.entity2name')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entity2name.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/opportunity/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -16,7 +16,7 @@
<app-form-item
name=
'parentcontactname'
:itemRules=
"this.rules.parentcontactname"
class=
''
:caption=
"$t('entities.opportunity.main_form.details.parentcontactname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentcontactname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -25,7 +25,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'parentaccountname'
:itemRules=
"this.rules.parentaccountname"
class=
''
:caption=
"$t('entities.opportunity.main_form.details.parentaccountname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentaccountname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -54,7 +54,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.opportunity.main_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -122,7 +122,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'pricelevelname'
:itemRules=
"this.rules.pricelevelname"
class=
''
:caption=
"$t('entities.opportunity.main_form.details.pricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.pricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/opportunity/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -16,7 +16,7 @@
<app-form-item
name=
'parentcontactname'
:itemRules=
"this.rules.parentcontactname"
class=
''
:caption=
"$t('entities.opportunity.quickcreate_form.details.parentcontactname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentcontactname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -25,7 +25,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'parentaccountname'
:itemRules=
"this.rules.parentaccountname"
class=
''
:caption=
"$t('entities.opportunity.quickcreate_form.details.parentaccountname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.parentaccountname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -54,7 +54,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.opportunity.quickcreate_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/product-association/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'associatedproductname'
:itemRules=
"this.rules.associatedproductname"
class=
''
:caption=
"$t('entities.productassociation.main_form.details.associatedproductname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.associatedproductname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -25,7 +25,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'uomname'
:itemRules=
"this.rules.uomname"
class=
''
:caption=
"$t('entities.productassociation.main_form.details.uomname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.uomname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/product-price-level/pro-prilv-form/pro-prilv-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'productname'
:itemRules=
"this.rules.productname"
class=
''
:caption=
"$t('entities.productpricelevel.proprilv_form.details.productname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.productname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -19,7 +19,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'pricelevelname'
:itemRules=
"this.rules.pricelevelname"
class=
''
:caption=
"$t('entities.productpricelevel.proprilv_form.details.pricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.pricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -28,7 +28,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'uomname'
:itemRules=
"this.rules.uomname"
class=
''
:caption=
"$t('entities.productpricelevel.proprilv_form.details.uomname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.uomname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -37,7 +37,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'currencyname'
:itemRules=
"this.rules.currencyname"
class=
''
:caption=
"$t('entities.productpricelevel.proprilv_form.details.currencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.currencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -46,7 +46,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'discounttypename'
:itemRules=
"this.rules.discounttypename"
class=
''
:caption=
"$t('entities.productpricelevel.proprilv_form.details.discounttypename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.discounttypename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/product-sales-literature/sal-lit-pro-form/sal-lit-pro-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'entityname'
:itemRules=
"this.rules.entityname"
class=
''
:caption=
"$t('entities.productsalesliterature.sallitpro_form.details.entityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.entityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/product-substitute/main-form/main-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'substitutedproductname'
:itemRules=
"this.rules.substitutedproductname"
class=
''
:caption=
"$t('entities.productsubstitute.main_form.details.substitutedproductname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.substitutedproductname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/quote/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.quote.quickcreate_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -31,7 +31,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'opportunityname'
:itemRules=
"this.rules.opportunityname"
class=
''
:caption=
"$t('entities.quote.quickcreate_form.details.opportunityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.opportunityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -46,7 +46,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'pricelevelname'
:itemRules=
"this.rules.pricelevelname"
class=
''
:caption=
"$t('entities.quote.quickcreate_form.details.pricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.pricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/sales-literature/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -16,7 +16,7 @@
<app-form-item
name=
'subjectname'
:itemRules=
"this.rules.subjectname"
class=
''
:caption=
"$t('entities.salesliterature.quickcreate_form.details.subjectname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.subjectname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/sales-order-detail/soproduct-edit-form/soproduct-edit-form.html
浏览文件 @
f42f01d7
...
...
@@ -10,7 +10,7 @@
<app-form-item
name=
'productname'
:itemRules=
"this.rules.productname"
class=
''
:caption=
"$t('entities.salesorderdetail.soproductedit_form.details.productname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.productname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -31,7 +31,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'uomname'
:itemRules=
"this.rules.uomname"
class=
''
:caption=
"$t('entities.salesorderdetail.soproductedit_form.details.uomname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.uomname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/sales-order/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'transactioncurrencyname'
:itemRules=
"this.rules.transactioncurrencyname"
class=
''
:caption=
"$t('entities.salesorder.quickcreate_form.details.transactioncurrencyname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.transactioncurrencyname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
@@ -31,7 +31,7 @@ FTL stack trace ("~" means nesting-related):
<app-form-item
name=
'pricelevelname'
:itemRules=
"this.rules.pricelevelname"
class=
''
:caption=
"$t('entities.salesorder.quickcreate_form.details.pricelevelname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.pricelevelname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
app_CRM/src/widgets/task/quick-create-form/quick-create-form.html
浏览文件 @
f42f01d7
...
...
@@ -22,7 +22,7 @@
<app-form-item
name=
'ownername'
:itemRules=
"this.rules.ownername"
class=
''
:caption=
"$t('entities.task.quickcreate_form.details.ownername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.ownername.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: ${editor.getEditorParams()} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
- Failed at: ${editor.getEditorParams()
?c
} [in template "TEMPLCODE_zh_CN" at line 175, column 18]
----
</app-form-item>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录