Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
3df2b754
提交
3df2b754
编写于
7月 07, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
73bcbd73
变更
13
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
709 行增加
和
2 行删除
+709
-2
data-dictionary.json
app_CRM/public/assets/json/data-dictionary.json
+27
-0
codelist_en_US.ts
app_CRM/src/locale/lanres/codelist/codelist_en_US.ts
+5
-0
codelist_zh_CN.ts
app_CRM/src/locale/lanres/codelist/codelist_zh_CN.ts
+5
-0
account_en_US.ts
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
+18
-0
account_zh_CN.ts
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
+18
-0
codelist.ts
app_CRM/src/mock/codelist/codelist.ts
+27
-0
account-info-base.tsx
app_CRM/src/pages/base/account-info/account-info-base.tsx
+1
-1
account-info.vue
app_CRM/src/pages/base/account-info/account-info.vue
+1
-1
quick-summary-form-base.tsx
...ts/account/quick-summary-form/quick-summary-form-base.tsx
+104
-0
quick-summary-form-model.ts
...ts/account/quick-summary-form/quick-summary-form-model.ts
+76
-0
quick-summary-form-service.ts
.../account/quick-summary-form/quick-summary-form-service.ts
+371
-0
quick-summary-form.html
...idgets/account/quick-summary-form/quick-summary-form.html
+34
-0
quick-summary-form.vue
...widgets/account/quick-summary-form/quick-summary-form.vue
+22
-0
未找到文件。
app_CRM/public/assets/json/data-dictionary.json
浏览文件 @
3df2b754
...
...
@@ -4476,6 +4476,33 @@
}
]
},
{
"srfkey"
:
"Account__StatusCode"
,
"emptytext"
:
"未定义"
,
"codelisttype"
:
"static"
,
"items"
:
[
{
"id"
:
"2"
,
"label"
:
"停用"
,
"text"
:
"停用"
,
"data"
:
""
,
"codename"
:
"Item_2"
,
"value"
:
"2"
,
"disabled"
:
false
}
,
{
"id"
:
"1"
,
"label"
:
"可用"
,
"text"
:
"可用"
,
"data"
:
""
,
"codename"
:
"Item_1"
,
"value"
:
"1"
,
"disabled"
:
false
}
]
},
{
"srfkey"
:
"Metric__AmountDataType"
,
"emptytext"
:
"未定义"
,
...
...
app_CRM/src/locale/lanres/codelist/codelist_en_US.ts
浏览文件 @
3df2b754
...
...
@@ -580,6 +580,11 @@ export default {
"1"
:
"男"
,
"empty"
:
""
},
Account__StatusCode
:
{
"2"
:
"停用"
,
"1"
:
"可用"
,
"empty"
:
""
},
Metric__AmountDataType
:
{
"1"
:
"十进制"
,
"2"
:
"整数"
,
...
...
app_CRM/src/locale/lanres/codelist/codelist_zh_CN.ts
浏览文件 @
3df2b754
...
...
@@ -580,6 +580,11 @@ export default {
"1"
:
"男"
,
"empty"
:
""
,
},
Account__StatusCode
:
{
"2"
:
"停用"
,
"1"
:
"可用"
,
"empty"
:
""
,
},
Metric__AmountDataType
:
{
"1"
:
"十进制"
,
"2"
:
"整数"
,
...
...
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
浏览文件 @
3df2b754
...
...
@@ -441,6 +441,24 @@ export default {
uiactions
:
{
},
},
quicksummary_form
:
{
details
:
{
group1
:
"客户基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"客户"
,
srfmajortext
:
"客户名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
statuscode
:
"状态描述"
,
accountid
:
"客户"
,
},
uiactions
:
{
},
},
main_form
:
{
details
:
{
group1
:
"账户信息"
,
...
...
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
浏览文件 @
3df2b754
...
...
@@ -440,6 +440,24 @@ export default {
uiactions
:
{
},
},
quicksummary_form
:
{
details
:
{
group1
:
"客户基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"客户"
,
srfmajortext
:
"客户名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
statuscode
:
"状态描述"
,
accountid
:
"客户"
,
},
uiactions
:
{
},
},
main_form
:
{
details
:
{
group1
:
"账户信息"
,
...
...
app_CRM/src/mock/codelist/codelist.ts
浏览文件 @
3df2b754
...
...
@@ -4484,6 +4484,33 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
]
},
{
srfkey
:
"Account__StatusCode"
,
emptytext
:
"未定义"
,
"codelisttype"
:
"static"
,
items
:
[
{
id
:
"2"
,
label
:
"停用"
,
text
:
"停用"
,
"data"
:
""
,
"codename"
:
"Item_2"
,
value
:
"2"
,
disabled
:
false
,
},
{
id
:
"1"
,
label
:
"可用"
,
text
:
"可用"
,
"data"
:
""
,
"codename"
:
"Item_1"
,
value
:
"1"
,
disabled
:
false
,
},
]
},
{
srfkey
:
"Metric__AmountDataType"
,
emptytext
:
"未定义"
,
...
...
app_CRM/src/pages/base/account-info/account-info-base.tsx
浏览文件 @
3df2b754
...
...
@@ -54,7 +54,7 @@ export class AccountInfoBase extends TabExpViewBase {
*/
protected
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_quicksummary
:
{
name
:
'quicksummary'
,
type
:
'
CUSTO
M'
},
view_quicksummary
:
{
name
:
'quicksummary'
,
type
:
'
FOR
M'
},
view_tabexppanel
:
{
name
:
'tabexppanel'
,
type
:
'TABEXPPANEL'
},
};
...
...
app_CRM/src/pages/base/account-info/account-info.vue
浏览文件 @
3df2b754
...
...
@@ -3,7 +3,7 @@
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { AccountInfoBase } from './account-info-base';
import view_quicksummary from '@widgets/account/
infoquicksummary-custom/infoquicksummary-custo
m.vue';
import view_quicksummary from '@widgets/account/
quick-summary-form/quick-summary-for
m.vue';
import view_tabexppanel from '@widgets/account/infotabexppanel-tabexppanel/infotabexppanel-tabexppanel.vue';
/**
...
...
app_CRM/src/widgets/account/quick-summary-form/quick-summary-form-base.tsx
0 → 100644
浏览文件 @
3df2b754
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
EditFormControlBase
}
from
'@/studio-core'
;
import
AccountService
from
'@/service/account/account-service'
;
import
QuickSummaryService
from
'./quick-summary-form-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
/**
* quicksummary部件基类
*
* @export
* @class EditFormControlBase
* @extends {QuickSummaryEditFormBase}
*/
export
class
QuickSummaryEditFormBase
extends
EditFormControlBase
{
/**
* 建构部件服务对象
*
* @type {QuickSummaryService}
* @memberof QuickSummaryEditFormBase
*/
public
service
:
QuickSummaryService
=
new
QuickSummaryService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof QuickSummaryEditFormBase
*/
public
appEntityService
:
AccountService
=
new
AccountService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof QuickSummaryEditFormBase
*/
protected
appDeName
:
string
=
'account'
;
/**
* 表单数据对象
*
* @type {*}
* @memberof QuickSummaryEditFormBase
*/
public
data
:
any
=
{
srfupdatedate
:
null
,
srforikey
:
null
,
srfkey
:
null
,
srfmajortext
:
null
,
srftempmode
:
null
,
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
statuscode
:
null
,
accountid
:
null
,
account
:
null
,
};
/**
* 属性值规则
*
* @type {*}
* @memberof QuickSummaryEditFormBase
*/
public
rules
:
any
=
{
}
/**
* 详情模型集合
*
* @type {*}
* @memberof QuickSummaryEditFormBase
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'客户基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
false
,
form
:
this
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.account.quicksummary_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
formpage1
:
new
FormPageModel
({
caption
:
'基本信息'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
}),
srfupdatedate
:
new
FormItemModel
({
caption
:
'更新时间'
,
detailType
:
'FORMITEM'
,
name
:
'srfupdatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
0
}),
srforikey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srforikey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
srfkey
:
new
FormItemModel
({
caption
:
'客户'
,
detailType
:
'FORMITEM'
,
name
:
'srfkey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
srfmajortext
:
new
FormItemModel
({
caption
:
'客户名称'
,
detailType
:
'FORMITEM'
,
name
:
'srfmajortext'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
srftempmode
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srftempmode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
srfuf
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfuf'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
srfdeid
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfdeid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
statuscode
:
new
FormItemModel
({
caption
:
'状态描述'
,
detailType
:
'FORMITEM'
,
name
:
'statuscode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
accountid
:
new
FormItemModel
({
caption
:
'客户'
,
detailType
:
'FORMITEM'
,
name
:
'accountid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
}),
};
}
\ No newline at end of file
app_CRM/src/widgets/account/quick-summary-form/quick-summary-form-model.ts
0 → 100644
浏览文件 @
3df2b754
/**
* QuickSummary 部件模型
*
* @export
* @class QuickSummaryModel
*/
export
default
class
QuickSummaryModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof QuickSummaryModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfwfmemo'
,
prop
:
'srfwfmemo'
,
dataType
:
'TEXT'
,
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfupdatedate'
,
prop
:
'updatedate'
,
dataType
:
'DATETIME'
,
},
{
name
:
'srforikey'
,
},
{
name
:
'srfkey'
,
prop
:
'accountid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfmajortext'
,
prop
:
'accountname'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'statuscode'
,
prop
:
'statuscode'
,
dataType
:
'NSCODELIST'
,
},
{
name
:
'accountid'
,
prop
:
'accountid'
,
dataType
:
'GUID'
,
},
{
name
:
'account'
,
prop
:
'accountid'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/account/quick-summary-form/quick-summary-form-service.ts
0 → 100644
浏览文件 @
3df2b754
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
AccountService
from
'@/service/account/account-service'
;
import
QuickSummaryModel
from
'./quick-summary-form-model'
;
/**
* QuickSummary 部件服务对象
*
* @export
* @class QuickSummaryService
*/
export
default
class
QuickSummaryService
extends
ControlService
{
/**
* 客户服务对象
*
* @type {AccountService}
* @memberof QuickSummaryService
*/
public
appEntityService
:
AccountService
=
new
AccountService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof QuickSummaryService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of QuickSummaryService.
*
* @param {*} [opts={}]
* @memberof QuickSummaryService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
QuickSummaryModel
();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof QuickSummaryService
*/
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
//仿真主键数据
const
PrimaryKey
=
Util
.
createUUID
();
Data
.
accountid
=
PrimaryKey
;
Data
.
account
=
PrimaryKey
;
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
)
=>
{
response
.
data
.
accountid
=
PrimaryKey
;
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 QuickSummaryService
*/
@
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 QuickSummaryService
*/
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/account/quick-summary-form/quick-summary-form.html
0 → 100644
浏览文件 @
3df2b754
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'quicksummary'
id=
'account_quicksummary'
style=
""
>
<input
style=
"display:none;"
/>
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.account.quicksummary_form.details.group1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.statuscode.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'statuscode'
:itemRules=
"this.rules.statuscode"
class=
''
:caption=
"$t('entities.account.quicksummary_form.details.statuscode')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.statuscode.error"
:isEmptyCaption=
"false"
labelPos=
"TOP"
>
<dropdown-list
v-model=
"data.statuscode"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
:disabled=
"detailsModel.statuscode.disabled"
tag=
'Account__StatusCode'
codelistType=
'STATIC'
placeholder=
'请选择...'
style=
""
>
</dropdown-list>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
app_CRM/src/widgets/account/quick-summary-form/quick-summary-form.vue
0 → 100644
浏览文件 @
3df2b754
<
template
src=
"./quick-summary-form.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { QuickSummaryEditFormBase } from './quick-summary-form-base';
/**
* quicksummary部件
*
* @export
* @class QuickSummaryEditForm
* @extends {QuickSummaryEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class QuickSummaryEditForm extends QuickSummaryEditFormBase { }
</script>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录