Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
a00802db
提交
a00802db
编写于
7月 07, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
5297342c
变更
27
显示空白字符变更
内嵌
并排
正在显示
27 个修改的文件
包含
678 行增加
和
639 行删除
+678
-639
account.ts
app_CRM/src/interface/entity/account.ts
+1
-1
account_en_US.ts
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
+7
-6
account_zh_CN.ts
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
+7
-6
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
+152
-152
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
+261
-261
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
edit-account-info-form-base.tsx
...nt/edit-account-info-form/edit-account-info-form-base.tsx
+1
-1
info-all-form-base.tsx
.../src/widgets/account/info-all-form/info-all-form-base.tsx
+1
-1
main-form-base.tsx
app_CRM/src/widgets/account/main-form/main-form-base.tsx
+1
-1
main-grid-base.tsx
app_CRM/src/widgets/account/main-grid/main-grid-base.tsx
+8
-0
main-grid-model.ts
app_CRM/src/widgets/account/main-grid/main-grid-model.ts
+5
-0
main-grid.html
app_CRM/src/widgets/account/main-grid/main-grid.html
+12
-0
quick-create-form-base.tsx
...gets/account/quick-create-form/quick-create-form-base.tsx
+1
-1
edit-child-incident-form-service.ts
...t-child-incident-form/edit-child-incident-form-service.ts
+3
-0
edit-child-incident-form.html
...nt/edit-child-incident-form/edit-child-incident-form.html
+1
-1
qualification-form-service.ts
...ets/lead/qualification-form/qualification-form-service.ts
+3
-0
qualification-form.html
...c/widgets/lead/qualification-form/qualification-form.html
+1
-1
main-form-service.ts
...RM/src/widgets/opportunity/main-form/main-form-service.ts
+3
-0
main-form.html
app_CRM/src/widgets/opportunity/main-form/main-form.html
+1
-1
quick-create-form-service.ts
...pportunity/quick-create-form/quick-create-form-service.ts
+3
-0
quick-create-form.html
...gets/opportunity/quick-create-form/quick-create-form.html
+1
-1
Account.java
.../cn/ibizlab/businesscentral/core/base/domain/Account.java
+2
-2
AccountSearchContext.java
...usinesscentral/core/base/filter/AccountSearchContext.java
+2
-2
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+13
-13
未找到文件。
app_CRM/src/interface/entity/account.ts
浏览文件 @
a00802db
...
...
@@ -1263,7 +1263,7 @@ export interface Account {
territoryname
?:
any
;
/**
* 上级
单位
* 上级
客户
*
* @returns {*}
* @memberof Account
...
...
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
浏览文件 @
a00802db
...
...
@@ -158,7 +158,7 @@ export default {
originatingleadname
:
"原始潜在顾客"
,
defaultpricelevelname
:
"价目表"
,
territoryname
:
"区域"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
preferredequipmentname
:
"首选设施/设备"
,
preferredservicename
:
"首选服务"
,
primarycontactname
:
"主要联系人"
,
...
...
@@ -275,7 +275,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -333,7 +333,7 @@ export default {
sic
:
"行业编码"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
ownershipcode
:
"所有权"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -381,7 +381,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -406,7 +406,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -456,7 +456,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -603,6 +603,7 @@ export default {
address1_city
:
"地址 1: 市/县"
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
parentaccountname
:
"上级客户"
,
},
uiactions
:
{
},
...
...
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
浏览文件 @
a00802db
...
...
@@ -157,7 +157,7 @@ export default {
originatingleadname
:
"原始潜在顾客"
,
defaultpricelevelname
:
"价目表"
,
territoryname
:
"区域"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
preferredequipmentname
:
"首选设施/设备"
,
preferredservicename
:
"首选服务"
,
primarycontactname
:
"主要联系人"
,
...
...
@@ -274,7 +274,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -332,7 +332,7 @@ export default {
sic
:
"行业编码"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
ownershipcode
:
"所有权"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -380,7 +380,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -405,7 +405,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -455,7 +455,7 @@ export default {
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级
单位
"
,
parentaccountname
:
"上级
客户
"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
...
...
@@ -602,6 +602,7 @@ export default {
address1_city
:
"地址 1: 市/县"
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
parentaccountname
:
"上级客户"
,
},
uiactions
:
{
},
...
...
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
a00802db
...
...
@@ -62,11 +62,11 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -76,12 +76,12 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -91,7 +91,7 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -116,8 +116,8 @@ export default class CampaignServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -133,11 +133,11 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -147,12 +147,12 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -162,7 +162,7 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -180,8 +180,8 @@ export default class CampaignServiceBase extends EntityService {
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
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
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -210,8 +210,8 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -228,8 +228,8 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -258,11 +258,11 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -272,12 +272,12 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -287,7 +287,7 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -305,8 +305,8 @@ export default class CampaignServiceBase extends EntityService {
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
a00802db
...
...
@@ -68,21 +68,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -98,21 +98,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -122,27 +122,27 @@ export default class ContactServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -158,21 +158,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -182,9 +182,9 @@ export default class ContactServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -200,21 +200,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -230,44 +230,44 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -283,26 +283,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -334,15 +334,15 @@ export default class ContactServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -359,16 +359,16 @@ export default class ContactServiceBase extends EntityService {
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -399,21 +399,21 @@ export default class ContactServiceBase extends EntityService {
public
async
AddList
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -429,26 +429,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
...
...
@@ -466,21 +466,21 @@ export default class ContactServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -496,26 +496,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -548,21 +548,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -578,44 +578,44 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -631,26 +631,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -666,21 +666,21 @@ export default class ContactServiceBase extends EntityService {
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
...
@@ -696,26 +696,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
...
...
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
a00802db
...
...
@@ -62,21 +62,6 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
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
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
...
@@ -107,6 +92,21 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
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
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -131,9 +131,9 @@ export default class IBizListServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -149,21 +149,6 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
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
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
...
@@ -194,6 +179,21 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
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
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -211,9 +211,9 @@ export default class IBizListServiceBase extends EntityService {
masterData
.
campaignlists
=
campaignlistsData
;
Object
.
assign
(
data
,
masterData
);
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
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -242,9 +242,9 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -261,9 +261,9 @@ export default class IBizListServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
res
.
data
.
ibizlist
=
data
.
ibizlist
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
@@ -292,21 +292,6 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
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
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
...
@@ -337,6 +322,21 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
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
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -354,9 +354,9 @@ export default class IBizListServiceBase extends EntityService {
masterData
.
campaignlists
=
campaignlistsData
;
Object
.
assign
(
data
,
masterData
);
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
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
}
...
...
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
a00802db
...
...
@@ -84,36 +84,36 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -124,8 +124,8 @@ export default class OpportunityServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
true
){
...
...
@@ -145,36 +145,36 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -185,8 +185,8 @@ export default class OpportunityServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -205,36 +205,36 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -245,8 +245,8 @@ export default class OpportunityServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -277,41 +277,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -331,41 +331,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -384,41 +384,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -454,21 +454,21 @@ export default class OpportunityServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -486,23 +486,23 @@ export default class OpportunityServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -533,41 +533,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -587,41 +587,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
...
...
@@ -654,41 +654,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -708,41 +708,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -775,41 +775,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -829,41 +829,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
...
...
@@ -896,41 +896,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -950,41 +950,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -1003,41 +1003,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -1068,41 +1068,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -1122,41 +1122,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
let
opportunityproduct
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunityproduct
s'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunityproduct
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproduct
sData
;
masterData
.
quotes
=
quote
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
...
...
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
a00802db
...
...
@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
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
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService {
}
}
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
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
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
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService {
}
}
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
);
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
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
res
.
data
.
product
=
data
.
product
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
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
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService {
}
}
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
);
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
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
a00802db
...
...
@@ -77,36 +77,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -117,8 +117,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -148,41 +148,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -211,8 +211,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -229,8 +229,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
res
.
data
.
salesliterature
=
data
.
salesliterature
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -273,41 +273,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
app_CRM/src/widgets/account/edit-account-info-form/edit-account-info-form-base.tsx
浏览文件 @
a00802db
...
...
@@ -117,7 +117,7 @@ export class Edit_AccountInfoEditFormBase extends EditFormControlBase {
websiteurl
:
new
FormItemModel
({
caption
:
'网站'
,
detailType
:
'FORMITEM'
,
name
:
'websiteurl'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
单位
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
客户
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
tickersymbol
:
new
FormItemModel
({
caption
:
'股票代号'
,
detailType
:
'FORMITEM'
,
name
:
'tickersymbol'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
...
...
app_CRM/src/widgets/account/info-all-form/info-all-form-base.tsx
浏览文件 @
a00802db
...
...
@@ -242,7 +242,7 @@ export class Info_AllEditFormBase extends EditFormControlBase {
websiteurl
:
new
FormItemModel
({
caption
:
'网站'
,
detailType
:
'FORMITEM'
,
name
:
'websiteurl'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
单位
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
客户
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
tickersymbol
:
new
FormItemModel
({
caption
:
'股票代号'
,
detailType
:
'FORMITEM'
,
name
:
'tickersymbol'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
...
...
app_CRM/src/widgets/account/main-form/main-form-base.tsx
浏览文件 @
a00802db
...
...
@@ -144,7 +144,7 @@ export class MainEditFormBase extends EditFormControlBase {
websiteurl
:
new
FormItemModel
({
caption
:
'网站'
,
detailType
:
'FORMITEM'
,
name
:
'websiteurl'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
单位
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
客户
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
tickersymbol
:
new
FormItemModel
({
caption
:
'股票代号'
,
detailType
:
'FORMITEM'
,
name
:
'tickersymbol'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
...
...
app_CRM/src/widgets/account/main-grid/main-grid-base.tsx
浏览文件 @
a00802db
...
...
@@ -91,6 +91,13 @@ export class MainGridBase extends GridControllerBase {
show
:
true
,
util
:
'PX'
},
{
name
:
'parentaccountname'
,
label
:
'上级客户'
,
langtag
:
'entities.account.main_grid.columns.parentaccountname'
,
show
:
true
,
util
:
'PX'
},
]
/**
...
...
@@ -130,6 +137,7 @@ export class MainGridBase extends GridControllerBase {
'address1_city'
:
false
,
'primarycontactname'
:
false
,
'emailaddress1'
:
false
,
'parentaccountname'
:
false
,
};
/**
...
...
app_CRM/src/widgets/account/main-grid/main-grid-model.ts
浏览文件 @
a00802db
...
...
@@ -46,6 +46,11 @@ export default class MainModel {
prop
:
'transactioncurrencyid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'parentaccountname'
,
prop
:
'parentaccountname'
,
dataType
:
'PICKUPTEXT'
,
},
{
name
:
'slaid'
,
prop
:
'slaid'
,
...
...
app_CRM/src/widgets/account/main-grid/main-grid.html
浏览文件 @
a00802db
...
...
@@ -83,6 +83,18 @@
</template>
</el-table-column>
</template>
<template
v-if=
"getColumnState('parentaccountname')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'parentaccountname'"
:label=
"$t('entities.account.main_grid.columns.parentaccountname')"
:width=
"200"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"{column}"
>
<span
class=
"column-header "
>
{{$t('entities.account.main_grid.columns.parentaccountname')}}
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<span>
{{row.parentaccountname}}
</span>
</template>
</el-table-column>
</template>
<template
v-if=
"adaptiveState"
>
<el-table-column></el-table-column>
</template>
...
...
app_CRM/src/widgets/account/quick-create-form/quick-create-form-base.tsx
浏览文件 @
a00802db
...
...
@@ -117,7 +117,7 @@ export class QuickCreateEditFormBase extends EditFormControlBase {
websiteurl
:
new
FormItemModel
({
caption
:
'网站'
,
detailType
:
'FORMITEM'
,
name
:
'websiteurl'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
单位
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级
客户
'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
tickersymbol
:
new
FormItemModel
({
caption
:
'股票代号'
,
detailType
:
'FORMITEM'
,
name
:
'tickersymbol'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
...
...
app_CRM/src/widgets/incident/edit-child-incident-form/edit-child-incident-form-service.ts
浏览文件 @
a00802db
...
...
@@ -119,6 +119,9 @@ export default class Edit_ChildIncidentService extends ControlService {
if
(
Object
.
is
(
serviceName
,
'SubjectService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
subjectService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'subjectid'
,
'subject'
);
}
if
(
Object
.
is
(
serviceName
,
'ContactService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
contactService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'contactid'
,
'contact'
);
}
if
(
Object
.
is
(
serviceName
,
'ProductService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
productService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'productid'
,
'product'
);
}
...
...
app_CRM/src/widgets/incident/edit-child-incident-form/edit-child-incident-form.html
浏览文件 @
a00802db
...
...
@@ -77,7 +77,7 @@
deMajorField=
'fullname'
deKeyField=
'contact'
:service=
"service"
:acParams=
"{ }"
:acParams=
"{
serviceName: 'ContactService', interfaceName: 'FetchDefault'
}"
valueitem=
'primarycontactid'
:value=
"data.primarycontactname"
editortype=
""
...
...
app_CRM/src/widgets/lead/qualification-form/qualification-form-service.ts
浏览文件 @
a00802db
...
...
@@ -98,6 +98,9 @@ export default class QualificationService extends ControlService {
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'ContactService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
contactService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'contactid'
,
'contact'
);
}
if
(
Object
.
is
(
serviceName
,
'AccountService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
accountService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'accountid'
,
'account'
);
}
...
...
app_CRM/src/widgets/lead/qualification-form/qualification-form.html
浏览文件 @
a00802db
...
...
@@ -20,7 +20,7 @@
deMajorField=
'fullname'
deKeyField=
'contact'
:service=
"service"
:acParams=
"{ }"
:acParams=
"{
serviceName: 'ContactService', interfaceName: 'FetchDefault'
}"
valueitem=
'parentcontactid'
:value=
"data.parentcontactname"
editortype=
""
...
...
app_CRM/src/widgets/opportunity/main-form/main-form-service.ts
浏览文件 @
a00802db
...
...
@@ -116,6 +116,9 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'ContactService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
contactService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'contactid'
,
'contact'
);
}
if
(
Object
.
is
(
serviceName
,
'AccountService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
accountService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'accountid'
,
'account'
);
}
...
...
app_CRM/src/widgets/opportunity/main-form/main-form.html
浏览文件 @
a00802db
...
...
@@ -26,7 +26,7 @@
deMajorField=
'fullname'
deKeyField=
'contact'
:service=
"service"
:acParams=
"{ }"
:acParams=
"{
serviceName: 'ContactService', interfaceName: 'FetchDefault'
}"
valueitem=
'parentcontactid'
:value=
"data.parentcontactname"
editortype=
""
...
...
app_CRM/src/widgets/opportunity/quick-create-form/quick-create-form-service.ts
浏览文件 @
a00802db
...
...
@@ -107,6 +107,9 @@ export default class QuickCreateService extends ControlService {
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'ContactService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
contactService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'contactid'
,
'contact'
);
}
if
(
Object
.
is
(
serviceName
,
'AccountService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
accountService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'accountid'
,
'account'
);
}
...
...
app_CRM/src/widgets/opportunity/quick-create-form/quick-create-form.html
浏览文件 @
a00802db
...
...
@@ -26,7 +26,7 @@
deMajorField=
'fullname'
deKeyField=
'contact'
:service=
"service"
:acParams=
"{ }"
:acParams=
"{
serviceName: 'ContactService', interfaceName: 'FetchDefault'
}"
valueitem=
'parentcontactid'
:value=
"data.parentcontactname"
editortype=
""
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/domain/Account.java
浏览文件 @
a00802db
...
...
@@ -1225,7 +1225,7 @@ public class Account extends EntityMP implements Serializable {
@JsonProperty
(
"territoryname"
)
private
String
territoryname
;
/**
* 上级
单位
* 上级
客户
*/
@TableField
(
value
=
"parentaccountname"
)
@JSONField
(
name
=
"parentaccountname"
)
...
...
@@ -2609,7 +2609,7 @@ public class Account extends EntityMP implements Serializable {
}
/**
* 设置 [上级
单位
]
* 设置 [上级
客户
]
*/
public
void
setParentaccountname
(
String
parentaccountname
){
this
.
parentaccountname
=
parentaccountname
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/filter/AccountSearchContext.java
浏览文件 @
a00802db
...
...
@@ -293,14 +293,14 @@ public class AccountSearchContext extends QueryWrapperContext<Account> {
this
.
getSearchCond
().
like
(
"territoryname"
,
n_territoryname_like
);
}
}
private
String
n_parentaccountname_eq
;
//[上级
单位
]
private
String
n_parentaccountname_eq
;
//[上级
客户
]
public
void
setN_parentaccountname_eq
(
String
n_parentaccountname_eq
)
{
this
.
n_parentaccountname_eq
=
n_parentaccountname_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_parentaccountname_eq
)){
this
.
getSearchCond
().
eq
(
"parentaccountname"
,
n_parentaccountname_eq
);
}
}
private
String
n_parentaccountname_like
;
//[上级
单位
]
private
String
n_parentaccountname_like
;
//[上级
客户
]
public
void
setN_parentaccountname_like
(
String
n_parentaccountname_like
)
{
this
.
n_parentaccountname_like
=
n_parentaccountname_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_parentaccountname_like
)){
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
a00802db
...
...
@@ -4,7 +4,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-42
7
-1"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-42
9
-1"
>
<createTable
tableName=
"ACCOUNT"
>
<column
name=
"ADDRESS1_PRIMARYCONTACTNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -10879,7 +10879,7 @@
<!--输出实体[WEBSITECHANNEL]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-websitechannel-
43
-129"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-websitechannel-
68
-129"
>
<createTable
tableName=
"WEBSITECHANNEL"
>
<column
name=
"WEBSITECHANNELID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WEBSITECHANNEL_WEBSITECHANN"
/>
...
...
@@ -10978,31 +10978,31 @@
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-132"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-132"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__ACCOUNT__PARENT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-133"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-133"
>
<addForeignKeyConstraint
baseColumnNames=
"PRIMARYCONTACTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__CONTACT__PRIMAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-134"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-134"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-135"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-135"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-136"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-136"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-137"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-137"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-138"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-138"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-139"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-139"
>
<addForeignKeyConstraint
baseColumnNames=
"TERRITORYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TERRITORY__TERR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TERRITORYID"
referencedTableName=
"TERRITORY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
7
-140"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-42
9
-140"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
...
...
@@ -11904,10 +11904,10 @@
<!--输出实体[UOMSCHEDULE]外键关系 -->
<!--输出实体[WEBSITE]外键关系 -->
<!--输出实体[WEBSITECHANNEL]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-websitechannel-
43
-427"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-websitechannel-
68
-427"
>
<addForeignKeyConstraint
baseColumnNames=
"PWEBSITECHANNELID"
baseTableName=
"WEBSITECHANNEL"
constraintName=
"DER1N_WEBSITECHANNEL_WEBSITECH"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"WEBSITECHANNELID"
referencedTableName=
"WEBSITECHANNEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-websitechannel-
43
-428"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-websitechannel-
68
-428"
>
<addForeignKeyConstraint
baseColumnNames=
"WEBSITEID"
baseTableName=
"WEBSITECHANNEL"
constraintName=
"DER1N_WEBSITECHANNEL_WEBSITE_W"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"WEBSITEID"
referencedTableName=
"WEBSITE"
validate=
"true"
/>
</changeSet>
<!--输出实体[WEBSITECONTENT]外键关系 -->
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录