Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
82172f35
提交
82172f35
编写于
7月 10, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chitanda 发布系统代码
上级
abd6f505
变更
20
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
1140 行增加
和
965 行删除
+1140
-965
data-dictionary.json
app_CRM/public/assets/json/data-dictionary.json
+47
-0
view-config.json
app_CRM/public/assets/json/view-config.json
+10
-0
codelist_en_US.ts
app_CRM/src/locale/lanres/codelist/codelist_en_US.ts
+7
-0
codelist_zh_CN.ts
app_CRM/src/locale/lanres/codelist/codelist_zh_CN.ts
+7
-0
invoice_en_US.ts
app_CRM/src/locale/lanres/entities/invoice/invoice_en_US.ts
+24
-0
invoice_zh_CN.ts
app_CRM/src/locale/lanres/entities/invoice/invoice_zh_CN.ts
+24
-0
codelist.ts
app_CRM/src/mock/codelist/codelist.ts
+47
-0
viewconfig.ts
app_CRM/src/mock/viewconfig/viewconfig.ts
+8
-0
account-service-base.ts
app_CRM/src/service/account/account-service-base.ts
+50
-50
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+50
-50
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+152
-152
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+50
-50
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+223
-223
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+50
-50
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+47
-47
sales-order-service-base.ts
app_CRM/src/service/sales-order/sales-order-service-base.ts
+308
-308
invoice-ui-service-base.ts
app_CRM/src/uiservice/invoice/invoice-ui-service-base.ts
+1
-0
info-all-form-base.tsx
.../src/widgets/account/info-all-form/info-all-form-base.tsx
+1
-1
date-panel-form.html
.../src/widgets/contact/date-panel-form/date-panel-form.html
+1
-1
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+33
-33
未找到文件。
app_CRM/public/assets/json/data-dictionary.json
浏览文件 @
82172f35
...
@@ -6387,6 +6387,53 @@
...
@@ -6387,6 +6387,53 @@
}
}
]
]
},
},
{
"srfkey"
:
"Invoice__StateCode"
,
"emptytext"
:
"未定义"
,
"codelisttype"
:
"static"
,
"items"
:
[
{
"id"
:
"3"
,
"label"
:
"已取消"
,
"text"
:
"已取消"
,
"data"
:
""
,
"codename"
:
"Item_3"
,
"value"
:
"3"
,
"disabled"
:
false
}
,
{
"id"
:
"2"
,
"label"
:
"已支付"
,
"text"
:
"已支付"
,
"data"
:
""
,
"codename"
:
"Item_2"
,
"value"
:
"2"
,
"disabled"
:
false
}
,
{
"id"
:
"1"
,
"label"
:
"已结束(已弃用)"
,
"text"
:
"已结束(已弃用)"
,
"data"
:
""
,
"codename"
:
"Item_1"
,
"value"
:
"1"
,
"disabled"
:
false
}
,
{
"id"
:
"0"
,
"label"
:
"有效"
,
"text"
:
"有效"
,
"data"
:
""
,
"codename"
:
"Item_0"
,
"value"
:
"0"
,
"disabled"
:
false
}
]
},
{
{
"srfkey"
:
"Invoice__PaymentTermsCode"
,
"srfkey"
:
"Invoice__PaymentTermsCode"
,
"emptytext"
:
"未定义"
,
"emptytext"
:
"未定义"
,
...
...
app_CRM/public/assets/json/view-config.json
浏览文件 @
82172f35
...
@@ -809,6 +809,16 @@
...
@@ -809,6 +809,16 @@
"viewtag"
:
"3d538df4ca389d372347f7b53d67269f"
,
"viewtag"
:
"3d538df4ca389d372347f7b53d67269f"
,
"memo"
:
"系统自动添加"
"memo"
:
"系统自动添加"
},
},
"invoiceedit_datapanelview"
:
{
"title"
:
"头部信息编辑"
,
"caption"
:
"发票"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Finance"
,
"viewname"
:
"InvoiceEdit_DataPanelView"
,
"viewfilename"
:
"invoice-edit-data-panel-view"
,
"viewtag"
:
"3dce5b12278b797f02c77e6dad5f6b17"
,
"memo"
:
""
},
"competitorpickupgridview"
:
{
"competitorpickupgridview"
:
{
"title"
:
"竞争对手选择表格视图"
,
"title"
:
"竞争对手选择表格视图"
,
"caption"
:
"竞争对手"
,
"caption"
:
"竞争对手"
,
...
...
app_CRM/src/locale/lanres/codelist/codelist_en_US.ts
浏览文件 @
82172f35
...
@@ -819,6 +819,13 @@ export default {
...
@@ -819,6 +819,13 @@ export default {
"LINK"
:
"链接"
,
"LINK"
:
"链接"
,
"empty"
:
""
"empty"
:
""
},
},
Invoice__StateCode
:
{
"3"
:
"已取消"
,
"2"
:
"已支付"
,
"1"
:
"已结束(已弃用)"
,
"0"
:
"有效"
,
"empty"
:
""
},
Invoice__PaymentTermsCode
:
{
Invoice__PaymentTermsCode
:
{
"2"
:
"2/10 N30"
,
"2"
:
"2/10 N30"
,
"1"
:
"N30"
,
"1"
:
"N30"
,
...
...
app_CRM/src/locale/lanres/codelist/codelist_zh_CN.ts
浏览文件 @
82172f35
...
@@ -819,6 +819,13 @@ export default {
...
@@ -819,6 +819,13 @@ export default {
"LINK"
:
"链接"
,
"LINK"
:
"链接"
,
"empty"
:
""
,
"empty"
:
""
,
},
},
Invoice__StateCode
:
{
"3"
:
"已取消"
,
"2"
:
"已支付"
,
"1"
:
"已结束(已弃用)"
,
"0"
:
"有效"
,
"empty"
:
""
,
},
Invoice__PaymentTermsCode
:
{
Invoice__PaymentTermsCode
:
{
"2"
:
"2/10 N30"
,
"2"
:
"2/10 N30"
,
"1"
:
"N30"
,
"1"
:
"N30"
,
...
...
app_CRM/src/locale/lanres/entities/invoice/invoice_en_US.ts
浏览文件 @
82172f35
...
@@ -111,6 +111,10 @@ export default {
...
@@ -111,6 +111,10 @@ export default {
caption
:
"发票"
,
caption
:
"发票"
,
title
:
"发票信息"
,
title
:
"发票信息"
,
},
},
edit_datapanelview
:
{
caption
:
"发票"
,
title
:
"头部信息编辑"
,
},
paidgridview
:
{
paidgridview
:
{
caption
:
"发票"
,
caption
:
"发票"
,
title
:
"发票信息"
,
title
:
"发票信息"
,
...
@@ -226,6 +230,26 @@ export default {
...
@@ -226,6 +230,26 @@ export default {
uiactions
:
{
uiactions
:
{
},
},
},
},
edit_datapanel_form
:
{
details
:
{
group1
:
"发票基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"发票"
,
srfmajortext
:
"发票名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
totalamount
:
"总金额"
,
statecode
:
"状态"
,
ownername
:
"负责人"
,
invoiceid
:
"发票"
,
},
uiactions
:
{
},
},
main_grid
:
{
main_grid
:
{
columns
:
{
columns
:
{
invoicename
:
"发票名称"
,
invoicename
:
"发票名称"
,
...
...
app_CRM/src/locale/lanres/entities/invoice/invoice_zh_CN.ts
浏览文件 @
82172f35
...
@@ -110,6 +110,10 @@ export default {
...
@@ -110,6 +110,10 @@ export default {
caption
:
"发票"
,
caption
:
"发票"
,
title
:
"发票信息"
,
title
:
"发票信息"
,
},
},
edit_datapanelview
:
{
caption
:
"发票"
,
title
:
"头部信息编辑"
,
},
paidgridview
:
{
paidgridview
:
{
caption
:
"发票"
,
caption
:
"发票"
,
title
:
"发票信息"
,
title
:
"发票信息"
,
...
@@ -225,6 +229,26 @@ export default {
...
@@ -225,6 +229,26 @@ export default {
uiactions
:
{
uiactions
:
{
},
},
},
},
edit_datapanel_form
:
{
details
:
{
group1
:
"发票基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"发票"
,
srfmajortext
:
"发票名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
totalamount
:
"总金额"
,
statecode
:
"状态"
,
ownername
:
"负责人"
,
invoiceid
:
"发票"
,
},
uiactions
:
{
},
},
main_grid
:
{
main_grid
:
{
columns
:
{
columns
:
{
invoicename
:
"发票名称"
,
invoicename
:
"发票名称"
,
...
...
app_CRM/src/mock/codelist/codelist.ts
浏览文件 @
82172f35
...
@@ -6395,6 +6395,53 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
...
@@ -6395,6 +6395,53 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
},
]
]
},
},
{
srfkey
:
"Invoice__StateCode"
,
emptytext
:
"未定义"
,
"codelisttype"
:
"static"
,
items
:
[
{
id
:
"3"
,
label
:
"已取消"
,
text
:
"已取消"
,
"data"
:
""
,
"codename"
:
"Item_3"
,
value
:
"3"
,
disabled
:
false
,
},
{
id
:
"2"
,
label
:
"已支付"
,
text
:
"已支付"
,
"data"
:
""
,
"codename"
:
"Item_2"
,
value
:
"2"
,
disabled
:
false
,
},
{
id
:
"1"
,
label
:
"已结束(已弃用)"
,
text
:
"已结束(已弃用)"
,
"data"
:
""
,
"codename"
:
"Item_1"
,
value
:
"1"
,
disabled
:
false
,
},
{
id
:
"0"
,
label
:
"有效"
,
text
:
"有效"
,
"data"
:
""
,
"codename"
:
"Item_0"
,
value
:
"0"
,
disabled
:
false
,
},
]
},
{
{
srfkey
:
"Invoice__PaymentTermsCode"
,
srfkey
:
"Invoice__PaymentTermsCode"
,
emptytext
:
"未定义"
,
emptytext
:
"未定义"
,
...
...
app_CRM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
82172f35
...
@@ -655,6 +655,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
...
@@ -655,6 +655,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"LetterEditView"
,
"viewname"
:
"LetterEditView"
,
"viewtag"
:
"3d538df4ca389d372347f7b53d67269f"
"viewtag"
:
"3d538df4ca389d372347f7b53d67269f"
},
},
"invoiceedit_datapanelview"
:
{
"title"
:
"头部信息编辑"
,
"caption"
:
"发票"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Finance"
,
"viewname"
:
"InvoiceEdit_DataPanelView"
,
"viewtag"
:
"3dce5b12278b797f02c77e6dad5f6b17"
},
"competitorpickupgridview"
:
{
"competitorpickupgridview"
:
{
"title"
:
"竞争对手选择表格视图"
,
"title"
:
"竞争对手选择表格视图"
,
"caption"
:
"竞争对手"
,
"caption"
:
"竞争对手"
,
...
...
app_CRM/src/service/account/account-service-base.ts
浏览文件 @
82172f35
...
@@ -80,21 +80,6 @@ export default class AccountServiceBase extends EntityService {
...
@@ -80,21 +80,6 @@ export default class AccountServiceBase extends EntityService {
}
}
}
}
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
listaccountsData
:
any
=
[];
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
@@ -125,6 +110,21 @@ export default class AccountServiceBase extends EntityService {
...
@@ -125,6 +110,21 @@ export default class AccountServiceBase extends EntityService {
}
}
}
}
masterData
.
contacts
=
contactsData
;
masterData
.
contacts
=
contactsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -135,9 +135,9 @@ export default class AccountServiceBase extends EntityService {
...
@@ -135,9 +135,9 @@ export default class AccountServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -167,21 +167,6 @@ export default class AccountServiceBase extends EntityService {
...
@@ -167,21 +167,6 @@ export default class AccountServiceBase extends EntityService {
}
}
}
}
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
listaccountsData
:
any
=
[];
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
@@ -212,12 +197,27 @@ export default class AccountServiceBase extends EntityService {
...
@@ -212,12 +197,27 @@ export default class AccountServiceBase extends EntityService {
}
}
}
}
masterData
.
contacts
=
contactsData
;
masterData
.
contacts
=
contactsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -246,9 +246,9 @@ export default class AccountServiceBase extends EntityService {
...
@@ -246,9 +246,9 @@ export default class AccountServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -265,9 +265,9 @@ export default class AccountServiceBase extends EntityService {
...
@@ -265,9 +265,9 @@ export default class AccountServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/getdraft`
,
isloading
);
res
.
data
.
account
=
data
.
account
;
res
.
data
.
account
=
data
.
account
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
@@ -353,21 +353,6 @@ export default class AccountServiceBase extends EntityService {
...
@@ -353,21 +353,6 @@ export default class AccountServiceBase extends EntityService {
}
}
}
}
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
listaccountsData
:
any
=
[];
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
@@ -398,12 +383,27 @@ export default class AccountServiceBase extends EntityService {
...
@@ -398,12 +383,27 @@ export default class AccountServiceBase extends EntityService {
}
}
}
}
masterData
.
contacts
=
contactsData
;
masterData
.
contacts
=
contactsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
82172f35
...
@@ -62,21 +62,6 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -62,21 +62,6 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlistsData
.
length
>
0
){
campaignlistsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
campaigncampaignsData
:
any
=
[];
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
...
@@ -107,6 +92,21 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -107,6 +92,21 @@ export default class CampaignServiceBase extends EntityService {
}
}
}
}
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlistsData
.
length
>
0
){
campaignlistsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaignlists
=
campaignlistsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -116,9 +116,9 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -116,9 +116,9 @@ export default class CampaignServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
return
res
;
}
}
...
@@ -133,21 +133,6 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -133,21 +133,6 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlistsData
.
length
>
0
){
campaignlistsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
campaigncampaignsData
:
any
=
[];
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
...
@@ -178,11 +163,26 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -178,11 +163,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
}
}
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlistsData
.
length
>
0
){
campaignlistsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaignlists
=
campaignlistsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
return
res
;
}
}
...
@@ -210,9 +210,9 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -210,9 +210,9 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
return
res
;
}
}
...
@@ -228,9 +228,9 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -228,9 +228,9 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
return
res
;
}
}
...
@@ -258,21 +258,6 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -258,21 +258,6 @@ export default class CampaignServiceBase extends EntityService {
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlistsData
.
length
>
0
){
campaignlistsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
campaigncampaignsData
:
any
=
[];
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
...
@@ -303,11 +288,26 @@ export default class CampaignServiceBase extends EntityService {
...
@@ -303,11 +288,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
}
}
masterData
.
leads
=
leadsData
;
masterData
.
leads
=
leadsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlistsData
.
length
>
0
){
campaignlistsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaignlists
=
campaignlistsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
82172f35
...
@@ -68,21 +68,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -68,21 +68,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -98,21 +98,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -98,21 +98,21 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -122,27 +122,27 @@ export default class ContactServiceBase extends EntityService {
...
@@ -122,27 +122,27 @@ export default class ContactServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_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
+
'_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
;
return
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -158,21 +158,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -158,21 +158,21 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -182,9 +182,9 @@ export default class ContactServiceBase extends EntityService {
...
@@ -182,9 +182,9 @@ export default class ContactServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_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
+
'_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
;
return
res
;
}
}
...
@@ -200,21 +200,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -200,21 +200,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -230,44 +230,44 @@ export default class ContactServiceBase extends EntityService {
...
@@ -230,44 +230,44 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -283,26 +283,26 @@ export default class ContactServiceBase extends EntityService {
...
@@ -283,26 +283,26 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
...
@@ -334,15 +334,15 @@ export default class ContactServiceBase extends EntityService {
...
@@ -334,15 +334,15 @@ export default class ContactServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
...
@@ -359,16 +359,16 @@ export default class ContactServiceBase extends EntityService {
...
@@ -359,16 +359,16 @@ export default class ContactServiceBase extends EntityService {
if
(
context
.
account
&&
true
){
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
...
@@ -399,21 +399,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -399,21 +399,21 @@ export default class ContactServiceBase extends EntityService {
public
async
AddList
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
AddList
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -429,26 +429,26 @@ export default class ContactServiceBase extends EntityService {
...
@@ -429,26 +429,26 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
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
+
'_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
res
;
}
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
...
@@ -466,21 +466,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -466,21 +466,21 @@ export default class ContactServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -496,26 +496,26 @@ export default class ContactServiceBase extends EntityService {
...
@@ -496,26 +496,26 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
...
@@ -548,21 +548,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -548,21 +548,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -578,44 +578,44 @@ export default class ContactServiceBase extends EntityService {
...
@@ -578,44 +578,44 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -631,26 +631,26 @@ export default class ContactServiceBase extends EntityService {
...
@@ -631,26 +631,26 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
...
@@ -666,21 +666,21 @@ export default class ContactServiceBase extends EntityService {
...
@@ -666,21 +666,21 @@ export default class ContactServiceBase extends EntityService {
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunitie
sData
:
any
=
[];
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunity
id
=
null
;
item
.
lead
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
opportunities
=
opportunitie
sData
;
masterData
.
leads
=
lead
sData
;
let
listcontactsData
:
any
=
[];
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
...
@@ -696,26 +696,26 @@ export default class ContactServiceBase extends EntityService {
...
@@ -696,26 +696,26 @@ export default class ContactServiceBase extends EntityService {
}
}
}
}
masterData
.
listcontacts
=
listcontactsData
;
masterData
.
listcontacts
=
listcontactsData
;
let
lead
sData
:
any
=
[];
let
opportunitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitie
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitie
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitie
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
opportunitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
opportunity
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
opportunities
=
opportunitie
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
+
'_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
res
;
}
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
...
...
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
82172f35
...
@@ -62,6 +62,21 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -62,6 +62,21 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
campaignlistsData
:
any
=
[];
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
@@ -107,21 +122,6 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -107,21 +122,6 @@ export default class IBizListServiceBase extends EntityService {
}
}
}
}
masterData
.
listleads
=
listleadsData
;
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
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -149,6 +149,21 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -149,6 +149,21 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
campaignlistsData
:
any
=
[];
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
@@ -194,27 +209,12 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -194,27 +209,12 @@ export default class IBizListServiceBase extends EntityService {
}
}
}
}
masterData
.
listleads
=
listleadsData
;
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
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
res
.
data
.
ibizlist
=
data
.
ibizlist
;
res
.
data
.
ibizlist
=
data
.
ibizlist
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
@@ -292,6 +292,21 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -292,6 +292,21 @@ export default class IBizListServiceBase extends EntityService {
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
campaignlistsData
:
any
=
[];
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
@@ -337,27 +352,12 @@ export default class IBizListServiceBase extends EntityService {
...
@@ -337,27 +352,12 @@ export default class IBizListServiceBase extends EntityService {
}
}
}
}
masterData
.
listleads
=
listleadsData
;
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
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
82172f35
...
@@ -74,21 +74,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -74,21 +74,6 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -119,22 +104,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -119,22 +104,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -150,6 +119,22 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -150,6 +119,22 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -180,22 +165,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -180,22 +165,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -211,6 +180,22 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -211,6 +180,22 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -241,21 +226,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -241,21 +226,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -271,6 +241,21 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -271,6 +241,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -301,6 +286,21 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -301,6 +286,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -310,9 +310,9 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -310,9 +310,9 @@ export default class OpportunityServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
...
@@ -328,21 +328,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -328,21 +328,6 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -373,15 +358,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -373,15 +358,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -397,6 +373,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -397,6 +373,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -427,15 +412,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -427,15 +412,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -451,6 +427,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -451,6 +427,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -481,14 +466,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -481,14 +466,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -504,6 +481,14 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -504,6 +481,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -534,11 +519,26 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -534,11 +519,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
...
@@ -576,29 +576,29 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -576,29 +576,29 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
if
(
context
.
account
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
...
@@ -615,32 +615,32 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -615,32 +615,32 @@ export default class OpportunityServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
true
){
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
true
){
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
if
(
context
.
account
&&
true
){
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
...
@@ -656,21 +656,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -656,21 +656,6 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -701,15 +686,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -701,15 +686,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -725,6 +701,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -725,6 +701,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -755,15 +740,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -755,15 +740,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -779,6 +755,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -779,6 +755,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -809,11 +794,26 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -809,11 +794,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
...
@@ -831,21 +831,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -831,21 +831,6 @@ export default class OpportunityServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -876,15 +861,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -876,15 +861,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -900,6 +876,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -900,6 +876,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -930,15 +915,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -930,15 +915,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -954,6 +930,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -954,6 +930,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -984,11 +969,26 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -984,11 +969,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
...
@@ -1021,21 +1021,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1021,21 +1021,6 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -1066,15 +1051,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1066,15 +1051,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -1090,6 +1066,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1090,6 +1066,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -1120,15 +1105,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1120,15 +1105,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -1144,6 +1120,15 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1144,6 +1120,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -1174,14 +1159,6 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1174,14 +1159,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
@@ -1197,6 +1174,14 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1197,6 +1174,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
@@ -1227,11 +1212,26 @@ export default class OpportunityServiceBase extends EntityService {
...
@@ -1227,11 +1212,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
82172f35
...
@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService {
...
@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
if
(
productassociationsData
&&
productassociationsData
.
length
&&
productassociationsData
.
length
>
0
){
productassociationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productassociationid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productassociations
=
productassociationsData
;
let
productsubstitutesData
:
any
=
[];
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService {
...
@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService {
}
}
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
if
(
productassociationsData
&&
productassociationsData
.
length
&&
productassociationsData
.
length
>
0
){
productassociationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productassociationid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productassociations
=
productassociationsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
...
@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
return
res
;
}
}
...
@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService {
...
@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
if
(
productassociationsData
&&
productassociationsData
.
length
&&
productassociationsData
.
length
>
0
){
productassociationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productassociationid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productassociations
=
productassociationsData
;
let
productsubstitutesData
:
any
=
[];
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService {
...
@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService {
}
}
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
if
(
productassociationsData
&&
productassociationsData
.
length
&&
productassociationsData
.
length
>
0
){
productassociationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productassociationid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productassociations
=
productassociationsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/products/
${
context
.
product
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/products/
${
context
.
product
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
return
res
;
}
}
...
@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
...
@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
return
res
;
}
}
...
@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
...
@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
res
.
data
.
product
=
data
.
product
;
res
.
data
.
product
=
data
.
product
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
return
res
;
}
}
...
@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService {
...
@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService {
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
if
(
productassociationsData
&&
productassociationsData
.
length
&&
productassociationsData
.
length
>
0
){
productassociationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productassociationid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productassociations
=
productassociationsData
;
let
productsubstitutesData
:
any
=
[];
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService {
...
@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService {
}
}
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productassociationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
),
'undefined'
)){
productassociationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociations'
)
as
any
);
if
(
productassociationsData
&&
productassociationsData
.
length
&&
productassociationsData
.
length
>
0
){
productassociationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productassociationid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productassociations
=
productassociationsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products/
${
context
.
product
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products/
${
context
.
product
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
82172f35
...
@@ -77,36 +77,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -77,36 +77,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
salesliteratureitem
sData
:
any
=
[];
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
let
competitorsalesliterature
sData
:
any
=
[];
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -117,8 +117,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -117,8 +117,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
return
res
;
}
}
...
@@ -148,41 +148,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -148,41 +148,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
salesliteratureitem
sData
:
any
=
[];
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
let
competitorsalesliterature
sData
:
any
=
[];
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
return
res
;
}
}
...
@@ -211,8 +211,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -211,8 +211,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
return
res
;
}
}
...
@@ -229,8 +229,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -229,8 +229,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
res
.
data
.
salesliterature
=
data
.
salesliterature
;
res
.
data
.
salesliterature
=
data
.
salesliterature
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
return
res
;
}
}
...
@@ -273,41 +273,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
...
@@ -273,41 +273,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
salesliteratureitem
sData
:
any
=
[];
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
let
competitorsalesliterature
sData
:
any
=
[];
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
}
delete
item
.
srffrontuf
;
delete
item
.
srffrontuf
;
}
}
});
});
}
}
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/service/sales-order/sales-order-service-base.ts
浏览文件 @
82172f35
...
@@ -80,21 +80,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -80,21 +80,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -110,21 +95,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -110,21 +95,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -140,6 +110,21 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -140,6 +110,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -155,21 +140,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -155,21 +140,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -185,6 +155,21 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -185,6 +155,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -200,21 +185,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -200,21 +185,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -230,6 +200,21 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -230,6 +200,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -245,21 +230,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -245,21 +230,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -275,6 +245,21 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -275,6 +245,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -290,20 +275,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -290,20 +275,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -319,6 +290,20 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -319,6 +290,20 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -334,6 +319,21 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -334,6 +319,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
...
@@ -343,8 +343,8 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -343,8 +343,8 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesorders`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
...
@@ -360,21 +360,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -360,21 +360,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -390,14 +375,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -390,14 +375,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -413,6 +390,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -413,6 +390,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -428,14 +413,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -428,14 +413,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -451,6 +428,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -451,6 +428,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -466,14 +451,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -466,14 +451,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -489,6 +466,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -489,6 +466,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -504,14 +489,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -504,14 +489,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -527,6 +504,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -527,6 +504,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -542,13 +527,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -542,13 +527,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -564,6 +542,13 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -564,6 +542,13 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -579,10 +564,25 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -579,10 +564,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
...
@@ -626,37 +626,37 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -626,37 +626,37 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
...
@@ -673,42 +673,42 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -673,42 +673,42 @@ export default class SalesOrderServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
opportunity
&&
context
.
quote
&&
true
){
if
(
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
if
(
context
.
quote
&&
true
){
if
(
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesorders/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
...
@@ -739,21 +739,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -739,21 +739,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -769,14 +754,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -769,14 +754,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -792,6 +769,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -792,6 +769,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -807,14 +792,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -807,14 +792,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -830,6 +807,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -830,6 +807,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -845,14 +830,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -845,14 +830,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -868,6 +845,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -868,6 +845,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -883,14 +868,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -883,14 +868,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -906,6 +883,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -906,6 +883,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -921,10 +906,25 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -921,10 +906,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
return
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
...
@@ -957,21 +957,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -957,21 +957,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
GenInvoice
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GenInvoice
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -987,14 +972,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -987,14 +972,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1010,6 +987,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1010,6 +987,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1025,14 +1010,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1025,14 +1010,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1048,6 +1025,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1048,6 +1025,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1063,14 +1048,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1063,14 +1048,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1086,6 +1063,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1086,6 +1063,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1101,14 +1086,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1101,14 +1086,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1124,6 +1101,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1124,6 +1101,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1139,10 +1124,25 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1139,10 +1124,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
return
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
...
@@ -1160,21 +1160,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1160,21 +1160,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1190,14 +1175,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1190,14 +1175,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1213,6 +1190,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1213,6 +1190,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1228,14 +1213,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1228,14 +1213,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1251,6 +1228,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1251,6 +1228,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1266,14 +1251,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1266,14 +1251,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1289,6 +1266,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1289,6 +1266,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1304,14 +1289,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1304,14 +1289,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1327,6 +1304,14 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1327,6 +1304,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1342,13 +1327,6 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1342,13 +1327,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
@@ -1364,6 +1342,13 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1364,6 +1342,13 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
invoices
=
invoicesData
;
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
@@ -1379,10 +1364,25 @@ export default class SalesOrderServiceBase extends EntityService {
...
@@ -1379,10 +1364,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
if
(
invoicesData
&&
invoicesData
.
length
&&
invoicesData
.
length
>
0
){
invoicesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
invoiceid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
return
res
;
}
}
...
...
app_CRM/src/uiservice/invoice/invoice-ui-service-base.ts
浏览文件 @
82172f35
...
@@ -83,6 +83,7 @@ export default class InvoiceUIServiceBase extends UIService {
...
@@ -83,6 +83,7 @@ export default class InvoiceUIServiceBase extends UIService {
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'statetabview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'statetabview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'quickcreateview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'quickcreateview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'byparentkey'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'byparentkey'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'edit_datapanelview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'paidgridview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'paidgridview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'cancelgridview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'cancelgridview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'summaryview'
,
srfappde
:
'invoices'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'summaryview'
,
srfappde
:
'invoices'
});
...
...
app_CRM/src/widgets/account/info-all-form/info-all-form-base.tsx
浏览文件 @
82172f35
...
@@ -211,7 +211,7 @@ export class Info_AllEditFormBase extends EditFormControlBase {
...
@@ -211,7 +211,7 @@ export class Info_AllEditFormBase extends EditFormControlBase {
* @memberof Info_AllEditFormBase
* @memberof Info_AllEditFormBase
*/
*/
public
detailsModel
:
any
=
{
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'账户信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
2
,
anchorPoints
:
[
'
sic
'
,
'tickersymbol'
,
'ownershipcode'
,
],
controlledItems
:
[
group1
:
new
FormGroupPanelModel
({
caption
:
'账户信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
2
,
anchorPoints
:
[
'
telephone1'
,
'sic'
,
'fax'
,
'websiteurl
'
,
'tickersymbol'
,
'ownershipcode'
,
],
controlledItems
:
[
'sic'
,
'sic'
,
'fax'
,
'fax'
,
'websiteurl'
,
'websiteurl'
,
...
...
app_CRM/src/widgets/contact/date-panel-form/date-panel-form.html
浏览文件 @
82172f35
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<div
v-show=
"detailsModel.button1.visible"
:style=
"{}"
>
<div
v-show=
"detailsModel.button1.visible"
:style=
"{}"
>
<i-button
type=
"primary"
@
click=
"button1_click($event)"
<i-button
type=
"primary"
@
click=
"button1_click($event)"
style=
""
>
style=
""
>
<i
class=
"fa fa-angle-down"
style=
"margin-right: 2px;"
></i>
</i-button>
</i-button>
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
82172f35
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-6
09
-1"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-6
11
-1"
>
<createTable
tableName=
"ACCOUNT"
>
<createTable
tableName=
"ACCOUNT"
>
<column
name=
"ADDRESS1_PRIMARYCONTACTNAME"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ADDRESS1_PRIMARYCONTACTNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
</column>
...
@@ -2757,7 +2757,7 @@
...
@@ -2757,7 +2757,7 @@
<!--输出实体[CONTACT]数据结构 -->
<!--输出实体[CONTACT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-34
7
-38"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-34
8
-38"
>
<createTable
tableName=
"CONTACT"
>
<createTable
tableName=
"CONTACT"
>
<column
name=
"ADDRESS1_FREIGHTTERMSCODE"
remarks=
""
type=
"VARCHAR(30)"
>
<column
name=
"ADDRESS1_FREIGHTTERMSCODE"
remarks=
""
type=
"VARCHAR(30)"
>
</column>
</column>
...
@@ -5157,7 +5157,7 @@
...
@@ -5157,7 +5157,7 @@
<!--输出实体[INVOICE]数据结构 -->
<!--输出实体[INVOICE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-invoice-
88
-63"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-invoice-
96
-63"
>
<createTable
tableName=
"INVOICE"
>
<createTable
tableName=
"INVOICE"
>
<column
name=
"BILLTO_LINE1"
remarks=
""
type=
"VARCHAR(250)"
>
<column
name=
"BILLTO_LINE1"
remarks=
""
type=
"VARCHAR(250)"
>
</column>
</column>
...
@@ -5805,7 +5805,7 @@
...
@@ -5805,7 +5805,7 @@
<!--输出实体[LEAD]数据结构 -->
<!--输出实体[LEAD]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-lead-2
27
-70"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-lead-2
30
-70"
>
<createTable
tableName=
"LEAD"
>
<createTable
tableName=
"LEAD"
>
<column
name=
"ADDRESS1_FAX"
remarks=
""
type=
"VARCHAR(50)"
>
<column
name=
"ADDRESS1_FAX"
remarks=
""
type=
"VARCHAR(50)"
>
</column>
</column>
...
@@ -10987,31 +10987,31 @@
...
@@ -10987,31 +10987,31 @@
</changeSet>
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-135"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-135"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__ACCOUNT__PARENT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-136"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-136"
>
<addForeignKeyConstraint
baseColumnNames=
"PRIMARYCONTACTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__CONTACT__PRIMAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-137"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-137"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-138"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-138"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-139"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-139"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-140"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-140"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-141"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-141"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-142"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-142"
>
<addForeignKeyConstraint
baseColumnNames=
"TERRITORYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TERRITORY__TERR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TERRITORYID"
referencedTableName=
"TERRITORY"
validate=
"true"
/>
<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>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
09
-143"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-6
11
-143"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
...
@@ -11186,25 +11186,25 @@
...
@@ -11186,25 +11186,25 @@
<addForeignKeyConstraint
baseColumnNames=
"BUSINESSUNITID"
baseTableName=
"CONSTRAINTBASEDGROUP"
constraintName=
"DER1N_CONSTRAINTBASEDGROUP__BU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"BUSINESSUNITID"
referencedTableName=
"BUSINESSUNIT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"BUSINESSUNITID"
baseTableName=
"CONSTRAINTBASEDGROUP"
constraintName=
"DER1N_CONSTRAINTBASEDGROUP__BU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"BUSINESSUNITID"
referencedTableName=
"BUSINESSUNIT"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[CONTACT]外键关系 -->
<!--输出实体[CONTACT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
7
-199"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
8
-199"
>
<addForeignKeyConstraint
baseColumnNames=
"CUSTOMERID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT_ACCOUNT_CUSTOMER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"CUSTOMERID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT_ACCOUNT_CUSTOMER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
7
-200"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
8
-200"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
7
-201"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
8
-201"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
7
-202"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
8
-202"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
7
-203"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
8
-203"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
7
-204"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
8
-204"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
7
-205"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-34
8
-205"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[CONTRACT]外键关系 -->
<!--输出实体[CONTRACT]外键关系 -->
...
@@ -11418,19 +11418,19 @@
...
@@ -11418,19 +11418,19 @@
<addForeignKeyConstraint
baseColumnNames=
"UOMID"
baseTableName=
"T_INVENTORY"
constraintName=
"DER1N_INVENTORY_UOM_UOMID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"UOMID"
baseTableName=
"T_INVENTORY"
constraintName=
"DER1N_INVENTORY_UOM_UOMID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[INVOICE]外键关系 -->
<!--输出实体[INVOICE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
88
-280"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
96
-280"
>
<addForeignKeyConstraint
baseColumnNames=
"OPPORTUNITYID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__OPPORTUNITY__OP"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"OPPORTUNITYID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__OPPORTUNITY__OP"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
88
-281"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
96
-281"
>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__PRICELEVEL__PRI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__PRICELEVEL__PRI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
88
-282"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
96
-282"
>
<addForeignKeyConstraint
baseColumnNames=
"SALESORDERID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__SALESORDER__SAL"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SALESORDERID"
referencedTableName=
"SALESORDER"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SALESORDERID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__SALESORDER__SAL"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SALESORDERID"
referencedTableName=
"SALESORDER"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
88
-283"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
96
-283"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
88
-284"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-
96
-284"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[INVOICEDETAIL]外键关系 -->
<!--输出实体[INVOICEDETAIL]外键关系 -->
...
@@ -11479,28 +11479,28 @@
...
@@ -11479,28 +11479,28 @@
</changeSet>
</changeSet>
<!--输出实体[LANGUAGELOCALE]外键关系 -->
<!--输出实体[LANGUAGELOCALE]外键关系 -->
<!--输出实体[LEAD]外键关系 -->
<!--输出实体[LEAD]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-301"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-301"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__ACCOUNT__PARENTACC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__ACCOUNT__PARENTACC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-302"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-302"
>
<addForeignKeyConstraint
baseColumnNames=
"RELATEDOBJECTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGNRESPONSE__"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACTIVITYID"
referencedTableName=
"CAMPAIGNRESPONSE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"RELATEDOBJECTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGNRESPONSE__"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACTIVITYID"
referencedTableName=
"CAMPAIGNRESPONSE"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-303"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-303"
>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGN__CAMPAIGN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGN__CAMPAIGN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-304"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-304"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTCONTACTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CONTACT__PARENTCON"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PARENTCONTACTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CONTACT__PARENTCON"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-305"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-305"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGCASEID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__INCIDENT__ORIGINAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"INCIDENTID"
referencedTableName=
"INCIDENT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGCASEID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__INCIDENT__ORIGINAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"INCIDENTID"
referencedTableName=
"INCIDENT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-306"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-306"
>
<addForeignKeyConstraint
baseColumnNames=
"QUALIFYINGOPPORTUNITYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__OPPORTUNITY__QUALI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"QUALIFYINGOPPORTUNITYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__OPPORTUNITY__QUALI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-307"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-307"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
27
-308"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-2
30
-308"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__TRANSACTIONCURRENC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__TRANSACTIONCURRENC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[LEADADDRESS]外键关系 -->
<!--输出实体[LEADADDRESS]外键关系 -->
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录