Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
8fa3fa17
提交
8fa3fa17
编写于
7月 06, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_gzf 发布系统代码
上级
aabe39cd
变更
58
隐藏空白字符变更
内嵌
并排
正在显示
58 个修改的文件
包含
6331 行增加
和
849 行删除
+6331
-849
view-config.json
app_CRM/public/assets/json/view-config.json
+30
-0
account_en_US.ts
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
+155
-43
account_zh_CN.ts
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
+155
-43
central-appmenu.ts
app_CRM/src/mock/app/central-appmenu/central-appmenu.ts
+1
-1
accounts.ts
app_CRM/src/mock/entity/accounts/accounts.ts
+88
-0
viewconfig.ts
app_CRM/src/mock/viewconfig/viewconfig.ts
+24
-0
account-status-tab-view-base.tsx
.../account-status-tab-view/account-status-tab-view-base.tsx
+124
-0
account-status-tab-view.html
...base/account-status-tab-view/account-status-tab-view.html
+10
-0
account-status-tab-view.vue
.../base/account-status-tab-view/account-status-tab-view.vue
+28
-0
account-stop-grid-view-base.tsx
...se/account-stop-grid-view/account-stop-grid-view-base.tsx
+684
-0
account-stop-grid-view.html
...s/base/account-stop-grid-view/account-stop-grid-view.html
+49
-0
account-stop-grid-view.vue
...es/base/account-stop-grid-view/account-stop-grid-view.vue
+30
-0
account-usable-grid-view-base.tsx
...ccount-usable-grid-view/account-usable-grid-view-base.tsx
+684
-0
account-usable-grid-view.html
...se/account-usable-grid-view/account-usable-grid-view.html
+49
-0
account-usable-grid-view.vue
...ase/account-usable-grid-view/account-usable-grid-view.vue
+30
-0
page-register.ts
app_CRM/src/pages/ungroup/central/page-register.ts
+5
-3
router.ts
app_CRM/src/pages/ungroup/central/router.ts
+52
-24
account-service-base.ts
app_CRM/src/service/account/account-service-base.ts
+36
-2
active-logic-base.ts
app_CRM/src/service/account/active-logic-base.ts
+141
-0
active-logic.ts
app_CRM/src/service/account/active-logic.ts
+22
-0
inactive-logic-base.ts
app_CRM/src/service/account/inactive-logic-base.ts
+141
-0
inactive-logic.ts
app_CRM/src/service/account/inactive-logic.ts
+22
-0
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+52
-52
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+184
-184
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+82
-82
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+261
-261
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+52
-52
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+52
-52
state.ts
app_CRM/src/store/modules/view-action/state.ts
+37
-12
account-ui-service-base.ts
app_CRM/src/uiservice/account/account-ui-service-base.ts
+3
-0
status-tab-viewtabexppanel-tabexppanel-base.tsx
...bexppanel/status-tab-viewtabexppanel-tabexppanel-base.tsx
+76
-0
status-tab-viewtabexppanel-tabexppanel-model.ts
...bexppanel/status-tab-viewtabexppanel-tabexppanel-model.ts
+511
-0
status-tab-viewtabexppanel-tabexppanel-service.ts
...xppanel/status-tab-viewtabexppanel-tabexppanel-service.ts
+45
-0
status-tab-viewtabexppanel-tabexppanel.html
...l-tabexppanel/status-tab-viewtabexppanel-tabexppanel.html
+76
-0
status-tab-viewtabexppanel-tabexppanel.vue
...el-tabexppanel/status-tab-viewtabexppanel-tabexppanel.vue
+28
-0
status-tab-viewtabviewpanel-tabviewpanel-base.tsx
...ewpanel/status-tab-viewtabviewpanel-tabviewpanel-base.tsx
+196
-0
status-tab-viewtabviewpanel-tabviewpanel-model.ts
...ewpanel/status-tab-viewtabviewpanel-tabviewpanel-model.ts
+511
-0
status-tab-viewtabviewpanel-tabviewpanel-service.ts
...panel/status-tab-viewtabviewpanel-tabviewpanel-service.ts
+11
-0
status-tab-viewtabviewpanel-tabviewpanel.html
...abviewpanel/status-tab-viewtabviewpanel-tabviewpanel.html
+11
-0
status-tab-viewtabviewpanel-tabviewpanel.vue
...tabviewpanel/status-tab-viewtabviewpanel-tabviewpanel.vue
+22
-0
status-tab-viewtabviewpanel2-tabviewpanel-base.tsx
...wpanel/status-tab-viewtabviewpanel2-tabviewpanel-base.tsx
+196
-0
status-tab-viewtabviewpanel2-tabviewpanel-model.ts
...wpanel/status-tab-viewtabviewpanel2-tabviewpanel-model.ts
+511
-0
status-tab-viewtabviewpanel2-tabviewpanel-service.ts
...anel/status-tab-viewtabviewpanel2-tabviewpanel-service.ts
+11
-0
status-tab-viewtabviewpanel2-tabviewpanel.html
...bviewpanel/status-tab-viewtabviewpanel2-tabviewpanel.html
+11
-0
status-tab-viewtabviewpanel2-tabviewpanel.vue
...abviewpanel/status-tab-viewtabviewpanel2-tabviewpanel.vue
+22
-0
status-tab-viewtabviewpanel3-tabviewpanel-base.tsx
...wpanel/status-tab-viewtabviewpanel3-tabviewpanel-base.tsx
+196
-0
status-tab-viewtabviewpanel3-tabviewpanel-model.ts
...wpanel/status-tab-viewtabviewpanel3-tabviewpanel-model.ts
+511
-0
status-tab-viewtabviewpanel3-tabviewpanel-service.ts
...anel/status-tab-viewtabviewpanel3-tabviewpanel-service.ts
+11
-0
status-tab-viewtabviewpanel3-tabviewpanel.html
...bviewpanel/status-tab-viewtabviewpanel3-tabviewpanel.html
+11
-0
status-tab-viewtabviewpanel3-tabviewpanel.vue
...abviewpanel/status-tab-viewtabviewpanel3-tabviewpanel.vue
+22
-0
central-appmenu-base.tsx
.../src/widgets/app/central-appmenu/central-appmenu-base.tsx
+5
-5
central-appmenu-model.ts
.../src/widgets/app/central-appmenu/central-appmenu-model.ts
+6
-6
AccountServiceImpl.java
...esscentral/core/base/service/impl/AccountServiceImpl.java
+12
-4
AccountActiveLogicImpl.java
.../core/base/service/logic/impl/AccountActiveLogicImpl.java
+8
-0
AccountExService.java
...nesscentral/core/extensions/service/AccountExService.java
+0
-20
systemResource.json
...al-core/src/main/resources/permission/systemResource.json
+1
-1
AccountActiveRule.drl
...ntral-core/src/main/resources/rules/AccountActiveRule.drl
+19
-0
AccountActiveRuleFlow.bpmn
...-core/src/main/resources/rules/AccountActiveRuleFlow.bpmn
+8
-2
未找到文件。
app_CRM/public/assets/json/view-config.json
浏览文件 @
8fa3fa17
...
...
@@ -369,6 +369,16 @@
"viewtag"
:
"24e222a530526aab94ed4ed22cfedf9a"
,
"memo"
:
"系统自动添加"
},
"accountstatustabview"
:
{
"title"
:
"客户信息"
,
"caption"
:
"客户"
,
"viewtype"
:
"DETABEXPVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"AccountStatusTabView"
,
"viewfilename"
:
"account-status-tab-view"
,
"viewtag"
:
"25bf5f8c2ebd1ce2be6d06717ed08a96"
,
"memo"
:
""
},
"campaignactivityquickcreate"
:
{
"title"
:
"快速新建"
,
"caption"
:
"快速新建"
,
...
...
@@ -999,6 +1009,16 @@
"viewtag"
:
"6d8a2615030eed5779caea69f7f001aa"
,
"memo"
:
"系统自动添加"
},
"accountusablegridview"
:
{
"title"
:
"客户表格视图"
,
"caption"
:
"客户信息"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"AccountUsableGridView"
,
"viewfilename"
:
"account-usable-grid-view"
,
"viewtag"
:
"6d920bddee09ffdf2e18a0701ab9e9e7"
,
"memo"
:
"系统自动添加"
},
"opportunitypickupview"
:
{
"title"
:
"商机数据选择视图"
,
"caption"
:
"商机"
,
...
...
@@ -1359,6 +1379,16 @@
"viewtag"
:
"922d0c8c2262ba83063f6cb3557a450b"
,
"memo"
:
"系统自动添加"
},
"accountstopgridview"
:
{
"title"
:
"客户表格视图"
,
"caption"
:
"客户信息"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"AccountStopGridView"
,
"viewfilename"
:
"account-stop-grid-view"
,
"viewtag"
:
"9433b49c4e43a15dfc8bbd91bdd4c27f"
,
"memo"
:
"系统自动添加"
},
"knowledgearticleinfoview"
:
{
"title"
:
"知识文章信息"
,
"caption"
:
"知识文章"
,
...
...
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
浏览文件 @
8fa3fa17
...
...
@@ -178,6 +178,10 @@ export default {
caption
:
"客户"
,
title
:
"客户编辑视图"
,
},
statustabview
:
{
caption
:
"客户"
,
title
:
"客户信息"
,
},
pickupview
:
{
caption
:
"客户"
,
title
:
"客户数据选择视图"
,
...
...
@@ -202,6 +206,10 @@ export default {
caption
:
"客户关系导航"
,
title
:
"客户关系导航"
,
},
usablegridview
:
{
caption
:
"客户信息"
,
title
:
"客户表格视图"
,
},
editview
:
{
caption
:
"客户"
,
title
:
"客户编辑视图"
,
...
...
@@ -222,6 +230,10 @@ export default {
caption
:
"客户"
,
title
:
"客户编辑视图"
,
},
stopgridview
:
{
caption
:
"客户信息"
,
title
:
"客户表格视图"
,
},
quickcreate
:
{
caption
:
"快速新建"
,
title
:
"快速新建"
,
...
...
@@ -378,10 +390,9 @@ export default {
uiactions
:
{
},
},
info_majorcontact
_form
:
{
quickcreate
_form
:
{
details
:
{
druipart1
:
""
,
group1
:
"主联系人"
,
group1
:
"客户基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
...
...
@@ -391,16 +402,25 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
accountname
:
"客户名称"
,
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级单位"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
defaultpricelevelid
:
"价目表"
,
parentaccountid
:
"上级单位"
,
accountid
:
"客户"
,
},
uiactions
:
{
},
},
quickcreate
_form
:
{
info_majorcontact
_form
:
{
details
:
{
group1
:
"客户基本信息"
,
druipart1
:
""
,
group1
:
"主联系人"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
...
...
@@ -410,16 +430,8 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
accountname
:
"客户名称"
,
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级单位"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
defaultpricelevelid
:
"价目表"
,
parentaccountid
:
"上级单位"
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
accountid
:
"客户"
,
},
uiactions
:
{
...
...
@@ -615,6 +627,56 @@ export default {
uiactions
:
{
},
},
infotoolbar_toolbar
:
{
deuiaction4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
seperator4
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_inactive
:
{
caption
:
"停用"
,
tip
:
"停用"
,
},
tbitem17_active_sep
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem17_addlist
:
{
caption
:
"添加到市场营销列表"
,
tip
:
"添加到市场营销列表"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"Remove And Close"
,
tip
:
"Remove And Close Window"
,
},
seperator2
:
{
caption
:
""
,
tip
:
""
,
},
deuiaction2
:
{
caption
:
"刷新"
,
tip
:
"刷新"
,
},
seperator1
:
{
caption
:
""
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"关闭"
,
tip
:
"关闭"
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_openquickcreateview
:
{
caption
:
"新建"
,
...
...
@@ -667,54 +729,104 @@ export default {
tip
:
"关闭"
,
},
},
infotoolbar_toolbar
:
{
deuiaction4
:
{
usablegridviewtoolbar_toolbar
:
{
tbitem1_openquickcreateview
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
seperator4
:
{
caption
:
""
,
tbitem6
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem17_inactive
:
{
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14_inactive
:
{
caption
:
"停用"
,
tip
:
"停用"
,
},
tbitem1
7_active_sep
:
{
caption
:
""
,
tbitem1
5
:
{
caption
:
"
-
"
,
tip
:
""
,
},
tbitem1
7_active
:
{
caption
:
"
激活
"
,
tip
:
"
激活
"
,
tbitem1
9
:
{
caption
:
"
Filter
"
,
tip
:
"
Filter
"
,
},
tbitem17_addlist
:
{
caption
:
"添加到市场营销列表"
,
tip
:
"添加到市场营销列表"
,
},
stopgridviewtoolbar_toolbar
:
{
tbitem1_openquickcreateview
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"
Remove And Close
"
,
tip
:
"
Remove And Close Window
"
,
tbitem4
:
{
caption
:
"
Edit
"
,
tip
:
"
Edit {0}
"
,
},
seperator2
:
{
caption
:
""
,
tbitem6
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction2
:
{
caption
:
"
刷新
"
,
tip
:
"
刷新
"
,
tbitem8
:
{
caption
:
"
Remove
"
,
tip
:
"
Remove {0}
"
,
},
seperator1
:
{
caption
:
""
,
tbitem9
:
{
caption
:
"
-
"
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"关闭"
,
tip
:
"关闭"
,
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem15
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
},
gradation_treeview
:
{
...
...
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
浏览文件 @
8fa3fa17
...
...
@@ -177,6 +177,10 @@ export default {
caption
:
"客户"
,
title
:
"客户编辑视图"
,
},
statustabview
:
{
caption
:
"客户"
,
title
:
"客户信息"
,
},
pickupview
:
{
caption
:
"客户"
,
title
:
"客户数据选择视图"
,
...
...
@@ -201,6 +205,10 @@ export default {
caption
:
"客户关系导航"
,
title
:
"客户关系导航"
,
},
usablegridview
:
{
caption
:
"客户信息"
,
title
:
"客户表格视图"
,
},
editview
:
{
caption
:
"客户"
,
title
:
"客户编辑视图"
,
...
...
@@ -221,6 +229,10 @@ export default {
caption
:
"客户"
,
title
:
"客户编辑视图"
,
},
stopgridview
:
{
caption
:
"客户信息"
,
title
:
"客户表格视图"
,
},
quickcreate
:
{
caption
:
"快速新建"
,
title
:
"快速新建"
,
...
...
@@ -377,10 +389,9 @@ export default {
uiactions
:
{
},
},
info_majorcontact
_form
:
{
quickcreate
_form
:
{
details
:
{
druipart1
:
""
,
group1
:
"主联系人"
,
group1
:
"客户基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
...
...
@@ -390,16 +401,25 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
accountname
:
"客户名称"
,
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级单位"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
defaultpricelevelid
:
"价目表"
,
parentaccountid
:
"上级单位"
,
accountid
:
"客户"
,
},
uiactions
:
{
},
},
quickcreate
_form
:
{
info_majorcontact
_form
:
{
details
:
{
group1
:
"客户基本信息"
,
druipart1
:
""
,
group1
:
"主联系人"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
...
...
@@ -409,16 +429,8 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
accountname
:
"客户名称"
,
telephone1
:
"主要电话"
,
fax
:
"传真"
,
websiteurl
:
"网站"
,
parentaccountname
:
"上级单位"
,
tickersymbol
:
"股票代号"
,
customertypecode
:
"关系类型"
,
defaultpricelevelname
:
"价目表"
,
defaultpricelevelid
:
"价目表"
,
parentaccountid
:
"上级单位"
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
accountid
:
"客户"
,
},
uiactions
:
{
...
...
@@ -614,6 +626,56 @@ export default {
uiactions
:
{
},
},
infotoolbar_toolbar
:
{
deuiaction4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
seperator4
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_inactive
:
{
caption
:
"停用"
,
tip
:
"停用"
,
},
tbitem17_active_sep
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem17_addlist
:
{
caption
:
"添加到市场营销列表"
,
tip
:
"添加到市场营销列表"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"删除并关闭"
,
tip
:
"删除并关闭"
,
},
seperator2
:
{
caption
:
""
,
tip
:
""
,
},
deuiaction2
:
{
caption
:
"刷新"
,
tip
:
"刷新"
,
},
seperator1
:
{
caption
:
""
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"关闭"
,
tip
:
"关闭"
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_openquickcreateview
:
{
caption
:
"新建"
,
...
...
@@ -666,54 +728,104 @@ export default {
tip
:
"关闭"
,
},
},
infotoolbar_toolbar
:
{
deuiaction4
:
{
usablegridviewtoolbar_toolbar
:
{
tbitem1_openquickcreateview
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
seperator4
:
{
caption
:
""
,
tbitem6
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem17_inactive
:
{
tbitem8
:
{
caption
:
"删除"
,
tip
:
"删除"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14_inactive
:
{
caption
:
"停用"
,
tip
:
"停用"
,
},
tbitem1
7_active_sep
:
{
caption
:
""
,
tbitem1
5
:
{
caption
:
"
-
"
,
tip
:
""
,
},
tbitem1
7_active
:
{
caption
:
"
激活
"
,
tip
:
"
激活
"
,
tbitem1
9
:
{
caption
:
"
过滤
"
,
tip
:
"
过滤
"
,
},
tbitem17_addlist
:
{
caption
:
"添加到市场营销列表"
,
tip
:
"添加到市场营销列表"
,
},
stopgridviewtoolbar_toolbar
:
{
tbitem1_openquickcreateview
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"
删除并关闭
"
,
tip
:
"
删除并关闭
"
,
tbitem4
:
{
caption
:
"
编辑
"
,
tip
:
"
编辑
"
,
},
seperator2
:
{
caption
:
""
,
tbitem6
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction2
:
{
caption
:
"
刷新
"
,
tip
:
"
刷新
"
,
tbitem8
:
{
caption
:
"
删除
"
,
tip
:
"
删除
"
,
},
seperator1
:
{
caption
:
""
,
tbitem9
:
{
caption
:
"
-
"
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"关闭"
,
tip
:
"关闭"
,
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem15
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"过滤"
,
tip
:
"过滤"
,
},
},
gradation_treeview
:
{
...
...
app_CRM/src/mock/app/central-appmenu/central-appmenu.ts
浏览文件 @
8fa3fa17
...
...
@@ -245,7 +245,7 @@ mock.onGet('v7/centralappmenu').reply((config: any) => {
iconcls
:
'fa fa-users'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'
Auto
4'
,
appfunctag
:
'
_
4'
,
resourcetag
:
''
,
},
{
...
...
app_CRM/src/mock/entity/accounts/accounts.ts
浏览文件 @
8fa3fa17
...
...
@@ -472,6 +472,94 @@ mock.onGet(new RegExp(/^\/accounts\/fetchroot(\?[\w-./?%&=,]*)*$/)).reply((confi
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// FetchStop
mock
.
onGet
(
new
RegExp
(
/^
\/
accounts
\/
fetchstop$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: FetchStop"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
?
mockDatas
:
[]];
});
// FetchStop
mock
.
onGet
(
new
RegExp
(
/^
\/
accounts
\/
fetchstop
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: FetchStop"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
let
url
=
config
.
url
.
split
(
'?'
)[
1
];
let
params
=
qs
.
parse
(
url
);
Object
.
assign
(
config
,
params
);
}
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
let
total
=
mockDatas
.
length
;
let
records
:
Array
<
any
>
=
[];
if
(
!
config
.
page
||
!
config
.
size
){
records
=
mockDatas
;
}
else
{
if
((
config
.
page
-
1
)
*
config
.
size
<
total
){
records
=
mockDatas
.
slice
(
config
.
page
,
config
.
size
);
}
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
records
?
records
:
[]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// FetchUsable
mock
.
onGet
(
new
RegExp
(
/^
\/
accounts
\/
fetchusable$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: FetchUsable"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
?
mockDatas
:
[]];
});
// FetchUsable
mock
.
onGet
(
new
RegExp
(
/^
\/
accounts
\/
fetchusable
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: FetchUsable"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
let
url
=
config
.
url
.
split
(
'?'
)[
1
];
let
params
=
qs
.
parse
(
url
);
Object
.
assign
(
config
,
params
);
}
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
let
total
=
mockDatas
.
length
;
let
records
:
Array
<
any
>
=
[];
if
(
!
config
.
page
||
!
config
.
size
){
records
=
mockDatas
;
}
else
{
if
((
config
.
page
-
1
)
*
config
.
size
<
total
){
records
=
mockDatas
.
slice
(
config
.
page
,
config
.
size
);
}
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
records
?
records
:
[]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
...
...
app_CRM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
8fa3fa17
...
...
@@ -303,6 +303,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"ActivityPointerEditView"
,
"viewtag"
:
"24e222a530526aab94ed4ed22cfedf9a"
},
"accountstatustabview"
:
{
"title"
:
"客户信息"
,
"caption"
:
"客户"
,
"viewtype"
:
"DETABEXPVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"AccountStatusTabView"
,
"viewtag"
:
"25bf5f8c2ebd1ce2be6d06717ed08a96"
},
"campaignactivityquickcreate"
:
{
"title"
:
"快速新建"
,
"caption"
:
"快速新建"
,
...
...
@@ -807,6 +815,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"TransactionCurrencyPickupGridView"
,
"viewtag"
:
"6d8a2615030eed5779caea69f7f001aa"
},
"accountusablegridview"
:
{
"title"
:
"客户表格视图"
,
"caption"
:
"客户信息"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"AccountUsableGridView"
,
"viewtag"
:
"6d920bddee09ffdf2e18a0701ab9e9e7"
},
"opportunitypickupview"
:
{
"title"
:
"商机数据选择视图"
,
"caption"
:
"商机"
,
...
...
@@ -1095,6 +1111,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IncidentPickupView"
,
"viewtag"
:
"922d0c8c2262ba83063f6cb3557a450b"
},
"accountstopgridview"
:
{
"title"
:
"客户表格视图"
,
"caption"
:
"客户信息"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"AccountStopGridView"
,
"viewtag"
:
"9433b49c4e43a15dfc8bbd91bdd4c27f"
},
"knowledgearticleinfoview"
:
{
"title"
:
"知识文章信息"
,
"caption"
:
"知识文章"
,
...
...
app_CRM/src/pages/base/account-status-tab-view/account-status-tab-view-base.tsx
0 → 100644
浏览文件 @
8fa3fa17
import
{
Subject
}
from
'rxjs'
;
import
{
TabExpViewBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
TabExpViewEngine
from
'@engine/view/tab-exp-view-engine'
;
/**
* 客户信息视图基类
*
* @export
* @class AccountStatusTabViewBase
* @extends {TabExpViewBase}
*/
export
class
AccountStatusTabViewBase
extends
TabExpViewBase
{
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof AccountStatusTabViewBase
*/
protected
appEntityService
:
AccountService
=
new
AccountService
;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof AccountStatusTabViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof AccountStatusTabViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.account.views.statustabview.caption'
,
srfTitle
:
'entities.account.views.statustabview.title'
,
srfSubTitle
:
'entities.account.views.statustabview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof AccountStatusTabViewBase
*/
protected
containerModel
:
any
=
{
view_tabexppanel
:
{
name
:
'tabexppanel'
,
type
:
'TABEXPPANEL'
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'25bf5f8c2ebd1ce2be6d06717ed08a96'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof AccountStatusTabViewBase
*/
public
engine
:
TabExpViewEngine
=
new
TabExpViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof AccountStatusTabViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
keyPSDEField
:
'account'
,
majorPSDEField
:
'accountname'
,
isLoadDefault
:
true
,
});
}
/**
* 加载模型
*
* @protected
* @memberof AccountStatusTabViewBase
*/
protected
async
loadModel
():
Promise
<
any
>
{
if
(
this
.
context
.
account
){
this
.
appEntityService
.
getDataInfo
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),{},
false
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
const
{
data
:
_data
}
=
response
;
if
(
_data
.
accountname
)
{
Object
.
assign
(
this
.
model
,
{
dataInfo
:
_data
.
accountname
});
if
(
this
.
$tabPageExp
)
{
this
.
$tabPageExp
.
setCurPageCaption
(
this
.
model
.
srfTitle
,
this
.
model
.
srfTitle
,
this
.
model
.
dataInfo
);
}
if
(
this
.
$route
){
this
.
$route
.
meta
.
info
=
this
.
model
.
dataInfo
;
}
Object
.
assign
(
this
.
model
,
{
srfTitle
:
`
${
this
.
$t
(
this
.
model
.
srfTitle
)}
-
${
this
.
model
.
dataInfo
}
`
});
this
.
$appService
.
navHistory
.
setCaption
({
route
:
this
.
$route
,
info
:
this
.
model
.
dataInfo
});
}
})
}
}
}
\ No newline at end of file
app_CRM/src/pages/base/account-status-tab-view/account-status-tab-view.html
0 → 100644
浏览文件 @
8fa3fa17
<studio-view-style2
viewName=
"accountstatustabview"
viewTitle=
"客户信息"
class=
'detabexpview account-status-tab-view'
>
<view
_tabexppanel
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
name=
"tabexppanel"
ref=
'tabexppanel'
@
closeview=
"closeView($event)"
>
</view
_tabexppanel
>
</studio-view-style2>
\ No newline at end of file
app_CRM/src/pages/base/account-status-tab-view/account-status-tab-view.vue
0 → 100644
浏览文件 @
8fa3fa17
<
template
src=
"./account-status-tab-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { AccountStatusTabViewBase } from './account-status-tab-view-base';
import view_tabexppanel from '@widgets/account/status-tab-viewtabexppanel-tabexppanel/status-tab-viewtabexppanel-tabexppanel.vue';
/**
* 客户信息视图
*
* @export
* @class AccountStatusTabView
* @extends {AccountStatusTabViewBase}
*/
@Component({
components: {
view_tabexppanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
}
})
@VueLifeCycleProcessing()
export default class AccountStatusTabView extends AccountStatusTabViewBase { }
</script>
app_CRM/src/pages/base/account-stop-grid-view/account-stop-grid-view-base.tsx
0 → 100644
浏览文件 @
8fa3fa17
import
{
Subject
}
from
'rxjs'
;
import
{
GridViewBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
GridViewEngine
from
'@engine/view/grid-view-engine'
;
import
AccountUIService
from
'@/uiservice/account/account-ui-service'
;
import
CodeListService
from
"@service/app/codelist-service"
;
/**
* 客户表格视图视图基类
*
* @export
* @class AccountStopGridViewBase
* @extends {GridViewBase}
*/
export
class
AccountStopGridViewBase
extends
GridViewBase
{
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof AccountStopGridViewBase
*/
protected
appEntityService
:
AccountService
=
new
AccountService
;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof AccountStopGridViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof AccountStopGridViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.account.views.stopgridview.caption'
,
srfTitle
:
'entities.account.views.stopgridview.title'
,
srfSubTitle
:
'entities.account.views.stopgridview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof AccountStopGridViewBase
*/
protected
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
/**
* 工具栏模型
*
* @type {*}
* @memberof AccountStopGridView
*/
public
toolBarModels
:
any
=
{
tbitem1_openquickcreateview
:
{
name
:
'tbitem1_openquickcreateview'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-user-plus'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenQuickCreateView'
,
target
:
'NONE'
},
class
:
''
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem6
:
{
name
:
'tbitem6'
,
caption
:
'拷贝'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'拷贝'
,
iconcls
:
'fa fa-copy'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem7
:
{
name
:
'tbitem7'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem8
:
{
name
:
'tbitem8'
,
caption
:
'删除'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'删除'
,
iconcls
:
'fa fa-remove'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
},
class
:
''
},
tbitem9
:
{
name
:
'tbitem9'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem13
:
{
name
:
'tbitem13'
,
caption
:
'导出'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'导出'
,
iconcls
:
'fa fa-file-excel-o'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportExcel'
,
target
:
''
},
MaxRowCount
:
1000
,
class
:
''
},
tbitem10
:
{
name
:
'tbitem10'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem14_active
:
{
name
:
'tbitem14_active'
,
caption
:
'激活'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'激活'
,
iconcls
:
'fa fa-play-circle-o'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Active'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem15
:
{
name
:
'tbitem15'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem19
:
{
name
:
'tbitem19'
,
caption
:
'过滤'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'过滤'
,
iconcls
:
'fa fa-filter'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ToggleFilter'
,
target
:
''
},
class
:
''
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'9433b49c4e43a15dfc8bbd91bdd4c27f'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof AccountStopGridViewBase
*/
public
engine
:
GridViewEngine
=
new
GridViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof AccountStopGridViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
opendata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
opendata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
newdata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
newdata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
grid
:
this
.
$refs
.
grid
,
searchform
:
this
.
$refs
.
searchform
,
keyPSDEField
:
'account'
,
majorPSDEField
:
'accountname'
,
isLoadDefault
:
true
,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
):
void
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_openquickcreateview'
))
{
this
.
toolbar_tbitem1_openquickcreateview_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem4'
))
{
this
.
toolbar_tbitem4_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem6'
))
{
this
.
toolbar_tbitem6_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem8'
))
{
this
.
toolbar_tbitem8_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem13'
))
{
this
.
toolbar_tbitem13_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem11'
))
{
this
.
toolbar_tbitem11_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem14_active'
))
{
this
.
toolbar_tbitem14_active_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem19'
))
{
this
.
toolbar_tbitem19_click
(
null
,
''
,
$event2
);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
grid_selectionchange
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'selectionchange'
,
$event
);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
grid_beforeload
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'beforeload'
,
$event
);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
grid_rowdblclick
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'rowdblclick'
,
$event
);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
grid_remove
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'remove'
,
$event
);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
grid_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'load'
,
$event
);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'save'
,
$event
);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'search'
,
$event
);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountStopGridViewBase
*/
public
searchform_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'load'
,
$event
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem1_openquickcreateview_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_OpenQuickCreateView
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem4_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Edit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem6_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Copy
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem8_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Remove
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem13_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ExportExcel
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem11_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Print
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem14_active_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_Active
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem19_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ToggleFilter
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof AccountStopGridView
*/
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
if
(
args
[
0
].
srfsourcekey
){
data
.
srfsourcekey
=
args
[
0
].
srfsourcekey
;
}
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
delete
tempContext
.
account
;
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
_data
:
any
=
{
w
:
(
new
Date
().
getTime
())
};
Object
.
assign
(
_data
,
data
);
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
_data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof AccountStopGridView
*/
public
opendata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'info'
,
parameterName
:
'info'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountStopGridViewBase
*/
public
Edit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
opendata
&&
_this
.
opendata
instanceof
Function
)
{
const
data
:
any
=
{
};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
account
:
args
[
0
].
account
})
}
_this
.
opendata
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountStopGridViewBase
*/
public
Copy
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
newdata
&&
_this
.
newdata
instanceof
Function
)
{
const
data
:
any
=
{};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
srfsourcekey
:
args
[
0
].
srfkey
})
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
_this
.
newdata
([{
...
data
}],[{
...
data
}],
params
,
$event
,
xData
);
}
else
if
(
xData
&&
xData
.
copy
instanceof
Function
)
{
if
(
args
.
length
>
0
)
{
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
xData
.
copy
(
args
[
0
].
srfkey
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountStopGridViewBase
*/
public
Remove
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
remove
instanceof
Function
))
{
return
;
}
xData
.
remove
(
args
);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountStopGridViewBase
*/
public
ExportExcel
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
exportExcel
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
exportExcel
(
$event
.
exportparms
);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountStopGridViewBase
*/
public
Print
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
let
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
print
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
print
();
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountStopGridViewBase
*/
public
ToggleFilter
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
_this
.
hasOwnProperty
(
'isExpandSearchForm'
))
{
_this
.
isExpandSearchForm
=
!
_this
.
isExpandSearchForm
;
}
}
}
\ No newline at end of file
app_CRM/src/pages/base/account-stop-grid-view/account-stop-grid-view.html
0 → 100644
浏览文件 @
8fa3fa17
<studio-view-style2
viewName=
"accountstopgridview"
viewTitle=
"客户表格视图"
class=
'degridview account-stop-grid-view'
>
<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>
<template
slot=
"searchForm"
>
<view
_searchform
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
v-show=
"isExpandSearchForm"
loaddraftAction=
"FilterGetDraft"
loadAction=
"FilterGet"
name=
"searchform"
ref=
'searchform'
@
save=
"searchform_save($event)"
@
search=
"searchform_search($event)"
@
load=
"searchform_load($event)"
@
closeview=
"closeView($event)"
>
</view
_searchform
>
</template>
<view
_grid
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:isSingleSelect=
"isGridSingleSelect"
:showBusyIndicator=
"true"
:isOpenEdit=
"false"
:gridRowActiveMode=
"gridRowActiveMode"
@
save=
"onSave"
updateAction=
""
removeAction=
"Remove"
loaddraftAction=
""
loadAction=
""
createAction=
""
fetchAction=
"FetchStop"
:newdata=
"newdata"
:opendata=
"opendata"
name=
"grid"
ref=
'grid'
@
selectionchange=
"grid_selectionchange($event)"
@
beforeload=
"grid_beforeload($event)"
@
rowdblclick=
"grid_rowdblclick($event)"
@
remove=
"grid_remove($event)"
@
load=
"grid_load($event)"
@
closeview=
"closeView($event)"
>
</view
_grid
>
</studio-view-style2>
\ No newline at end of file
app_CRM/src/pages/base/account-stop-grid-view/account-stop-grid-view.vue
0 → 100644
浏览文件 @
8fa3fa17
<
template
src=
"./account-stop-grid-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { AccountStopGridViewBase } from './account-stop-grid-view-base';
import view_grid from '@widgets/account/main-grid/main-grid.vue';
import view_searchform from '@widgets/account/default-searchform/default-searchform.vue';
/**
* 客户表格视图视图
*
* @export
* @class AccountStopGridView
* @extends {AccountStopGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
}
})
@VueLifeCycleProcessing()
export default class AccountStopGridView extends AccountStopGridViewBase { }
</script>
app_CRM/src/pages/base/account-usable-grid-view/account-usable-grid-view-base.tsx
0 → 100644
浏览文件 @
8fa3fa17
import
{
Subject
}
from
'rxjs'
;
import
{
GridViewBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
GridViewEngine
from
'@engine/view/grid-view-engine'
;
import
AccountUIService
from
'@/uiservice/account/account-ui-service'
;
import
CodeListService
from
"@service/app/codelist-service"
;
/**
* 客户表格视图视图基类
*
* @export
* @class AccountUsableGridViewBase
* @extends {GridViewBase}
*/
export
class
AccountUsableGridViewBase
extends
GridViewBase
{
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof AccountUsableGridViewBase
*/
protected
appEntityService
:
AccountService
=
new
AccountService
;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof AccountUsableGridViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof AccountUsableGridViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.account.views.usablegridview.caption'
,
srfTitle
:
'entities.account.views.usablegridview.title'
,
srfSubTitle
:
'entities.account.views.usablegridview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof AccountUsableGridViewBase
*/
protected
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
/**
* 工具栏模型
*
* @type {*}
* @memberof AccountUsableGridView
*/
public
toolBarModels
:
any
=
{
tbitem1_openquickcreateview
:
{
name
:
'tbitem1_openquickcreateview'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-user-plus'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenQuickCreateView'
,
target
:
'NONE'
},
class
:
''
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem6
:
{
name
:
'tbitem6'
,
caption
:
'拷贝'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'拷贝'
,
iconcls
:
'fa fa-copy'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem7
:
{
name
:
'tbitem7'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem8
:
{
name
:
'tbitem8'
,
caption
:
'删除'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'删除'
,
iconcls
:
'fa fa-remove'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
},
class
:
''
},
tbitem9
:
{
name
:
'tbitem9'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem13
:
{
name
:
'tbitem13'
,
caption
:
'导出'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'导出'
,
iconcls
:
'fa fa-file-excel-o'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportExcel'
,
target
:
''
},
MaxRowCount
:
1000
,
class
:
''
},
tbitem10
:
{
name
:
'tbitem10'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem14_inactive
:
{
name
:
'tbitem14_inactive'
,
caption
:
'停用'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'停用'
,
iconcls
:
'fa fa-minus-circle'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Inactive'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem15
:
{
name
:
'tbitem15'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem19
:
{
name
:
'tbitem19'
,
caption
:
'过滤'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'过滤'
,
iconcls
:
'fa fa-filter'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ToggleFilter'
,
target
:
''
},
class
:
''
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'6d920bddee09ffdf2e18a0701ab9e9e7'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof AccountUsableGridViewBase
*/
public
engine
:
GridViewEngine
=
new
GridViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof AccountUsableGridViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
opendata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
opendata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
newdata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
newdata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
grid
:
this
.
$refs
.
grid
,
searchform
:
this
.
$refs
.
searchform
,
keyPSDEField
:
'account'
,
majorPSDEField
:
'accountname'
,
isLoadDefault
:
true
,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
):
void
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_openquickcreateview'
))
{
this
.
toolbar_tbitem1_openquickcreateview_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem4'
))
{
this
.
toolbar_tbitem4_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem6'
))
{
this
.
toolbar_tbitem6_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem8'
))
{
this
.
toolbar_tbitem8_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem13'
))
{
this
.
toolbar_tbitem13_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem11'
))
{
this
.
toolbar_tbitem11_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem14_inactive'
))
{
this
.
toolbar_tbitem14_inactive_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem19'
))
{
this
.
toolbar_tbitem19_click
(
null
,
''
,
$event2
);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
grid_selectionchange
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'selectionchange'
,
$event
);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
grid_beforeload
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'beforeload'
,
$event
);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
grid_rowdblclick
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'rowdblclick'
,
$event
);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
grid_remove
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'remove'
,
$event
);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
grid_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'load'
,
$event
);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'save'
,
$event
);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'search'
,
$event
);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountUsableGridViewBase
*/
public
searchform_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'load'
,
$event
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem1_openquickcreateview_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_OpenQuickCreateView
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem4_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Edit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem6_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Copy
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem8_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Remove
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem13_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ExportExcel
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem11_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Print
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem14_inactive_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_Inactive
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem19_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ToggleFilter
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof AccountUsableGridView
*/
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
if
(
args
[
0
].
srfsourcekey
){
data
.
srfsourcekey
=
args
[
0
].
srfsourcekey
;
}
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
delete
tempContext
.
account
;
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
_data
:
any
=
{
w
:
(
new
Date
().
getTime
())
};
Object
.
assign
(
_data
,
data
);
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
_data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof AccountUsableGridView
*/
public
opendata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'info'
,
parameterName
:
'info'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountUsableGridViewBase
*/
public
Edit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
opendata
&&
_this
.
opendata
instanceof
Function
)
{
const
data
:
any
=
{
};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
account
:
args
[
0
].
account
})
}
_this
.
opendata
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountUsableGridViewBase
*/
public
Copy
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
newdata
&&
_this
.
newdata
instanceof
Function
)
{
const
data
:
any
=
{};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
srfsourcekey
:
args
[
0
].
srfkey
})
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
_this
.
newdata
([{
...
data
}],[{
...
data
}],
params
,
$event
,
xData
);
}
else
if
(
xData
&&
xData
.
copy
instanceof
Function
)
{
if
(
args
.
length
>
0
)
{
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
xData
.
copy
(
args
[
0
].
srfkey
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountUsableGridViewBase
*/
public
Remove
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
remove
instanceof
Function
))
{
return
;
}
xData
.
remove
(
args
);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountUsableGridViewBase
*/
public
ExportExcel
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
exportExcel
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
exportExcel
(
$event
.
exportparms
);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountUsableGridViewBase
*/
public
Print
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
let
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
print
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
print
();
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountUsableGridViewBase
*/
public
ToggleFilter
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
_this
.
hasOwnProperty
(
'isExpandSearchForm'
))
{
_this
.
isExpandSearchForm
=
!
_this
.
isExpandSearchForm
;
}
}
}
\ No newline at end of file
app_CRM/src/pages/base/account-usable-grid-view/account-usable-grid-view.html
0 → 100644
浏览文件 @
8fa3fa17
<studio-view-style2
viewName=
"accountusablegridview"
viewTitle=
"客户表格视图"
class=
'degridview account-usable-grid-view'
>
<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>
<template
slot=
"searchForm"
>
<view
_searchform
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
v-show=
"isExpandSearchForm"
loaddraftAction=
"FilterGetDraft"
loadAction=
"FilterGet"
name=
"searchform"
ref=
'searchform'
@
save=
"searchform_save($event)"
@
search=
"searchform_search($event)"
@
load=
"searchform_load($event)"
@
closeview=
"closeView($event)"
>
</view
_searchform
>
</template>
<view
_grid
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:isSingleSelect=
"isGridSingleSelect"
:showBusyIndicator=
"true"
:isOpenEdit=
"false"
:gridRowActiveMode=
"gridRowActiveMode"
@
save=
"onSave"
updateAction=
""
removeAction=
"Remove"
loaddraftAction=
""
loadAction=
""
createAction=
""
fetchAction=
"FetchUsable"
:newdata=
"newdata"
:opendata=
"opendata"
name=
"grid"
ref=
'grid'
@
selectionchange=
"grid_selectionchange($event)"
@
beforeload=
"grid_beforeload($event)"
@
rowdblclick=
"grid_rowdblclick($event)"
@
remove=
"grid_remove($event)"
@
load=
"grid_load($event)"
@
closeview=
"closeView($event)"
>
</view
_grid
>
</studio-view-style2>
\ No newline at end of file
app_CRM/src/pages/base/account-usable-grid-view/account-usable-grid-view.vue
0 → 100644
浏览文件 @
8fa3fa17
<
template
src=
"./account-usable-grid-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { AccountUsableGridViewBase } from './account-usable-grid-view-base';
import view_grid from '@widgets/account/main-grid/main-grid.vue';
import view_searchform from '@widgets/account/default-searchform/default-searchform.vue';
/**
* 客户表格视图视图
*
* @export
* @class AccountUsableGridView
* @extends {AccountUsableGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
}
})
@VueLifeCycleProcessing()
export default class AccountUsableGridView extends AccountUsableGridViewBase { }
</script>
app_CRM/src/pages/ungroup/central/page-register.ts
浏览文件 @
8fa3fa17
export
const
PageComponents
=
{
install
(
Vue
:
any
,
opt
:
any
)
{
Vue
.
component
(
'account-gradation'
,
()
=>
import
(
'@pages/base/account-gradation/account-gradation.vue'
));
Vue
.
component
(
'account-quick-create'
,
()
=>
import
(
'@pages/base/account-quick-create/account-quick-create.vue'
));
Vue
.
component
(
'account-quick-create'
,
()
=>
import
(
'@pages/base/account-quick-create/account-quick-create.vue'
));
Vue
.
component
(
'goal-child-goal-grid-view'
,
()
=>
import
(
'@pages/sales/goal-child-goal-grid-view/goal-child-goal-grid-view.vue'
));
Vue
.
component
(
'incident-edit-chlid-incident'
,
()
=>
import
(
'@pages/service/incident-edit-chlid-incident/incident-edit-chlid-incident.vue'
));
Vue
.
component
(
'invoice-info-invoice-view'
,
()
=>
import
(
'@pages/finance/invoice-info-invoice-view/invoice-info-invoice-view.vue'
));
Vue
.
component
(
'product-price-level-pro-prilv-grid-view'
,
()
=>
import
(
'@pages/product/product-price-level-pro-prilv-grid-view/product-price-level-pro-prilv-grid-view.vue'
));
Vue
.
component
(
'list-account-by-list'
,
()
=>
import
(
'@pages/marketing/list-account-by-list/list-account-by-list.vue'
));
Vue
.
component
(
'product-info-pro-info'
,
()
=>
import
(
'@pages/product/product-info-pro-info/product-info-pro-info.vue'
));
Vue
.
component
(
'competitor-option-view'
,
()
=>
import
(
'@pages/sales/competitor-option-view/competitor-option-view.vue'
));
Vue
.
component
(
'campaign-response-by-parent-key'
,
()
=>
import
(
'@pages/marketing/campaign-response-by-parent-key/campaign-response-by-parent-key.vue'
));
Vue
.
component
(
'competitor-option-view'
,
()
=>
import
(
'@pages/sales/competitor-option-view/competitor-option-view.vue'
));
Vue
.
component
(
'account-edit-view'
,
()
=>
import
(
'@pages/base/account-edit-view/account-edit-view.vue'
));
Vue
.
component
(
'sales-literature-summary-view'
,
()
=>
import
(
'@pages/sales/sales-literature-summary-view/sales-literature-summary-view.vue'
));
Vue
.
component
(
'lead-pickup-view'
,
()
=>
import
(
'@pages/sales/lead-pickup-view/lead-pickup-view.vue'
));
...
...
@@ -130,6 +129,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
(
'lead-qualification'
,
()
=>
import
(
'@pages/sales/lead-qualification/lead-qualification.vue'
));
Vue
.
component
(
'account-status-tab-view'
,
()
=>
import
(
'@pages/base/account-status-tab-view/account-status-tab-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'
));
...
...
@@ -149,6 +149,7 @@ export const PageComponents = {
Vue
.
component
(
'opportunity-competitor-edit-view'
,
()
=>
import
(
'@pages/sales/opportunity-competitor-edit-view/opportunity-competitor-edit-view.vue'
));
Vue
.
component
(
'incident-info-incident-view'
,
()
=>
import
(
'@pages/service/incident-info-incident-view/incident-info-incident-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
(
'account-usable-grid-view'
,
()
=>
import
(
'@pages/base/account-usable-grid-view/account-usable-grid-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
(
'entitlement-pickup-view'
,
()
=>
import
(
'@pages/service/entitlement-pickup-view/entitlement-pickup-view.vue'
));
...
...
@@ -161,6 +162,7 @@ export const PageComponents = {
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
(
'quote-detail-edit-view'
,
()
=>
import
(
'@pages/sales/quote-detail-edit-view/quote-detail-edit-view.vue'
));
Vue
.
component
(
'account-stop-grid-view'
,
()
=>
import
(
'@pages/base/account-stop-grid-view/account-stop-grid-view.vue'
));
Vue
.
component
(
'quote-edit-view'
,
()
=>
import
(
'@pages/sales/quote-edit-view/quote-edit-view.vue'
));
Vue
.
component
(
'incident-grid-view'
,
()
=>
import
(
'@pages/service/incident-grid-view/incident-grid-view.vue'
));
Vue
.
component
(
'account-inner-pickup-view'
,
()
=>
import
(
'@pages/base/account-inner-pickup-view/account-inner-pickup-view.vue'
));
...
...
app_CRM/src/pages/ungroup/central/router.ts
浏览文件 @
8fa3fa17
...
...
@@ -47,20 +47,6 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/ungroup/central/central.vue'
),
children
:
[
{
path
:
'accounts/:account?/gradation/:gradation?'
,
meta
:
{
caption
:
'entities.account.views.gradation.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'gradation'
,
parameterName
:
'gradation'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/account-gradation/account-gradation.vue'
),
},
{
path
:
'accounts/:account?/quickcreate/:quickcreate?'
,
meta
:
{
...
...
@@ -205,32 +191,32 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/product/product-info-pro-info/product-info-pro-info.vue'
),
},
{
path
:
'c
ompetitors/:competitor?/optionview/:optionview
?'
,
path
:
'c
ampaignresponses/:campaignresponse?/byparentkey/:byparentkey
?'
,
meta
:
{
caption
:
'entities.c
ompetitor.views.optionview
.title'
,
caption
:
'entities.c
ampaignresponse.views.byparentkey
.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'c
ompetitors'
,
parameterName
:
'competitor
'
},
{
pathName
:
'
optionview'
,
parameterName
:
'optionview
'
},
{
pathName
:
'c
ampaignresponses'
,
parameterName
:
'campaignresponse
'
},
{
pathName
:
'
byparentkey'
,
parameterName
:
'byparentkey
'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/
sales/competitor-option-view/competitor-option-view
.vue'
),
component
:
()
=>
import
(
'@pages/
marketing/campaign-response-by-parent-key/campaign-response-by-parent-key
.vue'
),
},
{
path
:
'c
ampaignresponses/:campaignresponse?/byparentkey/:byparentkey
?'
,
path
:
'c
ompetitors/:competitor?/optionview/:optionview
?'
,
meta
:
{
caption
:
'entities.c
ampaignresponse.views.byparentkey
.title'
,
caption
:
'entities.c
ompetitor.views.optionview
.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'c
ampaignresponses'
,
parameterName
:
'campaignresponse
'
},
{
pathName
:
'
byparentkey'
,
parameterName
:
'byparentkey
'
},
{
pathName
:
'c
ompetitors'
,
parameterName
:
'competitor
'
},
{
pathName
:
'
optionview'
,
parameterName
:
'optionview
'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/
marketing/campaign-response-by-parent-key/campaign-response-by-parent-key
.vue'
),
component
:
()
=>
import
(
'@pages/
sales/competitor-option-view/competitor-option-view
.vue'
),
},
{
path
:
'accounts/:account?/editview/:editview?'
,
...
...
@@ -3537,6 +3523,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sales/competitor-sales-literature-sal-lit-comp-grid-view/competitor-sales-literature-sal-lit-comp-grid-view.vue'
),
},
{
path
:
'accounts/:account?/statustabview/:statustabview?'
,
meta
:
{
caption
:
'entities.account.views.statustabview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'statustabview'
,
parameterName
:
'statustabview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/account-status-tab-view/account-status-tab-view.vue'
),
},
{
path
:
'ibizlists/:ibizlist?/summary/:summary?'
,
meta
:
{
...
...
@@ -4274,6 +4274,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sales/competitor-sales-literature-sal-lit-comp-edit-view/competitor-sales-literature-sal-lit-comp-edit-view.vue'
),
},
{
path
:
'accounts/:account?/usablegridview/:usablegridview?'
,
meta
:
{
caption
:
'entities.account.views.usablegridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'usablegridview'
,
parameterName
:
'usablegridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/account-usable-grid-view/account-usable-grid-view.vue'
),
},
{
path
:
'salesorders/:salesorder?/info_soview/:info_soview?'
,
meta
:
{
...
...
@@ -4597,6 +4611,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sales/quote-detail-edit-view/quote-detail-edit-view.vue'
),
},
{
path
:
'accounts/:account?/stopgridview/:stopgridview?'
,
meta
:
{
caption
:
'entities.account.views.stopgridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'stopgridview'
,
parameterName
:
'stopgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/base/account-stop-grid-view/account-stop-grid-view.vue'
),
},
{
path
:
'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/editview/:editview?'
,
meta
:
{
...
...
app_CRM/src/service/account/account-service-base.ts
浏览文件 @
8fa3fa17
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
import
ActiveLogic
from
'@/service/account/active-logic'
;
import
InactiveLogic
from
'@/service/account/inactive-logic'
;
...
...
@@ -210,7 +212,9 @@ export default class AccountServiceBase extends EntityService {
* @memberof AccountServiceBase
*/
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/active`
,
data
,
isloading
);
let
appLogic
:
ActiveLogic
=
new
ActiveLogic
({
context
:
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))});
const
result
=
await
appLogic
.
onExecute
(
context
,
data
,
isloading
?
true
:
false
);
return
{
status
:
200
,
data
:
result
};
}
/**
...
...
@@ -249,7 +253,9 @@ export default class AccountServiceBase extends EntityService {
* @memberof AccountServiceBase
*/
public
async
Inactive
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/inactive`
,
data
,
isloading
);
let
appLogic
:
InactiveLogic
=
new
InactiveLogic
({
context
:
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))});
const
result
=
await
appLogic
.
onExecute
(
context
,
data
,
isloading
?
true
:
false
);
return
{
status
:
200
,
data
:
result
};
}
/**
...
...
@@ -327,4 +333,32 @@ export default class AccountServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/fetchroot`
,
tempData
,
isloading
);
}
/**
* FetchStop接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof AccountServiceBase
*/
public
async
FetchStop
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/fetchstop`
,
tempData
,
isloading
);
}
/**
* FetchUsable接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof AccountServiceBase
*/
public
async
FetchUsable
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/fetchusable`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_CRM/src/service/account/active-logic-base.ts
0 → 100644
浏览文件 @
8fa3fa17
import
AccountService
from
'@/service/account/account-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 激活
*
* @export
* @class ActiveLogicBase
*/
export
default
class
ActiveLogicBase
{
/**
* 名称
*
* @memberof ActiveLogicBase
*/
private
name
:
string
=
"Active"
;
/**
* 唯一标识
*
* @memberof ActiveLogicBase
*/
private
id
:
string
=
"BEBE0B69-F45C-4F13-94CF-B99C8EBC1958"
;
/**
* 默认参数名称
*
* @memberof ActiveLogicBase
*/
private
defaultParamName
:
string
=
"Default"
;
/**
* 参数集合
*
* @memberof ActiveLogicBase
*/
private
paramsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of ActiveLogicBase.
*
* @param {*} [opts={}]
* @memberof ActiveLogicBase
*/
constructor
(
opts
:
any
=
{})
{
this
.
initParams
(
opts
);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof ActiveLogicBase
*/
public
initParams
(
opts
:
any
){
this
.
paramsMap
.
set
(
'Default'
,
opts
);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public
compute0Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public
compute1Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public
onExecute
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
return
this
.
executeBegin
(
context
,
params
,
isloading
);
}
/**
* 更新客户状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executeDeaction1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 行为处理节点
let
result
:
any
;
let
actionParam
:
any
=
this
.
paramsMap
.
get
(
'Default'
);
const
targetService
:
AccountService
=
new
AccountService
();
if
(
targetService
[
'Update'
]
&&
targetService
[
'Update'
]
instanceof
Function
)
{
result
=
await
targetService
[
'Update'
](
actionParam
.
context
,
actionParam
.
data
,
false
);
}
if
(
result
&&
result
.
status
==
200
){
Object
.
assign
(
actionParam
.
data
,
result
.
data
);
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
/**
* 开始
*
* @param params 传入参数
*/
private
async
executeBegin
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
//开始节点
if
(
this
.
compute1Cond
(
params
)){
return
this
.
executePrepareparam1
(
context
,
params
,
isloading
);
}
}
/**
* 准备参数
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executePrepareparam1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 准备参数节点
let
tempDstParam0Context
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
context
?
this
.
paramsMap
.
get
(
'Default'
).
context
:{};
let
tempDstParam0Data
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
data
?
this
.
paramsMap
.
get
(
'Default'
).
data
:{};
Object
.
assign
(
tempDstParam0Data
,{
statuscode
:
"1"
});
this
.
paramsMap
.
set
(
'Default'
,{
data
:
tempDstParam0Data
,
context
:
tempDstParam0Context
});
if
(
this
.
compute0Cond
(
params
)){
return
this
.
executeDeaction1
(
context
,
params
,
isloading
);
}
}
}
\ No newline at end of file
app_CRM/src/service/account/active-logic.ts
0 → 100644
浏览文件 @
8fa3fa17
import
{
Http
,
Util
}
from
'@/utils'
;
import
ActiveLogicBase
from
'./active-logic-base'
;
/**
* 激活
*
* @export
* @class ActiveLogic
*/
export
default
class
ActiveLogic
extends
ActiveLogicBase
{
/**
* Creates an instance of ActiveLogic
*
* @param {*} [opts={}]
* @memberof ActiveLogic
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_CRM/src/service/account/inactive-logic-base.ts
0 → 100644
浏览文件 @
8fa3fa17
import
AccountService
from
'@/service/account/account-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 停用
*
* @export
* @class InactiveLogicBase
*/
export
default
class
InactiveLogicBase
{
/**
* 名称
*
* @memberof InactiveLogicBase
*/
private
name
:
string
=
"Inactive"
;
/**
* 唯一标识
*
* @memberof InactiveLogicBase
*/
private
id
:
string
=
"63D03E37-0794-4554-BBF9-6C0A60307A78"
;
/**
* 默认参数名称
*
* @memberof InactiveLogicBase
*/
private
defaultParamName
:
string
=
"Default"
;
/**
* 参数集合
*
* @memberof InactiveLogicBase
*/
private
paramsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of InactiveLogicBase.
*
* @param {*} [opts={}]
* @memberof InactiveLogicBase
*/
constructor
(
opts
:
any
=
{})
{
this
.
initParams
(
opts
);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof InactiveLogicBase
*/
public
initParams
(
opts
:
any
){
this
.
paramsMap
.
set
(
'Default'
,
opts
);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public
compute0Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public
compute1Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public
onExecute
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
return
this
.
executeBegin
(
context
,
params
,
isloading
);
}
/**
* 开始
*
* @param params 传入参数
*/
private
async
executeBegin
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
//开始节点
if
(
this
.
compute0Cond
(
params
)){
return
this
.
executePrepareparam1
(
context
,
params
,
isloading
);
}
}
/**
* 准备参数
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executePrepareparam1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 准备参数节点
let
tempDstParam0Context
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
context
?
this
.
paramsMap
.
get
(
'Default'
).
context
:{};
let
tempDstParam0Data
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
data
?
this
.
paramsMap
.
get
(
'Default'
).
data
:{};
Object
.
assign
(
tempDstParam0Data
,{
statuscode
:
"2"
});
this
.
paramsMap
.
set
(
'Default'
,{
data
:
tempDstParam0Data
,
context
:
tempDstParam0Context
});
if
(
this
.
compute1Cond
(
params
)){
return
this
.
executeDeaction1
(
context
,
params
,
isloading
);
}
}
/**
* 更新客户状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executeDeaction1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 行为处理节点
let
result
:
any
;
let
actionParam
:
any
=
this
.
paramsMap
.
get
(
'Default'
);
const
targetService
:
AccountService
=
new
AccountService
();
if
(
targetService
[
'Update'
]
&&
targetService
[
'Update'
]
instanceof
Function
)
{
result
=
await
targetService
[
'Update'
](
actionParam
.
context
,
actionParam
.
data
,
false
);
}
if
(
result
&&
result
.
status
==
200
){
Object
.
assign
(
actionParam
.
data
,
result
.
data
);
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
}
\ No newline at end of file
app_CRM/src/service/account/inactive-logic.ts
0 → 100644
浏览文件 @
8fa3fa17
import
{
Http
,
Util
}
from
'@/utils'
;
import
InactiveLogicBase
from
'./inactive-logic-base'
;
/**
* 停用
*
* @export
* @class InactiveLogic
*/
export
default
class
InactiveLogic
extends
InactiveLogicBase
{
/**
* Creates an instance of InactiveLogic
*
* @param {*} [opts={}]
* @memberof InactiveLogic
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
8fa3fa17
...
...
@@ -62,21 +62,21 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaigncampaign
s'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaigncampaign
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaign
sData
;
masterData
.
leads
=
lead
sData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -92,21 +92,21 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
campaigncampaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaigncampaign
s'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaigncampaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
campaigncampaigns
=
campaigncampaign
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class CampaignServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -133,21 +133,21 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaigncampaign
s'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaigncampaign
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaign
sData
;
masterData
.
leads
=
lead
sData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -163,26 +163,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
campaigncampaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaigncampaign
s'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaigncampaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
campaigncampaigns
=
campaigncampaign
sData
;
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
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -258,21 +258,21 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaigncampaign
s'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaigncampaign
sData
.
forEach
((
item
:
any
)
=>
{
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaign
sData
;
masterData
.
leads
=
lead
sData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -288,26 +288,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaignlists
=
campaignlistsData
;
let
lead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
s'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
lead
sData
.
forEach
((
item
:
any
)
=>
{
let
campaigncampaign
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaigncampaign
s'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaign
s'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaign
sData
.
length
>
0
){
campaigncampaign
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
lead
sData
;
masterData
.
campaigncampaigns
=
campaigncampaign
sData
;
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
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
8fa3fa17
...
...
@@ -66,21 +66,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
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -96,21 +96,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -120,27 +120,27 @@ export default class ContactServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -156,21 +156,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -180,9 +180,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
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
;
}
...
...
@@ -198,21 +198,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
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -228,44 +228,44 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -281,26 +281,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
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
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
;
}
...
...
@@ -332,15 +332,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
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
;
}
...
...
@@ -357,16 +357,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
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
;
}
...
...
@@ -382,21 +382,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -412,26 +412,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
}
/active`
,
data
,
isloading
);
...
...
@@ -449,21 +449,21 @@ export default class ContactServiceBase extends EntityService {
public
async
AddList
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -479,26 +479,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
}
/addlist`
,
data
,
isloading
);
...
...
@@ -516,21 +516,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
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -546,26 +546,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
);
...
...
@@ -583,21 +583,21 @@ export default class ContactServiceBase extends EntityService {
public
async
Inactive
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -613,26 +613,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/inactive`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
}
/inactive`
,
data
,
isloading
);
...
...
@@ -650,21 +650,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
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -680,44 +680,44 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -733,26 +733,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
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
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
;
}
...
...
@@ -768,21 +768,21 @@ export default class ContactServiceBase extends EntityService {
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
lead
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
istcontacts
=
listcontact
sData
;
masterData
.
l
eads
=
lead
sData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -798,26 +798,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
l
ead
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
ead
s'
),
'undefined'
)){
l
eadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
s'
)
as
any
);
if
(
l
eadsData
&&
leadsData
.
length
&&
lead
sData
.
length
>
0
){
l
ead
sData
.
forEach
((
item
:
any
)
=>
{
let
l
istcontact
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_l
istcontact
s'
),
'undefined'
)){
l
istcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontact
s'
)
as
any
);
if
(
l
istcontactsData
&&
listcontactsData
.
length
&&
listcontact
sData
.
length
>
0
){
l
istcontact
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
lead
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
l
eads
=
lead
sData
;
masterData
.
l
istcontacts
=
listcontact
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
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
}
/setprimary`
,
data
,
isloading
);
...
...
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
8fa3fa17
...
...
@@ -62,11 +62,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -76,12 +76,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
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
.
campaignlists
=
campaignlis
tsData
;
let
list
account
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
account
s'
),
'undefined'
)){
list
accountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccount
s'
)
as
any
);
if
(
list
accountsData
&&
listaccountsData
.
length
&&
listaccount
sData
.
length
>
0
){
list
account
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -91,12 +91,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
accounts
=
listaccount
sData
;
let
listcontac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listcontac
ts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontac
ts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontac
tsData
.
length
>
0
){
listcontac
tsData
.
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
.
campaignlists
=
campaignlis
tsData
;
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
)
=>
{
masterData
.
listcontacts
=
listcontac
tsData
;
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
;
...
...
@@ -121,7 +121,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontact
sData
;
masterData
.
list
leads
=
listlead
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_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
));
return
res
;
}
...
...
@@ -149,11 +149,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -163,12 +163,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
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
.
campaignlists
=
campaignlis
tsData
;
let
list
account
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
account
s'
),
'undefined'
)){
list
accountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccount
s'
)
as
any
);
if
(
list
accountsData
&&
listaccountsData
.
length
&&
listaccount
sData
.
length
>
0
){
list
account
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -178,12 +178,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
accounts
=
listaccount
sData
;
let
listcontac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listcontac
ts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontac
ts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontac
tsData
.
length
>
0
){
listcontac
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -193,12 +193,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
campaignlists
=
campaignlis
tsData
;
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
)
=>
{
masterData
.
listcontacts
=
listcontac
tsData
;
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
;
...
...
@@ -208,13 +208,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontact
sData
;
masterData
.
list
leads
=
listlead
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
return
res
;
}
...
...
@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
return
res
;
}
...
...
@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizlists/getdraft`
,
isloading
);
res
.
data
.
ibizlist
=
data
.
ibizlist
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
return
res
;
}
...
...
@@ -292,11 +292,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
listaccoun
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listaccoun
ts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccoun
ts'
)
as
any
);
if
(
listaccountsData
&&
listaccountsData
.
length
&&
listaccoun
tsData
.
length
>
0
){
listaccoun
tsData
.
forEach
((
item
:
any
)
=>
{
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -306,12 +306,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
listaccounts
=
listaccoun
tsData
;
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
.
campaignlists
=
campaignlis
tsData
;
let
list
account
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_list
account
s'
),
'undefined'
)){
list
accountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccount
s'
)
as
any
);
if
(
list
accountsData
&&
listaccountsData
.
length
&&
listaccount
sData
.
length
>
0
){
list
account
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -321,12 +321,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
leads
=
listlead
sData
;
let
campaignlis
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
campaignlis
ts'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlis
ts'
)
as
any
);
if
(
campaignlistsData
&&
campaignlistsData
.
length
&&
campaignlis
tsData
.
length
>
0
){
campaignlis
tsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
list
accounts
=
listaccount
sData
;
let
listcontac
tsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
listcontac
ts'
),
'undefined'
)){
listcontactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontac
ts'
)
as
any
);
if
(
listcontactsData
&&
listcontactsData
.
length
&&
listcontac
tsData
.
length
>
0
){
listcontac
tsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -336,12 +336,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
campaignlists
=
campaignlis
tsData
;
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
)
=>
{
masterData
.
listcontacts
=
listcontac
tsData
;
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
;
...
...
@@ -351,13 +351,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData
.
list
contacts
=
listcontact
sData
;
masterData
.
list
leads
=
listlead
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listleads'
,
JSON
.
stringify
(
res
.
data
.
listleads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
return
res
;
}
...
...
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
8fa3fa17
...
...
@@ -84,36 +84,36 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -124,8 +124,8 @@ export default class OpportunityServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
true
){
...
...
@@ -145,36 +145,36 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -185,8 +185,8 @@ export default class OpportunityServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -205,36 +205,36 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -245,8 +245,8 @@ export default class OpportunityServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -277,41 +277,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -331,41 +331,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -384,41 +384,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -454,21 +454,21 @@ export default class OpportunityServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -486,23 +486,23 @@ export default class OpportunityServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -533,41 +533,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -587,41 +587,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
...
...
@@ -654,41 +654,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -708,41 +708,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -775,41 +775,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -829,41 +829,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/lose`
,
data
,
isloading
);
...
...
@@ -896,41 +896,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -950,41 +950,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -1003,41 +1003,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -1068,41 +1068,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
...
...
@@ -1122,41 +1122,41 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
quote
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
let
quote
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
quote
s'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quote
s'
)
as
any
);
if
(
quotesData
&&
quotesData
.
length
&&
quote
sData
.
length
>
0
){
quote
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
quotes
=
quote
sData
;
let
opportunitycompetitor
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunitycompetitor
s'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitor
s'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunitycompetitor
sData
.
length
>
0
){
opportunitycompetitor
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
quote
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
quotes
=
quote
sData
;
masterData
.
opportunitycompetitors
=
opportunitycompetitor
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/win`
,
data
,
isloading
);
...
...
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
8fa3fa17
...
...
@@ -62,21 +62,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
association
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
association
s'
),
'undefined'
)){
product
associationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociation
s'
)
as
any
);
if
(
product
associationsData
&&
productassociationsData
.
length
&&
productassociation
sData
.
length
>
0
){
product
association
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
association
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
associations
=
productassociation
sData
;
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -92,21 +92,21 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productsubstitutes
=
productsubstitutesData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
let
product
association
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
association
s'
),
'undefined'
)){
product
associationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociation
s'
)
as
any
);
if
(
product
associationsData
&&
productassociationsData
.
length
&&
productassociation
sData
.
length
>
0
){
product
association
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
association
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
associations
=
productassociation
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -133,21 +133,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
association
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
association
s'
),
'undefined'
)){
product
associationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociation
s'
)
as
any
);
if
(
product
associationsData
&&
productassociationsData
.
length
&&
productassociation
sData
.
length
>
0
){
product
association
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
association
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
associations
=
productassociation
sData
;
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -163,26 +163,26 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productsubstitutes
=
productsubstitutesData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
let
product
association
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
association
s'
),
'undefined'
)){
product
associationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociation
s'
)
as
any
);
if
(
product
associationsData
&&
productassociationsData
.
length
&&
productassociation
sData
.
length
>
0
){
product
association
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
association
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
associations
=
productassociation
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/products/
${
context
.
product
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
res
.
data
.
product
=
data
.
product
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
@@ -258,21 +258,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
association
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
association
s'
),
'undefined'
)){
product
associationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociation
s'
)
as
any
);
if
(
product
associationsData
&&
productassociationsData
.
length
&&
productassociation
sData
.
length
>
0
){
product
association
sData
.
forEach
((
item
:
any
)
=>
{
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
association
id
=
null
;
item
.
product
pricelevel
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
associations
=
productassociation
sData
;
masterData
.
product
pricelevels
=
productpricelevel
sData
;
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -288,26 +288,26 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productsubstitutes
=
productsubstitutesData
;
let
product
pricelevel
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
pricelevel
s'
),
'undefined'
)){
product
pricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevel
s'
)
as
any
);
if
(
product
pricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevel
sData
.
length
>
0
){
product
pricelevel
sData
.
forEach
((
item
:
any
)
=>
{
let
product
association
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
association
s'
),
'undefined'
)){
product
associationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productassociation
s'
)
as
any
);
if
(
product
associationsData
&&
productassociationsData
.
length
&&
productassociation
sData
.
length
>
0
){
product
association
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
product
pricelevel
id
=
null
;
item
.
product
association
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
product
pricelevels
=
productpricelevel
sData
;
masterData
.
product
associations
=
productassociation
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products/
${
context
.
product
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
return
res
;
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
8fa3fa17
...
...
@@ -62,21 +62,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
...
...
@@ -92,21 +92,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
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
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -133,21 +133,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
...
...
@@ -163,26 +163,26 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
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
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/getdraft`
,
isloading
);
res
.
data
.
salesliterature
=
data
.
salesliterature
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
@@ -258,21 +258,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
let
salesliteratureitem
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
salesliteratureitem
s'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitem
s'
)
as
any
);
if
(
salesliteratureitemsData
&&
salesliteratureitemsData
.
length
&&
salesliteratureitem
sData
.
length
>
0
){
salesliteratureitem
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationships
id
=
null
;
item
.
salesliteratureitem
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
let
competitorsalesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
)
as
any
);
...
...
@@ -288,26 +288,26 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData
.
competitorsalesliteratures
=
competitorsalesliteraturesData
;
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
productsalesliterature
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
productsalesliterature
s'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsalesliterature
s'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
productsalesliterature
sData
.
length
>
0
){
productsalesliterature
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesliteratureitem
id
=
null
;
item
.
relationships
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesliteratureitems
=
salesliteratureitem
sData
;
masterData
.
productsalesliteratures
=
productsalesliterature
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures/
${
context
.
salesliterature
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
return
res
;
}
...
...
app_CRM/src/store/modules/view-action/state.ts
浏览文件 @
8fa3fa17
...
...
@@ -312,6 +312,18 @@ export const viewstate: any = {
refviews
:
[
],
},
{
viewtag
:
'25bf5f8c2ebd1ce2be6d06717ed08a96'
,
viewmodule
:
'Base'
,
viewname
:
'AccountStatusTabView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'5c7e90ccfaeb49b5bd84ae6c17b479e3'
,
'6d920bddee09ffdf2e18a0701ab9e9e7'
,
'9433b49c4e43a15dfc8bbd91bdd4c27f'
,
],
},
{
viewtag
:
'264e13762a19c63707b3aa5718afa303'
,
viewmodule
:
'Marketing'
,
...
...
@@ -860,17 +872,6 @@ export const viewstate: any = {
refviews
:
[
],
},
{
viewtag
:
'6978259896338a7ace85a9fbc5d70395'
,
viewmodule
:
'Base'
,
viewname
:
'AccountGradation'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'5c7e90ccfaeb49b5bd84ae6c17b479e3'
,
'6e18ac74e5685439110f9b4e534ee005'
,
],
},
{
viewtag
:
'6c67094479c2f8af7ea1575eee584056'
,
viewmodule
:
'Sales'
,
...
...
@@ -890,6 +891,18 @@ export const viewstate: any = {
refviews
:
[
],
},
{
viewtag
:
'6d920bddee09ffdf2e18a0701ab9e9e7'
,
viewmodule
:
'Base'
,
viewname
:
'AccountUsableGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'a69ba7dd2f8bdac8a3c733dcc79c0ee5'
,
'2e9c7792c3a728896ca8902634f71983'
,
'6e18ac74e5685439110f9b4e534ee005'
,
],
},
{
viewtag
:
'6debde861c6e6f91eeb442cb869e9737'
,
viewmodule
:
'Sales'
,
...
...
@@ -1099,8 +1112,8 @@ export const viewstate: any = {
refviews
:
[
'07c5035fbb847e889f3dbb9657723f30'
,
'24a93674ec4c976c08902a3e95421ca6'
,
'6978259896338a7ace85a9fbc5d70395'
,
'b38bc0256ecd5be1a58a3c2210a98d05'
,
'25bf5f8c2ebd1ce2be6d06717ed08a96'
,
'5f8f689d5dccc3db6d2b74a24a8b24ef'
,
'dfc0051ae4813115e03f3d095f8cd7d3'
,
'2f0540af5db76052cee0e8e91f0204c4'
,
...
...
@@ -1200,6 +1213,18 @@ export const viewstate: any = {
'fcdb236b65d78c4a8ae64e74f9483a63'
,
],
},
{
viewtag
:
'9433b49c4e43a15dfc8bbd91bdd4c27f'
,
viewmodule
:
'Base'
,
viewname
:
'AccountStopGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'a69ba7dd2f8bdac8a3c733dcc79c0ee5'
,
'2e9c7792c3a728896ca8902634f71983'
,
'6e18ac74e5685439110f9b4e534ee005'
,
],
},
{
viewtag
:
'94d961edd298073d53ca3239c092fac4'
,
viewmodule
:
'Base'
,
...
...
app_CRM/src/uiservice/account/account-ui-service-base.ts
浏览文件 @
8fa3fa17
...
...
@@ -82,17 +82,20 @@ export default class AccountUIServiceBase extends UIService {
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'summary'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'innerpickupview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info_account'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'statustabview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info_all'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'edit_accountinfo'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'gradation'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'usablegridview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'innerpickupgridview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info_introduction'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'edit_introduction'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info_address'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'stopgridview'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'quickcreate'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info_distribution'
,
srfappde
:
'accounts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'info_contactsetting'
,
srfappde
:
'accounts'
});
...
...
app_CRM/src/widgets/account/status-tab-viewtabexppanel-tabexppanel/status-tab-viewtabexppanel-tabexppanel-base.tsx
0 → 100644
浏览文件 @
8fa3fa17
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
TabExpPanelControlBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
StatusTabViewtabexppanelService
from
'./status-tab-viewtabexppanel-tabexppanel-service'
;
/**
* tabexppanel部件基类
*
* @export
* @class TabExpPanelControlBase
* @extends {StatusTabViewtabexppanelTabexppanelBase}
*/
export
class
StatusTabViewtabexppanelTabexppanelBase
extends
TabExpPanelControlBase
{
/**
* 建构部件服务对象
*
* @type {StatusTabViewtabexppanelService}
* @memberof StatusTabViewtabexppanelTabexppanelBase
*/
public
service
:
StatusTabViewtabexppanelService
=
new
StatusTabViewtabexppanelService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof StatusTabViewtabexppanelTabexppanelBase
*/
public
appEntityService
:
AccountService
=
new
AccountService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof StatusTabViewtabexppanelTabexppanelBase
*/
protected
appDeName
:
string
=
'account'
;
/**
* 是否初始化
*
* @protected
* @returns {any}
* @memberof StatusTabViewtabexppanel
*/
protected
isInit
:
any
=
{
tabviewpanel
:
true
,
tabviewpanel2
:
false
,
tabviewpanel3
:
false
,
}
/**
* 被激活的分页面板
*
* @protected
* @type {string}
* @memberof StatusTabViewtabexppanel
*/
protected
activatedTabViewPanel
:
string
=
'tabviewpanel'
;
/**
* 组件创建完毕
*
* @protected
* @memberof StatusTabViewtabexppanel
*/
protected
ctrlCreated
():
void
{
//设置分页导航srfparentdename和srfparentkey
if
(
this
.
context
.
account
)
{
Object
.
assign
(
this
.
context
,
{
srfparentdename
:
'Account'
,
srfparentkey
:
this
.
context
.
account
});
}
super
.
ctrlCreated
();
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabexppanel-tabexppanel/status-tab-viewtabexppanel-tabexppanel-model.ts
0 → 100644
浏览文件 @
8fa3fa17
/**
* StatusTabViewtabexppanel 部件模型
*
* @export
* @class StatusTabViewtabexppanelModel
*/
export
default
class
StatusTabViewtabexppanelModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof StatusTabViewtabexppanelModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'address1_primarycontactname'
,
},
{
name
:
'openrevenue_date'
,
},
{
name
:
'address2_utcoffset'
,
},
{
name
:
'fax'
,
},
{
name
:
'address1_composite'
,
},
{
name
:
'entityimage'
,
},
{
name
:
'emailaddress1'
,
},
{
name
:
'overriddencreatedon'
,
},
{
name
:
'address1_stateorprovince'
,
},
{
name
:
'openrevenue'
,
},
{
name
:
'address1_upszone'
,
},
{
name
:
'followemail'
,
},
{
name
:
'marketingonly'
,
},
{
name
:
'numberofemployees'
,
},
{
name
:
'telephone1'
,
},
{
name
:
'aging60'
,
},
{
name
:
'sharesoutstanding'
,
},
{
name
:
'address2_freighttermscode'
,
},
{
name
:
'entityimage_timestamp'
,
},
{
name
:
'revenue_base'
,
},
{
name
:
'accountratingcode'
,
},
{
name
:
'donotbulkemail'
,
},
{
name
:
'aging30'
,
},
{
name
:
'donotbulkpostalmail'
,
},
{
name
:
'creditlimit_base'
,
},
{
name
:
'timezoneruleversionnumber'
,
},
{
name
:
'customertypecode'
,
},
{
name
:
'address2_longitude'
,
},
{
name
:
'accountname'
,
},
{
name
:
'participatesinworkflow'
,
},
{
name
:
'preferredcontactmethodcode'
,
},
{
name
:
'preferredappointmentdaycode'
,
},
{
name
:
'marketcap'
,
},
{
name
:
'address2_telephone1'
,
},
{
name
:
'businesstypecode'
,
},
{
name
:
'entityimageid'
,
},
{
name
:
'address2_city'
,
},
{
name
:
'ownershipcode'
,
},
{
name
:
'utcconversiontimezonecode'
,
},
{
name
:
'accountnumber'
,
},
{
name
:
'address1_telephone2'
,
},
{
name
:
'address1_line1'
,
},
{
name
:
'donotphone'
,
},
{
name
:
'address1_telephone3'
,
},
{
name
:
'exchangerate'
,
},
{
name
:
'address2_line2'
,
},
{
name
:
'address2_telephone3'
,
},
{
name
:
'address1_telephone1'
,
},
{
name
:
'address1_fax'
,
},
{
name
:
'address1_freighttermscode'
,
},
{
name
:
'description'
,
},
{
name
:
'merged'
,
},
{
name
:
'address1_shippingmethodcode'
,
},
{
name
:
'address1_name'
,
},
{
name
:
'aging30_base'
,
},
{
name
:
'address2_telephone2'
,
},
{
name
:
'account'
,
prop
:
'accountid'
,
},
{
name
:
'primarytwitterid'
,
},
{
name
:
'tickersymbol'
,
},
{
name
:
'stockexchange'
,
},
{
name
:
'address2_stateorprovince'
,
},
{
name
:
'ftpsiteurl'
,
},
{
name
:
'statuscode'
,
},
{
name
:
'websiteurl'
,
},
{
name
:
'donotpostalmail'
,
},
{
name
:
'address1_city'
,
},
{
name
:
'address2_fax'
,
},
{
name
:
'aging90_base'
,
},
{
name
:
'opendeals_date'
,
},
{
name
:
'traversedpath'
,
},
{
name
:
'shippingmethodcode'
,
},
{
name
:
'address1_line2'
,
},
{
name
:
'openrevenue_base'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'preferredsystemuseridyominame'
,
},
{
name
:
'address2_line3'
,
},
{
name
:
'address1_postalcode'
,
},
{
name
:
'address2_latitude'
,
},
{
name
:
'ibizprivate'
,
},
{
name
:
'territorycode'
,
},
{
name
:
'teamsfollowed'
,
},
{
name
:
'yominame'
,
},
{
name
:
'address1_latitude'
,
},
{
name
:
'telephone3'
,
},
{
name
:
'ownerid'
,
},
{
name
:
'address2_country'
,
},
{
name
:
'masteraccountidyominame'
,
},
{
name
:
'industrycode'
,
},
{
name
:
'lastonholdtime'
,
},
{
name
:
'address2_addressid'
,
},
{
name
:
'onholdtime'
,
},
{
name
:
'accountclassificationcode'
,
},
{
name
:
'address1_country'
,
},
{
name
:
'address1_addresstypecode'
,
},
{
name
:
'statecode'
,
},
{
name
:
'address2_addresstypecode'
,
},
{
name
:
'accountcategorycode'
,
},
{
name
:
'emailaddress2'
,
},
{
name
:
'address2_shippingmethodcode'
,
},
{
name
:
'importsequencenumber'
,
},
{
name
:
'primarysatoriid'
,
},
{
name
:
'customersizecode'
,
},
{
name
:
'opendeals'
,
},
{
name
:
'donotsendmm'
,
},
{
name
:
'processid'
,
},
{
name
:
'paymenttermscode'
,
},
{
name
:
'sic'
,
},
{
name
:
'address2_primarycontactname'
,
},
{
name
:
'address1_utcoffset'
,
},
{
name
:
'owneridyominame'
,
},
{
name
:
'lastusedincampaign'
,
},
{
name
:
'aging60_base'
,
},
{
name
:
'donotfax'
,
},
{
name
:
'updateman'
,
},
{
name
:
'openrevenue_state'
,
},
{
name
:
'opendeals_state'
,
},
{
name
:
'versionnumber'
,
},
{
name
:
'address1_longitude'
,
},
{
name
:
'aging90'
,
},
{
name
:
'entityimage_url'
,
},
{
name
:
'creditlimit'
,
},
{
name
:
'preferredsystemuserid'
,
},
{
name
:
'revenue'
,
},
{
name
:
'address1_county'
,
},
{
name
:
'address1_line3'
,
},
{
name
:
'stageid'
,
},
{
name
:
'donotemail'
,
},
{
name
:
'address2_postalcode'
,
},
{
name
:
'preferredappointmenttimecode'
,
},
{
name
:
'address2_upszone'
,
},
{
name
:
'createdate'
,
},
{
name
:
'address2_county'
,
},
{
name
:
'owneridtype'
,
},
{
name
:
'address2_composite'
,
},
{
name
:
'address2_name'
,
},
{
name
:
'address2_line1'
,
},
{
name
:
'marketcap_base'
,
},
{
name
:
'emailaddress3'
,
},
{
name
:
'telephone2'
,
},
{
name
:
'createman'
,
},
{
name
:
'address1_postofficebox'
,
},
{
name
:
'creditonhold'
,
},
{
name
:
'address1_addressid'
,
},
{
name
:
'address2_postofficebox'
,
},
{
name
:
'slaname'
,
},
{
name
:
'originatingleadid'
,
},
{
name
:
'transactioncurrencyid'
,
},
{
name
:
'defaultpricelevelid'
,
},
{
name
:
'parentaccountid'
,
},
{
name
:
'preferredequipmentid'
,
},
{
name
:
'territoryid'
,
},
{
name
:
'primarycontactid'
,
},
{
name
:
'slaid'
,
},
{
name
:
'preferredserviceid'
,
},
{
name
:
'originatingleadname'
,
},
{
name
:
'defaultpricelevelname'
,
},
{
name
:
'territoryname'
,
},
{
name
:
'parentaccountname'
,
},
{
name
:
'preferredequipmentname'
,
},
{
name
:
'preferredservicename'
,
},
{
name
:
'primarycontactname'
,
},
{
name
:
'transactioncurrencyname'
,
},
{
name
:
'childaccountcount'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabexppanel-tabexppanel/status-tab-viewtabexppanel-tabexppanel-service.ts
0 → 100644
浏览文件 @
8fa3fa17
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
AccountService
from
'@/service/account/account-service'
;
import
StatusTabViewtabexppanelModel
from
'./status-tab-viewtabexppanel-tabexppanel-model'
;
/**
* StatusTabViewtabexppanel 部件服务对象
*
* @export
* @class StatusTabViewtabexppanelService
*/
export
default
class
StatusTabViewtabexppanelService
extends
ControlService
{
/**
* 客户服务对象
*
* @type {AccountService}
* @memberof StatusTabViewtabexppanelService
*/
public
appEntityService
:
AccountService
=
new
AccountService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof StatusTabViewtabexppanelService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of StatusTabViewtabexppanelService.
*
* @param {*} [opts={}]
* @memberof StatusTabViewtabexppanelService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
StatusTabViewtabexppanelModel
();
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabexppanel-tabexppanel/status-tab-viewtabexppanel-tabexppanel.html
0 → 100644
浏览文件 @
8fa3fa17
<div
class=
'tabviewpanel'
>
<tabs
:value=
"activatedTabViewPanel"
:animated=
"false"
class=
'tabexppanel'
name=
'statustabviewtabexppanel'
@
on-click=
"tabPanelClick($event)"
>
<tab-pane
:index=
"0"
name=
'tabviewpanel'
tab=
'statustabviewtabexppanel'
class=
''
:label=
"(h) =>{
return h('div', [
h('span', '全部客户'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}"
>
<view
_tabviewpanel
:viewState=
"viewState"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:context=
"JSON.parse(JSON.stringify(context))"
v-if=
"isInit.tabviewpanel"
name=
"tabviewpanel"
ref=
'tabviewpanel'
:expActive=
"activatedTabViewPanel === 'tabviewpanel'"
@
viewpanelDatasChange =
"tabViewPanelDatasChange"
@
closeview=
"closeView($event)"
>
</view
_tabviewpanel
>
</tab-pane>
<tab-pane
:index=
"1"
name=
'tabviewpanel2'
tab=
'statustabviewtabexppanel'
class=
''
:label=
"(h) =>{
return h('div', [
h('span', '可用客户'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}"
>
<view
_tabviewpanel2
:viewState=
"viewState"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:context=
"JSON.parse(JSON.stringify(context))"
v-if=
"isInit.tabviewpanel2"
name=
"tabviewpanel2"
ref=
'tabviewpanel2'
:expActive=
"activatedTabViewPanel === 'tabviewpanel2'"
@
viewpanelDatasChange =
"tabViewPanelDatasChange"
@
closeview=
"closeView($event)"
>
</view
_tabviewpanel2
>
</tab-pane>
<tab-pane
:index=
"2"
name=
'tabviewpanel3'
tab=
'statustabviewtabexppanel'
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'
:expActive=
"activatedTabViewPanel === 'tabviewpanel3'"
@
viewpanelDatasChange =
"tabViewPanelDatasChange"
@
closeview=
"closeView($event)"
>
</view
_tabviewpanel3
>
</tab-pane>
</tabs>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabexppanel-tabexppanel/status-tab-viewtabexppanel-tabexppanel.vue
0 → 100644
浏览文件 @
8fa3fa17
<
template
src=
"./status-tab-viewtabexppanel-tabexppanel.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { StatusTabViewtabexppanelTabexppanelBase } from './status-tab-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/account/status-tab-viewtabviewpanel-tabviewpanel/status-tab-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/account/status-tab-viewtabviewpanel2-tabviewpanel/status-tab-viewtabviewpanel2-tabviewpanel.vue';
import view_tabviewpanel3 from '@widgets/account/status-tab-viewtabviewpanel3-tabviewpanel/status-tab-viewtabviewpanel3-tabviewpanel.vue';
/**
* tabexppanel部件
*
* @export
* @class StatusTabViewtabexppanelTabexppanel
* @extends {StatusTabViewtabexppanelTabexppanelBase}
*/
@Component({
components: {
view_tabviewpanel,
view_tabviewpanel2,
view_tabviewpanel3,
}
})
@VueLifeCycleProcessing()
export default class StatusTabViewtabexppanelTabexppanel extends StatusTabViewtabexppanelTabexppanelBase { }
</script>
app_CRM/src/widgets/account/status-tab-viewtabviewpanel-tabviewpanel/status-tab-viewtabviewpanel-tabviewpanel-base.tsx
0 → 100644
浏览文件 @
8fa3fa17
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
MainControlBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
StatusTabViewtabviewpanelService
from
'./status-tab-viewtabviewpanel-tabviewpanel-service'
;
/**
* tabviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {StatusTabViewtabviewpanelTabviewpanelBase}
*/
export
class
StatusTabViewtabviewpanelTabviewpanelBase
extends
MainControlBase
{
/**
* 建构部件服务对象
*
* @type {StatusTabViewtabviewpanelService}
* @memberof StatusTabViewtabviewpanelTabviewpanelBase
*/
public
service
:
StatusTabViewtabviewpanelService
=
new
StatusTabViewtabviewpanelService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof StatusTabViewtabviewpanelTabviewpanelBase
*/
public
appEntityService
:
AccountService
=
new
AccountService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof StatusTabViewtabviewpanelTabviewpanelBase
*/
protected
appDeName
:
string
=
'account'
;
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof StatusTabViewtabviewpanel
*/
@
Prop
()
public
expActive
!
:
any
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof StatusTabViewtabviewpanel
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof StatusTabViewtabviewpanel
*/
public
getData
():
any
{
return
null
;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof StatusTabViewtabviewpanel
*/
public
isActivied
:
boolean
=
true
;
/**
* 局部上下文
*
* @type {*}
* @memberof StatusTabViewtabviewpanel
*/
public
localContext
:
any
=
null
;
/**
* 局部视图参数
*
* @type {*}
* @memberof StatusTabViewtabviewpanel
*/
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 StatusTabViewtabviewpanel
*/
public
navfilter
:
string
=
""
;
/**
* vue 生命周期
*
* @returns
* @memberof StatusTabViewtabviewpanel
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof StatusTabViewtabviewpanel
*/
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 StatusTabViewtabviewpanel
*/
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 StatusTabViewtabviewpanel
*/
public
viewDatasChange
(
$event
:
any
){
this
.
$emit
(
'viewpanelDatasChange'
,
$event
);
}
/**
* vue 生命周期
*
* @memberof StatusTabViewtabviewpanel
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof StatusTabViewtabviewpanel
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel-tabviewpanel/status-tab-viewtabviewpanel-tabviewpanel-model.ts
0 → 100644
浏览文件 @
8fa3fa17
/**
* StatusTabViewtabviewpanel 部件模型
*
* @export
* @class StatusTabViewtabviewpanelModel
*/
export
default
class
StatusTabViewtabviewpanelModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof StatusTabViewtabviewpanelModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'address1_primarycontactname'
,
},
{
name
:
'openrevenue_date'
,
},
{
name
:
'address2_utcoffset'
,
},
{
name
:
'fax'
,
},
{
name
:
'address1_composite'
,
},
{
name
:
'entityimage'
,
},
{
name
:
'emailaddress1'
,
},
{
name
:
'overriddencreatedon'
,
},
{
name
:
'address1_stateorprovince'
,
},
{
name
:
'openrevenue'
,
},
{
name
:
'address1_upszone'
,
},
{
name
:
'followemail'
,
},
{
name
:
'marketingonly'
,
},
{
name
:
'numberofemployees'
,
},
{
name
:
'telephone1'
,
},
{
name
:
'aging60'
,
},
{
name
:
'sharesoutstanding'
,
},
{
name
:
'address2_freighttermscode'
,
},
{
name
:
'entityimage_timestamp'
,
},
{
name
:
'revenue_base'
,
},
{
name
:
'accountratingcode'
,
},
{
name
:
'donotbulkemail'
,
},
{
name
:
'aging30'
,
},
{
name
:
'donotbulkpostalmail'
,
},
{
name
:
'creditlimit_base'
,
},
{
name
:
'timezoneruleversionnumber'
,
},
{
name
:
'customertypecode'
,
},
{
name
:
'address2_longitude'
,
},
{
name
:
'accountname'
,
},
{
name
:
'participatesinworkflow'
,
},
{
name
:
'preferredcontactmethodcode'
,
},
{
name
:
'preferredappointmentdaycode'
,
},
{
name
:
'marketcap'
,
},
{
name
:
'address2_telephone1'
,
},
{
name
:
'businesstypecode'
,
},
{
name
:
'entityimageid'
,
},
{
name
:
'address2_city'
,
},
{
name
:
'ownershipcode'
,
},
{
name
:
'utcconversiontimezonecode'
,
},
{
name
:
'accountnumber'
,
},
{
name
:
'address1_telephone2'
,
},
{
name
:
'address1_line1'
,
},
{
name
:
'donotphone'
,
},
{
name
:
'address1_telephone3'
,
},
{
name
:
'exchangerate'
,
},
{
name
:
'address2_line2'
,
},
{
name
:
'address2_telephone3'
,
},
{
name
:
'address1_telephone1'
,
},
{
name
:
'address1_fax'
,
},
{
name
:
'address1_freighttermscode'
,
},
{
name
:
'description'
,
},
{
name
:
'merged'
,
},
{
name
:
'address1_shippingmethodcode'
,
},
{
name
:
'address1_name'
,
},
{
name
:
'aging30_base'
,
},
{
name
:
'address2_telephone2'
,
},
{
name
:
'account'
,
prop
:
'accountid'
,
},
{
name
:
'primarytwitterid'
,
},
{
name
:
'tickersymbol'
,
},
{
name
:
'stockexchange'
,
},
{
name
:
'address2_stateorprovince'
,
},
{
name
:
'ftpsiteurl'
,
},
{
name
:
'statuscode'
,
},
{
name
:
'websiteurl'
,
},
{
name
:
'donotpostalmail'
,
},
{
name
:
'address1_city'
,
},
{
name
:
'address2_fax'
,
},
{
name
:
'aging90_base'
,
},
{
name
:
'opendeals_date'
,
},
{
name
:
'traversedpath'
,
},
{
name
:
'shippingmethodcode'
,
},
{
name
:
'address1_line2'
,
},
{
name
:
'openrevenue_base'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'preferredsystemuseridyominame'
,
},
{
name
:
'address2_line3'
,
},
{
name
:
'address1_postalcode'
,
},
{
name
:
'address2_latitude'
,
},
{
name
:
'ibizprivate'
,
},
{
name
:
'territorycode'
,
},
{
name
:
'teamsfollowed'
,
},
{
name
:
'yominame'
,
},
{
name
:
'address1_latitude'
,
},
{
name
:
'telephone3'
,
},
{
name
:
'ownerid'
,
},
{
name
:
'address2_country'
,
},
{
name
:
'masteraccountidyominame'
,
},
{
name
:
'industrycode'
,
},
{
name
:
'lastonholdtime'
,
},
{
name
:
'address2_addressid'
,
},
{
name
:
'onholdtime'
,
},
{
name
:
'accountclassificationcode'
,
},
{
name
:
'address1_country'
,
},
{
name
:
'address1_addresstypecode'
,
},
{
name
:
'statecode'
,
},
{
name
:
'address2_addresstypecode'
,
},
{
name
:
'accountcategorycode'
,
},
{
name
:
'emailaddress2'
,
},
{
name
:
'address2_shippingmethodcode'
,
},
{
name
:
'importsequencenumber'
,
},
{
name
:
'primarysatoriid'
,
},
{
name
:
'customersizecode'
,
},
{
name
:
'opendeals'
,
},
{
name
:
'donotsendmm'
,
},
{
name
:
'processid'
,
},
{
name
:
'paymenttermscode'
,
},
{
name
:
'sic'
,
},
{
name
:
'address2_primarycontactname'
,
},
{
name
:
'address1_utcoffset'
,
},
{
name
:
'owneridyominame'
,
},
{
name
:
'lastusedincampaign'
,
},
{
name
:
'aging60_base'
,
},
{
name
:
'donotfax'
,
},
{
name
:
'updateman'
,
},
{
name
:
'openrevenue_state'
,
},
{
name
:
'opendeals_state'
,
},
{
name
:
'versionnumber'
,
},
{
name
:
'address1_longitude'
,
},
{
name
:
'aging90'
,
},
{
name
:
'entityimage_url'
,
},
{
name
:
'creditlimit'
,
},
{
name
:
'preferredsystemuserid'
,
},
{
name
:
'revenue'
,
},
{
name
:
'address1_county'
,
},
{
name
:
'address1_line3'
,
},
{
name
:
'stageid'
,
},
{
name
:
'donotemail'
,
},
{
name
:
'address2_postalcode'
,
},
{
name
:
'preferredappointmenttimecode'
,
},
{
name
:
'address2_upszone'
,
},
{
name
:
'createdate'
,
},
{
name
:
'address2_county'
,
},
{
name
:
'owneridtype'
,
},
{
name
:
'address2_composite'
,
},
{
name
:
'address2_name'
,
},
{
name
:
'address2_line1'
,
},
{
name
:
'marketcap_base'
,
},
{
name
:
'emailaddress3'
,
},
{
name
:
'telephone2'
,
},
{
name
:
'createman'
,
},
{
name
:
'address1_postofficebox'
,
},
{
name
:
'creditonhold'
,
},
{
name
:
'address1_addressid'
,
},
{
name
:
'address2_postofficebox'
,
},
{
name
:
'slaname'
,
},
{
name
:
'originatingleadid'
,
},
{
name
:
'transactioncurrencyid'
,
},
{
name
:
'defaultpricelevelid'
,
},
{
name
:
'parentaccountid'
,
},
{
name
:
'preferredequipmentid'
,
},
{
name
:
'territoryid'
,
},
{
name
:
'primarycontactid'
,
},
{
name
:
'slaid'
,
},
{
name
:
'preferredserviceid'
,
},
{
name
:
'originatingleadname'
,
},
{
name
:
'defaultpricelevelname'
,
},
{
name
:
'territoryname'
,
},
{
name
:
'parentaccountname'
,
},
{
name
:
'preferredequipmentname'
,
},
{
name
:
'preferredservicename'
,
},
{
name
:
'primarycontactname'
,
},
{
name
:
'transactioncurrencyname'
,
},
{
name
:
'childaccountcount'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel-tabviewpanel/status-tab-viewtabviewpanel-tabviewpanel-service.ts
0 → 100644
浏览文件 @
8fa3fa17
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* StatusTabViewtabviewpanel 部件服务对象
*
* @export
* @class StatusTabViewtabviewpanelService
*/
export
default
class
StatusTabViewtabviewpanelService
extends
ControlService
{
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel-tabviewpanel/status-tab-viewtabviewpanel-tabviewpanel.html
0 → 100644
浏览文件 @
8fa3fa17
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<account-grid-view
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
:viewUsage=
"7"
:expActive=
"expActive"
/>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel-tabviewpanel/status-tab-viewtabviewpanel-tabviewpanel.vue
0 → 100644
浏览文件 @
8fa3fa17
<
template
src=
"./status-tab-viewtabviewpanel-tabviewpanel.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { StatusTabViewtabviewpanelTabviewpanelBase } from './status-tab-viewtabviewpanel-tabviewpanel-base';
/**
* tabviewpanel部件
*
* @export
* @class StatusTabViewtabviewpanelTabviewpanel
* @extends {StatusTabViewtabviewpanelTabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class StatusTabViewtabviewpanelTabviewpanel extends StatusTabViewtabviewpanelTabviewpanelBase { }
</script>
app_CRM/src/widgets/account/status-tab-viewtabviewpanel2-tabviewpanel/status-tab-viewtabviewpanel2-tabviewpanel-base.tsx
0 → 100644
浏览文件 @
8fa3fa17
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
MainControlBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
StatusTabViewtabviewpanel2Service
from
'./status-tab-viewtabviewpanel2-tabviewpanel-service'
;
/**
* tabviewpanel2部件基类
*
* @export
* @class MainControlBase
* @extends {StatusTabViewtabviewpanel2TabviewpanelBase}
*/
export
class
StatusTabViewtabviewpanel2TabviewpanelBase
extends
MainControlBase
{
/**
* 建构部件服务对象
*
* @type {StatusTabViewtabviewpanel2Service}
* @memberof StatusTabViewtabviewpanel2TabviewpanelBase
*/
public
service
:
StatusTabViewtabviewpanel2Service
=
new
StatusTabViewtabviewpanel2Service
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof StatusTabViewtabviewpanel2TabviewpanelBase
*/
public
appEntityService
:
AccountService
=
new
AccountService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof StatusTabViewtabviewpanel2TabviewpanelBase
*/
protected
appDeName
:
string
=
'account'
;
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof StatusTabViewtabviewpanel2
*/
@
Prop
()
public
expActive
!
:
any
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof StatusTabViewtabviewpanel2
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof StatusTabViewtabviewpanel2
*/
public
getData
():
any
{
return
null
;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof StatusTabViewtabviewpanel2
*/
public
isActivied
:
boolean
=
true
;
/**
* 局部上下文
*
* @type {*}
* @memberof StatusTabViewtabviewpanel2
*/
public
localContext
:
any
=
null
;
/**
* 局部视图参数
*
* @type {*}
* @memberof StatusTabViewtabviewpanel2
*/
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 StatusTabViewtabviewpanel2
*/
public
navfilter
:
string
=
""
;
/**
* vue 生命周期
*
* @returns
* @memberof StatusTabViewtabviewpanel2
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof StatusTabViewtabviewpanel2
*/
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 StatusTabViewtabviewpanel2
*/
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 StatusTabViewtabviewpanel2
*/
public
viewDatasChange
(
$event
:
any
){
this
.
$emit
(
'viewpanelDatasChange'
,
$event
);
}
/**
* vue 生命周期
*
* @memberof StatusTabViewtabviewpanel2
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof StatusTabViewtabviewpanel2
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel2-tabviewpanel/status-tab-viewtabviewpanel2-tabviewpanel-model.ts
0 → 100644
浏览文件 @
8fa3fa17
/**
* StatusTabViewtabviewpanel2 部件模型
*
* @export
* @class StatusTabViewtabviewpanel2Model
*/
export
default
class
StatusTabViewtabviewpanel2Model
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof StatusTabViewtabviewpanel2Model
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'address1_primarycontactname'
,
},
{
name
:
'openrevenue_date'
,
},
{
name
:
'address2_utcoffset'
,
},
{
name
:
'fax'
,
},
{
name
:
'address1_composite'
,
},
{
name
:
'entityimage'
,
},
{
name
:
'emailaddress1'
,
},
{
name
:
'overriddencreatedon'
,
},
{
name
:
'address1_stateorprovince'
,
},
{
name
:
'openrevenue'
,
},
{
name
:
'address1_upszone'
,
},
{
name
:
'followemail'
,
},
{
name
:
'marketingonly'
,
},
{
name
:
'numberofemployees'
,
},
{
name
:
'telephone1'
,
},
{
name
:
'aging60'
,
},
{
name
:
'sharesoutstanding'
,
},
{
name
:
'address2_freighttermscode'
,
},
{
name
:
'entityimage_timestamp'
,
},
{
name
:
'revenue_base'
,
},
{
name
:
'accountratingcode'
,
},
{
name
:
'donotbulkemail'
,
},
{
name
:
'aging30'
,
},
{
name
:
'donotbulkpostalmail'
,
},
{
name
:
'creditlimit_base'
,
},
{
name
:
'timezoneruleversionnumber'
,
},
{
name
:
'customertypecode'
,
},
{
name
:
'address2_longitude'
,
},
{
name
:
'accountname'
,
},
{
name
:
'participatesinworkflow'
,
},
{
name
:
'preferredcontactmethodcode'
,
},
{
name
:
'preferredappointmentdaycode'
,
},
{
name
:
'marketcap'
,
},
{
name
:
'address2_telephone1'
,
},
{
name
:
'businesstypecode'
,
},
{
name
:
'entityimageid'
,
},
{
name
:
'address2_city'
,
},
{
name
:
'ownershipcode'
,
},
{
name
:
'utcconversiontimezonecode'
,
},
{
name
:
'accountnumber'
,
},
{
name
:
'address1_telephone2'
,
},
{
name
:
'address1_line1'
,
},
{
name
:
'donotphone'
,
},
{
name
:
'address1_telephone3'
,
},
{
name
:
'exchangerate'
,
},
{
name
:
'address2_line2'
,
},
{
name
:
'address2_telephone3'
,
},
{
name
:
'address1_telephone1'
,
},
{
name
:
'address1_fax'
,
},
{
name
:
'address1_freighttermscode'
,
},
{
name
:
'description'
,
},
{
name
:
'merged'
,
},
{
name
:
'address1_shippingmethodcode'
,
},
{
name
:
'address1_name'
,
},
{
name
:
'aging30_base'
,
},
{
name
:
'address2_telephone2'
,
},
{
name
:
'account'
,
prop
:
'accountid'
,
},
{
name
:
'primarytwitterid'
,
},
{
name
:
'tickersymbol'
,
},
{
name
:
'stockexchange'
,
},
{
name
:
'address2_stateorprovince'
,
},
{
name
:
'ftpsiteurl'
,
},
{
name
:
'statuscode'
,
},
{
name
:
'websiteurl'
,
},
{
name
:
'donotpostalmail'
,
},
{
name
:
'address1_city'
,
},
{
name
:
'address2_fax'
,
},
{
name
:
'aging90_base'
,
},
{
name
:
'opendeals_date'
,
},
{
name
:
'traversedpath'
,
},
{
name
:
'shippingmethodcode'
,
},
{
name
:
'address1_line2'
,
},
{
name
:
'openrevenue_base'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'preferredsystemuseridyominame'
,
},
{
name
:
'address2_line3'
,
},
{
name
:
'address1_postalcode'
,
},
{
name
:
'address2_latitude'
,
},
{
name
:
'ibizprivate'
,
},
{
name
:
'territorycode'
,
},
{
name
:
'teamsfollowed'
,
},
{
name
:
'yominame'
,
},
{
name
:
'address1_latitude'
,
},
{
name
:
'telephone3'
,
},
{
name
:
'ownerid'
,
},
{
name
:
'address2_country'
,
},
{
name
:
'masteraccountidyominame'
,
},
{
name
:
'industrycode'
,
},
{
name
:
'lastonholdtime'
,
},
{
name
:
'address2_addressid'
,
},
{
name
:
'onholdtime'
,
},
{
name
:
'accountclassificationcode'
,
},
{
name
:
'address1_country'
,
},
{
name
:
'address1_addresstypecode'
,
},
{
name
:
'statecode'
,
},
{
name
:
'address2_addresstypecode'
,
},
{
name
:
'accountcategorycode'
,
},
{
name
:
'emailaddress2'
,
},
{
name
:
'address2_shippingmethodcode'
,
},
{
name
:
'importsequencenumber'
,
},
{
name
:
'primarysatoriid'
,
},
{
name
:
'customersizecode'
,
},
{
name
:
'opendeals'
,
},
{
name
:
'donotsendmm'
,
},
{
name
:
'processid'
,
},
{
name
:
'paymenttermscode'
,
},
{
name
:
'sic'
,
},
{
name
:
'address2_primarycontactname'
,
},
{
name
:
'address1_utcoffset'
,
},
{
name
:
'owneridyominame'
,
},
{
name
:
'lastusedincampaign'
,
},
{
name
:
'aging60_base'
,
},
{
name
:
'donotfax'
,
},
{
name
:
'updateman'
,
},
{
name
:
'openrevenue_state'
,
},
{
name
:
'opendeals_state'
,
},
{
name
:
'versionnumber'
,
},
{
name
:
'address1_longitude'
,
},
{
name
:
'aging90'
,
},
{
name
:
'entityimage_url'
,
},
{
name
:
'creditlimit'
,
},
{
name
:
'preferredsystemuserid'
,
},
{
name
:
'revenue'
,
},
{
name
:
'address1_county'
,
},
{
name
:
'address1_line3'
,
},
{
name
:
'stageid'
,
},
{
name
:
'donotemail'
,
},
{
name
:
'address2_postalcode'
,
},
{
name
:
'preferredappointmenttimecode'
,
},
{
name
:
'address2_upszone'
,
},
{
name
:
'createdate'
,
},
{
name
:
'address2_county'
,
},
{
name
:
'owneridtype'
,
},
{
name
:
'address2_composite'
,
},
{
name
:
'address2_name'
,
},
{
name
:
'address2_line1'
,
},
{
name
:
'marketcap_base'
,
},
{
name
:
'emailaddress3'
,
},
{
name
:
'telephone2'
,
},
{
name
:
'createman'
,
},
{
name
:
'address1_postofficebox'
,
},
{
name
:
'creditonhold'
,
},
{
name
:
'address1_addressid'
,
},
{
name
:
'address2_postofficebox'
,
},
{
name
:
'slaname'
,
},
{
name
:
'originatingleadid'
,
},
{
name
:
'transactioncurrencyid'
,
},
{
name
:
'defaultpricelevelid'
,
},
{
name
:
'parentaccountid'
,
},
{
name
:
'preferredequipmentid'
,
},
{
name
:
'territoryid'
,
},
{
name
:
'primarycontactid'
,
},
{
name
:
'slaid'
,
},
{
name
:
'preferredserviceid'
,
},
{
name
:
'originatingleadname'
,
},
{
name
:
'defaultpricelevelname'
,
},
{
name
:
'territoryname'
,
},
{
name
:
'parentaccountname'
,
},
{
name
:
'preferredequipmentname'
,
},
{
name
:
'preferredservicename'
,
},
{
name
:
'primarycontactname'
,
},
{
name
:
'transactioncurrencyname'
,
},
{
name
:
'childaccountcount'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel2-tabviewpanel/status-tab-viewtabviewpanel2-tabviewpanel-service.ts
0 → 100644
浏览文件 @
8fa3fa17
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* StatusTabViewtabviewpanel2 部件服务对象
*
* @export
* @class StatusTabViewtabviewpanel2Service
*/
export
default
class
StatusTabViewtabviewpanel2Service
extends
ControlService
{
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel2-tabviewpanel/status-tab-viewtabviewpanel2-tabviewpanel.html
0 → 100644
浏览文件 @
8fa3fa17
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<account-usable-grid-view
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
:viewUsage=
"7"
:expActive=
"expActive"
/>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel2-tabviewpanel/status-tab-viewtabviewpanel2-tabviewpanel.vue
0 → 100644
浏览文件 @
8fa3fa17
<
template
src=
"./status-tab-viewtabviewpanel2-tabviewpanel.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { StatusTabViewtabviewpanel2TabviewpanelBase } from './status-tab-viewtabviewpanel2-tabviewpanel-base';
/**
* tabviewpanel2部件
*
* @export
* @class StatusTabViewtabviewpanel2Tabviewpanel
* @extends {StatusTabViewtabviewpanel2TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class StatusTabViewtabviewpanel2Tabviewpanel extends StatusTabViewtabviewpanel2TabviewpanelBase { }
</script>
app_CRM/src/widgets/account/status-tab-viewtabviewpanel3-tabviewpanel/status-tab-viewtabviewpanel3-tabviewpanel-base.tsx
0 → 100644
浏览文件 @
8fa3fa17
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
MainControlBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
StatusTabViewtabviewpanel3Service
from
'./status-tab-viewtabviewpanel3-tabviewpanel-service'
;
/**
* tabviewpanel3部件基类
*
* @export
* @class MainControlBase
* @extends {StatusTabViewtabviewpanel3TabviewpanelBase}
*/
export
class
StatusTabViewtabviewpanel3TabviewpanelBase
extends
MainControlBase
{
/**
* 建构部件服务对象
*
* @type {StatusTabViewtabviewpanel3Service}
* @memberof StatusTabViewtabviewpanel3TabviewpanelBase
*/
public
service
:
StatusTabViewtabviewpanel3Service
=
new
StatusTabViewtabviewpanel3Service
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof StatusTabViewtabviewpanel3TabviewpanelBase
*/
public
appEntityService
:
AccountService
=
new
AccountService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof StatusTabViewtabviewpanel3TabviewpanelBase
*/
protected
appDeName
:
string
=
'account'
;
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof StatusTabViewtabviewpanel3
*/
@
Prop
()
public
expActive
!
:
any
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof StatusTabViewtabviewpanel3
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof StatusTabViewtabviewpanel3
*/
public
getData
():
any
{
return
null
;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof StatusTabViewtabviewpanel3
*/
public
isActivied
:
boolean
=
true
;
/**
* 局部上下文
*
* @type {*}
* @memberof StatusTabViewtabviewpanel3
*/
public
localContext
:
any
=
null
;
/**
* 局部视图参数
*
* @type {*}
* @memberof StatusTabViewtabviewpanel3
*/
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 StatusTabViewtabviewpanel3
*/
public
navfilter
:
string
=
""
;
/**
* vue 生命周期
*
* @returns
* @memberof StatusTabViewtabviewpanel3
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof StatusTabViewtabviewpanel3
*/
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 StatusTabViewtabviewpanel3
*/
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 StatusTabViewtabviewpanel3
*/
public
viewDatasChange
(
$event
:
any
){
this
.
$emit
(
'viewpanelDatasChange'
,
$event
);
}
/**
* vue 生命周期
*
* @memberof StatusTabViewtabviewpanel3
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof StatusTabViewtabviewpanel3
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel3-tabviewpanel/status-tab-viewtabviewpanel3-tabviewpanel-model.ts
0 → 100644
浏览文件 @
8fa3fa17
/**
* StatusTabViewtabviewpanel3 部件模型
*
* @export
* @class StatusTabViewtabviewpanel3Model
*/
export
default
class
StatusTabViewtabviewpanel3Model
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof StatusTabViewtabviewpanel3Model
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'address1_primarycontactname'
,
},
{
name
:
'openrevenue_date'
,
},
{
name
:
'address2_utcoffset'
,
},
{
name
:
'fax'
,
},
{
name
:
'address1_composite'
,
},
{
name
:
'entityimage'
,
},
{
name
:
'emailaddress1'
,
},
{
name
:
'overriddencreatedon'
,
},
{
name
:
'address1_stateorprovince'
,
},
{
name
:
'openrevenue'
,
},
{
name
:
'address1_upszone'
,
},
{
name
:
'followemail'
,
},
{
name
:
'marketingonly'
,
},
{
name
:
'numberofemployees'
,
},
{
name
:
'telephone1'
,
},
{
name
:
'aging60'
,
},
{
name
:
'sharesoutstanding'
,
},
{
name
:
'address2_freighttermscode'
,
},
{
name
:
'entityimage_timestamp'
,
},
{
name
:
'revenue_base'
,
},
{
name
:
'accountratingcode'
,
},
{
name
:
'donotbulkemail'
,
},
{
name
:
'aging30'
,
},
{
name
:
'donotbulkpostalmail'
,
},
{
name
:
'creditlimit_base'
,
},
{
name
:
'timezoneruleversionnumber'
,
},
{
name
:
'customertypecode'
,
},
{
name
:
'address2_longitude'
,
},
{
name
:
'accountname'
,
},
{
name
:
'participatesinworkflow'
,
},
{
name
:
'preferredcontactmethodcode'
,
},
{
name
:
'preferredappointmentdaycode'
,
},
{
name
:
'marketcap'
,
},
{
name
:
'address2_telephone1'
,
},
{
name
:
'businesstypecode'
,
},
{
name
:
'entityimageid'
,
},
{
name
:
'address2_city'
,
},
{
name
:
'ownershipcode'
,
},
{
name
:
'utcconversiontimezonecode'
,
},
{
name
:
'accountnumber'
,
},
{
name
:
'address1_telephone2'
,
},
{
name
:
'address1_line1'
,
},
{
name
:
'donotphone'
,
},
{
name
:
'address1_telephone3'
,
},
{
name
:
'exchangerate'
,
},
{
name
:
'address2_line2'
,
},
{
name
:
'address2_telephone3'
,
},
{
name
:
'address1_telephone1'
,
},
{
name
:
'address1_fax'
,
},
{
name
:
'address1_freighttermscode'
,
},
{
name
:
'description'
,
},
{
name
:
'merged'
,
},
{
name
:
'address1_shippingmethodcode'
,
},
{
name
:
'address1_name'
,
},
{
name
:
'aging30_base'
,
},
{
name
:
'address2_telephone2'
,
},
{
name
:
'account'
,
prop
:
'accountid'
,
},
{
name
:
'primarytwitterid'
,
},
{
name
:
'tickersymbol'
,
},
{
name
:
'stockexchange'
,
},
{
name
:
'address2_stateorprovince'
,
},
{
name
:
'ftpsiteurl'
,
},
{
name
:
'statuscode'
,
},
{
name
:
'websiteurl'
,
},
{
name
:
'donotpostalmail'
,
},
{
name
:
'address1_city'
,
},
{
name
:
'address2_fax'
,
},
{
name
:
'aging90_base'
,
},
{
name
:
'opendeals_date'
,
},
{
name
:
'traversedpath'
,
},
{
name
:
'shippingmethodcode'
,
},
{
name
:
'address1_line2'
,
},
{
name
:
'openrevenue_base'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'preferredsystemuseridyominame'
,
},
{
name
:
'address2_line3'
,
},
{
name
:
'address1_postalcode'
,
},
{
name
:
'address2_latitude'
,
},
{
name
:
'ibizprivate'
,
},
{
name
:
'territorycode'
,
},
{
name
:
'teamsfollowed'
,
},
{
name
:
'yominame'
,
},
{
name
:
'address1_latitude'
,
},
{
name
:
'telephone3'
,
},
{
name
:
'ownerid'
,
},
{
name
:
'address2_country'
,
},
{
name
:
'masteraccountidyominame'
,
},
{
name
:
'industrycode'
,
},
{
name
:
'lastonholdtime'
,
},
{
name
:
'address2_addressid'
,
},
{
name
:
'onholdtime'
,
},
{
name
:
'accountclassificationcode'
,
},
{
name
:
'address1_country'
,
},
{
name
:
'address1_addresstypecode'
,
},
{
name
:
'statecode'
,
},
{
name
:
'address2_addresstypecode'
,
},
{
name
:
'accountcategorycode'
,
},
{
name
:
'emailaddress2'
,
},
{
name
:
'address2_shippingmethodcode'
,
},
{
name
:
'importsequencenumber'
,
},
{
name
:
'primarysatoriid'
,
},
{
name
:
'customersizecode'
,
},
{
name
:
'opendeals'
,
},
{
name
:
'donotsendmm'
,
},
{
name
:
'processid'
,
},
{
name
:
'paymenttermscode'
,
},
{
name
:
'sic'
,
},
{
name
:
'address2_primarycontactname'
,
},
{
name
:
'address1_utcoffset'
,
},
{
name
:
'owneridyominame'
,
},
{
name
:
'lastusedincampaign'
,
},
{
name
:
'aging60_base'
,
},
{
name
:
'donotfax'
,
},
{
name
:
'updateman'
,
},
{
name
:
'openrevenue_state'
,
},
{
name
:
'opendeals_state'
,
},
{
name
:
'versionnumber'
,
},
{
name
:
'address1_longitude'
,
},
{
name
:
'aging90'
,
},
{
name
:
'entityimage_url'
,
},
{
name
:
'creditlimit'
,
},
{
name
:
'preferredsystemuserid'
,
},
{
name
:
'revenue'
,
},
{
name
:
'address1_county'
,
},
{
name
:
'address1_line3'
,
},
{
name
:
'stageid'
,
},
{
name
:
'donotemail'
,
},
{
name
:
'address2_postalcode'
,
},
{
name
:
'preferredappointmenttimecode'
,
},
{
name
:
'address2_upszone'
,
},
{
name
:
'createdate'
,
},
{
name
:
'address2_county'
,
},
{
name
:
'owneridtype'
,
},
{
name
:
'address2_composite'
,
},
{
name
:
'address2_name'
,
},
{
name
:
'address2_line1'
,
},
{
name
:
'marketcap_base'
,
},
{
name
:
'emailaddress3'
,
},
{
name
:
'telephone2'
,
},
{
name
:
'createman'
,
},
{
name
:
'address1_postofficebox'
,
},
{
name
:
'creditonhold'
,
},
{
name
:
'address1_addressid'
,
},
{
name
:
'address2_postofficebox'
,
},
{
name
:
'slaname'
,
},
{
name
:
'originatingleadid'
,
},
{
name
:
'transactioncurrencyid'
,
},
{
name
:
'defaultpricelevelid'
,
},
{
name
:
'parentaccountid'
,
},
{
name
:
'preferredequipmentid'
,
},
{
name
:
'territoryid'
,
},
{
name
:
'primarycontactid'
,
},
{
name
:
'slaid'
,
},
{
name
:
'preferredserviceid'
,
},
{
name
:
'originatingleadname'
,
},
{
name
:
'defaultpricelevelname'
,
},
{
name
:
'territoryname'
,
},
{
name
:
'parentaccountname'
,
},
{
name
:
'preferredequipmentname'
,
},
{
name
:
'preferredservicename'
,
},
{
name
:
'primarycontactname'
,
},
{
name
:
'transactioncurrencyname'
,
},
{
name
:
'childaccountcount'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel3-tabviewpanel/status-tab-viewtabviewpanel3-tabviewpanel-service.ts
0 → 100644
浏览文件 @
8fa3fa17
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* StatusTabViewtabviewpanel3 部件服务对象
*
* @export
* @class StatusTabViewtabviewpanel3Service
*/
export
default
class
StatusTabViewtabviewpanel3Service
extends
ControlService
{
}
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel3-tabviewpanel/status-tab-viewtabviewpanel3-tabviewpanel.html
0 → 100644
浏览文件 @
8fa3fa17
<div
class=
'tabviewpanel'
v-if=
'isActivied'
>
<account-stop-grid-view
class=
'viewcontainer2'
:viewdata=
"viewdata"
:viewparam=
"viewparam"
@
viewload=
"viewDatasChange($event)"
:viewDefaultUsage=
"false"
:viewUsage=
"7"
:expActive=
"expActive"
/>
</div>
\ No newline at end of file
app_CRM/src/widgets/account/status-tab-viewtabviewpanel3-tabviewpanel/status-tab-viewtabviewpanel3-tabviewpanel.vue
0 → 100644
浏览文件 @
8fa3fa17
<
template
src=
"./status-tab-viewtabviewpanel3-tabviewpanel.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { StatusTabViewtabviewpanel3TabviewpanelBase } from './status-tab-viewtabviewpanel3-tabviewpanel-base';
/**
* tabviewpanel3部件
*
* @export
* @class StatusTabViewtabviewpanel3Tabviewpanel
* @extends {StatusTabViewtabviewpanel3TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class StatusTabViewtabviewpanel3Tabviewpanel extends StatusTabViewtabviewpanel3TabviewpanelBase { }
</script>
app_CRM/src/widgets/app/central-appmenu/central-appmenu-base.tsx
浏览文件 @
8fa3fa17
...
...
@@ -48,8 +48,8 @@ export class CentralBase extends Vue {
this
.
clickAuto1
(
item
);
break
;
case
'Auto7'
:
this
.
clickAuto7
(
item
);
break
;
case
'
Auto
4'
:
this
.
click
Auto
4
(
item
);
break
;
case
'
_
4'
:
this
.
click
_
4
(
item
);
break
;
case
'Auto5'
:
this
.
clickAuto5
(
item
);
break
;
default
:
...
...
@@ -430,18 +430,18 @@ export class CentralBase extends Vue {
}
/**
* 客户
层级
管理
* 客户管理
*
* @param {*} [item={}]
* @memberof Central
*/
public
click
Auto
4
(
item
:
any
=
{})
{
public
click
_
4
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'
gradation'
,
parameterName
:
'gradation
'
},
{
pathName
:
'
statustabview'
,
parameterName
:
'statustabview
'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
if
(
Object
.
is
(
this
.
$route
.
fullPath
,
path
)){
...
...
app_CRM/src/widgets/app/central-appmenu/central-appmenu-model.ts
浏览文件 @
8fa3fa17
...
...
@@ -263,9 +263,9 @@ export default class CentralModel {
iconcls
:
'fa fa-users'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'
Auto
4'
,
appfunctag
:
'
_
4'
,
appfuncyype
:
'APPVIEW'
,
viewname
:
'account-
gradation
'
,
viewname
:
'account-
status-tab-view
'
,
resourcetag
:
''
,
}
,
...
...
@@ -1030,15 +1030,15 @@ export default class CentralModel {
],
},
{
appfunctag
:
'
Auto
4'
,
appfunctag
:
'
_
4'
,
appfuncyype
:
'APPVIEW'
,
openmode
:
''
,
codename
:
'account
gradation
'
,
codename
:
'account
statustabview
'
,
deResParameters
:
[],
routepath
:
'/central/:central?/accounts/:account?/
gradation/:gradation
?'
,
routepath
:
'/central/:central?/accounts/:account?/
statustabview/:statustabview
?'
,
parameters
:
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'
gradation'
,
parameterName
:
'gradation
'
},
{
pathName
:
'
statustabview'
,
parameterName
:
'statustabview
'
},
],
},
{
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/AccountServiceImpl.java
浏览文件 @
8fa3fa17
...
...
@@ -83,6 +83,14 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
ITransactionCurrencyService
transactioncurrencyService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
logic
.
IAccountActiveLogic
activeLogic
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
logic
.
IAccountInactiveLogic
inactiveLogic
;
protected
int
batchSize
=
500
;
@Override
...
...
@@ -151,8 +159,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
@Override
@Transactional
public
Account
active
(
Account
et
)
{
//自定义代码
return
et
;
activeLogic
.
execute
(
et
);
return
et
;
}
@Override
...
...
@@ -169,8 +177,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
@Override
@Transactional
public
Account
inactive
(
Account
et
)
{
//自定义代码
return
et
;
inactiveLogic
.
execute
(
et
);
return
et
;
}
@Override
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/logic/impl/AccountActiveLogicImpl.java
浏览文件 @
8fa3fa17
...
...
@@ -26,6 +26,13 @@ public class AccountActiveLogicImpl implements IAccountActiveLogic{
@Autowired
private
KieContainer
kieContainer
;
@Autowired
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IAccountService
accountservice
;
public
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IAccountService
getAccountService
()
{
return
this
.
accountservice
;
}
@Autowired
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IAccountService
iBzSysDefaultService
;
...
...
@@ -41,6 +48,7 @@ public class AccountActiveLogicImpl implements IAccountActiveLogic{
kieSession
=
kieContainer
.
newKieSession
();
kieSession
.
insert
(
et
);
kieSession
.
setGlobal
(
"accountactivedefault"
,
et
);
kieSession
.
setGlobal
(
"accountservice"
,
accountservice
);
kieSession
.
setGlobal
(
"iBzSysAccountDefaultService"
,
iBzSysDefaultService
);
kieSession
.
setGlobal
(
"curuser"
,
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
AuthenticationUser
.
getAuthenticationUser
());
kieSession
.
startProcess
(
"cn.ibizlab.businesscentral.core.base.service.logic.accountactive"
);
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/AccountExService.java
浏览文件 @
8fa3fa17
...
...
@@ -21,16 +21,6 @@ public class AccountExService extends AccountServiceImpl {
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[Active]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Account
active
(
Account
et
)
{
return
super
.
active
(
et
);
}
/**
* 自定义行为[AddList]用户扩展
* @param et
...
...
@@ -41,15 +31,5 @@ public class AccountExService extends AccountServiceImpl {
public
Account
addList
(
Account
et
)
{
return
super
.
addList
(
et
);
}
/**
* 自定义行为[Inactive]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Account
inactive
(
Account
et
)
{
return
super
.
inactive
(
et
);
}
}
businesscentral-core/src/main/resources/permission/systemResource.json
浏览文件 @
8fa3fa17
...
...
@@ -368,7 +368,7 @@
"delogicname"
:
"客户"
,
"sysmoudle"
:{
"id"
:
"BASE"
,
"name"
:
"Base"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
},{
"id"
:
"Root"
,
"name"
:
"Root"
},{
"id"
:
"Stop"
,
"name"
:
"停用客户"
},{
"id"
:
"Usable"
,
"name"
:
"可用客户"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Active"
,
"name"
:
"激活"
,
"type"
:
"
USERCUSTOM"
},{
"id"
:
"AddList"
,
"name"
:
"添加到市场营销列表"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Inactive"
,
"name"
:
"停用"
,
"type"
:
"USERCUSTOM
"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Active"
,
"name"
:
"激活"
,
"type"
:
"
DELOGIC"
},{
"id"
:
"AddList"
,
"name"
:
"添加到市场营销列表"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Inactive"
,
"name"
:
"停用"
,
"type"
:
"DELOGIC
"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
,
{
...
...
businesscentral-core/src/main/resources/rules/AccountActiveRule.drl
浏览文件 @
8fa3fa17
...
...
@@ -4,11 +4,21 @@ import java.util.Map;
import
java
.
util
.
HashMap
;
import
com
.
alibaba
.
fastjson
.
JSONObject
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
Account
accountactivedefault
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IAccountService
accountservice
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IAccountService
iBzSysAccountDefaultService
;
global
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
AuthenticationUser
curuser
;
no
-
loop
//
逻辑处理节点
[
更新客户状态
]
rule
"deaction1"
ruleflow
-
group
"accountactivedeaction1"
when
then
accountservice
.
update
(
accountactivedefault
);
update
(
accountactivedefault
);//
更新
fact
中变量值
end
//
逻辑处理节点
[
开始
]
rule
"begin"
ruleflow
-
group
"accountactivebegin"
...
...
@@ -16,3 +26,12 @@ ruleflow-group "accountactivebegin"
then
end
//
逻辑处理节点
[
准备参数
]
rule
"prepareparam1"
ruleflow
-
group
"accountactiveprepareparam1"
when
then
accountactivedefault
.
set
(
"statuscode"
,
"1"
);
update
(
accountactivedefault
);//
更新
fact
中变量值
end
businesscentral-core/src/main/resources/rules/AccountActiveRuleFlow.bpmn
浏览文件 @
8fa3fa17
...
...
@@ -7,9 +7,15 @@
<tns:import
name=
"cn.ibizlab.businesscentral.util.helper.RuleUtils"
/>
<tns:global
identifier=
"accountactivedefault"
type=
"cn.ibizlab.businesscentral.core.base.domain.Account"
/>
</extensionElements>
<businessRuleTask
activiti:exclusive=
"true"
g:ruleFlowGroup=
"accountactivedeaction1"
id=
"D6809980-875F-48B0-A1AE-BBD01F526D62"
implementation=
"http://www.jboss.org/drools/rule"
name=
"更新客户状态"
/>
<endEvent
id=
"D6809980-875F-48B0-A1AE-BBD01F526D62_End"
name=
"End"
/>
<sequenceFlow
id=
"D6809980-875F-48B0-A1AE-BBD01F526D62_End_Line"
sourceRef=
"D6809980-875F-48B0-A1AE-BBD01F526D62"
targetRef=
"D6809980-875F-48B0-A1AE-BBD01F526D62_End"
/>
<startEvent
id=
"BEBE0B69-F45C-4F13-94CF-B99C8EBC1958"
isInterrupting=
"true"
/>
<endEvent
id=
"BEBE0B69-F45C-4F13-94CF-B99C8EBC1958_End"
name=
"End"
/>
<sequenceFlow
id=
"BEBE0B69-F45C-4F13-94CF-B99C8EBC1958_End_Line"
sourceRef=
"BEBE0B69-F45C-4F13-94CF-B99C8EBC1958"
targetRef=
"BEBE0B69-F45C-4F13-94CF-B99C8EBC1958_End"
/>
<businessRuleTask
activiti:exclusive=
"true"
g:ruleFlowGroup=
"accountactiveprepareparam1"
id=
"9819A9BF-397A-4B87-80FD-0C2A4C603635"
implementation=
"http://www.jboss.org/drools/rule"
name=
"准备参数"
/>
<sequenceFlow
id=
"74BFAA2A-6797-43B4-A8A4-C76D6DE79452"
sourceRef=
"9819A9BF-397A-4B87-80FD-0C2A4C603635"
targetRef=
"D6809980-875F-48B0-A1AE-BBD01F526D62"
>
</sequenceFlow>
<sequenceFlow
id=
"DA56A5C8-BF3F-47A2-9E98-B4A8EAFA0256"
sourceRef=
"BEBE0B69-F45C-4F13-94CF-B99C8EBC1958"
targetRef=
"9819A9BF-397A-4B87-80FD-0C2A4C603635"
>
</sequenceFlow>
</process>
</definitions>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录