123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/* ---------------------------------------------------------------------
-
- 수술 사용자정보조회 (SMMNP00001.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By Francis Choi
- : 2007.05.02
- ---------------------------------------------------------------------- */
- var xPathUser = "ds_UserData_list_userlist";
- var xPathUserPop = "/root/main/list";
- /* ------------------------------------------------- */
- /* desc : 사용자이름 불러오기 */
- /* param : pNodeID - UserId Node */
- /* pNodeNM - UserNm Node */
- /* return : */
- /* -------------------------------------------------- */
- function fUserEnter(pPath, pRow, pNodeID ,pNodeNM, pNodeDept, pNodeDeptNM, pData, pDOC, pRefCls, pDeptFlag, pSearchdd) {
- frmf_setParameter("SendData_Searchdd", pSearchdd);
- frmf_setParameter("SendData_SearchNM", "");
- //alert("pSearchdd : "+pSearchdd);
- var pParam = fUseridPopupData("TRMNP00001","SPMNP00001", pData, pRefCls, pDeptFlag, pSearchdd);
-
- fUserDataSet(pParam, pPath, pRow, pNodeID, pNodeNM, pNodeDept, pNodeDeptNM, pDOC, pSearchdd);
- }
- function fUseridPopup(pPath, iRow, pNodeID, pNodeNM, pNodeDept, pNodeDeptNM, pDOC, pDeptFlag, pSearchdd, pSearchNM) {
- frmf_setParameter("SendData_Searchdd", pSearchdd);
-
- if( !utlf_isNull(pSearchNM) ){
- frmf_setParameter("SendData_SearchNM", pSearchNM);
- }else{
- frmf_setParameter("SendData_SearchNM", "");
- }
-
- var pParam = fShowModal("SPMNP00001");
- //alert("pSearchdd : "+pSearchdd);
- fUserDataSet(pParam, pPath, iRow, pNodeID, pNodeNM, pNodeDept, pNodeDeptNM, pDOC, pSearchdd);
- }
- /* --------------------------------------------------------*/
- /* model.getValue(); 를 함수로 만들었습니다. */
- /* param1 : node는 grid의 xPath입니다. */
- /* param2 : row는 grid에서 선택한 row값입니다. */
- /* param3 : element는 getvalue할 해당 element 명입니다. */
- /* */
- /* 해당 getvalue값을 return 해줍니다. */
- /* return 하지 않으면 해당값을 가져올 수 없습니다. */
- /* --------------------------------------------------------*/
- function fGetValue(node, row, element) {
-
- var rtnValue = node.getColumn(row, element).replace(/(^\s*)|(\s*$)/g, "");
- return rtnValue;
- }
- /* ------------------------------------------------- */
- /* desc : 사용자이름 불러오기 */
- /* param : pNodeID - UserId Node */
- /* pNodeNM - UserNm Node */
- /* return : */
- /* -------------------------------------------------- */
- function fUseridPopupData(pMapID, pProgID, pData, pRefCls, pDeptFlag, pSearchdd) { // userid, usernm, all
- var iParam="";
-
- if( utlf_isNull(pData) ){
- return iParam;
- }
-
- if( utlf_isNull(pRefCls) ){
- pRefCls = "all"; // userid, usernm, all
- }
-
- dsf_createDs("ds_temp_send", [{col:"searchitem", type:"string", size:256}
- ,{col:"flag", type:"string", size:256}
- ,{col:"deptflag", type:"string", size:256}
- ,{col:"searchdd", type:"string", size:256}]);
- ds_temp_send.addRow();
-
- if( this.objects[xPathUser] == null )
- dsf_createDs(xPathUser);
- eval(xPathUser).clearData();
-
- ds_temp_send.setColumn(0, "searchitem", pData);
- ds_temp_send.setColumn(0, "flag", pRefCls);
- ds_temp_send.setColumn(0, "deptflag", pDeptFlag);
- ds_temp_send.setColumn(0, "searchdd", pSearchdd);
- //alert(pMapID);
-
- var oParam = {};
- oParam.id = "TRMNP00001";
- oParam.service = "opanstapp.OpAnstRec";
- oParam.method = "reqGetUserList";
- oParam.inds = "req=ds_temp_send";
- oParam.outds = "ds_UserData_list_userlist=userlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNP00001";
- tranf_submit(oParam);
-
- var NodeCnt = ds_UserData_list_userlist.rowcount;
- var iNode = ds_UserData_list_userlist;
- switch(NodeCnt) {
- case 0 : sysf_messageBox(pData + "에 해당하는 자료가", "I004");
- break;
- case 1 : iParam = fGetValue(iNode, 0, "userid" ) + "|"
- + fGetValue(iNode, 0, "usernm" ) + "|"
- + fGetValue(iNode, 0, "posinstcd") + "|"
- + fGetValue(iNode, 0, "posinstnm") + "|"
- + fGetValue(iNode, 0, "posdeptcd") + "|"
- + fGetValue(iNode, 0, "posdeptnm") ;
- break;
- default : iParam = fShowModal(pProgID);
- }
-
- return iParam;
- }
-
- function fShowModal(pProgID) {
- var xpos = system.clientToScreenX(this, this.position.left)-100;
- var ypos = system.clientToScreenY(this, this.position.top)-100;
-
- //2008-09-04 오후 10:31:18 taebum 주석처리함.
- //modal(pProgID, 1, xpos, ypos,pProgID, xPathUser, xPathUserPop);
- frmf_modal(pProgID,pProgID,null,"",1,xpos,ypos,"","","","","","M"); //yjh : SPMNP00001화면 개발
- var iProperties = frmf_getParameter("SendData");
-
- // alert(iProperties);
-
- return iProperties;
- }
- function fUserDataSet(pData, pPath, pRow, pNodeID,pNodeNM, pNodeDept, pNodeDeptNM, pDoc, pSearchdd) {
-
- if( utlf_isNull(pData) ){
- return;
- }
-
- // iParam_userid 0 사용자ID
- // iParam_usernm 1 사용자명
- // iParam_posinstnm 2 소속기관명
- // iParam_posinstcd 3 소속기관코드
- // iParam_posdeptcd 4 소속부서코드
- // iParam_posdeptnm 5 소속부서명
-
- var iSplit_Value = pData.split("|");
- var sUserid = ""; // 사용자ID
- var sUsernm = ""; // 사용자명
- var sPosdeptcd = ""; // 소속부서코드
- var sPosdeptnm = ""; // 소속부서명
-
- if( iSplit_Value.length > 0 ){
- sUserid = iSplit_Value[0].replace(/(^\s*)|(\s*$)/g, ""); // 사용자ID
- sUsernm = iSplit_Value[1].replace(/(^\s*)|(\s*$)/g, ""); // 사용자명
- sPosdeptcd = iSplit_Value[4].replace(/(^\s*)|(\s*$)/g, ""); // 소속부서코드
- sPosdeptnm = iSplit_Value[5].replace(/(^\s*)|(\s*$)/g, ""); // 소속부서명
- }
- pPath.updatecontrol = false;
- pPath.enableevent = false;
- pPath.setColumn(pRow, pNodeID, sUserid); // 사용자ID
- pPath.setColumn(pRow, pNodeNM, sUsernm); // 사용자명
-
- //group3.switch1.case1.grd_opeu1.showEditor(false);
- if( !utlf_isNull(pNodeDept) && !utlf_isNull(pPath.getColumnInfo(pNodeDept)) ){
- pPath.setColumn(pRow, pNodeDept, sPosdeptcd); // 소속부서코드
- pPath.setColumn(pRow, pNodeDeptNM, sPosdeptnm); // 소속부서명
- }
-
- if( pPath.getRowType(pRow) != 2 && pPath.getRowType(pRow) != 8 ){
- pPath.setRowType(pRow, 4);
- }
-
- pPath.updatecontrol = true;
- pPath.enableevent = true;
-
- if( !utlf_isNull(pDoc) ){
- pDoc.showEditor(false);
- pDoc.showEditor(true);
- }
- }
-
- ]]></Script>
|