Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
659c01b2
提交
659c01b2
编写于
6月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_gzf 发布系统代码
上级
3b52b454
变更
27
隐藏空白字符变更
内嵌
并排
正在显示
27 个修改的文件
包含
1165 行增加
和
447 行删除
+1165
-447
view-config.json
app_CRM/public/assets/json/view-config.json
+40
-0
competitor-sales-literature_en_US.ts
...tor-sales-literature/competitor-sales-literature_en_US.ts
+85
-0
competitor-sales-literature_zh_CN.ts
...tor-sales-literature/competitor-sales-literature_zh_CN.ts
+85
-0
competitor_en_US.ts
...src/locale/lanres/entities/competitor/competitor_en_US.ts
+8
-0
competitor_zh_CN.ts
...src/locale/lanres/entities/competitor/competitor_zh_CN.ts
+8
-0
viewconfig.ts
app_CRM/src/mock/viewconfig/viewconfig.ts
+32
-0
product-sales-literature-sal-lit-pro-edit-view.html
...-view/product-sales-literature-sal-lit-pro-edit-view.html
+0
-3
product-sales-literature-sal-lit-pro-grid-view.html
...-view/product-sales-literature-sal-lit-pro-grid-view.html
+0
-3
page-register.ts
app_CRM/src/pages/ungroup/central/page-register.ts
+5
-1
router.ts
app_CRM/src/pages/ungroup/central/router.ts
+96
-10
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+41
-41
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+99
-99
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+41
-41
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+194
-194
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+47
-47
state.ts
app_CRM/src/store/modules/view-action/state.ts
+1
-0
competitor-sales-literature-ui-service-base.ts
...literature/competitor-sales-literature-ui-service-base.ts
+2
-0
competitor-ui-service-base.ts
...RM/src/uiservice/competitor/competitor-ui-service-base.ts
+2
-0
info-viewtabexppanel-tabexppanel-base.tsx
...nel-tabexppanel/info-viewtabexppanel-tabexppanel-base.tsx
+1
-0
info-viewtabexppanel-tabexppanel.html
...xppanel-tabexppanel/info-viewtabexppanel-tabexppanel.html
+23
-0
info-viewtabexppanel-tabexppanel.vue
...exppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue
+2
-0
info-viewtabviewpanel3-tabviewpanel-base.tsx
...tabviewpanel/info-viewtabviewpanel3-tabviewpanel-base.tsx
+188
-0
info-viewtabviewpanel3-tabviewpanel-model.ts
...tabviewpanel/info-viewtabviewpanel3-tabviewpanel-model.ts
+115
-0
info-viewtabviewpanel3-tabviewpanel-service.ts
...bviewpanel/info-viewtabviewpanel3-tabviewpanel-service.ts
+11
-0
info-viewtabviewpanel3-tabviewpanel.html
...el3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.html
+9
-0
info-viewtabviewpanel3-tabviewpanel.vue
...nel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.vue
+22
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+8
-8
未找到文件。
app_CRM/public/assets/json/view-config.json
浏览文件 @
659c01b2
...
...
@@ -459,6 +459,16 @@
"viewtag"
:
"3cf1d1097fdbdea6d7fb32cf7ff09d04"
,
"memo"
:
""
},
"competitorsalesliteraturesallitprogridview"
:
{
"title"
:
"宣传资料竞争对手明细"
,
"caption"
:
"竞争对手宣传资料"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorSalesLiteratureSalLitProGridView"
,
"viewfilename"
:
"competitor-sales-literature-sal-lit-pro-grid-view"
,
"viewtag"
:
"3d0f1bced23c2757ff4de58b146c2e6e"
,
"memo"
:
""
},
"lettereditview"
:
{
"title"
:
"信件编辑视图"
,
"caption"
:
"信件"
,
...
...
@@ -469,6 +479,16 @@
"viewtag"
:
"3d538df4ca389d372347f7b53d67269f"
,
"memo"
:
"系统自动添加"
},
"competitorpickupgridview"
:
{
"title"
:
"竞争对手选择表格视图"
,
"caption"
:
"竞争对手"
,
"viewtype"
:
"DEPICKUPGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorPickupGridView"
,
"viewfilename"
:
"competitor-pickup-grid-view"
,
"viewtag"
:
"3de13dd6914e2465d23dab68ccea5cae"
,
"memo"
:
"系统自动添加"
},
"faxeditview"
:
{
"title"
:
"传真编辑视图"
,
"caption"
:
"传真"
,
...
...
@@ -1379,6 +1399,16 @@
"viewtag"
:
"b10964e86f6d70d588618c69fb4d6297"
,
"memo"
:
""
},
"competitorpickupview"
:
{
"title"
:
"竞争对手数据选择视图"
,
"caption"
:
"竞争对手"
,
"viewtype"
:
"DEPICKUPVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorPickupView"
,
"viewfilename"
:
"competitor-pickup-view"
,
"viewtag"
:
"b153b539b40b2ff7a9d81b6c0329cf25"
,
"memo"
:
"系统自动添加"
},
"productgridview"
:
{
"title"
:
"产品表格视图"
,
"caption"
:
"产品"
,
...
...
@@ -1788,5 +1818,15 @@
"viewfilename"
:
"sales-order-detail-soproduct-grid-view"
,
"viewtag"
:
"fed62991d8068c42d2544ad0a9b4820b"
,
"memo"
:
""
},
"competitorsalesliteraturesallitcompeditview"
:
{
"title"
:
"宣传资料竞争对手明细"
,
"caption"
:
"竞争对手宣传资料"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorSalesLiteratureSalLitCompEditView"
,
"viewfilename"
:
"competitor-sales-literature-sal-lit-comp-edit-view"
,
"viewtag"
:
"ff4a84c8d487ea42d8f57d04f39ae023"
,
"memo"
:
""
}
}
\ No newline at end of file
app_CRM/src/locale/lanres/entities/competitor-sales-literature/competitor-sales-literature_en_US.ts
浏览文件 @
659c01b2
...
...
@@ -13,4 +13,89 @@ export default {
entityname
:
"竞争对手"
,
entity2name
:
"销售宣传资料"
,
},
views
:
{
sallitprogridview
:
{
caption
:
"竞争对手宣传资料"
,
title
:
"宣传资料竞争对手明细"
,
},
sallitcompeditview
:
{
caption
:
"竞争对手宣传资料"
,
title
:
"宣传资料竞争对手明细"
,
},
},
sallitcomp_form
:
{
details
:
{
group1
:
"竞争对手宣传资料基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"关系标识"
,
srfmajortext
:
"关系名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
entity2id
:
"销售宣传资料"
,
entityname
:
"竞争对手"
,
relationshipsid
:
"关系标识"
,
entityid
:
"竞争对手"
,
},
uiactions
:
{
},
},
sallitcompgrid_grid
:
{
columns
:
{
entity2name
:
"销售宣传资料"
,
entityname
:
"竞争对手"
,
},
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
},
uiactions
:
{
},
},
sallitprogridviewtoolbar_toolbar
:
{
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
},
sallitcompeditviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
"Save And Close"
,
tip
:
"Save And Close Window"
,
},
tbitem2
:
{
caption
:
"关闭"
,
tip
:
"关闭"
,
},
},
};
\ No newline at end of file
app_CRM/src/locale/lanres/entities/competitor-sales-literature/competitor-sales-literature_zh_CN.ts
浏览文件 @
659c01b2
...
...
@@ -12,4 +12,89 @@ export default {
entityname
:
"竞争对手"
,
entity2name
:
"销售宣传资料"
,
},
views
:
{
sallitprogridview
:
{
caption
:
"竞争对手宣传资料"
,
title
:
"宣传资料竞争对手明细"
,
},
sallitcompeditview
:
{
caption
:
"竞争对手宣传资料"
,
title
:
"宣传资料竞争对手明细"
,
},
},
sallitcomp_form
:
{
details
:
{
group1
:
"竞争对手宣传资料基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"关系标识"
,
srfmajortext
:
"关系名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
entity2id
:
"销售宣传资料"
,
entityname
:
"竞争对手"
,
relationshipsid
:
"关系标识"
,
entityid
:
"竞争对手"
,
},
uiactions
:
{
},
},
sallitcompgrid_grid
:
{
columns
:
{
entity2name
:
"销售宣传资料"
,
entityname
:
"竞争对手"
,
},
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
},
uiactions
:
{
},
},
sallitprogridviewtoolbar_toolbar
:
{
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"删除"
,
tip
:
"删除"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"过滤"
,
tip
:
"过滤"
,
},
},
sallitcompeditviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
"保存并关闭"
,
tip
:
"保存并关闭"
,
},
tbitem2
:
{
caption
:
"关闭"
,
tip
:
"关闭"
,
},
},
};
\ No newline at end of file
app_CRM/src/locale/lanres/entities/competitor/competitor_en_US.ts
浏览文件 @
659c01b2
...
...
@@ -92,6 +92,10 @@ export default {
caption
:
"竞争对手"
,
title
:
"竞争对手编辑视图"
,
},
pickupgridview
:
{
caption
:
"竞争对手"
,
title
:
"竞争对手选择表格视图"
,
},
summary
:
{
caption
:
"竞争对手概览"
,
title
:
"竞争对手概览"
,
...
...
@@ -100,6 +104,10 @@ export default {
caption
:
"竞争对手"
,
title
:
"竞争对手"
,
},
pickupview
:
{
caption
:
"竞争对手"
,
title
:
"竞争对手数据选择视图"
,
},
gridview
:
{
caption
:
"竞争对手"
,
title
:
"竞争对手信息"
,
...
...
app_CRM/src/locale/lanres/entities/competitor/competitor_zh_CN.ts
浏览文件 @
659c01b2
...
...
@@ -91,6 +91,10 @@ export default {
caption
:
"竞争对手"
,
title
:
"竞争对手编辑视图"
,
},
pickupgridview
:
{
caption
:
"竞争对手"
,
title
:
"竞争对手选择表格视图"
,
},
summary
:
{
caption
:
"竞争对手概览"
,
title
:
"竞争对手概览"
,
...
...
@@ -99,6 +103,10 @@ export default {
caption
:
"竞争对手"
,
title
:
"竞争对手"
,
},
pickupview
:
{
caption
:
"竞争对手"
,
title
:
"竞争对手数据选择视图"
,
},
gridview
:
{
caption
:
"竞争对手"
,
title
:
"竞争对手信息"
,
...
...
app_CRM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
659c01b2
...
...
@@ -375,6 +375,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"ContactInfo_Abstract"
,
"viewtag"
:
"3cf1d1097fdbdea6d7fb32cf7ff09d04"
},
"competitorsalesliteraturesallitprogridview"
:
{
"title"
:
"宣传资料竞争对手明细"
,
"caption"
:
"竞争对手宣传资料"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorSalesLiteratureSalLitProGridView"
,
"viewtag"
:
"3d0f1bced23c2757ff4de58b146c2e6e"
},
"lettereditview"
:
{
"title"
:
"信件编辑视图"
,
"caption"
:
"信件"
,
...
...
@@ -383,6 +391,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"LetterEditView"
,
"viewtag"
:
"3d538df4ca389d372347f7b53d67269f"
},
"competitorpickupgridview"
:
{
"title"
:
"竞争对手选择表格视图"
,
"caption"
:
"竞争对手"
,
"viewtype"
:
"DEPICKUPGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorPickupGridView"
,
"viewtag"
:
"3de13dd6914e2465d23dab68ccea5cae"
},
"faxeditview"
:
{
"title"
:
"传真编辑视图"
,
"caption"
:
"传真"
,
...
...
@@ -1111,6 +1127,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBizListInfo"
,
"viewtag"
:
"b10964e86f6d70d588618c69fb4d6297"
},
"competitorpickupview"
:
{
"title"
:
"竞争对手数据选择视图"
,
"caption"
:
"竞争对手"
,
"viewtype"
:
"DEPICKUPVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorPickupView"
,
"viewtag"
:
"b153b539b40b2ff7a9d81b6c0329cf25"
},
"productgridview"
:
{
"title"
:
"产品表格视图"
,
"caption"
:
"产品"
,
...
...
@@ -1438,6 +1462,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewmodule"
:
"Sales"
,
"viewname"
:
"SalesOrderDetailSOProductGridView"
,
"viewtag"
:
"fed62991d8068c42d2544ad0a9b4820b"
},
"competitorsalesliteraturesallitcompeditview"
:
{
"title"
:
"宣传资料竞争对手明细"
,
"caption"
:
"竞争对手宣传资料"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"CompetitorSalesLiteratureSalLitCompEditView"
,
"viewtag"
:
"ff4a84c8d487ea42d8f57d04f39ae023"
}
}];
});
\ No newline at end of file
app_CRM/src/pages/sales/product-sales-literature-sal-lit-pro-edit-view/product-sales-literature-sal-lit-pro-edit-view.html
浏览文件 @
659c01b2
<studio-view-style2
viewName=
"productsalesliteraturesallitproeditview"
viewTitle=
"宣传资料产品明细"
class=
'deeditview product-sales-literature-sal-lit-pro-edit-view'
>
<template
slot=
'title'
>
<span
class=
'caption-info'
>
{{$t(model.srfTitle)}}
</span>
</template>
<template
slot=
"toolbar"
>
<view-toolbar
mode=
"STYLE2"
:model=
"toolBarModels"
@
item-click=
"toolbar_click($event)"
/>
</template>
<view
_form
...
...
app_CRM/src/pages/sales/product-sales-literature-sal-lit-pro-grid-view/product-sales-literature-sal-lit-pro-grid-view.html
浏览文件 @
659c01b2
<studio-view-style2
viewName=
"productsalesliteraturesallitprogridview"
viewTitle=
"宣传资料产品明细"
class=
'degridview product-sales-literature-sal-lit-pro-grid-view'
>
<template
slot=
'title'
>
<span
class=
'caption-info'
>
{{$t(model.srfTitle)}}
</span>
</template>
<i-input
slot=
"quickSearch"
v-show=
"!isExpandSearchForm"
v-model=
"query"
search
@
on-search=
"onSearch($event)"
/>
<template
slot=
"toolbar"
>
<view-toolbar
mode=
"STYLE2"
:model=
"toolBarModels"
@
item-click=
"toolbar_click($event)"
/>
</template>
...
...
app_CRM/src/pages/ungroup/central/page-register.ts
浏览文件 @
659c01b2
...
...
@@ -64,6 +64,7 @@ export const PageComponents = {
Vue
.
component
(
'contact-info-address'
,
()
=>
import
(
'@pages/base/contact-info-address/contact-info-address.vue'
));
Vue
.
component
(
'sales-order-quick-create-view'
,
()
=>
import
(
'@pages/sales/sales-order-quick-create-view/sales-order-quick-create-view.vue'
));
Vue
.
component
(
'lead-quick-create'
,
()
=>
import
(
'@pages/sales/lead-quick-create/lead-quick-create.vue'
));
Vue
.
component
(
'competitor-pickup-grid-view'
,
()
=>
import
(
'@pages/sales/competitor-pickup-grid-view/competitor-pickup-grid-view.vue'
));
Vue
.
component
(
'price-level-pickup-view'
,
()
=>
import
(
'@pages/product/price-level-pickup-view/price-level-pickup-view.vue'
));
Vue
.
component
(
'invoice-summary-view'
,
()
=>
import
(
'@pages/finance/invoice-summary-view/invoice-summary-view.vue'
));
Vue
.
component
(
'opportunity-edit-view'
,
()
=>
import
(
'@pages/sales/opportunity-edit-view/opportunity-edit-view.vue'
));
...
...
@@ -113,6 +114,7 @@ export const PageComponents = {
Vue
.
component
(
'invoice-info-view'
,
()
=>
import
(
'@pages/finance/invoice-info-view/invoice-info-view.vue'
));
Vue
.
component
(
'contact-by-account'
,
()
=>
import
(
'@pages/base/contact-by-account/contact-by-account.vue'
));
Vue
.
component
(
'opportunity-opp-pro-dashboard-view'
,
()
=>
import
(
'@pages/sales/opportunity-opp-pro-dashboard-view/opportunity-opp-pro-dashboard-view.vue'
));
Vue
.
component
(
'competitor-sales-literature-sal-lit-pro-grid-view'
,
()
=>
import
(
'@pages/sales/competitor-sales-literature-sal-lit-pro-grid-view/competitor-sales-literature-sal-lit-pro-grid-view.vue'
));
Vue
.
component
(
'ibiz-list-summary'
,
()
=>
import
(
'@pages/marketing/ibiz-list-summary/ibiz-list-summary.vue'
));
Vue
.
component
(
'sales-literature-item-grid-view'
,
()
=>
import
(
'@pages/sales/sales-literature-item-grid-view/sales-literature-item-grid-view.vue'
));
Vue
.
component
(
'lead-dashboard-view'
,
()
=>
import
(
'@pages/sales/lead-dashboard-view/lead-dashboard-view.vue'
));
...
...
@@ -130,13 +132,15 @@ export const PageComponents = {
Vue
.
component
(
'sales-order-detail-soproduct-grid-view'
,
()
=>
import
(
'@pages/sales/sales-order-detail-soproduct-grid-view/sales-order-detail-soproduct-grid-view.vue'
));
Vue
.
component
(
'account-info-all'
,
()
=>
import
(
'@pages/base/account-info-all/account-info-all.vue'
));
Vue
.
component
(
'opportunity-competitor-edit-view'
,
()
=>
import
(
'@pages/sales/opportunity-competitor-edit-view/opportunity-competitor-edit-view.vue'
));
Vue
.
component
(
'competitor-sales-literature-sal-lit-comp-edit-view'
,
()
=>
import
(
'@pages/sales/competitor-sales-literature-sal-lit-comp-edit-view/competitor-sales-literature-sal-lit-comp-edit-view.vue'
));
Vue
.
component
(
'sales-order-info-soview'
,
()
=>
import
(
'@pages/sales/sales-order-info-soview/sales-order-info-soview.vue'
));
Vue
.
component
(
'activity-pointer-by-parent-key'
,
()
=>
import
(
'@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'
));
Vue
.
component
(
'contact-edit-abstract'
,
()
=>
import
(
'@pages/base/contact-edit-abstract/contact-edit-abstract.vue'
));
Vue
.
component
(
'activity-pointer-by-parent-key'
,
()
=>
import
(
'@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'
));
Vue
.
component
(
'uom-pickup-view'
,
()
=>
import
(
'@pages/base/uom-pickup-view/uom-pickup-view.vue'
));
Vue
.
component
(
'list-account-inner'
,
()
=>
import
(
'@pages/marketing/list-account-inner/list-account-inner.vue'
));
Vue
.
component
(
'contact-summary'
,
()
=>
import
(
'@pages/base/contact-summary/contact-summary.vue'
));
Vue
.
component
(
'task-edit-view'
,
()
=>
import
(
'@pages/base/task-edit-view/task-edit-view.vue'
));
Vue
.
component
(
'competitor-pickup-view'
,
()
=>
import
(
'@pages/sales/competitor-pickup-view/competitor-pickup-view.vue'
));
Vue
.
component
(
'product-sales-literature-sal-lit-pro-edit-view'
,
()
=>
import
(
'@pages/sales/product-sales-literature-sal-lit-pro-edit-view/product-sales-literature-sal-lit-pro-edit-view.vue'
));
Vue
.
component
(
'sales-order-summary-view'
,
()
=>
import
(
'@pages/sales/sales-order-summary-view/sales-order-summary-view.vue'
));
Vue
.
component
(
'contact-info-market'
,
()
=>
import
(
'@pages/base/contact-info-market/contact-info-market.vue'
));
...
...
app_CRM/src/pages/ungroup/central/router.ts
浏览文件 @
659c01b2
...
...
@@ -1872,6 +1872,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sales/lead-quick-create/lead-quick-create.vue'
),
},
{
path
:
'competitors/:competitor?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.competitor.views.pickupgridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'competitors'
,
parameterName
:
'competitor'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/competitor-pickup-grid-view/competitor-pickup-grid-view.vue'
),
},
{
path
:
'pricelevels/:pricelevel?/pickupview/:pickupview?'
,
meta
:
{
...
...
@@ -3394,6 +3408,35 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sales/opportunity-opp-pro-dashboard-view/opportunity-opp-pro-dashboard-view.vue'
),
},
{
path
:
'salesliteratures/:salesliterature?/competitorsalesliteratures/:competitorsalesliterature?/sallitprogridview/:sallitprogridview?'
,
meta
:
{
caption
:
'entities.competitorsalesliterature.views.sallitprogridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'salesliteratures'
,
parameterName
:
'salesliterature'
},
{
pathName
:
'competitorsalesliteratures'
,
parameterName
:
'competitorsalesliterature'
},
{
pathName
:
'sallitprogridview'
,
parameterName
:
'sallitprogridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/competitor-sales-literature-sal-lit-pro-grid-view/competitor-sales-literature-sal-lit-pro-grid-view.vue'
),
},
{
path
:
'competitorsalesliteratures/:competitorsalesliterature?/sallitprogridview/:sallitprogridview?'
,
meta
:
{
caption
:
'entities.competitorsalesliterature.views.sallitprogridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'competitorsalesliteratures'
,
parameterName
:
'competitorsalesliterature'
},
{
pathName
:
'sallitprogridview'
,
parameterName
:
'sallitprogridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/competitor-sales-literature-sal-lit-pro-grid-view/competitor-sales-literature-sal-lit-pro-grid-view.vue'
),
},
{
path
:
'ibizlists/:ibizlist?/summary/:summary?'
,
meta
:
{
...
...
@@ -4121,32 +4164,47 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/sales/opportunity-competitor-edit-view/opportunity-competitor-edit-view.vue'
),
},
{
path
:
'sales
orders/:salesorder?/info_soview/:info_so
view?'
,
path
:
'sales
literatures/:salesliterature?/competitorsalesliteratures/:competitorsalesliterature?/sallitcompeditview/:sallitcompedit
view?'
,
meta
:
{
caption
:
'entities.
salesorder.views.info_so
view.title'
,
caption
:
'entities.
competitorsalesliterature.views.sallitcompedit
view.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'info_soview'
,
parameterName
:
'info_soview'
},
{
pathName
:
'salesliteratures'
,
parameterName
:
'salesliterature'
},
{
pathName
:
'competitorsalesliteratures'
,
parameterName
:
'competitorsalesliterature'
},
{
pathName
:
'sallitcompeditview'
,
parameterName
:
'sallitcompeditview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/
sales-order-info-soview/sales-order-info-so
view.vue'
),
component
:
()
=>
import
(
'@pages/sales/
competitor-sales-literature-sal-lit-comp-edit-view/competitor-sales-literature-sal-lit-comp-edit-
view.vue'
),
},
{
path
:
'
activitypointers/:activitypointer?/byparentkey/:byparentkey
?'
,
path
:
'
competitorsalesliteratures/:competitorsalesliterature?/sallitcompeditview/:sallitcompeditview
?'
,
meta
:
{
caption
:
'entities.
activitypointer.views.byparentkey
.title'
,
caption
:
'entities.
competitorsalesliterature.views.sallitcompeditview
.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'
activitypointers'
,
parameterName
:
'activitypointer
'
},
{
pathName
:
'
byparentkey'
,
parameterName
:
'byparentkey
'
},
{
pathName
:
'
competitorsalesliteratures'
,
parameterName
:
'competitorsalesliterature
'
},
{
pathName
:
'
sallitcompeditview'
,
parameterName
:
'sallitcompeditview
'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'
),
component
:
()
=>
import
(
'@pages/sales/competitor-sales-literature-sal-lit-comp-edit-view/competitor-sales-literature-sal-lit-comp-edit-view.vue'
),
},
{
path
:
'salesorders/:salesorder?/info_soview/:info_soview?'
,
meta
:
{
caption
:
'entities.salesorder.views.info_soview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'info_soview'
,
parameterName
:
'info_soview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-order-info-soview/sales-order-info-soview.vue'
),
},
{
path
:
'accounts/:account?/contacts/:contact?/editabstract/:editabstract?'
,
...
...
@@ -4177,6 +4235,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/base/contact-edit-abstract/contact-edit-abstract.vue'
),
},
{
path
:
'activitypointers/:activitypointer?/byparentkey/:byparentkey?'
,
meta
:
{
caption
:
'entities.activitypointer.views.byparentkey.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'activitypointers'
,
parameterName
:
'activitypointer'
},
{
pathName
:
'byparentkey'
,
parameterName
:
'byparentkey'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'
),
},
{
path
:
'accounts/:account?/innerpickupgridview/:innerpickupgridview?'
,
meta
:
{
...
...
@@ -4306,6 +4378,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/base/task-edit-view/task-edit-view.vue'
),
},
{
path
:
'competitors/:competitor?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.competitor.views.pickupview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'competitors'
,
parameterName
:
'competitor'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/competitor-pickup-view/competitor-pickup-view.vue'
),
},
{
path
:
'salesliteratures/:salesliterature?/productsalesliteratures/:productsalesliterature?/sallitproeditview/:sallitproeditview?'
,
meta
:
{
...
...
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
659c01b2
...
...
@@ -62,11 +62,11 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -76,12 +76,12 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -91,7 +91,7 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -116,8 +116,8 @@ export default class CampaignServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -133,11 +133,11 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -147,12 +147,12 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -162,7 +162,7 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -180,8 +180,8 @@ export default class CampaignServiceBase extends EntityService {
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -198,8 +198,8 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -215,11 +215,11 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -229,12 +229,12 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
campaign
list
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
list
s'
),
'undefined'
)){
campaign
listsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlist
s'
)
as
any
);
if
(
campaign
listsData
&&
campaignlistsData
.
length
&&
campaignlist
sData
.
length
>
0
){
campaign
list
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
campaign
lists
=
campaignlist
sData
;
let
campaign
campaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaign
campaign
s'
),
'undefined'
)){
campaign
campaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaign
campaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaign
campaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -244,7 +244,7 @@ export default class CampaignServiceBase extends EntityService {
});
}
}
masterData
.
campaign
lists
=
campaignlist
sData
;
masterData
.
campaign
campaigns
=
campaigncampaign
sData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -262,8 +262,8 @@ export default class CampaignServiceBase extends EntityService {
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -279,8 +279,8 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
659c01b2
...
...
@@ -66,6 +66,21 @@ export default class ContactServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
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
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -96,26 +111,11 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
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
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -149,15 +149,15 @@ export default class ContactServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -173,6 +173,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
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
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -203,6 +218,14 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
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
);
...
...
@@ -218,14 +241,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -256,26 +271,11 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
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
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -291,6 +291,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
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
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -321,6 +336,14 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
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
);
...
...
@@ -336,14 +359,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -374,26 +389,11 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
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
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -410,16 +410,16 @@ export default class ContactServiceBase extends EntityService {
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -435,6 +435,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
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
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -465,6 +480,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
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
);
...
...
@@ -480,21 +510,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -525,21 +540,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
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
;
...
...
@@ -549,9 +549,9 @@ export default class ContactServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
659c01b2
...
...
@@ -92,11 +92,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listaccounts
=
listaccountsData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -106,12 +106,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontact
sData
;
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
leads
=
listlead
sData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -121,13 +121,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
masterData
.
list
contacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -198,11 +198,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listaccounts
=
listaccountsData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -212,12 +212,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontact
sData
;
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
leads
=
listlead
sData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -227,13 +227,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
masterData
.
list
contacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -278,11 +278,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData
.
listaccounts
=
listaccountsData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -292,12 +292,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontact
sData
;
let
list
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
lead
s'
),
'undefined'
)){
list
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listlead
s'
)
as
any
);
if
(
list
leadsData
&&
listleadsData
.
length
&&
listlead
sData
.
length
>
0
){
list
lead
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
leads
=
listlead
sData
;
let
list
contact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
contact
s'
),
'undefined'
)){
list
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
list
contactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
list
contact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -307,7 +307,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
masterData
.
list
contacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -319,8 +319,8 @@ export default class IBizListServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -337,8 +337,8 @@ export default class IBizListServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
...
...
@@ -356,8 +356,8 @@ export default class IBizListServiceBase extends EntityService {
res
.
data
.
ibizlist
=
data
.
ibizlist
;
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
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
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
浏览文件 @
659c01b2
...
...
@@ -69,6 +69,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
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -99,6 +114,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -114,15 +138,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
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
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -153,26 +168,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
...
...
@@ -190,6 +190,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
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -220,6 +235,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -235,15 +259,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
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
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -274,26 +289,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
...
...
@@ -311,22 +311,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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -343,24 +343,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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -376,6 +376,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
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -406,21 +421,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -430,13 +430,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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -467,6 +482,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -482,21 +512,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -527,21 +542,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -551,9 +551,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
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -588,6 +588,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
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -618,6 +633,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -633,15 +657,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -672,6 +687,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -687,14 +710,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -725,26 +740,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
@@ -760,6 +760,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
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -790,6 +805,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -805,15 +829,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -844,26 +859,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -881,6 +881,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
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -911,6 +926,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -926,15 +950,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -965,6 +980,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -980,14 +1003,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -1018,26 +1033,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quotesData
.
length
>
0
){
quotesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quoteid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quotesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
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
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
return
res
;
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
659c01b2
...
...
@@ -63,8 +63,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -94,41 +94,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -158,36 +158,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -198,8 +198,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -255,41 +255,41 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
productsalesliteratures
=
productsalesliteraturesData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
competitorsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitorsalesliterature
s'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliterature
s'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitorsalesliterature
sData
.
length
>
0
){
competitorsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -306,8 +306,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
res
.
data
.
salesliterature
=
data
.
salesliterature
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
app_CRM/src/store/modules/view-action/state.ts
浏览文件 @
659c01b2
...
...
@@ -135,6 +135,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'3d0f1bced23c2757ff4de58b146c2e6e'
,
'00e76d9dd6b3065c8231e9dc15334d05'
,
'96cc644d7d763e47f3644aed0d9850f0'
,
],
...
...
app_CRM/src/uiservice/competitor-sales-literature/competitor-sales-literature-ui-service-base.ts
浏览文件 @
659c01b2
...
...
@@ -79,6 +79,8 @@ export default class CompetitorSalesLiteratureUIServiceBase extends UIService {
* @memberof CompetitorSalesLiteratureUIServiceBase
*/
public
initViewMap
(){
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'sallitprogridview'
,
srfappde
:
'competitorsalesliteratures'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'sallitcompeditview'
,
srfappde
:
'competitorsalesliteratures'
});
}
/**
...
...
app_CRM/src/uiservice/competitor/competitor-ui-service-base.ts
浏览文件 @
659c01b2
...
...
@@ -81,8 +81,10 @@ export default class CompetitorUIServiceBase extends UIService {
public
initViewMap
(){
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'optionview'
,
srfappde
:
'competitors'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info_abstract'
,
srfappde
:
'competitors'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'pickupgridview'
,
srfappde
:
'competitors'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'summary'
,
srfappde
:
'competitors'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info'
,
srfappde
:
'competitors'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'competitors'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'competitors'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'competitors'
});
}
...
...
app_CRM/src/widgets/sales-literature/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel-base.tsx
浏览文件 @
659c01b2
...
...
@@ -48,6 +48,7 @@ export class InfoViewtabexppanelTabexppanelBase extends TabExpPanelControlBase {
protected
isInit
:
any
=
{
tabviewpanel
:
true
,
tabviewpanel2
:
false
,
tabviewpanel3
:
false
,
}
/**
...
...
app_CRM/src/widgets/sales-literature/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.html
浏览文件 @
659c01b2
...
...
@@ -46,5 +46,28 @@
@
closeview=
"closeView($event)"
>
</view
_tabviewpanel2
>
</tab-pane>
<tab-pane
:index=
"2"
name=
'tabviewpanel3'
tab=
'infoviewtabexppanel'
class=
''
:label=
"(h) =>{
return h('div', [
h('span', '竞争对手'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}"
>
<view
_tabviewpanel3
:viewState=
"viewState"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:context=
"JSON.parse(JSON.stringify(context))"
v-if=
"isInit.tabviewpanel3"
name=
"tabviewpanel3"
ref=
'tabviewpanel3'
@
viewpanelDatasChange =
"tabViewPanelDatasChange"
@
closeview=
"closeView($event)"
>
</view
_tabviewpanel3
>
</tab-pane>
</tabs>
</div>
\ No newline at end of file
app_CRM/src/widgets/sales-literature/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue
浏览文件 @
659c01b2
...
...
@@ -5,6 +5,7 @@ import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabexppanelTabexppanelBase } from './info-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/sales-literature/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/sales-literature/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.vue';
import view_tabviewpanel3 from '@widgets/sales-literature/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.vue';
/**
...
...
@@ -18,6 +19,7 @@ import view_tabviewpanel2 from '@widgets/sales-literature/info-viewtabviewpanel2
components: {
view_tabviewpanel,
view_tabviewpanel2,
view_tabviewpanel3,
}
})
...
...
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel-base.tsx
0 → 100644
浏览文件 @
659c01b2
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
MainControlBase
}
from
'@/studio-core'
;
import
SalesLiteratureService
from
'@/service/sales-literature/sales-literature-service'
;
import
InfoViewtabviewpanel3Service
from
'./info-viewtabviewpanel3-tabviewpanel-service'
;
/**
* tabviewpanel3部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanel3TabviewpanelBase}
*/
export
class
InfoViewtabviewpanel3TabviewpanelBase
extends
MainControlBase
{
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanel3Service}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
public
service
:
InfoViewtabviewpanel3Service
=
new
InfoViewtabviewpanel3Service
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SalesLiteratureService}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
public
appEntityService
:
SalesLiteratureService
=
new
SalesLiteratureService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
protected
appDeName
:
string
=
'salesliterature'
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel3
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel3
*/
public
getData
():
any
{
return
null
;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel3
*/
public
isActivied
:
boolean
=
true
;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel3
*/
public
localContext
:
any
=
null
;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel3
*/
public
localViewParam
:
any
=
null
;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public
viewdata
:
string
=
JSON
.
stringify
(
this
.
context
);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public
viewparam
:
string
=
JSON
.
stringify
(
this
.
viewparams
);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel3
*/
public
navfilter
:
string
=
""
;
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel3
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel3
*/
public
afterCreated
(){
this
.
initNavParam
();
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
this
.
$forceUpdate
();
this
.
initNavParam
();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel3
*/
public
initNavParam
(){
if
(
!
Object
.
is
(
this
.
navfilter
,
""
)){
Object
.
assign
(
this
.
viewparams
,{[
this
.
navfilter
]:
this
.
context
[
'majorentity'
]})
}
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
){
let
_context
:
any
=
this
.
$util
.
computedNavData
({},
this
.
context
,
this
.
viewparams
,
this
.
localContext
);
Object
.
assign
(
this
.
context
,
_context
);
}
if
(
this
.
localViewParam
&&
Object
.
keys
(
this
.
localViewParam
).
length
>
0
){
let
_param
:
any
=
this
.
$util
.
computedNavData
({},
this
.
context
,
this
.
viewparams
,
this
.
localViewParam
);
Object
.
assign
(
this
.
viewparams
,
_param
);
}
this
.
viewdata
=
JSON
.
stringify
(
this
.
context
);
this
.
viewparam
=
JSON
.
stringify
(
this
.
viewparams
);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel3
*/
public
viewDatasChange
(
$event
:
any
){
this
.
$emit
(
'viewpanelDatasChange'
,
$event
);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel3
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel3
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
}
\ No newline at end of file
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel-model.ts
0 → 100644
浏览文件 @
659c01b2
/**
* InfoViewtabviewpanel3 部件模型
*
* @export
* @class InfoViewtabviewpanel3Model
*/
export
default
class
InfoViewtabviewpanel3Model
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel3Model
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'importsequencenumber'
,
},
{
name
:
'createdate'
,
},
{
name
:
'createman'
,
},
{
name
:
'timezoneruleversionnumber'
,
},
{
name
:
'customerviewable'
,
},
{
name
:
'expirationdate'
,
},
{
name
:
'exchangerate'
,
},
{
name
:
'employeecontactidyominame'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'description'
,
},
{
name
:
'salesliteraturename'
,
},
{
name
:
'processid'
,
},
{
name
:
'stageid'
,
},
{
name
:
'updateman'
,
},
{
name
:
'entityimage'
,
},
{
name
:
'entityimage_url'
,
},
{
name
:
'hasattachments'
,
},
{
name
:
'overriddencreatedon'
,
},
{
name
:
'entityimage_timestamp'
,
},
{
name
:
'employeecontactid'
,
},
{
name
:
'keywords'
,
},
{
name
:
'versionnumber'
,
},
{
name
:
'utcconversiontimezonecode'
,
},
{
name
:
'literaturetypecode'
,
},
{
name
:
'salesliterature'
,
prop
:
'salesliteratureid'
,
},
{
name
:
'entityimageid'
,
},
{
name
:
'traversedpath'
,
},
{
name
:
'transactioncurrencyid'
,
},
{
name
:
'subjectid'
,
},
{
name
:
'transactioncurrencyname'
,
},
{
name
:
'subjectname'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel-service.ts
0 → 100644
浏览文件 @
659c01b2
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* InfoViewtabviewpanel3 部件服务对象
*
* @export
* @class InfoViewtabviewpanel3Service
*/
export
default
class
InfoViewtabviewpanel3Service
extends
ControlService
{
}
\ No newline at end of file
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.html
0 → 100644
浏览文件 @
659c01b2
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<competitor-sales-literature-sal-lit-pro-grid-view
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
>
</competitor-sales-literature-sal-lit-pro-grid-view>
</div>
\ No newline at end of file
app_CRM/src/widgets/sales-literature/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.vue
0 → 100644
浏览文件 @
659c01b2
<
template
src=
"./info-viewtabviewpanel3-tabviewpanel.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanel3TabviewpanelBase } from './info-viewtabviewpanel3-tabviewpanel-base';
/**
* tabviewpanel3部件
*
* @export
* @class InfoViewtabviewpanel3Tabviewpanel
* @extends {InfoViewtabviewpanel3TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanel3Tabviewpanel extends InfoViewtabviewpanel3TabviewpanelBase { }
</script>
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
659c01b2
...
...
@@ -6343,7 +6343,7 @@
<!--输出实体[SALESLITERATURE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-salesliterature-2
8
-73"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-salesliterature-2
9
-73"
>
<createTable
tableName=
"SALESLITERATURE"
>
<column
name=
"IMPORTSEQUENCENUMBER"
remarks=
""
type=
"INT"
>
</column>
...
...
@@ -8113,7 +8113,7 @@
<!--输出实体[COMPETITOR]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-competitor-3
7
-90"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-competitor-3
9
-90"
>
<createTable
tableName=
"COMPETITOR"
>
<column
name=
"ENTITYIMAGE"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -11335,10 +11335,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-2
8
-311"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesliterature-2
9
-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-2
8
-312"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesliterature-2
9
-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]外键关系 -->
...
...
@@ -11457,7 +11457,7 @@
<!--输出实体[CAMPAIGNLIST]外键关系 -->
<!--输出实体[LISTCONTACT]外键关系 -->
<!--输出实体[COMPETITOR]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-competitor-3
7
-350"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-competitor-3
9
-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]外键关系 -->
...
...
@@ -11484,7 +11484,7 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CHARACTERISTIC"
constraintName=
"DER1N_CHARACTERISTIC__TRANSACT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[COMPETITORSALESLITERATURE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-competitorsalesliterature-
16
-358"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-competitorsalesliterature-
27
-358"
>
<addForeignKeyConstraint
baseColumnNames=
"ENTITYID"
baseTableName=
"RELATIONSHIPS"
constraintName=
"DER1N_COMPETITORSALESLITERATUR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"COMPETITORID"
referencedTableName=
"COMPETITOR"
validate=
"true"
/>
</changeSet>
<!--输出实体[RESOURCESPEC]外键关系 -->
...
...
@@ -11561,10 +11561,10 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CATEGORY"
constraintName=
"DER1N_CATEGORY__TRANSACTIONCUR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[PRODUCTSALESLITERATURE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsalesliterature-3
1
-383"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsalesliterature-3
4
-383"
>
<addForeignKeyConstraint
baseColumnNames=
"ENTITYID"
baseTableName=
"RELATIONSHIPS"
constraintName=
"DER1N_PRODUCTSALESLITERATURE_P"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsalesliterature-3
1
-384"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsalesliterature-3
4
-384"
>
<addForeignKeyConstraint
baseColumnNames=
"ENTITY2ID"
baseTableName=
"RELATIONSHIPS"
constraintName=
"DER1N_PRODUCTSALESLITERATURE_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SALESLITERATUREID"
referencedTableName=
"SALESLITERATURE"
validate=
"true"
/>
</changeSet>
<!--输出实体[INCIDENT]外键关系 -->
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录