ITSM 조직도 매뉴 변경
@e0c79f912df091c14ebb0b830aa1d2e9b141b6df
--- src/main/java/egovframework/let/itsm/org/service/OrgCharVO.java
+++ src/main/java/egovframework/let/itsm/org/service/OrgCharVO.java
... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 |
|
| 9 | 9 |
private String locNm = ""; |
| 10 | 10 |
|
| 11 |
- private int locNo = 0; |
|
| 11 |
+ private String locNo = ""; |
|
| 12 | 12 |
|
| 13 | 13 |
private int upperLocNo = 0; |
| 14 | 14 |
|
... | ... | @@ -46,11 +46,11 @@ |
| 46 | 46 |
this.locNm = locNm; |
| 47 | 47 |
} |
| 48 | 48 |
|
| 49 |
- public int getLocNo() {
|
|
| 49 |
+ public String getLocNo() {
|
|
| 50 | 50 |
return locNo; |
| 51 | 51 |
} |
| 52 | 52 |
|
| 53 |
- public void setLocNo(int locNo) {
|
|
| 53 |
+ public void setLocNo(String locNo) {
|
|
| 54 | 54 |
this.locNo = locNo; |
| 55 | 55 |
} |
| 56 | 56 |
|
--- src/main/java/egovframework/let/itsm/org/service/OrgChartManageService.java
+++ src/main/java/egovframework/let/itsm/org/service/OrgChartManageService.java
... | ... | @@ -12,6 +12,12 @@ |
| 12 | 12 |
// 부서별 Depth 리스트 조회 |
| 13 | 13 |
public List<OrgCharVO> selectOrgChartDepthListAjax(OrgCharVO orgCharVO) throws Exception; |
| 14 | 14 |
|
| 15 |
+ // 부서 상세 조회 |
|
| 16 |
+ public OrgCharVO selectOrgChartInfoAjax(OrgCharVO orgCharVO) throws Exception; |
|
| 17 |
+ |
|
| 18 |
+ // 부서 정보 수정 |
|
| 19 |
+ void updateOrgChartInfoAjax(OrgCharVO orgCharVO) throws Exception; |
|
| 20 |
+ |
|
| 15 | 21 |
// 직원 조회 |
| 16 | 22 |
public List<UserManageVO> selectUserListAjax(UserManageVO userManageVO) throws Exception; |
| 17 | 23 |
|
--- src/main/java/egovframework/let/itsm/org/service/impl/ItsmOrgChartManageDAO.java
+++ src/main/java/egovframework/let/itsm/org/service/impl/ItsmOrgChartManageDAO.java
... | ... | @@ -23,6 +23,14 @@ |
| 23 | 23 |
return (List<OrgCharVO>) list("itsmOrgChartManageDAO.selectOrgChartDepthListAjax",orgCharVO);
|
| 24 | 24 |
} |
| 25 | 25 |
|
| 26 |
+ public OrgCharVO selectOrgChartInfoAjax(OrgCharVO orgCharVO) throws Exception {
|
|
| 27 |
+ return (OrgCharVO)select("itsmOrgChartManageDAO.selectOrgChartInfoAjax",orgCharVO);
|
|
| 28 |
+ } |
|
| 29 |
+ |
|
| 30 |
+ public void updateOrgChartInfoAjax(OrgCharVO orgCharVO) throws Exception {
|
|
| 31 |
+ update("itsmOrgChartManageDAO.updateOrgChartInfoAjax",orgCharVO);
|
|
| 32 |
+ } |
|
| 33 |
+ |
|
| 26 | 34 |
@SuppressWarnings("unchecked")
|
| 27 | 35 |
public List<UserManageVO> selectUserListAjax(UserManageVO userManageVO) throws Exception {
|
| 28 | 36 |
return (List<UserManageVO>) list("itsmOrgChartManageDAO.selectUserAjax",userManageVO);
|
--- src/main/java/egovframework/let/itsm/org/service/impl/OrgChartManageServiceImpl.java
+++ src/main/java/egovframework/let/itsm/org/service/impl/OrgChartManageServiceImpl.java
... | ... | @@ -29,6 +29,16 @@ |
| 29 | 29 |
} |
| 30 | 30 |
|
| 31 | 31 |
@Override |
| 32 |
+ public OrgCharVO selectOrgChartInfoAjax(OrgCharVO orgCharVO) throws Exception {
|
|
| 33 |
+ return itsmOrgChartManageDAO.selectOrgChartInfoAjax(orgCharVO); |
|
| 34 |
+ } |
|
| 35 |
+ |
|
| 36 |
+ @Override |
|
| 37 |
+ public void updateOrgChartInfoAjax(OrgCharVO orgCharVO) throws Exception {
|
|
| 38 |
+ itsmOrgChartManageDAO.updateOrgChartInfoAjax(orgCharVO); |
|
| 39 |
+ } |
|
| 40 |
+ |
|
| 41 |
+ @Override |
|
| 32 | 42 |
public List<UserManageVO> selectUserListAjax(UserManageVO userManageVO) throws Exception {
|
| 33 | 43 |
return itsmOrgChartManageDAO.selectUserListAjax(userManageVO); |
| 34 | 44 |
} |
... | ... | @@ -52,7 +62,4 @@ |
| 52 | 62 |
public void deleteUserInfoAjax(String staffId) throws Exception {
|
| 53 | 63 |
itsmOrgChartManageDAO.deleteUserInfoAjax(staffId); |
| 54 | 64 |
} |
| 55 |
- |
|
| 56 |
- |
|
| 57 |
- |
|
| 58 | 65 |
} |
--- src/main/java/egovframework/let/itsm/org/web/OrgChartManageController.java
+++ src/main/java/egovframework/let/itsm/org/web/OrgChartManageController.java
... | ... | @@ -155,6 +155,45 @@ |
| 155 | 155 |
return modelAndView; |
| 156 | 156 |
} |
| 157 | 157 |
|
| 158 |
+ // 직원 정보 조회하기 |
|
| 159 |
+ @RequestMapping("/cop/itsm/selectOrgChartInfoAjax.do")
|
|
| 160 |
+ public ModelAndView selectOrgChartInfoAjax( |
|
| 161 |
+ @ModelAttribute("searchVO") OrgCharVO searchVO
|
|
| 162 |
+ , ModelMap model) throws Exception {
|
|
| 163 |
+ |
|
| 164 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 165 |
+ modelAndView.setViewName("jsonView");
|
|
| 166 |
+ try{
|
|
| 167 |
+ OrgCharVO orgChartInfo = orgChartManageService.selectOrgChartInfoAjax(searchVO); |
|
| 168 |
+ modelAndView.addObject("orgChartInfo", orgChartInfo);
|
|
| 169 |
+ modelAndView.addObject("result", "success");
|
|
| 170 |
+ }catch(Exception e){
|
|
| 171 |
+ modelAndView.addObject("result", "fail");
|
|
| 172 |
+ } |
|
| 173 |
+ return modelAndView; |
|
| 174 |
+ } |
|
| 175 |
+ |
|
| 176 |
+ // 부서정보 수정 |
|
| 177 |
+ @RequestMapping("/cop/itsm/updateOrgChartInfoAjax.do")
|
|
| 178 |
+ public ModelAndView updateOrgChartInfoAjax( |
|
| 179 |
+ @ModelAttribute("searchVO") OrgCharVO searchVO
|
|
| 180 |
+ , ModelMap model) throws Exception {
|
|
| 181 |
+ |
|
| 182 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 183 |
+ modelAndView.setViewName("jsonView");
|
|
| 184 |
+ |
|
| 185 |
+ try{
|
|
| 186 |
+ //부서정보 수정 |
|
| 187 |
+ orgChartManageService.updateOrgChartInfoAjax(searchVO); |
|
| 188 |
+ |
|
| 189 |
+ modelAndView.addObject("result", "success");
|
|
| 190 |
+ }catch(Exception e){
|
|
| 191 |
+ modelAndView.addObject("result", "fail");
|
|
| 192 |
+ } |
|
| 193 |
+ return modelAndView; |
|
| 194 |
+ } |
|
| 195 |
+ |
|
| 196 |
+ |
|
| 158 | 197 |
// 부서별 직원 정보 보기 |
| 159 | 198 |
@RequestMapping("/cop/itsm/selectUserListAjax.do")
|
| 160 | 199 |
public ModelAndView selectStaffListAjax( |
--- src/main/resources/egovframework/sqlmap/let/orgChart/OrgChartManage_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/orgChart/OrgChartManage_SQL_Mysql.xml
... | ... | @@ -105,6 +105,24 @@ |
| 105 | 105 |
ORDER BY LOC_LPAD |
| 106 | 106 |
</select> --> |
| 107 | 107 |
|
| 108 |
+ <select id="itsmOrgChartManageDAO.selectOrgChartInfoAjax" parameterClass="orgCharVO" resultClass="orgCharVO"> |
|
| 109 |
+ SELECT |
|
| 110 |
+ A.LOC_NO AS locNo |
|
| 111 |
+ , A.LOC_NM AS locNm |
|
| 112 |
+ , A.USE_YN AS useYn |
|
| 113 |
+ FROM |
|
| 114 |
+ ITSM_LOC A |
|
| 115 |
+ WHERE 1=1 |
|
| 116 |
+ AND A.LOC_NO = #locNo# |
|
| 117 |
+ </select> |
|
| 118 |
+ |
|
| 119 |
+ <update id="itsmOrgChartManageDAO.updateOrgChartInfoAjax" parameterClass="orgCharVO"> |
|
| 120 |
+ UPDATE ITSM_LOC SET |
|
| 121 |
+ USE_YN = #useYn# |
|
| 122 |
+ WHERE |
|
| 123 |
+ LOC_NO = #searchCondition# |
|
| 124 |
+ </update> |
|
| 125 |
+ |
|
| 108 | 126 |
<select id="itsmOrgChartManageDAO.selectOrgChartListAjax" parameterClass="orgCharVO" resultClass="orgCharVO"> |
| 109 | 127 |
WITH RECURSIVE loc AS |
| 110 | 128 |
( |
... | ... | @@ -116,7 +134,8 @@ |
| 116 | 134 |
, FRST_REGIST_PNTTM |
| 117 | 135 |
, LOC_ORDR |
| 118 | 136 |
, CAST(LOC_ORDR AS CHAR(50)) AS LOC_LPAD |
| 119 |
- , GW_STATUS |
|
| 137 |
+ , GW_STATUS |
|
| 138 |
+ , USE_YN |
|
| 120 | 139 |
FROM |
| 121 | 140 |
ITSM_LOC |
| 122 | 141 |
WHERE |
... | ... | @@ -134,6 +153,7 @@ |
| 134 | 153 |
, sub_loc.LOC_ORDR |
| 135 | 154 |
,CONCAT(loc.LOC_LPAD, ",", LPAD(sub_loc.LOC_ORDR, 5, 0)) AS LOC_LPAD |
| 136 | 155 |
, sub_loc.GW_STATUS |
| 156 |
+ , sub_loc.USE_YN |
|
| 137 | 157 |
FROM |
| 138 | 158 |
ITSM_LOC |
| 139 | 159 |
AS sub_loc INNER JOIN loc |
... | ... | @@ -146,6 +166,7 @@ |
| 146 | 166 |
, DEPTH AS depth |
| 147 | 167 |
, FRST_REGIST_PNTTM AS frstRegistPnttm |
| 148 | 168 |
, LOC_ORDR AS nodeDepth |
| 169 |
+ , USE_YN AS useYn |
|
| 149 | 170 |
FROM |
| 150 | 171 |
LOC |
| 151 | 172 |
WHERE GW_STATUS = '1' |
... | ... | @@ -224,6 +245,7 @@ |
| 224 | 245 |
LOC_ORDR , |
| 225 | 246 |
CAST(LOC_ORDR AS CHAR(50)) AS LOC_LPAD , |
| 226 | 247 |
GW_STATUS |
| 248 |
+ , USE_YN |
|
| 227 | 249 |
FROM ITSM_LOC |
| 228 | 250 |
WHERE UPPER_LOC_NO = 'D000001' |
| 229 | 251 |
AND LOC_NO != 'D000001' |
... | ... | @@ -240,6 +262,8 @@ |
| 240 | 262 |
sub_loc.LOC_ORDR , |
| 241 | 263 |
CONCAT(loc.LOC_LPAD, ",", LPAD(sub_loc.LOC_ORDR, 5, 0)) AS LOC_LPAD , |
| 242 | 264 |
sub_loc.GW_STATUS |
| 265 |
+ , sub_loc.USE_YN |
|
| 266 |
+ |
|
| 243 | 267 |
FROM ITSM_LOC AS sub_loc |
| 244 | 268 |
INNER JOIN loc |
| 245 | 269 |
ON loc.LOC_NO = sub_loc.UPPER_LOC_NO |
... | ... | @@ -251,9 +275,11 @@ |
| 251 | 275 |
FRST_REGIST_PNTTM AS frstRegistPnttm , |
| 252 | 276 |
LOC_ORDR AS sort , |
| 253 | 277 |
GW_STATUS |
| 278 |
+ , USE_YN AS useYn |
|
| 254 | 279 |
FROM LOC A |
| 255 | 280 |
WHERE GW_STATUS = '1' |
| 256 |
- AND DEPTH = #locDepth# |
|
| 281 |
+ AND DEPTH = #locDepth# |
|
| 282 |
+ AND USE_YN = 'Y' |
|
| 257 | 283 |
<isNotEqual property="upperLocNo" compareValue="0"> |
| 258 | 284 |
AND UPPER_LOC_NO = #upperLocNo# |
| 259 | 285 |
</isNotEqual> |
--- src/main/webapp/WEB-INF/jsp/uss/itsm/orgChart/OrgChartManage.jsp
+++ src/main/webapp/WEB-INF/jsp/uss/itsm/orgChart/OrgChartManage.jsp
... | ... | @@ -161,7 +161,6 @@ |
| 161 | 161 |
}) |
| 162 | 162 |
.bind('loaded.jstree', function(e, data) {
|
| 163 | 163 |
$(this).jstree(true).open_all(); |
| 164 |
- getSearchCondition_01("All" , 'Search');
|
|
| 165 | 164 |
cleanForm(); |
| 166 | 165 |
}) |
| 167 | 166 |
.on('select_node.jstree', function (e, data) {
|
... | ... | @@ -175,415 +174,16 @@ |
| 175 | 174 |
|
| 176 | 175 |
$('#nodeDepth').val(data.node.parents.length);
|
| 177 | 176 |
$('#upperMenuId').val(upperMenuId);
|
| 178 |
- |
|
| 179 |
- if(data.node.parents.length == 1){
|
|
| 180 |
- getSearchCondition_01("All" , 'Search');
|
|
| 181 |
- }else{
|
|
| 182 |
- var parents = data.node.parents ; |
|
| 183 |
- var parentsArray = []; |
|
| 184 |
- for(var i =0 ; i < data.node.parents.length ; i++){
|
|
| 185 |
- parentsArray.push(data.node.parents[i]) ; |
|
| 186 |
- } |
|
| 187 |
- |
|
| 188 |
- parentsArray.splice(parentsArray.indexOf("#"), 1);
|
|
| 189 |
- parentsArray.unshift(menuNo) ; |
|
| 190 |
- getSearchCondition_01(parentsArray, 'Search'); |
|
| 191 |
- } |
|
| 192 |
- |
|
| 193 |
- }) |
|
| 194 |
- .on('rename_node.jstree', function (e, data) { //매뉴명 변경
|
|
| 195 |
- var nodeId = data.node.id; |
|
| 196 |
- var oldText = data.old; |
|
| 197 |
- var newText = data.text; |
|
| 198 |
- var upperMenuId = data.node.parent; |
|
| 199 |
- |
|
| 200 |
- if (data.node.parents.length == 1) {
|
|
| 201 |
- alert("최상위 데이터는 변경할수 없습니다.");
|
|
| 202 |
- data.instance.refresh(); |
|
| 203 |
- }else if (data.node.parents.length > 0) {
|
|
| 204 |
- /* 부서명 변경 */ |
|
| 205 |
- if (oldText != newText) {
|
|
| 206 |
- if (confirm("데이터를 변경하시겠습니까?" )) {
|
|
| 207 |
- $.ajax({
|
|
| 208 |
- type:"POST", |
|
| 209 |
- url:"<c:url value='/uss/itsm/asset/assetSubNmUpdateAjax.do' />", |
|
| 210 |
- data:{ "menuNo" : nodeId,
|
|
| 211 |
- "upperMenuId" : upperMenuId, |
|
| 212 |
- "menuNm" : newText , |
|
| 213 |
- "nodeDepth" : data.node.parents.length, |
|
| 214 |
- "tabType": $('#tabType').val() },
|
|
| 215 |
- dataType:'jsonp', |
|
| 216 |
- success : function(returnData, status) {
|
|
| 217 |
- if (status == "success") {
|
|
| 218 |
- alert("데이터가 변경되었습니다.");
|
|
| 219 |
- } else { alert("ERROR"); return;}
|
|
| 220 |
- }, |
|
| 221 |
- error : function(request , status, error) {
|
|
| 222 |
- alert("데이터 변경이 실패되었습니다.");
|
|
| 223 |
- }, |
|
| 224 |
- complete : function () {
|
|
| 225 |
- data.instance.refresh(); |
|
| 226 |
- } |
|
| 227 |
- }); |
|
| 228 |
- } else {
|
|
| 229 |
- data.instance.refresh(); |
|
| 230 |
- } |
|
| 231 |
- } |
|
| 232 |
- }else{/* 매뉴 추가 */
|
|
| 233 |
- |
|
| 234 |
- } |
|
| 235 |
- }) |
|
| 236 |
- .on('delete_node.jstree', function (e, data) {
|
|
| 237 |
- /* 매뉴 삭제 */ |
|
| 238 |
- var upperMenuId = data.node.parent; |
|
| 239 |
- if(data.node.parents.length == 1){
|
|
| 240 |
- alert("최상위 데이터는 삭제할수 없습니다.");
|
|
| 241 |
- data.instance.refresh(); |
|
| 242 |
- }else{
|
|
| 243 |
- if(data.node.children.length != 0){
|
|
| 244 |
- alert("하위 데이터를 먼저 삭제 후 매뉴를 삭제해 주세요.");
|
|
| 245 |
- data.instance.refresh(); |
|
| 246 |
- }else{
|
|
| 247 |
- if (confirm("[" + data.node.text + "]" + " 데이터를 삭제하시겠습니까?")){
|
|
| 248 |
- $.ajax({
|
|
| 249 |
- type:"POST", |
|
| 250 |
- url:"<c:url value='/uss/itsm/asset/AssetSubCdDeleteAjax.do' />", |
|
| 251 |
- data:{ "menuNo" : data.node.id ,
|
|
| 252 |
- "upperMenuId" : upperMenuId, |
|
| 253 |
- "nodeDepth" : data.node.parents.length, |
|
| 254 |
- "tabType": $('#tabType').val() },
|
|
| 255 |
- dataType:'jsonp', |
|
| 256 |
- success : function(returnData, status) {
|
|
| 257 |
- if (status == "success") {
|
|
| 258 |
- alert("데이터가 삭제되었습니다.");
|
|
| 259 |
- } else { alert("ERROR"); return;}
|
|
| 260 |
- }, |
|
| 261 |
- error : function(request , status, error) {
|
|
| 262 |
- alert("데이터 삭제가 실패되었습니다.");
|
|
| 263 |
- }, |
|
| 264 |
- complete : function () {
|
|
| 265 |
- data.instance.refresh(); |
|
| 266 |
- } |
|
| 267 |
- }); |
|
| 268 |
- } else {
|
|
| 269 |
- data.instance.refresh(); |
|
| 270 |
- } |
|
| 271 |
- } |
|
| 272 |
- } |
|
| 273 |
- }) |
|
| 274 |
- .on('create_node.jstree', function(e, data){
|
|
| 275 |
- if($('#tabType').val()=='01' && data.node.parents.length > 2) {
|
|
| 276 |
- alert("품목별 매뉴는 더 이상 하위 데이터를 생성할수 없습니다.");
|
|
| 277 |
- data.instance.refresh(); |
|
| 278 |
- }else if($('#tabType').val()=='02' && data.node.parents.length > 3) {
|
|
| 279 |
- alert("위치별 매뉴는 더 이상 하위 데이터를 생성할수 없습니다.");
|
|
| 280 |
- data.instance.refresh(); |
|
| 281 |
- }else if($('#tabType').val()=='03' && data.node.parents.length > 4){
|
|
| 282 |
- alert("부서별 매뉴는 더 이상 하위 데이터를 생성할수 없습니다.");
|
|
| 283 |
- data.instance.refresh(); |
|
| 284 |
- }else{
|
|
| 285 |
- if (confirm("데이터를 추가하시겠습니까?")){
|
|
| 286 |
- var instance = data.instance; |
|
| 287 |
- var menuNm = data.text; |
|
| 288 |
- var upperMenuId = data.node.parent; |
|
| 289 |
- var menuOrdr = 1; |
|
| 290 |
- var childrenNodes = instance.get_node(upperMenuId).children; |
|
| 291 |
- childrenNodes.pop() ; |
|
| 292 |
- |
|
| 293 |
- // 하위 매뉴 있을 시 마지막 부서 sort_ord + 1 |
|
| 294 |
- if (childrenNodes.length > 1) {
|
|
| 295 |
- menuOrdr = childrenNodes.length ; |
|
| 296 |
- } |
|
| 297 |
- |
|
| 298 |
- $.ajax({
|
|
| 299 |
- type:"POST", |
|
| 300 |
- url:"<c:url value='/uss/itsm/asset/assetSubInsertAjax.do' />", |
|
| 301 |
- data:{ "menuNm" : menuNm,
|
|
| 302 |
- "upperMenuId" : upperMenuId, |
|
| 303 |
- "nodeDepth" :data.node.parents.length, |
|
| 304 |
- "nodeIds" : childrenNodes.toString(), |
|
| 305 |
- "tabType": $('#tabType').val()},
|
|
| 306 |
- dataType:'jsonp', |
|
| 307 |
- success : function(returnData, status) {
|
|
| 308 |
- if(returnData.status == "success") {
|
|
| 309 |
- alert("데이터가 추가 되었습니다.");
|
|
| 310 |
- //fn_select_menuNo(returnData.menuManageVO, returnData.menuManageVO.menuUserType); |
|
| 311 |
- newNodeId = returnData.newMenuNo ; //매뉴추가후 노드선택 |
|
| 312 |
- }else if(returnData.status == "dupl"){
|
|
| 313 |
- alert("중복된 아이디가 있습니다.\n 중복된 아이디변경/삭제후 다시 추가해 주세요\n"+ "("+returnData.menuManageVO.codeNm+")");
|
|
| 314 |
- return; |
|
| 315 |
- }else{
|
|
| 316 |
- alert("데이터 추가가 실패하였습니다.");
|
|
| 317 |
- return; |
|
| 318 |
- } |
|
| 319 |
- }, |
|
| 320 |
- error : function(request , status, error) {
|
|
| 321 |
- alert("데이터 추가가 실패되었습니다.")
|
|
| 322 |
- }, |
|
| 323 |
- complete : function () {
|
|
| 324 |
- data.instance.refresh(); |
|
| 325 |
- } |
|
| 326 |
- }); |
|
| 327 |
- }else{
|
|
| 328 |
- data.instance.refresh(); |
|
| 329 |
- } |
|
| 330 |
- } |
|
| 331 |
- }) |
|
| 332 |
- .on('move_node.jstree', function (e, data){
|
|
| 333 |
- /* 매뉴 위치 변경 */ |
|
| 334 |
- var instance = data.instance; |
|
| 335 |
- var menuNo = data.node.id; |
|
| 336 |
- var childrenNodes = instance.get_node(menuNo).children; |
|
| 337 |
- |
|
| 338 |
- if (confirm("데이터 위치를 변경하시겠습니까?" )){
|
|
| 339 |
- var upperMenuId = data.parent; |
|
| 340 |
- var sort = data.position + 1; |
|
| 341 |
- var sortOver = "A" ; |
|
| 342 |
- if(data.old_position > data.position){ //위치 후열로
|
|
| 343 |
- sortOver = "D"; |
|
| 344 |
- } |
|
| 345 |
- $.ajax({
|
|
| 346 |
- type:"POST", |
|
| 347 |
- url:"<c:url value='/uss/itsm/asset/AssetMoveAjax.do' />", |
|
| 348 |
- data:{ "menuNo":menuNo
|
|
| 349 |
- , "upperMenuId":upperMenuId |
|
| 350 |
- , "sort":sort |
|
| 351 |
- , "sortOver":sortOver |
|
| 352 |
- , "tabType": $('#tabType').val()
|
|
| 353 |
- }, |
|
| 354 |
- dataType:'jsonp', |
|
| 355 |
- success : function(returnData, status) {
|
|
| 356 |
- if (status == "success") {
|
|
| 357 |
- alert("데이터 위치가 변경되었습니다.");
|
|
| 358 |
- } else { alert("ERROR"); return;}
|
|
| 359 |
- }, |
|
| 360 |
- error : function(request , status, error) {
|
|
| 361 |
- alert("데이터 위치 변경이 실패되었습니다.");
|
|
| 362 |
- }, |
|
| 363 |
- complete : function () {
|
|
| 364 |
- data.instance.refresh(); |
|
| 365 |
- } |
|
| 366 |
- }); |
|
| 367 |
- } else {
|
|
| 368 |
- data.instance.refresh(); |
|
| 369 |
- } |
|
| 370 |
- }) |
|
| 371 |
- .on("refresh.jstree", function (e,data) {
|
|
| 372 |
- if(modiNodeId !=""){
|
|
| 373 |
- $('#'+data.instance.get_node(modiNodeId).a_attr.id).trigger("click");
|
|
| 374 |
- } |
|
| 375 |
- }); |
|
| 177 |
+ selectOrgChartInfoAjax(menuNo); |
|
| 178 |
+ }); |
|
| 376 | 179 |
} |
| 377 |
- |
|
| 378 |
- |
|
| 379 | 180 |
|
| 380 |
- /* 전체 셀렉트 박스 내용 첫번째 가져오기 */ |
|
| 381 |
- function getSearchCondition_01(nextValue, search){
|
|
| 382 |
- var nodeDepth = $('#nodeDepth').val();
|
|
| 383 |
- var parent = $('#parent').val();
|
|
| 384 |
- |
|
| 385 |
- $('#searchCondition_01').val("");
|
|
| 386 |
- $('#searchCondition_02').val("");
|
|
| 387 |
- $('#searchCondition_03').val("");
|
|
| 388 |
- $('#searchCondition_01').niceSelect('destroy').css('display','none') ;
|
|
| 389 |
- $('#searchCondition_02').niceSelect('destroy').css('display','none') ;
|
|
| 390 |
- $('#searchCondition_03').niceSelect('destroy').css('display','none') ;
|
|
| 391 |
- |
|
| 392 |
- $.ajax({
|
|
| 393 |
- type:"POST", |
|
| 394 |
- url:"<c:url value='/uss/itsm/orgChart/getOrgChartInitAjax_01.do' />", |
|
| 395 |
- data:{"nodeDepth": nodeDepth, "parent" : parent},
|
|
| 396 |
- dataType:'jsonp', |
|
| 397 |
- success : function(returnData, status) {
|
|
| 398 |
- if (status == "success"){
|
|
| 399 |
- if(returnData.resultList != undefined){
|
|
| 400 |
- $("select#searchCondition_01 option").remove(); //초기화
|
|
| 401 |
- if(returnData.resultList.length == 0){
|
|
| 402 |
- return; |
|
| 403 |
- } |
|
| 404 |
- var select_text_01 = "<option disabled value=''>선택</option>"; |
|
| 405 |
- |
|
| 406 |
- for(var i=0 ; i<returnData.resultList.length; i++){
|
|
| 407 |
- select_text_01 +="<option disabled value='"+returnData.resultList[i].id+"'>"+returnData.resultList[i].text+"</option>" ; |
|
| 408 |
- } |
|
| 409 |
- |
|
| 410 |
- if(nextValue == "All"){ //전체조회
|
|
| 411 |
- $('#searchCondition_01').append(select_text_01);
|
|
| 412 |
- $('#searchCondition_01').show();
|
|
| 413 |
- $('#searchCondition_01').val('');
|
|
| 414 |
- $('#searchCondition_01').niceSelect();
|
|
| 415 |
- }else{
|
|
| 416 |
- $('#searchCondition_01').append(select_text_01);
|
|
| 417 |
- $('#searchCondition_01').show();
|
|
| 418 |
- $('#searchCondition_01').val(nextValue);
|
|
| 419 |
- $('#searchCondition_01').niceSelect();
|
|
| 420 |
- if(nextValue !=undefined && nextValue.length > 2){ //(nextValue 트리에서 넘김)하위 검색이 있으면 다음 select박스로 넘김(트리구조에서 자동검색위해)
|
|
| 421 |
- getSearchCondition_02(nextValue, search); |
|
| 422 |
- }else{
|
|
| 423 |
- if(search == 'Search'){
|
|
| 424 |
- getList(nextValue[0]); //리스트 조회 |
|
| 425 |
- } |
|
| 426 |
- } |
|
| 427 |
- } |
|
| 428 |
- } |
|
| 429 |
- } else { alert("ERROR"); return;}
|
|
| 430 |
- }, |
|
| 431 |
- error : function(request , status, error) {
|
|
| 432 |
- }, |
|
| 433 |
- complete : function () {
|
|
| 434 |
- //return true; |
|
| 435 |
- deleteLodingBar(); |
|
| 436 |
- } |
|
| 437 |
- }); |
|
| 438 |
- }; |
|
| 439 |
- |
|
| 440 |
- /* 전체 셀렉트 박스 내용 두번째 가져오기 */ |
|
| 441 |
- function getSearchCondition_02(nextValue, search){
|
|
| 442 |
- var searchConditionVal_01 = $('#searchCondition_01').val();
|
|
| 443 |
- $('#searchCondition_02').val("");
|
|
| 444 |
- $('#searchCondition_03').val("");
|
|
| 445 |
- $('#searchCondition_02').niceSelect('destroy').css('display','none') ;
|
|
| 446 |
- $('#searchCondition_03').niceSelect('destroy').css('display','none') ;
|
|
| 447 |
- |
|
| 448 |
- if(searchConditionVal_01 ==""){
|
|
| 449 |
- return; |
|
| 450 |
- } |
|
| 451 |
- $.ajax({
|
|
| 452 |
- type:"POST", |
|
| 453 |
- url:"<c:url value='/uss/itsm/orgChart/getOrgChartInitAjax_02.do' />", |
|
| 454 |
- data:{"searchCondition_01" :searchConditionVal_01 },
|
|
| 455 |
- dataType:'jsonp', |
|
| 456 |
- success : function(returnData, status) {
|
|
| 457 |
- if (status == "success"){
|
|
| 458 |
- $("select#searchCondition_02 option").remove(); //초기화
|
|
| 459 |
- if(returnData.resultList != undefined){
|
|
| 460 |
- if(returnData.resultList.length == 0){
|
|
| 461 |
- return; |
|
| 462 |
- } |
|
| 463 |
- var select_text_01 = "<option disabled value=''>전체</option>"; |
|
| 464 |
- for(var i=0 ; i<returnData.resultList.length; i++){
|
|
| 465 |
- select_text_01 +="<option disabled value='"+returnData.resultList[i].id+"'>"+returnData.resultList[i].text+"</option>" ; |
|
| 466 |
- } |
|
| 467 |
- $('#searchCondition_02').append(select_text_01);
|
|
| 468 |
- $('#searchCondition_02').show();
|
|
| 469 |
- $('#searchCondition_02').val(nextValue);
|
|
| 470 |
- $('#searchCondition_02').niceSelect() ;
|
|
| 471 |
- if(!(nextValue == "" || nextValue==undefined)){
|
|
| 472 |
- if(nextValue.length > 3){
|
|
| 473 |
- getSearchCondition_03(nextValue, search); //하위 검색이 있으면 다음 select박스로 넘김 |
|
| 474 |
- }else{
|
|
| 475 |
- if(search == 'Search'){
|
|
| 476 |
- getList(nextValue[0]); //리스트 조회 |
|
| 477 |
- } |
|
| 478 |
- } |
|
| 479 |
- } |
|
| 480 |
- } |
|
| 481 |
- } else { alert("ERROR"); return;}
|
|
| 482 |
- }, |
|
| 483 |
- error : function(request , status, error) {
|
|
| 484 |
- }, |
|
| 485 |
- complete : function () {
|
|
| 486 |
- deleteLodingBar(); |
|
| 487 |
- } |
|
| 488 |
- }); |
|
| 489 |
- }; |
|
| 490 |
- |
|
| 491 |
- /* 전체 셀렉트 박스 내용 두번째 가져오기 */ |
|
| 492 |
- function getSearchCondition_03(nextValue, search){
|
|
| 493 |
- var searchConditionVal_02 = $('#searchCondition_02').val();
|
|
| 494 |
- $('#searchCondition_03').val("");
|
|
| 495 |
- $('#searchCondition_03').niceSelect('destroy').css('display','none') ;
|
|
| 496 |
- if(searchConditionVal_02 ==""){
|
|
| 497 |
- return; |
|
| 498 |
- } |
|
| 499 |
- $.ajax({
|
|
| 500 |
- type:"POST", |
|
| 501 |
- url:"<c:url value='/uss/itsm/orgChart/getOrgChartInitAjax_03.do' />", |
|
| 502 |
- data:{"searchCondition_02" :searchConditionVal_02 },
|
|
| 503 |
- dataType:'jsonp', |
|
| 504 |
- success : function(returnData, status) {
|
|
| 505 |
- if (status == "success"){
|
|
| 506 |
- $("select#searchCondition_03 option").remove(); //초기화
|
|
| 507 |
- if(returnData.resultList != undefined){
|
|
| 508 |
- if(returnData.resultList.length == 0){
|
|
| 509 |
- return; |
|
| 510 |
- } |
|
| 511 |
- var select_text_01 = "<option disabled value=''>전체</option>"; |
|
| 512 |
- for(var i=0 ; i<returnData.resultList.length; i++){
|
|
| 513 |
- select_text_01 +="<option disabled value='"+returnData.resultList[i].id+"'>"+returnData.resultList[i].text+"</option>" ; |
|
| 514 |
- } |
|
| 515 |
- $('#searchCondition_03').append(select_text_01);
|
|
| 516 |
- $('#searchCondition_03').show();
|
|
| 517 |
- $('#searchCondition_03').val(nextValue);
|
|
| 518 |
- $('#searchCondition_03').niceSelect();
|
|
| 519 |
- if(search == 'Search'){
|
|
| 520 |
- getList(nextValue[0]); //리스트 조회 |
|
| 521 |
- } |
|
| 522 |
- } |
|
| 523 |
- } else { alert("ERROR"); return;}
|
|
| 524 |
- }, |
|
| 525 |
- error : function(request , status, error) {
|
|
| 526 |
- }, |
|
| 527 |
- complete : function () {
|
|
| 528 |
- deleteLodingBar(); |
|
| 529 |
- } |
|
| 530 |
- }); |
|
| 531 |
- }; |
|
| 532 |
- |
|
| 533 |
- |
|
| 534 |
- function selectAllNum(object){
|
|
| 535 |
- if($(object).is(':checked')){
|
|
| 536 |
- $('#userList').find('input[type=checkbox]').prop("checked", true);
|
|
| 537 |
- }else{
|
|
| 538 |
- $('#userList').find('input[type=checkbox]').prop("checked", false);
|
|
| 539 |
- } |
|
| 540 |
- } |
|
| 541 |
- |
|
| 542 |
- function getList(id) {
|
|
| 543 |
- $.ajax({
|
|
| 544 |
- type:"POST", |
|
| 545 |
- url:"<c:url value='/cop/itsm/selectUserListAjax.do' />", |
|
| 546 |
- data:{"partIdx" :id },
|
|
| 547 |
- dataType:'jsonp', |
|
| 548 |
- success : function(returnData, status) {
|
|
| 549 |
- if (status == "success"){
|
|
| 550 |
- cleanForm(); |
|
| 551 |
- $('#userList tr').remove();
|
|
| 552 |
- var tempUserList = returnData.userList; |
|
| 553 |
- var authorList = returnData.authorList; |
|
| 554 |
- var num = 0; |
|
| 555 |
- $('#partIdx').val(id);
|
|
| 556 |
- for(var i=0; i < tempUserList.length; i++){
|
|
| 557 |
- num = num +1; |
|
| 558 |
- var tmpHtml="<tr>"; |
|
| 559 |
- tmpHtml+="<td><input type='checkbox' name='del' id='user_"+i+"' value='"+tempUserList[i].emplyrId+"'><label for='user_"+i+"'></label></td>" |
|
| 560 |
- tmpHtml+="<td>"+num+"</td>"; |
|
| 561 |
- tmpHtml+="<td>"+tempUserList[i].ofcpsNm+"</td>"; |
|
| 562 |
- tmpHtml+="<td>"+tempUserList[i].userNm+"</td>"; |
|
| 563 |
- tmpHtml+="<td class='orgWork'>"+tempUserList[i].authorCode+"</td>"; |
|
| 564 |
- tmpHtml+="<td>"+ (tempUserList[i].userWork == null ? '' : tempUserList[i].userWork) + "</td>"; |
|
| 565 |
- tmpHtml+="<td><input type='button' class='editBtn' onclick='selectUserInfo(\""+tempUserList[i].emplyrId+"\")'></td>"; |
|
| 566 |
- tmpHtml+="</tr>"; |
|
| 567 |
- $("#userList").append(tmpHtml);
|
|
| 568 |
- } |
|
| 569 |
- } else {
|
|
| 570 |
- alert("ERROR");
|
|
| 571 |
- return; |
|
| 572 |
- } |
|
| 573 |
- }, |
|
| 574 |
- error : function(request , status, error) {
|
|
| 575 |
- }, |
|
| 576 |
- complete : function () {
|
|
| 577 |
- } |
|
| 578 |
- }); |
|
| 579 |
- }; |
|
| 580 |
- |
|
| 581 |
- // 직원 정보 조회 |
|
| 582 |
- function selectUserInfo(id){
|
|
| 181 |
+ // 조직도 상세 조회 |
|
| 182 |
+ function selectOrgChartInfoAjax(id){
|
|
| 583 | 183 |
$.ajax({
|
| 584 | 184 |
type: "POST", |
| 585 |
- url: "/cop/itsm/selectUserInfoAjax.do", |
|
| 586 |
- data:{"emplyrId" :id },
|
|
| 185 |
+ url: "/cop/itsm/selectOrgChartInfoAjax.do", |
|
| 186 |
+ data:{"locNo" :id },
|
|
| 587 | 187 |
dataType:'jsonp', |
| 588 | 188 |
success: function (returnData, status) {
|
| 589 | 189 |
if(status == 'success'){
|
... | ... | @@ -592,25 +192,15 @@ |
| 592 | 192 |
}else if(returnData.result == 'auth_fail'){
|
| 593 | 193 |
alert("세션이 종료되었습니다.");
|
| 594 | 194 |
}else if(returnData.result =='success'){
|
| 195 |
+ var orgChartInfo = returnData.orgChartInfo; |
|
| 196 |
+ $('#locNo').val(orgChartInfo.locNo);
|
|
| 197 |
+ $('#locNm').val(orgChartInfo.locNm);
|
|
| 595 | 198 |
|
| 596 |
- $(".insert").hide();
|
|
| 597 |
- $(".update").show();
|
|
| 598 |
- |
|
| 599 |
- var userInfo = returnData.userInfo; |
|
| 600 |
- |
|
| 601 |
- $('#selectAuthorCode').val("");
|
|
| 602 |
- $('#selectAuthorCode option[value=\''+userInfo.authorCode+'\']').prop('selected', 'selected').change();
|
|
| 603 |
- $('#selectAuthorCode').niceSelect('update');
|
|
| 604 |
- $('#uniqId').val(userInfo.uniqId);
|
|
| 605 |
- $('#updateEmplyrId').val(userInfo.emplyrId);
|
|
| 606 |
- $('#emplyrId').val(userInfo.emplyrId);
|
|
| 607 |
- $('#emplyrNm').val(userInfo.userNm);
|
|
| 608 |
- $('#ofcpsNm').val(userInfo.ofcpsNm);
|
|
| 609 |
- $('#emplNo').val(userInfo.emplNo);
|
|
| 610 |
- $('#userWork').val(userInfo.userWork);
|
|
| 611 |
- $('#emailAdres').val(userInfo.emailAdres);
|
|
| 612 |
- $('#offmTelno').val(userInfo.offmTelno);
|
|
| 613 |
- $('#esntlId').val(userInfo.esntlId);
|
|
| 199 |
+ if(orgChartInfo.useYn == "Y"){
|
|
| 200 |
+ $('#useY').prop('checked',true);
|
|
| 201 |
+ }else{
|
|
| 202 |
+ $('#useN').prop('checked',true);
|
|
| 203 |
+ } |
|
| 614 | 204 |
} |
| 615 | 205 |
}else{
|
| 616 | 206 |
alert("조회에 실패하였습니다.");
|
... | ... | @@ -622,233 +212,18 @@ |
| 622 | 212 |
}); |
| 623 | 213 |
} |
| 624 | 214 |
|
| 625 |
- //직원 선택 삭제 |
|
| 626 |
- function getDelete(id){
|
|
| 627 |
- |
|
| 628 |
- var checkbox_check = false; |
|
| 629 |
- $('#userList').find('input[type=checkbox]').each(function() {
|
|
| 630 |
- if($(this).is(":checked")){
|
|
| 631 |
- checkbox_check = true; |
|
| 632 |
- } |
|
| 633 |
- }); |
|
| 215 |
+ |
|
| 216 |
+ // 조직도 수정 |
|
| 217 |
+ function updateOrgChartInfoAjax(){
|
|
| 634 | 218 |
|
| 635 |
- if(!checkbox_check){
|
|
| 636 |
- alert("선택된 항목이 없습니다.");
|
|
| 637 |
- return false; |
|
| 638 |
- } |
|
| 639 |
- |
|
| 640 |
- event.preventDefault(); |
|
| 641 |
- var frm = document.writeForm; |
|
| 642 |
- var data = new FormData(frm); |
|
| 219 |
+ var locNo = $("#locNo").val();
|
|
| 220 |
+ var useYn = $("input[name='useYn']:checked").val();
|
|
| 643 | 221 |
|
| 644 | 222 |
$.ajax({
|
| 645 | 223 |
type: "POST", |
| 646 |
- url: "/cop/itsm/deleteUserInfoAjax.do", |
|
| 647 |
- data: data, |
|
| 224 |
+ url: "/cop/itsm/updateOrgChartInfoAjax.do", |
|
| 225 |
+ data:{"searchCondition" :locNo, "useYn":useYn},
|
|
| 648 | 226 |
dataType:'jsonp', |
| 649 |
- success: function (returnData, status) {
|
|
| 650 |
- if(status == 'success'){
|
|
| 651 |
- if(returnData.result == 'fail'){
|
|
| 652 |
- alert("삭제에 실패하였습니다.");
|
|
| 653 |
- }else if(returnData.result == 'auth_fail'){
|
|
| 654 |
- alert("세션이 종료되었습니다.");
|
|
| 655 |
- }else if(returnData.result =='success'){
|
|
| 656 |
- alert("선택한 사원이 삭제 되었습니다.");
|
|
| 657 |
- |
|
| 658 |
- getList($('#partIdx').val());
|
|
| 659 |
- } |
|
| 660 |
- }else{
|
|
| 661 |
- alert("삭제에 실패하였습니다.");
|
|
| 662 |
- } |
|
| 663 |
- }, |
|
| 664 |
- error: function (e) {
|
|
| 665 |
- alert("등록에 실패하였습니다.");
|
|
| 666 |
- } |
|
| 667 |
- }); |
|
| 668 |
- } |
|
| 669 |
- |
|
| 670 |
- //직원 삭제 |
|
| 671 |
- function userInfoDelete(id){
|
|
| 672 |
- $.ajax({
|
|
| 673 |
- type: "POST", |
|
| 674 |
- url: "/cop/itsm/deleteUserInfoAjax.do", |
|
| 675 |
- data:{"del" :id },
|
|
| 676 |
- dataType:'jsonp', |
|
| 677 |
- success: function (returnData, status) {
|
|
| 678 |
- if(status == 'success'){
|
|
| 679 |
- if(returnData.result == 'fail'){
|
|
| 680 |
- alert("삭제에 실패하였습니다.");
|
|
| 681 |
- }else if(returnData.result == 'auth_fail'){
|
|
| 682 |
- alert("세션이 종료되었습니다.");
|
|
| 683 |
- }else if(returnData.result =='success'){
|
|
| 684 |
- alert("선택한 사원이 삭제 되었습니다.");
|
|
| 685 |
- |
|
| 686 |
- getList($('#partIdx').val());
|
|
| 687 |
- } |
|
| 688 |
- }else{
|
|
| 689 |
- alert("삭제에 실패하였습니다.");
|
|
| 690 |
- } |
|
| 691 |
- }, |
|
| 692 |
- error: function (e) {
|
|
| 693 |
- alert("등록에 실패하였습니다.");
|
|
| 694 |
- } |
|
| 695 |
- }); |
|
| 696 |
- } |
|
| 697 |
- |
|
| 698 |
- //숫자만 입력 |
|
| 699 |
- function validatePassword(character) {
|
|
| 700 |
- return /^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$/.test(character);
|
|
| 701 |
- } |
|
| 702 |
- |
|
| 703 |
- // 직원 등록 |
|
| 704 |
- function userInsert(){
|
|
| 705 |
- |
|
| 706 |
- var selectedDepths = $("select[id^=searchCondition_] option:selected[value!='']");
|
|
| 707 |
- if (selectedDepths.length == 0) { alert("부서를 선택해주세요."); return; }
|
|
| 708 |
- var id = 'searchCondition_0'+selectedDepths.length ; |
|
| 709 |
- $('#partIdx').val($('#'+id+' option:selected').val());
|
|
| 710 |
- |
|
| 711 |
- if($('#emplyrId').val() == ''){
|
|
| 712 |
- $('#emplyrId').focus();
|
|
| 713 |
- alert("ID를 입력해 주세요.");
|
|
| 714 |
- return false; |
|
| 715 |
- } |
|
| 716 |
- |
|
| 717 |
- |
|
| 718 |
- if($('#password').val() == ''){
|
|
| 719 |
- $('#password').focus();
|
|
| 720 |
- alert("패스워드를 입력해 주세요.");
|
|
| 721 |
- return false; |
|
| 722 |
- }else if(!validatePassword($('#password').val())){
|
|
| 723 |
- $('#password').val('');
|
|
| 724 |
- $('#password').focus();
|
|
| 725 |
- alert("비밀번호 최소 하나의 문자 + 하나의 숫자 + 하나의 특수 문자 포함, 최소 8자리, 최대 20자리입니다.");
|
|
| 726 |
- return; |
|
| 727 |
- } |
|
| 728 |
- |
|
| 729 |
- if($('#password2').val() == ''){
|
|
| 730 |
- $('#password2').focus();
|
|
| 731 |
- alert("패스워드 확인를 입력해 주세요.");
|
|
| 732 |
- return false; |
|
| 733 |
- }else if($('#password').val() != $('#password2').val()){
|
|
| 734 |
- $('#password2').focus();
|
|
| 735 |
- alert("입력된 패스워드와 일치하지 않습니다. 페스워드를 확인하여 주세요");
|
|
| 736 |
- return; |
|
| 737 |
- } |
|
| 738 |
- |
|
| 739 |
- if($('#emplyrNm').val() == ''){
|
|
| 740 |
- $('#emplyrNm').focus();
|
|
| 741 |
- alert("이름을 입력해 주세요.");
|
|
| 742 |
- return false; |
|
| 743 |
- } |
|
| 744 |
- |
|
| 745 |
- if($('#ofcpsNm').val() == ''){
|
|
| 746 |
- $('#ofcpsNm').focus();
|
|
| 747 |
- alert("직위는 필수 값입니다.");
|
|
| 748 |
- return; |
|
| 749 |
- } |
|
| 750 |
- |
|
| 751 |
- if($('#emplNo').val() == ''){
|
|
| 752 |
- $('#emplNo').focus();
|
|
| 753 |
- alert("사원번호는 필수 값입니다.");
|
|
| 754 |
- return; |
|
| 755 |
- } |
|
| 756 |
- |
|
| 757 |
- if($('#userWork').val() == ''){
|
|
| 758 |
- $('#userWork').focus();
|
|
| 759 |
- alert("담당업무는 필수 값입니다.");
|
|
| 760 |
- return; |
|
| 761 |
- } |
|
| 762 |
- |
|
| 763 |
- |
|
| 764 |
- $('#authorCode').val($('#selectAuthorCode option:selected').val());
|
|
| 765 |
- |
|
| 766 |
- event.preventDefault(); |
|
| 767 |
- var frm = document.writeForm; |
|
| 768 |
- var data = new FormData(frm); |
|
| 769 |
- |
|
| 770 |
- $.ajax({
|
|
| 771 |
- type: "POST", |
|
| 772 |
- url: "/cop/itsm/insertUserInfoAjax.do", |
|
| 773 |
- data: data, |
|
| 774 |
- dataType:'jsonp', |
|
| 775 |
- async: false, |
|
| 776 |
- processData: false, |
|
| 777 |
- contentType: false, |
|
| 778 |
- cache: false, |
|
| 779 |
- timeout: 600000, |
|
| 780 |
- success: function (returnData, status) {
|
|
| 781 |
- if(status == 'success'){
|
|
| 782 |
- if(returnData.result == 'fail'){
|
|
| 783 |
- alert("등록에 실패하였습니다.");
|
|
| 784 |
- }else if(returnData.result == 'auth_fail'){
|
|
| 785 |
- alert("세션이 종료되었습니다.");
|
|
| 786 |
- }else if(returnData.result =='success'){
|
|
| 787 |
- alert("등록에 성공하였습니다.");
|
|
| 788 |
- getList($('#partIdx').val());
|
|
| 789 |
- } |
|
| 790 |
- }else{
|
|
| 791 |
- alert("등록에 실패하였습니다.");
|
|
| 792 |
- } |
|
| 793 |
- }, |
|
| 794 |
- error: function (e) {
|
|
| 795 |
- alert("등록에 실패하였습니다.");
|
|
| 796 |
- } |
|
| 797 |
- }); |
|
| 798 |
- } |
|
| 799 |
- |
|
| 800 |
- function userPassword(){
|
|
| 801 |
- |
|
| 802 |
- |
|
| 803 |
- } |
|
| 804 |
- |
|
| 805 |
- // 직원 수정 |
|
| 806 |
- function userupdate(){
|
|
| 807 |
- var selectedDepths = $("select[id^=searchCondition_] option:selected[value!='']");
|
|
| 808 |
- if (selectedDepths.length == 0) { alert("부서를 선택해주세요."); return; }
|
|
| 809 |
- var id = 'searchCondition_0'+selectedDepths.length ; |
|
| 810 |
- $('#partIdx').val($('#'+id+' option:selected').val());
|
|
| 811 |
- |
|
| 812 |
- /* if($('#emplyrNm').val() == ''){
|
|
| 813 |
- $('#emplyrNm').focus();
|
|
| 814 |
- alert("이름을 입력해 주세요.");
|
|
| 815 |
- return false; |
|
| 816 |
- } |
|
| 817 |
- |
|
| 818 |
- if($('#ofcpsNm').val() == ''){
|
|
| 819 |
- $('#ofcpsNm').focus();
|
|
| 820 |
- alert("직위는 필수 값입니다.");
|
|
| 821 |
- return; |
|
| 822 |
- } |
|
| 823 |
- |
|
| 824 |
- if($('#emplNo').val() == ''){
|
|
| 825 |
- $('#emplNo').focus();
|
|
| 826 |
- alert("사원번호는 필수 값입니다.");
|
|
| 827 |
- return; |
|
| 828 |
- } |
|
| 829 |
- |
|
| 830 |
- if($('#userWork').val() == ''){
|
|
| 831 |
- $('#userWork').focus();
|
|
| 832 |
- alert("담당업무는 필수 값입니다.");
|
|
| 833 |
- return; |
|
| 834 |
- } */ |
|
| 835 |
- |
|
| 836 |
- $('#authorCode').val($('#selectAuthorCode option:selected').val());
|
|
| 837 |
- |
|
| 838 |
- event.preventDefault(); |
|
| 839 |
- var frm = document.writeForm; |
|
| 840 |
- var data = new FormData(frm); |
|
| 841 |
- |
|
| 842 |
- $.ajax({
|
|
| 843 |
- type: "POST", |
|
| 844 |
- url: "/cop/itsm/updateUserInfoAjax.do", |
|
| 845 |
- data: data, |
|
| 846 |
- dataType:'jsonp', |
|
| 847 |
- async: false, |
|
| 848 |
- processData: false, |
|
| 849 |
- contentType: false, |
|
| 850 |
- cache: false, |
|
| 851 |
- timeout: 600000, |
|
| 852 | 227 |
success: function (returnData, status) {
|
| 853 | 228 |
if(status == 'success'){
|
| 854 | 229 |
if(returnData.result == 'fail'){
|
... | ... | @@ -857,7 +232,6 @@ |
| 857 | 232 |
alert("세션이 종료되었습니다.");
|
| 858 | 233 |
}else if(returnData.result =='success'){
|
| 859 | 234 |
alert("수정에 성공하였습니다.");
|
| 860 |
- getList($('#partIdx').val());
|
|
| 861 | 235 |
} |
| 862 | 236 |
}else{
|
| 863 | 237 |
alert("수정에 실패하였습니다.");
|
... | ... | @@ -871,22 +245,10 @@ |
| 871 | 245 |
|
| 872 | 246 |
// 상세보기 초기화 |
| 873 | 247 |
function cleanForm(){
|
| 874 |
- $(".insert").show();
|
|
| 875 |
- $(".update").hide();
|
|
| 876 |
- |
|
| 877 |
-// getSearchCondition_01("All" , 'Search');
|
|
| 878 |
- |
|
| 879 |
- $('#emplyrId').val('');
|
|
| 880 |
- $('#updateEmplyrId').val('');
|
|
| 881 |
- $('#password').val('');
|
|
| 882 |
- $('#password2').val('');
|
|
| 883 |
- $('#emplyrNm').val('');
|
|
| 884 |
- $('#ofcpsNm').val('');
|
|
| 885 |
- $('#emailAdres').val('');
|
|
| 886 |
- $('#offmTelno').val('');
|
|
| 887 |
- $('#emplNo').val('');
|
|
| 888 |
- $('#userWork').val('');
|
|
| 889 |
- |
|
| 248 |
+ $('#locNo').val('');
|
|
| 249 |
+ $('#locNm').val('');
|
|
| 250 |
+ $('#usrN').prop('checked',false);
|
|
| 251 |
+ $('#usrY').prop('checked',false);
|
|
| 890 | 252 |
} |
| 891 | 253 |
</script> |
| 892 | 254 |
<style> |
... | ... | @@ -894,181 +256,49 @@ |
| 894 | 256 |
</style> |
| 895 | 257 |
</head> |
| 896 | 258 |
<body> |
| 897 |
- <form name="writeForm" id="writeForm" enctype="multipart/form-data" method="post"> |
|
| 898 |
- <input type="hidden" id="partIdx" name="partIdx"/> |
|
| 899 |
- <input type="hidden" id="uniqId" name="uniqId"/> |
|
| 900 |
- <input type="hidden" id="staffId" name="staffId"/> |
|
| 901 |
- <input type="hidden" id="esntlId" name="esntlId"/> |
|
| 902 |
- <input type="hidden" name="tabType" id="tabType" value="03"><!-- 기본값 품목별 --> |
|
| 903 |
- |
|
| 904 |
- |
|
| 905 |
- <div class="cont_area myPage_area orgn_area"> |
|
| 906 |
- <div class="cont_main_title"> |
|
| 907 |
- <img src="/direct/img/home_icon.png" alt=""> |
|
| 908 |
- <span id="cnt_cate_list"></span> |
|
| 909 |
- </div> |
|
| 910 |
- <div class="orgn_wrap"> |
|
| 911 |
- <div class="orgnSerch_area" style="width: 347px;overflow-x:auto;height:650px;border:1px solid #dde6e9;overflow-y:scroll;"> |
|
| 912 |
- <div class="orgnIn_wrap" id="kopost_organization" class="jstree_orgChart"> |
|
| 913 |
- </div> |
|
| 259 |
+ <div class="cont_area myPage_area orgn_area"> |
|
| 260 |
+ <div class="cont_main_title"> |
|
| 261 |
+ <img src="/direct/img/home_icon.png" alt=""> |
|
| 262 |
+ <span id="cnt_cate_list"></span> |
|
| 263 |
+ </div> |
|
| 264 |
+ <div class="orgn_wrap"> |
|
| 265 |
+ <div class="orgnSerch_area" style="width: 347px;overflow-x:auto;height:650px;border:1px solid #dde6e9;overflow-y:scroll;"> |
|
| 266 |
+ <div class="orgnIn_wrap" id="kopost_organization" class="jstree_orgChart"> |
|
| 914 | 267 |
</div> |
| 915 | 268 |
</div> |
| 916 |
- <div class="orgnDetail_wrap"> |
|
| 917 |
- <div class="orgnDetailteam_title"> |
|
| 918 |
- <li id="partNm">우체국물류지원단</li> |
|
| 919 |
- <li> |
|
| 920 |
- <!-- <div class="orgnListBtn"> |
|
| 921 |
- <input type="button" class="delListBtn" value="삭제" onclick="getDelete()"> |
|
| 922 |
- <input type="button" class="addListBtn" value="직원추가" onclick="cleanForm()"> |
|
| 923 |
- </div> --> |
|
| 924 |
- </li> |
|
| 925 |
- </div> |
|
| 926 |
- <div class="orgnList_wrap"> |
|
| 927 |
- <table class="orgnListTable" id="tbEmpList"> |
|
| 928 |
- <thead> |
|
| 929 |
- <tr> |
|
| 930 |
- <th> |
|
| 931 |
- <input type="checkbox" id="selectAll" onclick="selectAllNum(this);" > |
|
| 932 |
- <label for="selectAll"></label> |
|
| 933 |
- </th> |
|
| 934 |
- <th>번호</th> |
|
| 935 |
- <th>직급</th> |
|
| 936 |
- <th>이름</th> |
|
| 937 |
- <th>권한</th> |
|
| 938 |
- <!-- <th>사번</th> --> |
|
| 939 |
- <th>업무</th> |
|
| 940 |
- <th>수정</th> |
|
| 941 |
- <!-- <th>삭제</th> --> |
|
| 942 |
- </tr> |
|
| 943 |
- </thead> |
|
| 944 |
- <tbody id="userList"> |
|
| 945 |
- </tbody> |
|
| 946 |
- </table> |
|
| 947 |
- </div> |
|
| 948 |
- |
|
| 949 |
- <input type="hidden" id="selectPartIdx" /> |
|
| 950 |
- <input type="hidden" id="selectPartParents" /> |
|
| 951 |
- <div class="orgnDetail_title">직원상세보기</div> |
|
| 952 |
- <div class="list_wrap setting_list_wrap mypage_wrap"> |
|
| 953 |
- <table> |
|
| 954 |
- <tr> |
|
| 955 |
- <th> |
|
| 956 |
- <span class="required_area"><div class="listTitle">부  서</div></span> |
|
| 957 |
- </th> |
|
| 958 |
- <td id="select_part"> |
|
| 959 |
- <!-- <select name="searchCondition_01" id="searchCondition_01" class="asset_sec_sort" style="display:none;" onchange="getSearchCondition_02();"></select> |
|
| 960 |
- <select name="searchCondition_02" id="searchCondition_02" class="asset_thr_sort" style="display:none;" onchange="getSearchCondition_03();"></select> |
|
| 961 |
- <select name="searchCondition_03" id="searchCondition_03" class="asset_four_sort" style="display:none;"></select> --> |
|
| 962 |
- |
|
| 963 |
- <select name="searchCondition_01" id="searchCondition_01" class="asset_sec_sort" style="display:none;" ></select> |
|
| 964 |
- <select name="searchCondition_02" id="searchCondition_02" class="asset_thr_sort" style="display:none;" ></select> |
|
| 965 |
- <select name="searchCondition_03" id="searchCondition_03" class="asset_four_sort" style="display:none;"></select> |
|
| 966 |
- |
|
| 967 |
- |
|
| 968 |
- </td> |
|
| 969 |
- </tr> |
|
| 970 |
- <tr> |
|
| 971 |
- <th><span class="star_t"></span><div class="listTitle">관리자아이디</div></th> |
|
| 972 |
- <td class="insert"> |
|
| 973 |
- <input type="text" class="showMask read" name="emplyrId" id="emplyrId" title="사용자아이디" size="20" maxlength="20" readonly="true" /> |
|
| 974 |
- <!-- <a href="#" class="showMask"> |
|
| 975 |
- <button class="id_check_btn"> |
|
| 976 |
- <img src="/img/post/id_check_btn.png">중복아이디 검색 |
|
| 977 |
- </button> |
|
| 978 |
- </a> --> |
|
| 979 |
- </td> |
|
| 269 |
+ </div> |
|
| 270 |
+ <div class="orgnDetail_wrap"> |
|
| 271 |
+ <div class="orgnDetail_title">조직 상세보기</div> |
|
| 272 |
+ <div class="list_wrap setting_list_wrap mypage_wrap"> |
|
| 273 |
+ <table> |
|
| 274 |
+ <tr> |
|
| 275 |
+ <th><span class="star_t"></span><div class="listTitle">조직명</div></th> |
|
| 276 |
+ <td> |
|
| 277 |
+ <input class="read" name="locNm" id="locNm" title="조직명" type="text" size="20" value="" maxlength="60" readonly="true" /> |
|
| 278 |
+ </td> |
|
| 279 |
+ </tr> |
|
| 280 |
+ <tr> |
|
| 281 |
+ <th><span class="star_t"></span><div class="listTitle">조직코드</div></th> |
|
| 282 |
+ <td> |
|
| 283 |
+ <input class="read" name="locNo" id="locNo" title="조직코드" type="text" size="20" value="" maxlength="60" readonly="true" /> |
|
| 284 |
+ </td> |
|
| 285 |
+ </tr> |
|
| 286 |
+ <tr> |
|
| 287 |
+ <th><span class="star_t"></span><div class="listTitle">사용여부</div></th> |
|
| 288 |
+ <td> |
|
| 289 |
+ <input type="radio" name="useYn" id="useY" value="Y"> |
|
| 290 |
+ <label for="useY"></label><label for="">Y</label> |
|
| 980 | 291 |
|
| 981 |
- <td class="update" style="display: none"> |
|
| 982 |
- <input type="text" class="read" name="updateEmplyrId" id="updateEmplyrId" title="사용자아이디" size="20" maxlength="20" readonly="true" /> |
|
| 983 |
- </td> |
|
| 984 |
- </tr> |
|
| 985 |
- <!-- <tr class="insert"> |
|
| 986 |
- <th><span class="star_t"></span><div class="listTitle">비밀번호</div></th> |
|
| 987 |
- <td> |
|
| 988 |
- <input style="width: 88%;" name="password" id="password" type="password" title="비밀번호" size="20" maxlength="20" /> |
|
| 989 |
- <br/> |
|
| 990 |
- <span style="color:red;font-size:12px;">비밀번호 문자 + 숫자 + 특수 문자 포함, 최소 8~20자리</span> |
|
| 991 |
- </td> |
|
| 992 |
- </tr> |
|
| 993 |
- <tr class="insert"> |
|
| 994 |
- <th><span class="star_t"></span><div class="listTitle">비밀번호확인</div></th> |
|
| 995 |
- <td> |
|
| 996 |
- <input style="width: 88%;" name="password2" id="password2" title="비밀번호확인" type="password" size="20" maxlength="20" /> |
|
| 997 |
- </td> |
|
| 998 |
- </tr> --> |
|
| 999 |
- <tr> |
|
| 1000 |
- <th><span class="star_t"></span><div class="listTitle">이름</div></th> |
|
| 1001 |
- <td> |
|
| 1002 |
- <input class="read" name="emplyrNm" id="emplyrNm" title="이름" type="text" size="20" value="" maxlength="60" readonly="true" /> |
|
| 1003 |
- </td> |
|
| 1004 |
- </tr> |
|
| 1005 |
- <tr> |
|
| 1006 |
- <th><span class="star_t"></span><div class="listTitle">직위</div></th> |
|
| 1007 |
- <td> |
|
| 1008 |
- <input class="read" name="ofcpsNm" id="ofcpsNm" title="직위" type="text" size="20" value="" maxlength="60" readonly="true" /> |
|
| 1009 |
- </td> |
|
| 1010 |
- </tr> |
|
| 1011 |
- <!-- <tr> |
|
| 1012 |
- <th><span class="star_t"></span><div class="listTitle">사원번호</div></th> |
|
| 1013 |
- <td> |
|
| 1014 |
- <input class="read" name="emplNo" id="emplNo" title="사원번호" type="text" size="20" value="" maxlength="60" readonly="true" /> |
|
| 1015 |
- </td> |
|
| 1016 |
- </tr> --> |
|
| 1017 |
- <tr> |
|
| 1018 |
- <th><span class="star_t"></span><div class="listTitle">담당업무</div></th> |
|
| 1019 |
- <td> |
|
| 1020 |
- <input class="read" name="userWork" id="userWork" title="담당업무" type="text" size="20" value="" maxlength="60" readonly="true" /> |
|
| 1021 |
- </td> |
|
| 1022 |
- </tr> |
|
| 1023 |
- <tr> |
|
| 1024 |
- <th><div class="listTitle">이메일주소</div></th> |
|
| 1025 |
- <td> |
|
| 1026 |
- <input type="text" class="read" style="border:1px solid #ccc;border-radius:3px;height:30px;" readonly="true" name="emailAdres" id="emailAdres" title="이메일주소" cssClass="txaIpt" size="20" maxlength="50" /> |
|
| 1027 |
- </td> |
|
| 1028 |
- </tr> |
|
| 1029 |
- <tr> |
|
| 1030 |
- <th><span class="star_t"></span><div class="listTitle">권한</div></th> |
|
| 1031 |
- <td> |
|
| 1032 |
- <input type="hidden" id="authorCode" name="authorCode"> |
|
| 1033 |
- <select id="selectAuthorCode" name="selectAuthorCode" title="권한"> |
|
| 1034 |
- <c:forEach var="authorResult" items="${authorList}" varStatus="status">
|
|
| 1035 |
- <option value="<c:out value="${authorResult.authorCode}"/>" > <c:out value="${authorResult.authorNm}"/></option>
|
|
| 1036 |
- </c:forEach> |
|
| 1037 |
- </select> |
|
| 1038 |
- </td> |
|
| 1039 |
- </tr> |
|
| 1040 |
- <tr> |
|
| 1041 |
- <th><div class="listTitle">사무실전화번호</div></th> |
|
| 1042 |
- <td> |
|
| 1043 |
- <input type="text" class="read" name="offmTelno" id="offmTelno" readonly="true" title="사무실전화번호" cssClass="txaIpt" size="20" maxlength="15" style="border:1px solid #ccc;border-radius:3px;height:30px;" /> |
|
| 1044 |
- </td> |
|
| 1045 |
- </tr> |
|
| 1046 |
- </table> |
|
| 1047 |
- </div> |
|
| 1048 |
- <div class="saveBtn_area insert"> |
|
| 1049 |
- <input type="button" class="saveBtn" value="저장" onclick="userInsert()"> |
|
| 1050 |
- </div> |
|
| 1051 |
- <div class="setting_btn update" style="display: none;"> |
|
| 1052 |
- <input type="button" class="edit_btn" value="수정" onclick="userupdate()"> |
|
| 1053 |
- <input type="button" class="password_change_btn" value="페스워드 변경" onclick="userPassword()"> |
|
| 1054 |
- </div> |
|
| 292 |
+ <input type="radio" name="useYn" id="useN" value="N"> |
|
| 293 |
+ <label for="useN"></label><label for="">N</label> |
|
| 294 |
+ </td> |
|
| 295 |
+ </tr> |
|
| 296 |
+ </table> |
|
| 297 |
+ </div> |
|
| 298 |
+ <div class="saveBtn_area insert"> |
|
| 299 |
+ <input type="button" class="saveBtn" value="저장" onclick="updateOrgChartInfoAjax()"> |
|
| 1055 | 300 |
</div> |
| 1056 | 301 |
</div> |
| 1057 |
- </form> |
|
| 1058 |
- <div class="setDiv"> |
|
| 1059 |
- <div class="mask"></div> |
|
| 1060 |
- <div class="window"> |
|
| 1061 |
- <div class="id_check1"> |
|
| 1062 |
- <input type="button" href="#" class="close"> |
|
| 1063 |
- <span>아이디 중복 확인</span> |
|
| 1064 |
- </div> |
|
| 1065 |
- <div class="id_check2"> |
|
| 1066 |
- <span>사용할 아이디</span><input type="text" id="checkIdModal" onkeypress="press();" > |
|
| 1067 |
- </div> |
|
| 1068 |
- <div class="id_check3"> |
|
| 1069 |
- <span>중복확인을 실행하십시오</span><button onclick="fn_id_check(); return false;">중복확인조회</button> |
|
| 1070 |
- </div> |
|
| 1071 |
- </div> |
|
| 1072 |
- </div> |
|
| 302 |
+ </div> |
|
| 1073 | 303 |
</body> |
| 1074 | 304 |
</html>(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?