parent
ca50943d00
commit
ff830d38b9
14 changed files with 2482 additions and 1594 deletions
@ -0,0 +1,173 @@ |
||||
package kr.co.kihyun.beans.totsys.doc; |
||||
|
||||
import java.io.IOException; |
||||
import java.io.PrintWriter; |
||||
import java.sql.ResultSet; |
||||
import java.sql.SQLException; |
||||
import java.util.List; |
||||
import javax.servlet.ServletException; |
||||
import javax.servlet.annotation.WebServlet; |
||||
import javax.servlet.http.HttpServlet; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
|
||||
import kr.co.kihyun.beans.user.HttpSSOLogin; |
||||
import kr.co.kihyun.lang.Encoder; |
||||
import kr.co.kihyun.lang.MLong; |
||||
import kr.co.kihyun.lang.MString; |
||||
import kr.co.kihyun.text.html.ServletUtil; |
||||
|
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import kr.co.kihyun.db.*; |
||||
|
||||
@WebServlet("/servlet/kr.co.kihyun.beans.totsys.doc.HttpUserSetMerge") |
||||
public class HttpUserSetMerge extends HttpServlet { |
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpUserSetMerge.class); |
||||
|
||||
@Override |
||||
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { |
||||
doPost(req, res); |
||||
} |
||||
|
||||
@Override |
||||
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { |
||||
res.setContentType("text/html;charset=UTF-8"); |
||||
PrintWriter out = res.getWriter(); |
||||
|
||||
CommonDBManager db = new CommonDBManager(); |
||||
ResultSet rs = null; |
||||
|
||||
Long docID = MLong.parseLong(req.getParameter("docID")); |
||||
Long reportID = MLong.parseLong(req.getParameter("reportID")); |
||||
String usedType = MString.checkNull(req.getParameter("usedType")); |
||||
String deptIDs = Encoder.toJava(req.getParameter("deptIDs")); |
||||
String userIdsplit = deptIDs.replace(",", "','"); |
||||
String types = Encoder.toJava(req.getParameter("types")); |
||||
String return_msg = ""; |
||||
try { |
||||
StringBuilder sql = new StringBuilder(); |
||||
|
||||
sql.append(" UPDATE MOUMI_TOT_REPORT SET DEL_TYPE = 'Y' WHERE DOC_ID = '"+docID+"' \n"); |
||||
System.out.println(sql.toString()); |
||||
db.execUpdate(sql.toString()); |
||||
// db.commit();
|
||||
sql.delete(0,sql.length()); |
||||
|
||||
|
||||
sql.append(" MERGE INTO MOUMI_TOT_REPORT AA \n") |
||||
.append(" USING \n") |
||||
.append(" ( \n") |
||||
.append(" SELECT NVL(A.ID,B.ID) AS ID, \n") |
||||
.append(" A.USER_ID, \n") |
||||
.append(" A.DEL_TYPE, A.DEPT_ID, A.NAME \n") |
||||
.append(" FROM \n") |
||||
.append(" ( \n") |
||||
.append(" SELECT A.ID, B.ID AS USER_ID, A.DEL_TYPE \n") |
||||
.append(" , B.DEPT_ID AS DEPT_ID, B.NAME AS NAME \n") |
||||
.append(" FROM MOUMI_MUSER B LEFT OUTER JOIN MOUMI_TOT_REPORT A \n") |
||||
.append(" ON A.USER_ID = B.ID \n") |
||||
.append(" AND A.DOC_ID = '"+ docID +"' \n") |
||||
.append(" WHERE 1=1 \n") |
||||
.append(" AND B.ID IN ('"+ userIdsplit +"') \n") |
||||
.append(" ) A FULL OUTER JOIN \n") |
||||
.append(" ( \n") |
||||
.append(" SELECT A.ID, A.DEPT_ID, A.DEL_TYPE \n") |
||||
.append(" FROM MOUMI_TOT_REPORT A \n") |
||||
.append(" WHERE 1=1 \n") |
||||
.append(" AND A.DOC_ID = '"+ docID +"' \n") |
||||
.append(" ) B \n") |
||||
.append(" ON A.ID = B.ID \n") |
||||
.append(" ) BB \n") |
||||
.append(" ON (AA.ID = BB.ID) \n") |
||||
.append(" WHEN NOT MATCHED THEN \n") |
||||
.append(" INSERT ( \n") |
||||
.append(" AA.ID, \n") |
||||
.append(" AA.ACPT_CODE, \n") |
||||
.append(" AA.APPRO, \n") |
||||
.append(" AA.DOC_TYPE, \n") |
||||
.append(" AA.ATTACHMENTS, \n") |
||||
.append(" AA.CURRENT_REPOADM_ID, \n") |
||||
.append(" AA.DATA, \n") |
||||
.append(" AA.DEL_TYPE, \n") |
||||
.append(" AA.DEPT_ID, \n") |
||||
.append(" AA.USER_ID, \n") |
||||
.append(" AA.NOTE, \n") |
||||
.append(" AA.NUM, \n") |
||||
.append(" AA.PRSS, \n") |
||||
.append(" AA.RECOG, \n") |
||||
.append(" AA.REG_DATE, \n") |
||||
.append(" AA.REP_DOC_ID, \n") |
||||
.append(" AA.DOWN_DOC_ID, \n") |
||||
.append(" AA.SUBMIT_DATE, \n") |
||||
.append(" AA.TABLE_NUM, \n") |
||||
.append(" AA.TOT_DATA, \n") |
||||
.append(" AA.DOC_ID, \n") |
||||
.append(" AA.TYPE, \n") |
||||
.append(" AA.MNG_CODE, \n") |
||||
.append(" AA.OWNER_EMAIL, \n") |
||||
.append(" AA.OWNER_NAME, \n") |
||||
.append(" AA.OWNER_PHONE, \n") |
||||
.append(" AA.ACPT_DOC_CODE, \n") |
||||
.append(" AA.SECU_YN, \n") |
||||
.append(" AA.ATTACHMENTS_PATH, \n") |
||||
.append(" AA.FILE_CHECK \n") |
||||
.append(" ) \n") |
||||
.append(" VALUES( \n") |
||||
.append(" SQ_MOUMI.NEXTVAL , \n") |
||||
.append(" '', \n") |
||||
.append(" 0, \n") |
||||
.append(" 0, \n") |
||||
.append(" NULL, \n") |
||||
.append(" '', \n") |
||||
.append(" null, \n") |
||||
.append(" 'N', \n") |
||||
.append(" BB.DEPT_ID, \n") |
||||
.append(" BB.USER_ID, \n") |
||||
.append(" null, \n") |
||||
.append(" '', \n") |
||||
.append(" 0, \n") |
||||
.append(" 0, \n") |
||||
.append(" SYSDATE , \n") |
||||
.append(" '', \n") |
||||
.append(" '', \n") |
||||
.append(" '', \n") |
||||
.append(" 1, \n") |
||||
.append(" null, \n") |
||||
.append(" '"+ docID +"', \n") |
||||
.append(" 0, \n") |
||||
.append(" '', \n") |
||||
.append(" '', \n") |
||||
.append(" BB.NAME, \n") |
||||
.append(" '', \n") |
||||
.append(" '', \n") |
||||
.append(" 'N', \n") |
||||
.append(" '', \n") |
||||
.append(" 'N' \n") |
||||
.append(" ) \n") |
||||
.append(" WHEN MATCHED THEN \n") |
||||
.append(" UPDATE SET AA.DEL_TYPE = 'N' WHERE BB.DEPT_ID IS NOT NULL \n"); |
||||
|
||||
System.out.println(sql.toString()); |
||||
db.execUpdate(sql.toString()); |
||||
|
||||
db.commit(); |
||||
|
||||
return_msg = "사용자지정 변경이 완료되었습니다."; |
||||
} catch (SQLException e) { |
||||
db.rollback(); |
||||
return_msg = "사용자지정 변경중 오류가 발생하였습니다."; |
||||
e.printStackTrace(); |
||||
}catch(Exception e){ |
||||
e.printStackTrace(); |
||||
return_msg = "사용자지정 변경중 오류가 발생하였습니다."; |
||||
} finally { |
||||
db.execClose(); |
||||
out.println(ServletUtil.alert(return_msg)); |
||||
out.println(ServletUtil.getJavaScript("window.close();")); |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,582 @@ |
||||
<% |
||||
/* |
||||
* *********************************************************** |
||||
* @@ Program Name : edit_user_list2.jsp |
||||
* @@ Description : 제출기관지정 -> 사용자 지정 |
||||
* @@ Author : |
||||
* @@ Create Date : |
||||
* @@ History : 2014.09.18 Update by KWON,HAN, 2022.12.15 jskim |
||||
* ********************************************************** |
||||
*/ |
||||
%> |
||||
|
||||
<%@ page contentType="text/html; charset=UTF-8" |
||||
import="kr.co.kihyun.lang.MString" |
||||
import="java.net.URLDecoder" |
||||
import="kr.co.kihyun.lang.Encoder" |
||||
import="kr.co.kihyun.lang.MLong" |
||||
import="kr.co.kihyun.moumi.Moumi" |
||||
import="kr.co.kihyun.beans.totsys.report.ReportList" |
||||
import="kr.co.kihyun.beans.user.Dept" |
||||
import="kr.co.kihyun.beans.user.User" |
||||
import="kr.co.kihyun.moumi.report.MReport"%> |
||||
<%@page import="kr.co.kihyun.beans.entity.Repoadm"%> |
||||
<%@page import="javax.jdo.PersistenceManager"%> |
||||
<%@page import="javax.jdo.Transaction"%> |
||||
<%@page import="kr.co.kihyun.beans.entity.util.*"%> |
||||
<%@page import="kr.co.kihyun.beans.entity.TotReport"%> |
||||
|
||||
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> |
||||
|
||||
<% Long docID = MLong.parseLong(request.getParameter("docID"), null); |
||||
Long reportID = MLong.parseLong(request.getParameter("reportID"), null); |
||||
String usedType = MString.checkNull(request.getParameter("usedType")); |
||||
String totCount = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("totCount"))), ""); |
||||
|
||||
|
||||
int deptCount = 0; |
||||
String deptIDs = ""; |
||||
String deptNames = ""; |
||||
String deptNameLists = ""; |
||||
String deptTypes = ""; |
||||
String[] organNameList = null; |
||||
String[] upperNameList = null; |
||||
String[] deptIDList = null; |
||||
String[] deptNameList = null; |
||||
String[] userIDList = null; |
||||
String[] userNameList = null; |
||||
String sAutoExpanded = "N"; |
||||
|
||||
if (!"RECOG".equals(usedType)) { |
||||
ReportList reportList = new ReportList(); |
||||
//v2. 13.SQL 삽입 : JDO형식이므로 해결책에 따른 prepare SQL 문으로 변경할 수 없음 |
||||
reportList.executeQuery(docID, MReport.ALL); |
||||
//================= |
||||
deptCount = reportList.getCount(); |
||||
|
||||
User user = new User(); |
||||
|
||||
if (deptCount > 0) { |
||||
deptIDList = new String[deptCount]; |
||||
deptNameList = new String[deptCount]; |
||||
organNameList = new String[deptCount]; |
||||
upperNameList = new String[deptCount]; |
||||
|
||||
deptIDList = reportList.getDeptIDList(); |
||||
userIDList = reportList.getUserIDList(); |
||||
deptNameList = reportList.getDeptNameList(); |
||||
organNameList = reportList.getOrganNameOfUpperDept(); |
||||
upperNameList = reportList.getUpperNameList(); |
||||
deptIDs = userIDList[0] ; |
||||
deptNames = user.getName(userIDList[0]); |
||||
deptTypes = "user"; |
||||
deptNameLists = deptNameList[0] ; |
||||
// } else { |
||||
// deptIDs = deptIDList[0]; |
||||
// //deptNames = deptNameList[0]; |
||||
// // Dept dept = new Dept(); |
||||
// // deptNames = dept.getOrganNameOfUpperDept(deptIDList[0]) + "|" + dept.getUpperDeptName(deptIDList[0]) + "|" + dept.getName(deptIDList[0]); |
||||
// deptNames = organNameList[0] + "|" + MString.checkNull(upperNameList[0]) + "|" + deptNameList[0]; |
||||
// deptTypes = "dept"; |
||||
// } |
||||
|
||||
for (int d = 1; d < deptCount; d++) { |
||||
// if (docTypeList[d] == 1) { |
||||
deptIDs = deptIDs + "," + userIDList[d] ; |
||||
deptTypes = deptTypes + "," + "user"; |
||||
deptNames = deptNames + "," + user.getName(userIDList[d]) ; |
||||
deptNameLists = deptNameLists + "," + deptNameList[d] ; |
||||
} |
||||
} |
||||
} else{ |
||||
out.println("수신처를 추가 할 수 없습니다."); |
||||
} |
||||
|
||||
%> |
||||
|
||||
<!DOCTYPE html> |
||||
<html lang="ko"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>제출부서 선택</title> |
||||
<script type="text/javascript" src="/totsys/common/js/jquery-1.12.4.min.js"></script> |
||||
<script type="text/javascript" src="/totsys/common/js/jquery.cookie.js"></script> |
||||
<script type="text/javascript" src="/totsys/common/js/jquery.hotkeys.js"></script> |
||||
<script type="text/javascript" src="/totsys/common/js/jquery.jstree.js"></script> |
||||
<script type="text/javascript" src="/totsys/common/js/jquery.custom.indicator.js"></script> |
||||
|
||||
<link rel="stylesheet" href="/totsys/common/css/kecttep.css" type="text/css"> |
||||
<link rel="stylesheet" href="/totsys/common/css/popup.css" type="text/css"> |
||||
<link rel="stylesheet" href="/totsys/common/css/basic.css" type="text/css"> |
||||
<script src="/totsys/common/js/org_search.js"></script> |
||||
<script> |
||||
var delstate = false; |
||||
var userGroup = false; // 사용자정의 그룹인지 여부지정 변수 |
||||
|
||||
var selid = ''; // 지금 선택한 부서 |
||||
var selname = ''; |
||||
var seltype = ''; |
||||
var idList = ''; // 선택되어진 부서 리스트 |
||||
var nameList = ''; |
||||
var typeList = ''; |
||||
var deptNameList = ''; |
||||
|
||||
// 부서 추가 |
||||
function setDepts() { |
||||
document.list.idList.value = idList = "<%=deptIDs%>"; |
||||
document.list.typeList.value = typeList = "<%=deptTypes%>"; |
||||
document.list.nameList.value = nameList = "<%=deptNames%>"; |
||||
document.list.deptNameList.value = deptNameList = "<%=deptNameLists%>"; |
||||
|
||||
idList = idList + ""; |
||||
typeList = typeList + ""; |
||||
nameList = nameList + ""; |
||||
deptNameList = deptNameList + ""; |
||||
if (idList != "") |
||||
document.list.submit(); |
||||
} |
||||
|
||||
|
||||
//추가 버튼 |
||||
function getDeptId() { |
||||
var $ff = $("#leftFrame"); |
||||
$ff[0].contentWindow.$("#checkbtn").click(); |
||||
} |
||||
|
||||
function putSelId(sid, sName, sDeptName) { |
||||
selid = sid; |
||||
seltype = "user"; |
||||
selname = sName; |
||||
seldeptname = sDeptName; |
||||
|
||||
var id = selid; |
||||
var type = seltype; |
||||
var name = selname; |
||||
var deptname = seldeptname; |
||||
|
||||
if (idList == '') { |
||||
document.list.idList.value = idList = id; |
||||
document.list.typeList.value = typeList = type; |
||||
document.list.nameList.value = nameList = name; |
||||
document.list.deptNameList.value = deptNameList = deptname; |
||||
idList = idList + ""; |
||||
typeList = typeList + ""; |
||||
nameList = nameList + ""; |
||||
deptNameList = deptNameList + ""; |
||||
} else { |
||||
var isAdd = listAdd(idList, id, typeList, type, nameList, deptNameList); |
||||
document.list.idList.value = idList; |
||||
document.list.typeList.value = typeList; |
||||
if (isAdd) { |
||||
listAddn(nameList, name); |
||||
listAddDept(deptNameList, deptname); |
||||
} |
||||
document.list.nameList.value = nameList; |
||||
document.list.deptNameList.value = deptNameList; |
||||
} |
||||
} |
||||
|
||||
function putSelId2(sId, sDeptName, sOrganDeptName, sUpperDeptName) { |
||||
selid = sId; |
||||
selname = selname + "|" + sDeptName; |
||||
deptConfirm2(); |
||||
} |
||||
|
||||
function deptConfirm() { |
||||
if (selid == '') { |
||||
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>'); |
||||
} else if (seltype == "group") { |
||||
modSelect(); |
||||
} else { |
||||
id = selid; |
||||
name = selname; |
||||
type = seltype; |
||||
|
||||
if (idList == '') { |
||||
document.list.idList.value = idList = id; |
||||
document.list.typeList.value = typeList = type; |
||||
idList = idList + ""; |
||||
typeList = typeList + ""; |
||||
} else { |
||||
var isAdd = listAdd(idList, id, typeList, type); |
||||
document.list.idList.value = idList; |
||||
document.list.typeList.value = typeList; |
||||
} |
||||
document.list.submit(); |
||||
} |
||||
} |
||||
|
||||
// 부서 추가 |
||||
function deptConfirm2() { |
||||
if (selid == '') { |
||||
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>'); |
||||
} else if (seltype == "group") { |
||||
modSelect(); |
||||
} else { |
||||
var id = selid; |
||||
var type = 'user'; |
||||
var name = selname; |
||||
|
||||
if (idList == '') { |
||||
document.list.idList.value = idList = id; |
||||
document.list.typeList.value = typeList = type; |
||||
document.list.nameList.value = nameList = name; |
||||
idList = idList + ""; |
||||
typeList = typeList + ""; |
||||
nameList = nameList + ""; |
||||
} else { |
||||
var isAdd = listAdd(idList, id, typeList, type); |
||||
document.list.idList.value = idList; |
||||
document.list.typeList.value = typeList; |
||||
if (isAdd) { |
||||
listAddn(nameList, name); |
||||
} |
||||
document.list.nameList.value = nameList; |
||||
} |
||||
//document.list.submit(); |
||||
} |
||||
} |
||||
|
||||
function openerdeptConfirm() { //구성원으로 추가 |
||||
var gid = document.list.openeridList.value; |
||||
var gname = document.list.openernameList.value; |
||||
var gtype = document.list.openertypeList.value; |
||||
|
||||
var arrayID = gid.split(","); |
||||
var arrayName = gname.split(","); |
||||
var arrayType = gtype.split(","); |
||||
|
||||
var isChange = false; |
||||
|
||||
for (var i = 0; i < arrayID.length; i++) { |
||||
selid = arrayID[i]; |
||||
selname = arrayName[i]; |
||||
seltype = arrayType[i]; |
||||
|
||||
if (selid == '') { |
||||
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>'); |
||||
} else { |
||||
id = selid; |
||||
name = selname; |
||||
type = seltype; |
||||
|
||||
if (idList == '') { |
||||
document.list.idList.value = idList = id; |
||||
document.list.nameList.value = nameList = name; |
||||
document.list.typeList.value = typeList = type; |
||||
|
||||
idList = idList + ""; |
||||
nameList = nameList + ""; |
||||
typeList = typeList + ""; |
||||
} else { |
||||
var isAdd = listAdd(idList, id, typeList, type); |
||||
document.list.idList.value = idList; |
||||
document.list.typeList.value = typeList; |
||||
if (isAdd) { |
||||
listAddn(nameList, name); |
||||
} |
||||
document.list.nameList.value = nameList; |
||||
} |
||||
|
||||
isChange = true; |
||||
} |
||||
} |
||||
|
||||
if (isChange) { |
||||
document.list.submit(); |
||||
} |
||||
} |
||||
|
||||
function modSelect() { |
||||
var height = screen.height; |
||||
var width = screen.width; |
||||
var leftpos = width / 2 - 235; |
||||
var toppos = height / 2 - 235; |
||||
|
||||
if (seltype != "group") { |
||||
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.groupSelect")%>'); |
||||
return; |
||||
} |
||||
|
||||
var urlname = "/totsys/common/web/report_dept/modifier.jsp?groupID=" + selid; |
||||
post2 = window.open(urlname, "post2", "width=450, height=435, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos); |
||||
post2.focus(); |
||||
} |
||||
|
||||
|
||||
function listAdd(idList1, idList2, tList, tItem) { |
||||
var arrayID1 = idList1.split(","); |
||||
var arrayType = tList.split(","); |
||||
|
||||
var isEquals = true; |
||||
|
||||
if (idList1 == '') { |
||||
idList = idList1; |
||||
typeList = tList; |
||||
return false; |
||||
} |
||||
for (var i = 0; i < arrayID1.length; i++) { |
||||
if (idList2 == arrayID1[i] && tItem == arrayType[i]) { |
||||
isEquals = false; |
||||
break; |
||||
} |
||||
} |
||||
if (isEquals) { |
||||
idList1 += "," + idList2; |
||||
tList += "," + tItem; |
||||
} |
||||
idList = idList1; |
||||
typeList = tList; |
||||
return isEquals; |
||||
} |
||||
|
||||
//사용자명을 더한다. |
||||
function listAddn(nameList1, nameList2) { |
||||
//var arrayName1 = nameList1.split(","); |
||||
|
||||
if (nameList1 == '') { |
||||
nameList = nameList1; |
||||
return; |
||||
} |
||||
|
||||
nameList1 += "," + nameList2; |
||||
nameList = nameList1; |
||||
return; |
||||
} |
||||
|
||||
//부서명을 더한다. |
||||
function listAddDept(deptNameList1, dpetNameList2) { |
||||
//var arrayName1 = deptNameList1.split(","); |
||||
|
||||
if (deptNameList1 == '') { |
||||
deptNameList = deptNameList1; |
||||
return; |
||||
} |
||||
|
||||
deptNameList1 += "," + dpetNameList2; |
||||
deptNameList = deptNameList1; |
||||
return; |
||||
} |
||||
|
||||
|
||||
// 삭제 버튼 |
||||
function deptDelete() { |
||||
if (idList != '') { |
||||
deptFrame.movelist(); |
||||
document.list.submit(); |
||||
} |
||||
} |
||||
|
||||
function leftFrameDel(name, id, type) { |
||||
name = lastStrDel(name, ","); |
||||
id = lastStrDel(id, ","); |
||||
type = lastStrDel(type, ","); |
||||
if (nameList == '' && idList == '') { |
||||
document.list.idList.value = idList = id; |
||||
document.list.typeList.value = typeList = type; |
||||
document.list.nameList.value = nameList = name; |
||||
} else { |
||||
delList(id, type, name); |
||||
document.list.idList.value = idList; |
||||
document.list.typeList.value = typeList; |
||||
document.list.nameList.value = nameList; |
||||
} |
||||
|
||||
document.list.submit(); |
||||
return; |
||||
} |
||||
|
||||
function lastStrDel(str, delStr) { |
||||
var lastStr = str.lastIndexOf(delStr); |
||||
return str.substring(0, lastStr); |
||||
} |
||||
|
||||
function delList(idList1, tyList1, naList1) { |
||||
idList = idList1; |
||||
typeList = tyList1; |
||||
nameList = naList1; |
||||
return; |
||||
} |
||||
|
||||
// 부서 선택 시 유저 뽑아내기. |
||||
function userList(id, name, type) { |
||||
if (type != '') { |
||||
idAll = id; |
||||
selid = id; |
||||
selname = name; |
||||
} else { |
||||
idAll = ''; |
||||
selid = ''; |
||||
selname = ''; |
||||
} |
||||
seltype = type; |
||||
idUpper = false; |
||||
userGroup = false; |
||||
/* |
||||
document.userlist.id.value = id; |
||||
document.userlist.target="rightFrame"; |
||||
document.userlist.selectType.value="right"; |
||||
document.userlist.didList.value = idList; |
||||
|
||||
document.userlist.submit(); |
||||
*/ |
||||
} |
||||
|
||||
function groupList(id, name, type) { |
||||
idAll = id; |
||||
selid = id; |
||||
selname = name; |
||||
seltype = type; |
||||
idUpper = false; |
||||
userGroup = false; |
||||
/* |
||||
document.userlist.id.value = id; |
||||
document.userlist.target="rightFrame"; |
||||
document.userlist.selectType.value="right"; |
||||
document.userlist.didList.value = idList; |
||||
|
||||
document.userlist.submit(); |
||||
*/ |
||||
} |
||||
|
||||
function searchWord() { |
||||
var word = $('#search').val(); |
||||
word = $.trim(word); |
||||
$('#search').val(word); |
||||
if (word.length < 2) { |
||||
alert("검색어는 2글자 이상이어야 합니다."); |
||||
return; |
||||
} |
||||
var $ff = $("#leftFrame"); |
||||
$ff[0].contentWindow.$("#searchWord").text(word); |
||||
$ff[0].contentWindow.$("#search").click(); |
||||
} |
||||
|
||||
//조직도에서 검색된 노드로 포커스를 이동시킨다. strType : down, up |
||||
function focusMove(strType) { |
||||
//alert("strType = " + strType); |
||||
var $ff = $("#leftFrame"); |
||||
$ff[0].contentWindow.$("#moveType").text(strType); //포커스이동타입 |
||||
$ff[0].contentWindow.$("#focusMove").click(); |
||||
} |
||||
|
||||
//확인 버튼 |
||||
function deptComp() { |
||||
if (document.list.idList.value == "") { |
||||
<%if ("RECOG".equals(usedType)) {%> |
||||
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.approvalSelect")%>'); //승인자를 선택 해주세요. 승인받지 않고 제출하시려면 제출완료를 눌러주세요 |
||||
<%} else {%> |
||||
alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptComp")%>'); //제출요청 부서를 추가 해 주세요 |
||||
<%}%> |
||||
return; |
||||
} else { |
||||
$.customIndicator.show(window.self); /* indicator 추가 */ |
||||
document.deptSet.deptIDs.value = document.list.idList.value; |
||||
//document.deptSet.types.value = document.list.typeList.value; |
||||
//document.deptSet.deptNames.value = document.list.nameList.value; |
||||
//document.deptSet.deptNameLists.value = document.list.deptNameList.value; |
||||
|
||||
var deptTemp = document.list.idList.value.split(","); |
||||
var deptCounter = deptTemp.length; |
||||
|
||||
if(deptCounter <= 0) { |
||||
opener.dform.deptCountText.value = '<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.submitDevision")%>'; //제출기관을 선택해주세요. |
||||
} else { |
||||
opener.dform.deptCountText.value = deptCounter + '<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptCounter")%>'; //개의 부서를 선택하였습니다. |
||||
} |
||||
opener.dform.deptChange.value = "1"; |
||||
deptSet.submit(); |
||||
} |
||||
} |
||||
|
||||
//취소 버튼 |
||||
function deptCancel() { |
||||
window.close(); |
||||
} |
||||
|
||||
</script> |
||||
</HEAD> |
||||
|
||||
<BODY <%if (totCount == null || totCount.equals("")) {%> onload="setDepts();" <%}%>> |
||||
<form name="deptSet" method="post" action="/servlet/kr.co.kihyun.beans.totsys.doc.HttpUserSetMerge" target="_self"> |
||||
<input type="hidden" name="docID" value="<%=docID%>"> |
||||
<input type="hidden" name="reportID" value="<%=reportID%>"> |
||||
<input type="hidden" name="usedType" value="<%=usedType%>"> |
||||
<input type="hidden" name="deptIDs"> |
||||
<input type="hidden" name="types"> |
||||
</form> |
||||
<form name="list" method="post" action="/servlet/kr.co.kihyun.beans.user.HttpUserDocList" target="deptFrame"> |
||||
<input type="hidden" name="idList"> |
||||
<input type="hidden" name="nameList"> |
||||
<input type="hidden" name="typeList"> |
||||
<input type="hidden" name="deptNameList"> |
||||
<input type="hidden" name="openeridList"> |
||||
<input type="hidden" name="openernameList"> |
||||
<input type="hidden" name="openertypeList"> |
||||
</form> |
||||
|
||||
<!--타이틀 //--> |
||||
<div class="title"> |
||||
<div>제출기관지정</div> |
||||
</div> |
||||
<!--타이틀 //--> |
||||
<div class="disFlex lv1"> |
||||
<div class="deptListSide"> |
||||
<img alt="말머리" src="/totsys/common/images/ico_3.gif"> |
||||
<b><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%></b> |
||||
</div> |
||||
<div class="deptListCenter"></div> |
||||
<div class="deptListSide"><img alt="말머리" src="/totsys/common/images/ico_3.gif"><b>제출기관(부서)<!--%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.submitDept")%--></b></div> |
||||
</div> |
||||
<%if (!"RECOG".equals(usedType)) {%> |
||||
<div class="disFlex ml_5"> |
||||
<!-- 분류 선택 아이프레임 --> |
||||
|
||||
<iframe src="iframe/new_section_list4.html" width="300" height="21"></iframe> |
||||
</div> |
||||
<%}%> |
||||
<div class="disFlex"> |
||||
<div class="deptListSide"> |
||||
<!-- 부서 선택 아이프레임 --> |
||||
<iframe id="leftFrame" name="leftFrame" src="./iframe/newTreeUser.jsp" width="300" height="360" frameborder="0"></iframe> |
||||
</div> |
||||
<div class="deptListCenter center deptPt"> |
||||
<div> |
||||
<!--추가--> |
||||
<a href="javascript:getDeptId();"><img alt="추가" src="./images/new_dept_add.gif"/></a> |
||||
</div> |
||||
<div class="mt_5"> |
||||
<!--삭제--> |
||||
<a href="javascript:deptDelete();"><img alt="삭제" src="./images/new_dept_del.gif"/></a> |
||||
</div> |
||||
<!--구성원--> |
||||
<%if (!"RECOG".equals(usedType)) {%> |
||||
<div> |
||||
</div> |
||||
<%}%> |
||||
|
||||
</div> |
||||
<div class="deptListSide"> |
||||
<!-- 선택된 부서 리스트 아이프레임 --> |
||||
<iframe name="deptFrame" src="./iframe/selected_list.jsp"></iframe> |
||||
</div> |
||||
</div> |
||||
<table> |
||||
<tr> |
||||
<td> 검 색 </td> |
||||
<td><input id="search" name="search" type="text" class="inputtxt" value="" size="35" onkeyDown="if(event.keyCode === 13) { searchWord(); }" style="ime-mode:active;"> </td> |
||||
<td><a href="#" onclick="searchWord();"><img alt="찾기" src="/totsys/common/images/bt_search_inquiry2.gif"></a> </td> |
||||
<td><a href="#" onclick="focusMove('down');"><img alt="다음" src="/totsys/common/images/bt_down.jpg"></a> </td> |
||||
<td><a href="#" onclick="focusMove('up');"><img alt="이전" src="/totsys/common/images/bt_up.jpg"></a></td> |
||||
<td></td> |
||||
</tr> |
||||
</table> |
||||
<!-- 확인, 취소 버튼 --> |
||||
<div class="center mt_10" style="border-top: 1px solid #8ea6d6"> |
||||
<div class="mt_10"> |
||||
<a href="#" onclick="deptComp()"><img alt="확인" src="/totsys/common/images/bt_ok.gif"></a> |
||||
<a href="#" onClick="deptCancel()"><img alt="취소" src="/totsys/common/images/bt_cancle.gif"></a> |
||||
</div> |
||||
</div> |
||||
</body> |
||||
</HTML> |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue