Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
ce9705e5
提交
ce9705e5
编写于
7月 13, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
b25422fa
变更
31
隐藏空白字符变更
内嵌
并排
正在显示
31 个修改的文件
包含
1216 行增加
和
1080 行删除
+1216
-1080
contact_en_US.ts
app_CRM/src/locale/lanres/entities/contact/contact_en_US.ts
+71
-71
contact_zh_CN.ts
app_CRM/src/locale/lanres/entities/contact/contact_zh_CN.ts
+71
-71
invoice_en_US.ts
app_CRM/src/locale/lanres/entities/invoice/invoice_en_US.ts
+1
-0
invoice_zh_CN.ts
app_CRM/src/locale/lanres/entities/invoice/invoice_zh_CN.ts
+1
-0
lead_en_US.ts
app_CRM/src/locale/lanres/entities/lead/lead_en_US.ts
+2
-2
lead_zh_CN.ts
app_CRM/src/locale/lanres/entities/lead/lead_zh_CN.ts
+2
-2
quote_en_US.ts
app_CRM/src/locale/lanres/entities/quote/quote_en_US.ts
+101
-100
quote_zh_CN.ts
app_CRM/src/locale/lanres/entities/quote/quote_zh_CN.ts
+101
-100
sales-order_en_US.ts
...c/locale/lanres/entities/sales-order/sales-order_en_US.ts
+1
-0
sales-order_zh_CN.ts
...c/locale/lanres/entities/sales-order/sales-order_zh_CN.ts
+1
-0
account-service-base.ts
app_CRM/src/service/account/account-service-base.ts
+50
-50
competitor-service-base.ts
app_CRM/src/service/competitor/competitor-service-base.ts
+50
-50
quote-service-base.ts
app_CRM/src/service/quote/quote-service-base.ts
+259
-259
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+41
-41
sales-order-service-base.ts
app_CRM/src/service/sales-order/sales-order-service-base.ts
+308
-308
state.ts
app_CRM/src/store/modules/view-action/state.ts
+3
-0
info-form-base.tsx
app_CRM/src/widgets/invoice/info-form/info-form-base.tsx
+3
-0
info-form-model.ts
app_CRM/src/widgets/invoice/info-form/info-form-model.ts
+5
-0
info-form-service.ts
app_CRM/src/widgets/invoice/info-form/info-form-service.ts
+12
-0
info-form.html
app_CRM/src/widgets/invoice/info-form/info-form.html
+18
-1
main-grid.html
...c/widgets/opportunity-competitor/main-grid/main-grid.html
+9
-1
main-grid.html
app_CRM/src/widgets/opportunity/main-grid/main-grid.html
+9
-1
abstract-info-form-base.tsx
...gets/quote/abstract-info-form/abstract-info-form-base.tsx
+3
-0
abstract-info-form-model.ts
...gets/quote/abstract-info-form/abstract-info-form-model.ts
+5
-0
abstract-info-form-service.ts
...ts/quote/abstract-info-form/abstract-info-form-service.ts
+12
-0
abstract-info-form.html
.../widgets/quote/abstract-info-form/abstract-info-form.html
+18
-1
info-form-base.tsx
app_CRM/src/widgets/sales-order/info-form/info-form-base.tsx
+3
-0
info-form-model.ts
app_CRM/src/widgets/sales-order/info-form/info-form-model.ts
+5
-0
info-form-service.ts
...RM/src/widgets/sales-order/info-form/info-form-service.ts
+12
-0
info-form.html
app_CRM/src/widgets/sales-order/info-form/info-form.html
+18
-1
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+21
-21
未找到文件。
app_CRM/src/locale/lanres/entities/contact/contact_en_US.ts
浏览文件 @
ce9705e5
...
...
@@ -289,6 +289,31 @@ export default {
title
:
"联系人信息"
,
},
},
quickcreate_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"联系人"
,
srfmajortext
:
"全名"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
fullname
:
"全名"
,
jobtitle
:
"职务"
,
customername
:
"客户"
,
emailaddress1
:
"电子邮件"
,
telephone1
:
"商务电话"
,
mobilephone
:
"移动电话"
,
fax
:
"传真"
,
customerid
:
"客户"
,
contactid
:
"联系人"
,
},
uiactions
:
{
},
},
abstractinfo_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
...
...
@@ -431,31 +456,6 @@ export default {
contact_edit_datapanel
:
"编辑头部信息"
,
},
},
quickcreate_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"联系人"
,
srfmajortext
:
"全名"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
fullname
:
"全名"
,
jobtitle
:
"职务"
,
customername
:
"客户"
,
emailaddress1
:
"电子邮件"
,
telephone1
:
"商务电话"
,
mobilephone
:
"移动电话"
,
fax
:
"传真"
,
customerid
:
"客户"
,
contactid
:
"联系人"
,
},
uiactions
:
{
},
},
abstractedit_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
...
...
@@ -658,26 +658,26 @@ export default {
uiactions
:
{
},
},
main
_grid
:
{
byaccount
_grid
:
{
columns
:
{
fullname
:
"全名"
,
emailaddress1
:
"电子邮件"
,
parentcustomerid
:
"公司名称"
,
telephone1
:
"商务电话"
,
uagridcolumn1
:
"设置主联系人"
,
},
uiactions
:
{
contact_setprimary
:
"设置为主要联系人"
,
},
},
byaccount
_grid
:
{
main
_grid
:
{
columns
:
{
fullname
:
"全名"
,
emailaddress1
:
"电子邮件"
,
parentcustomerid
:
"公司名称"
,
telephone1
:
"商务电话"
,
uagridcolumn1
:
"设置主联系人"
,
},
uiactions
:
{
contact_setprimary
:
"设置为主要联系人"
,
},
},
default_searchform
:
{
...
...
@@ -690,6 +690,48 @@ export default {
uiactions
:
{
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
tbitem6
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
},
editviewtoolbar_toolbar
:
{
tbitem12
:
{
caption
:
"关闭"
,
...
...
@@ -742,48 +784,6 @@ export default {
tip
:
"关闭"
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
tbitem6
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
},
usablegridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
...
...
app_CRM/src/locale/lanres/entities/contact/contact_zh_CN.ts
浏览文件 @
ce9705e5
...
...
@@ -288,6 +288,31 @@ export default {
title
:
"联系人信息"
,
},
},
quickcreate_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"联系人"
,
srfmajortext
:
"全名"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
fullname
:
"全名"
,
jobtitle
:
"职务"
,
customername
:
"客户"
,
emailaddress1
:
"电子邮件"
,
telephone1
:
"商务电话"
,
mobilephone
:
"移动电话"
,
fax
:
"传真"
,
customerid
:
"客户"
,
contactid
:
"联系人"
,
},
uiactions
:
{
},
},
abstractinfo_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
...
...
@@ -430,31 +455,6 @@ export default {
contact_edit_datapanel
:
"编辑头部信息"
,
},
},
quickcreate_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"联系人"
,
srfmajortext
:
"全名"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
fullname
:
"全名"
,
jobtitle
:
"职务"
,
customername
:
"客户"
,
emailaddress1
:
"电子邮件"
,
telephone1
:
"商务电话"
,
mobilephone
:
"移动电话"
,
fax
:
"传真"
,
customerid
:
"客户"
,
contactid
:
"联系人"
,
},
uiactions
:
{
},
},
abstractedit_form
:
{
details
:
{
group1
:
"联系人基本信息"
,
...
...
@@ -657,26 +657,26 @@ export default {
uiactions
:
{
},
},
main
_grid
:
{
byaccount
_grid
:
{
columns
:
{
fullname
:
"全名"
,
emailaddress1
:
"电子邮件"
,
parentcustomerid
:
"公司名称"
,
telephone1
:
"商务电话"
,
uagridcolumn1
:
"设置主联系人"
,
},
uiactions
:
{
contact_setprimary
:
"设置为主要联系人"
,
},
},
byaccount
_grid
:
{
main
_grid
:
{
columns
:
{
fullname
:
"全名"
,
emailaddress1
:
"电子邮件"
,
parentcustomerid
:
"公司名称"
,
telephone1
:
"商务电话"
,
uagridcolumn1
:
"设置主联系人"
,
},
uiactions
:
{
contact_setprimary
:
"设置为主要联系人"
,
},
},
default_searchform
:
{
...
...
@@ -689,6 +689,48 @@ export default {
uiactions
:
{
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
tbitem6
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"删除"
,
tip
:
"删除"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"过滤"
,
tip
:
"过滤"
,
},
},
editviewtoolbar_toolbar
:
{
tbitem12
:
{
caption
:
"关闭"
,
...
...
@@ -741,48 +783,6 @@ export default {
tip
:
"关闭"
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
tbitem6
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"删除"
,
tip
:
"删除"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"过滤"
,
tip
:
"过滤"
,
},
},
usablegridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
...
...
app_CRM/src/locale/lanres/entities/invoice/invoice_en_US.ts
浏览文件 @
ce9705e5
...
...
@@ -201,6 +201,7 @@ export default {
billto_stateorprovince
:
"省/市/自治区"
,
billto_city
:
"市/县"
,
billto_line1
:
"街道"
,
opportunityid
:
"商机"
,
invoiceid
:
"发票"
,
},
uiactions
:
{
...
...
app_CRM/src/locale/lanres/entities/invoice/invoice_zh_CN.ts
浏览文件 @
ce9705e5
...
...
@@ -200,6 +200,7 @@ export default {
billto_stateorprovince
:
"省/市/自治区"
,
billto_city
:
"市/县"
,
billto_line1
:
"街道"
,
opportunityid
:
"商机"
,
invoiceid
:
"发票"
,
},
uiactions
:
{
...
...
app_CRM/src/locale/lanres/entities/lead/lead_en_US.ts
浏览文件 @
ce9705e5
...
...
@@ -518,7 +518,7 @@ export default {
tip
:
"关闭"
,
},
},
conlead
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
...
...
@@ -560,7 +560,7 @@ export default {
tip
:
"Filter"
,
},
},
gridviewtoolbar_toolbar
:
{
conlead
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
...
...
app_CRM/src/locale/lanres/entities/lead/lead_zh_CN.ts
浏览文件 @
ce9705e5
...
...
@@ -517,7 +517,7 @@ export default {
tip
:
"关闭"
,
},
},
conlead
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
...
...
@@ -559,7 +559,7 @@ export default {
tip
:
"过滤"
,
},
},
gridviewtoolbar_toolbar
:
{
conlead
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
tip
:
"新建"
,
...
...
app_CRM/src/locale/lanres/entities/quote/quote_en_US.ts
浏览文件 @
ce9705e5
...
...
@@ -151,30 +151,6 @@ export default {
title
:
"报价单状态分页视图"
,
},
},
main_form
:
{
details
:
{
group1
:
"quote基本信息"
,
formpage1
:
"基本信息"
,
group2
:
"操作信息"
,
formpage2
:
"其它"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"报价单"
,
srfmajortext
:
"报价名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
quotename
:
"报价名称"
,
createman
:
"建立人"
,
createdate
:
"建立时间"
,
updateman
:
"更新人"
,
updatedate
:
"更新时间"
,
quoteid
:
"报价单"
,
},
uiactions
:
{
},
},
quickcreate_form
:
{
details
:
{
group1
:
"报价单基本信息"
,
...
...
@@ -233,6 +209,7 @@ export default {
shippingmethodcode
:
"送货方式"
,
shipto_postalcode
:
"送货地的邮政编码"
,
willcall
:
"送货地址"
,
opportunityid
:
"商机"
,
quoteid
:
"报价单"
,
},
uiactions
:
{
...
...
@@ -283,6 +260,30 @@ export default {
quote_edit_datapanel
:
"编辑头部信息"
,
},
},
main_form
:
{
details
:
{
group1
:
"quote基本信息"
,
formpage1
:
"基本信息"
,
group2
:
"操作信息"
,
formpage2
:
"其它"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"报价单"
,
srfmajortext
:
"报价名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
quotename
:
"报价名称"
,
createman
:
"建立人"
,
createdate
:
"建立时间"
,
updateman
:
"更新人"
,
updatedate
:
"更新时间"
,
quoteid
:
"报价单"
,
},
uiactions
:
{
},
},
main_grid
:
{
columns
:
{
quotename
:
"报价名称"
,
...
...
@@ -300,82 +301,6 @@ export default {
uiactions
:
{
},
},
oppquagridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"New"
,
tip
:
"New"
,
},
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
tbitem6
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
},
editviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"Save"
,
tip
:
"Save"
,
},
tbitem4
:
{
caption
:
"Save And New"
,
tip
:
"Save And New"
,
},
tbitem5
:
{
caption
:
"Save And Close"
,
tip
:
"Save And Close Window"
,
},
tbitem6
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem7
:
{
caption
:
"Remove And Close"
,
tip
:
"Remove And Close Window"
,
},
tbitem8
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"New"
,
tip
:
"New"
,
},
tbitem13
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
},
infotoolbar_toolbar
:
{
tbitem17_active
:
{
caption
:
"激活报价单"
,
...
...
@@ -452,6 +377,82 @@ export default {
tip
:
"Filter"
,
},
},
oppquagridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"New"
,
tip
:
"New"
,
},
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
tbitem6
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
},
editviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"Save"
,
tip
:
"Save"
,
},
tbitem4
:
{
caption
:
"Save And New"
,
tip
:
"Save And New"
,
},
tbitem5
:
{
caption
:
"Save And Close"
,
tip
:
"Save And Close Window"
,
},
tbitem6
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem7
:
{
caption
:
"Remove And Close"
,
tip
:
"Remove And Close Window"
,
},
tbitem8
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"New"
,
tip
:
"New"
,
},
tbitem13
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
...
...
app_CRM/src/locale/lanres/entities/quote/quote_zh_CN.ts
浏览文件 @
ce9705e5
...
...
@@ -150,30 +150,6 @@ export default {
title
:
"报价单状态分页视图"
,
},
},
main_form
:
{
details
:
{
group1
:
"quote基本信息"
,
formpage1
:
"基本信息"
,
group2
:
"操作信息"
,
formpage2
:
"其它"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"报价单"
,
srfmajortext
:
"报价名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
quotename
:
"报价名称"
,
createman
:
"建立人"
,
createdate
:
"建立时间"
,
updateman
:
"更新人"
,
updatedate
:
"更新时间"
,
quoteid
:
"报价单"
,
},
uiactions
:
{
},
},
quickcreate_form
:
{
details
:
{
group1
:
"报价单基本信息"
,
...
...
@@ -232,6 +208,7 @@ export default {
shippingmethodcode
:
"送货方式"
,
shipto_postalcode
:
"送货地的邮政编码"
,
willcall
:
"送货地址"
,
opportunityid
:
"商机"
,
quoteid
:
"报价单"
,
},
uiactions
:
{
...
...
@@ -282,6 +259,30 @@ export default {
quote_edit_datapanel
:
"编辑头部信息"
,
},
},
main_form
:
{
details
:
{
group1
:
"quote基本信息"
,
formpage1
:
"基本信息"
,
group2
:
"操作信息"
,
formpage2
:
"其它"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"报价单"
,
srfmajortext
:
"报价名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
quotename
:
"报价名称"
,
createman
:
"建立人"
,
createdate
:
"建立时间"
,
updateman
:
"更新人"
,
updatedate
:
"更新时间"
,
quoteid
:
"报价单"
,
},
uiactions
:
{
},
},
main_grid
:
{
columns
:
{
quotename
:
"报价名称"
,
...
...
@@ -299,82 +300,6 @@ export default {
uiactions
:
{
},
},
oppquagridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
tbitem6
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"删除"
,
tip
:
"删除"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"过滤"
,
tip
:
"过滤"
,
},
},
editviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"保存"
,
tip
:
"保存"
,
},
tbitem4
:
{
caption
:
"保存并新建"
,
tip
:
"保存并新建"
,
},
tbitem5
:
{
caption
:
"保存并关闭"
,
tip
:
"保存并关闭"
,
},
tbitem6
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem7
:
{
caption
:
"删除并关闭"
,
tip
:
"删除并关闭"
,
},
tbitem8
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem13
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
},
infotoolbar_toolbar
:
{
tbitem17_active
:
{
caption
:
"激活报价单"
,
...
...
@@ -451,6 +376,82 @@ export default {
tip
:
"过滤"
,
},
},
oppquagridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
tbitem6
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"删除"
,
tip
:
"删除"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"过滤"
,
tip
:
"过滤"
,
},
},
editviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"保存"
,
tip
:
"保存"
,
},
tbitem4
:
{
caption
:
"保存并新建"
,
tip
:
"保存并新建"
,
},
tbitem5
:
{
caption
:
"保存并关闭"
,
tip
:
"保存并关闭"
,
},
tbitem6
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem7
:
{
caption
:
"删除并关闭"
,
tip
:
"删除并关闭"
,
},
tbitem8
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem13
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14
:
{
caption
:
"拷贝"
,
tip
:
"拷贝"
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem1_quickcreate
:
{
caption
:
"新建"
,
...
...
app_CRM/src/locale/lanres/entities/sales-order/sales-order_en_US.ts
浏览文件 @
ce9705e5
...
...
@@ -225,6 +225,7 @@ export default {
billto_line1
:
"街道"
,
billto_postalcode
:
"邮政编码"
,
salesorderid
:
"订单"
,
opportunityid
:
"商机"
,
},
uiactions
:
{
},
...
...
app_CRM/src/locale/lanres/entities/sales-order/sales-order_zh_CN.ts
浏览文件 @
ce9705e5
...
...
@@ -224,6 +224,7 @@ export default {
billto_line1
:
"街道"
,
billto_postalcode
:
"邮政编码"
,
salesorderid
:
"订单"
,
opportunityid
:
"商机"
,
},
uiactions
:
{
},
...
...
app_CRM/src/service/account/account-service-base.ts
浏览文件 @
ce9705e5
...
...
@@ -80,6 +80,21 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
...
@@ -110,21 +125,6 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
contacts
=
contactsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -135,9 +135,9 @@ export default class AccountServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -167,6 +167,21 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
...
@@ -197,27 +212,12 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
contacts
=
contactsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -246,9 +246,9 @@ export default class AccountServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -265,9 +265,9 @@ export default class AccountServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/getdraft`
,
isloading
);
res
.
data
.
account
=
data
.
account
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
@@ -353,6 +353,21 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
let
listaccountsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
),
'undefined'
)){
listaccountsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listaccounts'
)
as
any
);
...
...
@@ -383,27 +398,12 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
contacts
=
contactsData
;
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
if
(
opportunitiesData
&&
opportunitiesData
.
length
&&
opportunitiesData
.
length
>
0
){
opportunitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunities
=
opportunitiesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
return
res
;
}
...
...
app_CRM/src/service/competitor/competitor-service-base.ts
浏览文件 @
ce9705e5
...
...
@@ -62,21 +62,6 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
...
...
@@ -107,6 +92,21 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
competitorproducts
=
competitorproductsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class CompetitorServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/competitors`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -133,21 +133,6 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
...
...
@@ -178,11 +163,26 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
competitorproducts
=
competitorproductsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/competitors/
${
context
.
competitor
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/competitors/
${
context
.
competitor
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class CompetitorServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/competitors/getdraft`
,
isloading
);
res
.
data
.
competitor
=
data
.
competitor
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
@@ -258,21 +258,6 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
let
opportunitycompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
)
as
any
);
...
...
@@ -303,11 +288,26 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
competitorproducts
=
competitorproductsData
;
let
leadcompetitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
leadcompetitorsData
.
length
>
0
){
leadcompetitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leadcompetitors
=
leadcompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/competitors/
${
context
.
competitor
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leadcompetitors'
,
JSON
.
stringify
(
res
.
data
.
leadcompetitors
));
return
res
;
}
...
...
app_CRM/src/service/quote/quote-service-base.ts
浏览文件 @
ce9705e5
...
...
@@ -78,21 +78,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -108,21 +93,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -138,6 +108,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -153,21 +138,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -183,6 +153,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -198,21 +183,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -228,6 +198,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
true
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -243,20 +228,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -272,6 +243,20 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -287,6 +272,21 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -296,8 +296,8 @@ export default class QuoteServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -313,21 +313,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -343,14 +328,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -366,6 +343,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -381,14 +366,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -404,6 +381,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -419,14 +404,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -442,6 +419,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -457,13 +442,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -479,6 +457,13 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -494,10 +479,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/quotes/
${
context
.
quote
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -538,31 +538,31 @@ export default class QuoteServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -579,35 +579,35 @@ export default class QuoteServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/getdraft`
,
isloading
);
res
.
data
.
quote
=
data
.
quote
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
@@ -638,21 +638,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -668,14 +653,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -691,6 +668,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -706,14 +691,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -729,6 +706,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -744,14 +729,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -767,6 +744,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -782,10 +767,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -818,21 +818,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
GenSalesOrder
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -848,14 +833,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -871,6 +848,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -886,14 +871,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -909,6 +886,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -924,14 +909,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -947,6 +924,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -962,10 +947,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/gensalesorder`
,
data
,
isloading
);
...
...
@@ -983,21 +983,6 @@ export default class QuoteServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1013,14 +998,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1036,6 +1013,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1051,14 +1036,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1074,6 +1051,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1089,14 +1074,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1112,6 +1089,14 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
){
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1127,13 +1112,6 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
...
...
@@ -1149,6 +1127,13 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotedetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
),
'undefined'
)){
quotedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotedetails'
)
as
any
);
...
...
@@ -1164,10 +1149,25 @@ export default class QuoteServiceBase extends EntityService {
}
}
masterData
.
quotedetails
=
quotedetailsData
;
let
salesordersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
),
'undefined'
)){
salesordersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorders'
)
as
any
);
if
(
salesordersData
&&
salesordersData
.
length
&&
salesordersData
.
length
>
0
){
salesordersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorders
=
salesordersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotedetails'
,
JSON
.
stringify
(
res
.
data
.
quotedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorders'
,
JSON
.
stringify
(
res
.
data
.
salesorders
));
return
res
;
}
...
...
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
ce9705e5
...
...
@@ -62,11 +62,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -76,12 +76,12 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -91,7 +91,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -116,8 +116,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesliteratures`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -133,11 +133,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -147,12 +147,12 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -162,7 +162,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -180,8 +180,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
masterData
.
salesliteratureitems
=
salesliteratureitemsData
;
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
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -210,8 +210,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesliteratures/
${
context
.
salesliterature
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
competitorsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -228,8 +228,8 @@ 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
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
@@ -258,11 +258,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -272,12 +272,12 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
competitor
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
competitor
salesliteratures'
),
'undefined'
)){
competitorsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitor
salesliteratures'
)
as
any
);
if
(
competitorsalesliteraturesData
&&
competitorsalesliteraturesData
.
length
&&
competitor
salesliteraturesData
.
length
>
0
){
competitor
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
let
product
salesliteraturesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
product
salesliteratures'
),
'undefined'
)){
productsalesliteraturesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_product
salesliteratures'
)
as
any
);
if
(
productsalesliteraturesData
&&
productsalesliteraturesData
.
length
&&
product
salesliteraturesData
.
length
>
0
){
product
salesliteraturesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -287,7 +287,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData
.
competitorsalesliteratures
=
competitor
salesliteraturesData
;
masterData
.
productsalesliteratures
=
product
salesliteraturesData
;
let
salesliteratureitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
),
'undefined'
)){
salesliteratureitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
)
as
any
);
...
...
@@ -305,8 +305,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
masterData
.
salesliteratureitems
=
salesliteratureitemsData
;
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
+
'_productsalesliteratures'
,
JSON
.
stringify
(
res
.
data
.
productsalesliteratures
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesliteratureitems'
,
JSON
.
stringify
(
res
.
data
.
salesliteratureitems
));
return
res
;
}
...
...
app_CRM/src/service/sales-order/sales-order-service-base.ts
浏览文件 @
ce9705e5
...
...
@@ -80,21 +80,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -110,21 +95,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -140,6 +110,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -155,21 +140,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -185,6 +155,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -200,21 +185,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -230,6 +200,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -245,21 +230,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -275,6 +245,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
true
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -290,20 +275,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -319,6 +290,20 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -334,6 +319,21 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -343,8 +343,8 @@ export default class SalesOrderServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesorders`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
...
...
@@ -360,21 +360,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -390,14 +375,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -413,6 +390,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -428,14 +413,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -451,6 +428,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -466,14 +451,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -489,6 +466,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -504,14 +489,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -527,6 +504,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -542,13 +527,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -564,6 +542,13 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -579,10 +564,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/salesorders/
${
context
.
salesorder
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
...
...
@@ -626,37 +626,37 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesorders/
${
context
.
salesorder
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
...
...
@@ -673,42 +673,42 @@ export default class SalesOrderServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/salesorders/getdraft`
,
isloading
);
res
.
data
.
salesorder
=
data
.
salesorder
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
...
...
@@ -739,21 +739,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -769,14 +754,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -792,6 +769,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -807,14 +792,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -830,6 +807,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -845,14 +830,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -868,6 +845,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -883,14 +868,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -906,6 +883,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -921,10 +906,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -957,21 +957,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
GenInvoice
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -987,14 +972,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1010,6 +987,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1025,14 +1010,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1048,6 +1025,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1063,14 +1048,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1086,6 +1063,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1101,14 +1086,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1124,6 +1101,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1139,10 +1124,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/geninvoice`
,
data
,
isloading
);
...
...
@@ -1160,21 +1160,6 @@ export default class SalesOrderServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1190,14 +1175,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1213,6 +1190,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1228,14 +1213,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1251,6 +1228,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1266,14 +1251,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1289,6 +1266,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1304,14 +1289,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1327,6 +1304,14 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
if
(
context
.
quote
&&
context
.
salesorder
){
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1342,13 +1327,6 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
return
res
;
}
let
masterData
:
any
=
{};
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
...
...
@@ -1364,6 +1342,13 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
let
masterData
:
any
=
{};
let
invoicesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
),
'undefined'
)){
invoicesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_invoices'
)
as
any
);
...
...
@@ -1379,10 +1364,25 @@ export default class SalesOrderServiceBase extends EntityService {
}
}
masterData
.
invoices
=
invoicesData
;
let
salesorderdetailsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
),
'undefined'
)){
salesorderdetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
)
as
any
);
if
(
salesorderdetailsData
&&
salesorderdetailsData
.
length
&&
salesorderdetailsData
.
length
>
0
){
salesorderdetailsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
salesorderdetailid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
salesorderdetails
=
salesorderdetailsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/salesorders/
${
context
.
salesorder
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_invoices'
,
JSON
.
stringify
(
res
.
data
.
invoices
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_salesorderdetails'
,
JSON
.
stringify
(
res
.
data
.
salesorderdetails
));
return
res
;
}
...
...
app_CRM/src/store/modules/view-action/state.ts
浏览文件 @
ce9705e5
...
...
@@ -844,6 +844,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'8bfcd7acdd1f36afc1714f1071671f2c'
,
],
},
{
...
...
@@ -2606,6 +2607,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'8bfcd7acdd1f36afc1714f1071671f2c'
,
],
},
{
...
...
@@ -2663,6 +2665,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'8bfcd7acdd1f36afc1714f1071671f2c'
,
],
},
{
...
...
app_CRM/src/widgets/invoice/info-form/info-form-base.tsx
浏览文件 @
ce9705e5
...
...
@@ -96,6 +96,7 @@ export class InfoEditFormBase extends EditFormControlBase {
billto_stateorprovince
:
null
,
billto_city
:
null
,
billto_line1
:
null
,
opportunityid
:
null
,
invoiceid
:
null
,
invoice
:
null
,
};
...
...
@@ -188,6 +189,8 @@ export class InfoEditFormBase extends EditFormControlBase {
billto_line1
:
new
FormItemModel
({
caption
:
'街道'
,
detailType
:
'FORMITEM'
,
name
:
'billto_line1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
opportunityid
:
new
FormItemModel
({
caption
:
'商机'
,
detailType
:
'FORMITEM'
,
name
:
'opportunityid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
invoiceid
:
new
FormItemModel
({
caption
:
'发票'
,
detailType
:
'FORMITEM'
,
name
:
'invoiceid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
...
...
app_CRM/src/widgets/invoice/info-form/info-form-model.ts
浏览文件 @
ce9705e5
...
...
@@ -165,6 +165,11 @@ export default class InfoModel {
prop
:
'billto_line1'
,
dataType
:
'TEXT'
,
},
{
name
:
'opportunityid'
,
prop
:
'opportunityid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'invoiceid'
,
prop
:
'invoiceid'
,
...
...
app_CRM/src/widgets/invoice/info-form/info-form-service.ts
浏览文件 @
ce9705e5
...
...
@@ -2,6 +2,7 @@ import { Http,Util,Errorlog } from '@/utils';
import
ControlService
from
'@/widgets/control-service'
;
import
InvoiceService
from
'@/service/invoice/invoice-service'
;
import
InfoModel
from
'./info-form-model'
;
import
OpportunityService
from
'@/service/opportunity/opportunity-service'
;
/**
...
...
@@ -41,6 +42,14 @@ export default class InfoService extends ControlService {
this
.
model
=
new
InfoModel
();
}
/**
* 商机服务对象
*
* @type {OpportunityService}
* @memberof InfoService
*/
public
opportunityService
:
OpportunityService
=
new
OpportunityService
();
/**
* 处理数据
*
...
...
@@ -80,6 +89,9 @@ export default class InfoService extends ControlService {
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'OpportunityService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
opportunityService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'opportunityid'
,
'opportunity'
);
}
return
Promise
.
reject
([])
}
...
...
app_CRM/src/widgets/invoice/info-form/info-form.html
浏览文件 @
ce9705e5
...
...
@@ -141,7 +141,24 @@
<i-col
v-show=
"detailsModel.opportunityname.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'opportunityname'
:itemRules=
"this.rules.opportunityname"
class=
''
:caption=
"$t('entities.invoice.info_form.details.opportunityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.opportunityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'opportunityname'
:value=
"data.opportunityname"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
></app-span>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
:disabled=
"detailsModel.opportunityname.disabled"
name=
'opportunityname'
deMajorField=
'opportunityname'
deKeyField=
'opportunity'
valueitem=
'opportunityid'
:value=
"data.opportunityname"
editortype=
"linkonly"
:linkview=
"{ viewname: 'OpportunityInfo', title: $t('entities.opportunity.views.info.title'), deResParameters: [{ pathName: 'accounts', parameterName: 'account' }, ], parameters: [{ pathName: 'opportunities', parameterName: 'opportunity' }, { pathName: 'info', parameterName: 'info' } ], width: 0, height: 0, placement: '', isRedirectView: false }"
style=
""
@
formitemvaluechange=
"onFormItemValueChange"
>
</app-picker>
</app-form-item>
</i-col>
...
...
app_CRM/src/widgets/opportunity-competitor/main-grid/main-grid.html
浏览文件 @
ce9705e5
...
...
@@ -31,7 +31,15 @@
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<span>
{{row.entityname}}
</span>
<app-column-link
deKeyField=
'opportunity'
:context=
"JSON.parse(JSON.stringify(context))"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:data=
"row"
:linkview=
"{viewname: 'opportunity-info', height: 0,width: 0,title: $t('entities.opportunity.views.info.title'),placement: '', isRedirectView: false,deResParameters: [
{ pathName: 'accounts', parameterName: 'account' },
]
,parameters: [
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'info', parameterName: 'info' }
]}"
valueitem=
"entityid"
>
<span>
{{row.entityname}}
</span>
</app-column-link
>
</template>
</el-table-column>
</template>
...
...
app_CRM/src/widgets/opportunity/main-grid/main-grid.html
浏览文件 @
ce9705e5
...
...
@@ -31,7 +31,15 @@
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<span>
{{row.opportunityname}}
</span>
<app-column-link
deKeyField=
'opportunity'
:context=
"JSON.parse(JSON.stringify(context))"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:data=
"row"
:linkview=
"{viewname: 'opportunity-info', height: 0,width: 0,title: $t('entities.opportunity.views.info.title'),placement: '', isRedirectView: false,deResParameters: [
{ pathName: 'accounts', parameterName: 'account' },
]
,parameters: [
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'info', parameterName: 'info' }
]}"
valueitem=
"srfkey"
>
<span>
{{row.opportunityname}}
</span>
</app-column-link
>
</template>
</el-table-column>
</template>
...
...
app_CRM/src/widgets/quote/abstract-info-form/abstract-info-form-base.tsx
浏览文件 @
ce9705e5
...
...
@@ -93,6 +93,7 @@ export class AbstractInfoEditFormBase extends EditFormControlBase {
shippingmethodcode
:
null
,
shipto_postalcode
:
null
,
willcall
:
null
,
opportunityid
:
null
,
quoteid
:
null
,
quote
:
null
,
};
...
...
@@ -173,6 +174,8 @@ export class AbstractInfoEditFormBase extends EditFormControlBase {
willcall
:
new
FormItemModel
({
caption
:
'送货地址'
,
detailType
:
'FORMITEM'
,
name
:
'willcall'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
opportunityid
:
new
FormItemModel
({
caption
:
'商机'
,
detailType
:
'FORMITEM'
,
name
:
'opportunityid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
quoteid
:
new
FormItemModel
({
caption
:
'报价单'
,
detailType
:
'FORMITEM'
,
name
:
'quoteid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
...
...
app_CRM/src/widgets/quote/abstract-info-form/abstract-info-form-model.ts
浏览文件 @
ce9705e5
...
...
@@ -148,6 +148,11 @@ export default class AbstractInfoModel {
prop
:
'willcall'
,
dataType
:
'YESNO'
,
},
{
name
:
'opportunityid'
,
prop
:
'opportunityid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'quoteid'
,
prop
:
'quoteid'
,
...
...
app_CRM/src/widgets/quote/abstract-info-form/abstract-info-form-service.ts
浏览文件 @
ce9705e5
...
...
@@ -2,6 +2,7 @@ import { Http,Util,Errorlog } from '@/utils';
import
ControlService
from
'@/widgets/control-service'
;
import
QuoteService
from
'@/service/quote/quote-service'
;
import
AbstractInfoModel
from
'./abstract-info-form-model'
;
import
OpportunityService
from
'@/service/opportunity/opportunity-service'
;
/**
...
...
@@ -41,6 +42,14 @@ export default class AbstractInfoService extends ControlService {
this
.
model
=
new
AbstractInfoModel
();
}
/**
* 商机服务对象
*
* @type {OpportunityService}
* @memberof AbstractInfoService
*/
public
opportunityService
:
OpportunityService
=
new
OpportunityService
();
/**
* 处理数据
*
...
...
@@ -80,6 +89,9 @@ export default class AbstractInfoService extends ControlService {
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'OpportunityService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
opportunityService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'opportunityid'
,
'opportunity'
);
}
return
Promise
.
reject
([])
}
...
...
app_CRM/src/widgets/quote/abstract-info-form/abstract-info-form.html
浏览文件 @
ce9705e5
...
...
@@ -30,7 +30,24 @@
<i-col
v-show=
"detailsModel.opportunityname.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'opportunityname'
:itemRules=
"this.rules.opportunityname"
class=
''
:caption=
"$t('entities.quote.abstractinfo_form.details.opportunityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.opportunityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'opportunityname'
:value=
"data.opportunityname"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
></app-span>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
:disabled=
"detailsModel.opportunityname.disabled"
name=
'opportunityname'
deMajorField=
'opportunityname'
deKeyField=
'opportunity'
valueitem=
'opportunityid'
:value=
"data.opportunityname"
editortype=
"linkonly"
:linkview=
"{ viewname: 'OpportunityInfo', title: $t('entities.opportunity.views.info.title'), deResParameters: [{ pathName: 'accounts', parameterName: 'account' }, ], parameters: [{ pathName: 'opportunities', parameterName: 'opportunity' }, { pathName: 'info', parameterName: 'info' } ], width: 0, height: 0, placement: '', isRedirectView: false }"
style=
""
@
formitemvaluechange=
"onFormItemValueChange"
>
</app-picker>
</app-form-item>
</i-col>
...
...
app_CRM/src/widgets/sales-order/info-form/info-form-base.tsx
浏览文件 @
ce9705e5
...
...
@@ -98,6 +98,7 @@ export class InfoEditFormBase extends EditFormControlBase {
billto_line1
:
null
,
billto_postalcode
:
null
,
salesorderid
:
null
,
opportunityid
:
null
,
salesorder
:
null
,
};
...
...
@@ -193,5 +194,7 @@ export class InfoEditFormBase extends EditFormControlBase {
salesorderid
:
new
FormItemModel
({
caption
:
'订单'
,
detailType
:
'FORMITEM'
,
name
:
'salesorderid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
opportunityid
:
new
FormItemModel
({
caption
:
'商机'
,
detailType
:
'FORMITEM'
,
name
:
'opportunityid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
}
\ No newline at end of file
app_CRM/src/widgets/sales-order/info-form/info-form-model.ts
浏览文件 @
ce9705e5
...
...
@@ -175,6 +175,11 @@ export default class InfoModel {
prop
:
'salesorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'opportunityid'
,
prop
:
'opportunityid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'salesorder'
,
prop
:
'salesorderid'
,
...
...
app_CRM/src/widgets/sales-order/info-form/info-form-service.ts
浏览文件 @
ce9705e5
...
...
@@ -2,6 +2,7 @@ import { Http,Util,Errorlog } from '@/utils';
import
ControlService
from
'@/widgets/control-service'
;
import
SalesOrderService
from
'@/service/sales-order/sales-order-service'
;
import
InfoModel
from
'./info-form-model'
;
import
OpportunityService
from
'@/service/opportunity/opportunity-service'
;
/**
...
...
@@ -41,6 +42,14 @@ export default class InfoService extends ControlService {
this
.
model
=
new
InfoModel
();
}
/**
* 商机服务对象
*
* @type {OpportunityService}
* @memberof InfoService
*/
public
opportunityService
:
OpportunityService
=
new
OpportunityService
();
/**
* 处理数据
*
...
...
@@ -80,6 +89,9 @@ export default class InfoService extends ControlService {
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'OpportunityService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
opportunityService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'opportunityid'
,
'opportunity'
);
}
return
Promise
.
reject
([])
}
...
...
app_CRM/src/widgets/sales-order/info-form/info-form.html
浏览文件 @
ce9705e5
...
...
@@ -141,7 +141,24 @@
<i-col
v-show=
"detailsModel.opportunityname.visible"
:style=
"{}"
:md=
"{ span: 12, offset: 0 }"
:lg=
"{ span: 8, offset: 0 }"
:xl=
"{ span: 6, offset: 0 }"
>
<app-form-item
name=
'opportunityname'
:itemRules=
"this.rules.opportunityname"
class=
''
:caption=
"$t('entities.salesorder.info_form.details.opportunityname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.opportunityname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'opportunityname'
:value=
"data.opportunityname"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
></app-span>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
:disabled=
"detailsModel.opportunityname.disabled"
name=
'opportunityname'
deMajorField=
'opportunityname'
deKeyField=
'opportunity'
valueitem=
'opportunityid'
:value=
"data.opportunityname"
editortype=
"linkonly"
:linkview=
"{ viewname: 'OpportunityInfo', title: $t('entities.opportunity.views.info.title'), deResParameters: [{ pathName: 'accounts', parameterName: 'account' }, ], parameters: [{ pathName: 'opportunities', parameterName: 'opportunity' }, { pathName: 'info', parameterName: 'info' } ], width: 0, height: 0, placement: '', isRedirectView: false }"
style=
""
@
formitemvaluechange=
"onFormItemValueChange"
>
</app-picker>
</app-form-item>
</i-col>
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
ce9705e5
...
...
@@ -4,7 +4,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-61
2
-1"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-61
3
-1"
>
<createTable
tableName=
"ACCOUNT"
>
<column
name=
"ADDRESS1_PRIMARYCONTACTNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -2595,7 +2595,7 @@
<!--输出实体[CONNECTION]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-connection-3
2
-35"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-connection-3
4
-35"
>
<createTable
tableName=
"CONNECTION"
>
<column
name=
"RECORD2OBJECTTYPECODE"
remarks=
""
type=
"VARCHAR(30)"
>
</column>
...
...
@@ -2757,7 +2757,7 @@
<!--输出实体[CONTACT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-35
0
-38"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-35
2
-38"
>
<createTable
tableName=
"CONTACT"
>
<column
name=
"ADDRESS1_FREIGHTTERMSCODE"
remarks=
""
type=
"VARCHAR(30)"
>
</column>
...
...
@@ -10987,31 +10987,31 @@
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-135"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-135"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__ACCOUNT__PARENT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-136"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-136"
>
<addForeignKeyConstraint
baseColumnNames=
"PRIMARYCONTACTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__CONTACT__PRIMAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-137"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-137"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-138"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-138"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-139"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-139"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-140"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-140"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-141"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-141"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-142"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-142"
>
<addForeignKeyConstraint
baseColumnNames=
"TERRITORYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TERRITORY__TERR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TERRITORYID"
referencedTableName=
"TERRITORY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
2
-143"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-61
3
-143"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
...
...
@@ -11174,10 +11174,10 @@
<addForeignKeyConstraint
baseColumnNames=
"ENTITYID"
baseTableName=
"RELATIONSHIPS"
constraintName=
"DER1N_COMPETITORSALESLITERATUR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"COMPETITORID"
referencedTableName=
"COMPETITOR"
validate=
"true"
/>
</changeSet>
<!--输出实体[CONNECTION]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-connection-3
2
-195"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-connection-3
4
-195"
>
<addForeignKeyConstraint
baseColumnNames=
"RECORD1ROLEID"
baseTableName=
"CONNECTION"
constraintName=
"DER1N_CONNECTION__CONNECTIONRO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONNECTIONROLEID"
referencedTableName=
"CONNECTIONROLE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-connection-3
2
-197"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-connection-3
4
-197"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CONNECTION"
constraintName=
"DER1N_CONNECTION__TRANSACTIONC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[CONNECTIONROLE]外键关系 -->
...
...
@@ -11186,25 +11186,25 @@
<addForeignKeyConstraint
baseColumnNames=
"BUSINESSUNITID"
baseTableName=
"CONSTRAINTBASEDGROUP"
constraintName=
"DER1N_CONSTRAINTBASEDGROUP__BU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"BUSINESSUNITID"
referencedTableName=
"BUSINESSUNIT"
validate=
"true"
/>
</changeSet>
<!--输出实体[CONTACT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
0
-199"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
2
-199"
>
<addForeignKeyConstraint
baseColumnNames=
"CUSTOMERID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT_ACCOUNT_CUSTOMER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
0
-200"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
2
-200"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
0
-201"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
2
-201"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
0
-202"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
2
-202"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
0
-203"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
2
-203"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
0
-204"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
2
-204"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
0
-205"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-35
2
-205"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[CONTRACT]外键关系 -->
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录