Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
4bd12da4
提交
4bd12da4
编写于
7月 04, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chitanda 发布系统代码
上级
2d81d9c8
变更
79
隐藏空白字符变更
内嵌
并排
正在显示
79 个修改的文件
包含
978 行增加
和
855 行删除
+978
-855
app-form-druipart.vue
...RM/src/components/app-form-druipart/app-form-druipart.vue
+1
-0
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+41
-41
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+154
-154
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+50
-50
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+231
-231
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+50
-50
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+47
-47
AppServiceBase.ts
...CRM/src/studio-core/service/app-service/AppServiceBase.ts
+9
-0
AppViewStore.ts
...RM/src/studio-core/service/app-view-store/AppViewStore.ts
+14
-0
AppViewStoreBase.ts
...rc/studio-core/service/app-view-store/AppViewStoreBase.ts
+36
-0
studio-drawer.tsx
...CRM/src/studio-core/utils/studio-drawer/studio-drawer.tsx
+1
-1
ExpViewBase.tsx
app_CRM/src/studio-core/view/ExpViewBase.tsx
+12
-0
ListExpViewBase.tsx
app_CRM/src/studio-core/view/ListExpViewBase.tsx
+3
-3
TabExpViewBase.tsx
app_CRM/src/studio-core/view/TabExpViewBase.tsx
+3
-3
TreeExpViewBase.tsx
app_CRM/src/studio-core/view/TreeExpViewBase.tsx
+3
-3
ViewBase.tsx
app_CRM/src/studio-core/view/ViewBase.tsx
+8
-2
app-drawer.vue
app_CRM/src/utils/app-drawer/app-drawer.vue
+1
-0
app-modal.vue
app_CRM/src/utils/app-modal/app-modal.vue
+1
-0
gradationtreeexpbar-treeexpbar.html
...treeexpbar-treeexpbar/gradationtreeexpbar-treeexpbar.html
+1
-0
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
infotabviewpanel3-tabviewpanel.html
...ewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
+7
-6
infotabviewpanel4-tabviewpanel.html
...ewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
+7
-6
view-account-info-all-portlet.html
...count-info-all-portlet/view-account-info-all-portlet.html
+1
-1
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
infotabviewpanel3-tabviewpanel.html
...ewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
+7
-6
infotabviewpanel4-tabviewpanel.html
...ewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
+7
-6
infotabviewpanel5-tabviewpanel.html
...ewpanel5-tabviewpanel/infotabviewpanel5-tabviewpanel.html
+7
-6
view-campagin-portlet.html
...campaign/view-campagin-portlet/view-campagin-portlet.html
+1
-1
view-head-portlet.html
...widgets/campaign/view-head-portlet/view-head-portlet.html
+1
-1
view-info-portlet.html
...widgets/campaign/view-info-portlet/view-info-portlet.html
+1
-1
view-manager-portlet.html
...s/campaign/view-manager-portlet/view-manager-portlet.html
+1
-1
view-schedule-portlet.html
...campaign/view-schedule-portlet/view-schedule-portlet.html
+1
-1
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
view-comp-abstract-portlet.html
...iew-comp-abstract-portlet/view-comp-abstract-portlet.html
+1
-1
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
infotabviewpanel3-tabviewpanel.html
...ewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
+7
-6
infotabviewpanel4-tabviewpanel.html
...ewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
+7
-6
view-con-abs-portlet.html
...ts/contact/view-con-abs-portlet/view-con-abs-portlet.html
+1
-1
info-viewtabviewpanel-tabviewpanel.html
...anel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
+7
-6
info-viewtabviewpanel2-tabviewpanel.html
...el2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
+7
-6
view-goal-info-portlet.html
...s/goal/view-goal-info-portlet/view-goal-info-portlet.html
+1
-1
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
infotabviewpanel3-tabviewpanel.html
...ewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
+7
-6
infotabviewpanel4-tabviewpanel.html
...ewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
+7
-6
infotabviewpanel5-tabviewpanel.html
...ewpanel5-tabviewpanel/infotabviewpanel5-tabviewpanel.html
+7
-6
view-list-abs-portlet.html
...biz-list/view-list-abs-portlet/view-list-abs-portlet.html
+1
-1
info-viewtabviewpanel-tabviewpanel.html
...anel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
+7
-6
info-viewtabviewpanel2-tabviewpanel.html
...el2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
+7
-6
view-incident-info-portlet.html
...iew-incident-info-portlet/view-incident-info-portlet.html
+1
-1
info-viewtabviewpanel-tabviewpanel.html
...anel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
+7
-6
info-viewtabviewpanel2-tabviewpanel.html
...el2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
+7
-6
view-inv-info-portlet.html
.../invoice/view-inv-info-portlet/view-inv-info-portlet.html
+1
-1
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
view-lead-con-portlet.html
...ets/lead/view-lead-con-portlet/view-lead-con-portlet.html
+1
-1
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
infotabviewpanel3-tabviewpanel.html
...ewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
+7
-6
view-opp-abs-portlet.html
...pportunity/view-opp-abs-portlet/view-opp-abs-portlet.html
+1
-1
info-viewtabviewpanel-tabviewpanel.html
...anel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
+7
-6
info-viewtabviewpanel2-tabviewpanel.html
...el2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
+7
-6
info-viewtabviewpanel3-tabviewpanel.html
...el3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.html
+7
-6
info-viewtabviewpanel4-tabviewpanel.html
...el4-tabviewpanel/info-viewtabviewpanel4-tabviewpanel.html
+7
-6
view-pro-info-portlet.html
.../product/view-pro-info-portlet/view-pro-info-portlet.html
+1
-1
infotabviewpanel-tabviewpanel.html
...viewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
+7
-6
infotabviewpanel2-tabviewpanel.html
...ewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
+7
-6
view-quo-abs-portlet.html
...gets/quote/view-quo-abs-portlet/view-quo-abs-portlet.html
+1
-1
info-viewtabviewpanel-tabviewpanel.html
...anel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
+7
-6
info-viewtabviewpanel2-tabviewpanel.html
...el2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
+7
-6
info-viewtabviewpanel3-tabviewpanel.html
...el3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.html
+7
-6
view-sal-lit-info-portlet.html
.../view-sal-lit-info-portlet/view-sal-lit-info-portlet.html
+1
-1
info-viewtabviewpanel-tabviewpanel.html
...anel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
+7
-6
info-viewtabviewpanel2-tabviewpanel.html
...el2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
+7
-6
view-soinfo-portlet.html
.../sales-order/view-soinfo-portlet/view-soinfo-portlet.html
+1
-1
未找到文件。
app_CRM/src/components/app-form-druipart/app-form-druipart.vue
浏览文件 @
4bd12da4
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<component
<component
:is=
"viewname"
:is=
"viewname"
class=
"viewcontainer2"
class=
"viewcontainer2"
:viewUsage=
"4"
:viewdata =
"viewdata"
:viewdata =
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
:viewDefaultUsage=
"false"
:viewDefaultUsage=
"false"
...
...
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
4bd12da4
...
@@ -62,11 +62,11 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -62,11 +62,11 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
item
.
relationshipsid
=
null
;
...
@@ -76,12 +76,12 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -76,12 +76,12 @@ export default class CampaignServiceBase extends EntityService {
});
});
}
}
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
list
sData
:
any
=
[];
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
item
.
relationshipsid
=
null
;
...
@@ -91,7 +91,7 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -91,7 +91,7 @@ export default class CampaignServiceBase extends EntityService {
});
});
}
}
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
@@ -116,8 +116,8 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -116,8 +116,8 @@ export default class CampaignServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
return
res
;
}
}
...
@@ -133,11 +133,11 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -133,11 +133,11 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
item
.
relationshipsid
=
null
;
...
@@ -147,12 +147,12 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -147,12 +147,12 @@ export default class CampaignServiceBase extends EntityService {
});
});
}
}
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
list
sData
:
any
=
[];
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
item
.
relationshipsid
=
null
;
...
@@ -162,7 +162,7 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -162,7 +162,7 @@ export default class CampaignServiceBase extends EntityService {
});
});
}
}
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
@@ -180,8 +180,8 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -180,8 +180,8 @@ export default class CampaignServiceBase extends EntityService {
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
return
res
;
}
}
...
@@ -210,8 +210,8 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -210,8 +210,8 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
return
res
;
}
}
...
@@ -228,8 +228,8 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -228,8 +228,8 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
return
res
;
}
}
...
@@ -258,11 +258,11 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -258,11 +258,11 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
item
.
relationshipsid
=
null
;
...
@@ -272,12 +272,12 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -272,12 +272,12 @@ export default class CampaignServiceBase extends EntityService {
});
});
}
}
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
list
sData
:
any
=
[];
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
item
.
relationshipsid
=
null
;
...
@@ -287,7 +287,7 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -287,7 +287,7 @@ export default class CampaignServiceBase extends EntityService {
});
});
}
}
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
@@ -305,8 +305,8 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -305,8 +305,8 @@ export default class CampaignServiceBase extends EntityService {
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
4bd12da4
...
@@ -66,36 +66,36 @@ export default class ContactServiceBase extends EntityService {
...
@@ -66,36 +66,36 @@ export default class ContactServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -120,42 +120,42 @@ export default class ContactServiceBase extends EntityService {
...
@@ -120,42 +120,42 @@ export default class ContactServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -180,8 +180,8 @@ export default class ContactServiceBase extends EntityService {
...
@@ -180,8 +180,8 @@ export default class ContactServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -198,36 +198,36 @@ export default class ContactServiceBase extends EntityService {
...
@@ -198,36 +198,36 @@ export default class ContactServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -245,42 +245,42 @@ export default class ContactServiceBase extends EntityService {
...
@@ -245,42 +245,42 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -298,8 +298,8 @@ export default class ContactServiceBase extends EntityService {
...
@@ -298,8 +298,8 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -332,14 +332,14 @@ export default class ContactServiceBase extends EntityService {
...
@@ -332,14 +332,14 @@ export default class ContactServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -357,15 +357,15 @@ export default class ContactServiceBase extends EntityService {
...
@@ -357,15 +357,15 @@ export default class ContactServiceBase extends EntityService {
if
(
context
.
account
&&
true
){
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
res
.
data
.
contact
=
data
.
contact
;
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
res
.
data
.
contact
=
data
.
contact
;
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -382,36 +382,36 @@ export default class ContactServiceBase extends EntityService {
...
@@ -382,36 +382,36 @@ export default class ContactServiceBase extends EntityService {
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -429,8 +429,8 @@ export default class ContactServiceBase extends EntityService {
...
@@ -429,8 +429,8 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/active`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/active`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -449,36 +449,36 @@ export default class ContactServiceBase extends EntityService {
...
@@ -449,36 +449,36 @@ export default class ContactServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -496,8 +496,8 @@ export default class ContactServiceBase extends EntityService {
...
@@ -496,8 +496,8 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -516,36 +516,36 @@ export default class ContactServiceBase extends EntityService {
...
@@ -516,36 +516,36 @@ export default class ContactServiceBase extends EntityService {
public
async
Inactive
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Inactive
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -563,8 +563,8 @@ export default class ContactServiceBase extends EntityService {
...
@@ -563,8 +563,8 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/inactive`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/inactive`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -583,36 +583,36 @@ export default class ContactServiceBase extends EntityService {
...
@@ -583,36 +583,36 @@ export default class ContactServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -630,42 +630,42 @@ export default class ContactServiceBase extends EntityService {
...
@@ -630,42 +630,42 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -683,8 +683,8 @@ export default class ContactServiceBase extends EntityService {
...
@@ -683,8 +683,8 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -701,36 +701,36 @@ export default class ContactServiceBase extends EntityService {
...
@@ -701,36 +701,36 @@ export default class ContactServiceBase extends EntityService {
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
l
ead
sData
:
any
=
[];
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
let
opportunitiesData
:
any
=
[];
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
@@ -748,8 +748,8 @@ export default class ContactServiceBase extends EntityService {
...
@@ -748,8 +748,8 @@ export default class ContactServiceBase extends EntityService {
masterData
.
opportunities
=
opportunitiesData
;
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
4bd12da4
...
@@ -62,21 +62,6 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -62,21 +62,6 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
listaccountsData
:
any
=
[];
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
@@ -122,6 +107,21 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -122,6 +107,21 @@ export default class IBizListServiceBase extends EntityService {
}
}
}
}
masterData
.
campaignlists
=
campaignlistsData
;
masterData
.
campaignlists
=
campaignlistsData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
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
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -149,21 +149,6 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -149,21 +149,6 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
listaccountsData
:
any
=
[];
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
@@ -209,12 +194,27 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -209,12 +194,27 @@ export default class IBizListServiceBase extends EntityService {
}
}
}
}
masterData
.
campaignlists
=
campaignlistsData
;
masterData
.
campaignlists
=
campaignlistsData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
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
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
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
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
res
.
data
.
ibizlist
=
data
.
ibizlist
;
res
.
data
.
ibizlist
=
data
.
ibizlist
;
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
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -292,21 +292,6 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -292,21 +292,6 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
listaccountsData
:
any
=
[];
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
@@ -352,12 +337,27 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -352,12 +337,27 @@ export default class IBizListServiceBase extends EntityService {
}
}
}
}
masterData
.
campaignlists
=
campaignlistsData
;
masterData
.
campaignlists
=
campaignlistsData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
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
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
4bd12da4
...
@@ -69,36 +69,36 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -69,36 +69,36 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -123,43 +123,43 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -123,43 +123,43 @@ export default class OpportunityServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
true
){
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -184,42 +184,42 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -184,42 +184,42 @@ export default class OpportunityServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -244,8 +244,8 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -244,8 +244,8 @@ export default class OpportunityServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
@@ -262,36 +262,36 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -262,36 +262,36 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -309,43 +309,43 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -309,43 +309,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -363,42 +363,42 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -363,42 +363,42 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -416,8 +416,8 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -416,8 +416,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
@@ -453,21 +453,21 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -453,21 +453,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
@@ -485,23 +485,23 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -485,23 +485,23 @@ export default class OpportunityServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
true
){
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
true
){
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
@@ -518,36 +518,36 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -518,36 +518,36 @@ export default class OpportunityServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -565,43 +565,43 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -565,43 +565,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -619,8 +619,8 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -619,8 +619,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
@@ -639,36 +639,36 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -639,36 +639,36 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Lose
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Lose
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -686,43 +686,43 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -686,43 +686,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -740,8 +740,8 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -740,8 +740,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
@@ -760,36 +760,36 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -760,36 +760,36 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -807,43 +807,43 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -807,43 +807,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -861,42 +861,42 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -861,42 +861,42 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -914,8 +914,8 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -914,8 +914,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
@@ -932,36 +932,36 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -932,36 +932,36 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Win
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Win
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -979,43 +979,43 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -979,43 +979,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunity
product
sData
:
any
=
[];
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
let
opportunity
competitor
sData
:
any
=
[];
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -1033,8 +1033,8 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1033,8 +1033,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData
.
quotes
=
quotesData
;
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
4bd12da4
...
@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService {
...
@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productsubstitutesData
:
any
=
[];
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService {
...
@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService {
}
}
}
}
masterData
.
productassociations
=
productassociationsData
;
masterData
.
productassociations
=
productassociationsData
;
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
...
@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
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
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
return
res
;
}
}
...
@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService {
...
@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productsubstitutesData
:
any
=
[];
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService {
...
@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService {
}
}
}
}
masterData
.
productassociations
=
productassociationsData
;
masterData
.
productassociations
=
productassociationsData
;
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/products/
${
context
.
product
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/products/
${
context
.
product
}
`
,
data
,
isloading
);
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
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
return
res
;
}
}
...
@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
...
@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
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
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
return
res
;
}
}
...
@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
...
@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
res
.
data
.
product
=
data
.
product
;
res
.
data
.
product
=
data
.
product
;
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
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
return
res
;
}
}
...
@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService {
...
@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productsubstitutesData
:
any
=
[];
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService {
...
@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService {
}
}
}
}
masterData
.
productassociations
=
productassociationsData
;
masterData
.
productassociations
=
productassociationsData
;
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products/
${
context
.
product
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products/
${
context
.
product
}
/save`
,
data
,
isloading
);
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
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
4bd12da4
...
@@ -62,36 +62,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -62,36 +62,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productsalesliterature
sData
:
any
=
[];
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
salesliteratureitem
sData
:
any
=
[];
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
let
competitorsalesliteraturesData
:
any
=
[];
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
...
@@ -116,8 +116,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -116,8 +116,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
return
res
;
}
}
...
@@ -133,36 +133,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -133,36 +133,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productsalesliterature
sData
:
any
=
[];
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
salesliteratureitem
sData
:
any
=
[];
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
let
competitorsalesliteraturesData
:
any
=
[];
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
...
@@ -180,8 +180,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -180,8 +180,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
return
res
;
}
}
...
@@ -210,8 +210,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -210,8 +210,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
return
res
;
}
}
...
@@ -228,8 +228,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -228,8 +228,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
res
.
data
.
salesliterature
=
data
.
salesliterature
;
res
.
data
.
salesliterature
=
data
.
salesliterature
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
return
res
;
}
}
...
@@ -258,36 +258,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -258,36 +258,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productsalesliterature
sData
:
any
=
[];
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
salesliteratureitem
sData
:
any
=
[];
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
let
competitorsalesliteraturesData
:
any
=
[];
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
...
@@ -305,8 +305,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -305,8 +305,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/studio-core/service/app-service/AppServiceBase.ts
浏览文件 @
4bd12da4
import
{
AppNavHistory
}
from
'../app-nav-history/AppNavHistory'
;
import
{
AppNavHistory
}
from
'../app-nav-history/AppNavHistory'
;
import
{
AppContextStore
}
from
'../app-context-store/AppContextStore'
;
import
{
AppContextStore
}
from
'../app-context-store/AppContextStore'
;
import
{
AppViewStore
}
from
'../app-view-store/AppViewStore'
;
/**
/**
* 应用服务基类
* 应用服务基类
...
@@ -25,6 +26,14 @@ export class AppServiceBase {
...
@@ -25,6 +26,14 @@ export class AppServiceBase {
*/
*/
public
readonly
contextStore
:
AppContextStore
=
this
.
navHistory
.
contextStore
;
public
readonly
contextStore
:
AppContextStore
=
this
.
navHistory
.
contextStore
;
/**
* 应用视图仓库
*
* @type {AppViewStore}
* @memberof AppServiceBase
*/
public
readonly
viewStore
:
AppViewStore
=
new
AppViewStore
();
/**
/**
* 退出登录
* 退出登录
*
*
...
...
app_CRM/src/studio-core/service/app-view-store/AppViewStore.ts
0 → 100644
浏览文件 @
4bd12da4
import
{
SingletonMode
}
from
'@/studio-core/decorators/SingletonMode'
;
import
{
AppViewStoreBase
}
from
'./AppViewStoreBase'
;
/**
* 应用视图仓库
*
* @export
* @class AppViewStore
* @extends {AppViewStoreBase}
*/
@
SingletonMode
()
export
class
AppViewStore
extends
AppViewStoreBase
{
}
\ No newline at end of file
app_CRM/src/studio-core/service/app-view-store/AppViewStoreBase.ts
0 → 100644
浏览文件 @
4bd12da4
/**
* 应用视图仓库基类
*
* @export
* @class AppViewStoreBase
*/
export
class
AppViewStoreBase
{
/**
* 已实例化非嵌入级视图,根据实例化顺序排序
*
* @type {any[]}
* @memberof AppViewStoreBase
*/
public
readonly
viewList
:
any
[]
=
[];
/**
* 添加视图
*
* @param {*} view
* @memberof AppViewStoreBase
*/
public
push
(
view
:
any
):
void
{
this
.
viewList
.
push
(
view
);
console
.
log
(
this
.
viewList
);
}
/**
* 删除最后视图
*
* @memberof AppViewStoreBase
*/
public
pop
():
void
{
this
.
viewList
.
pop
();
}
}
\ No newline at end of file
app_CRM/src/studio-core/utils/studio-drawer/studio-drawer.tsx
浏览文件 @
4bd12da4
...
@@ -270,7 +270,7 @@ export class StudioDrawer extends Vue {
...
@@ -270,7 +270,7 @@ export class StudioDrawer extends Vue {
*/
*/
protected
renderViews
(
h
:
CreateElement
):
any
{
protected
renderViews
(
h
:
CreateElement
):
any
{
return
this
.
showViewList
.
map
((
view
:
any
,
i
:
number
)
=>
{
return
this
.
showViewList
.
map
((
view
:
any
,
i
:
number
)
=>
{
const
props
:
any
=
{
openMode
:
'MODAL'
,
viewDefaultUsage
:
false
,
viewdata
:
JSON
.
stringify
(
view
.
viewdata
),
viewparams
:
view
.
viewparams
};
const
props
:
any
=
{
openMode
:
'MODAL'
,
view
Usage
:
2
,
view
DefaultUsage
:
false
,
viewdata
:
JSON
.
stringify
(
view
.
viewdata
),
viewparams
:
view
.
viewparams
};
const
style
:
any
=
{
'z-index'
:
i
+
1
};
const
style
:
any
=
{
'z-index'
:
i
+
1
};
return
<
div
class=
{
{
'studio-drawer-item'
:
true
,
'active'
:
this
.
activeIndex
===
i
}
}
>
return
<
div
class=
{
{
'studio-drawer-item'
:
true
,
'active'
:
this
.
activeIndex
===
i
}
}
>
{
h
(
view
.
viewname
,
{
{
h
(
view
.
viewname
,
{
...
...
app_CRM/src/studio-core/view/ExpViewBase.tsx
0 → 100644
浏览文件 @
4bd12da4
import
{
ViewBase
}
from
'./ViewBase'
;
/**
* 导航视图基类
*
* @export
* @class ExpViewBase
* @extends {ViewBase}
*/
export
class
ExpViewBase
extends
ViewBase
{
}
\ No newline at end of file
app_CRM/src/studio-core/view/ListExpViewBase.tsx
浏览文件 @
4bd12da4
import
{
ListViewBase
}
from
'./List
ViewBase'
;
import
{
ExpViewBase
}
from
'./Exp
ViewBase'
;
/**
/**
* 列表导航视图基类
* 列表导航视图基类
*
*
* @export
* @export
* @class ListExpViewBase
* @class ListExpViewBase
* @extends {
List
ViewBase}
* @extends {
Exp
ViewBase}
*/
*/
export
class
ListExpViewBase
extends
List
ViewBase
{
export
class
ListExpViewBase
extends
Exp
ViewBase
{
}
}
\ No newline at end of file
app_CRM/src/studio-core/view/TabExpViewBase.tsx
浏览文件 @
4bd12da4
import
{
ViewBase
}
from
'./
ViewBase'
;
import
{
ExpViewBase
}
from
'./Exp
ViewBase'
;
/**
/**
* 分页导航视图基类
* 分页导航视图基类
*
*
* @export
* @export
* @class TabExpViewBase
* @class TabExpViewBase
* @extends {ViewBase}
* @extends {
Exp
ViewBase}
*/
*/
export
class
TabExpViewBase
extends
ViewBase
{
export
class
TabExpViewBase
extends
Exp
ViewBase
{
}
}
\ No newline at end of file
app_CRM/src/studio-core/view/TreeExpViewBase.tsx
浏览文件 @
4bd12da4
import
{
MDViewBase
}
from
'./MD
ViewBase'
;
import
{
ExpViewBase
}
from
'./Exp
ViewBase'
;
/**
/**
* 树导航视图基类
* 树导航视图基类
*
*
* @export
* @export
* @class TreeExpViewBase
* @class TreeExpViewBase
* @extends {
MD
ViewBase}
* @extends {
Exp
ViewBase}
*/
*/
export
class
TreeExpViewBase
extends
MD
ViewBase
{
export
class
TreeExpViewBase
extends
Exp
ViewBase
{
}
}
\ No newline at end of file
app_CRM/src/studio-core/view/ViewBase.tsx
浏览文件 @
4bd12da4
...
@@ -60,11 +60,11 @@ export class ViewBase extends Vue {
...
@@ -60,11 +60,11 @@ export class ViewBase extends Vue {
/**
/**
* 视图使用模式
* 视图使用模式
*
*
* @type {(1 | 2 | 4
)} 1:路由模式;2:模态模式;4:嵌入模式
* @type {(1 | 2 | 4
| 7)} 1:路由模式;2:模态模式;4:嵌入模式;7:导航嵌入模式,如「分页导航、树导航等」内嵌入使用的视图
* @memberof ViewBase
* @memberof ViewBase
*/
*/
@
Prop
({
default
:
1
})
@
Prop
({
default
:
1
})
public
viewUsage
!
:
1
|
2
|
4
;
public
viewUsage
!
:
1
|
2
|
4
|
7
;
/**
/**
* 快速搜索值
* 快速搜索值
...
@@ -264,6 +264,9 @@ export class ViewBase extends Vue {
...
@@ -264,6 +264,9 @@ export class ViewBase extends Vue {
* @memberof ViewBase
* @memberof ViewBase
*/
*/
public
created
():
void
{
public
created
():
void
{
if
(
this
.
viewUsage
===
1
||
this
.
viewUsage
===
2
)
{
this
.
$appService
.
viewStore
.
push
(
this
);
}
const
secondtag
=
this
.
$util
.
createUUID
();
const
secondtag
=
this
.
$util
.
createUUID
();
this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
this
.
viewtag
,
secondtag
:
secondtag
});
this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
this
.
viewtag
,
secondtag
:
secondtag
});
this
.
viewtag
=
secondtag
;
this
.
viewtag
=
secondtag
;
...
@@ -314,6 +317,9 @@ export class ViewBase extends Vue {
...
@@ -314,6 +317,9 @@ export class ViewBase extends Vue {
* @memberof ViewBase
* @memberof ViewBase
*/
*/
public
destroyed
():
void
{
public
destroyed
():
void
{
if
(
this
.
viewUsage
===
1
||
this
.
viewUsage
===
2
)
{
this
.
$appService
.
viewStore
.
pop
();
}
if
(
this
.
viewDefaultUsage
)
{
if
(
this
.
viewDefaultUsage
)
{
const
regExp
=
new
RegExp
(
`^
${
this
.
context
.
srfsessionid
}
_(.*)`
);
const
regExp
=
new
RegExp
(
`^
${
this
.
context
.
srfsessionid
}
_(.*)`
);
for
(
const
key
in
localStorage
)
{
for
(
const
key
in
localStorage
)
{
...
...
app_CRM/src/utils/app-drawer/app-drawer.vue
浏览文件 @
4bd12da4
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<component
<component
:is=
"viewname"
:is=
"viewname"
class=
"viewcontainer2"
class=
"viewcontainer2"
:viewUsage=
"2"
:viewDefaultUsage=
"false"
:viewDefaultUsage=
"false"
:viewdata=
"JSON.stringify(viewdata)"
:viewdata=
"JSON.stringify(viewdata)"
:viewparam=
"JSON.stringify(viewparams)"
:viewparam=
"JSON.stringify(viewparams)"
...
...
app_CRM/src/utils/app-modal/app-modal.vue
浏览文件 @
4bd12da4
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<component
<component
:is=
"viewname"
:is=
"viewname"
class=
"viewcontainer2"
class=
"viewcontainer2"
:viewUsage=
"2"
:viewDefaultUsage=
"false"
:viewDefaultUsage=
"false"
:viewdata=
"JSON.stringify(viewdata)"
:viewdata=
"JSON.stringify(viewdata)"
:viewparam=
"JSON.stringify(viewparams)"
:viewparam=
"JSON.stringify(viewparams)"
...
...
app_CRM/src/widgets/account/gradationtreeexpbar-treeexpbar/gradationtreeexpbar-treeexpbar.html
浏览文件 @
4bd12da4
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
v-if=
"selection.view && !Object.is(this.selection.view.viewname, '')"
v-if=
"selection.view && !Object.is(this.selection.view.viewname, '')"
:is=
"selection.view.viewname"
:is=
"selection.view.viewname"
class=
"viewcontainer2"
class=
"viewcontainer2"
:viewUsage=
"7"
:viewDefaultUsage=
"false"
:viewDefaultUsage=
"false"
:viewdata=
"JSON.stringify(selection.context)"
:viewdata=
"JSON.stringify(selection.context)"
:viewparam=
"JSON.stringify(selection.viewparam)"
:viewparam=
"JSON.stringify(selection.viewparam)"
...
...
app_CRM/src/widgets/account/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<account-summary
<account-summary
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</account-summary>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<activity-pointer-by-parent-key
<activity-pointer-by-parent-key
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</activity-pointer-by-parent-key>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/infotabviewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<account-info-major-contact
<account-info-major-contact
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</account-info-major-contact>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/infotabviewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<account-grid-view
<account-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</account-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/view-account-info-all-portlet/view-account-info-all-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-account-info-all '
:style=
"{}"
>
<div
class=
'portlet view-account-info-all '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<account-info-all
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></account-info-all>
<account-info-all
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></account-info-all>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/campaign/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<campaign-summary
<campaign-summary
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</campaign-summary>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/campaign/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<campaign-activity-by-parent-key
<campaign-activity-by-parent-key
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</campaign-activity-by-parent-key>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/campaign/infotabviewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<lead-grid-view
<lead-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</lead-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/campaign/infotabviewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<campaign-response-by-parent-key
<campaign-response-by-parent-key
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</campaign-response-by-parent-key>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/campaign/infotabviewpanel5-tabviewpanel/infotabviewpanel5-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<campaign-list-grid-view
<campaign-list-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</campaign-list-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/campaign/view-campagin-portlet/view-campagin-portlet.html
浏览文件 @
4bd12da4
...
@@ -6,6 +6,6 @@
...
@@ -6,6 +6,6 @@
</span>
</span>
</p>
</p>
<div
class=
"portlet-with-title"
>
<div
class=
"portlet-with-title"
>
<campaign-info-campagin
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-campagin>
<campaign-info-campagin
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-campagin>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/campaign/view-head-portlet/view-head-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-head '
:style=
"{}"
>
<div
class=
'portlet view-head '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<campaign-info-head
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-head>
<campaign-info-head
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-head>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/campaign/view-info-portlet/view-info-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-info '
:style=
"{}"
>
<div
class=
'portlet view-info '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<campaign-info
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info>
<campaign-info
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/campaign/view-manager-portlet/view-manager-portlet.html
浏览文件 @
4bd12da4
...
@@ -6,6 +6,6 @@
...
@@ -6,6 +6,6 @@
</span>
</span>
</p>
</p>
<div
class=
"portlet-with-title"
>
<div
class=
"portlet-with-title"
>
<campaign-info-manager
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-manager>
<campaign-info-manager
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-manager>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/campaign/view-schedule-portlet/view-schedule-portlet.html
浏览文件 @
4bd12da4
...
@@ -6,6 +6,6 @@
...
@@ -6,6 +6,6 @@
</span>
</span>
</p>
</p>
<div
class=
"portlet-with-title"
>
<div
class=
"portlet-with-title"
>
<campaign-info-schedule
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-schedule>
<campaign-info-schedule
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></campaign-info-schedule>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/competitor/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<competitor-summary
<competitor-summary
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</competitor-summary>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/competitor/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<opportunity-competitor-opp-comp-grid-view
<opportunity-competitor-opp-comp-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</opportunity-competitor-opp-comp-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/competitor/view-comp-abstract-portlet/view-comp-abstract-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-comp-abstract '
:style=
"{}"
>
<div
class=
'portlet view-comp-abstract '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<competitor-info-abstract
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></competitor-info-abstract>
<competitor-info-abstract
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></competitor-info-abstract>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/contact/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<contact-summary-view
<contact-summary-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</contact-summary-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/contact/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<lead-con-lead-grid-view
<lead-con-lead-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</lead-con-lead-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/contact/infotabviewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<opportunity-con-opp-grid-view
<opportunity-con-opp-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</opportunity-con-opp-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/contact/infotabviewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<activity-pointer-by-parent-key
<activity-pointer-by-parent-key
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</activity-pointer-by-parent-key>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/contact/view-con-abs-portlet/view-con-abs-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-con-abs '
:style=
"{}"
>
<div
class=
'portlet view-con-abs '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<contact-info-abstract
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></contact-info-abstract>
<contact-info-abstract
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></contact-info-abstract>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/goal/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<goal-summary-view
<goal-summary-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</goal-summary-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/goal/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<goal-child-goal-grid-view
<goal-child-goal-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</goal-child-goal-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/goal/view-goal-info-portlet/view-goal-info-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-goal-info '
:style=
"{}"
>
<div
class=
'portlet view-goal-info '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<goal-info-goal-view
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></goal-info-goal-view>
<goal-info-goal-view
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></goal-info-goal-view>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/ibiz-list/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<ibiz-list-summary
<ibiz-list-summary
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</ibiz-list-summary>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/ibiz-list/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<list-account-by-list
<list-account-by-list
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</list-account-by-list>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/ibiz-list/infotabviewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<list-contact-grid-view
<list-contact-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</list-contact-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/ibiz-list/infotabviewpanel4-tabviewpanel/infotabviewpanel4-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<list-lead-by-list
<list-lead-by-list
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</list-lead-by-list>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/ibiz-list/infotabviewpanel5-tabviewpanel/infotabviewpanel5-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<campaign-list-grid-view
<campaign-list-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</campaign-list-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/ibiz-list/view-list-abs-portlet/view-list-abs-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-list-abs '
:style=
"{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}"
>
<div
class=
'portlet view-list-abs '
:style=
"{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<ibiz-list-info-abstract
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></ibiz-list-info-abstract>
<ibiz-list-info-abstract
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></ibiz-list-info-abstract>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/incident/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<incident-summary-view
<incident-summary-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</incident-summary-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/incident/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<incident-child-incident-grid-view
<incident-child-incident-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</incident-child-incident-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/incident/view-incident-info-portlet/view-incident-info-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-incident-info '
:style=
"{}"
>
<div
class=
'portlet view-incident-info '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<incident-info-incident-view
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></incident-info-incident-view>
<incident-info-incident-view
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></incident-info-incident-view>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/invoice/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<invoice-summary-view
<invoice-summary-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</invoice-summary-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/invoice/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<invoice-detail-invoice-pro-grid-view
<invoice-detail-invoice-pro-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</invoice-detail-invoice-pro-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/invoice/view-inv-info-portlet/view-inv-info-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-inv-info '
:style=
"{}"
>
<div
class=
'portlet view-inv-info '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<invoice-info-invoice-view
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></invoice-info-invoice-view>
<invoice-info-invoice-view
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></invoice-info-invoice-view>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/lead/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<lead-dashboard-view
<lead-dashboard-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</lead-dashboard-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/lead/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<activity-pointer-by-parent-key
<activity-pointer-by-parent-key
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</activity-pointer-by-parent-key>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/lead/view-lead-con-portlet/view-lead-con-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-lead-con '
:style=
"{}"
>
<div
class=
'portlet view-lead-con '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<lead-info-contact
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></lead-info-contact>
<lead-info-contact
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></lead-info-contact>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/opportunity/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<opportunity-summary
<opportunity-summary
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</opportunity-summary>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/opportunity/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<opportunity-product-opp-opp-pro-grid-view
<opportunity-product-opp-opp-pro-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</opportunity-product-opp-opp-pro-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/opportunity/infotabviewpanel3-tabviewpanel/infotabviewpanel3-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<quote-opp-qua-grid-view
<quote-opp-qua-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</quote-opp-qua-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/opportunity/view-opp-abs-portlet/view-opp-abs-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-opp-abs '
:style=
"{}"
>
<div
class=
'portlet view-opp-abs '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<opportunity-info-abstract
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></opportunity-info-abstract>
<opportunity-info-abstract
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></opportunity-info-abstract>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/product/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<product-summary-view
<product-summary-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</product-summary-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/product/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<product-association-grid-view
<product-association-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</product-association-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/product/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<product-price-level-pro-prilv-grid-view
<product-price-level-pro-prilv-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</product-price-level-pro-prilv-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/product/info-viewtabviewpanel4-tabviewpanel/info-viewtabviewpanel4-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<product-substitute-grid-view
<product-substitute-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</product-substitute-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/product/view-pro-info-portlet/view-pro-info-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-pro-info '
:style=
"{}"
>
<div
class=
'portlet view-pro-info '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<product-info-pro-info
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></product-info-pro-info>
<product-info-pro-info
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></product-info-pro-info>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/quote/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<quote-summary
<quote-summary
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</quote-summary>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/quote/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<quote-detail-quo-detail-grid-view
<quote-detail-quo-detail-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</quote-detail-quo-detail-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/quote/view-quo-abs-portlet/view-quo-abs-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-quo-abs '
:style=
"{}"
>
<div
class=
'portlet view-quo-abs '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<quote-info-abstract
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></quote-info-abstract>
<quote-info-abstract
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></quote-info-abstract>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<sales-literature-summary-view
<sales-literature-summary-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</sales-literature-summary-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<product-sales-literature-sal-lit-pro-grid-view
<product-sales-literature-sal-lit-pro-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</product-sales-literature-sal-lit-pro-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<competitor-sales-literature-sal-lit-comp-grid-view
<competitor-sales-literature-sal-lit-comp-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</competitor-sales-literature-sal-lit-comp-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/sales-literature/view-sal-lit-info-portlet/view-sal-lit-info-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-sal-lit-info '
:style=
"{}"
>
<div
class=
'portlet view-sal-lit-info '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<sales-literature-info-sal-lit-view
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></sales-literature-info-sal-lit-view>
<sales-literature-info-sal-lit-view
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></sales-literature-info-sal-lit-view>
</div>
</div>
</div>
</div>
app_CRM/src/widgets/sales-order/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<sales-order-summary-view
<sales-order-summary-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</sales-order-summary-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/sales-order/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.html
浏览文件 @
4bd12da4
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<sales-order-detail-soproduct-grid-view
<sales-order-detail-soproduct-grid-view
class=
'viewcontainer2'
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
:viewDefaultUsage=
"false"
</sales-order-detail-soproduct-grid-view>
:viewUsage=
"7"
/>
</div>
</div>
\ No newline at end of file
app_CRM/src/widgets/sales-order/view-soinfo-portlet/view-soinfo-portlet.html
浏览文件 @
4bd12da4
<div
class=
'portlet view-soinfo '
:style=
"{}"
>
<div
class=
'portlet view-soinfo '
:style=
"{}"
>
<div
class=
"portlet-without-title"
>
<div
class=
"portlet-without-title"
>
<sales-order-info-soview
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></sales-order-info-soview>
<sales-order-info-soview
:view
Usage=
"4"
:view
data=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></sales-order-info-soview>
</div>
</div>
</div>
</div>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录