Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
22ff451d
提交
22ff451d
编写于
7月 01, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_gzf 发布系统代码
上级
0de5c374
变更
22
显示空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
542 行增加
和
565 行删除
+542
-565
product_en_US.ts
app_CRM/src/locale/lanres/entities/product/product_en_US.ts
+0
-2
product_zh_CN.ts
app_CRM/src/locale/lanres/entities/product/product_zh_CN.ts
+0
-2
invoice-info-invoice-view.html
.../invoice-info-invoice-view/invoice-info-invoice-view.html
+1
-1
product-info-pro-info-base.tsx
...duct/product-info-pro-info/product-info-pro-info-base.tsx
+0
-11
product-info-pro-info.html
.../product/product-info-pro-info/product-info-pro-info.html
+1
-3
competitor-info-abstract.html
...es/competitor-info-abstract/competitor-info-abstract.html
+1
-1
quote-info-abstract.html
.../pages/sales/quote-info-abstract/quote-info-abstract.html
+1
-1
sales-literature-info-sal-lit-view.html
...info-sal-lit-view/sales-literature-info-sal-lit-view.html
+1
-1
account-service-base.ts
app_CRM/src/service/account/account-service-base.ts
+47
-47
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+50
-50
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
+252
-252
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+47
-47
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+46
-46
abstract-info-form-base.tsx
...competitor/abstract-info-form/abstract-info-form-base.tsx
+1
-1
abstract-info-form.html
...ets/competitor/abstract-info-form/abstract-info-form.html
+1
-1
view-comp-abstract-portlet.html
...iew-comp-abstract-portlet/view-comp-abstract-portlet.html
+1
-7
info-form.html
app_CRM/src/widgets/invoice/info-form/info-form.html
+5
-5
pro-info-form.html
app_CRM/src/widgets/product/pro-info-form/pro-info-form.html
+2
-2
abstract-info-form.html
.../widgets/quote/abstract-info-form/abstract-info-form.html
+2
-2
info-form.html
...CRM/src/widgets/sales-literature/info-form/info-form.html
+2
-2
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+31
-31
未找到文件。
app_CRM/src/locale/lanres/entities/product/product_en_US.ts
浏览文件 @
22ff451d
...
...
@@ -186,8 +186,6 @@ export default {
uiactions
:
{
},
},
info_proinfotoolbar_toolbar
:
{
},
infoviewtoolbar_toolbar
:
{
deuiaction4
:
{
caption
:
"Edit"
,
...
...
app_CRM/src/locale/lanres/entities/product/product_zh_CN.ts
浏览文件 @
22ff451d
...
...
@@ -185,8 +185,6 @@ export default {
uiactions
:
{
},
},
info_proinfotoolbar_toolbar
:
{
},
infoviewtoolbar_toolbar
:
{
deuiaction4
:
{
caption
:
"编辑"
,
...
...
app_CRM/src/pages/finance/invoice-info-invoice-view/invoice-info-invoice-view.html
浏览文件 @
22ff451d
<studio-view-style2
viewName=
"invoiceinfo_invoiceview"
viewTitle=
"发票编辑视图"
class=
'deeditview invoice-info-invoice-view'
>
<studio-view-style2
viewName=
"invoiceinfo_invoiceview"
viewTitle=
"发票编辑视图"
class=
'deeditview invoice-info-invoice-view
from-dashboard-style
'
>
<view
_form
:viewState=
"viewState"
:viewparams=
"viewparams"
...
...
app_CRM/src/pages/product/product-info-pro-info/product-info-pro-info-base.tsx
浏览文件 @
22ff451d
...
...
@@ -52,20 +52,9 @@ export class ProductInfo_ProInfoBase extends EditViewBase {
* @memberof ProductInfo_ProInfoBase
*/
protected
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_form
:
{
name
:
'form'
,
type
:
'FORM'
},
};
/**
* 工具栏模型
*
* @type {*}
* @memberof ProductInfo_ProInfo
*/
public
toolBarModels
:
any
=
{
};
/**
* 视图唯一标识
...
...
app_CRM/src/pages/product/product-info-pro-info/product-info-pro-info.html
浏览文件 @
22ff451d
<studio-view-style2
viewName=
"productinfo_proinfo"
viewTitle=
"产品编辑视图"
class=
'deeditview product-info-pro-info'
>
<template
slot=
"toolbar"
>
<view-toolbar
mode=
"STYLE2"
:model=
"toolBarModels"
@
item-click=
"toolbar_click($event)"
/>
</template>
<studio-view-style2
viewName=
"productinfo_proinfo"
viewTitle=
"产品编辑视图"
class=
'deeditview product-info-pro-info from-dashboard-style'
>
<view
_form
:viewState=
"viewState"
:viewparams=
"viewparams"
...
...
app_CRM/src/pages/sales/competitor-info-abstract/competitor-info-abstract.html
浏览文件 @
22ff451d
<studio-view-style2
viewName=
"competitorinfo_abstract"
viewTitle=
"竞争对手编辑视图"
class=
'deeditview competitor-info-abstract'
>
<studio-view-style2
viewName=
"competitorinfo_abstract"
viewTitle=
"竞争对手编辑视图"
class=
'deeditview competitor-info-abstract
from-dashboard-style
'
>
<view
_form
:viewState=
"viewState"
:viewparams=
"viewparams"
...
...
app_CRM/src/pages/sales/quote-info-abstract/quote-info-abstract.html
浏览文件 @
22ff451d
<studio-view-style2
viewName=
"quoteinfoabstract"
viewTitle=
"报价单编辑视图"
class=
'deeditview quote-info-abstract'
>
<studio-view-style2
viewName=
"quoteinfoabstract"
viewTitle=
"报价单编辑视图"
class=
'deeditview quote-info-abstract
from-dashboard-style
'
>
<view
_form
:viewState=
"viewState"
:viewparams=
"viewparams"
...
...
app_CRM/src/pages/sales/sales-literature-info-sal-lit-view/sales-literature-info-sal-lit-view.html
浏览文件 @
22ff451d
<studio-view-style2
viewName=
"salesliteratureinfo_sallitview"
viewTitle=
"销售宣传资料编辑视图"
class=
'deeditview sales-literature-info-sal-lit-view'
>
<studio-view-style2
viewName=
"salesliteratureinfo_sallitview"
viewTitle=
"销售宣传资料编辑视图"
class=
'deeditview sales-literature-info-sal-lit-view
from-dashboard-style
'
>
<view
_form
:viewState=
"viewState"
:viewparams=
"viewparams"
...
...
app_CRM/src/service/account/account-service-base.ts
浏览文件 @
22ff451d
...
...
@@ -62,36 +62,36 @@ export default class AccountServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
contac
ts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contac
ts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contac
tsData
.
length
>
0
){
contac
tsData
.
forEach
((
item
:
any
)
=>
{
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
contact
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
contacts
=
contac
tsData
;
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
listaccounts
=
listaccoun
tsData
;
let
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
contac
ts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contac
ts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contac
tsData
.
length
>
0
){
contac
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
contact
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
masterData
.
contacts
=
contac
tsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -101,8 +101,8 @@ export default class AccountServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -117,40 +117,40 @@ export default class AccountServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
contac
ts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contac
ts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contac
tsData
.
length
>
0
){
contac
tsData
.
forEach
((
item
:
any
)
=>
{
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
contact
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
contacts
=
contac
tsData
;
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
listaccounts
=
listaccoun
tsData
;
let
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
contac
ts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contac
ts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contac
tsData
.
length
>
0
){
contac
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
contact
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
masterData
.
contacts
=
contac
tsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -178,8 +178,8 @@ export default class AccountServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -195,8 +195,8 @@ export default class AccountServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/getdraft`
,
isloading
);
res
.
data
.
account
=
data
.
account
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -224,40 +224,40 @@ export default class AccountServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
contac
ts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contac
ts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contac
tsData
.
length
>
0
){
contac
tsData
.
forEach
((
item
:
any
)
=>
{
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
contact
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
contacts
=
contac
tsData
;
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
listaccounts
=
listaccoun
tsData
;
let
contac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
contac
ts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contac
ts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contac
tsData
.
length
>
0
){
contac
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
contact
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
masterData
.
contacts
=
contac
tsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
22ff451d
...
...
@@ -62,21 +62,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -107,6 +92,21 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class CampaignServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -133,21 +133,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -178,11 +163,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -258,21 +258,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -303,11 +288,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
22ff451d
...
...
@@ -62,21 +62,6 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -122,6 +107,21 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
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
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -149,21 +149,6 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -209,12 +194,27 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
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
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
res
.
data
.
ibizlist
=
data
.
ibizlist
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
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
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -292,21 +292,6 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -352,12 +337,27 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listleads
=
listleadsData
;
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontactsData
.
length
>
0
){
listcontactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
22ff451d
...
...
@@ -69,21 +69,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -99,21 +99,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -123,28 +123,28 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -160,21 +160,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -184,27 +184,27 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -220,21 +220,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -244,9 +244,9 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -262,21 +262,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -292,45 +292,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -346,44 +346,44 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -399,26 +399,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -453,22 +453,22 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -485,24 +485,24 @@ export default class OpportunityServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -518,21 +518,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -548,45 +548,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -602,26 +602,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -639,21 +639,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Lose
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -669,45 +669,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -723,26 +723,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
...
...
@@ -760,21 +760,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -790,45 +790,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -844,44 +844,44 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -897,26 +897,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -932,21 +932,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Win
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -962,45 +962,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
opportunityproduct
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
masterData
.
opportunity
products
=
opportunityproduct
sData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1016,26 +1016,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
let
opportunity
product
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
product
s'
),
'undefined'
)){
opportunity
productsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproduct
s'
)
as
any
);
if
(
opportunity
productsData
&&
opportunityproductsData
.
length
&&
opportunityproduct
sData
.
length
>
0
){
opportunity
product
sData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitor
s'
),
'undefined'
)){
opportunity
competitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunity
competitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunity
competitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproduct
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunity
products
=
opportunityproduct
sData
;
masterData
.
opportunity
competitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
...
...
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
22ff451d
...
...
@@ -77,36 +77,36 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productassociations
=
productassociationsData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
substitute
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
substitute
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
substitutes
=
productsubstitute
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -117,8 +117,8 @@ export default class ProductServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
return
res
;
}
...
...
@@ -148,41 +148,41 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productassociations
=
productassociationsData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
substitute
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
substitute
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
substitutes
=
productsubstitute
sData
;
Object
.
assign
(
data
,
masterData
);
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
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
return
res
;
}
...
...
@@ -211,8 +211,8 @@ export default class ProductServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
return
res
;
}
...
...
@@ -229,8 +229,8 @@ export default class ProductServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
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
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
return
res
;
}
...
...
@@ -273,41 +273,41 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productassociations
=
productassociationsData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
substitute
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
substitutes
=
productsubstitute
sData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
product
substitute
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
substitute
s'
),
'undefined'
)){
product
substitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitute
s'
)
as
any
);
if
(
product
substitutesData
&&
productsubstitutesData
.
length
&&
productsubstitute
sData
.
length
>
0
){
product
substitute
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
substitute
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
substitutes
=
productsubstitute
sData
;
Object
.
assign
(
data
,
masterData
);
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
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
return
res
;
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
22ff451d
...
...
@@ -62,11 +62,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -76,7 +76,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -92,11 +92,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
salesliteratureitems
=
salesliteratureitemsData
;
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -106,7 +106,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -133,11 +133,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -147,7 +147,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -163,11 +163,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
salesliteratureitems
=
salesliteratureitemsData
;
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -177,12 +177,12 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
res
.
data
.
salesliterature
=
data
.
salesliterature
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
@@ -258,11 +258,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -272,7 +272,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -288,11 +288,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
salesliteratureitems
=
salesliteratureitemsData
;
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -302,12 +302,12 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
return
res
;
}
...
...
app_CRM/src/widgets/competitor/abstract-info-form/abstract-info-form-base.tsx
浏览文件 @
22ff451d
...
...
@@ -85,7 +85,7 @@ export class AbstractInfoEditFormBase extends EditFormControlBase {
* @memberof AbstractInfoEditFormBase
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'竞争对手基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
fals
e
,
form
:
this
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.competitor.abstractinfo_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
group1
:
new
FormGroupPanelModel
({
caption
:
'竞争对手基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
tru
e
,
form
:
this
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.competitor.abstractinfo_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
formpage1
:
new
FormPageModel
({
caption
:
'基本信息'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
}),
...
...
app_CRM/src/widgets/competitor/abstract-info-form/abstract-info-form.html
浏览文件 @
22ff451d
...
...
@@ -3,7 +3,7 @@
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.competitor.abstractinfo_form.details.group1')"
:isShowCaption=
"
false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.competitor.abstractinfo_form.details.group1')"
:isShowCaption=
"
true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.competitorname.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'competitorname'
:itemRules=
"this.rules.competitorname"
class=
''
:caption=
"$t('entities.competitor.abstractinfo_form.details.competitorname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.competitorname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
app_CRM/src/widgets/competitor/view-comp-abstract-portlet/view-comp-abstract-portlet.html
浏览文件 @
22ff451d
<div
class=
'portlet view-comp-abstract '
:style=
"{}"
>
<p
class=
'portlet-title'
>
<span>
摘要信息
</span>
</p>
<div
class=
"portlet-with-title"
>
<div
class=
"portlet-without-title"
>
<competitor-info-abstract
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></competitor-info-abstract>
</div>
</div>
app_CRM/src/widgets/invoice/info-form/info-form.html
浏览文件 @
22ff451d
...
...
@@ -3,7 +3,7 @@
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.invoicenumber.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'invoicenumber'
:itemRules=
"this.rules.invoicenumber"
class=
''
:caption=
"$t('entities.invoice.info_form.details.invoicenumber')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.invoicenumber.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
@@ -39,7 +39,7 @@
</i-col>
<i-col
v-show=
"detailsModel.grouppanel1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.datedelivered.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'datedelivered'
:itemRules=
"this.rules.datedelivered"
class=
''
:caption=
"$t('entities.invoice.info_form.details.datedelivered')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.datedelivered.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
@@ -82,7 +82,7 @@
</i-col>
<i-col
v-show=
"detailsModel.grouppanel3.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel3.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel3')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel3.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel3')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.totallineitemamount.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'totallineitemamount'
:itemRules=
"this.rules.totallineitemamount"
class=
''
:caption=
"$t('entities.invoice.info_form.details.totallineitemamount')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.totallineitemamount.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
@@ -132,7 +132,7 @@
</i-col>
<i-col
v-show=
"detailsModel.grouppanel2.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel2.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel2')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel2.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel2')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.opportunityname.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'opportunityname'
:itemRules=
"this.rules.opportunityname"
class=
''
:caption=
"$t('entities.invoice.info_form.details.opportunityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.opportunityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
@@ -161,7 +161,7 @@
</i-col>
<i-col
v-show=
"detailsModel.grouppanel4.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel4.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel4')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel4.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.invoice.info_form.details.grouppanel4')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.billto_country.visible"
:style=
"{}"
:md=
"{ span: 121, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'billto_country'
:itemRules=
"this.rules.billto_country"
class=
''
:caption=
"$t('entities.invoice.info_form.details.billto_country')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.billto_country.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
app_CRM/src/widgets/product/pro-info-form/pro-info-form.html
浏览文件 @
22ff451d
...
...
@@ -3,7 +3,7 @@
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.product.proinfo_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.product.proinfo_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.productname.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'productname'
:itemRules=
"this.rules.productname"
class=
''
:caption=
"$t('entities.product.proinfo_form.details.productname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.productname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
@@ -39,7 +39,7 @@
</i-col>
<i-col
v-show=
"detailsModel.grouppanel1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.product.proinfo_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.product.proinfo_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.defaultuomschedulename.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'defaultuomschedulename'
:itemRules=
"this.rules.defaultuomschedulename"
class=
''
:caption=
"$t('entities.product.proinfo_form.details.defaultuomschedulename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.defaultuomschedulename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
app_CRM/src/widgets/quote/abstract-info-form/abstract-info-form.html
浏览文件 @
22ff451d
...
...
@@ -3,7 +3,7 @@
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.quote.abstractinfo_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.quote.abstractinfo_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.quotenumber.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'quotenumber'
:itemRules=
"this.rules.quotenumber"
class=
''
:caption=
"$t('entities.quote.abstractinfo_form.details.quotenumber')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.quotenumber.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
@@ -67,7 +67,7 @@
</i-col>
<i-col
v-show=
"detailsModel.grouppanel1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.quote.abstractinfo_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.quote.abstractinfo_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.paymenttermscode.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'paymenttermscode'
:itemRules=
"this.rules.paymenttermscode"
class=
''
:caption=
"$t('entities.quote.abstractinfo_form.details.paymenttermscode')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.paymenttermscode.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
app_CRM/src/widgets/sales-literature/info-form/info-form.html
浏览文件 @
22ff451d
...
...
@@ -3,7 +3,7 @@
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.salesliterature.info_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.salesliterature.info_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.salesliteraturename.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'salesliteraturename'
:itemRules=
"this.rules.salesliteraturename"
class=
''
:caption=
"$t('entities.salesliterature.info_form.details.salesliteraturename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.salesliteraturename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
...
@@ -39,7 +39,7 @@
</i-col>
<i-col
v-show=
"detailsModel.grouppanel1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.salesliterature.info_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
0
"
:isInfoGroupMode=
"true"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.salesliterature.info_form.details.grouppanel1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"
1
"
:isInfoGroupMode=
"true"
>
<row>
<i-col
v-show=
"detailsModel.druipart1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-druipart
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
22ff451d
...
...
@@ -2438,7 +2438,7 @@
<!--输出实体[INVOICE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-invoice-4
1
-33"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-invoice-4
4
-33"
>
<createTable
tableName=
"INVOICE"
>
<column
name=
"BILLTO_LINE1"
remarks=
""
type=
"VARCHAR(250)"
>
</column>
...
...
@@ -3752,7 +3752,7 @@
<!--输出实体[QUOTE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-quote-4
5
-47"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-quote-4
7
-47"
>
<createTable
tableName=
"QUOTE"
>
<column
name=
"BILLTO_COUNTRY"
remarks=
""
type=
"VARCHAR(80)"
>
</column>
...
...
@@ -6363,7 +6363,7 @@
<!--输出实体[SALESLITERATURE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-salesliterature-3
3
-73"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-salesliterature-3
5
-73"
>
<createTable
tableName=
"SALESLITERATURE"
>
<column
name=
"IMPORTSEQUENCENUMBER"
remarks=
""
type=
"INT"
>
</column>
...
...
@@ -8133,7 +8133,7 @@
<!--输出实体[COMPETITOR]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-competitor-4
1
-90"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-competitor-4
4
-90"
>
<createTable
tableName=
"COMPETITOR"
>
<column
name=
"ENTITYIMAGE"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -8303,7 +8303,7 @@
<!--输出实体[PRODUCT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-product-7
4
-91"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-product-7
6
-91"
>
<createTable
tableName=
"PRODUCT"
>
<column
name=
"VENDORID"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -8582,7 +8582,7 @@
<!--输出实体[SALESORDER]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-salesorder-5
2
-96"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-salesorder-5
3
-96"
>
<createTable
tableName=
"SALESORDER"
>
<column
name=
"ENTITYIMAGE"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -11009,19 +11009,19 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"SLAKPIINSTANCE"
constraintName=
"DER1N_SLAKPIINSTANCE__TRANSACT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[INVOICE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
1
-192"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
4
-192"
>
<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
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
1
-193"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
4
-193"
>
<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
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
1
-194"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
4
-194"
>
<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
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
1
-195"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
4
-195"
>
<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
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
1
-196"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-invoice-4
4
-196"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"INVOICE"
constraintName=
"DER1N_INVOICE__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[TASK]外键关系 -->
...
...
@@ -11134,19 +11134,19 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRICELEVEL"
constraintName=
"DER1N_PRICELEVEL__TRANSACTIONC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[QUOTE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
5
-230"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
7
-230"
>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__CAMPAIGN__CAMPAIG"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
5
-231"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
7
-231"
>
<addForeignKeyConstraint
baseColumnNames=
"OPPORTUNITYID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__OPPORTUNITY__OPPO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
5
-232"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
7
-232"
>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__PRICELEVEL__PRICE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
5
-233"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
7
-233"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
5
-234"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-4
7
-234"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__TRANSACTIONCURREN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[BULKDELETEOPERATION]外键关系 -->
...
...
@@ -11361,10 +11361,10 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"RATINGVALUE"
constraintName=
"DER1N_RATINGVALUE__TRANSACTION"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[SALESLITERATURE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesliterature-3
3
-311"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesliterature-3
5
-311"
>
<addForeignKeyConstraint
baseColumnNames=
"SUBJECTID"
baseTableName=
"SALESLITERATURE"
constraintName=
"DER1N_SALESLITERATURE__SUBJECT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SUBJECTID"
referencedTableName=
"SUBJECT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesliterature-3
3
-312"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesliterature-3
5
-312"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"SALESLITERATURE"
constraintName=
"DER1N_SALESLITERATURE__TRANSAC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[METRIC]外键关系 -->
...
...
@@ -11483,26 +11483,26 @@
<!--输出实体[CAMPAIGNLIST]外键关系 -->
<!--输出实体[LISTCONTACT]外键关系 -->
<!--输出实体[COMPETITOR]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-competitor-4
1
-350"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-competitor-4
4
-350"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"COMPETITOR"
constraintName=
"DER1N_COMPETITOR__TRANSACTIONC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[PRODUCT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
4
-351"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
6
-351"
>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"PRODUCT"
constraintName=
"DER1N_PRODUCT__PRICELEVEL__PRI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
4
-352"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
6
-352"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTPRODUCTID"
baseTableName=
"PRODUCT"
constraintName=
"DER1N_PRODUCT__PRODUCT__PARENT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
4
-353"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
6
-353"
>
<addForeignKeyConstraint
baseColumnNames=
"SUBJECTID"
baseTableName=
"PRODUCT"
constraintName=
"DER1N_PRODUCT__SUBJECT__SUBJEC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SUBJECTID"
referencedTableName=
"SUBJECT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
4
-354"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
6
-354"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRODUCT"
constraintName=
"DER1N_PRODUCT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
4
-355"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
6
-355"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTUOMSCHEDULEID"
baseTableName=
"PRODUCT"
constraintName=
"DER1N_PRODUCT__UOMSCHEDULE__DE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMSCHEDULEID"
referencedTableName=
"UOMSCHEDULE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
4
-356"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-7
6
-356"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTUOMID"
baseTableName=
"PRODUCT"
constraintName=
"DER1N_PRODUCT__UOM__DEFAULTUOM"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
</changeSet>
<!--输出实体[CHARACTERISTIC]外键关系 -->
...
...
@@ -11522,22 +11522,22 @@
<addForeignKeyConstraint
baseColumnNames=
"RESOURCECATEGORY"
baseTableName=
"BOOKABLERESCATEGORYASSN"
constraintName=
"DER1N_BOOKABLERESCATEGORYASSN_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"BOOKABLERESCATEGORYID"
referencedTableName=
"BOOKABLERESCATEGORY"
validate=
"true"
/>
</changeSet>
<!--输出实体[SALESORDER]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
2
-364"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
3
-364"
>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"SALESORDER"
constraintName=
"DER1N_SALESORDER__CAMPAIGN__CA"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
2
-365"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
3
-365"
>
<addForeignKeyConstraint
baseColumnNames=
"OPPORTUNITYID"
baseTableName=
"SALESORDER"
constraintName=
"DER1N_SALESORDER__OPPORTUNITY_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
2
-366"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
3
-366"
>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"SALESORDER"
constraintName=
"DER1N_SALESORDER__PRICELEVEL__"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
2
-367"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
3
-367"
>
<addForeignKeyConstraint
baseColumnNames=
"QUOTEID"
baseTableName=
"SALESORDER"
constraintName=
"DER1N_SALESORDER__QUOTE__QUOTE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"QUOTEID"
referencedTableName=
"QUOTE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
2
-368"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
3
-368"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"SALESORDER"
constraintName=
"DER1N_SALESORDER__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
2
-369"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-5
3
-369"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"SALESORDER"
constraintName=
"DER1N_SALESORDER__TRANSACTIONC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[LEADADDRESS]外键关系 -->
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录