Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
25913320
Commit
25913320
authored
Mar 02, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.组织机构调整,第一级只能是厂区
parent
e7740ae1
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
425 additions
and
60 deletions
+425
-60
CodesetConstant.java
...java/com/baosight/hpjx/core/constant/CodesetConstant.java
+21
-0
CommonConstant.java
.../java/com/baosight/hpjx/core/constant/CommonConstant.java
+2
-0
OrgTypeEnum.java
src/main/java/com/baosight/hpjx/core/enums/OrgTypeEnum.java
+40
-0
CodeValueTools.java
...ain/java/com/baosight/hpjx/core/tools/CodeValueTools.java
+43
-0
HPConstant.java
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
+2
-0
ServiceXSOG0801.java
...com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
+7
-4
ServiceXSOG0801A.java
...om/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
+119
-0
XSOG0801.js
src/main/webapp/XS/OG/XSOG0801.js
+69
-39
XSOG0801.jsp
src/main/webapp/XS/OG/XSOG0801.jsp
+12
-17
XSOG0801A.js
src/main/webapp/XS/OG/XSOG0801A.js
+73
-0
XSOG0801A.jsp
src/main/webapp/XS/OG/XSOG0801A.jsp
+37
-0
No files found.
src/main/java/com/baosight/hpjx/core/constant/CodesetConstant.java
0 → 100644
View file @
25913320
package
com
.
baosight
.
hpjx
.
core
.
constant
;
/**
* @author:songx
* @date:2024/3/1,17:36
*/
public
class
CodesetConstant
{
/**
* 组织机构
*
* @author:songx
* @date:2024/3/1,17:36
*/
public
static
class
XsOg
{
// 组织机构类型
public
static
final
String
ORG_TYPE
=
"xs.og.orgType"
;
}
}
src/main/java/com/baosight/hpjx/core/constant/CommonConstant.java
View file @
25913320
...
@@ -54,6 +54,8 @@ public class CommonConstant {
...
@@ -54,6 +54,8 @@ public class CommonConstant {
public
static
final
String
PROD_ORDER_NO
=
"prodOrderNo"
;
public
static
final
String
PROD_ORDER_NO
=
"prodOrderNo"
;
// 生产订单号2
// 生产订单号2
public
static
final
String
PRODUCTTION_ORDER_NO
=
"productionOrderNo"
;
public
static
final
String
PRODUCTTION_ORDER_NO
=
"productionOrderNo"
;
// ROOT
public
static
final
String
ROOT
=
"root"
;
}
}
}
}
src/main/java/com/baosight/hpjx/core/enums/OrgTypeEnum.java
0 → 100644
View file @
25913320
package
com
.
baosight
.
hpjx
.
core
.
enums
;
/**
* @author:songx
* @date:2024/3/1,17:29
*/
public
enum
OrgTypeEnum
{
FACTORY
(
"factory"
,
"厂区"
),
DEPT
(
"dept"
,
"部门"
),
PROD_GROUP
(
"prodGroup"
,
"生产组"
),
CUT_GROUP
(
"cutGroup"
,
"下料组"
),
;
private
String
code
;
private
String
value
;
OrgTypeEnum
(
String
code
,
String
value
)
{
this
.
code
=
code
;
this
.
value
=
value
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
}
src/main/java/com/baosight/hpjx/core/tools/CodeValueTools.java
0 → 100644
View file @
25913320
package
com
.
baosight
.
hpjx
.
core
.
tools
;
import
com.baosight.hpjx.util.StringUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
java.util.List
;
/**
* @author:songx
* @date:2023/4/13,14:38
*/
public
class
CodeValueTools
{
/**
* getCodeValueList.
*
* @param codesetCode
* @return
*/
public
static
List
getCodeValues
(
String
codesetCode
)
{
return
getCodeValues
(
codesetCode
,
null
);
}
/**
* getCodeValueList.
*
* @param codesetCode
* @param condition
* @return
*/
public
static
List
getCodeValues
(
String
codesetCode
,
String
condition
)
{
EiInfo
callInfo
=
new
EiInfo
();
callInfo
.
set
(
EiConstant
.
serviceId
,
"S_ED_02"
);
callInfo
.
set
(
"codeset"
,
codesetCode
);
if
(
StringUtils
.
isNotBlank
(
condition
))
{
callInfo
.
set
(
"condition"
,
condition
);
}
return
(
List
)
XServiceManager
.
call
(
callInfo
).
get
(
"list"
);
}
}
src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
View file @
25913320
...
@@ -14,6 +14,8 @@ public class HPConstant {
...
@@ -14,6 +14,8 @@ public class HPConstant {
*/
*/
public
class
SequenceId
{
public
class
SequenceId
{
// 组织机构编码
public
static
final
String
ORG_CODE
=
"ORG_CODE"
;
// 组编码
// 组编码
public
static
final
String
GROUP_CODE
=
"GROUP_CODE"
;
public
static
final
String
GROUP_CODE
=
"GROUP_CODE"
;
// 厂区编码
// 厂区编码
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
View file @
25913320
package
com
.
baosight
.
xservices
.
xs
.
og
.
service
;
package
com
.
baosight
.
xservices
.
xs
.
og
.
service
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.iplat4j.common.ed.domain.TEDCM01
;
import
com.baosight.iplat4j.common.ed.domain.TEDCM01
;
...
@@ -16,6 +17,7 @@ import com.baosight.iplat4j.core.service.soa.XServiceManager;
...
@@ -16,6 +17,7 @@ import com.baosight.iplat4j.core.service.soa.XServiceManager;
import
com.baosight.iplat4j.core.util.DateUtils
;
import
com.baosight.iplat4j.core.util.DateUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.AdminUtil
;
import
com.baosight.iplat4j.ed.util.AdminUtil
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.xservices.xs.domain.XS01
;
import
com.baosight.xservices.xs.domain.XS01
;
import
com.baosight.xservices.xs.domain.XS02
;
import
com.baosight.xservices.xs.domain.XS02
;
import
com.baosight.xservices.xs.og.domain.XSOG01
;
import
com.baosight.xservices.xs.og.domain.XSOG01
;
...
@@ -260,14 +262,15 @@ public class ServiceXSOG0801 extends ServiceBase {
...
@@ -260,14 +262,15 @@ public class ServiceXSOG0801 extends ServiceBase {
}
}
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
HPPZ009
dbPz009
=
StringUtils
.
isBlank
(
companyCode
)
?
null
:
HPPZTools
.
HpPz009
.
getByCode
(
companyCode
);
// HPPZ009 dbPz009 = StringUtils.isBlank(companyCode) ? null : HPPZTools.HpPz009.getByCode(companyCode);
final
String
companyPrefix
=
dbPz009
==
null
?
""
:
"["
+
dbPz009
.
getLoginPrefix
()
+
"]"
;
// final String companyPrefix = dbPz009 == null ? "" : "[" + dbPz009.getLoginPrefix() + "]";
String
orgCode
=
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
ORG_CODE
);
resultBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
resultBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
List
rows
=
resultBlock
.
getRows
();
List
rows
=
resultBlock
.
getRows
();
rows
.
forEach
((
m
)
->
{
rows
.
forEach
((
m
)
->
{
Map
row
=
(
Map
)
m
;
Map
row
=
(
Map
)
m
;
row
.
put
(
"orgId"
,
companyPrefix
+
inInfo
.
get
(
"result2-0-orgEname"
)
);
row
.
put
(
"orgId"
,
orgCode
);
row
.
put
(
"orgEname"
,
companyPrefix
+
row
.
get
(
"orgEname"
)
);
row
.
put
(
"orgEname"
,
orgCode
);
row
.
put
(
"companyCode"
,
companyCode
);
row
.
put
(
"companyCode"
,
companyCode
);
row
.
put
(
"parentOrgId"
,
inInfo
.
get
(
"inqu_status2-0-parentOrgId"
));
row
.
put
(
"parentOrgId"
,
inInfo
.
get
(
"inqu_status2-0-parentOrgId"
));
row
.
put
(
"recCreator"
,
UserSession
.
getLoginName
());
row
.
put
(
"recCreator"
,
UserSession
.
getLoginName
());
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
0 → 100644
View file @
25913320
package
com
.
baosight
.
xservices
.
xs
.
og
.
service
;
import
com.baosight.hpjx.core.constant.CodesetConstant
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.enums.OrgTypeEnum
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.core.tools.CodeValueTools
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.MapUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.xservices.xs.og.domain.XSOG01
;
import
com.baosight.xservices.xs.util.LoginUserDetails
;
import
java.util.List
;
import
java.util.Map
;
/**
* 新增组织机构
*
* @author:songx
* @date:2022/7/11,11:08
*/
public
class
ServiceXSOG0801A
extends
ServiceEPBase
{
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
parentOrgId
=
MapUtils
.
getString
(
queryMap
,
"parentOrgId"
);
String
condition
;
if
(
CommonConstant
.
Field
.
ROOT
.
equals
(
parentOrgId
))
{
condition
=
String
.
format
(
" ITEM_CODE = '%s'"
,
OrgTypeEnum
.
FACTORY
.
getCode
());
}
else
{
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s', '%s')"
,
OrgTypeEnum
.
DEPT
.
getCode
(),
OrgTypeEnum
.
PROD_GROUP
.
getCode
(),
OrgTypeEnum
.
CUT_GROUP
.
getCode
());
}
List
<
Map
>
orgTypes
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
XsOg
.
ORG_TYPE
,
condition
);
inInfo
.
addBlock
(
"orgTypeBlock"
).
addRows
(
orgTypes
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC010
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
parentOrgId
=
MapUtils
.
getString
(
queryRow
,
"parentOrgId"
);
if
(
""
.
equals
(
parentOrgId
))
{
return
inInfo
;
}
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
queryRow
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
}
inInfo
=
super
.
query
(
inInfo
,
"XSOG01.query"
,
new
XSOG01
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 保存
*
* @param inInfo
* @return
*/
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
resultRows
.
forEach
((
row
)
->
{
String
orgCode
=
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
ORG_CODE
);
row
.
put
(
"orgId"
,
orgCode
);
row
.
put
(
"orgEname"
,
orgCode
);
row
.
put
(
"companyCode"
,
companyCode
);
row
.
put
(
"establishDate"
,
DateUtils
.
formatShort
(
MapUtils
.
getString
(
row
,
"establishDate"
)));
row
.
put
(
"parentOrgId"
,
queryRow
.
get
(
"parentOrgId"
));
row
.
put
(
"recCreator"
,
UserSession
.
getLoginName
());
});
EiInfo
call
=
new
EiInfo
();
call
.
set
(
"list"
,
resultRows
);
call
.
set
(
EiConstant
.
serviceId
,
"S_XS_87"
);
XServiceManager
.
call
(
call
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setMsg
(
"新增成功"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增组织机构失败"
);
}
return
inInfo
;
}
}
src/main/webapp/XS/OG/XSOG0801.js
View file @
25913320
...
@@ -483,13 +483,22 @@ $(function () {
...
@@ -483,13 +483,22 @@ $(function () {
IPLAT
.
alert
(
"请在组织机构树选择任意节点后新增组织机构"
)
IPLAT
.
alert
(
"请在组织机构树选择任意节点后新增组织机构"
)
return
return
}
}
$
(
"#inqu_status2-0-parentOrgId"
).
val
(
parentId
)
//
$("#inqu_status2-0-parentOrgId").val(parentId)
// $("#inqu_status2-0-parentOrgEname").val(parentId)
// $("#inqu_status2-0-parentOrgEname").val(parentId)
$
(
"#inqu_status2-0-orgEname"
).
val
(
""
)
// $("#inqu_status2-0-orgEname").val("")
$
(
"#inqu_status2-0-orgCname"
).
val
(
""
)
// $("#inqu_status2-0-orgCname").val("")
IPLAT
.
EFSelect
.
value
(
$
(
"#inqu_status2-0-orgType"
),
""
)
// IPLAT.EFSelect.value($("#inqu_status2-0-orgType"), "")
result2Grid
.
dataSource
.
page
(
1
)
// result2Grid.dataSource.page(1)
$
(
"#insertOrgWindow"
).
data
(
"kendoWindow"
).
open
();
// $("#insertOrgWindow").data("kendoWindow").open();
let
params
=
"&inqu_status-0-parentOrgId="
+
parentId
+
"&inqu_status-0-parentOrgEname="
+
parentId
;
JSColorbox
.
open
({
href
:
"XSOG0801A?methodName=initLoad"
+
params
,
title
:
"<div style='text-align: center;'>新增子组织机构</div>"
,
width
:
"70%"
,
height
:
"70%"
,
callbackName
:
addCallback
});
})
})
/**
/**
...
@@ -767,43 +776,25 @@ $(function () {
...
@@ -767,43 +776,25 @@ $(function () {
}
}
},
},
"result2"
:
{
"result2"
:
{
columns
:
[{
field
:
"establishDate"
,
attributes
:
{
class
:
"i-input-readonly"
}
}],
onSuccess
:
(
e
)
=>
{
onSuccess
:
(
e
)
=>
{
if
(
e
.
type
===
"create"
)
{
if
(
e
.
type
===
"create"
)
{
refreshTree
();
setTimeout
(()
=>
{
const
selectTreeNode
=
(
tree
,
treeOrgId
)
=>
{
if
(
!
tree
||
treeOrgId
==
null
)
{
return
}
setTimeout
(()
=>
{
let
barDataItem
=
tree
.
dataSource
.
get
(
treeOrgId
);
if
(
barDataItem
)
{
let
barElement
=
tree
.
findByUid
(
barDataItem
.
uid
);
// 刷新完成后选中对应的树节点
tree
.
select
(
barElement
);
}
else
{
selectTreeNode
(
tree
,
treeOrgId
)
}
},
100
)
}
// 刷新树节点
const
tree
=
$
(
"#categoryTree"
).
data
(
"kendoTreeView"
);
const
treeOrgId
=
$
(
"#inqu_status2-0-parentOrgId"
).
val
()
tree
.
reload
(
treeOrgId
)
expandTreeNode
(
tree
,
treeOrgId
)
// tree.expandPath(treeOrgId)
// 展开成功后选中对应的树节点
selectTreeNode
(
tree
,
treeOrgId
);
},
500
)
}
}
},
},
},
},
"result3"
:
{
"result3"
:
{
columns
:
[{
field
:
"establishDate"
,
attributes
:
{
class
:
"i-input-readonly"
}
}],
onSuccess
:
(
e
)
=>
{
onSuccess
:
(
e
)
=>
{
if
(
e
.
type
===
"update"
)
{
if
(
e
.
type
===
"update"
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -912,10 +903,49 @@ $(function () {
...
@@ -912,10 +903,49 @@ $(function () {
});
});
let
movedUser
;
/**
* 新增组织机构回调
*/
let
addCallback
=
function
(
parentOrgId
)
{
// 回填父级ID
$
(
"#inqu_status2-0-parentOrgId"
).
val
(
parentOrgId
);
refreshTree
();
}
let
splitter
;
/**
* 刷新树
*/
let
refreshTree
=
function
()
{
setTimeout
(()
=>
{
const
selectTreeNode
=
(
tree
,
treeOrgId
)
=>
{
if
(
!
tree
||
treeOrgId
==
null
)
{
return
}
setTimeout
(()
=>
{
let
barDataItem
=
tree
.
dataSource
.
get
(
treeOrgId
);
if
(
barDataItem
)
{
let
barElement
=
tree
.
findByUid
(
barDataItem
.
uid
);
// 刷新完成后选中对应的树节点
tree
.
select
(
barElement
);
}
else
{
selectTreeNode
(
tree
,
treeOrgId
)
}
},
100
)
}
// 刷新树节点
const
tree
=
$
(
"#categoryTree"
).
data
(
"kendoTreeView"
);
const
treeOrgId
=
$
(
"#inqu_status2-0-parentOrgId"
).
val
()
tree
.
reload
(
treeOrgId
)
expandTreeNode
(
tree
,
treeOrgId
)
// tree.expandPath(treeOrgId)
// 展开成功后选中对应的树节点
selectTreeNode
(
tree
,
treeOrgId
);
},
500
);
}
let
movedUser
;
let
splitter
;
/**
/**
* 扩展信息查看
* 扩展信息查看
* @param e
* @param e
...
...
src/main/webapp/XS/OG/XSOG0801.jsp
View file @
25913320
...
@@ -134,7 +134,6 @@
...
@@ -134,7 +134,6 @@
</div>
</div>
<div id="menu" style="margin-top: 12px; margin-bottom: 8px">
<div id="menu" style="margin-top: 12px; margin-bottom: 8px">
<EF:EFTree bindId="categoryTree" ename="tree_name" textField="text" valueField="label"
<EF:EFTree bindId="categoryTree" ename="tree_name" textField="text" valueField="label"
hasChildren="leaf" pid="parent_id"
hasChildren="leaf" pid="parent_id"
serviceName="XSOG0800" methodName="query">
serviceName="XSOG0800" methodName="query">
...
@@ -146,8 +145,7 @@
...
@@ -146,8 +145,7 @@
<span style="font-size: 16px; width: 16px; vertical-align: middle;" class="fa fa-plus"></span>新增
<span style="font-size: 16px; width: 16px; vertical-align: middle;" class="fa fa-plus"></span>新增
</li>
</li>
<li data-type="delete" id="isDel">
<li data-type="delete" id="isDel">
<span style="font-size: 16px; width: 16px; vertical-align: middle;"
<span style="font-size: 16px; width: 16px; vertical-align: middle;" class="fa fa-minus-circle"></span>删除
class="fa fa-minus-circle"></span>删除
</li>
</li>
<li data-type="edit" id="isEdit">
<li data-type="edit" id="isEdit">
<span style="font-size: 16px; width: 16px; vertical-align: middle;" class="fa fa-pencil"></span>编辑
<span style="font-size: 16px; width: 16px; vertical-align: middle;" class="fa fa-pencil"></span>编辑
...
@@ -265,7 +263,7 @@
...
@@ -265,7 +263,7 @@
<div class="row">
<div class="row">
<EF:EFInput ename="inqu_status2-0-parentOrgId" cname="上级组织Id" type="hidden"/>
<EF:EFInput ename="inqu_status2-0-parentOrgId" cname="上级组织Id" type="hidden"/>
<EF:EFInput ename="inqu_status2-0-parentOrgEname" cname="上级组织编码" type="hidden"/>
<EF:EFInput ename="inqu_status2-0-parentOrgEname" cname="上级组织编码" type="hidden"/>
<EF:EFInput ename="inqu_status2-0-orgEname" cname="组织编码
"/>
<EF:EFInput ename="inqu_status2-0-orgEname" cname="组织编码" type="hidden
"/>
<EF:EFInput ename="inqu_status2-0-orgCname" cname="组织名称"/>
<EF:EFInput ename="inqu_status2-0-orgCname" cname="组织名称"/>
<%--这里注册成小代码,下拉查询--%>
<%--这里注册成小代码,下拉查询--%>
<EF:EFSelect cname="组织类型" optionLabel="全部" blockId="inqu_status2" ename="orgType" row="0">
<EF:EFSelect cname="组织类型" optionLabel="全部" blockId="inqu_status2" ename="orgType" row="0">
...
@@ -279,9 +277,9 @@
...
@@ -279,9 +277,9 @@
insertMethod="insertOrgByParentId"
insertMethod="insertOrgByParentId"
>
>
<EF:EFColumn ename="orgId" cname="组织ID" hidden="true"/> <%--隐藏--%>
<EF:EFColumn ename="orgId" cname="组织ID" hidden="true"/> <%--隐藏--%>
<EF:EFColumn ename="orgEname" cname="组织编码" re
quired="true" readonly="true" locked
="true"/>
<EF:EFColumn ename="orgEname" cname="组织编码" re
adonly="true" hidden
="true"/>
<EF:EFColumn ename="orgCname" cname="组织名称" required="true" locked="true"/>
<EF:EFColumn ename="orgCname" cname="组织名称" required="true" locked="true"/>
<EF:EFColumn ename="orgBriefName" cname="组织别名"/>
<EF:EFColumn ename="orgBriefName" cname="组织别名"
hidden="true"
/>
<EF:EFComboColumn ename="orgType" cname="组织类型" required="true" textField="label" valueField="value">
<EF:EFComboColumn ename="orgType" cname="组织类型" required="true" textField="label" valueField="value">
<EF:EFCodeOption codeName="xs.og.orgType" textField="label" valueField="value"/>
<EF:EFCodeOption codeName="xs.og.orgType" textField="label" valueField="value"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
@@ -290,7 +288,7 @@
...
@@ -290,7 +288,7 @@
<EF:EFColumn ename="establishDate" cname="成立时间" required="true" width="170" parseFormats="['yyyyMMdd']"
<EF:EFColumn ename="establishDate" cname="成立时间" required="true" width="170" parseFormats="['yyyyMMdd']"
editType="date"
editType="date"
dateFormat="yyyy-MM-dd" align="center"/>
dateFormat="yyyy-MM-dd" align="center"/>
<EF:EFColumn ename="orgLevel" cname="组织级别" align="center"/>
<EF:EFColumn ename="orgLevel" cname="组织级别" align="center"
hidden="true"
/>
<EF:EFColumn ename="sortIndex" cname="排序" align="center"/>
<EF:EFColumn ename="sortIndex" cname="排序" align="center"/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -305,22 +303,19 @@
...
@@ -305,22 +303,19 @@
</div>
</div>
<EF:EFRegion id="result3Region" title="子组织机构">
<EF:EFRegion id="result3Region" title="子组织机构">
<EF:EFGrid blockId="result3" autoBind="false" autoDraw="false" checkMode="multiple, row"
<EF:EFGrid blockId="result3" autoBind="false" autoDraw="false" checkMode="multiple, row"
queryMethod="queryOrgById"
queryMethod="queryOrgById" updateMethod="updateOrgById">
updateMethod="updateOrgById"
>
<EF:EFColumn ename="orgId" cname="组织ID" hidden="true"/> <%--隐藏--%>
<EF:EFColumn ename="orgId" cname="组织ID" hidden="true"/> <%--隐藏--%>
<EF:EFColumn ename="orgEname" cname="组织编码" re
quired="true" readonly="true" locked
="true"/>
<EF:EFColumn ename="orgEname" cname="组织编码" re
adonly="true" locked="true" hidden
="true"/>
<EF:EFColumn ename="orgCname" cname="组织名称"
required="true" locked="true"
/>
<EF:EFColumn ename="orgCname" cname="组织名称"
locked="true" required="true"
/>
<EF:EFColumn ename="orgBriefName" cname="组织别名"/>
<EF:EFColumn ename="orgBriefName" cname="组织别名"
hidden="true"
/>
<EF:EFComboColumn ename="orgType" cname="组织类型" required="true" textField="label" valueField="val
ue">
<EF:EFComboColumn ename="orgType" cname="组织类型" align="center" readonly="tr
ue">
<EF:EFCodeOption codeName="xs.og.orgType" textField="label" valueField="value"/>
<EF:EFCodeOption codeName="xs.og.orgType" textField="label" valueField="value"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="orgNodeType" cname="节点类型" hidden="true" defaultValue="2"/> <%--隐藏 默认值为2--%>
<EF:EFColumn ename="orgNodeType" cname="节点类型" hidden="true" defaultValue="2"/> <%--隐藏 默认值为2--%>
<EF:EFColumn ename="parentOrgId" cname="上级组织编码" readonly="true" hidden="true"/> <%--隐藏--%>
<EF:EFColumn ename="parentOrgId" cname="上级组织编码" readonly="true" hidden="true"/> <%--隐藏--%>
<EF:EFColumn ename="establishDate" cname="成立时间" required="true" width="170" parseFormats="['yyyyMMdd']"
<EF:EFColumn ename="establishDate" cname="成立时间" required="true" width="170" parseFormats="['yyyyMMdd']"
editType="date"
editType="date" dateFormat="yyyy-MM-dd" align="center"/>
dateFormat="yyyy-MM-dd" align="center"/>
<EF:EFColumn ename="orgLevel" cname="组织级别" align="center" hidden="true"/>
<EF:EFColumn ename="orgLevel" cname="组织级别" align="center"/>
<EF:EFColumn ename="sortIndex" cname="排序" align="center"/>
<EF:EFColumn ename="sortIndex" cname="排序" align="center"/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
...
...
src/main/webapp/XS/OG/XSOG0801A.js
0 → 100644
View file @
25913320
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[],
onSave
:
function
(
e
)
{
// 阻止后台保存请求,使用自定义保存
e
.
preventDefault
();
save
();
}
}
};
$
(
"#ef_form_head"
).
hide
();
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 初始化查询
query
();
});
/**
* 查询
*/
var
query
=
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
};
/**
* 选择库存
*/
let
save
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
orgCname
=
rows
[
i
][
'orgCname'
];
if
(
isBlank
(
orgCname
))
{
message
(
"组织机构名称不能为空"
);
return
;
}
let
orgType
=
rows
[
i
][
'orgType'
];
if
(
isBlank
(
orgType
))
{
message
(
"组织类型不能为空"
);
return
;
}
let
establishDate
=
rows
[
i
][
'establishDate'
];
if
(
isBlank
(
establishDate
))
{
message
(
"成立时间不能为空"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"XSOG0801A"
,
"save"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
let
parentOrgId
=
$
(
"#inqu_status-0-parentOrgId"
).
val
();
parent
.
JSColorbox
.
setValueCallback
(
parentOrgId
);
}
});
}
});
}
src/main/webapp/XS/OG/XSOG0801A.jsp
0 → 100644
View file @
25913320
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"新增组织机构"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"上级组织Id"
blockId=
"inqu_status"
ename=
"parentOrgId"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"上级组织编码"
blockId=
"inqu_status"
ename=
"parentOrgEname"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"组织编码"
blockId=
"inqu_status"
ename=
"orgEname"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"组织名称"
blockId=
"inqu_status"
ename=
"orgCname"
row=
"0"
/>
<EF:EFSelect
cname=
"组织类型"
blockId=
"inqu_status"
ename=
"orgType"
row=
"0"
optionLabel=
"全部"
>
<EF:EFOptions
blockId=
"orgTypeBlock"
textField=
"label"
valueField=
"value"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"子组织机构"
>
<EF:EFGrid
blockId=
"result"
autoBind=
"false"
autoDraw=
"false"
checkMode=
"multiple,row"
readonly=
"true"
>
<EF:EFColumn
ename=
"orgId"
cname=
"组织ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"orgEname"
cname=
"组织编码"
readonly=
"true"
hidden=
"true"
/>
<EF:EFColumn
ename=
"orgCname"
cname=
"组织名称"
required=
"true"
locked=
"true"
/>
<EF:EFColumn
ename=
"orgBriefName"
cname=
"组织别名"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"orgType"
cname=
"组织类型"
required=
"true"
textField=
"label"
valueField=
"value"
>
<EF:EFOptions
blockId=
"orgTypeBlock"
textField=
"label"
valueField=
"value"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"orgNodeType"
cname=
"节点类型"
hidden=
"true"
defaultValue=
"2"
/>
<
%
--
隐藏
默认值为
2--
%
>
<EF:EFColumn
ename=
"parentOrgId"
cname=
"上级组织编码"
readonly=
"true"
hidden=
"true"
/>
<
%
--
隐藏
--
%
>
<EF:EFColumn
ename=
"establishDate"
cname=
"成立时间"
required=
"true"
width=
"170"
parseFormats=
"['yyyyMMdd']"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
align=
"center"
/>
<EF:EFColumn
ename=
"orgLevel"
cname=
"组织级别"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"sortIndex"
cname=
"排序"
align=
"center"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment