Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
1048cb03
提交
1048cb03
编写于
6月 19, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
d9f9ad3b
变更
57
展开全部
显示空白字符变更
内嵌
并排
正在显示
57 个修改的文件
包含
4142 行增加
和
229 行删除
+4142
-229
view-config.json
app_BusinessCentral/public/assets/json/view-config.json
+4
-4
contact.ts
app_BusinessCentral/src/interface/entity/contact.ts
+16
-0
contact_en_US.ts
...ntral/src/locale/lanres/entities/contact/contact_en_US.ts
+4
-2
contact_zh_CN.ts
...ntral/src/locale/lanres/entities/contact/contact_zh_CN.ts
+4
-2
contacts.ts
app_BusinessCentral/src/mock/entity/contacts/contacts.ts
+271
-0
leads.ts
app_BusinessCentral/src/mock/entity/leads/leads.ts
+271
-0
list-contacts.ts
...essCentral/src/mock/entity/list-contacts/list-contacts.ts
+271
-0
list-leads.ts
app_BusinessCentral/src/mock/entity/list-leads/list-leads.ts
+271
-0
opportunitys.ts
...inessCentral/src/mock/entity/opportunitys/opportunitys.ts
+271
-0
viewconfig.ts
app_BusinessCentral/src/mock/viewconfig/viewconfig.ts
+3
-3
account-grid-view-base.vue
...c/pages/base/account-grid-view/account-grid-view-base.vue
+1
-1
contact-by-account-base.vue
...pages/base/contact-by-account/contact-by-account-base.vue
+14
-4
contact-grid-view-base.vue
...c/pages/base/contact-grid-view/contact-grid-view-base.vue
+15
-5
contact-quick-create-base.vue
...s/base/contact-quick-create/contact-quick-create-base.vue
+554
-0
contact-quick-create.less
...pages/base/contact-quick-create/contact-quick-create.less
+9
-0
contact-quick-create.vue
.../pages/base/contact-quick-create/contact-quick-create.vue
+19
-0
page-register.ts
...usinessCentral/src/pages/ungroup/central/page-register.ts
+1
-1
router.ts
app_BusinessCentral/src/pages/ungroup/central/router.ts
+816
-8
account-service-base.ts
...sinessCentral/src/service/account/account-service-base.ts
+50
-0
contact-service-base.ts
...sinessCentral/src/service/contact/contact-service-base.ts
+34
-0
lead-service-base.ts
app_BusinessCentral/src/service/lead/lead-service-base.ts
+34
-0
list-contact-service-base.ts
...ral/src/service/list-contact/list-contact-service-base.ts
+34
-0
list-lead-service-base.ts
...ssCentral/src/service/list-lead/list-lead-service-base.ts
+34
-0
opportunity-service-base.ts
...ntral/src/service/opportunity/opportunity-service-base.ts
+34
-0
state.ts
app_BusinessCentral/src/store/modules/view-action/state.ts
+1
-1
contact-ui-service-base.ts
...sCentral/src/uiservice/contact/contact-ui-service-base.ts
+33
-3
info-all-form-base.vue
.../src/widgets/account/info-all-form/info-all-form-base.vue
+5
-4
info-major-contact-form-base.vue
.../info-major-contact-form/info-major-contact-form-base.vue
+1
-0
by-account-grid-model.ts
.../widgets/contact/by-account-grid/by-account-grid-model.ts
+5
-0
con-abs-dashboard-model.ts
...gets/contact/con-abs-dashboard/con-abs-dashboard-model.ts
+6
-0
main-grid-model.ts
...sCentral/src/widgets/contact/main-grid/main-grid-model.ts
+5
-0
pickup-viewpickupviewpanel-pickupviewpanel-model.ts
...panel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
+6
-0
quick-create-form-base.vue
...gets/contact/quick-create-form/quick-create-form-base.vue
+5
-5
tab-exp-viewtabexppanel-tabexppanel-model.ts
...-tabexppanel/tab-exp-viewtabexppanel-tabexppanel-model.ts
+6
-0
tab-exp-viewtabviewpanel-tabviewpanel-model.ts
...bviewpanel/tab-exp-viewtabviewpanel-tabviewpanel-model.ts
+6
-0
tab-exp-viewtabviewpanel2-tabviewpanel-model.ts
...viewpanel/tab-exp-viewtabviewpanel2-tabviewpanel-model.ts
+6
-0
tab-exp-viewtabviewpanel3-tabviewpanel-model.ts
...viewpanel/tab-exp-viewtabviewpanel3-tabviewpanel-model.ts
+6
-0
tab-exp-viewtabviewpanel4-tabviewpanel-model.ts
...viewpanel/tab-exp-viewtabviewpanel4-tabviewpanel-model.ts
+6
-0
view-con-abs-portlet-model.ts
...ontact/view-con-abs-portlet/view-con-abs-portlet-model.ts
+6
-0
view-con-add-portlet-model.ts
...ontact/view-con-add-portlet/view-con-add-portlet-model.ts
+6
-0
view-con-book-portlet-model.ts
...tact/view-con-book-portlet/view-con-book-portlet-model.ts
+6
-0
view-con-mar-portlet-model.ts
...ontact/view-con-mar-portlet/view-con-mar-portlet-model.ts
+6
-0
view-con-per-portlet-model.ts
...ontact/view-con-per-portlet/view-con-per-portlet-model.ts
+6
-0
Contact.java
.../cn/ibizlab/businesscentral/core/base/domain/Contact.java
+39
-0
ContactSearchContext.java
...usinesscentral/core/base/filter/ContactSearchContext.java
+21
-0
ContactMapper.java
...izlab/businesscentral/core/base/mapper/ContactMapper.java
+2
-0
IContactService.java
...ab/businesscentral/core/base/service/IContactService.java
+2
-0
AccountServiceImpl.java
...esscentral/core/base/service/impl/AccountServiceImpl.java
+3
-3
ContactServiceImpl.java
...esscentral/core/base/service/impl/ContactServiceImpl.java
+20
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+187
-180
ContactMapper.xml
.../src/main/resources/mapper/base/contact/ContactMapper.xml
+14
-3
ContactDTO.java
...cn/ibizlab/businesscentral/centralapi/dto/ContactDTO.java
+32
-0
ContactResource.java
...zlab/businesscentral/centralapi/rest/ContactResource.java
+132
-0
LeadResource.java
...ibizlab/businesscentral/centralapi/rest/LeadResource.java
+132
-0
ListContactResource.java
.../businesscentral/centralapi/rest/ListContactResource.java
+132
-0
ListLeadResource.java
...lab/businesscentral/centralapi/rest/ListLeadResource.java
+132
-0
OpportunityResource.java
.../businesscentral/centralapi/rest/OpportunityResource.java
+132
-0
未找到文件。
app_BusinessCentral/public/assets/json/view-config.json
浏览文件 @
1048cb03
...
...
@@ -1039,13 +1039,13 @@
"viewtag"
:
"e38e7b53a449e0f112cb545d2c5d4b85"
,
"memo"
:
"系统自动添加"
},
"contact
optionview
"
:
{
"title"
:
"
联系人选项操作视图
"
,
"contact
quickcreate
"
:
{
"title"
:
"
快速新建
"
,
"caption"
:
"联系人"
,
"viewtype"
:
"DEOPTVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"Contact
OptionView
"
,
"viewfilename"
:
"contact-
option-view
"
,
"viewname"
:
"Contact
QuickCreate
"
,
"viewfilename"
:
"contact-
quick-create
"
,
"viewtag"
:
"e404dc93e70d6284d4e1a083017625ed"
,
"memo"
:
""
},
...
...
app_BusinessCentral/src/interface/entity/contact.ts
浏览文件 @
1048cb03
...
...
@@ -1605,4 +1605,20 @@ export interface Contact {
* @memberof Contact
*/
preferredequipmentname
?:
any
;
/**
* 客户
*
* @returns {*}
* @memberof Contact
*/
customerid
?:
any
;
/**
* 客户
*
* @returns {*}
* @memberof Contact
*/
cusomername
?:
any
;
}
\ No newline at end of file
app_BusinessCentral/src/locale/lanres/entities/contact/contact_en_US.ts
浏览文件 @
1048cb03
...
...
@@ -201,6 +201,8 @@ export default {
transactioncurrencyname
:
'货币'
,
preferredservicename
:
'首选服务'
,
preferredequipmentname
:
'首选设施/设备'
,
customerid
:
'客户'
,
cusomername
:
'客户'
,
},
views
:
{
editabstract
:
{
...
...
@@ -263,9 +265,9 @@ export default {
caption
:
"联系人"
,
title
:
'联系人数据选择视图'
,
},
optionview
:
{
quickcreate
:
{
caption
:
"联系人"
,
title
:
'
联系人选项操作视图
'
,
title
:
'
快速新建
'
,
},
editperson
:
{
caption
:
"个人信息"
,
...
...
app_BusinessCentral/src/locale/lanres/entities/contact/contact_zh_CN.ts
浏览文件 @
1048cb03
...
...
@@ -200,6 +200,8 @@ export default {
transactioncurrencyname
:
'货币'
,
preferredservicename
:
'首选服务'
,
preferredequipmentname
:
'首选设施/设备'
,
customerid
:
'客户'
,
cusomername
:
'客户'
,
},
views
:
{
editabstract
:
{
...
...
@@ -262,9 +264,9 @@ export default {
caption
:
'联系人'
,
title
:
'联系人数据选择视图'
,
},
optionview
:
{
quickcreate
:
{
caption
:
'联系人'
,
title
:
'
联系人选项操作视图
'
,
title
:
'
快速新建
'
,
},
editperson
:
{
caption
:
'个人信息'
,
...
...
app_BusinessCentral/src/mock/entity/contacts/contacts.ts
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
app_BusinessCentral/src/mock/entity/leads/leads.ts
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
app_BusinessCentral/src/mock/entity/list-contacts/list-contacts.ts
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
app_BusinessCentral/src/mock/entity/list-leads/list-leads.ts
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
app_BusinessCentral/src/mock/entity/opportunitys/opportunitys.ts
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
app_BusinessCentral/src/mock/viewconfig/viewconfig.ts
浏览文件 @
1048cb03
...
...
@@ -839,12 +839,12 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"AccountInfo_ContactSetting"
,
"viewtag"
:
"e38e7b53a449e0f112cb545d2c5d4b85"
},
"contact
optionview
"
:
{
"title"
:
"
联系人选项操作视图
"
,
"contact
quickcreate
"
:
{
"title"
:
"
快速新建
"
,
"caption"
:
"联系人"
,
"viewtype"
:
"DEOPTVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"Contact
OptionView
"
,
"viewname"
:
"Contact
QuickCreate
"
,
"viewtag"
:
"e404dc93e70d6284d4e1a083017625ed"
},
"accountedit_address"
:
{
...
...
app_BusinessCentral/src/pages/base/account-grid-view/account-grid-view-base.vue
浏览文件 @
1048cb03
...
...
@@ -245,7 +245,7 @@ export default class AccountGridViewBase extends Vue {
* @memberof AccountGridView
*/
public
toolBarModels
:
any
=
{
tbitem1_openquickcreateview
:
{
name
:
'tbitem1_openquickcreateview'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-
file-text-o
'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenQuickCreateView'
,
target
:
'NONE'
},
class
:
''
},
tbitem1_openquickcreateview
:
{
name
:
'tbitem1_openquickcreateview'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-
user-plus
'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenQuickCreateView'
,
target
:
'NONE'
},
class
:
''
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
...
...
app_BusinessCentral/src/pages/base/contact-by-account/contact-by-account-base.vue
浏览文件 @
1048cb03
...
...
@@ -533,7 +533,12 @@ export default class ContactByAccountBase extends Vue {
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
let
deResParameters
:
any
[]
=
[];
if
(
tempContext
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
@@ -551,10 +556,10 @@ export default class ContactByAccountBase extends Vue {
});
}
const
view
:
any
=
{
viewname
:
'contact-
option-view
'
,
viewname
:
'contact-
quick-create
'
,
height
:
0
,
width
:
0
,
title
:
this
.
$t
(
'entities.contact.views.
optionview
.title'
),
title
:
this
.
$t
(
'entities.contact.views.
quickcreate
.title'
),
placement
:
'DRAWER_RIGHT'
,
};
openDrawer
(
view
,
data
);
...
...
@@ -579,7 +584,12 @@ export default class ContactByAccountBase extends Vue {
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
let
deResParameters
:
any
[]
=
[];
if
(
tempContext
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
{
pathName
:
'tabexpview'
,
parameterName
:
'tabexpview'
},
...
...
app_BusinessCentral/src/pages/base/contact-grid-view/contact-grid-view-base.vue
浏览文件 @
1048cb03
...
...
@@ -242,7 +242,7 @@ export default class ContactGridViewBase extends Vue {
* @memberof ContactGridView
*/
public
toolBarModels
:
any
=
{
tbitem1_openquickcreateview
:
{
name
:
'tbitem1_openquickcreateview'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-
file-text-o
'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenQuickCreateView'
,
target
:
'NONE'
},
class
:
''
},
tbitem1_openquickcreateview
:
{
name
:
'tbitem1_openquickcreateview'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-
user-plus
'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenQuickCreateView'
,
target
:
'NONE'
},
class
:
''
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
...
...
@@ -848,7 +848,12 @@ export default class ContactGridViewBase extends Vue {
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
let
deResParameters
:
any
[]
=
[];
if
(
tempContext
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
@@ -866,10 +871,10 @@ export default class ContactGridViewBase extends Vue {
});
}
const
view
:
any
=
{
viewname
:
'contact-
option-view
'
,
viewname
:
'contact-
quick-create
'
,
height
:
0
,
width
:
0
,
title
:
this
.
$t
(
'entities.contact.views.
optionview
.title'
),
title
:
this
.
$t
(
'entities.contact.views.
quickcreate
.title'
),
placement
:
'DRAWER_RIGHT'
,
};
openDrawer
(
view
,
data
);
...
...
@@ -894,7 +899,12 @@ export default class ContactGridViewBase extends Vue {
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
let
deResParameters
:
any
[]
=
[];
if
(
tempContext
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
{
pathName
:
'tabexpview'
,
parameterName
:
'tabexpview'
},
...
...
app_BusinessCentral/src/pages/base/contact-quick-create/contact-quick-create-base.vue
0 → 100644
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
app_BusinessCentral/src/pages/base/contact-quick-create/contact-quick-create.less
0 → 100644
浏览文件 @
1048cb03
.option-view {
--option-view: 0;
}
// 避免空文件,后台不让空文件过
.contact-quick-create {
--contact-quick-create: 0;
}
app_BusinessCentral/src/pages/base/contact-quick-create/contact-quick-create.vue
0 → 100644
浏览文件 @
1048cb03
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
ContactQuickCreateBase
from
'./contact-quick-create-base.vue'
;
import
view_form
from
'@widgets/contact/quick-create-form/quick-create-form.vue'
;
@
Component
({
components
:
{
view_form
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
route
:
to
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
ContactQuickCreate
extends
ContactQuickCreateBase
{
}
</
script
>
\ No newline at end of file
app_BusinessCentral/src/pages/ungroup/central/page-register.ts
浏览文件 @
1048cb03
...
...
@@ -68,7 +68,7 @@ export const PageComponents = {
Vue
.
component
(
'list-lead-by-list'
,
()
=>
import
(
'@pages/marketing/list-lead-by-list/list-lead-by-list.vue'
));
Vue
.
component
(
'account-info-major-contact'
,
()
=>
import
(
'@pages/base/account-info-major-contact/account-info-major-contact.vue'
));
Vue
.
component
(
'sales-order-grid-view'
,
()
=>
import
(
'@pages/sales/sales-order-grid-view/sales-order-grid-view.vue'
));
Vue
.
component
(
'contact-
option-view'
,
()
=>
import
(
'@pages/base/contact-option-view/contact-option-view
.vue'
));
Vue
.
component
(
'contact-
quick-create'
,
()
=>
import
(
'@pages/base/contact-quick-create/contact-quick-create
.vue'
));
Vue
.
component
(
'contact-edit-abstract'
,
()
=>
import
(
'@pages/base/contact-edit-abstract/contact-edit-abstract.vue'
));
Vue
.
component
(
'activity-pointer-by-parent-key'
,
()
=>
import
(
'@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'
));
Vue
.
component
(
'lead-edit-view'
,
()
=>
import
(
'@pages/sales/lead-edit-view/lead-edit-view.vue'
));
...
...
app_BusinessCentral/src/pages/ungroup/central/router.ts
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
app_BusinessCentral/src/service/account/account-service-base.ts
浏览文件 @
1048cb03
...
...
@@ -77,6 +77,21 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
listaccounts
=
listaccountsData
;
let
contactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contacts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contacts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contactsData
.
length
>
0
){
contactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
contactid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
contacts
=
contactsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -87,6 +102,7 @@ export default class AccountServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -116,9 +132,25 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
listaccounts
=
listaccountsData
;
let
contactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contacts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contacts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contactsData
.
length
>
0
){
contactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
contactid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
contacts
=
contactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -162,9 +194,25 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData
.
listaccounts
=
listaccountsData
;
let
contactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contacts'
),
'undefined'
)){
contactsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_contacts'
)
as
any
);
if
(
contactsData
&&
contactsData
.
length
&&
contactsData
.
length
>
0
){
contactsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
contactid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
contacts
=
contactsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -193,6 +241,7 @@ export default class AccountServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
@@ -210,6 +259,7 @@ export default class AccountServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/accounts/getdraft`
,
isloading
);
res
.
data
.
account
=
data
.
account
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listaccounts'
,
JSON
.
stringify
(
res
.
data
.
listaccounts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_contacts'
,
JSON
.
stringify
(
res
.
data
.
contacts
));
return
res
;
}
...
...
app_BusinessCentral/src/service/contact/contact-service-base.ts
浏览文件 @
1048cb03
...
...
@@ -48,6 +48,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/select`
,
isloading
);
}
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/select`
,
isloading
);
}
...
...
@@ -61,6 +64,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
}
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/checkkey`
,
data
,
isloading
);
}
...
...
@@ -74,6 +80,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
return
Http
.
getInstance
().
delete
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
}
return
Http
.
getInstance
().
delete
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
}
...
...
@@ -88,6 +97,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
...
...
@@ -106,6 +118,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/save`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
...
...
@@ -170,6 +185,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
){
return
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
...
...
@@ -234,6 +252,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/getdraft`
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/contacts/getdraft`
,
isloading
);
res
.
data
.
contact
=
data
.
contact
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_listcontacts'
,
JSON
.
stringify
(
res
.
data
.
listcontacts
));
...
...
@@ -252,6 +273,15 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
listcontactsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_listcontacts'
),
'undefined'
)){
...
...
@@ -323,6 +353,10 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/fetchdefault`
,
tempData
,
isloading
);
}
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/contacts/fetchdefault`
,
tempData
,
isloading
);
}
...
...
app_BusinessCentral/src/service/lead/lead-service-base.ts
浏览文件 @
1048cb03
...
...
@@ -48,6 +48,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/select`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/select`
,
isloading
);
}
...
...
@@ -67,6 +70,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
data
,
isloading
);
}
...
...
@@ -105,6 +111,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/getdraft`
,
isloading
);
}
if
(
context
.
contact
&&
true
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/getdraft`
,
isloading
);
}
...
...
@@ -127,6 +136,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/checkkey`
,
data
,
isloading
);
}
...
...
@@ -146,6 +158,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
isloading
);
}
...
...
@@ -168,6 +183,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/save`
,
data
,
isloading
);
}
...
...
@@ -206,6 +224,15 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -263,6 +290,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
delete
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
){
return
Http
.
getInstance
().
delete
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
`
,
isloading
);
}
...
...
@@ -283,6 +313,10 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
contact
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/fetchdefault`
,
tempData
,
isloading
);
...
...
app_BusinessCentral/src/service/list-contact/list-contact-service-base.ts
浏览文件 @
1048cb03
...
...
@@ -48,6 +48,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
listcontact
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/
${
context
.
listcontact
}
/select`
,
isloading
);
}
if
(
context
.
ibizlist
&&
context
.
listcontact
){
return
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/
${
context
.
listcontact
}
/select`
,
isloading
);
}
...
...
@@ -67,6 +70,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/getdraft`
,
isloading
);
}
if
(
context
.
ibizlist
&&
true
){
return
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/getdraft`
,
isloading
);
}
...
...
@@ -88,6 +94,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
listcontact
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/
${
context
.
listcontact
}
/checkkey`
,
data
,
isloading
);
}
if
(
context
.
ibizlist
&&
context
.
listcontact
){
return
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/
${
context
.
listcontact
}
/checkkey`
,
data
,
isloading
);
}
...
...
@@ -107,6 +116,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
listcontact
){
return
Http
.
getInstance
().
delete
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/
${
context
.
listcontact
}
`
,
isloading
);
}
if
(
context
.
ibizlist
&&
context
.
listcontact
){
return
Http
.
getInstance
().
delete
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/
${
context
.
listcontact
}
`
,
isloading
);
}
...
...
@@ -127,6 +139,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
listcontact
){
return
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/
${
context
.
listcontact
}
`
,
data
,
isloading
);
}
if
(
context
.
ibizlist
&&
context
.
listcontact
){
return
Http
.
getInstance
().
put
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/
${
context
.
listcontact
}
`
,
data
,
isloading
);
}
...
...
@@ -149,6 +164,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
listcontact
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/
${
context
.
listcontact
}
/save`
,
data
,
isloading
);
}
if
(
context
.
ibizlist
&&
context
.
listcontact
){
return
Http
.
getInstance
().
post
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/
${
context
.
listcontact
}
/save`
,
data
,
isloading
);
}
...
...
@@ -171,6 +189,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
listcontact
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/
${
context
.
listcontact
}
`
,
isloading
);
}
if
(
context
.
ibizlist
&&
context
.
listcontact
){
return
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/
${
context
.
listcontact
}
`
,
isloading
);
}
...
...
@@ -192,6 +213,15 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts`
,
data
,
isloading
);
}
if
(
context
.
ibizlist
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -233,6 +263,10 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/listcontacts/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
ibizlist
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibizlists/
${
context
.
ibizlist
}
/listcontacts/fetchdefault`
,
tempData
,
isloading
);
...
...
app_BusinessCentral/src/service/list-lead/list-lead-service-base.ts
浏览文件 @
1048cb03
...
...
@@ -48,6 +48,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
/select`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
/select`
,
isloading
);
}
...
...
@@ -73,6 +76,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
/checkkey`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
/checkkey`
,
data
,
isloading
);
}
...
...
@@ -98,6 +104,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
delete
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
delete
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
`
,
isloading
);
}
...
...
@@ -124,6 +133,15 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -183,6 +201,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
`
,
data
,
isloading
);
}
...
...
@@ -211,6 +232,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
/save`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
/save`
,
data
,
isloading
);
}
...
...
@@ -239,6 +263,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
context
.
listlead
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/
${
context
.
listlead
}
`
,
isloading
);
}
...
...
@@ -266,6 +293,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
true
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/getdraft`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
true
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/getdraft`
,
isloading
);
}
...
...
@@ -293,6 +323,10 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
lead
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
contact
&&
context
.
lead
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/leads/
${
context
.
lead
}
/listleads/fetchdefault`
,
tempData
,
isloading
);
...
...
app_BusinessCentral/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
1048cb03
...
...
@@ -48,6 +48,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/select`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/select`
,
isloading
);
}
...
...
@@ -64,6 +67,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
}
...
...
@@ -82,6 +88,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
}
if
(
context
.
contact
&&
true
){
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/getdraft`
,
isloading
);
}
...
...
@@ -100,6 +109,15 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
true
){
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -132,6 +150,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
delete
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
delete
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
isloading
);
}
...
...
@@ -149,6 +170,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
put
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
put
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
`
,
data
,
isloading
);
}
...
...
@@ -168,6 +192,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/checkkey`
,
data
,
isloading
);
}
...
...
@@ -184,6 +211,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
){
return
Http
.
getInstance
().
post
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/save`
,
data
,
isloading
);
}
...
...
@@ -203,6 +233,10 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
contact
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/fetchdefault`
,
tempData
,
isloading
);
...
...
app_BusinessCentral/src/store/modules/view-action/state.ts
浏览文件 @
1048cb03
...
...
@@ -980,7 +980,7 @@ export const viewstate: any = {
{
viewtag
:
'e404dc93e70d6284d4e1a083017625ed'
,
viewmodule
:
'Base'
,
viewname
:
'Contact
OptionView
'
,
viewname
:
'Contact
QuickCreate
'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
...
...
app_BusinessCentral/src/uiservice/contact/contact-ui-service-base.ts
浏览文件 @
1048cb03
...
...
@@ -94,7 +94,7 @@ export default class ContactUIServiceBase extends UIService {
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'contacts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'editbook'
,
srfappde
:
'contacts'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'contacts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'
optionview
'
,
srfappde
:
'contacts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'
quickcreate
'
,
srfappde
:
'contacts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'editperson'
,
srfappde
:
'contacts'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'tabexpview'
,
srfappde
:
'contacts'
});
}
...
...
@@ -143,6 +143,11 @@ export default class ContactUIServiceBase extends UIService {
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
let
deResParameters
:
any
[]
=
[];
if
(
context
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
@@ -203,6 +208,11 @@ export default class ContactUIServiceBase extends UIService {
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
let
deResParameters
:
any
[]
=
[];
if
(
context
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
@@ -221,10 +231,10 @@ export default class ContactUIServiceBase extends UIService {
});
}
const
view
:
any
=
{
viewname
:
'contact-
option-view
'
,
viewname
:
'contact-
quick-create
'
,
height
:
0
,
width
:
0
,
title
:
actionContext
.
$t
(
'entities.contact.views.
optionview
.title'
),
title
:
actionContext
.
$t
(
'entities.contact.views.
quickcreate
.title'
),
placement
:
'DRAWER_RIGHT'
,
};
openDrawer
(
view
,
data
);
...
...
@@ -266,6 +276,11 @@ export default class ContactUIServiceBase extends UIService {
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
let
deResParameters
:
any
[]
=
[];
if
(
context
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
@@ -329,6 +344,11 @@ export default class ContactUIServiceBase extends UIService {
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
let
deResParameters
:
any
[]
=
[];
if
(
context
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
@@ -392,6 +412,11 @@ export default class ContactUIServiceBase extends UIService {
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
let
deResParameters
:
any
[]
=
[];
if
(
context
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
@@ -455,6 +480,11 @@ export default class ContactUIServiceBase extends UIService {
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
let
deResParameters
:
any
[]
=
[];
if
(
context
.
account
&&
true
){
deResParameters
=
[
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
];
...
...
app_BusinessCentral/src/widgets/account/info-all-form/info-all-form-base.vue
浏览文件 @
1048cb03
...
...
@@ -206,6 +206,7 @@
paramItem=
'account'
:parentdata=
'
{"srfparentdename":"ACCOUNT","SRFPARENTTYPE":"CUSTOM"}'
:parameters="[
{ pathName: 'accounts', parameterName: 'account' },
]"
:context="context"
:viewparams="viewparams"
...
...
@@ -1009,15 +1010,15 @@ export default class Info_AllBase extends Vue implements ControlInterface {
* @memberof Info_All
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'账户信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'编辑_账户信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'group1_uc040f39'
,
caption
:
'编辑'
,
uiactiontag
:
'edit_accountinfo'
,
isShowCaption
:
true
,
isShowIcon
:
true
}]
}
})
group1
:
new
FormGroupPanelModel
({
caption
:
'账户信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'编辑_账户信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'group1_uc040f39'
,
caption
:
'编辑'
,
uiactiontag
:
'edit_accountinfo'
,
icon
:
'fa fa-pencil'
,
isShowCaption
:
true
,
isShowIcon
:
true
}]
}
})
,
grouppanel3
:
new
FormGroupPanelModel
({
caption
:
'简介'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel3'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'编辑_简介信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'grouppanel3_uc061117'
,
caption
:
'编辑'
,
uiactiontag
:
'edit_introduction'
,
isShowCaption
:
true
,
isShowIcon
:
true
}]
}
})
grouppanel3
:
new
FormGroupPanelModel
({
caption
:
'简介'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel3'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'编辑_简介信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'grouppanel3_uc061117'
,
caption
:
'编辑'
,
uiactiontag
:
'edit_introduction'
,
icon
:
'fa fa-pencil'
,
isShowCaption
:
true
,
isShowIcon
:
true
}]
}
})
,
grouppanel1
:
new
FormGroupPanelModel
({
caption
:
'地址信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'编辑_地址信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'grouppanel1_u2ccbfc9'
,
caption
:
'编辑'
,
uiactiontag
:
'edit_address'
,
isShowCaption
:
true
,
isShowIcon
:
true
}]
}
})
grouppanel1
:
new
FormGroupPanelModel
({
caption
:
'地址信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'编辑_地址信息'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'grouppanel1_u2ccbfc9'
,
caption
:
'编辑'
,
uiactiontag
:
'edit_address'
,
icon
:
'fa fa-pencil'
,
isShowCaption
:
true
,
isShowIcon
:
true
}]
}
})
,
druipart1
:
new
FormDRUIPartModel
({
caption
:
''
,
detailType
:
'DRUIPART'
,
name
:
'druipart1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
grouppanel4
:
new
FormGroupPanelModel
({
caption
:
'联系人'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel4'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'添加联系人'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'grouppanel4_u5a905ee'
,
caption
:
'新建'
,
uiactiontag
:
'openquickcreateview'
,
icon
:
'fa fa-
file-text-o
'
,
isShowCaption
:
false
,
isShowIcon
:
true
}]
}
})
grouppanel4
:
new
FormGroupPanelModel
({
caption
:
'联系人'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel4'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
'添加联系人'
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[{
name
:
'grouppanel4_u5a905ee'
,
caption
:
'新建'
,
uiactiontag
:
'openquickcreateview'
,
icon
:
'fa fa-
user-plus
'
,
isShowCaption
:
false
,
isShowIcon
:
true
}]
}
})
,
grouppanel2
:
new
FormGroupPanelModel
({
caption
:
'联系人首选项'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel2'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.account.info_all_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
})
,
...
...
app_BusinessCentral/src/widgets/account/info-major-contact-form/info-major-contact-form-base.vue
浏览文件 @
1048cb03
...
...
@@ -28,6 +28,7 @@
paramItem=
'account'
:parentdata=
'
{"srfparentdename":"ACCOUNT","SRFPARENTTYPE":"CUSTOM"}'
:parameters="[
{ pathName: 'accounts', parameterName: 'account' },
]"
:context="context"
:viewparams="viewparams"
...
...
app_BusinessCentral/src/widgets/contact/by-account-grid/by-account-grid-model.ts
浏览文件 @
1048cb03
...
...
@@ -76,6 +76,11 @@ export default class ByAccountModel {
prop
:
'defaultpricelevelid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'customerid'
,
prop
:
'customerid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'emailaddress1'
,
prop
:
'emailaddress1'
,
...
...
app_BusinessCentral/src/widgets/contact/con-abs-dashboard/con-abs-dashboard-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class ConAbsModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/main-grid/main-grid-model.ts
浏览文件 @
1048cb03
...
...
@@ -76,6 +76,11 @@ export default class MainModel {
prop
:
'defaultpricelevelid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'customerid'
,
prop
:
'customerid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'emailaddress1'
,
prop
:
'emailaddress1'
,
...
...
app_BusinessCentral/src/widgets/contact/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class PickupViewpickupviewpanelModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/quick-create-form/quick-create-form-base.vue
浏览文件 @
1048cb03
...
...
@@ -1294,7 +1294,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
OptionView
视图表单loadAction参数未配置'
});
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
QuickCreate
视图表单loadAction参数未配置'
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -1329,7 +1329,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
*/
public
loadDraft
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
OptionView
视图表单loaddraftAction参数未配置'
});
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
QuickCreate
视图表单loaddraftAction参数未配置'
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
@@ -1391,7 +1391,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
const
action
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)
?
this
.
updateAction
:
this
.
createAction
;
if
(
!
action
){
let
actionName
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)?
"updateAction"
:
"createAction"
;
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
OptionView
视图表单'
+
actionName
+
'参数未配置'
});
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
QuickCreate
视图表单'
+
actionName
+
'参数未配置'
});
return
;
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
...
...
@@ -1455,7 +1455,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
const
action
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)
?
this
.
updateAction
:
this
.
createAction
;
if
(
!
action
){
let
actionName
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)?
"updateAction"
:
"createAction"
;
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
OptionView
视图表单'
+
actionName
+
'参数未配置'
});
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
QuickCreate
视图表单'
+
actionName
+
'参数未配置'
});
return
;
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
...
...
@@ -1505,7 +1505,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
public
remove
(
opt
:
Array
<
any
>
=
[],
showResultInfo
?:
boolean
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
OptionView
视图表单removeAction参数未配置'
});
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'Contact
QuickCreate
视图表单removeAction参数未配置'
});
return
;
}
const
arg
:
any
=
opt
[
0
];
...
...
app_BusinessCentral/src/widgets/contact/tab-exp-viewtabexppanel-tabexppanel/tab-exp-viewtabexppanel-tabexppanel-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class TabExpViewtabexppanelModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/tab-exp-viewtabviewpanel-tabviewpanel/tab-exp-viewtabviewpanel-tabviewpanel-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanelModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/tab-exp-viewtabviewpanel2-tabviewpanel/tab-exp-viewtabviewpanel2-tabviewpanel-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanel2Model {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/tab-exp-viewtabviewpanel3-tabviewpanel/tab-exp-viewtabviewpanel3-tabviewpanel-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanel3Model {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/tab-exp-viewtabviewpanel4-tabviewpanel/tab-exp-viewtabviewpanel4-tabviewpanel-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanel4Model {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/view-con-abs-portlet/view-con-abs-portlet-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class View_ConAbsModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/view-con-add-portlet/view-con-add-portlet-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class View_ConAddModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/view-con-book-portlet/view-con-book-portlet-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class View_ConBookModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/view-con-mar-portlet/view-con-mar-portlet-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class View_ConMarModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
app_BusinessCentral/src/widgets/contact/view-con-per-portlet/view-con-per-portlet-model.ts
浏览文件 @
1048cb03
...
...
@@ -615,6 +615,12 @@ export default class View_ConPerModel {
{
name
:
'preferredequipmentname'
,
},
{
name
:
'customerid'
,
},
{
name
:
'cusomername'
,
},
]
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/domain/Contact.java
浏览文件 @
1048cb03
...
...
@@ -1545,6 +1545,29 @@ public class Contact extends EntityMP implements Serializable {
@JSONField
(
name
=
"preferredequipmentname"
)
@JsonProperty
(
"preferredequipmentname"
)
private
String
preferredequipmentname
;
/**
* 客户
*/
@TableField
(
value
=
"customerid"
)
@JSONField
(
name
=
"customerid"
)
@JsonProperty
(
"customerid"
)
private
String
customerid
;
/**
* 客户
*/
@DEField
(
name
=
"customername"
)
@TableField
(
value
=
"customername"
)
@JSONField
(
name
=
"cusomername"
)
@JsonProperty
(
"cusomername"
)
private
String
cusomername
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
Account
customer
;
/**
*
...
...
@@ -3206,6 +3229,22 @@ public class Contact extends EntityMP implements Serializable {
this
.
modify
(
"preferredequipmentname"
,
preferredequipmentname
);
}
/**
* 设置 [客户]
*/
public
void
setCustomerid
(
String
customerid
){
this
.
customerid
=
customerid
;
this
.
modify
(
"customerid"
,
customerid
);
}
/**
* 设置 [客户]
*/
public
void
setCusomername
(
String
cusomername
){
this
.
cusomername
=
cusomername
;
this
.
modify
(
"customername"
,
cusomername
);
}
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/filter/ContactSearchContext.java
浏览文件 @
1048cb03
...
...
@@ -321,6 +321,27 @@ public class ContactSearchContext extends QueryWrapperContext<Contact> {
this
.
getSearchCond
().
like
(
"preferredequipmentname"
,
n_preferredequipmentname_like
);
}
}
private
String
n_customerid_eq
;
//[客户]
public
void
setN_customerid_eq
(
String
n_customerid_eq
)
{
this
.
n_customerid_eq
=
n_customerid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_customerid_eq
)){
this
.
getSearchCond
().
eq
(
"customerid"
,
n_customerid_eq
);
}
}
private
String
n_customername_eq
;
//[客户]
public
void
setN_customername_eq
(
String
n_customername_eq
)
{
this
.
n_customername_eq
=
n_customername_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_customername_eq
)){
this
.
getSearchCond
().
eq
(
"customername"
,
n_customername_eq
);
}
}
private
String
n_customername_like
;
//[客户]
public
void
setN_customername_like
(
String
n_customername_like
)
{
this
.
n_customername_like
=
n_customername_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_customername_like
)){
this
.
getSearchCond
().
like
(
"customername"
,
n_customername_like
);
}
}
/**
* 启用快速搜索
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/mapper/ContactMapper.java
浏览文件 @
1048cb03
...
...
@@ -62,6 +62,8 @@ public interface ContactMapper extends BaseMapper<Contact>{
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
Contact
>
selectByCustomerid
(
@Param
(
"accountid"
)
Serializable
accountid
)
;
List
<
Contact
>
selectByPreferredequipmentid
(
@Param
(
"equipmentid"
)
Serializable
equipmentid
)
;
List
<
Contact
>
selectByOriginatingleadid
(
@Param
(
"leadid"
)
Serializable
leadid
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/IContactService.java
浏览文件 @
1048cb03
...
...
@@ -37,6 +37,8 @@ public interface IContactService extends IService<Contact>{
boolean
create
(
Contact
et
)
;
void
createBatch
(
List
<
Contact
>
list
)
;
Page
<
Contact
>
searchDefault
(
ContactSearchContext
context
)
;
List
<
Contact
>
selectByCustomerid
(
String
accountid
)
;
void
removeByCustomerid
(
String
accountid
)
;
List
<
Contact
>
selectByPreferredequipmentid
(
String
equipmentid
)
;
void
removeByPreferredequipmentid
(
String
equipmentid
)
;
List
<
Contact
>
selectByOriginatingleadid
(
String
leadid
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/AccountServiceImpl.java
浏览文件 @
1048cb03
...
...
@@ -51,6 +51,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
private
cn
.
ibizlab
.
businesscentral
.
core
.
scheduling
.
service
.
IBookableResourceService
bookableresourceService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IContactService
contactService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
sales
.
service
.
ILeadService
leadService
;
@Autowired
@Lazy
...
...
@@ -63,9 +66,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
ISlaKpiInstanceService
slakpiinstanceService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IContactService
contactService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
service
.
IEquipmentService
equipmentService
;
@Autowired
@Lazy
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/ContactServiceImpl.java
浏览文件 @
1048cb03
...
...
@@ -184,6 +184,16 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
}
@Override
public
List
<
Contact
>
selectByCustomerid
(
String
accountid
)
{
return
baseMapper
.
selectByCustomerid
(
accountid
);
}
@Override
public
void
removeByCustomerid
(
String
accountid
)
{
this
.
remove
(
new
QueryWrapper
<
Contact
>().
eq
(
"customerid"
,
accountid
));
}
@Override
public
List
<
Contact
>
selectByPreferredequipmentid
(
String
equipmentid
)
{
return
baseMapper
.
selectByPreferredequipmentid
(
equipmentid
);
...
...
@@ -261,6 +271,16 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
* @param et
*/
private
void
fillParentData
(
Contact
et
){
//实体关系[DER1N_CONTACT_ACCOUNT_CUSTOMERID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getCustomerid
())){
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
Account
customer
=
et
.
getCustomer
();
if
(
ObjectUtils
.
isEmpty
(
customer
)){
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
Account
majorEntity
=
accountService
.
get
(
et
.
getCustomerid
());
et
.
setCustomer
(
majorEntity
);
customer
=
majorEntity
;
}
et
.
setCusomername
(
customer
.
getAccountname
());
}
//实体关系[DER1N_CONTACT__EQUIPMENT__PREFERREDEQUIPMENTID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getPreferredequipmentid
())){
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
domain
.
Equipment
preferredequipment
=
et
.
getPreferredequipment
();
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/mapper/base/contact/ContactMapper.xml
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/dto/ContactDTO.java
浏览文件 @
1048cb03
...
...
@@ -1630,6 +1630,22 @@ public class ContactDTO extends DTOBase implements Serializable {
@JsonProperty
(
"preferredequipmentname"
)
private
String
preferredequipmentname
;
/**
* 属性 [CUSTOMERID]
*
*/
@JSONField
(
name
=
"customerid"
)
@JsonProperty
(
"customerid"
)
private
String
customerid
;
/**
* 属性 [CUSTOMERNAME]
*
*/
@JSONField
(
name
=
"cusomername"
)
@JsonProperty
(
"cusomername"
)
private
String
cusomername
;
/**
* 设置 [ADDRESS1_FREIGHTTERMSCODE]
...
...
@@ -3191,6 +3207,22 @@ public class ContactDTO extends DTOBase implements Serializable {
this
.
modify
(
"preferredequipmentname"
,
preferredequipmentname
);
}
/**
* 设置 [CUSTOMERID]
*/
public
void
setCustomerid
(
String
customerid
){
this
.
customerid
=
customerid
;
this
.
modify
(
"customerid"
,
customerid
);
}
/**
* 设置 [CUSTOMERNAME]
*/
public
void
setCusomername
(
String
cusomername
){
this
.
cusomername
=
cusomername
;
this
.
modify
(
"customername"
,
cusomername
);
}
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/ContactResource.java
浏览文件 @
1048cb03
...
...
@@ -158,5 +158,137 @@ public class ContactResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
contactMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据客户检查联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户检查联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
ContactDTO
contactdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactService
.
checkKey
(
contactMapping
.
toDomain
(
contactdto
)));
}
@PreAuthorize
(
"hasPermission(this.contactService.get(#contact_id),'iBizBusinessCentral-Contact-Remove')"
)
@ApiOperation
(
value
=
"根据客户删除联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户删除联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/{contact_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactService
.
remove
(
contact_id
));
}
@PreAuthorize
(
"hasPermission(this.contactService.getContactByIds(#ids),'iBizBusinessCentral-Contact-Remove')"
)
@ApiOperation
(
value
=
"根据客户批量删除联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户批量删除联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByAccount
(
@RequestBody
List
<
String
>
ids
)
{
contactService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.contactMapping.toDomain(returnObject.body),'iBizBusinessCentral-Contact-Get')"
)
@ApiOperation
(
value
=
"根据客户获取联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户获取联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}"
)
public
ResponseEntity
<
ContactDTO
>
getByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
)
{
Contact
domain
=
contactService
.
get
(
contact_id
);
ContactDTO
dto
=
contactMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.contactMapping.toDomain(#contactdto),'iBizBusinessCentral-Contact-Save')"
)
@ApiOperation
(
value
=
"根据客户保存联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户保存联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/save"
)
public
ResponseEntity
<
Boolean
>
saveByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
ContactDTO
contactdto
)
{
Contact
domain
=
contactMapping
.
toDomain
(
contactdto
);
domain
.
setCustomerid
(
account_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.contactMapping.toDomain(#contactdtos),'iBizBusinessCentral-Contact-Save')"
)
@ApiOperation
(
value
=
"根据客户批量保存联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户批量保存联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
List
<
ContactDTO
>
contactdtos
)
{
List
<
Contact
>
domainlist
=
contactMapping
.
toDomain
(
contactdtos
);
for
(
Contact
domain:
domainlist
){
domain
.
setCustomerid
(
account_id
);
}
contactService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.contactService.get(#contact_id),'iBizBusinessCentral-Contact-Update')"
)
@ApiOperation
(
value
=
"根据客户更新联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户更新联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/{contact_id}"
)
@Transactional
public
ResponseEntity
<
ContactDTO
>
updateByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@RequestBody
ContactDTO
contactdto
)
{
Contact
domain
=
contactMapping
.
toDomain
(
contactdto
);
domain
.
setCustomerid
(
account_id
);
domain
.
setContactid
(
contact_id
);
contactService
.
update
(
domain
);
ContactDTO
dto
=
contactMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.contactService.getContactByEntities(this.contactMapping.toDomain(#contactdtos)),'iBizBusinessCentral-Contact-Update')"
)
@ApiOperation
(
value
=
"根据客户批量更新联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户批量更新联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
List
<
ContactDTO
>
contactdtos
)
{
List
<
Contact
>
domainlist
=
contactMapping
.
toDomain
(
contactdtos
);
for
(
Contact
domain:
domainlist
){
domain
.
setCustomerid
(
account_id
);
}
contactService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据客户获取联系人草稿"
,
tags
=
{
"联系人"
},
notes
=
"根据客户获取联系人草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/getdraft"
)
public
ResponseEntity
<
ContactDTO
>
getDraftByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
)
{
Contact
domain
=
new
Contact
();
domain
.
setCustomerid
(
account_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactMapping
.
toDto
(
contactService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.contactMapping.toDomain(#contactdto),'iBizBusinessCentral-Contact-Create')"
)
@ApiOperation
(
value
=
"根据客户建立联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户建立联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts"
)
@Transactional
public
ResponseEntity
<
ContactDTO
>
createByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
ContactDTO
contactdto
)
{
Contact
domain
=
contactMapping
.
toDomain
(
contactdto
);
domain
.
setCustomerid
(
account_id
);
contactService
.
create
(
domain
);
ContactDTO
dto
=
contactMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.contactMapping.toDomain(#contactdtos),'iBizBusinessCentral-Contact-Create')"
)
@ApiOperation
(
value
=
"根据客户批量建立联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户批量建立联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
List
<
ContactDTO
>
contactdtos
)
{
List
<
Contact
>
domainlist
=
contactMapping
.
toDomain
(
contactdtos
);
for
(
Contact
domain:
domainlist
){
domain
.
setCustomerid
(
account_id
);
}
contactService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Default-all')"
)
@ApiOperation
(
value
=
"根据客户获取DEFAULT"
,
tags
=
{
"联系人"
}
,
notes
=
"根据客户获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/fetchdefault"
)
public
ResponseEntity
<
List
<
ContactDTO
>>
fetchContactDefaultByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
ContactSearchContext
context
)
{
context
.
setN_customerid_eq
(
account_id
);
Page
<
Contact
>
domains
=
contactService
.
searchDefault
(
context
)
;
List
<
ContactDTO
>
list
=
contactMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Default-all')"
)
@ApiOperation
(
value
=
"根据客户查询DEFAULT"
,
tags
=
{
"联系人"
}
,
notes
=
"根据客户查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/searchdefault"
)
public
ResponseEntity
<
Page
<
ContactDTO
>>
searchContactDefaultByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
ContactSearchContext
context
)
{
context
.
setN_customerid_eq
(
account_id
);
Page
<
Contact
>
domains
=
contactService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
contactMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/LeadResource.java
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/ListContactResource.java
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/ListLeadResource.java
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/OpportunityResource.java
浏览文件 @
1048cb03
此差异已折叠。
点击以展开。
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录