/* --------------------------------------------------------------------- ???????????????????????????? (SMMRJ00200_????????????????????????????.xrw - JScript ) - Version : 1) : Ver.1.00.01 : Create By taebum : 2009-12-07 ???? 10:05:51 ---------------------------------------------------------------------- */ /* --------------------------------------------------*/ /* type : function */ /* access : public */ /* desc : xforms-ready?? ???????? */ /* return : */ /* --------------------------------------------------*/ var isFirst = "Y"; function fInit() { ipt_reqfromstnddd.value = getNewDate().getAddDate(-2, "D").getDateFormat("YYYYMMDD").substr(0, 8); ipt_reqtostnddd.value = getCurrentDate().substr(0, 8); emrfGetCodeList(new Array("J000000001","J000000002","J000000003","J000000004","J000000005","J000000010","J000000014"), new Array("/root/init/J000000001","/root/init/J000000002","/root/init/J000000003","/root/init/J000000004","/root/init/J000000005","/root/init/J000000010","/root/init/J000000014")); // isFirst = "N"; fGetOpenPatInfo(); // fSearchPatNm(); model.refresh(); } function fInitMainList() { model.resetInstanceNode("/root/main/educordlists/educordlist"); model.removeNodeset("/root/main/educcntslists/educcntslist"); model.refresh(); } function fGetOpenPatInfo(){ var pid = ""; var orddd = ""; var cretno = ""; var hngnm = ""; var ioflag= ""; if (isPopup() == true) { // param ???????? pid = opener.javascript.getParameter("SMMRJ00200_pid"); orddd = opener.javascript.getParameter("SMMRJ00200_orddd"); cretno = opener.javascript.getParameter("SMMRJ00200_cretno"); hngnm = opener.javascript.getParameter("SMMRJ00200_hngnm"); ioflag = opener.javascript.getParameter("SMMRJ00200_ioflag"); } if ( pid == null ) { pid == ""; } if ( orddd == null ) { orddd == ""; } if ( cretno == null ) { cretno == ""; } if ( hngnm == null ) { hngnm == ""; } if ( ioflag == null ) { ioflag == ""; } if ( pid != "" && orddd !="" && cretno!="" && hngnm != "" && ioflag!= "") { model.setValue("/root/send/reqdata/pid", pid); model.setValue("/root/send/reqdata/ordtype", ioflag); input1.refresh(); model.makeValue("/root/init/condition/pid", pid); model.makeValue("/root/init/condition/orddd", orddd); model.makeValue("/root/init/condition/cretno", cretno); model.setValue("/root/send/reqdata/pnm", hngnm); input2.refresh(); fSearchOrdList(); if(pid != "" && hngnm =="" ){ model.setValue("/root/send/reqdata/pid", pid); fSearchPatNm(); } } else { if(pid != "" && hngnm == ""){ model.setValue("/root/send/reqdata/pid", pid); fSearchPatNm(); } } if ( pid == null || pid == "" ) { // ???? ???????? var node = getGlobalVariable("paminfo"); model.removeNodeset("/root/init/paminfo/list"); setCSVToNode("/root/init/paminfo", node); pid = model.getValue("/root/init/paminfo/list/pid"); model.makeValue("/root/send/reqdata/pid", pid); hngnm = model.getValue("/root/init/paminfo/list/hngnm"); model.makeValue("/root/send/reqdata/pnm", hngnm); ioflag = model.getValue("/root/init/paminfo/list/ioflag"); if(ioflag == "I"||ioflag == "D"||ioflag == "E"){ ioflag = "I"; } else if(ioflag == "O"){ ioflag = "O"; } else{ ioflag = "ALL"; } if(ioflag == "I"){ orddd = model.getValue("/root/init/paminfo/list/indd"); } else { orddd = model.getValue("/root/init/paminfo/list/orddd"); } cretno = model.getValue("/root/init/paminfo/list/cretno"); // orddd = "20060428"; // cretno = "800339501"; if ( pid == null ) { pid == ""; } if ( hngnm == null ) { hngnm == ""; } if ( orddd == null ) { orddd == ""; } if ( cretno == null ) { cretno == ""; } if ( pid != "" && orddd !="" && cretno!="" && hngnm != "") { model.makeValue("/root/init/condition/pid", pid); model.makeValue("/root/init/condition/orddd", orddd); model.makeValue("/root/init/condition/cretno", cretno); model.setValue("/root/send/reqdata/ordtype", ioflag); fSearchOrdList(); } else { model.setFocus("input1") } } } function fSearchPatNm(){ if(model.getValue("/root/send/reqdata/pid")==""){ return; }else{ fGetPid("/root/send/reqdata/pid", "/root/send/reqdata/pnm"); } input2.refresh(); } function fSearchOrdList(){ model.removeNodeset("/root/init/ordlists"); fInitMainList(); model.refresh(); var ordtype = radio2.value; if(!(model.getValue("/root/send/reqdata/pnm")=="")){ model.setValue("/root/send/reqdata/ordtype",ordtype); submit("TRMRJ00102"); if("" == model.getValue("/root/init/condition/pid") && "" == model.getValue("/root/init/condition/orddd") && "" == model.getValue("/root/init/condition/cretno") ){ combo1.select(0); } else { fChangeValueOrdList("open"); } } } function fOtherCheck(source, target){ var inOtherYn = isSearchString(document.controls(source).value, "999"); if(!inOtherYn){ document.controls(target).value = ""; } document.controls(target).visible=inOtherYn; } /** * @desc : ???????????? ???? ???? * @ * @param : refPid - ???????? ???? node path * refPnm - ?????? ???? node path * @return : * @authur : ?????? 2008.03.18 * @--------------------------------------------------- */ function fGetPid(refPid, refPnm) { model.setValue("/root/send/reqdata/pnm",""); input2.refresh(); model.removeNodeset("/root/init/ordlists"); fInitMainList(); combo1.refresh(); model.makeNode("/root/main/patinfo/patinfolist"); //?????????? 1???? ???? ???????? ???? ??????. model.makeValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1"); model.makeValue("/root/hidden/tmp/pidpopupinfo/autoflag", "Y"); model.makeValue("/root/hidden/tmp/pidpopupinfo/pid", model.getValue(refPid)); // model.makeValue("/root/hidden/tmp/pidpopupinfo/hngnm", model.getValue(refPnm)); if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){ model.makeValue("/root/hidden/tmp/pidpopupinfo/srchcond", '1'); } modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send"); model.resetInstanceNode("/root/source"); //???????? copy var popupendflag = model.getValue("/root/main/popupendflag"); if (popupendflag == "ok") { model.makeValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid")); if (refPnm == null) { refPnm = "" } if (refPnm != "") { model.makeValue(refPnm, model.getValue("/root/main/patinfo/patinfolist/hngnm")); } model.refresh(); fSearchOrdList(); } } function fChangeValueOrdList(value){ var ordtype = ""; var i = 0; if( value == "open" && model.getValue("/root/init/condition/pid") !="" && model.getValue("/root/init/condition/orddd") != "" && model.getValue("/root/init/condition/cretno") != ""){ for(i=1;i<=combo1.length; i++ ){ if(model.getValue("/root/init/ordlists/ordlist["+i+"]/suminfo") == model.getValue("/root/init/condition/pid")+model.getValue("/root/init/condition/orddd")+model.getValue("/root/init/condition/cretno")){ model.removenode("/root/init/condition"); combo1.select(i-1); } } }else{ model.setValue("/root/search/pid" , model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/pid")); model.setValue("/root/search/orddd" , model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/orddd")); model.setValue("/root/search/cretno" ,model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/cretno")); model.setValue("/root/search/ordtype" ,model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/ordtype")); model.setValue("/root/search/fromdd" ,model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/orddd")); ordtype = model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/ordtype"); if(ordtype == "I"){ checkbox1.deselect(0); }else{ checkbox1.select(0); } fSelectOrdCntsList(); } } function fSelectOrdCntsList(){ fInitMainList(); submit("TRMRJ00201"); fCheckOtherYn(ipt_eduwho9 ,chk_eduwho9.value); fCheckOtherYn(ipt_eduhandcap9 ,chk_eduhandcap9ck.value); fCheckOtherYn(ipt_eduway9 ,chk_eduway9ck.value); fCheckOtherYn(ipt_eduneed9 ,chk_eduneed9ck.value); if(rdo_eduwill.value== "999"){ fCheckOtherYn(ipt_eduwill9,"Y"); }else{ fCheckOtherYn(ipt_eduwill9,"N"); } fColDisableChk(); } function fClickDeleteBtn(){ var cur_row = datagrid1.row; // ?? ???? ???????? if (getUserId()!=model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/fstrgstrid")&&model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/fstrgstrid")!=""){ alert("???? ?????? ?????? ???????? ??????????...!"); return; } if (model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/linkcd")!="-"&&model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/fstrgstrid")!=""){ alert("???? ???????? ?????? ?????????? ???? ?????? ?????? ??????...!"); return; } var iStatus = datagrid1.rowstatus(cur_row); if(cur_row <= 0 || cur_row =="undefined") { alert("?????? ???? ?????????? ????????..."); return; } if (iStatus == 1 || iStatus == 3){ // ???? ?????? ?????? datagrid1.deleteitem(cur_row); }else if (iStatus == 4){ // ?????? ?????? ?????? datagrid1.removestatus(cur_row, "delete"); }else{ datagrid1.addStatus(cur_row, "delete"); } } function fGetAddPopup(){ vPid = model.getValue("/root/search/pid"); vOrddd = model.getValue("/root/search/orddd"); vCretno = model.getValue("/root/search/cretno"); setParameter("SPMRJ00200_pid" ,vPid); setParameter("SPMRJ00200_orddd" ,vOrddd); setParameter("SPMRJ00200_cretno",vCretno); modal("SPMRJ00200"); /* * ???? ???? ???? ?????? ???? ???? ?????? ???? */ // modal("SPMRJ00200", 1, 0, 0, "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; min:hidden, max:hidden;"); fSelectOrdCntsList(); } function fCheckOtherYn(ipt, param){ if(param=="Y"){ ipt.visible = true; }else{ ipt.visible = false; ipt.value = ""; } } function fColDisableChk(){ var rowSize = datagrid1.rows for (i=1;i