Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
d032a85f
提交
d032a85f
编写于
7月 09, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chitanda 发布系统代码,表单受控内容支持
上级
c11b070b
变更
63
隐藏空白字符变更
内嵌
并排
正在显示
63 个修改的文件
包含
1173 行增加
和
514 行删除
+1173
-514
app-form-group.less
app_CRM/src/components/app-form-group/app-form-group.less
+8
-0
app-form-group.tsx
app_CRM/src/components/app-form-group/app-form-group.tsx
+306
-0
filter-mode.vue
app_CRM/src/components/filter-tree/filter-mode.vue
+5
-5
form-detail.ts
app_CRM/src/model/form-detail/form-detail.ts
+68
-4
form-group-panel.ts
app_CRM/src/model/form-detail/form-group-panel.ts
+45
-0
form-tab-page.ts
app_CRM/src/model/form-detail/form-tab-page.ts
+1
-1
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+50
-50
competitor-service-base.ts
app_CRM/src/service/competitor/competitor-service-base.ts
+46
-46
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+131
-131
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+223
-223
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+50
-50
EditFormControlBase.tsx
app_CRM/src/studio-core/widgets/EditFormControlBase.tsx
+32
-0
info-all-form-base.tsx
.../src/widgets/account/info-all-form/info-all-form-base.tsx
+8
-4
inner-pickip-grid-model.ts
...gets/account/inner-pickip-grid/inner-pickip-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/account/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...src/widgets/activity-pointer/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...rc/widgets/campaign-activity/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...RM/src/widgets/campaign-list/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...rc/widgets/campaign-response/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/campaign/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...c/widgets/competitor-product/main-grid/main-grid-model.ts
+4
-0
sal-lit-comp-grid-grid-model.ts
...re/sal-lit-comp-grid-grid/sal-lit-comp-grid-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/competitor/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
.../src/widgets/connection-role/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/connection/main-grid/main-grid-model.ts
+4
-0
by-account-grid-model.ts
.../widgets/contact/by-account-grid/by-account-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/contact/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...RM/src/widgets/discount-type/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/entitlement/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/goal/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/ibiz-list/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...rc/widgets/incident-customer/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/incident/main-grid/main-grid-model.ts
+4
-0
invoice-product-grid-grid-model.ts
...oice-product-grid-grid/invoice-product-grid-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/invoice/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...s/knowledge-article-incident/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...rc/widgets/knowledge-article/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
.../src/widgets/lead-competitor/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/lead/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...CRM/src/widgets/list-account/main-grid/main-grid-model.ts
+4
-0
inner-grid-model.ts
...M/src/widgets/list-contact/inner-grid/inner-grid-model.ts
+4
-0
main-grid-model.ts
...CRM/src/widgets/list-contact/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/list-lead/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/metric/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
.../src/widgets/multi-pick-data/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...dgets/opportunity-competitor/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
.../widgets/opportunity-product/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/opportunity/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/price-level/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
.../widgets/product-association/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
.../widgets/product-price-level/main-grid/main-grid-model.ts
+4
-0
sal-lit-pro-grid-grid-model.ts
...ture/sal-lit-pro-grid-grid/sal-lit-pro-grid-grid-model.ts
+4
-0
main-grid-model.ts
...c/widgets/product-substitute/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/product/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...CRM/src/widgets/quote-detail/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/quote/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...idgets/sales-literature-item/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...src/widgets/sales-literature/main-grid/main-grid-model.ts
+4
-0
soproduct-grid-model.ts
...sales-order-detail/soproduct-grid/soproduct-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/sales-order/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/subject/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
...widgets/transaction-currency/main-grid/main-grid-model.ts
+4
-0
main-grid-model.ts
app_CRM/src/widgets/uom/main-grid/main-grid-model.ts
+4
-0
未找到文件。
app_CRM/src/components/app-form-group/app-form-group.less
浏览文件 @
d032a85f
.app-form-group {
.show-more {
margin-top: 5px;
}
>.ivu-card-head {
>p {
...
...
@@ -16,6 +20,10 @@
.item {
margin-left: 12px;
.caption {
padding-left: 5px;
}
}
}
}
...
...
app_CRM/src/components/app-form-group/app-form-group.tsx
0 → 100644
浏览文件 @
d032a85f
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
import
'./app-form-group.less'
/**
* 表单分组
*
* @export
* @class AppFormGroup
* @extends {Vue}
*/
@
Component
({})
export
default
class
AppFormGroup
extends
Vue
{
/**
* 表单分组模型
*
* @type {*}
* @memberof AppFormGroup
*/
@
Prop
({
default
:
()
=>
{
}
})
public
model
:
any
;
/**
* 标题
*
* @type {string}
* @memberof AppFormGroup
*/
@
Prop
()
public
caption
?:
string
;
/**
* 内置界面样式
*
* @type {string}
* @memberof AppFormGroup
*/
@
Prop
({
default
:
'DEFAULT'
})
public
uiStyle
!
:
string
;
/**
* 布局模式
*
* @type {string}
* @memberof AppFormGroup
*/
@
Prop
()
public
layoutType
?:
string
;
/**
* 标题样式
*
* @type {string}
* @memberof AppFormGroup
*/
@
Prop
()
public
titleStyle
?:
string
;
/**
* 分组图标
*
* @type {string}
* @memberof AppFormGroup
*/
@
Prop
()
public
iconInfo
?:
any
;
/**
* 是否显示标题
*
* @type {boolean}
* @memberof AppFormGroup
*/
@
Prop
({
default
:
true
})
public
isShowCaption
!
:
boolean
;
/**
* 信息面板模式
*
* @type {boolean}
* @memberof AppFormGroup
*/
@
Prop
({
default
:
false
})
public
isInfoGroupMode
!
:
boolean
;
/**
* 界面行为组
*
* @type {*}
* @memberof AppFormGroup
*/
@
Prop
()
public
uiActionGroup
?:
any
;
/**
* 标题栏关闭模式
* 0: 不支持关闭
* 1: 默认打开
* 2: 默认关闭
*
* @type {(number | 0 | 1 | 2)}
* @memberof AppFormGroup
*/
@
Prop
({
default
:
0
})
public
titleBarCloseMode
!
:
number
|
0
|
1
|
2
;
/**
* 收缩内容
*
* @type {boolean}
* @memberof AppFormGroup
*/
public
collapseContant
:
boolean
=
false
;
/**
* 计算样式
*
* @readonly
* @type {string[]}
* @memberof AppFormGroup
*/
get
classes
():
string
[]
{
return
[
'app-form-group'
,
this
.
isShowCaption
&&
this
.
collapseContant
?
'app-group-collapse-contant'
:
''
,
this
.
isInfoGroupMode
?
'app-info-group-mode'
:
''
,
Object
.
is
(
this
.
layoutType
,
'FLEX'
)
?
'app-group-flex'
:
''
,
this
.
uiStyle
.
toLowerCase
()
];
}
/**
* 标题样式
*
* @readonly
* @type {string}
* @memberof AppFormGroup
*/
get
titleClass
():
string
{
return
this
.
titleStyle
?
this
.
titleStyle
:
''
;
}
/**
* vue 生命周期
*
* @memberof AppFormGroup
*/
public
created
()
{
this
.
collapseContant
=
this
.
titleBarCloseMode
===
2
?
true
:
false
;
}
/**
* 触发收缩
*
* @memberof AppFormGroup
*/
public
clickCollapse
():
void
{
this
.
collapseContant
=
!
this
.
collapseContant
;
}
/**
* 执行界面行
*
* @param {*} $event
* @memberof AppFormGroup
*/
public
doUIAction
(
$event
:
any
,
item
:
any
):
void
{
this
.
$emit
(
'groupuiactionclick'
,
{
event
:
$event
,
item
:
item
});
}
/**
* 计算行为项图标
*
* @protected
* @param {*} detail
* @returns {*}
* @memberof AppFormGroup
*/
protected
getIcon
(
detail
:
any
):
any
{
if
(
detail
.
isShowIcon
)
{
if
(
isExistAndNotEmpty
(
detail
.
icon
))
{
return
<
i
class=
{
detail
.
icon
}
/>;
}
else
if
(
isExistAndNotEmpty
(
detail
.
img
))
{
return
<
img
src=
"detail.img"
/>;
}
}
}
/**
* 计算行为项标题
*
* @protected
* @param {*} detail
* @returns {*}
* @memberof AppFormGroup
*/
protected
getCaption
(
detail
:
any
):
any
{
if
(
detail
.
isShowCaption
)
{
if
(
isExistAndNotEmpty
(
detail
.
uiactiontag
)
&&
isExistAndNotEmpty
(
this
.
uiActionGroup
.
langbase
))
{
return
this
.
$t
(
`
${
this
.
uiActionGroup
.
langbase
}
.uiactions.
${
detail
.
uiactiontag
}
`
);
}
return
detail
.
caption
;
}
}
/**
* 绘制样式4模式分组
*
* @protected
* @returns {*}
* @memberof AppFormGroup
*/
protected
renderStyle4
():
any
{
return
<
app
-
form
-
group4
caption=
{
this
.
caption
}
uiStyle=
{
this
.
uiStyle
}
layoutType=
{
this
.
layoutType
}
isShowCaption=
{
this
.
isShowCaption
}
isInfoGroupMode=
{
this
.
isInfoGroupMode
}
uiActionGroup=
{
this
.
uiActionGroup
}
titleBarCloseMode=
{
this
.
titleBarCloseMode
}
>
{
this
.
$slots
.
default
}
</
app
-
form
-
group4
>;
}
/**
* 绘制样式2模式分组
*
* @protected
* @returns {*}
* @memberof AppFormGroup
*/
protected
renderStyle2
():
any
{
return
<
app
-
form
-
group2
caption=
{
this
.
caption
}
uiStyle=
{
this
.
uiStyle
}
layoutType=
{
this
.
layoutType
}
isShowCaption=
{
this
.
isShowCaption
}
isInfoGroupMode=
{
this
.
isInfoGroupMode
}
uiActionGroup=
{
this
.
uiActionGroup
}
titleBarCloseMode=
{
this
.
titleBarCloseMode
}
>
{
this
.
$slots
.
default
}
</
app
-
form
-
group2
>;
}
/**
* 绘制行为组
*
* @protected
* @returns {*}
* @memberof AppFormGroup
*/
protected
renderActionGroup
():
any
{
if
(
this
.
uiActionGroup
)
{
let
content
:
any
;
if
(
this
.
uiActionGroup
.
extractMode
&&
Object
.
is
(
this
.
uiActionGroup
.
extractMode
,
'ITEMS'
))
{
content
=
<
dropdown
transfer=
{
true
}
trigger=
'click'
>
<
a
href=
'javascript:void(0)'
>
{
this
.
uiActionGroup
.
caption
}
</
a
>
<
dropdown
-
menu
slot=
'list'
>
{
this
.
uiActionGroup
.
details
.
map
((
detail
:
any
,
i
:
number
)
=>
{
return
<
dropdown
-
item
key=
{
i
}
name=
{
detail
.
name
}
>
<
span
class=
'item'
on
-
click=
{
(
e
:
any
)
=>
this
.
doUIAction
(
e
,
detail
)
}
>
{
this
.
getIcon
(
detail
)
}
<
span
class=
"caption"
>
{
this
.
getCaption
(
detail
)
}
</
span
>
</
span
>
;
</
dropdown
-
item
>;
})
}
</
dropdown
-
menu
>
</
dropdown
>;
}
else
{
content
=
<
span
class=
'item-extract-mode'
>
{
this
.
uiActionGroup
.
details
.
map
((
detail
:
any
,
i
:
number
)
=>
{
return
<
span
key=
{
i
}
class=
'item'
on
-
click=
{
(
e
:
any
)
=>
this
.
doUIAction
(
e
,
detail
)
}
>
{
this
.
getIcon
(
detail
)
}
<
span
class=
"caption"
>
{
this
.
getCaption
(
detail
)
}
</
span
>
</
span
>;
})
}
</
span
>;
}
return
<
a
slot=
'extra'
>
{
content
}
</
a
>;
}
}
/**
* 绘制默认内容
*
* @protected
* @returns {*}
* @memberof AppFormGroup
*/
protected
renderContent
():
any
{
if
(
this
.
isShowCaption
===
false
)
{
return
this
.
$slots
.
default
;
}
return
<
card
bordered=
{
false
}
dis
-
hover=
{
true
}
class=
{
this
.
classes
}
>
<
p
slot=
'title'
>
{
this
.
titleBarCloseMode
!==
0
?
<
icon
type=
{
this
.
collapseContant
?
'ios-arrow-dropright-circle'
:
'ios-arrow-dropdown-circle'
}
on
-
click=
{
()
=>
this
.
clickCollapse
()
}
></
icon
>
:
null
}
<
span
class=
{
this
.
titleClass
}
>
{
this
.
caption
}
</
span
>
</
p
>
{
this
.
renderActionGroup
()
}
{
Object
.
is
(
this
.
layoutType
,
'FLEX'
)
?
this
.
$slots
.
default
:
<
row
gutter=
{
10
}
>
{
this
.
$slots
.
default
}
</
row
>
}
<
div
class=
"show-more"
v
-
show=
{
this
.
model
.
showMoreMode
===
2
}
>
<
i
-
button
on
-
click=
{
()
=>
this
.
model
.
changeShowMore
()
}
size=
"small"
>
{
this
.
model
?.
showMore
?
'隐藏更多'
:
'显示更多'
}
</
i
-
button
>
</
div
>
</
card
>;
}
/**
* 绘制内容
*
* @returns {*}
* @memberof AppFormGroup
*/
public
render
():
any
{
let
content
:
any
;
if
(
this
.
uiStyle
===
'STYLE4'
)
{
content
=
this
.
renderStyle4
();
}
else
if
(
this
.
uiStyle
===
'STYLE2'
)
{
content
=
this
.
renderStyle2
();
}
else
{
content
=
this
.
renderContent
();
}
return
<
div
class=
{
this
.
classes
}
>
{
content
}
</
div
>;
}
}
\ No newline at end of file
app_CRM/src/components/filter-tree/filter-mode.vue
浏览文件 @
d032a85f
...
...
@@ -72,13 +72,13 @@ export default class FilterMode extends Vue {
// { name: 'AND', value: '$and' },
// { name: 'OR', value: '$or' },
{
'zh-CN'
:
'等于(=)'
,
'en-US'
:
'EQ'
,
value
:
'$eq'
},
{
'zh-CN'
:
'不等于(<>)'
,
'en-US'
:
'N
E
'
,
value
:
'$ne'
},
{
'zh-CN'
:
'不等于(<>)'
,
'en-US'
:
'N
OTEQ
'
,
value
:
'$ne'
},
{
'zh-CN'
:
'大于(>)'
,
'en-US'
:
'GT'
,
value
:
'$gt'
},
{
'zh-CN'
:
'大于等于(>=)'
,
'en-US'
:
'G
E
'
,
value
:
'$gte'
},
{
'zh-CN'
:
'大于等于(>=)'
,
'en-US'
:
'G
TANDEQ
'
,
value
:
'$gte'
},
{
'zh-CN'
:
'小于(<)'
,
'en-US'
:
'LT'
,
value
:
'$lt'
},
{
'zh-CN'
:
'小于
(<=)'
,
'en-US'
:
'LE
'
,
value
:
'$lte'
},
{
'zh-CN'
:
'值为空(Nil)'
,
'en-US'
:
'IS
_
NULL'
,
value
:
'$null'
},
{
'zh-CN'
:
'值不为空(NotNil)'
,
'en-US'
:
'IS
_NOT_
NULL'
,
value
:
'$notNull'
},
{
'zh-CN'
:
'小于
等于(<=)'
,
'en-US'
:
'LTANDEQ
'
,
value
:
'$lte'
},
{
'zh-CN'
:
'值为空(Nil)'
,
'en-US'
:
'ISNULL'
,
value
:
'$null'
},
{
'zh-CN'
:
'值不为空(NotNil)'
,
'en-US'
:
'IS
NOT
NULL'
,
value
:
'$notNull'
},
{
'zh-CN'
:
'值在范围中(In)'
,
'en-US'
:
'IN'
,
value
:
'$in'
},
{
'zh-CN'
:
'值不在范围中(NotIn)'
,
'en-US'
:
'NOTIN'
,
value
:
'$notIn'
},
{
'zh-CN'
:
'文本包含(%)'
,
'en-US'
:
'LIKE'
,
value
:
'$like'
},
...
...
app_CRM/src/model/form-detail/form-detail.ts
浏览文件 @
d032a85f
...
...
@@ -6,6 +6,22 @@
*/
export
class
FormDetailModel
{
/**
* 参数
*
* @type {*}
* @memberof FormDetailModel
*/
public
opts
:
any
=
{};
/**
* 父
*
* @type {*}
* @memberof FormDetailModel
*/
public
parent
:
any
=
null
;
/**
* 成员标题
*
...
...
@@ -44,7 +60,18 @@ export class FormDetailModel {
* @type {boolean}
* @memberof FormDetailModel
*/
public
visible
:
boolean
=
true
;
protected
$visible
:
boolean
;
/**
* 成员是否隐藏
*
* @readonly
* @type {boolean}
* @memberof FormDetailModel
*/
public
get
visible
():
boolean
{
return
(
this
.
isShowMore
&&
this
.
$visible
);
}
/**
* 成员是否显示标题
...
...
@@ -52,7 +79,23 @@ export class FormDetailModel {
* @type {boolean}
* @memberof FormDetailModel
*/
public
isShowCaption
:
boolean
=
true
;
public
isShowCaption
:
boolean
;
/**
* 表单项受控模式,
*
* @type {(0 | 1 | 2)}
* @memberof FormDetailModel
*/
public
showMoreMode
:
0
|
1
|
2
=
0
;
/**
* 受控项是否显示
*
* @type {boolean}
* @memberof FormGroupPanelModel
*/
public
isShowMore
:
boolean
;
/**
* Creates an instance of FormDetailModel.
...
...
@@ -62,12 +105,19 @@ export class FormDetailModel {
* @memberof FormDetailModel
*/
constructor
(
opts
:
any
=
{})
{
this
.
opts
=
opts
;
this
.
caption
=
!
Object
.
is
(
opts
.
caption
,
''
)
?
opts
.
caption
:
''
;
this
.
detailType
=
!
Object
.
is
(
opts
.
detailType
,
''
)
?
opts
.
detailType
:
''
;
this
.
form
=
opts
.
form
?
opts
.
form
:
{};
this
.
name
=
!
Object
.
is
(
opts
.
name
,
''
)
?
opts
.
name
:
''
;
this
.
visible
=
opts
.
visible
?
true
:
false
;
this
.
$
visible
=
opts
.
visible
?
true
:
false
;
this
.
isShowCaption
=
opts
.
isShowCaption
?
true
:
false
;
this
.
showMoreMode
=
opts
.
showMoreMode
;
if
(
this
.
showMoreMode
===
1
)
{
this
.
isShowMore
=
false
;
}
else
{
this
.
isShowMore
=
true
;
}
}
/**
...
...
@@ -77,7 +127,21 @@ export class FormDetailModel {
* @memberof FormDetailModel
*/
public
setVisible
(
state
:
boolean
):
void
{
this
.
visible
=
state
;
this
.
$visible
=
state
;
}
/**
* 改变显示更多受控项状态
*
* @param {boolean} bol
* @memberof FormDetailModel
*/
public
setShowMore
(
bol
:
boolean
):
void
{
if
(
isExist
(
bol
))
{
this
.
isShowMore
=
bol
;
}
else
{
this
.
isShowMore
=
!
this
.
isShowMore
;
}
}
/**
...
...
app_CRM/src/model/form-detail/form-group-panel.ts
浏览文件 @
d032a85f
...
...
@@ -17,6 +17,30 @@ export class FormGroupPanelModel extends FormDetailModel {
*/
public
uiActionGroup
:
any
=
{};
/**
* 所有锚点项
*
* @type {any[]}
* @memberof FormGroupPanelModel
*/
public
anchorPoints
:
any
=
{};
/**
* 所有受控项
*
* @type {*}
* @memberof FormGroupPanelModel
*/
public
controlledItems
:
any
=
{};
/**
* 表单分组控制子是否显示更多
*
* @type {boolean}
* @memberof FormGroupPanelModel
*/
public
showMore
:
boolean
=
false
;
/**
* Creates an instance of FormGroupPanelModel.
* 创建 FormGroupPanelModel 实例
...
...
@@ -28,4 +52,25 @@ export class FormGroupPanelModel extends FormDetailModel {
super
(
opts
);
Object
.
assign
(
this
.
uiActionGroup
,
opts
.
uiActionGroup
);
}
/**
* 改变显示更多受控项状态
*
* @param {boolean} bol
* @memberof FormDetailModel
*/
public
changeShowMore
(
bol
:
boolean
):
void
{
if
(
isExist
(
bol
))
{
this
.
isShowMore
=
bol
;
}
else
{
this
.
showMore
=
!
this
.
showMore
;
}
for
(
const
key
in
this
.
controlledItems
)
{
if
(
this
.
controlledItems
.
hasOwnProperty
(
key
))
{
const
item
=
this
.
controlledItems
[
key
];
item
.
setShowMore
(
this
.
showMore
);
}
}
}
}
\ No newline at end of file
app_CRM/src/model/form-detail/form-tab-page.ts
浏览文件 @
d032a85f
...
...
@@ -29,7 +29,7 @@ export class FormTabPageModel extends FormDetailModel {
* @memberof FormTabPageModel
*/
public
setVisible
(
state
:
boolean
):
void
{
this
.
visible
=
state
;
super
.
setVisible
(
state
)
;
const
tabPanel
=
this
.
getTabPanelModel
();
if
(
tabPanel
)
{
tabPanel
.
setActiviePage
();
...
...
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
d032a85f
...
...
@@ -62,21 +62,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -107,6 +92,21 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class CampaignServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -133,21 +133,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -178,11 +163,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
@@ -258,21 +258,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
let
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -303,11 +288,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
let
campaigncampaignsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
),
'undefined'
)){
campaigncampaignsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
)
as
any
);
if
(
campaigncampaignsData
&&
campaigncampaignsData
.
length
&&
campaigncampaignsData
.
length
>
0
){
campaigncampaignsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
return
res
;
}
...
...
app_CRM/src/service/competitor/competitor-service-base.ts
浏览文件 @
d032a85f
...
...
@@ -62,11 +62,11 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
opportunity
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunity
competitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunity
competitorsData
.
length
>
0
){
opportunity
competitorsData
.
forEach
((
item
:
any
)
=>
{
let
lead
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
competitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
competitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
lead
competitorsData
.
length
>
0
){
lead
competitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -76,7 +76,7 @@ export default class CompetitorServiceBase extends EntityService {
});
}
}
masterData
.
opportunitycompetitors
=
opportunity
competitorsData
;
masterData
.
leadcompetitors
=
lead
competitorsData
;
let
competitorproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
),
'undefined'
)){
competitorproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
)
as
any
);
...
...
@@ -92,11 +92,11 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
competitorproducts
=
competitorproductsData
;
let
lead
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
competitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
competitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
lead
competitorsData
.
length
>
0
){
lead
competitorsData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunity
competitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunity
competitorsData
.
length
>
0
){
opportunity
competitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -106,7 +106,7 @@ export default class CompetitorServiceBase extends EntityService {
});
}
}
masterData
.
leadcompetitors
=
lead
competitorsData
;
masterData
.
opportunitycompetitors
=
opportunity
competitorsData
;
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
+
'_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
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -133,11 +133,11 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
opportunity
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunity
competitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunity
competitorsData
.
length
>
0
){
opportunity
competitorsData
.
forEach
((
item
:
any
)
=>
{
let
lead
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
competitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
competitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
lead
competitorsData
.
length
>
0
){
lead
competitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -147,7 +147,7 @@ export default class CompetitorServiceBase extends EntityService {
});
}
}
masterData
.
opportunitycompetitors
=
opportunity
competitorsData
;
masterData
.
leadcompetitors
=
lead
competitorsData
;
let
competitorproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
),
'undefined'
)){
competitorproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
)
as
any
);
...
...
@@ -163,11 +163,11 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
competitorproducts
=
competitorproductsData
;
let
lead
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
competitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
competitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
lead
competitorsData
.
length
>
0
){
lead
competitorsData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunity
competitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunity
competitorsData
.
length
>
0
){
opportunity
competitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -177,12 +177,12 @@ export default class CompetitorServiceBase extends EntityService {
});
}
}
masterData
.
leadcompetitors
=
lead
competitorsData
;
masterData
.
opportunitycompetitors
=
opportunity
competitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/competitors/
${
context
.
competitor
}
`
,
data
,
isloading
);
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
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
+
'_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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
@@ -258,11 +258,11 @@ export default class CompetitorServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
opportunity
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunity
competitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunity
competitorsData
.
length
>
0
){
opportunity
competitorsData
.
forEach
((
item
:
any
)
=>
{
let
lead
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
competitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
competitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
lead
competitorsData
.
length
>
0
){
lead
competitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -272,7 +272,7 @@ export default class CompetitorServiceBase extends EntityService {
});
}
}
masterData
.
opportunitycompetitors
=
opportunity
competitorsData
;
masterData
.
leadcompetitors
=
lead
competitorsData
;
let
competitorproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
),
'undefined'
)){
competitorproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_competitorproducts'
)
as
any
);
...
...
@@ -288,11 +288,11 @@ export default class CompetitorServiceBase extends EntityService {
}
}
masterData
.
competitorproducts
=
competitorproductsData
;
let
lead
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
lead
competitors'
),
'undefined'
)){
leadcompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_lead
competitors'
)
as
any
);
if
(
leadcompetitorsData
&&
leadcompetitorsData
.
length
&&
lead
competitorsData
.
length
>
0
){
lead
competitorsData
.
forEach
((
item
:
any
)
=>
{
let
opportunity
competitorsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
opportunity
competitors'
),
'undefined'
)){
opportunitycompetitorsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunity
competitors'
)
as
any
);
if
(
opportunitycompetitorsData
&&
opportunitycompetitorsData
.
length
&&
opportunity
competitorsData
.
length
>
0
){
opportunity
competitorsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
relationshipsid
=
null
;
...
...
@@ -302,12 +302,12 @@ export default class CompetitorServiceBase extends EntityService {
});
}
}
masterData
.
leadcompetitors
=
lead
competitorsData
;
masterData
.
opportunitycompetitors
=
opportunity
competitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/competitors/
${
context
.
competitor
}
/save`
,
data
,
isloading
);
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
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_competitorproducts'
,
JSON
.
stringify
(
res
.
data
.
competitorproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
d032a85f
...
...
@@ -68,21 +68,6 @@ export default class ContactServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
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
);
...
...
@@ -113,21 +98,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -143,6 +113,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -173,6 +158,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -182,9 +182,9 @@ export default class ContactServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -200,21 +200,6 @@ export default class ContactServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
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
);
...
...
@@ -245,14 +230,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -268,6 +245,14 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -298,11 +283,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -334,15 +334,15 @@ export default class ContactServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -359,16 +359,16 @@ export default class ContactServiceBase extends EntityService {
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -399,21 +399,6 @@ export default class ContactServiceBase extends EntityService {
public
async
AddList
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
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
);
...
...
@@ -444,11 +429,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/addlist`
,
data
,
isloading
);
...
...
@@ -466,21 +466,6 @@ export default class ContactServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
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
);
...
...
@@ -511,11 +496,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -548,21 +548,6 @@ export default class ContactServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
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
);
...
...
@@ -593,14 +578,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
return
res
;
}
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
...
...
@@ -616,6 +593,14 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
),
'undefined'
)){
opportunitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunities'
)
as
any
);
...
...
@@ -646,11 +631,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -666,21 +666,6 @@ export default class ContactServiceBase extends EntityService {
public
async
SetPrimary
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
let
masterData
:
any
=
{};
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
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
);
...
...
@@ -711,11 +696,26 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData
.
listcontacts
=
listcontactsData
;
let
leadsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
),
'undefined'
)){
leadsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_leads'
)
as
any
);
if
(
leadsData
&&
leadsData
.
length
&&
leadsData
.
length
>
0
){
leadsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
leadid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
leads
=
leadsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunities'
,
JSON
.
stringify
(
res
.
data
.
opportunities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/setprimary`
,
data
,
isloading
);
...
...
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -104,21 +119,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -128,13 +128,28 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -165,21 +180,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -189,13 +189,28 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -226,6 +241,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -241,21 +271,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -286,21 +301,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -310,9 +310,9 @@ export default class OpportunityServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -328,6 +328,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -358,6 +373,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -373,15 +397,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -412,6 +427,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -427,15 +451,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -466,6 +481,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -481,14 +504,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -519,26 +534,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -576,29 +576,29 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -615,32 +615,32 @@ export default class OpportunityServiceBase extends EntityService {
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/opportunities/getdraft`
,
isloading
);
res
.
data
.
opportunity
=
data
.
opportunity
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
@@ -656,6 +656,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -686,6 +701,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -701,15 +725,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -740,6 +755,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -755,15 +779,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -794,26 +809,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/active`
,
data
,
isloading
);
...
...
@@ -831,6 +831,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -861,6 +876,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -876,15 +900,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -915,6 +930,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -930,15 +954,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -969,26 +984,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -1021,6 +1021,21 @@ export default class OpportunityServiceBase extends EntityService {
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1051,6 +1066,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -1066,15 +1090,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
contact
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1105,6 +1120,15 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -1120,15 +1144,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
if
(
context
.
account
&&
context
.
opportunity
){
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1159,6 +1174,14 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
return
res
;
}
let
masterData
:
any
=
{};
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
...
...
@@ -1174,14 +1197,6 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
let
masterData
:
any
=
{};
let
quotesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
),
'undefined'
)){
quotesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_quotes'
)
as
any
);
...
...
@@ -1212,26 +1227,11 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData
.
opportunitycompetitors
=
opportunitycompetitorsData
;
let
opportunityproductsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
),
'undefined'
)){
opportunityproductsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
)
as
any
);
if
(
opportunityproductsData
&&
opportunityproductsData
.
length
&&
opportunityproductsData
.
length
>
0
){
opportunityproductsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
opportunityproductid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
opportunityproducts
=
opportunityproductsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_quotes'
,
JSON
.
stringify
(
res
.
data
.
quotes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunitycompetitors'
,
JSON
.
stringify
(
res
.
data
.
opportunitycompetitors
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_opportunityproducts'
,
JSON
.
stringify
(
res
.
data
.
opportunityproducts
));
return
res
;
}
...
...
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
d032a85f
...
...
@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productassociations
=
productassociationsData
;
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productassociations
=
productassociationsData
;
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/products/
${
context
.
product
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/
${
context
.
product
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/products/getdraft`
,
isloading
);
res
.
data
.
product
=
data
.
product
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
let
productsubstitutesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
),
'undefined'
)){
productsubstitutesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
)
as
any
);
...
...
@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService {
}
}
masterData
.
productassociations
=
productassociationsData
;
let
productpricelevelsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
),
'undefined'
)){
productpricelevelsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_productpricelevels'
)
as
any
);
if
(
productpricelevelsData
&&
productpricelevelsData
.
length
&&
productpricelevelsData
.
length
>
0
){
productpricelevelsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
productpricelevelid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
productpricelevels
=
productpricelevelsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/products/
${
context
.
product
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productsubstitutes'
,
JSON
.
stringify
(
res
.
data
.
productsubstitutes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productassociations'
,
JSON
.
stringify
(
res
.
data
.
productassociations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_productpricelevels'
,
JSON
.
stringify
(
res
.
data
.
productpricelevels
));
return
res
;
}
...
...
app_CRM/src/studio-core/widgets/EditFormControlBase.tsx
浏览文件 @
d032a85f
...
...
@@ -139,6 +139,38 @@ export class EditFormControlBase extends FormControlBase {
}
}
},
'update'
,
this
.
appDeName
.
toUpperCase
()));
this
.
fillDetailModels
();
}
/**
* 填充表单模型
*
* @protected
* @memberof EditFormControlBase
*/
protected
fillDetailModels
():
void
{
for
(
const
key
in
this
.
detailsModel
)
{
if
(
this
.
detailsModel
.
hasOwnProperty
(
key
))
{
const
item
=
this
.
detailsModel
[
key
];
if
(
item
.
detailType
===
'GROUPPANEL'
)
{
if
(
item
.
opts
.
anchorPoints
)
{
item
.
opts
.
anchorPoints
.
forEach
((
str
:
string
)
=>
{
if
(
this
.
detailsModel
[
str
])
{
item
.
anchorPoints
[
str
]
=
this
.
detailsModel
[
str
];
}
});
}
if
(
item
.
opts
.
controlledItems
)
{
console
.
log
(
item
.
opts
.
name
,
'2'
);
item
.
opts
.
controlledItems
.
forEach
((
str
:
string
)
=>
{
if
(
this
.
detailsModel
[
str
])
{
item
.
controlledItems
[
str
]
=
this
.
detailsModel
[
str
];
}
});
}
}
}
}
}
/**
...
...
app_CRM/src/widgets/account/info-all-form/info-all-form-base.tsx
浏览文件 @
d032a85f
...
...
@@ -211,8 +211,12 @@ export class Info_AllEditFormBase extends EditFormControlBase {
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'账户信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
2
,
anchorPoints
:
[
'sic'
,
'tickersymbol'
,
'ownershipcode'
,
],
controlledItems
:
[
'sic'
,
'fax'
,
'websiteurl'
,
'parentaccountname'
,
'tickersymbol'
,
'ownershipcode'
,
'defaultpricelevelname'
,
],
uiActionGroup
:
{
caption
:
'编辑_账户信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'group1_uc040f39'
,
caption
:
'编辑'
,
uiactiontag
:
'account_edit_accountinfo'
,
icon
:
'fa fa-pencil'
,
isShowCaption
:
false
,
isShowIcon
:
true
}]
}
}),
grouppanel1
:
new
FormGroupPanelModel
({
caption
:
'地址信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
uiActionGroup
:
{
caption
:
'编辑_地址信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'grouppanel1_u2ccbfc9'
,
caption
:
'编辑'
,
uiactiontag
:
'account_edit_address'
,
icon
:
'fa fa-pencil'
,
isShowCaption
:
false
,
isShowIcon
:
true
}]
}
}),
...
...
@@ -251,17 +255,17 @@ export class Info_AllEditFormBase extends EditFormControlBase {
sic
:
new
FormItemModel
({
caption
:
'行业编码'
,
detailType
:
'FORMITEM'
,
name
:
'sic'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
1
,
disabled
:
false
,
enableCond
:
3
}),
fax
:
new
FormItemModel
({
caption
:
'传真'
,
detailType
:
'FORMITEM'
,
name
:
'fax'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
fax
:
new
FormItemModel
({
caption
:
'传真'
,
detailType
:
'FORMITEM'
,
name
:
'fax'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
1
,
disabled
:
false
,
enableCond
:
3
}),
websiteurl
:
new
FormItemModel
({
caption
:
'网站'
,
detailType
:
'FORMITEM'
,
name
:
'websiteurl'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
websiteurl
:
new
FormItemModel
({
caption
:
'网站'
,
detailType
:
'FORMITEM'
,
name
:
'websiteurl'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
1
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级客户'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
parentaccountname
:
new
FormItemModel
({
caption
:
'上级客户'
,
detailType
:
'FORMITEM'
,
name
:
'parentaccountname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
1
,
disabled
:
false
,
enableCond
:
3
}),
tickersymbol
:
new
FormItemModel
({
caption
:
'股票代号'
,
detailType
:
'FORMITEM'
,
name
:
'tickersymbol'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
1
,
disabled
:
false
,
enableCond
:
3
}),
ownershipcode
:
new
FormItemModel
({
caption
:
'所有权'
,
detailType
:
'FORMITEM'
,
name
:
'ownershipcode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
1
,
disabled
:
false
,
enableCond
:
3
}),
defaultpricelevelname
:
new
FormItemModel
({
caption
:
'价目表'
,
detailType
:
'FORMITEM'
,
name
:
'defaultpricelevelname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
defaultpricelevelname
:
new
FormItemModel
({
caption
:
'价目表'
,
detailType
:
'FORMITEM'
,
name
:
'defaultpricelevelname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
1
,
disabled
:
false
,
enableCond
:
3
}),
description
:
new
FormItemModel
({
caption
:
'说明'
,
detailType
:
'FORMITEM'
,
name
:
'description'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
...
...
app_CRM/src/widgets/account/inner-pickip-grid/inner-pickip-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -108,6 +108,10 @@ export default class InnerPickipModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/account/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -154,6 +154,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/activity-pointer/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -109,6 +109,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/campaign-activity/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/campaign-list/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -64,6 +64,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/campaign-response/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -79,6 +79,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/campaign/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -109,6 +109,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/competitor-product/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -79,6 +79,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/competitor-sales-literature/sal-lit-comp-grid-grid/sal-lit-comp-grid-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class SalLitCompGridModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/competitor/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -69,6 +69,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/connection-role/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -89,6 +89,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/connection/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -94,6 +94,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/contact/by-account-grid/by-account-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -108,6 +108,10 @@ export default class ByAccountModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/contact/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -124,6 +124,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/discount-type/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/entitlement/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -84,6 +84,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/goal/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -129,6 +129,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/ibiz-list/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -84,6 +84,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/incident-customer/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/incident/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -154,6 +154,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/invoice-detail/invoice-product-grid-grid/invoice-product-grid-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -109,6 +109,10 @@ export default class InvoiceProductGridModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/invoice/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -99,6 +99,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/knowledge-article-incident/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -79,6 +79,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/knowledge-article/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -99,6 +99,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/lead-competitor/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/lead/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -124,6 +124,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/list-account/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -84,6 +84,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/list-contact/inner-grid/inner-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -88,6 +88,10 @@ export default class InnerModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/list-contact/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -89,6 +89,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/list-lead/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -83,6 +83,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/metric/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -69,6 +69,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/multi-pick-data/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -84,6 +84,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/opportunity-competitor/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -94,6 +94,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/opportunity-product/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -94,6 +94,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/opportunity/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -124,6 +124,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/price-level/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/product-association/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -89,6 +89,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/product-price-level/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -104,6 +104,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/product-sales-literature/sal-lit-pro-grid-grid/sal-lit-pro-grid-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class SalLitProGridModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/product-substitute/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -84,6 +84,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/product/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -104,6 +104,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/quote-detail/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -99,6 +99,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/quote/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -99,6 +99,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/sales-literature-item/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/sales-literature/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -79,6 +79,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/sales-order-detail/soproduct-grid/soproduct-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -109,6 +109,10 @@ export default class SOProductModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/sales-order/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -104,6 +104,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/subject/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -74,6 +74,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/transaction-currency/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -69,6 +69,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
app_CRM/src/widgets/uom/main-grid/main-grid-model.ts
浏览文件 @
d032a85f
...
...
@@ -79,6 +79,10 @@ export default class MainModel {
name
:
'query'
,
prop
:
'query'
},
{
name
:
'filter'
,
prop
:
'filter'
},
{
name
:
'page'
,
prop
:
'page'
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录