Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
c4d78415
提交
c4d78415
编写于
11月 24, 2022
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tony001 发布系统代码 [后台服务,演示应用]
上级
bab938a2
变更
23
隐藏空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
3742 行增加
和
437 行删除
+3742
-437
ibizorder_BO_CN_base.ts
.../locale/lanres/entities/ibizorder/ibizorder_BO_CN_base.ts
+9
-0
ibizorder_en_US_base.ts
.../locale/lanres/entities/ibizorder/ibizorder_en_US_base.ts
+9
-0
ibizorder_zh_CN_base.ts
.../locale/lanres/entities/ibizorder/ibizorder_zh_CN_base.ts
+9
-0
ibizorder-proivate-plugin-grid-view-base.vue
...in-grid-view/ibizorder-proivate-plugin-grid-view-base.vue
+25
-25
ibizorder-proivate-plugin-grid-view.vue
...-plugin-grid-view/ibizorder-proivate-plugin-grid-view.vue
+2
-2
default-searchform-base.vue
...s/ibizbook/default-searchform/default-searchform-base.vue
+2
-2
guide-view-form-form-base.vue
...izbook/guide-view-form-form/guide-view-form-form-base.vue
+6
-5
lnternal-func-list-list-base.vue
.../lnternal-func-list-list/lnternal-func-list-list-base.vue
+20
-20
quicksearchform-searchform-base.vue
...searchform-searchform/quicksearchform-searchform-base.vue
+2
-2
main-grid-base.vue
...src/widgets/ibizorder-detail/main-grid/main-grid-base.vue
+6
-6
main-grid-model.ts
...src/widgets/ibizorder-detail/main-grid/main-grid-model.ts
+0
-1
card-navigation-dataview-base.vue
...ard-navigation-dataview/card-navigation-dataview-base.vue
+4
-4
proivate-table-grid-base.vue
...bizorder/proivate-table-grid/proivate-table-grid-base.vue
+2474
-0
proivate-table-grid-model.ts
...bizorder/proivate-table-grid/proivate-table-grid-model.ts
+140
-0
proivate-table-grid-service.ts
...zorder/proivate-table-grid/proivate-table-grid-service.ts
+495
-0
proivate-table-grid.less
...ts/ibizorder/proivate-table-grid/proivate-table-grid.less
+177
-0
proivate-table-grid.vue
...ets/ibizorder/proivate-table-grid/proivate-table-grid.vue
+16
-0
ProivateTable.json
...eb/PSAPPDATAENTITIES/IBIZOrder/PSGRIDS/ProivateTable.json
+180
-0
IBIZOrderProivatePluginGridView.json
...PPS/Web/PSAPPDEVIEWS/IBIZOrderProivatePluginGridView.json
+164
-356
PSSYSAPP.json
.../resources/static/remotemodel/PSSYSAPPS/Web/PSSYSAPP.json
+0
-6
PSSYSAPP.simple.json
...ces/static/remotemodel/PSSYSAPPS/Web/PSSYSAPP.simple.json
+0
-6
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+1
-1
view.xml
demo-core/src/main/resources/liquibase/view.xml
+1
-1
未找到文件。
app_Web/src/locale/lanres/entities/ibizorder/ibizorder_BO_CN_base.ts
浏览文件 @
c4d78415
...
...
@@ -1050,6 +1050,15 @@ function getLocaleResourceBase(){
ibizorder_delete
:
commonLogic
.
appcommonhandle
(
"删除"
,
null
),
},
},
proivatetable_grid
:
{
columns
:
{
ibizorderid
:
commonLogic
.
appcommonhandle
(
"订单标识"
,
null
),
ibizcustomername
:
commonLogic
.
appcommonhandle
(
"客户名称"
,
null
),
},
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
usr_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
...
...
app_Web/src/locale/lanres/entities/ibizorder/ibizorder_en_US_base.ts
浏览文件 @
c4d78415
...
...
@@ -1050,6 +1050,15 @@ function getLocaleResourceBase(){
ibizorder_delete
:
commonLogic
.
appcommonhandle
(
"删除"
,
null
),
},
},
proivatetable_grid
:
{
columns
:
{
ibizorderid
:
commonLogic
.
appcommonhandle
(
"订单标识"
,
null
),
ibizcustomername
:
commonLogic
.
appcommonhandle
(
"客户名称"
,
null
),
},
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
usr_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
...
...
app_Web/src/locale/lanres/entities/ibizorder/ibizorder_zh_CN_base.ts
浏览文件 @
c4d78415
...
...
@@ -1050,6 +1050,15 @@ function getLocaleResourceBase(){
ibizorder_delete
:
commonLogic
.
appcommonhandle
(
"删除"
,
null
),
},
},
proivatetable_grid
:
{
columns
:
{
ibizorderid
:
commonLogic
.
appcommonhandle
(
"订单标识"
,
null
),
ibizcustomername
:
commonLogic
.
appcommonhandle
(
"客户名称"
,
null
),
},
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
usr_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
...
...
app_Web/src/pages/sample/ibizorder-proivate-plugin-grid-view/ibizorder-proivate-plugin-grid-view-base.vue
浏览文件 @
c4d78415
...
...
@@ -329,8 +329,8 @@ export default class IBIZOrderProivatePluginGridViewBase extends Vue {
*/
public
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
wflinks
:
[],
};
...
...
@@ -854,84 +854,84 @@ export default class IBIZOrderProivatePluginGridViewBase extends Vue {
}
}
/**
*
grid 部件 rowdblclick
事件
*
searchform 部件 search
事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
grid_rowdblclick
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
grid'
,
'rowdblclick
'
,
$event
);
public
searchform_search
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
searchform'
,
'search
'
,
$event
);
}
/**
*
grid 部件 selectionchange
事件
*
searchform 部件 load
事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
grid_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
grid'
,
'selectionchange
'
,
$event
);
public
searchform_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
searchform'
,
'load
'
,
$event
);
}
/**
*
grid 部件 remo
ve 事件
*
searchform 部件 sa
ve 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
grid_remo
ve
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
grid'
,
'remo
ve'
,
$event
);
public
searchform_sa
ve
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
searchform'
,
'sa
ve'
,
$event
);
}
/**
* grid 部件
load
事件
* grid 部件
rowdblclick
事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
grid_
load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'
load
'
,
$event
);
public
grid_
rowdblclick
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'
rowdblclick
'
,
$event
);
}
/**
* grid 部件
beforeload
事件
* grid 部件
selectionchange
事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
grid_
beforeload
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'
beforeload
'
,
$event
);
public
grid_
selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'
selectionchange
'
,
$event
);
}
/**
*
searchform 部件 search
事件
*
grid 部件 remove
事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
searchform'
,
'search
'
,
$event
);
public
grid_remove
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
grid'
,
'remove
'
,
$event
);
}
/**
*
searchform
部件 load 事件
*
grid
部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
searchform
_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
searchform
'
,
'load'
,
$event
);
public
grid
_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
grid
'
,
'load'
,
$event
);
}
/**
*
searchform 部件 save
事件
*
grid 部件 beforeload
事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderProivatePluginGridViewBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
searchform'
,
'save
'
,
$event
);
public
grid_beforeload
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'
grid'
,
'beforeload
'
,
$event
);
}
...
...
app_Web/src/pages/sample/ibizorder-proivate-plugin-grid-view/ibizorder-proivate-plugin-grid-view.vue
浏览文件 @
c4d78415
...
...
@@ -2,14 +2,14 @@
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZOrderProivatePluginGridViewBase
from
'./ibizorder-proivate-plugin-grid-view-base.vue'
;
import
view_grid
from
'@widgets/ibizorder/main-grid/main-grid.vue'
;
import
view_searchform
from
'@widgets/ibizorder/default-searchform/default-searchform.vue'
;
import
view_grid
from
'@widgets/ibizorder/proivate-table-grid/proivate-table-grid.vue'
;
// 基于 @VIEW/实体表格视图/VIEW.vue.ftl 生成
@
Component
({
components
:
{
view_grid
,
view_searchform
,
view_grid
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
...
...
app_Web/src/widgets/ibizbook/default-searchform/default-searchform-base.vue
浏览文件 @
c4d78415
...
...
@@ -712,7 +712,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
9
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
3
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -748,7 +748,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public
async
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
Promise
<
any
>
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
9
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
3
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
app_Web/src/widgets/ibizbook/guide-view-form-form/guide-view-form-form-base.vue
浏览文件 @
c4d78415
...
...
@@ -1447,7 +1447,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public
async
load
(
opt
:
any
=
{}):
Promise
<
any
>
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView
_layout
'
+
(
this
.
$t
(
'app.formpage.notconfig.loadaction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView'
+
(
this
.
$t
(
'app.formpage.notconfig.loadaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -1494,7 +1494,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public
async
loadDraft
(
opt
:
any
=
{}):
Promise
<
any
>
{
if
(
!
this
.
loaddraftAction
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView
_layout
'
+
(
this
.
$t
(
'app.formpage.notconfig.loaddraftaction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView'
+
(
this
.
$t
(
'app.formpage.notconfig.loaddraftaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
@@ -1564,7 +1564,7 @@ export default class GuideViewFormBase 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
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView
_layout
'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
return
;
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
...
...
@@ -1672,7 +1672,7 @@ export default class GuideViewFormBase 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
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView
_layout
'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
return
;
}
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
});
...
...
@@ -1764,7 +1764,7 @@ export default class GuideViewFormBase 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
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView
_layout
'
+
(
this
.
$t
(
'app.formpage.notconfig.removeaction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKWizardView'
+
(
this
.
$t
(
'app.formpage.notconfig.removeaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
opt
[
0
];
...
...
@@ -2204,4 +2204,5 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
<
style
lang=
'less'
>
@import './guide-view-form-form.less';
</
style
>
uide-view-form-form.less';
</style>
\ No newline at end of file
app_Web/src/widgets/ibizbook/lnternal-func-list-list/lnternal-func-list-list-base.vue
浏览文件 @
c4d78415
...
...
@@ -46,11 +46,11 @@
<span
class=
"quick-toolbar"
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"
usr4listview_layoutlist_quicktoolbarModels.deuiaction1.visabled"
:disabled=
"usr4listview_layout
list_quicktoolbarModels.deuiaction1.disabled"
class=
''
v-button-loading:i-button
@
click=
"list_quicktoolbar_click({ tag: 'deuiaction1' }, $event)"
>
<i-button
v-show=
"
listviewlist_quicktoolbarModels.deuiaction1.visabled"
:disabled=
"listview
list_quicktoolbarModels.deuiaction1.disabled"
class=
''
v-button-loading:i-button
@
click=
"list_quicktoolbar_click({ tag: 'deuiaction1' }, $event)"
>
<i
class=
'fa fa-file-text-o'
></i>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
usr4listview_layout
list_quicktoolbar_toolbar.deuiaction1.caption')}}
</span>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
listview
list_quicktoolbar_toolbar.deuiaction1.caption')}}
</span>
</i-button>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
usr4listview_layout
list_quicktoolbar_toolbar.deuiaction1.tip')}}
</div>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
listview
list_quicktoolbar_toolbar.deuiaction1.tip')}}
</div>
</tooltip>
</div>
</span>
...
...
@@ -61,18 +61,18 @@
<span
class=
"batch-toolbar"
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"
usr4listview_layoutlist_batchtoolbarModels.deuiaction1.visabled"
:disabled=
"usr4listview_layout
list_batchtoolbarModels.deuiaction1.disabled"
class=
''
v-button-loading:i-button
@
click=
"list_batchtoolbar_click({ tag: 'deuiaction1' }, $event)"
>
<i-button
v-show=
"
listviewlist_batchtoolbarModels.deuiaction1.visabled"
:disabled=
"listview
list_batchtoolbarModels.deuiaction1.disabled"
class=
''
v-button-loading:i-button
@
click=
"list_batchtoolbar_click({ tag: 'deuiaction1' }, $event)"
>
<i
class=
'fa fa-edit'
></i>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
usr4listview_layout
list_batchtoolbar_toolbar.deuiaction1.caption')}}
</span>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
listview
list_batchtoolbar_toolbar.deuiaction1.caption')}}
</span>
</i-button>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
usr4listview_layout
list_batchtoolbar_toolbar.deuiaction1.tip')}}
</div>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
listview
list_batchtoolbar_toolbar.deuiaction1.tip')}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"
usr4listview_layoutlist_batchtoolbarModels.deuiaction2.visabled"
:disabled=
"usr4listview_layout
list_batchtoolbarModels.deuiaction2.disabled"
class=
''
v-button-loading:i-button
@
click=
"list_batchtoolbar_click({ tag: 'deuiaction2' }, $event)"
>
<i-button
v-show=
"
listviewlist_batchtoolbarModels.deuiaction2.visabled"
:disabled=
"listview
list_batchtoolbarModels.deuiaction2.disabled"
class=
''
v-button-loading:i-button
@
click=
"list_batchtoolbar_click({ tag: 'deuiaction2' }, $event)"
>
<i
class=
'fa fa-remove'
></i>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
usr4listview_layout
list_batchtoolbar_toolbar.deuiaction2.caption')}}
</span>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
listview
list_batchtoolbar_toolbar.deuiaction2.caption')}}
</span>
</i-button>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
usr4listview_layout
list_batchtoolbar_toolbar.deuiaction2.tip')}}
</div>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
listview
list_batchtoolbar_toolbar.deuiaction2.tip')}}
</div>
</tooltip>
</div>
</span>
...
...
@@ -382,7 +382,7 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOK
Usr4ListView_layout
Base
* @memberof IBIZBOOK
ListView
Base
*/
public
New
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
...
...
@@ -402,7 +402,7 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOK
Usr4ListView_layout
Base
* @memberof IBIZBOOK
ListView
Base
*/
public
Edit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
...
...
@@ -428,7 +428,7 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOK
Usr4ListView_layout
Base
* @memberof IBIZBOOK
ListView
Base
*/
public
Remove
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
...
...
@@ -624,9 +624,9 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
* 工具栏模型
*
* @type {*}
* @memberof IBIZBOOK
Usr4ListView_layout
* @memberof IBIZBOOK
ListView
*/
public
usr4listview_layout
list_quicktoolbarModels
:
any
=
{
public
listview
list_quicktoolbarModels
:
any
=
{
deuiaction1
:
{
name
:
'deuiaction1'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
};
...
...
@@ -636,9 +636,9 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
* 工具栏模型
*
* @type {*}
* @memberof IBIZBOOK
Usr4ListView_layout
* @memberof IBIZBOOK
ListView
*/
public
usr4listview_layout
list_batchtoolbarModels
:
any
=
{
public
listview
list_batchtoolbarModels
:
any
=
{
deuiaction1
:
{
name
:
'deuiaction1'
,
actiontarget
:
'NONE'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
deuiaction2
:
{
name
:
'deuiaction2'
,
actiontarget
:
'NONE'
,
caption
:
'删除'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
}
},
...
...
@@ -861,7 +861,7 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
*/
public
async
load
(
opt
:
any
=
{}):
Promise
<
any
>
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr4ListView_layout
'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
ListView
'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{...
opt
};
...
...
@@ -991,7 +991,7 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr4ListView_layout
'
+
(
this
.
$t
(
'app.list.notConfig.removeAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
ListView
'
+
(
this
.
$t
(
'app.list.notConfig.removeAction'
)
as
string
)
});
return
;
}
if
(
datas
.
length
===
0
)
{
...
...
@@ -1096,7 +1096,7 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
!
this
.
createAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr4ListView_layout
'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
ListView
'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
...
...
@@ -1104,7 +1104,7 @@ export default class LnternalFuncListBase extends Vue implements ControlInterfac
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.warning'
)
as
string
),
desc
:
'IBIZBOOK
Usr4ListView_layout
'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.warning'
)
as
string
),
desc
:
'IBIZBOOK
ListView
'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
ibizbook
){
...
...
app_Web/src/widgets/ibizbook/quicksearchform-searchform/quicksearchform-searchform-base.vue
浏览文件 @
c4d78415
...
...
@@ -670,7 +670,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Calendar
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
List
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -706,7 +706,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public
async
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
Promise
<
any
>
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Calendar
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
List
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
app_Web/src/widgets/ibizorder-detail/main-grid/main-grid-base.vue
浏览文件 @
c4d78415
...
...
@@ -964,7 +964,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
fetchAction
)
{
this
.
$Notice
.
error
({
title
:
this
.
$t
(
"app.commonWords.wrong"
)
as
string
,
desc
:
"IBIZOrderDetailSGridView"
+
(
this
.
$t
(
"app.gridpage.notConfig.fetchAction"
)
as
string
),
desc
:
"IBIZOrderDetailSGridView
9
"
+
(
this
.
$t
(
"app.gridpage.notConfig.fetchAction"
)
as
string
),
});
return
;
}
...
...
@@ -1093,7 +1093,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
removeAction
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
desc
:
'IBIZOrderDetailSGridView
9
'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
return
;
}
...
...
@@ -1207,7 +1207,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
addBatch
(
arg
:
any
=
{}):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.fetchAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView
9
'
+
(
this
.
$t
(
'app.gridpage.notConfig.fetchAction'
)
as
string
)
});
return
;
}
if
(
!
arg
){
...
...
@@ -2101,7 +2101,7 @@ export default class MainBase extends Vue implements ControlInterface {
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
))
{
if
(
!
this
.
createAction
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.createAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView
9
'
+
(
this
.
$t
(
'app.gridpage.notConfig.createAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,
{
viewparams
:
this
.
viewparams
});
const
tempContext
=
Util
.
deepCopy
(
this
.
context
);
...
...
@@ -2110,7 +2110,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.updateAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView
9
'
+
(
this
.
$t
(
'app.gridpage.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,
{
viewparams
:
this
.
viewparams
});
const
tempContext
=
Util
.
deepCopy
(
this
.
context
);
...
...
@@ -2186,7 +2186,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailSGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.loaddraftAction'
)
as
string
)
desc
:
'IBIZOrderDetailSGridView
9
'
+
(
this
.
$t
(
'app.gridpage.notConfig.loaddraftAction'
)
as
string
)
});
return
;
}
...
...
app_Web/src/widgets/ibizorder-detail/main-grid/main-grid-model.ts
浏览文件 @
c4d78415
...
...
@@ -97,7 +97,6 @@ export default class MainModel {
name
:
'ibizorderdetail'
,
prop
:
'ibizorderdetailid'
,
},
{
name
:
'size'
,
prop
:
'size'
,
...
...
app_Web/src/widgets/ibizorder/card-navigation-dataview/card-navigation-dataview-base.vue
浏览文件 @
c4d78415
...
...
@@ -736,7 +736,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
*/
public
async
load
(
opt
:
any
=
{},
isReset
:
boolean
=
false
):
Promise
<
any
>
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView
_layout
'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{...
opt
};
...
...
@@ -830,7 +830,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView
_layout
'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
return
;
}
let
_datas
:
any
[]
=
[];
...
...
@@ -946,7 +946,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
!
this
.
createAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView
_layout
'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
...
...
@@ -954,7 +954,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView
_layout
'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDataViewExpView'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
ibizorder
){
...
...
app_Web/src/widgets/ibizorder/proivate-table-grid/proivate-table-grid-base.vue
0 → 100644
浏览文件 @
c4d78415
<
template
>
<div
class=
'grid'
style=
"height:100%"
>
<i-form
style=
"height:100%;display:flex;flex-direction: column;justify-content: space-between"
>
<input
style=
"display:none;"
/>
<el-table
v-if=
"isDisplay === true"
:default-sort=
"
{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
:cell-class-name="getCellClassName"
max-height="items.length > 0 ? 'calc(100%-50px)' : '100%'"
@row-click="rowClick($event)"
@cell-click="cellClick"
@select-all="selectAll($event)"
@select="select"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template
slot=
"empty"
>
{{
$t
(
'entities.ibizorder.proivatetable_grid.nodata'
)
}}
</
template
>
<
template
v-if=
"!isSingleSelect"
>
<el-table-column
align=
"center"
type=
'selection'
:width=
"checkboxColWidth"
></el-table-column>
</
template
>
<
template
v-if=
"getColumnState('ibizorderid')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'ibizorderid'"
:label=
"$t('entities.ibizorder.proivatetable_grid.columns.ibizorderid')"
:width=
"100"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"
{column}">
<span
class=
"column-header "
>
{{
$t
(
'entities.ibizorder.proivatetable_grid.columns.ibizorderid'
)
}}
</span>
</
template
>
<
template
v-slot=
"{row,column,$index}"
>
<span>
{{
row
.
ibizorderid
}}
</span>
</
template
>
</el-table-column>
</template>
<
template
v-if=
"getColumnState('ibizcustomername')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'ibizcustomername'"
:label=
"$t('entities.ibizorder.proivatetable_grid.columns.ibizcustomername')"
:width=
"100"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"
{column}">
<span
class=
"column-header "
>
{{
$t
(
'entities.ibizorder.proivatetable_grid.columns.ibizcustomername'
)
}}
</span>
</
template
>
<
template
v-slot=
"{row,column,$index}"
>
<span>
{{
row
.
ibizcustomername
}}
</span>
</
template
>
</el-table-column>
</template>
<
template
v-if=
"adaptiveState"
>
<el-table-column></el-table-column>
</
template
>
</el-table>
<row
class=
'grid-pagination'
v-show=
"items.length > 0"
>
<page
class=
'pull-right'
@
on-change=
"pageOnChange($event)"
@
on-page-size-change=
"onPageSizeChange($event)"
:transfer=
"true"
:total=
"totalrow"
show-sizer
:current=
"curPage"
:page-size=
"limit"
:page-size-opts=
"[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]"
show-elevator
show-total
>
<span>
<span
class=
"page-column"
>
<poptip
transfer
placement=
"top-start"
>
<i-button
icon=
"md-menu"
>
{{$t('app.gridpage.choicecolumns')}}
</i-button>
<div
slot=
"content"
>
<
template
v-for=
"col in allColumns"
>
<div
:key=
"col.name"
><el-checkbox
v-model=
"col.show"
@
change=
"onColChange()"
>
{{
$t
(
col
.
langtag
)
}}
</el-checkbox></div>
</
template
>
</div>
</poptip>
</span>
<span
class=
"page-button"
><i-button
icon=
"md-refresh"
:title=
"$t('app.gridpage.refresh')"
@
click=
"pageRefresh()"
></i-button></span>
<span>
{{$t('app.gridpage.show')}}
<span>
<
template
v-if=
"items.length === 1"
>
1
</
template
>
<
template
v-else
>
<span>
{{
(
curPage
-
1
)
*
limit
+
1
}}
-
{{
totalrow
>
curPage
*
limit
?
curPage
*
limit
:
totalrow
}}
</span>
</
template
>
</span>
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}
{{totalrow}}
{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
</template>
// 基于 @CONTROL/表格/CONTROL-BASE.vue.ftl 生成
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
,
Inject
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
,
ViewTool
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
AppCenterService
from
"@service/app/app-center-service"
;
import
IBIZOrderEntityService
from
'@/service/ibizorder/ibizorder-service'
;
import
ProivateTableService
from
'./proivate-table-grid-service'
;
import
IBIZOrderUIService
from
'@/uiservice/ibizorder/ibizorder-ui-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
import
{
FormItemModel
}
from
'@/model/form-detail'
;
import
{
Environment
}
from
'@/environments/environment'
;
@
Component
({
components
:
{
}
})
export
default
class
ProivateTableBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ProivateTableBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof ProivateTableBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof ProivateTableBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图操作参数(父级)
*
* @type {*}
* @memberof ProivateTableBase
*/
@
Prop
()
public
pViewCtx
!
:
any
;
/**
* 视图操作参数
*
* @type {*}
* @memberof ProivateTableBase
*/
public
viewCtx
:
any
=
{};
/**
* 监听视图操作参数变化
*
* @type {*}
* @memberof ProivateTableBase
*/
@
Watch
(
'pViewCtx'
,
{
immediate
:
true
})
public
onViewCtxChange
(
newVal
:
any
,
oldVal
:
any
)
{
Object
.
assign
(
this
.
viewCtx
,
newVal
,
{
xData
:
this
,
ctrl
:
this
});
}
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ProivateTableBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof ProivateTableBase
*/
public
getControlType
():
string
{
return
'GRID'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ProivateTableBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {ProivateTableService}
* @memberof ProivateTableBase
*/
public
service
:
ProivateTableService
=
new
ProivateTableService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof ProivateTableBase
*/
public
appEntityService
:
IBIZOrderEntityService
=
new
IBIZOrderEntityService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof ProivateTableBase
*/
public
transformData
(
args
:
any
)
{
let
_this
:
any
=
this
;
if
(
_this
.
service
&&
_this
.
service
.
handleRequestData
instanceof
Function
&&
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)){
return
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)[
'data'
];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof ProivateTableBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof ProivateTableBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 处理部件事件
*
* @memberof ProivateTableBase
*/
public
async
handleCtrlEvents
(
eventName
:
string
,
args
:
any
=
{}):
Promise
<
boolean
>
{
const
actionData
=
{
data
:
this
.
getData
()
||
{},
context
:
Util
.
deepCopy
(
this
.
context
),
viewparams
:
Util
.
deepCopy
(
this
.
viewparams
),
xData
:
this
}
let
result
:
boolean
=
true
;
Object
.
assign
(
actionData
,
args
);
if
(
!
result
)
{
return
false
;
}
this
.
$emit
(
eventName
,
actionData
);
return
true
;
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ProivateTableBase
*/
public
codeListService
:
CodeListService
=
new
CodeListService
();
/**
* 主信息表格列
*
* @type {string}
* @memberof ProivateTableBase
*/
public
majorInfoColName
:
string
=
""
;
/**
* 界面UI服务对象
*
* @type {IBIZOrderUIService}
* @memberof ProivateTableBase
*/
public
appUIService
:
IBIZOrderUIService
=
new
IBIZOrderUIService
();
/**
* 界面行为模型
*
* @type {*}
* @memberof ProivateTableBase
*/
public
actionModel
:
any
=
{
};
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ProivateTableBase
*/
public
appStateEvent
:
Subscription
|
undefined
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ProivateTableBase
*/
public
getDatas
():
any
[]
{
return
this
.
selections
;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ProivateTableBase
*/
public
getData
():
any
{
return
this
.
selections
[
0
];
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ProivateTableBase
*/
@
Prop
()
public
newdata
:
any
;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ProivateTableBase
*/
@
Prop
()
public
opendata
:
any
;
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof ProivateTableBase
*/
@
Prop
({
default
:
false
})
public
isformDruipart
?:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ProivateTableBase
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--update
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
fetchAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--load
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
loadAction
!
:
string
;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
loaddraftAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 当前页
*
* @type {number}
* @memberof ProivateTableBase
*/
public
curPage
:
number
=
1
;
/**
* 数据
*
* @type {any[]}
* @memberof ProivateTableBase
*/
public
items
:
any
[]
=
[];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
isEnablePagingBar
:
boolean
=
true
;
/**
* 是否禁用排序
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
isNoSort
:
boolean
=
false
;
/**
* 排序方向
*
* @type {string}
* @memberof ProivateTableBase
*/
public
minorSortDir
:
string
=
''
;
/**
* 排序字段
*
* @type {string}
* @memberof ProivateTableBase
*/
public
minorSortPSDEF
:
string
=
''
;
/**
* 分页条数
*
* @type {number}
* @memberof ProivateTableBase
*/
public
limit
:
number
=
20
;
/**
* 是否显示标题
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
isHideHeader
:
boolean
=
false
;
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof ProivateTableBase
*/
@
Prop
({
default
:
false
})
public
isSelectFirstDefault
!
:
boolean
;
/**
* 是否单选
*
* @type {boolean}
* @memberof ProivateTableBase
*/
@
Prop
()
public
isSingleSelect
?:
boolean
;
/**
* 选中数据字符串
*
* @type {string}
* @memberof ProivateTableBase
*/
@
Prop
()
public
selectedData
?:
string
;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof ProivateTableBase
*/
@
Watch
(
'selectedData'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
selections
=
[];
if
(
this
.
selectedData
){
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
multipleTable
)
{
refs
.
multipleTable
.
clearSelection
();
JSON
.
parse
(
this
.
selectedData
).
forEach
((
selection
:
any
)
=>
{
let
selectedItem
=
this
.
items
.
find
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
srfkey
,
selection
.
srfkey
);
});
if
(
selectedItem
){
this
.
rowClick
(
selectedItem
);
}
});
}
}
}
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof ProivateTableBase
*/
@
Prop
({
default
:
2
})
public
gridRowActiveMode
!
:
number
;
/**
* 是否开启行编辑
*
* @type {boolean}
* @memberof ProivateTableBase
*/
@
Prop
({
default
:
false
})
public
isOpenEdit
!
:
boolean
;
/**
* 实际是否开启行编辑
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
actualIsOpenEdit
:
boolean
=
this
.
isOpenEdit
;
/**
* 总条数
*
* @type {number}
* @memberof ProivateTableBase
*/
public
totalrow
:
number
=
0
;
/**
* 表格更新默认值项
*
* @memberof ProivateTableBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[];
/**
* 选中行数据
*
* @type {any[]}
* @memberof ProivateTableBase
*/
public
selections
:
any
[]
=
[];
/**
* 拦截行选中
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
stopRowClick
:
boolean
=
false
;
/**
* 当前编辑行数据
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
curEditRowData
:
any
;
/**
* 表格是否显示
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
isDisplay
:
boolean
=
true
;
/**
* 表格行编辑项校验错误提示信息
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
errorMessages
:
Array
<
any
>
=
[];
/**
* 部件刷新
*
* @param {any} args
* @memberof ProivateTableBase
*/
public
refresh
(
args
?:
any
):
void
{
this
.
load
();
}
/**
* 选项框列宽
*
* @type {number}
* @memberof AppIndex
*/
public
checkboxColWidth
:
number
=
50
;
/**
* 是否允许拖动列宽
*
* @type {boolean}
* @memberof AppEmbedPicker
*/
public
isDragendCol
:
boolean
=
true
;
/**
* 所有列成员
*
* @type {any[]}
* @memberof ProivateTableBase
*/
public
allColumns
:
any
[]
=
[
{
name
:
'ibizorderid'
,
label
:
'订单标识'
,
langtag
:
'entities.ibizorder.proivatetable_grid.columns.ibizorderid'
,
show
:
true
,
unit
:
'PX'
,
isEnableRowEdit
:
false
,
enableCond
:
3
,
},
{
name
:
'ibizcustomername'
,
label
:
'客户名称'
,
langtag
:
'entities.ibizorder.proivatetable_grid.columns.ibizcustomername'
,
show
:
true
,
unit
:
'PX'
,
isEnableRowEdit
:
false
,
enableCond
:
3
,
},
]
/**
* 表格模型集合
*
* @type {*}
* @memberof ProivateTableBase
*/
public
gridItemsModel
:
any
[]
=
[];
/**
* 是否启用分组
*
* @type {boolean}
* @memberof ProivateTableBase
*/
public
isEnableGroup
:
boolean
=
false
;
/**
* 分组属性
*
* @type {string}
* @memberof ProivateTableBase
*/
public
groupAppField
:
string
=
""
;
/**
* 分组属性代码表标识
*
* @type {string}
* @memberof ProivateTableBase
*/
public
groupAppFieldCodelistTag
:
string
=
""
;
/**
* 分组属性代码表类型
*
* @type {string}
* @memberof ProivateTableBase
*/
public
groupAppFieldCodelistType
:
string
=
""
;
/**
* 分组模式
*
* @type {string}
* @memberof ProivateTableBase
*/
public
groupMode
:
string
=
"NONE"
;
/**
* 分组代码表标识
*
* @type {string}
* @memberof ProivateTableBase
*/
public
codelistTag
:
string
=
""
;
/**
* 分组代码表类型
*
* @type {string}
* @memberof ProivateTableBase
*/
public
codelistType
:
string
=
""
;
/**
* 获取界面行为权限状态
*
* @memberof ProivateTableBase
*/
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
actionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
}
/**
* 获取表格行模型
*
* @type {*}
* @memberof ProivateTableBase
*/
public
getGridRowModel
(){
return
{
srfkey
:
new
FormItemModel
(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof ProivateTableBase
*/
public
deRules
(){
return
{
};
}
/**
* 值规则集合
*
* @type {*}
* @memberof ProivateTableBase
*/
public
rules
(){
return
{
srfkey
:
[
{
required
:
false
,
validator
:
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
return
(
rule
.
required
&&
(
value
===
null
||
value
===
undefined
||
value
===
""
))
?
false
:
true
;},
message
:
`
${
this
.
$t
(
'entities.ibizorder.proivatetable_grid.columns.srfkey'
)}${
this
.
$t
(
'app.commonWords.valueNotEmpty'
)}
`
,
trigger
:
'change'
},
{
required
:
false
,
validator
:
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
return
(
rule
.
required
&&
(
value
===
null
||
value
===
undefined
||
value
===
""
))
?
false
:
true
;},
message
:
`
${
this
.
$t
(
'entities.ibizorder.proivatetable_grid.columns.srfkey'
)}${
this
.
$t
(
'app.commonWords.valueNotEmpty'
)}
`
,
trigger
:
'blur'
},
],
}
}
/**
* 表格行编辑项校验
*
* @param {string} property 属性名
* @param {*} data 行数据
* @param {number} rowIndex 行索引
* @returns Promise<any>
*
* @memberof ProivateTableBase
*/
public
validate
(
property
:
string
,
data
:
any
,
rowIndex
:
number
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$util
.
validateItem
(
property
,
data
,
this
.
rules
()).
then
(()
=>
{
this
.
gridItemsModel
[
rowIndex
][
property
].
setError
(
null
);
resolve
(
true
);
}).
catch
(({
errors
,
fields
})
=>
{
this
.
gridItemsModel
[
rowIndex
][
property
].
setError
(
errors
[
0
].
message
);
resolve
(
false
);
});
});
}
/**
* 校验所有修改过的编辑项
*
* @returns Promise<any>
* @memberof ProivateTableBase
*/
public
async
validateAll
(){
this
.
errorMessages
=
[];
let
validateState
=
true
;
let
index
=
-
1
;
for
(
let
item
of
this
.
items
)
{
let
tempMessage
:
string
=
''
;
index
++
;
if
(
item
.
rowDataState
===
"create"
||
item
.
rowDataState
===
"update"
)
{
for
(
let
property
of
Object
.
keys
(
this
.
rules
()))
{
if
(
!
await
this
.
validate
(
property
,
item
,
index
))
{
validateState
=
false
;
tempMessage
=
tempMessage
+
'<p>'
+
this
.
gridItemsModel
[
index
][
property
].
error
+
'<p>'
;
}
}
}
this
.
errorMessages
.
push
(
tempMessage
);
}
return
validateState
;
}
/**
* 表格数据加载
*
* @param {*} [arg={}]
* @memberof ProivateTableBase
*/
public
async
load
(
opt
:
any
=
{},
pageReset
:
boolean
=
false
):
Promise
<
any
>
{
if
(
!
this
.
fetchAction
)
{
this
.
$Notice
.
error
({
title
:
this
.
$t
(
"app.commonWords.wrong"
)
as
string
,
desc
:
"IBIZOrderProivatePluginGridView"
+
(
this
.
$t
(
"app.gridpage.notConfig.fetchAction"
)
as
string
),
});
return
;
}
if
(
pageReset
)
{
this
.
curPage
=
1
;
}
const
arg
:
any
=
{
...
opt
};
const
page
:
any
=
{};
if
(
this
.
isEnablePagingBar
)
{
Object
.
assign
(
page
,
{
page
:
this
.
curPage
-
1
,
size
:
this
.
limit
});
}
// 设置排序
if
(
!
this
.
isNoSort
&&
!
Object
.
is
(
this
.
minorSortDir
,
""
)
&&
!
Object
.
is
(
this
.
minorSortPSDEF
,
""
))
{
const
sort
:
string
=
this
.
minorSortPSDEF
+
","
+
this
.
minorSortDir
;
Object
.
assign
(
page
,
{
sort
:
sort
});
}
// 清空selections
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
}
Object
.
assign
(
arg
,
page
);
const
parentdata
:
any
=
{};
this
.
$emit
(
"beforeload"
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:
{};
Object
.
assign
(
tempViewParams
,
Util
.
deepCopy
(
this
.
viewparams
));
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
const
tempContext
=
Util
.
deepCopy
(
this
.
context
);
if
(
!
(
await
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
context
:
tempContext
,
viewparams
:
arg
})))
{
return
;
}
try
{
const
response
=
await
this
.
service
.
search
(
this
.
fetchAction
,
tempContext
,
arg
,
this
.
showBusyIndicator
);
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
// 加载失败
if
(
!
(
await
this
.
handleCtrlEvents
(
'onloaderror'
,
{
data
:
response
.
data
?
response
.
data
:
[]
})))
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
this
.
$t
(
"app.commonWords.wrong"
)
as
string
,
desc
:
response
.
data
.
message
,
});
}
return
response
;
}
// 加载成功
if
(
!
(
await
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
,
context
:
tempContext
,
viewparams
:
arg
})))
{
return
;
}
const
data
:
any
=
response
.
data
;
this
.
totalrow
=
response
.
total
;
this
.
items
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 清空selections,gridItemsModel
// this.selections = [];
this
.
gridItemsModel
=
[];
this
.
items
.
forEach
(()
=>
{
this
.
gridItemsModel
.
push
(
this
.
getGridRowModel
());
});
this
.
items
.
forEach
((
item
:
any
)
=>
{
Object
.
assign
(
item
,
this
.
getActionState
(
item
));
});
this
.
$emit
(
"load"
,
this
.
items
);
// 设置默认选中
let
_this
=
this
;
setTimeout
(()
=>
{
//在导航视图中,如已有选中数据,则右侧展开已选中数据的视图,如无选中数据则默认选中第一条
if
(
_this
.
isSelectFirstDefault
)
{
if
(
_this
.
selections
&&
_this
.
selections
.
length
>
0
)
{
_this
.
selections
.
forEach
((
select
:
any
)
=>
{
const
index
=
_this
.
items
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
item
.
srfkey
,
select
.
srfkey
));
if
(
index
!=
-
1
)
{
_this
.
rowClick
(
_this
.
items
[
index
]);
}
});
}
else
{
_this
.
rowClick
(
this
.
items
[
0
]);
}
}
if
(
_this
.
selectedData
)
{
const
refs
:
any
=
_this
.
$refs
;
if
(
refs
.
multipleTable
)
{
refs
.
multipleTable
.
clearSelection
();
JSON
.
parse
(
_this
.
selectedData
).
forEach
((
selection
:
any
)
=>
{
let
selectedItem
=
_this
.
items
.
find
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
srfkey
,
selection
.
srfkey
);
});
if
(
selectedItem
)
{
_this
.
rowClick
(
selectedItem
);
}
});
}
}
},
300
);
return
response
;
}
catch
(
response
:
any
)
{
// 加载失败
if
(
!
(
await
this
.
handleCtrlEvents
(
'onloaderror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
})))
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
response
;
}
this
.
$Notice
.
error
({
title
:
this
.
$t
(
"app.commonWords.wrong"
)
as
string
,
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
,
});
return
response
;
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof ProivateTableBase
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderProivatePluginGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
return
;
}
let
_datas
:
any
[]
=
[];
datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
record
.
srfuf
,
"0"
))
{
this
.
items
.
some
((
val
:
any
,
num
:
number
)
=>
{
if
(
JSON
.
stringify
(
val
)
==
JSON
.
stringify
(
record
)){
this
.
items
.
splice
(
num
,
1
);
this
.
gridItemsModel
.
splice
(
num
,
1
);
return
true
;
}
});
}
else
{
_datas
.
push
(
datas
[
index
]);
}
});
if
(
_datas
.
length
===
0
)
{
return
;
}
let
dataInfo
=
''
;
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
ibizordername
;
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
}
dataInfo
+=
srfmajortext
;
}
else
{
return
false
;
}
});
if
(
_datas
.
length
<
5
)
{
dataInfo
=
dataInfo
+
' '
+
(
this
.
$t
(
'app.gridpage.totle'
)
as
string
)
+
_datas
.
length
+
(
this
.
$t
(
'app.gridpage.records'
)
as
string
)
+
(
this
.
$t
(
'app.gridpage.data'
)
as
string
);
}
else
{
dataInfo
=
' ... '
+
(
this
.
$t
(
'app.gridpage.totle'
)
as
string
)
+
_datas
.
length
+
(
this
.
$t
(
'app.gridpage.records'
)
as
string
)
+
(
this
.
$t
(
'app.gridpage.data'
)
as
string
);
}
const
removeData
=
async
()
=>
{
let
keys
:
any
[]
=
[];
_datas
.
forEach
((
data
:
any
)
=>
{
keys
.
push
(
data
.
srfkey
);
});
let
_removeAction
=
keys
.
length
>
1
?
'removeBatch'
:
this
.
removeAction
;
let
_keys
=
keys
.
length
>
1
?
keys
:
keys
[
0
]
;
const
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
try
{
if
(
!
(
await
this
.
handleCtrlEvents
(
'onbeforeremove'
,
{
data
:
_keys
})))
{
return
;
}
const
response
:
any
=
await
this
.
service
.
delete
(
_removeAction
,
Object
.
assign
(
context
,{
ibizorder
:
_keys
}),
Object
.
assign
({
ibizorder
:
_keys
},{
viewparams
:
this
.
viewparams
}),
this
.
showBusyIndicator
);
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
(
await
this
.
handleCtrlEvents
(
'onremoveerror'
,
{
data
:
_keys
})))
{
return
;
}
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.gridpage.delDataFail'
)
as
string
)
+
','
+
response
.
info
});
return
;
}
if
(
!
(
await
this
.
handleCtrlEvents
(
'onremovesuccess'
,
{
data
:
response
.
data
})))
{
return
;
}
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.gridpage.delSuccess'
)
as
string
)
});
//删除items中已删除的项
_datas
.
forEach
((
data
:
any
)
=>
{
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
this
.
gridItemsModel
.
splice
(
index
,
1
);
return
true
;
}
});
});
this
.
totalrow
-=
_datas
.
length
;
this
.
$emit
(
'remove'
,
null
);
this
.
selections
=
[];
return
response
;
}
catch
(
response
:
any
)
{
if
(
!
(
await
this
.
handleCtrlEvents
(
'onremoveerror'
,
{
data
:
response
?
response
.
data
:
[]
})))
{
return
;
}
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
response
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
}
return
response
;
}
}
dataInfo
=
dataInfo
.
replace
(
/
[
null
]
/g
,
''
).
replace
(
/
[
undefined
]
/g
,
''
);
this
.
$Modal
.
confirm
({
title
:
(
this
.
$t
(
'app.commonWords.warning'
)
as
string
),
content
:
(
this
.
$t
(
'app.gridpage.confirmDel'
)
as
string
)
+
' '
+
dataInfo
+
','
+
(
this
.
$t
(
'app.gridpage.notRecoverable'
)
as
string
),
onOk
:
()
=>
{
removeData
();
},
onCancel
:
()
=>
{
}
});
return
removeData
;
}
/**
* 批量添加
*
* @param {*} [arg={}]
* @memberof ProivateTableBase
*/
public
addBatch
(
arg
:
any
=
{}):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderProivatePluginGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.fetchAction'
)
as
string
)
});
return
;
}
if
(
!
arg
){
arg
=
{};
}
console
.
error
((
this
.
$t
(
'app.gridpage.notBatch'
)
as
string
));
}
/**
* 数据导入
*
* @param {*} data
* @memberof ProivateTableBase
*/
public
importExcel
(
data
:
any
=
{}):
void
{
//导入excel
const
importDataModel
:
any
=
{
importId
:
'Import'
,
serviceName
:
'ibizorder'
,
appDeLogicName
:
'订单'
,
importData
:{
"IBIZORDERNAME"
:{
"headername"
:
"订单名称"
,
"isuniqueitem"
:
false
,
"name"
:
"ibizordername"
,
"order"
:
1000
},
"ORDERTIME"
:{
"headername"
:
"订单时间"
,
"isuniqueitem"
:
false
,
"name"
:
"ordertime"
,
"order"
:
1000
},
"ORDERTYPE"
:{
"codelist"
:{
"type"
:
"DYNAMIC"
,
"tag"
:
"DYNAORDERTYPE"
,
"isnumber"
:
false
},
"headername"
:
"订单类型"
,
"isuniqueitem"
:
false
,
"name"
:
"ordertype"
,
"order"
:
1000
},
"ORDERUID"
:{
"headername"
:
"订单编号"
,
"isuniqueitem"
:
true
,
"name"
:
"orderuid"
,
"order"
:
1000
}
}
}
if
(
Object
.
keys
(
importDataModel
).
length
==
0
){
this
.
$Notice
.
warning
({
'title'
:
(
this
.
$t
(
"app.utilview.warning"
)
as
string
),
'desc'
:
(
this
.
$t
(
"app.utilview.info"
)
as
string
)
});
return
;
}
const
view
:
any
=
{
viewname
:
'app-data-upload'
,
title
:
this
.
$t
(
"app.utilview.importview"
),
width
:
900
,
height
:
700
}
let
container
:
Subject
<
any
>
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
importDataModel
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
Object
.
is
(
result
.
ret
,
'OK'
)){
this
.
refresh
(
result
.
datas
);
}
});
}
/**
* 数据导出
*
* @param {*} data
* @memberof ProivateTableBase
*/
public
exportExcel
(
data
:
any
=
{}):
void
{
// 导出Excel
const
doExport
=
async
(
_data
:
any
)
=>
{
const
tHeader
:
Array
<
any
>
=
[];
const
filterVal
:
Array
<
any
>
=
[];
this
.
allColumns
.
forEach
((
item
:
any
)
=>
{
item
.
show
&&
item
.
label
?
tHeader
.
push
(
this
.
$t
(
item
.
langtag
))
:
""
;
item
.
show
&&
item
.
name
?
filterVal
.
push
(
item
.
name
)
:
""
;
});
const
data
=
await
this
.
formatExcelData
(
filterVal
,
_data
);
this
.
$export
.
exportExcel
().
then
((
excel
:
any
)
=>
{
excel
.
export_json_to_excel
({
header
:
tHeader
,
//表头 必填
data
,
//具体数据 必填
filename
:
"订单"
+
(
this
.
$t
(
'app.gridpage.grid'
)
as
string
),
//非必填
autoWidth
:
true
,
//非必填
bookType
:
"xlsx"
//非必填
});
});
};
const
page
:
any
=
{};
// 设置page,size
if
(
Object
.
is
(
data
.
type
,
'maxRowCount'
))
{
Object
.
assign
(
page
,
{
page
:
0
,
size
:
data
.
maxRowCount
});
}
else
if
(
Object
.
is
(
data
.
type
,
'activatedPage'
))
{
try
{
doExport
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
items
)));
}
catch
(
error
)
{
console
.
error
(
error
);
}
return
;
}
// 设置排序
if
(
!
this
.
isNoSort
&&
!
Object
.
is
(
this
.
minorSortDir
,
''
)
&&
!
Object
.
is
(
this
.
minorSortPSDEF
,
''
))
{
const
sort
:
string
=
this
.
minorSortPSDEF
+
","
+
this
.
minorSortDir
;
Object
.
assign
(
page
,
{
sort
:
sort
});
}
const
arg
:
any
=
{};
Object
.
assign
(
arg
,
page
);
// 获取query,搜索表单,viewparams等父数据
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.gridpage.exportFail'
)
as
string
)
+
','
+
response
.
info
});
return
;
}
try
{
doExport
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
catch
(
error
)
{
console
.
error
(
error
);
}
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.gridpage.exportFail'
)
as
string
)
});
});
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @returns {[]}
* @memberof ProivateTableBase
*/
public
async
formatExcelData
(
filterVal
:
any
,
jsonData
:
any
)
{
let
codelistColumns
:
Array
<
any
>
=
[
];
let
_this
=
this
;
for
(
const
codelist
of
codelistColumns
)
{
// 动态代码表处理
if
(
Object
.
is
(
codelist
.
codelistType
,
"DYNAMIC"
))
{
let
items
=
await
_this
.
codeListService
.
getItems
(
codelist
.
srfkey
);
jsonData
.
forEach
((
row
:
any
)
=>
{
row
[
codelist
.
name
]
=
_this
.
getCodelistValue
(
items
,
row
[
codelist
.
name
],
codelist
);
});
// 静态处理
}
else
if
(
Object
.
is
(
codelist
.
codelistType
,
"STATIC"
)){
let
items
=
await
_this
.
$store
.
getters
.
getCodeListItems
(
codelist
.
srfkey
);
jsonData
.
forEach
((
row
:
any
)
=>
{
row
[
codelist
.
name
]
=
_this
.
getCodelistValue
(
items
,
row
[
codelist
.
name
],
codelist
);
});
}
}
return
jsonData
.
map
((
v
:
any
)
=>
filterVal
.
map
((
j
:
any
)
=>
v
[
j
]))
}
/**
* 解析代码表和vlaue,设置items
*
* @public
* @param {any[]} items 代码表数据
* @param {*} value
* @returns {*}
* @memberof ProivateTableBase
*/
public
getCodelistValue
(
items
:
any
[],
value
:
any
,
codelist
:
any
,){
if
(
!
value
&&
value
!==
0
&&
value
!==
false
){
return
this
.
$t
(
'codelist.'
+
codelist
.
srfkey
+
'.empty'
);
}
if
(
items
)
{
let
result
:
any
=
[];
if
(
Object
.
is
(
codelist
.
renderMode
,
"number"
)){
items
.
map
((
_item
:
any
,
index
:
number
)
=>
{
const
nValue
=
parseInt
((
value
as
any
),
10
);
const
codevalue
=
_item
.
value
;
if
((
parseInt
(
codevalue
,
10
)
&
nValue
)
>
0
){
result
.
push
(
_item
);
}
});
}
else
if
(
Object
.
is
(
codelist
.
renderMode
,
"string"
)){
const
arrayValue
:
Array
<
any
>
=
(
value
as
any
).
split
(
codelist
.
valueSeparator
);
arrayValue
.
map
((
value
:
any
,
index
:
number
)
=>
{
result
.
push
([]);
let
values
:
any
[]
=
Object
.
is
(
this
.
$util
.
typeOf
(
value
),
'number'
)
?
[
value
]
:
[...(
value
as
any
).
split
(
codelist
.
valueSeparator
)];
values
.
map
((
val
:
any
,
num
:
number
)
=>
{
const
item
=
this
.
getItem
(
items
,
val
,
codelist
);
if
(
item
){
result
[
index
].
push
(
item
);
}
});
});
}
else
{
let
values
:
any
[]
=
Object
.
is
(
this
.
$util
.
typeOf
(
value
),
'number'
)
?
[
value
]
:
[...(
value
as
any
).
split
(
codelist
.
valueSeparator
)];
values
.
map
((
value
:
any
,
index
:
number
)
=>
{
const
item
=
this
.
getItem
(
items
,
value
,
codelist
);
if
(
item
){
result
.
push
(
item
);
}
});
}
// 设置items
if
(
result
.
length
!=
0
){
return
result
.
join
(
codelist
.
valueSeparator
);
}
else
{
return
value
;
}
}
}
/**
* 获取代码项
*
* @public
* @param {any[]} items
* @param {*} value
* @returns {*}
* @memberof ProivateTableBase
*/
public
getItem
(
items
:
any
[],
value
:
any
,
codelist
:
any
):
any
{
const
arr
:
Array
<
any
>
=
items
.
filter
(
item
=>
{
return
item
.
value
==
value
});
if
(
arr
.
length
!==
1
)
{
return
undefined
;
}
if
(
Object
.
is
(
codelist
.
codelistType
,
'STATIC'
)){
return
this
.
$t
(
'codelist.'
+
codelist
.
srfkey
+
'.'
+
arr
[
0
].
value
);
}
else
{
return
arr
[
0
].
text
;
}
}
/**
* 生命周期
*
* @memberof ProivateTableBase
*/
public
created
():
void
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof ProivateTableBase
*/
public
afterCreated
(){
this
.
setColState
();
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
load
(
data
,
true
);
}
if
(
Object
.
is
(
'remove'
,
action
))
{
this
.
remove
(
data
);
}
if
(
Object
.
is
(
'save'
,
action
))
{
this
.
save
(
data
);
}
});
}
if
(
AppCenterService
&&
AppCenterService
.
getMessageCenter
()){
this
.
appStateEvent
=
AppCenterService
.
getMessageCenter
().
subscribe
(({
name
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
name
,
"IBIZOrder"
)){
return
;
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
this
.
refresh
([
data
]);
}
})
}
}
/**
* vue 生命周期
*
* @memberof ProivateTableBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ProivateTableBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
appStateEvent
){
this
.
appStateEvent
.
unsubscribe
();
}
}
/**
* 获取选中行胡数据
*
* @returns {any[]}
* @memberof ProivateTableBase
*/
public
getSelection
():
any
[]
{
return
this
.
selections
;
}
/**
* 行双击事件
*
* @param {*} $event
* @returns {void}
* @memberof ProivateTableBase
*/
public
rowDBLClick
(
$event
:
any
):
void
{
// 分组行跳过
if
(
$event
&&
$event
.
children
){
return
;
}
if
(
!
$event
||
this
.
actualIsOpenEdit
||
Object
.
is
(
this
.
gridRowActiveMode
,
0
))
{
return
;
}
this
.
selections
=
[];
this
.
selections
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
$event
)));
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
multipleTable
)
{
refs
.
multipleTable
.
clearSelection
();
refs
.
multipleTable
.
toggleRowSelection
(
$event
);
}
this
.
$emit
(
'rowdblclick'
,
this
.
selections
);
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 合并分组行
*
* @memberof ProivateTableBase
*/
public
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}
:
any
)
{
let
allColumns
:
Array
<
any
>
=
[
'ibizorderid'
,
'ibizcustomername'
];
if
(
row
&&
row
.
children
)
{
if
(
columnIndex
==
(
this
.
isSingleSelect
?
0
:
1
))
{
return
[
1
,
allColumns
.
length
+
1
];
}
else
if
(
columnIndex
>
(
this
.
isSingleSelect
?
0
:
1
))
{
return
[
0
,
0
];
}
}
}
/**
* 分组方法
*
* @memberof ProivateTableBase
*/
public
group
(){
if
(
Object
.
is
(
this
.
groupMode
,
"AUTO"
)){
this
.
drawGroup
();
}
else
if
(
Object
.
is
(
this
.
groupMode
,
"CODELIST"
)){
this
.
drawCodelistGroup
();
}
}
/**
* 获取表格分组相关代码表
*
* @param {string} codelistType 代码表类型
* @param {string} codelistTag 代码表标识
* @memberof ProivateTableBase
*/
public
getGroupCodelist
(
codelistType
:
string
,
codelistTag
:
string
){
let
codelist
:
Array
<
any
>
=
[];
// 动态代码表
if
(
Object
.
is
(
codelistType
,
"DYNAMIC"
))
{
this
.
codeListService
.
getItems
(
codelistTag
).
then
((
res
:
any
)
=>
{
codelist
=
res
;
}).
catch
((
error
:
any
)
=>
{
});
// 静态代码表
}
else
if
(
Object
.
is
(
codelistType
,
"STATIC"
)){
codelist
=
this
.
$store
.
getters
.
getCodeListItems
(
codelistTag
);
}
return
codelist
;
}
/**
* 根据分组代码表绘制分组列表
*
* @memberof ProivateTableBase
*/
public
drawCodelistGroup
(){
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
this
.
getGroupCodelist
(
this
.
codelistType
,
this
.
codelistTag
);
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
if
(
allGroup
.
length
==
0
){
console
.
warn
(
"分组数据无效"
);
}
allGroup
.
forEach
((
group
:
any
,
i
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
});
const
tree
:
any
=
{
groupById
:
Number
((
i
+
1
)
*
100
),
group
:
group
.
label
,
ibizorderid
:
''
,
ibizcustomername
:
''
,
children
:
children
}
groupTree
.
push
(
tree
);
});
let
child
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
group
=
''
;
child
.
push
(
item
);
}
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
group
=
''
;
child
.
push
(
item
);
}
})
const
Tree
:
any
=
{
groupById
:
Number
((
allGroup
.
length
+
1
)
*
100
),
group
:
this
.
$t
(
'app.gridpage.other'
),
ibizorderid
:
''
,
ibizcustomername
:
''
,
children
:
child
}
if
(
child
&&
child
.
length
>
0
){
groupTree
.
push
(
Tree
);
}
this
.
items
=
groupTree
;
if
(
this
.
actualIsOpenEdit
)
{
for
(
let
i
=
0
;
i
<
this
.
items
.
length
;
i
++
)
{
this
.
gridItemsModel
.
push
(
this
.
getGridRowModel
());
}
}
}
/**
* 绘制分组
*
* @memberof ProivateTableBase
*/
public
drawGroup
(){
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
let
allGroup
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
});
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
if
(
allGroup
.
length
==
0
){
console
.
warn
(
"分组数据无效"
);
}
// 组装数据
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
});
group
=
group
?
group
:
this
.
$t
(
'app.gridpage.other'
);
const
tree
:
any
=
{
groupById
:
Number
((
groupIndex
+
1
)
*
100
),
group
:
group
,
ibizorderid
:
''
,
ibizcustomername
:
''
,
children
:
children
,
}
groupTree
.
push
(
tree
);
});
this
.
items
=
groupTree
;
if
(
this
.
actualIsOpenEdit
)
{
for
(
let
i
=
0
;
i
<
this
.
items
.
length
;
i
++
)
{
this
.
gridItemsModel
.
push
(
this
.
getGridRowModel
());
}
}
}
/**
* 单个复选框选中
*
* @param {*} selection 所有选中行数据
* @param {*} row 当前选中行数据
* @memberof ProivateTableBase
*/
public
select
(
selection
:
any
,
row
:
any
):
void
{
// 选中事件
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
[
row
]
}).
then
((
result
:
boolean
)
=>
{
if
(
!
result
)
{
return
;
}
if
(
this
.
groupAppField
)
{
let
isContain
:
boolean
=
selection
.
some
((
item
:
any
)
=>
{
return
item
==
row
;
})
// 是否选中当前行,选中为true,否则为false
if
(
isContain
)
{
// 当前行为分组行
if
(
row
.
children
&&
row
.
children
.
length
>
0
)
{
this
.
toggleSelection
(
row
.
children
,
true
);
row
.
children
.
forEach
((
children
:
any
)
=>
{
this
.
selections
.
push
(
children
);
});
}
else
{
this
.
selections
.
push
(
row
);
}
}
else
{
if
(
row
.
children
&&
row
.
children
.
length
>
0
)
{
this
.
toggleSelection
(
row
.
children
,
false
);
this
.
selections
=
this
.
computeCheckedData
(
this
.
selections
,
row
.
children
);
}
else
{
this
.
selections
=
this
.
computeCheckedData
(
this
.
selections
,
row
);
}
}
this
.
selections
=
[...
new
Set
(
this
.
selections
)]
}
else
{
if
(
!
selection
)
{
return
;
}
this
.
selections
=
[...
JSON
.
parse
(
JSON
.
stringify
(
selection
))];
}
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
});
}
/**
* 计算当前选中数据
*
* @param {*} selectionArray 所有选中行数据
* @param {*} cancelData 被取消选中行数据,分组行为数组,非分组行为对象
* @memberof ProivateTableBase
*/
public
computeCheckedData
(
selectionArray
:
any
[],
cancelData
:
Array
<
any
>
|
any
)
{
let
targetArray
:
Array
<
any
>
=
[];
// 分组行
if
(
Array
.
isArray
(
cancelData
))
{
if
(
selectionArray
&&
selectionArray
.
length
>
0
)
{
selectionArray
.
forEach
((
selection
:
any
)
=>
{
let
tempFlag
:
boolean
=
true
;
cancelData
.
forEach
((
child
:
any
)
=>
{
if
(
selection
.
groupById
===
child
.
groupById
){
tempFlag
=
false
;
}
})
if
(
tempFlag
)
targetArray
.
push
(
selection
);
})
}
}
else
{
// 非分组行
if
(
selectionArray
&&
selectionArray
.
length
>
0
)
{
selectionArray
.
forEach
((
selection
:
any
)
=>
{
let
tempFlag
:
boolean
=
true
;
if
(
selection
.
groupById
===
cancelData
.
groupById
){
tempFlag
=
false
;
}
if
(
tempFlag
)
targetArray
.
push
(
selection
);
})
}
}
return
targetArray
;
}
/**
* 设置非分组行checkbox选中状态
*
* @param {*} rows 选中数据数组
* @param {boolean} flag 是否选中
* @memberof ProivateTableBase
*/
public
toggleSelection
(
rows
?:
any
,
flag
?:
boolean
)
{
if
(
rows
)
{
rows
.
forEach
((
row
:
any
)
=>
{
(
this
.
$refs
.
multipleTable
as
any
).
toggleRowSelection
(
row
,
flag
);
});
}
else
{
(
this
.
$refs
.
multipleTable
as
any
).
clearSelection
();
}
}
/**
* 复选框数据全部选中
*
* @param {*} $event
* @memberof ProivateTableBase
*/
public
selectAll
(
selection
:
any
):
void
{
this
.
selections
=
[];
if
(
this
.
groupAppField
)
{
let
flag
:
boolean
=
true
;
if
(
selection
&&
selection
.
length
===
this
.
items
.
length
)
{
selection
.
forEach
((
element
:
any
)
=>
{
if
(
element
.
children
)
{
this
.
toggleSelection
(
element
.
children
,
flag
);
element
.
children
.
forEach
((
children
:
any
)
=>
{
this
.
selections
.
push
(
children
);
});
}
else
{
flag
=
false
;
}
});
}
else
{
flag
=
false
;
}
if
(
!
flag
)
{
this
.
toggleSelection
();
}
}
else
{
if
(
!
selection
)
{
return
;
}
this
.
selections
=
[...
JSON
.
parse
(
JSON
.
stringify
(
selection
))];
}
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 单元格单击隐藏提示框
*
* @memberof MainBase
*/
public
cellClick
()
{
let
el
:
any
=
document
.
getElementsByClassName
(
'el-tooltip__popper'
)[
0
];
if
(
el
)
{
el
.
style
.
display
=
'none'
;
}
}
/**
* 行单击选中
*
* @param {*} $event
* @returns {void}
* @memberof ProivateTableBase
*/
public
rowClick
(
$event
:
any
,
ifAlways
:
boolean
=
false
):
void
{
// 分组行跳过
if
(
$event
&&
$event
.
children
){
return
;
}
if
(
!
ifAlways
&&
(
!
$event
||
this
.
actualIsOpenEdit
))
{
return
;
}
if
(
this
.
stopRowClick
)
{
this
.
stopRowClick
=
false
;
return
;
}
if
(
this
.
isSingleSelect
){
this
.
selections
=
[];
}
// 已选中则删除,没选中则添加
let
selectIndex
=
this
.
selections
.
findIndex
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
ibizorder
,
$event
.
ibizorder
);
});
if
(
Object
.
is
(
selectIndex
,
-
1
)){
this
.
selections
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
$event
)));
}
else
{
this
.
selections
.
splice
(
selectIndex
,
1
);
}
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
multipleTable
)
{
if
(
this
.
isSingleSelect
){
refs
.
multipleTable
.
clearSelection
();
refs
.
multipleTable
.
setCurrentRow
(
$event
);
}
else
{
refs
.
multipleTable
.
toggleRowSelection
(
$event
);
}
}
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 页面变化
*
* @param {*} $event
* @returns {void}
* @memberof ProivateTableBase
*/
public
pageOnChange
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
if
(
$event
===
this
.
curPage
)
{
return
;
}
this
.
curPage
=
$event
;
this
.
load
({});
}
/**
* 分页条数变化
*
* @param {*} $event
* @returns {void}
* @memberof ProivateTableBase
*/
public
onPageSizeChange
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
if
(
$event
===
this
.
limit
)
{
return
;
}
this
.
limit
=
$event
;
if
(
this
.
curPage
===
1
)
{
this
.
load
({});
}
}
/**
* 分页刷新
*
* @memberof ProivateTableBase
*/
public
pageRefresh
():
void
{
this
.
load
({});
}
/**
* 排序变化
*
* @param {{ column: any, prop: any, order: any }} { column, prop, order }
* @memberof ProivateTableBase
*/
public
onSortChange
({
column
,
prop
,
order
}:
{
column
:
any
,
prop
:
any
,
order
:
any
}):
void
{
const
dir
=
Object
.
is
(
order
,
'ascending'
)
?
'asc'
:
Object
.
is
(
order
,
'descending'
)
?
'desc'
:
''
;
if
(
Object
.
is
(
dir
,
this
.
minorSortDir
)
&&
Object
.
is
(
this
.
minorSortPSDEF
,
prop
))
{
return
;
}
this
.
minorSortDir
=
dir
;
this
.
minorSortPSDEF
=
prop
?
prop
:
''
;
this
.
load
({});
}
/**
* 表格行选中样式
*
* @param {{ row: any, rowIndex: any }} { row, rowIndex }
* @returns {string}
* @memberof ProivateTableBase
*/
public
onRowClassName
({
row
,
rowIndex
}:
{
row
:
any
,
rowIndex
:
any
}):
string
{
const
index
=
this
.
selections
.
findIndex
((
select
:
any
)
=>
Object
.
is
(
select
.
srfkey
,
row
.
srfkey
));
return
index
!==
-
1
?
'grid-row-select'
:
''
;
}
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof ProivateTableBase
*/
public
uiAction
(
row
:
any
,
tag
:
any
,
$event
:
any
)
{
// this.rowClick(row, true);
this
.
cellClick
();
$event
.
stopPropagation
();
}
/**
* 设置列状态
*
* @memberof ProivateTableBase
*/
public
setColState
()
{
const
_data
:
any
=
localStorage
.
getItem
(
'ibizorder_proivatetable_grid'
);
if
(
_data
)
{
let
columns
=
JSON
.
parse
(
_data
);
columns
.
forEach
((
col
:
any
)
=>
{
let
column
=
this
.
allColumns
.
find
((
item
)
=>
Object
.
is
(
col
.
name
,
item
.
name
));
if
(
column
)
{
Object
.
assign
(
column
,
col
);
}
});
}
}
/**
* 列变化
*
* @memberof ProivateTableBase
*/
public
onColChange
()
{
localStorage
.
setItem
(
'ibizorder_proivatetable_grid'
,
JSON
.
stringify
(
this
.
allColumns
));
}
/**
* 获取列状态
*
* @param {string} name
* @returns {boolean}
* @memberof ProivateTableBase
*/
public
getColumnState
(
name
:
string
):
boolean
{
let
column
=
this
.
allColumns
.
find
((
col
:
any
)
=>
Object
.
is
(
name
,
col
.
name
)
);
return
column
.
show
?
true
:
false
;
}
/**
* 表格列是否自适应布局
*
* @readonly
* @type {boolean}
* @memberof ProivateTableBase
*/
get
adaptiveState
():
boolean
{
return
!
this
.
allColumns
.
find
((
column
:
any
)
=>
column
.
show
&&
Object
.
is
(
column
.
unit
,
'STAR'
));
}
/**
* 保存
*
* @param {*} $event
* @returns {Promise<any>}
* @memberof ProivateTableBase
*/
public
async
save
(
args
:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
){
let
_this
=
this
;
// 拷贝模式
if
(
_this
.
viewparams
&&
_this
.
viewparams
.
copymode
&&
Object
.
is
(
_this
.
viewparams
.
copymode
,
'true'
)
&&
_this
.
items
&&
_this
.
items
.
length
>
0
)
{
for
(
const
item
of
_this
.
items
)
{
item
.
rowDataState
=
'create'
;
}
}
if
(
_this
.
items
&&
_this
.
items
.
length
>
0
)
{
for
(
const
item
of
_this
.
items
)
{
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
))
{
_this
.
updateDefault
(
item
);
}
}
}
if
(
!
await
this
.
validateAll
())
{
if
(
this
.
errorMessages
&&
this
.
errorMessages
.
length
>
0
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
this
.
errorMessages
[
0
]
});
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.rulesException'
)
as
string
)
});
}
return
[];
}
let
successItems
:
any
=
[];
let
errorItems
:
any
=
[];
let
errorMessage
:
any
=
[];
if
(
!
(
await
this
.
handleCtrlEvents
(
'onbeforesave'
,
{
data
:
_this
.
items
})))
{
return
;
}
for
(
const
item
of
_this
.
items
)
{
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
))
{
if
(
!
this
.
createAction
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderProivatePluginGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.createAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,
{
viewparams
:
this
.
viewparams
});
const
tempContext
=
Util
.
deepCopy
(
this
.
context
);
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
tempContext
,
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderProivatePluginGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,
{
viewparams
:
this
.
viewparams
});
const
tempContext
=
Util
.
deepCopy
(
this
.
context
);
if
(
item
.
ibizorder
){
Object
.
assign
(
tempContext
,
{
ibizorder
:
item
.
ibizorder
});
}
let
response
=
await
this
.
service
.
update
(
this
.
updateAction
,
tempContext
,
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
}
catch
(
error
)
{
errorItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
item
)));
errorMessage
.
push
(
error
);
}
}
this
.
$emit
(
'save'
,
successItems
);
this
.
refresh
([]);
if
(
errorItems
.
length
===
0
&&
successItems
.
length
>
0
){
if
(
!
(
await
this
.
handleCtrlEvents
(
'onsavesuccess'
,
{
data
:
successItems
})))
{
return
;
}
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
if
(
!
(
await
this
.
handleCtrlEvents
(
'onsaveerror'
,
{
data
:
errorItems
})))
{
return
;
}
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
if
(
errorMessage
[
index
]
&&
errorMessage
[
index
].
data
)
{
if
(
Object
.
is
(
errorMessage
[
index
].
data
.
errorKey
,
'DupCheck'
))
{
let
errorProp
:
string
=
errorMessage
[
index
].
data
.
message
.
match
(
/
\[[
a-zA-Z
]
*
\]
/
)[
0
];
let
name
:
string
=
errorProp
?
this
.
service
.
getNameByProp
(
errorProp
.
substr
(
1
,
errorProp
.
length
-
2
))
:
''
;
if
(
name
)
{
let
desc
:
any
=
this
.
allColumns
.
find
((
column
:
any
)
=>
{
return
Object
.
is
(
column
.
name
,
name
);
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
(
desc
?
desc
.
label
:
''
)
+
" : "
+
item
[
name
]
+
(
this
.
$t
(
'app.commonWords.isExist'
)
as
string
)
+
'!'
,
});
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
?
errorMessage
[
index
].
data
.
message
:(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
),
});
}
}
else
if
(
Object
.
is
(
errorMessage
[
index
].
data
.
errorKey
,
'DuplicateKeyException'
)){
let
name
:
string
=
this
.
service
.
getNameByProp
(
"ibizorderid"
);
if
(
name
){
let
desc
:
any
=
this
.
allColumns
.
find
((
column
:
any
)
=>
{
return
Object
.
is
(
column
.
name
,
name
);
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
(
desc
?
desc
.
label
:
''
)
+
" : "
+
item
[
name
]
+
(
this
.
$t
(
'app.commonWords.isExist'
)
as
string
)
+
'!'
,
});
}
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
?
errorMessage
[
index
].
data
.
message
:(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
),
});
}
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
),
desc
:
(
item
[
this
.
majorInfoColName
]?
item
[
this
.
majorInfoColName
]:
""
)
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
}
});
}
return
successItems
;
}
/**
* 新建行
*
* @param {*} $event
* @returns {void}
* @memberof ProivateTableBase
*/
public
async
newRow
(
args
:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
):
Promise
<
any
>
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderProivatePluginGridView'
+
(
this
.
$t
(
'app.gridpage.notConfig.loaddraftAction'
)
as
string
)
});
return
;
}
let
_this
=
this
;
Object
.
assign
(
args
[
0
],
{
viewparams
:
Util
.
deepCopy
(
this
.
viewparams
)
});
try
{
// 加载草稿之前
if
(
!
(
await
this
.
handleCtrlEvents
(
'onbeforeloaddraft'
,
{
data
:
args
[
0
]
})))
{
return
;
}
const
response
=
await
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
Util
.
deepCopy
(
this
.
context
),
args
[
0
],
this
.
showBusyIndicator
);
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
// 加载草稿失败
if
(
!
(
await
this
.
handleCtrlEvents
(
'onloaddrafterror'
,
{
data
:
response
.
data
?
response
.
data
:
{}
})))
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
response
;
}
// 加载草稿成功
if
(
!
(
await
this
.
handleCtrlEvents
(
'onloaddraftsuccess'
,
{
data
:
response
.
data
})))
{
return
;
}
const
data
=
response
.
data
;
this
.
createDefault
(
data
);
data
.
rowDataState
=
"create"
;
this
.
items
.
splice
(
0
,
0
,
data
);
_this
.
gridItemsModel
.
push
(
_this
.
getGridRowModel
());
return
response
;
}
catch
(
response
:
any
)
{
// 加载草稿失败
if
(
!
(
await
this
.
handleCtrlEvents
(
'onloaddrafterror'
,
{
data
:
response
.
data
?
response
.
data
:
{}
})))
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
response
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
return
;
}
}
}
/**
* 表格编辑项值变更
*
* @param row 行数据
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof ProivateTableBase
*/
public
onGridItemValueChange
(
row
:
any
,
$event
:
{
name
:
string
,
value
:
any
},
rowIndex
:
number
):
void
{
if
(
!
$event
)
{
return
;
}
if
(
!
$event
.
name
||
Object
.
is
(
$event
.
name
,
''
)
||
!
row
.
hasOwnProperty
(
$event
.
name
))
{
return
;
}
row
[
$event
.
name
]
=
$event
.
value
;
this
.
gridEditItemChange
(
row
,
$event
.
name
,
$event
.
value
,
rowIndex
);
}
/**
* 表格编辑项值变化
*
* @public
* @param row 行数据
* @param property 列编辑项名
* @param row 列编辑项值
* @returns {void}
* @memberof ProivateTableBase
*/
public
gridEditItemChange
(
row
:
any
,
property
:
string
,
value
:
any
,
rowIndex
:
number
){
row
.
rowDataState
=
row
.
rowDataState
?
row
.
rowDataState
:
"update"
;
if
(
Object
.
is
(
row
.
rowDataState
,
"update"
)){
if
(
this
.
defaultUpdateItems
.
includes
(
property
)){
row
.
hasUpdated
=
true
;
}
}
this
.
curEditRowData
=
row
;
this
.
resetGridData
(
row
,
property
,
rowIndex
);
this
.
validate
(
property
,
row
,
rowIndex
);
}
/**
* 表格编辑项更新
*
* @param {string} mode 界面行为名称
* @param {*} [data={}] 请求数据
* @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态
* @returns {void}
* @memberof ProivateTableBase
*/
public
updateGridEditItem
(
mode
:
string
,
data
:
any
=
{},
updateDetails
:
string
[],
showloading
?:
boolean
):
void
{
if
(
!
mode
||
(
mode
&&
Object
.
is
(
mode
,
''
)))
{
return
;
}
let
tempContext
:
any
=
this
.
$util
.
deepCopy
(
this
.
context
);
Object
.
is
(
tempContext
,
{
ibizorder
:
data
.
ibizorderid
});
const
arg
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
frontLogic
(
mode
,
JSON
.
parse
(
JSON
.
stringify
(
tempContext
)),
arg
,
showloading
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.gridpage.formitemFailed'
)
as
string
)
});
return
;
}
const
_data
:
any
=
response
.
data
;
if
(
!
_data
){
return
;
}
updateDetails
.
forEach
((
name
:
string
)
=>
{
if
(
!
_data
.
hasOwnProperty
(
name
))
{
return
;
}
data
[
name
]
=
_data
[
name
];
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
return
;
}
});
}
/**
* 获取对应行class
*
* @param {*} $args row 行数据,rowIndex 行索引
* @returns {void}
* @memberof ProivateTableBase
*/
public
getRowClassName
(
args
:{
row
:
any
,
rowIndex
:
number
}){
let
isSelected
=
this
.
selections
.
some
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
ibizorder
,
args
.
row
.
ibizorder
);
});
return
isSelected
?
"grid-selected-row"
:
""
;
}
/**
* 获取对应单元格class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,columnIndex 列索引
* @returns {void}
* @memberof ProivateTableBase
*/
public
getCellClassName
(
args
:{
row
:
any
,
column
:
any
,
rowIndex
:
number
,
columnIndex
:
number
}){
let
className
:
string
=
''
;
if
(
args
.
column
.
property
){
let
col
=
this
.
allColumns
.
find
((
item
:
any
)
=>
{
return
Object
.
is
(
args
.
column
.
property
,
item
.
name
);
})
if
(
col
!==
undefined
){
if
(
col
.
isEnableRowEdit
&&
this
.
actualIsOpenEdit
){
className
+=
'edit-cell '
;
}
}
else
{
className
+=
'info-cell'
;
}
}
if
(
this
.
groupAppField
&&
args
.
columnIndex
===
0
&&
!
this
.
isSingleSelect
)
{
if
(
args
.
row
.
children
&&
args
.
row
.
children
.
length
>
0
)
{
className
+=
this
.
computeGroupRow
(
args
.
row
.
children
,
args
.
row
);
}
}
return
className
;
}
/**
* 计算分组行checkbox选中样式
*
* @param {*} rows 当前分组行下的所有数据
* @returns {*} currentRow 当前分组行
* @memberof ProivateTableBase
*/
public
computeGroupRow
(
rows
:
any
[],
currentRow
:
any
)
{
let
count
:
number
=
0
;
this
.
selections
.
forEach
((
select
:
any
)
=>
{
rows
.
forEach
((
row
:
any
)
=>
{
if
(
row
.
groupById
===
select
.
groupById
)
{
count
++
;
}
})
})
if
(
count
===
rows
.
length
)
{
(
this
.
$refs
.
multipleTable
as
any
).
toggleRowSelection
(
currentRow
,
true
);
return
'cell-select-all '
;
}
else
if
(
count
!==
0
&&
count
<
rows
.
length
)
{
return
'cell-indeterminate '
}
else
if
(
count
===
0
)
{
(
this
.
$refs
.
multipleTable
as
any
).
toggleRowSelection
(
currentRow
,
false
);
return
''
;
}
}
/**
* 新建默认值
* @param {*} row 行数据
* @memberof ProivateTableBase
*/
public
createDefault
(
row
:
any
){
}
/**
* 更新默认值
* @param {*} row 行数据
* @memberof ProivateTableBase
*/
public
updateDefault
(
row
:
any
){
}
/**
* 计算数据对象类型的默认值
* @param {string} action 行为
* @param {string} param 默认值参数
* @param {*} data 当前行数据
* @memberof ProivateTableBase
*/
public
computeDefaultValueWithParam
(
action
:
string
,
param
:
string
,
data
:
any
){
if
(
Object
.
is
(
action
,
"UPDATE"
)){
const
nativeData
:
any
=
this
.
service
.
getCopynativeData
();
if
(
nativeData
&&
(
nativeData
instanceof
Array
)
&&
nativeData
.
length
>
0
){
let
targetData
:
any
=
nativeData
.
find
((
item
:
any
)
=>
{
return
item
.
ibizorderid
===
data
.
srfkey
;
})
if
(
targetData
){
return
targetData
[
param
]?
targetData
[
param
]:
null
;
}
else
{
return
null
;
}
}
else
{
return
null
;
}
}
else
{
return
this
.
service
.
getRemoteCopyData
()[
param
]?
this
.
service
.
getRemoteCopyData
()[
param
]:
null
;
}
}
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof ProivateTableBase
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
(),
op
:
string
=
"AND"
,
value
:
any
)
:{
isPast
:
boolean
}{
let
falg
:
any
=
{};
if
(
!
rule
||
!
rule
[
name
]){
return
falg
;
}
let
opValue
=
op
==
'AND'
?
true
:
false
;
let
startOp
=
(
val
:
boolean
)
=>
{
if
(
falg
.
isPast
){
if
(
opValue
){
falg
.
isPast
=
falg
.
isPast
&&
val
;
}
else
{
falg
.
isPast
=
falg
.
isPast
||
val
;
}
}
else
{
falg
.
isPast
=
val
;
}
}
for
(
let
i
=
0
;
i
<
rule
[
name
].
length
;
i
++
)
{
let
item
:
any
=
rule
[
name
][
i
];
if
((
value
===
null
||
value
===
undefined
||
value
===
""
)
&&
(
item
.
type
!=
'GROUP'
)){
startOp
(
true
);
return
falg
;
}
try
{
// 常规规则
if
(
item
.
type
==
'SIMPLE'
){
startOp
(
!
this
.
$verify
.
checkFieldSimpleRule
(
value
,
item
.
condOP
,
item
.
paramValue
,
item
.
ruleInfo
,
item
.
paramType
,
this
.
curEditRowData
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 数值范围
if
(
item
.
type
==
'VALUERANGE2'
){
startOp
(
!
this
.
$verify
.
checkFieldValueRangeRule
(
value
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 正则式
if
(
item
.
type
==
"REGEX"
)
{
startOp
(
!
this
.
$verify
.
checkFieldRegExRule
(
value
,
item
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 长度
if
(
item
.
type
==
"STRINGLENGTH"
)
{
startOp
(
!
this
.
$verify
.
checkFieldStringLengthRule
(
value
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 系统值规则
if
(
item
.
type
==
"SYSVALUERULE"
)
{
startOp
(
!
this
.
$verify
.
checkFieldSysValueRule
(
value
,
item
.
sysRule
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
}
catch
(
error
)
{
falg
.
infoMessage
=
item
.
ruleInfo
;
startOp
(
false
);
if
(
!
falg
.
isPast
)
return
falg
;
}
// 分组
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
,
item
.
condOP
?
item
.
condOP
:
"AND"
,
value
)
if
(
item
.
isNotMode
){
falg
.
isPast
=
!
falg
.
isPast
;
}
}
};
if
(
!
falg
.
hasOwnProperty
(
"isPast"
)){
falg
.
isPast
=
true
;
}
if
(
!
value
&&
value
!=
0
){
falg
.
isPast
=
true
;
}
return
falg
;
}
/**
* 工作流提交
*
* @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>}
* @memberof ProivateTableBase
*/
public
async
submitbatch
(
data
:
any
,
localdata
:
any
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_this
:
any
=
this
;
const
arg
:
any
=
data
;
const
result
:
Promise
<
any
>
=
this
.
service
.
submitbatch
(
_this
.
WFSubmitAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
localdata
,
this
.
showBusyIndicator
);
result
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
){
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.formpage.workflow.submiterror'
)
as
string
)
+
', '
+
response
.
data
.
message
});
}
return
;
}
this
.
$Notice
.
info
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.formpage.workflow.submitsuccess'
)
as
string
)
});
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
reject
(
response
);
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
reject
(
response
);
return
;
}
reject
(
response
);
});
})
}
/**
* 获取表格列禁用状态
*
* @memberof ProivateTableBase
*/
public
getColumnDisabled
(
data
:
any
,
name
:
string
){
if
(
this
.
allColumns
||
Array
.
isArray
(
this
.
allColumns
)){
const
curColumn
:
any
=
this
.
allColumns
.
find
((
item
:
any
)
=>
{
return
item
.
name
===
name
;
})
if
(
curColumn
.
hasOwnProperty
(
'enableCond'
)){
return
data
.
srfuf
==
1
?
(
curColumn
.
enableCond
&
2
)
!==
2
:
(
curColumn
.
enableCond
&
1
)
!==
1
}
else
{
return
false
;
}
}
}
/**
* 重置表格项值
*
* @param {*} row 当前行
* @param {string} property 属性名
* @param {number} rowIndex 行下标
* @memberof ProivateTableBase
*/
public
resetGridData
(
row
:
any
,
property
:
string
,
rowIndex
:
number
)
{
if
(
this
.
actualIsOpenEdit
)
{
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './proivate-table-grid.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/ibizorder/proivate-table-grid/proivate-table-grid-model.ts
0 → 100644
浏览文件 @
c4d78415
// 基于 @CONTROL/表格/MODEL.ts.ftl 生成
/**
* ProivateTable 部件模型
*
* @export
* @class ProivateTableModel
*/
export
default
class
ProivateTableModel
{
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof ProivateTableGridMode
*/
public
isDEExport
:
boolean
=
false
;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ProivateTableGridMode
*/
public
getDataItems
():
any
[]
{
if
(
this
.
isDEExport
){
return
[
]
}
else
{
return
[
{
name
:
'ibizorderid'
,
prop
:
'ibizorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'ibizcustomername'
,
prop
:
'ibizcustomername'
,
dataType
:
'PICKUPTEXT'
,
},
{
name
:
'srfkey'
,
prop
:
'ibizorderid'
,
dataType
:
'GUID'
,
isEditable
:
true
},
{
name
:
'srfdataaccaction'
,
prop
:
'ibizorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'ibizcustomerid'
,
prop
:
'ibizcustomerid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'srfmajortext'
,
prop
:
'ibizordername'
,
dataType
:
'TEXT'
,
},
{
name
:
'wfstep'
,
prop
:
'wfstep'
,
dataType
:
'SSCODELIST'
,
},
{
name
:
'orderstate'
,
prop
:
'orderstate'
,
dataType
:
'SSCODELIST'
,
},
{
name
:
'srfmstag'
,
},
{
name
:
'ibizorder'
,
prop
:
'ibizorderid'
,
},
{
name
:
'n_ibizordername_like'
,
prop
:
'n_ibizordername_like'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'size'
,
prop
:
'size'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'query'
,
prop
:
'query'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'filter'
,
prop
:
'filter'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'page'
,
prop
:
'page'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'sort'
,
prop
:
'sort'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'srfparentdata'
,
prop
:
'srfparentdata'
,
dataType
:
'QUERYPARAM'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
// 预置工作流数据字段
{
name
:
'srfprocessdefinitionkey'
,
prop
:
'srfprocessdefinitionkey'
,
dataType
:
'TEXT'
},
{
name
:
'srftaskdefinitionkey'
,
prop
:
'srftaskdefinitionkey'
,
dataType
:
'TEXT'
},
{
name
:
'srftaskid'
,
prop
:
'srftaskid'
,
dataType
:
'TEXT'
}
]
}
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/proivate-table-grid/proivate-table-grid-service.ts
0 → 100644
浏览文件 @
c4d78415
// 基于 @CONTROL/表格/SERVICE.ts.ftl 生成
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
ProivateTableModel
from
'./proivate-table-grid-model'
;
/**
* ProivateTable 部件服务对象
*
* @export
* @class ProivateTableService
*/
export
default
class
ProivateTableService
extends
ControlService
{
/**
* 订单服务对象
*
* @type {IBIZOrderService}
* @memberof ProivateTableService
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
();
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ProivateTableService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of ProivateTableService.
*
* @param {*} [opts={}]
* @memberof ProivateTableService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
ProivateTableModel
();
}
/**
* 备份原生数据
*
* @type {*}
* @memberof ProivateTableService
*/
private
copynativeData
:
any
;
/**
* 远端数据
*
* @type {*}
* @memberof ProivateTableService
*/
private
remoteCopyData
:
any
=
{};
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof ProivateTableService
*/
public
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 ProivateTableService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
data
.
page
=
data
.
page
?
data
.
page
:
0
;
data
.
size
=
data
.
size
?
data
.
size
:
1000
;
return
Promise
.
reject
([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProivateTableService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestDataWithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_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 ProivateTableService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_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 ProivateTableService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestDataWithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_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 ProivateTableService
*/
@
Errorlog
public
get
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
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
)
=>
{
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
}
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProivateTableService
*/
@
Errorlog
public
search
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
FetchDefault
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
setCopynativeData
(
response
.
data
);
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProivateTableService
*/
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
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
)
=>
{
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
//仿真主键数据
response
.
data
.
ibizorderid
=
Util
.
createUUID
();
}
this
.
setRemoteCopyData
(
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 ProivateTableService
*/
@
Errorlog
public
frontLogic
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
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
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof ProivateTableService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
data
.
hasOwnProperty
(
item
.
name
)){
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
};
}
/**
* 处理工作流数据
*
* @param data 传入数据
* @memberof ProivateTableService
*/
public
handleWFData
(
data
:
any
,
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
prop
){
if
(
item
.
dataType
){
if
(
!
Object
.
is
(
item
.
dataType
,
'QUERYPARAM'
)){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
else
{
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
if
(
isMerge
&&
(
data
.
viewparams
&&
Object
.
keys
(
data
.
viewparams
).
length
>
0
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
// 删除前端srffrontuf标识
if
(
requestData
.
hasOwnProperty
(
'srffrontuf'
)){
delete
requestData
.
srffrontuf
;
}
//补充工作流所需主键
requestData
.
srfkey
=
data
.
ibizorder
;
//补充全量数据
requestData
=
this
.
fillNativeData
(
requestData
);
return
requestData
;
}
/**
* 补充全量数据
*
* @param {*} [data]
* @memberof ProivateTableService
*/
public
fillNativeData
(
data
:
any
){
if
(
this
.
copynativeData
&&
this
.
copynativeData
.
length
>
0
){
let
targetData
:
any
=
this
.
copynativeData
.
find
((
item
:
any
)
=>
{
return
item
.
ibizorderid
===
data
.
srfkey
;
})
data
=
Object
.
assign
(
targetData
,
data
);
return
data
;
}
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof ProivateTableService
*/
@
Errorlog
public
submitbatch
(
action
:
string
,
context
:
any
=
{},
data
:
any
,
localdata
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
[];
if
(
data
&&
data
.
length
>
0
){
data
.
forEach
((
item
:
any
)
=>
{
let
data
:
any
=
this
.
handleWFData
(
item
,
true
);
tempData
.
push
(
data
);
});
}
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
,
tempData
,
localdata
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
wfSubmitBatch
(
context
,
tempData
,
localdata
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 设置远端数据
*
* @param result 远端请求结果
* @memberof ProivateTableService
*/
public
setRemoteCopyData
(
result
:
any
){
if
(
result
&&
result
.
status
===
200
)
{
this
.
remoteCopyData
=
Util
.
deepCopy
(
result
.
data
);
}
}
/**
* 获取远端数据
*
* @memberof ProivateTableService
*/
public
getRemoteCopyData
(){
return
this
.
remoteCopyData
;
}
/**
* 设置备份原生数据
*
* @param data 远端请求结果
* @memberof ProivateTableService
*/
public
setCopynativeData
(
data
:
any
){
this
.
copynativeData
=
Util
.
deepCopy
(
data
);
}
/**
* 获取备份原生数据
*
* @memberof ProivateTableService
*/
public
getCopynativeData
(){
return
this
.
copynativeData
;
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/proivate-table-grid/proivate-table-grid.less
0 → 100644
浏览文件 @
c4d78415
// 基于 @CONTROL/表格/CONTROL.less.ftl 生成
.grid {
flex-grow: 1;
height: 100%;
overflow: auto;
.el-table__body-wrapper::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px !important;
}
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/*滚动条颜色*/
border-radius : 10px !important;
background-color: #cecece !important;
}
.el-table__body-wrapper::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background : #ededed !important;
border-radius: 10px !important;
}
/*表格文字过长省略*/
.el-table th>.cell, .el-table td>.cell{
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
.el-table-column--selection .cell {
padding-left: 0px;
padding-right: 0px;
}
.app-column-link, .app-format-data{
display: inline;
}
.el-table {
height: 100%;
display:flex;
flex-direction: column;
justify-content: flex-start;
.el-table__row{
.grid-uiaction-divider {
padding:0 10px 0 10px;
border-left: 1px #b3b3b3 solid;
}
.grid-first-uiaction {
padding:0 10px 0 10px;
}
}
.quick-toolbar{
display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
}
.el-tooltip{
.ivu-form-item{
margin-bottom: unset !important;
}
}
.el-table__body .edit-cell{
padding:0;
.app-form-item{
margin-top: 20px;
margin-bottom: 20px;
}
}
.el-table__header-wrapper{
min-height: 45px;
max-height: 100px;
height: auto;
}
.el-table__footer-wrapper{
min-height: 45px;
max-height: 100px;
height: auto;
}
}
.grid-pagination {
height: 50px;
padding: 6px 0px;
.page-button {
button {
padding: 0;
font-size: 16px;
min-width: 32px;
height: 32px;
margin-right: 4px;
}
}
.page-column {
position: absolute;
left: 0;
}
.batch-toolbar{
position: absolute;
left: 105px;
>.toolbar-container{
button {
font-size: 16px;
min-width: 32px;
height: 32px;
margin-right: 4px;
margin-top: 0;
margin-bottom: 0;
}
}
}
}
}
.ivu-modal-content{
.footer{
.ivu-row{
text-align: right;
}
}
}
.cell-indeterminate {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:before {
content: "";
position: absolute;
display: block;
background-color: #fff;
height: 2px;
transform: scale(.5);
left: 0;
right: 0;
top: 5px;
}
}
>span.is-checked {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
border: 0px;
}
}
}
}
.cell-select-all {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
box-sizing: content-box;
content: "";
border: 1px solid #fff;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
position: absolute;
top: 1px;
transform: rotate(45deg) scaleY(1);
width: 3px;
transition: transform .15s ease-in .05s;
transform-origin: center;
}
}
}
}
// this is less
app_Web/src/widgets/ibizorder/proivate-table-grid/proivate-table-grid.vue
0 → 100644
浏览文件 @
c4d78415
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
ProivateTableBase
from
'./proivate-table-grid-base.vue'
;
// 基于 @CONTROL/表格/CONTROL.vue.ftl 生成
@
Component
({
components
:
{
}
})
export
default
class
ProivateTable
extends
ProivateTableBase
{
}
</
script
>
\ No newline at end of file
demo-boot/src/main/resources/static/remotemodel/PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSGRIDS/ProivateTable.json
0 → 100644
浏览文件 @
c4d78415
{
"aggMode"
:
"NONE"
,
"codeName"
:
"ProivateTable"
,
"columnEnableLink"
:
2
,
"controlType"
:
"GRID"
,
"dynaModelFilePath"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSGRIDS/ProivateTable.json"
,
"getFetchPSControlAction"
:
{
"modelref"
:
true
,
"id"
:
"fetch"
},
"groupMode"
:
"NONE"
,
"hookEventNames"
:
[
"ROWDBLCLICK"
,
"SELECTIONCHANGE"
,
"REMOVE"
,
"LOAD"
,
"BEFORELOAD"
],
"logicName"
:
"透视表"
,
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
},
"getPSControlLogics"
:
[
{
"eventNames"
:
"ROWDBLCLICK;SELECTIONCHANGE;REMOVE;LOAD;BEFORELOAD"
,
"logicTag"
:
"grid"
,
"logicType"
:
"APPVIEWENGINE"
,
"name"
:
"engine_grid"
,
"getPSAppViewEngine"
:
{
"modelref"
:
true
,
"id"
:
"engine"
}
}
],
"getPSDEDataImport"
:
{
"modelref"
:
true
,
"id"
:
"Import"
},
"getPSDEGridColumns"
:
[
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"NONE"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.IBIZORDERID"
},
"caption"
:
"订单标识"
,
"codeName"
:
"ibizorderid"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"ibizorderid"
,
"excelCaption"
:
"订单标识"
,
"name"
:
"ibizorderid"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERID"
,
"codeName"
:
"IBIZOrderId"
},
"width"
:
100
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
},
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"NONE"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.IBIZORDER.IBIZCUSTOMERNAME"
},
"caption"
:
"客户名称"
,
"codeName"
:
"ibizcustomername"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"ibizcustomername"
,
"excelCaption"
:
"客户名称"
,
"name"
:
"ibizcustomername"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"IBIZCUSTOMERNAME"
,
"codeName"
:
"IBIZCustomerName"
},
"width"
:
100
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
}
],
"getPSDEGridDataItems"
:
[
{
"dataType"
:
25
,
"name"
:
"ibizorderid"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERID"
,
"codeName"
:
"IBIZOrderId"
}
},
{
"dataType"
:
25
,
"name"
:
"ibizcustomername"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZCUSTOMERNAME"
,
"codeName"
:
"IBIZCustomerName"
}
},
{
"dataType"
:
25
,
"name"
:
"srfkey"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERID"
,
"codeName"
:
"IBIZOrderId"
}
},
{
"dataType"
:
25
,
"name"
:
"srfdataaccaction"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERID"
,
"codeName"
:
"IBIZOrderId"
},
"dataAccessAction"
:
true
},
{
"dataType"
:
25
,
"name"
:
"ibizcustomerid"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZCUSTOMERID"
,
"codeName"
:
"IBIZCustomerId"
}
},
{
"dataType"
:
25
,
"name"
:
"srfmajortext"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERNAME"
,
"codeName"
:
"IBIZOrderName"
}
},
{
"dataType"
:
25
,
"name"
:
"wfstep"
,
"getPSAppDEField"
:
{
"name"
:
"WFSTEP"
,
"codeName"
:
"WFStep"
}
},
{
"dataType"
:
25
,
"name"
:
"orderstate"
,
"getPSAppDEField"
:
{
"name"
:
"ORDERSTATE"
,
"codeName"
:
"OrderState"
}
},
{
"dataType"
:
25
,
"name"
:
"srfmstag"
}
],
"getPSDEGridEditItems"
:
[
{
"caption"
:
"订单标识"
,
"codeName"
:
"srfkey"
,
"enableCond"
:
3
,
"ignoreInput"
:
0
,
"name"
:
"srfkey"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERID"
,
"codeName"
:
"IBIZOrderId"
},
"getPSEditor"
:
{
"editorType"
:
"HIDDEN"
,
"name"
:
"srfkey"
},
"allowEmpty"
:
true
}
],
"pagingSize"
:
20
,
"getRemovePSControlAction"
:
{
"actionName"
:
"Remove"
,
"actionType"
:
"DEACTION"
,
"dataAccessAction"
:
"DELETE"
,
"name"
:
"remove"
,
"getPSAppDEMethod"
:
{
"modelref"
:
true
,
"id"
:
"Remove"
},
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
}
},
"sortMode"
:
"REMOTE"
,
"hasWFDataItems"
:
false
,
"enableColFilter"
:
false
,
"enableCustomized"
:
true
,
"enableGroup"
:
false
,
"enablePagingBar"
:
true
,
"enableRowEdit"
:
false
,
"enableRowEditOrder"
:
false
,
"enableRowNew"
:
false
,
"forceFit"
:
false
,
"hideHeader"
:
false
,
"noSort"
:
false
,
"singleSelect"
:
false
,
"modelid"
:
"69EE97FF-C400-40BC-BFEC-A64E6A41F665"
,
"modeltype"
:
"PSDEGRID"
}
\ No newline at end of file
demo-boot/src/main/resources/static/remotemodel/PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZOrderProivatePluginGridView.json
浏览文件 @
c4d78415
...
...
@@ -887,42 +887,150 @@
}
],
"modelid"
:
"41ec2a0b8e2256c9eee112003a6acd60"
,
"modeltype"
:
"PSDETOOLBAR"
},
{
"codeName"
:
"Default"
,
"controlType"
:
"SEARCHFORM"
,
"dynaModelFilePath"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSSEARCHFORMS/Default.json"
,
"hookEventNames"
:
[
"SEARCH"
,
"LOAD"
,
"SAVE"
],
"logicName"
:
"默认搜索表单"
,
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
},
"getPSControlHandler"
:
{
"getPSHandlerActions"
:
[
{
"actionType"
:
"FILTERACTION"
,
"name"
:
"load"
,
"getPSAppDEMethod"
:
{
"modelref"
:
true
,
"id"
:
"FilterGet"
},
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
}
},
{
"actionType"
:
"FILTERACTION"
,
"name"
:
"loaddraft"
,
"getPSAppDEMethod"
:
{
"modelref"
:
true
,
"id"
:
"FilterGetDraft"
},
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
}
},
{
"actionType"
:
"FILTERACTION"
,
"name"
:
"search"
,
"getPSAppDEMethod"
:
{
"modelref"
:
true
,
"id"
:
"FilterSearch"
},
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
}
}
],
"enableDEFieldPrivilege"
:
false
,
"id"
:
"搜索表单处理器"
},
"getPSControlLogics"
:
[
{
"eventNames"
:
"SEARCH;LOAD;SAVE"
,
"logicTag"
:
"searchform"
,
"logicType"
:
"APPVIEWENGINE"
,
"name"
:
"engine_searchform"
,
"getPSAppViewEngine"
:
{
"modelref"
:
true
,
"id"
:
"engine"
}
}
],
"getPSControlParam"
:
{
"autoLoad"
:
true
,
"showBusyIndicator"
:
true
,
"id"
:
"SEARCHFORM"
},
"getPSDEFormItems"
:
[
{
"id"
:
"n_ibizordername_like"
,
"dataType"
:
25
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERNAME"
,
"codeName"
:
"IBIZOrderName"
}
}
],
"getPSDEFormPages"
:
[
{
"caption"
:
"订单名称"
,
"codeName"
:
"formpage1"
,
"detailStyle"
:
"DEFAULT"
,
"detailType"
:
"FORMPAGE"
,
"name"
:
"formpage1"
,
"getPSDEFormDetails"
:
[
{
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"CONTROL.DEFSFITEM.IBIZORDER.N_IBIZORDERNAME_LIKE"
},
"caption"
:
"订单名称(%)"
,
"codeName"
:
"n_ibizordername_like"
,
"dataType"
:
25
,
"detailStyle"
:
"DEFAULT"
,
"detailType"
:
"FORMITEM"
,
"enableCond"
:
3
,
"ignoreInput"
:
0
,
"labelPos"
:
"LEFT"
,
"labelWidth"
:
130
,
"name"
:
"n_ibizordername_like"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERNAME"
,
"codeName"
:
"IBIZOrderName"
},
"getPSEditor"
:
{
"editorType"
:
"TEXTBOX"
,
"editorWidth"
:
100.0
,
"name"
:
"n_ibizordername_like"
},
"getPSLayoutPos"
:
{
"colMD"
:
24
,
"layout"
:
"TABLE_24COL"
},
"allowEmpty"
:
true
,
"showCaption"
:
true
}
],
"getPSLayout"
:
{
"columnCount"
:
24
,
"layout"
:
"TABLE_24COL"
},
"infoGroupMode"
:
false
}
],
"getPSLayout"
:
{
"columnCount"
:
24
,
"layout"
:
"TABLE_24COL"
},
"searchButtonStyle"
:
"DEFAULT"
,
"tabHeaderPos"
:
"TOP"
,
"enableAdvanceSearch"
:
false
,
"enableAutoSearch"
:
false
,
"enableFilterSave"
:
false
,
"noTabHeader"
:
true
,
"name"
:
"searchform"
,
"modelid"
:
"1b5557a48588cf3b6a07b7bd6acedd53"
,
"modeltype"
:
"PSDEFORM_SEARCHFORM"
},
{
"aggMode"
:
"NONE"
,
"codeName"
:
"
Main
"
,
"codeName"
:
"
ProivateTable
"
,
"columnEnableLink"
:
2
,
"controlStyle"
:
"PivotTable"
,
"controlType"
:
"GRID"
,
"dynaModelFilePath"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSGRIDS/
Main
.json"
,
"dynaModelFilePath"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSGRIDS/
ProivateTable
.json"
,
"getFetchPSControlAction"
:
{
"modelref"
:
true
,
"id"
:
"fetch"
},
"groupMode"
:
"NONE"
,
"hookEventNames"
:
[
"ROWDBLCLICK"
,
"SELECTIONCHANGE"
,
"REMOVE"
,
"LOAD"
,
"BEFORELOAD"
],
"logicName"
:
"
主表格
"
,
"logicName"
:
"
透视表
"
,
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
},
"getPSAppViewLogics"
:
[
{
"logicTrigger"
:
"CUSTOM"
,
"logicType"
:
"APPVIEWUIACTION"
,
"name"
:
"grid_updatedate_click"
,
"getPSAppViewUIAction"
:
{
"modelref"
:
true
,
"id"
:
"表格界面_编辑操作"
}
}
],
"getPSAppViewUIActions"
:
[
{
"name"
:
"表格界面_编辑操作"
,
"getPSUIAction"
:
{
"modelref"
:
true
,
"id"
:
"Edit"
},
"uIActionTarget"
:
"SINGLEKEY"
,
"xDataControlName"
:
"grid"
}
],
"getPSControlHandler"
:
{
"getPSHandlerActions"
:
[
{
"actionName"
:
"Get"
,
...
...
@@ -1028,232 +1136,56 @@
"align"
:
"LEFT"
,
"cLConvertMode"
:
"NONE"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.
ORDERU
ID"
"lanResTag"
:
"DEF.LNAME.
IBIZORDER
ID"
},
"caption"
:
"订单编号"
,
"codeName"
:
"orderuid"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"orderuid"
,
"excelCaption"
:
"订单编号"
,
"name"
:
"orderuid"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"ORDERUID"
,
"codeName"
:
"OrderUID"
},
"width"
:
150
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
},
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"NONE"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.IBIZORDERNAME"
},
"caption"
:
"订单名称"
,
"codeName"
:
"IBIZordername"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"ibizordername"
,
"excelCaption"
:
"订单名称"
,
"name"
:
"IBIZordername"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERNAME"
,
"codeName"
:
"IBIZOrderName"
},
"width"
:
150
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
},
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"FRONT"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.ORDERSTATE"
},
"caption"
:
"订单状态"
,
"codeName"
:
"orderstate"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"orderstate"
,
"excelCaption"
:
"订单状态"
,
"name"
:
"orderstate"
,
"noPrivDisplayMode"
:
1
,
"getPSAppCodeList"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPCODELISTS/ORDERSTATE.json"
},
"getPSAppDEField"
:
{
"name"
:
"ORDERSTATE"
,
"codeName"
:
"OrderState"
},
"width"
:
150
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
},
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"FRONT"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.ORDERTYPE"
},
"caption"
:
"订单类型"
,
"codeName"
:
"ordertype"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"ordertype"
,
"excelCaption"
:
"订单类型"
,
"name"
:
"ordertype"
,
"noPrivDisplayMode"
:
1
,
"getPSAppCodeList"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPCODELISTS/DYNAORDERTYPE.json"
},
"getPSAppDEField"
:
{
"name"
:
"ORDERTYPE"
,
"codeName"
:
"OrderType"
},
"width"
:
150
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
},
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"NONE"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.ORDERTIME"
},
"caption"
:
"订单时间"
,
"codeName"
:
"ordertime"
,
"caption"
:
"订单标识"
,
"codeName"
:
"ibizorderid"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"
ordertime
"
,
"excelCaption"
:
"订单
时间
"
,
"name"
:
"
ordertime
"
,
"dataItemName"
:
"
ibizorderid
"
,
"excelCaption"
:
"订单
标识
"
,
"name"
:
"
ibizorderid
"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"
ORDERTIME
"
,
"codeName"
:
"
OrderTime
"
"name"
:
"
IBIZORDERID
"
,
"codeName"
:
"
IBIZOrderId
"
},
"valueFormat"
:
"YYYY-MM-DD"
,
"width"
:
150
,
"width"
:
100
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
},
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"NONE"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.
UPDATEDAT
E"
"lanResTag"
:
"DEF.LNAME.
IBIZORDER.IBIZCUSTOMERNAM
E"
},
"caption"
:
"
更新时间
"
,
"codeName"
:
"
updatedat
e"
,
"caption"
:
"
客户名称
"
,
"codeName"
:
"
ibizcustomernam
e"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"
updatedat
e"
,
"excelCaption"
:
"
更新时间
"
,
"name"
:
"
updatedat
e"
,
"dataItemName"
:
"
ibizcustomernam
e"
,
"excelCaption"
:
"
客户名称
"
,
"name"
:
"
ibizcustomernam
e"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"UPDATEDATE"
,
"codeName"
:
"UpdateDate"
},
"getPSDEUIAction"
:
{
"actionTarget"
:
"SINGLEKEY"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"TBB.TEXT.*.EDIT"
},
"caption"
:
"编辑"
,
"codeName"
:
"Edit"
,
"fullCodeName"
:
"Edit"
,
"name"
:
"表格界面_编辑操作"
,
"getPSSysImage"
:
{
"glyph"
:
"xf044@FontAwesome"
,
"cssClass"
:
"fa fa-edit"
},
"predefinedType"
:
"GRIDVIEW_EDITACTION"
,
"timeout"
:
60000
,
"getTooltipPSLanguageRes"
:
{
"lanResTag"
:
"TBB.TOOLTIP.*.EDIT"
},
"uIActionMode"
:
"SYS"
,
"uIActionTag"
:
"Edit"
,
"uIActionType"
:
"DEUIACTION"
"name"
:
"IBIZCUSTOMERNAME"
,
"codeName"
:
"IBIZCustomerName"
},
"valueFormat"
:
"YYYY-MM-DD HH:mm:ss"
,
"width"
:
150
,
"width"
:
100
,
"widthUnit"
:
"PX"
,
"enableSort"
:
true
},
{
"align"
:
"LEFT"
,
"cLConvertMode"
:
"NONE"
,
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"DEF.LNAME.MEMO"
},
"caption"
:
"备注"
,
"codeName"
:
"memo"
,
"columnType"
:
"DEFGRIDCOLUMN"
,
"dataItemName"
:
"memo"
,
"excelCaption"
:
"备注"
,
"name"
:
"memo"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"MEMO"
,
"codeName"
:
"Memo"
},
"width"
:
1
,
"widthUnit"
:
"STAR"
,
"enableSort"
:
true
}
],
"getPSDEGridDataItems"
:
[
{
"dataType"
:
25
,
"name"
:
"orderuid"
,
"getPSAppDEField"
:
{
"name"
:
"ORDERUID"
,
"codeName"
:
"OrderUID"
}
},
{
"dataType"
:
25
,
"name"
:
"ibizordername"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERNAME"
,
"codeName"
:
"IBIZOrderName"
}
},
{
"dataType"
:
25
,
"name"
:
"orderstate"
,
"getPSAppDEField"
:
{
"name"
:
"ORDERSTATE"
,
"codeName"
:
"OrderState"
}
},
{
"dataType"
:
25
,
"name"
:
"ordertype"
,
"getPSAppDEField"
:
{
"name"
:
"ORDERTYPE"
,
"codeName"
:
"OrderType"
}
},
{
"format"
:
"YYYY-MM-DD"
,
"dataType"
:
5
,
"name"
:
"ordertime"
,
"getPSAppDEField"
:
{
"name"
:
"ORDERTIME"
,
"codeName"
:
"OrderTime"
}
},
{
"format"
:
"YYYY-MM-DD HH:mm:ss"
,
"dataType"
:
5
,
"name"
:
"updatedate"
,
"getPSAppDEField"
:
{
"name"
:
"UPDATEDATE"
,
"codeName"
:
"UpdateDate"
}
},
{
"dataType"
:
25
,
"name"
:
"memo"
,
"name"
:
"ibizorderid"
,
"getPSAppDEField"
:
{
"name"
:
"
MEMO
"
,
"codeName"
:
"
Memo
"
"name"
:
"
IBIZORDERID
"
,
"codeName"
:
"
IBIZOrderId
"
}
},
{
"dataType"
:
25
,
"name"
:
"ibiz
orderid
"
,
"name"
:
"ibiz
customername
"
,
"getPSAppDEField"
:
{
"name"
:
"IBIZ
ORDERID
"
,
"codeName"
:
"IBIZ
OrderId
"
"name"
:
"IBIZ
CUSTOMERNAME
"
,
"codeName"
:
"IBIZ
CustomerName
"
}
},
{
"dataType"
:
25
,
...
...
@@ -1291,6 +1223,13 @@
"name"
:
"WFSTEP"
,
"codeName"
:
"WFStep"
}
},
{
"dataType"
:
25
,
"name"
:
"orderstate"
,
"getPSAppDEField"
:
{
"name"
:
"ORDERSTATE"
,
"codeName"
:
"OrderState"
}
},
{
"dataType"
:
25
,
"name"
:
"srfmstag"
...
...
@@ -1311,11 +1250,7 @@
},
"allowEmpty"
:
true
}
],
"getPSSysPFPlugin"
:
{
"pluginType"
:
"GRID_RENDER"
,
"pluginCode"
:
"PivotTable"
},
"pagingSize"
:
10
,
"pagingSize"
:
20
,
"getRemovePSControlAction"
:
{
"actionName"
:
"Remove"
,
"actionType"
:
"DEACTION"
,
...
...
@@ -1339,140 +1274,13 @@
"enableRowEdit"
:
false
,
"enableRowEditOrder"
:
false
,
"enableRowNew"
:
false
,
"forceFit"
:
tru
e
,
"forceFit"
:
fals
e
,
"hideHeader"
:
false
,
"noSort"
:
false
,
"singleSelect"
:
false
,
"name"
:
"grid"
,
"modelid"
:
"
9222eaa963655f7f76cff5972d695cbf
"
,
"modelid"
:
"
69EE97FF-C400-40BC-BFEC-A64E6A41F665
"
,
"modeltype"
:
"PSDEGRID"
},
{
"codeName"
:
"Default"
,
"controlType"
:
"SEARCHFORM"
,
"dynaModelFilePath"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSSEARCHFORMS/Default.json"
,
"hookEventNames"
:
[
"SEARCH"
,
"LOAD"
,
"SAVE"
],
"logicName"
:
"默认搜索表单"
,
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
},
"getPSControlHandler"
:
{
"getPSHandlerActions"
:
[
{
"actionType"
:
"FILTERACTION"
,
"name"
:
"load"
,
"getPSAppDEMethod"
:
{
"modelref"
:
true
,
"id"
:
"FilterGet"
},
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
}
},
{
"actionType"
:
"FILTERACTION"
,
"name"
:
"loaddraft"
,
"getPSAppDEMethod"
:
{
"modelref"
:
true
,
"id"
:
"FilterGetDraft"
},
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
}
},
{
"actionType"
:
"FILTERACTION"
,
"name"
:
"search"
,
"getPSAppDEMethod"
:
{
"modelref"
:
true
,
"id"
:
"FilterSearch"
},
"getPSAppDataEntity"
:
{
"modelref"
:
true
,
"path"
:
"PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder.json"
}
}
],
"enableDEFieldPrivilege"
:
false
,
"id"
:
"搜索表单处理器"
},
"getPSControlLogics"
:
[
{
"eventNames"
:
"SEARCH;LOAD;SAVE"
,
"logicTag"
:
"searchform"
,
"logicType"
:
"APPVIEWENGINE"
,
"name"
:
"engine_searchform"
,
"getPSAppViewEngine"
:
{
"modelref"
:
true
,
"id"
:
"engine"
}
}
],
"getPSControlParam"
:
{
"autoLoad"
:
true
,
"showBusyIndicator"
:
true
,
"id"
:
"SEARCHFORM"
},
"getPSDEFormItems"
:
[
{
"id"
:
"n_ibizordername_like"
,
"dataType"
:
25
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERNAME"
,
"codeName"
:
"IBIZOrderName"
}
}
],
"getPSDEFormPages"
:
[
{
"caption"
:
"订单名称"
,
"codeName"
:
"formpage1"
,
"detailStyle"
:
"DEFAULT"
,
"detailType"
:
"FORMPAGE"
,
"name"
:
"formpage1"
,
"getPSDEFormDetails"
:
[
{
"getCapPSLanguageRes"
:
{
"lanResTag"
:
"CONTROL.DEFSFITEM.IBIZORDER.N_IBIZORDERNAME_LIKE"
},
"caption"
:
"订单名称(%)"
,
"codeName"
:
"n_ibizordername_like"
,
"dataType"
:
25
,
"detailStyle"
:
"DEFAULT"
,
"detailType"
:
"FORMITEM"
,
"enableCond"
:
3
,
"ignoreInput"
:
0
,
"labelPos"
:
"LEFT"
,
"labelWidth"
:
130
,
"name"
:
"n_ibizordername_like"
,
"noPrivDisplayMode"
:
1
,
"getPSAppDEField"
:
{
"name"
:
"IBIZORDERNAME"
,
"codeName"
:
"IBIZOrderName"
},
"getPSEditor"
:
{
"editorType"
:
"TEXTBOX"
,
"editorWidth"
:
100.0
,
"name"
:
"n_ibizordername_like"
},
"getPSLayoutPos"
:
{
"colMD"
:
24
,
"layout"
:
"TABLE_24COL"
},
"allowEmpty"
:
true
,
"showCaption"
:
true
}
],
"getPSLayout"
:
{
"columnCount"
:
24
,
"layout"
:
"TABLE_24COL"
},
"infoGroupMode"
:
false
}
],
"getPSLayout"
:
{
"columnCount"
:
24
,
"layout"
:
"TABLE_24COL"
},
"searchButtonStyle"
:
"DEFAULT"
,
"tabHeaderPos"
:
"TOP"
,
"enableAdvanceSearch"
:
false
,
"enableAutoSearch"
:
false
,
"enableFilterSave"
:
false
,
"noTabHeader"
:
true
,
"name"
:
"searchform"
,
"modelid"
:
"1b5557a48588cf3b6a07b7bd6acedd53"
,
"modeltype"
:
"PSDEFORM_SEARCHFORM"
}
],
"getPSDEViewCodeName"
:
"ProivatePluginGridView"
,
"getPSDEViewId"
:
"190888FE-7091-4F97-8103-963D7655C4D7"
,
...
...
demo-boot/src/main/resources/static/remotemodel/PSSYSAPPS/Web/PSSYSAPP.json
浏览文件 @
c4d78415
...
...
@@ -4139,12 +4139,6 @@
"pluginType"
:
"EDITFORM_RENDER"
,
"refMode"
:
"CONTROL"
,
"refTag"
:
"FORM"
},
{
"name"
:
"表格(透视表)"
,
"pluginCode"
:
"PivotTable"
,
"pluginType"
:
"GRID_RENDER"
,
"refMode"
:
"CONTROL"
,
"refTag"
:
"GRID"
},
{
"name"
:
"视图数量"
,
"pluginCode"
:
"PFPlugin8"
,
...
...
demo-boot/src/main/resources/static/remotemodel/PSSYSAPPS/Web/PSSYSAPP.simple.json
浏览文件 @
c4d78415
...
...
@@ -103,12 +103,6 @@
"pluginType"
:
"EDITFORM_RENDER"
,
"refMode"
:
"CONTROL"
,
"refTag"
:
"FORM"
},
{
"name"
:
"表格(透视表)"
,
"pluginCode"
:
"PivotTable"
,
"pluginType"
:
"GRID_RENDER"
,
"refMode"
:
"CONTROL"
,
"refTag"
:
"GRID"
},
{
"name"
:
"视图数量"
,
"pluginCode"
:
"PFPlugin8"
,
...
...
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
c4d78415
...
...
@@ -340,7 +340,7 @@
<!--输出实体[IBIZORDER]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizorder-66
2
-14"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizorder-66
8
-14"
>
<createTable
tableName=
"T_IBIZORDER"
>
<column
name=
"TP"
remarks=
""
type=
"TEXT(1048576)"
>
</column>
...
...
demo-core/src/main/resources/liquibase/view.xml
浏览文件 @
c4d78415
...
...
@@ -37,7 +37,7 @@
</createView>
</changeSet>
<!--输出实体[IBIZORDER]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizorder-66
2
-8"
runOnChange=
"true"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizorder-66
8
-8"
runOnChange=
"true"
>
<createView
fullDefinition=
"false"
replaceIfExists=
"true"
viewName=
"V_IBIZORDER"
>
<![CDATA[ SELECT t1.[AMOUNT], t1.[CREATEDATE], t1.[CREATEMAN], t1.[DETAILNUM], t1.[IBIZCUSTOMERID], t11.[IBIZCUSTOMERNAME], t1.[IBIZORDERID], t1.[IBIZORDERNAME], t1.[MEMO], t1.[ORDERSTATE], t1.[ORDERTIME], t1.[ORDERTYPE], t1.[ORDERUID], t1.[UPDATEDATE], t1.[UPDATEMAN], t1.[WFINSTANCEID], t1.[WFSTATE], t1.[WFSTEP] FROM [T_IBIZORDER] t1 LEFT JOIN T_IBIZCUSTOMER t11 ON t1.IBIZCUSTOMERID = t11.IBIZCUSTOMERID ]]>
</createView>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录