Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
ff5589dd
提交
ff5589dd
编写于
7月 09, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
761dc258
变更
13
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
623 行增加
和
5 行删除
+623
-5
view-config.json
app_CRM/public/assets/json/view-config.json
+10
-0
multi-pick-data_en_US.ts
.../lanres/entities/multi-pick-data/multi-pick-data_en_US.ts
+2
-2
multi-pick-data_zh_CN.ts
.../lanres/entities/multi-pick-data/multi-pick-data_zh_CN.ts
+2
-2
opportunity-competitor_en_US.ts
...es/opportunity-competitor/opportunity-competitor_en_US.ts
+42
-0
opportunity-competitor_zh_CN.ts
...es/opportunity-competitor/opportunity-competitor_zh_CN.ts
+42
-0
viewconfig.ts
app_CRM/src/mock/viewconfig/viewconfig.ts
+8
-0
multi-pick-data-acgrid.vue
...es/base/multi-pick-data-acgrid/multi-pick-data-acgrid.vue
+1
-1
opportunity-competitor-ui-service-base.ts
...nity-competitor/opportunity-competitor-ui-service-base.ts
+1
-0
ac-searchform-base.tsx
...gets/multi-pick-data/ac-searchform/ac-searchform-base.tsx
+75
-0
ac-searchform-model.ts
...gets/multi-pick-data/ac-searchform/ac-searchform-model.ts
+36
-0
ac-searchform-service.ts
...ts/multi-pick-data/ac-searchform/ac-searchform-service.ts
+366
-0
ac-searchform.html
.../widgets/multi-pick-data/ac-searchform/ac-searchform.html
+16
-0
ac-searchform.vue
...c/widgets/multi-pick-data/ac-searchform/ac-searchform.vue
+22
-0
未找到文件。
app_CRM/public/assets/json/view-config.json
浏览文件 @
ff5589dd
...
...
@@ -1959,6 +1959,16 @@
"viewtag"
:
"ab653866ca40a1cefde21241ac5ba44c"
,
"memo"
:
""
},
"opportunitycompetitorcompoppgridview"
:
{
"title"
:
"竞争对手商机信息"
,
"caption"
:
"商机对手"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"OpportunityCompetitorCompOppGridView"
,
"viewfilename"
:
"opportunity-competitor-comp-opp-grid-view"
,
"viewtag"
:
"ac5ea5e435a4102d39f1f4a569368b25"
,
"memo"
:
""
},
"competitorinfo"
:
{
"title"
:
"竞争对手"
,
"caption"
:
"竞争对手"
,
...
...
app_CRM/src/locale/lanres/entities/multi-pick-data/multi-pick-data_en_US.ts
浏览文件 @
ff5589dd
...
...
@@ -33,10 +33,10 @@ export default {
uiactions
:
{
},
},
default
_searchform
:
{
ac
_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
n_pickdataname_like
:
"
数据名称(%)
"
,
n_pickdataname_like
:
"
负责人
"
,
},
uiactions
:
{
},
...
...
app_CRM/src/locale/lanres/entities/multi-pick-data/multi-pick-data_zh_CN.ts
浏览文件 @
ff5589dd
...
...
@@ -32,10 +32,10 @@ export default {
uiactions
:
{
},
},
default
_searchform
:
{
ac
_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
n_pickdataname_like
:
"
数据名称(%)
"
,
n_pickdataname_like
:
"
负责人
"
,
},
uiactions
:
{
},
...
...
app_CRM/src/locale/lanres/entities/opportunity-competitor/opportunity-competitor_en_US.ts
浏览文件 @
ff5589dd
...
...
@@ -24,6 +24,10 @@ export default {
caption
:
"商机对手"
,
title
:
"商机对手表格视图"
,
},
compoppgridview
:
{
caption
:
"商机对手"
,
title
:
"竞争对手商机信息"
,
},
edit_compoppview
:
{
caption
:
"商机对手"
,
title
:
"竞争对手商机信息"
,
...
...
@@ -162,6 +166,44 @@ export default {
tip
:
"关闭"
,
},
},
compoppgridviewtoolbar_toolbar
:
{
deuiaction1
:
{
caption
:
"New"
,
tip
:
"New"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
},
edit_compoppviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
"Save And Close"
,
...
...
app_CRM/src/locale/lanres/entities/opportunity-competitor/opportunity-competitor_zh_CN.ts
浏览文件 @
ff5589dd
...
...
@@ -23,6 +23,10 @@ export default {
caption
:
"商机对手"
,
title
:
"商机对手表格视图"
,
},
compoppgridview
:
{
caption
:
"商机对手"
,
title
:
"竞争对手商机信息"
,
},
edit_compoppview
:
{
caption
:
"商机对手"
,
title
:
"竞争对手商机信息"
,
...
...
@@ -161,6 +165,44 @@ export default {
tip
:
"关闭"
,
},
},
compoppgridviewtoolbar_toolbar
:
{
deuiaction1
:
{
caption
:
"新建"
,
tip
:
"新建"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"删除"
,
tip
:
"删除"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"导出"
,
tip
:
"导出"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"过滤"
,
tip
:
"过滤"
,
},
},
edit_compoppviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
"保存并关闭"
,
...
...
app_CRM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
ff5589dd
...
...
@@ -1575,6 +1575,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"InvoiceInfoView"
,
"viewtag"
:
"ab653866ca40a1cefde21241ac5ba44c"
},
"opportunitycompetitorcompoppgridview"
:
{
"title"
:
"竞争对手商机信息"
,
"caption"
:
"商机对手"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"OpportunityCompetitorCompOppGridView"
,
"viewtag"
:
"ac5ea5e435a4102d39f1f4a569368b25"
},
"competitorinfo"
:
{
"title"
:
"竞争对手"
,
"caption"
:
"竞争对手"
,
...
...
app_CRM/src/pages/base/multi-pick-data-acgrid/multi-pick-data-acgrid.vue
浏览文件 @
ff5589dd
...
...
@@ -4,7 +4,7 @@ import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MultiPickDataACGridBase } from './multi-pick-data-acgrid-base';
import view_grid from '@widgets/multi-pick-data/main-grid/main-grid.vue';
import view_searchform from '@widgets/multi-pick-data/
default-searchform/default
-searchform.vue';
import view_searchform from '@widgets/multi-pick-data/
ac-searchform/ac
-searchform.vue';
/**
* 负责人(客户、联系人)表格视图
...
...
app_CRM/src/uiservice/opportunity-competitor/opportunity-competitor-ui-service-base.ts
浏览文件 @
ff5589dd
...
...
@@ -80,6 +80,7 @@ export default class OpportunityCompetitorUIServiceBase extends UIService {
*/
public
initViewMap
(){
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'oppcompgridview'
,
srfappde
:
'opportunitycompetitors'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'compoppgridview'
,
srfappde
:
'opportunitycompetitors'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'edit_compoppview'
,
srfappde
:
'opportunitycompetitors'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'opportunitycompetitors'
});
}
...
...
app_CRM/src/widgets/multi-pick-data/ac-searchform/ac-searchform-base.tsx
0 → 100644
浏览文件 @
ff5589dd
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
SearchFormControlBase
}
from
'@/studio-core'
;
import
MultiPickDataService
from
'@/service/multi-pick-data/multi-pick-data-service'
;
import
ACService
from
'./ac-searchform-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
import
{
debounceTime
,
distinctUntilChanged
}
from
'rxjs/operators'
;
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {ACSearchFormBase}
*/
export
class
ACSearchFormBase
extends
SearchFormControlBase
{
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof ACSearchFormBase
*/
protected
controlType
:
string
=
'SEARCHFORM'
;
/**
* 建构部件服务对象
*
* @type {ACService}
* @memberof ACSearchFormBase
*/
public
service
:
ACService
=
new
ACService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {MultiPickDataService}
* @memberof ACSearchFormBase
*/
public
appEntityService
:
MultiPickDataService
=
new
MultiPickDataService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof ACSearchFormBase
*/
protected
appDeName
:
string
=
'multipickdata'
;
/**
* 表单数据对象
*
* @type {*}
* @memberof ACSearchFormBase
*/
public
data
:
any
=
{
n_pickdataname_like
:
null
,
};
/**
* 详情模型集合
*
* @type {*}
* @memberof ACSearchFormBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_pickdataname_like
:
new
FormItemModel
({
caption
:
'负责人'
,
detailType
:
'FORMITEM'
,
name
:
'n_pickdataname_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
};
}
\ No newline at end of file
app_CRM/src/widgets/multi-pick-data/ac-searchform/ac-searchform-model.ts
0 → 100644
浏览文件 @
ff5589dd
/**
* AC 部件模型
*
* @export
* @class ACModel
*/
export
default
class
ACModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ACModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfwfmemo'
,
prop
:
'srfwfmemo'
,
dataType
:
'TEXT'
,
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
{
name
:
'n_pickdataname_like'
,
prop
:
'pickdataname'
,
dataType
:
'TEXT'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/multi-pick-data/ac-searchform/ac-searchform-service.ts
0 → 100644
浏览文件 @
ff5589dd
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
MultiPickDataService
from
'@/service/multi-pick-data/multi-pick-data-service'
;
import
ACModel
from
'./ac-searchform-model'
;
/**
* AC 部件服务对象
*
* @export
* @class ACService
*/
export
default
class
ACService
extends
ControlService
{
/**
* 多类选择实体服务对象
*
* @type {MultiPickDataService}
* @memberof ACService
*/
public
appEntityService
:
MultiPickDataService
=
new
MultiPickDataService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ACService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of ACService.
*
* @param {*} [opts={}]
* @memberof ACService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
ACModel
();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof ACService
*/
private
doItems
(
promise
:
Promise
<
any
>
,
deKeyField
:
string
,
deName
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
promise
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
data
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
item
[
deName
]
=
item
[
deKeyField
];
data
[
index
]
=
item
;
});
resolve
(
data
);
}
else
{
reject
([])
}
}).
catch
((
response
:
any
)
=>
{
reject
([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof ACService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
wfstart
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFStart
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
wfsubmit
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
,
true
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFSubmit
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
get
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Get
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
GetDraft
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ACService
*/
@
Errorlog
public
frontLogic
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
return
Promise
.
reject
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'系统异常'
}
});
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof ACService
*/
public
handleRequestData
(
action
:
string
,
context
:
any
,
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_CRM/src/widgets/multi-pick-data/ac-searchform/ac-searchform.html
0 → 100644
浏览文件 @
ff5589dd
<i-form
:model=
"this.data"
class=
'app-search-form'
ref=
'searchform'
style=
""
>
<input
style=
"display:none;"
/>
<div
class=
"search-button"
>
<i-button
size=
"small"
type=
"primary"
ghost
@
click=
"onSearch.apply(_self, arguments)"
>
{{$t('app.searchButton.search')}}
</i-button>
<i-button
size=
"small"
type=
"default"
ghost
@
click=
"onReset.apply(_self, arguments)"
>
{{this.$t('app.searchButton.reset')}}
</i-button>
</div>
<div
class=
"form-content"
>
<i-col
v-show=
"detailsModel.n_pickdataname_like.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'n_pickdataname_like'
:itemRules=
"this.rules.n_pickdataname_like"
class=
''
:caption=
"$t('entities.multipickdata.ac_searchform.details.n_pickdataname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_pickdataname_like.error"
:isEmptyCaption=
"false"
labelPos=
"TOP"
>
<input-box
v-model=
"data.n_pickdataname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_pickdataname_like.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
</div>
</i-form>
\ No newline at end of file
app_CRM/src/widgets/multi-pick-data/ac-searchform/ac-searchform.vue
0 → 100644
浏览文件 @
ff5589dd
<
template
src=
"./ac-searchform.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ACSearchFormBase } from './ac-searchform-base';
/**
* searchform部件
*
* @export
* @class ACSearchForm
* @extends {ACSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class ACSearchForm extends ACSearchFormBase { }
</script>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录