12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 서식SET관리 ( SMMRF03100_서식SET.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- * 수정이력:
- 2008-11-26 fFormInit() 과 코드 불러오는 함수 파라미터 변경.
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var refresh_u = 0;
- var refresh_d = 0;
- var refresh_a = 0;
- var sSETLIST = "/root/main/indxlist/item";
- var sSETLIST_HIDDEN = "/root/hidden/indxlist/item";
- var sMOUSE_CLK_STATUS; //마우스 클릭 좌우버튼 구분
- //var obj; //트리뷰 구분
- /**
- * @desc : 폼초기화
- * @
- * @param : flag (0:서식목록, 1:서식셋관리)
- * @return :
- * @---------------------------------------------------
- */
- function fFormInit(flag){
- // 폴더명칭 popup
- grup_saveas.visible = "false";
- model.removeNodeset("/root/main/formlist/row");
-
- // 부서코드 리스트 불러오기...
- // 과 코드 불러오는 함수 파라미터 변경.
- //mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/deptlist/orddept", "D");
- //mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/deptlist/orddept", "O");
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/deptlist/orddept", "A");
-
- addComboInstance("/root/init/deptlist/orddept", "deptcd^depthngnm", "-^전체", "dept"); //진료과 전체항목 추가
-
- /*model.setValue("/root/cond/orddeptcd", "-");
- reqGetDeptList("/root/send/reqdeptlist", "/root/init/deptlist", "", "012");
- model.makeValue("/root/init/deptlist/orddept/deptcd","ALL");
- model.makeValue("/root/init/deptlist/orddept/deptnm","전체");
- */
- model.refresh();
- model.setValue("/root/send/reqformlist/formdeptcd",getUserInfo("dutplcecd"));
-
-
- // admin 인가? 보여줄것만 보여준다..
- // 관리자 : 개인, 과, 전체 등록/수정/삭제 가능
- // 사용자 : 개인만 가능
- var result = fUserAdmin();
- // var result = true;
- if (result == true)
- {
- grup_srch1.visible = "true";
- grup_srch2.visible = "true";
- model.setValue("/root/send/cond/admin", "true");
- } else {
- grup_srch1.visible = "false";
- grup_srch2.visible = "false";
- model.setValue("/root/send/cond/admin", "false");
- // 사용자정보 셋.
- model.setValue("/root/send/cond/userid", getUserId());
- model.setValue("/root/send/cond/usernm", getUserInfo("usernm"));
- model.setValue("/root/send/cond/deptcd", getUserInfo("dutplcecd"));
- model.setValue("/root/send/cond/mydeptcd", getUserInfo("dutplcecd"));
- model.setValue("/root/send/cond/jobkind", getUserInfo("jobkindcd"));
-
- }
- model.toggle("case_dept");
- btn_dept.dispatch("DOMActivate");
- // 디폴트 트리뷰
- if (flag == 0 ) {
- // 서식목록일때만 과코드 부여해준다..
- model.setValue("/root/send/reqdata/deptcd", getUserInfo("dutplcecd"));
- // Switch (개인,과,전체,서식목록)
- sw_setflag.case_user.selected = "false";
- sw_setflag.case_dept.selected = "true";
- sw_setflag.case_all.selected = "false";
- sw_setflag.case_list.selected = "false";
- sw_setflag.refresh();
- // 과 목록 보여주자~
- fSetIndxListSelect("D");
- } else {
- // Switch (개인,과,전체,서식목록)
- sw_setflag.case_user.selected = "false";
- sw_setflag.case_dept.selected = "true";
- sw_setflag.case_all.selected = "false";
- sw_setflag.refresh();
-
- // 과 목록 보여주자~
- fSetIndxListSelect("D");
-
- }
- }
- /**
- * @desc : 버튼 클릭 (개인/과/전체)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetIndxListSelect(setflag){
- model.setValue("/root/send/cond/setflag", setflag);
- model.refresh();
-
- grup_saveas.visible = "false";
- // 개인
- if (setflag == "U") {
- btn_user.selected = "true";
- if (refresh_u == 0) {
- submit("TRMRF03102");
-
- model.removeNodeset("/root/main/indxlist_u/item");
- copyNode(model, model, "/root/main/indxlist_u", "/root/main/indxlist");
- trv_indxlist_u.rebuild();
- } else {
- copyNodeset("/root/main/indxlist/item", "/root/main/indxlist_u/item");
- model.refresh();
- }
- refresh_u = 1;
- // 첫번째 만 오픈하자!!
- trv_indxlist_u.expand(0, true);
- // 과
- } else if (setflag == "D") {
- btn_dept.selected = "true";
- if (refresh_d == 0) {
- submit("TRMRF03102");
-
- model.removeNodeset("/root/main/indxlist_d/item");
- copyNode(model, model, "/root/main/indxlist_d", "/root/main/indxlist");
- trv_indxlist_d.rebuild();
- } else {
- copyNodeset("/root/main/indxlist/item", "/root/main/indxlist_d/item");
- model.refresh();
- }
- refresh_d = 1;
- // 첫번째 만 오픈하자!!
- trv_indxlist_d.expand(0, true);
- // 공통
- } else if (setflag == "A") {
- btn_all.selected = "true";
- if (refresh_a == 0) {
- submit("TRMRF03102");
-
- model.removeNodeset("/root/main/indxlist_a/item");
- copyNode(model, model, "/root/main/indxlist_a", "/root/main/indxlist");
- model.refresh();
- } else {
- copyNodeset("/root/main/indxlist/item", "/root/main/indxlist_a/item");
- model.refresh();
- }
- refresh_a = 1;
- // 첫번째 만 오픈하자!!
- trv_indxlist_a.expand(0, true);
-
- }
- }
- /**
- * @desc : 과 선택
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDeptCDSelect(){
- model.setValue("/root/send/cond/userid","");
- submit("TRMRF03102");
- model.removeNodeset("/root/main/indxlist_d/item");
- //model.copyNode("/root/main/indxlist_d", "/root/main/indxlist");
- copyNode(model, model, "/root/main/indxlist_d", "/root/main/indxlist");
- model.refresh();
- }
- /**
- * @desc : 사용자정보
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetUserInfo(userid,usernm,deptcd , instcd)
- {
- model.setValue("/root/send/cond/userid", userid);
- model.setValue("/root/send/cond/usernm", usernm);
- model.setValue("/root/send/cond/deptcd", deptcd);
- ipt_saveas_userid.text = usernm;
- ipt_saveas_userid.refresh();
- submit("TRMRF03102");
- model.makeValue("/root/temp/instcd",instcd); //조회한 사용자 기관코드
- model.removeNodeset("/root/main/indxlist_u/item");
- //model.copyNode("/root/main/indxlist_u", "/root/main/indxlist");
- copyNode(model, model, "/root/main/indxlist_u", "/root/main/indxlist");
- model.refresh();
- }
-
- /**
- * @desc : 트리뷰 셋
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetTreeView(){
- var setflag = model.getValue("/root/send/cond/setflag");
- var rtn = "";
- if (setflag == "U") {
- rtn = "trv_indxlist_u" + "|" + "/root/main/indxlist_u/item";
- }
- if (setflag == "D") {
- rtn = "trv_indxlist_d" + "|" + "/root/main/indxlist_d/item";
- }
- if (setflag == "A") {
- rtn = "trv_indxlist_a" + "|" + "/root/main/indxlist_a/item";
- }
-
- return rtn;
- }
- /**
- * @desc : 마우스 오른쪽 버튼 팝업창
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- * 1. 마우스 우클릭인가?
- * 2. 관리자인가? 사용자인가?
- * 3. 구분이 개인인가? 과인가? 전체인가?
- * 4. 폴더인가? 파일인가? 루트인가?
- */
- function fMouseRghtBtnPopup()
- {
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- if(event.button == 3)
- {
- if(obj.isCell(event.target) && obj.selectedIndex > -1)
- {
- var item = obj.item(obj.selectedIndex);
- var rowpos = item.index + 1;
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- var item_length = obj.length;
-
- // 루트인가? (보여주는 부분으로..)
- if (depth == 1 && item_length > 1) {
- window.setPopupMenu(false); return;
- }
-
- // 관리자인가? 구분이 개인인가?
- var admin = model.getValue("/root/send/cond/admin");
- var setflag = model.getValue("/root/send/cond/setflag");
-
- if(setflag =="U"){ // 개인 indx
- sSETLIST = "/root/main/indxlist_u/item"
- }else if(setflag =="D"){ // 과 indx
- sSETLIST = "/root/main/indxlist_d/item"
- }
- if (admin == "true" || setflag == "U")
- {
- if(setflag == "A"){ //전체는 입력안됨
- return;
- }
-
- if("공통서식" == model.getValue("/root/main/indxlist_d/item[" + rowpos + "]/indxnm"))
- {
- return;
- }
- if (depth == 2)
- {
- window.setPopupMenu(true, "/root/temp/menu2/menu", "label", "func", false); return;
- }
- else
- {
- var linkflag = model.getValue(sSETLIST + "[" + rowpos + "]/linkflag");
-
- if (linkflag == "N")
- {
- // 폴더인경우, 새폴더/폴더수정/폴더삭제..
- window.setPopupMenu(true, "/root/temp/menu/menu", "label", "func", false); return;
- }
- else if (linkflag == "Y")
- {
- // 파일인경우, 파일삭제만..
- window.setPopupMenu(true, "/root/temp/menu1/menu", "label", "func", false); return;
- }
- else
- {
- window.setPopupMenu(false);
- }
- }
- }
- else
- {
- window.setPopupMenu(false);
- }
- }
- else
- {
- window.setPopupMenu(false);
- }
- }
- else
- {
- window.setPopupMenu(false);
- }
- }
- /**
- * @desc : 새폴더 추가
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddDiagSet(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var item = obj.item(obj.selectedIndex);
- var rowPos = item.index + 1;
- fSetDiagInfo(rowPos, "i");
- model.setValue(sSETLIST_HIDDEN + "/status", "i");
- model.setValue("/root/main/iptbox/indxnm", "");
- model.refresh();
- fShowWndIptBox();
- }
- /**
- * @desc : 폴더 삭제
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelDiagSet()
- {
- // 확인 버튼
- var ret = messageBox("정말","Q001");
-
- if(ret != "6")
- {
- return;
- }
-
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var item = obj.item(obj.selectedIndex);
- var rowPos = item.index + 1;
- if(fSetDiagInfo(rowPos, "d")!= -1){
- fSaveDiagSet("Y");
- }
- }
- /**
- * @desc : 폴더 수정
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUpdtDiagSet(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var item = obj.item(obj.selectedIndex);
- var rowPos = item.index + 1;
- var indxnm = item.label;
- model.setValue("/root/main/iptbox/indxnm", indxnm);
- model.refresh();
- if(fSetDiagInfo(rowPos, "u")!=-1){
- fShowWndIptBox();
- }
- }
- /**
- * @desc : 서식 SET 저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveDiagSet(linkflag)
- {
- grup_saveas.visible = "false";
-
- var indxnm = model.getValue("/root/main/iptbox/indxnm");
- if (linkflag == "N" && indxnm == "") {
- messageBox("폴더명칭을 ", "C001");
- return;
- }
- model.setValue(sSETLIST_HIDDEN + "/indxnm" , indxnm);
- model.setValue(sSETLIST_HIDDEN + "/linkflag" , linkflag);
-
- var admin = model.getValue("/root/send/cond/admin");
- model.setvalue(sSETLIST_HIDDEN + "/admin" , admin);
- var setflag = model.getValue("/root/send/cond/setflag");
- model.setvalue(sSETLIST_HIDDEN + "/setflag" , setflag);
- // 구분에 따라 [과, 사용자] 정보를 넘겨야 하는데...
- var userid = model.getValue("/root/send/cond/userid");
- var deptcd = model.getValue("/root/send/cond/deptcd");
- if (setflag == "U")
- {
- model.setValue(sSETLIST_HIDDEN + "/userid" , userid);
- model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd);
- var instcd = model.getValue("/root/temp/instcd");
- if(instcd == ""){
- model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd"));
- }else {
- model.setValue(sSETLIST_HIDDEN + "/instcd" , instcd);
- }
- } else if (setflag == "D")
- {
- model.setValue(sSETLIST_HIDDEN + "/userid" , "");
- model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd);
- model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd"));
- }
- // 로그인 과 정보 넘기기...
- model.makeValue(sSETLIST_HIDDEN + "/mydeptcd", getUserInfo("dutplcecd"));
- model.copyNode("/root/send/savedata", sSETLIST_HIDDEN);
- submit("TXMRF03101");
- if (setflag == "U") {
- model.removeNodeset("/root/main/indxlist_u/item");
- model.copyNode("/root/main/indxlist_u", "/root/main/indxlist");
- refresh_u = 1; refresh_a = 0;
- trv_indxlist_u.rebuild();
- } else if (setflag == "D") {
- model.removeNodeset("/root/main/indxlist_d/item");
- model.copyNode("/root/main/indxlist_d", "/root/main/indxlist");
- refresh_d = 1; refresh_a = 0;
- trv_indxlist_d.rebuild();
- } else if (setflag == "A") {
- model.removeNodeset("/root/main/indxlist_a/item");
- model.copyNode("/root/main/indxlist_a", "/root/main/indxlist");
- refresh_u = 0; refresh_d = 0; refresh_a = 1;
- }
- model.refresh();
- }
- /**
- * @desc : 서식관리 폴더명을 입력할 InputBox를 보여줌.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fShowWndIptBox(){
- grup_saveas.attribute("top") = event.clientY;
- grup_saveas.visible = "true";
- model.setFocus("ipt_saveas_indxnm1");
- }
- /**
- * @desc : 서식 SET 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fReqDetlSet(){
-
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- if (obj.selectedIndex == 0) {
- return;
- }
- var item = obj.item(obj.selectedIndex);
- if (item != null) {
- var rowpos = item.index + 1;
- fSetDiagInfo(rowpos);
- var depth = model.getValue(sSETLIST_HIDDEN + "/depth");
- if(depth == 2){
- return;
- }
- }
- }
- /**
- * @desc : Mouse Drag Drop
- * @
- * @param :
- * @return : void
- * @authur :
- * @---------------------------------------------------
- */
- function fOndrop(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var rowpos = obj.mouseRow + 1;
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm");
- var x = event.clientX;
- var maxposX = 24 + 16 * (depth - 1) + ( 13 * indxnm.length);
- var minposX = 24 + 16 * (depth - 1);
- if(maxposX > x){
- fDiagSetDrop();
- }else{
- return;
- }
- }
- /**
- * @desc : Mouse Drag Over
- * @
- * @param :
- * @return : void
- * @authur :
- * @---------------------------------------------------
- */
- function fMouseOver(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var rowpos = obj.mouseRow + 1;
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm");
- var x = event.clientX;
- var maxposX = 24 + 16 * (depth - 1) + ( 10 * indxnm.length);
- var minposX = 24 + 16 * (depth - 1);
- if(maxposX > x){
- for ( var i = 0; i < obj.length; i++ ) {
- obj.item(i).attribute("background-color") = "#ffffff";
- obj.item(i).attribute("text-decoration") = "";
- }
- obj.item(obj.mouseRow).attribute("background-color") = "#ece1ec";
- obj.item(obj.mouseRow).attribute("text-decoration") = "";
- }
- }
- /**
- * @desc : TreeView에 Drag상태로 Mouse over된 경우 item의 background color를 clear함
- * @
- * @param :
- * @return : void
- * @authur :
- * @---------------------------------------------------
- */
- function fOnDragMouseOver(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var treeObj = document.controls.item(event.currentTarget);
- var rowpos = obj.mouseRow + 1;
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm");
- var x = event.clientX;
- var maxposX = 24 + 16 * (depth - 1) + ( 10 * indxnm.length);
- var minposX = 24 + 16 * (depth - 1);
- if(maxposX > x){
- if( obj.selectedIndex != treeObj.mouseRow ) {
- for ( var i = 0; i < treeObj.length; i++ ) {
- treeObj.item(i).attribute("background-color") = "#ffffff";
- treeObj.item(i).attribute("text-decoration") = "";
- }
- treeObj.item(treeObj.mouseRow).attribute("background-color") = "#ece1ec";
- treeObj.item(treeObj.mouseRow).attribute("text-decoration") = "";
- }
- }
-
- }
- /**
- * @desc : 서식 SET Drag
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDiagSetDrag(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- if (obj.selectedIndex == 0) {
- return;
- }
- var item = obj.item(obj.selectedIndex);
- if (item != null) {
- var rowpos = item.index + 1;
- fSetDiagInfo(rowpos, "u");
- var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm");
- model.setValue("/root/main/iptbox/indxnm", indxnm);
- model.refresh();
- }
- }
- /**
- * @desc : 서식 SET Drop
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDiagSetDrop(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- fClrTreeViweSelect();
- var admin = model.getValue("/root/send/cond/admin");
- var setflag = model.getValue("/root/send/cond/setflag");
- // 관리자인가? 구분이 개인인가?
- if (admin == "true" || setflag == "U") {
- var treeObj = document.controls.item(event.currentTarget);
- var rowpos = obj.mouseRow + 1;
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- var itemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/itemindxseq");
- var supitemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/supitemindxseq");
- var linkflag = model.getValue(sSETLIST + "[" + rowpos + "]/linkflag");
- var cmpdepth = model.getValue(sSETLIST_HIDDEN + "/depth");
- var cmpitemindxseq = model.getValue(sSETLIST_HIDDEN + "/itemindxseq");
- var cmpsupitemindxseq = model.getValue(sSETLIST_HIDDEN + "/supitemindxseq");
- var cmplinkflag = model.getValue(sSETLIST_HIDDEN + "/linkflag");
- // 이동하는 폴더가 파일 아래로 이동하는것 방지함.
- if(linkflag == "Y"){
- //messageBox("폴더가 아닌 위치로 이동", "E001");
- obj.item(obj.mouseRow).attribute("background-color") = "#ffffff";
- obj.item(obj.mouseRow).attribute("text-decoration") = "";
- return;
- }
- if(itemindxseq == cmpitemindxseq){
- // messageBox("동일한 위치로 이동", "E001");
- obj.item(obj.mouseRow).attribute("background-color") = "#ffffff";
- obj.item(obj.mouseRow).attribute("text-decoration") = "";
- return;
- }else if(itemindxseq == cmpsupitemindxseq){
- // 같은 과, 같은 사용자가 아니면 이동이 안됨. (why? with문 update가 안되니까..)
- // if (deptcd != cmpdeptcd || userid != cmpuserid) {
- // messageBox("지정된 위치로 이동", "E001");
- // obj.item(obj.mouseRow).attribute("background-color") = "#ffffff";
- // obj.item(obj.mouseRow).attribute("text-decoration") = "";
- // return;
- // }
- }
- //이동하는 SET폴더의 depth가 도착하는 곳보다 낮은 레벨일 경우,
- //자신의 child node 아래로 이동하는 것을 방지함.
- if(cmpdepth < depth){
- var rootdepth;
- var rootitemindxseq;
- while(cmpdepth != rootdepth){
- rootdepth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- rootitemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/itemindxseq");
- rowpos--;
- }
- if(rootitemindxseq == cmpitemindxseq){
- //messageBox("지정된 위치로 이동", "E001");
- obj.item(obj.mouseRow).attribute("background-color") = "#ffffff";
- obj.item(obj.mouseRow).attribute("text-decoration") = "";
- return;
- }
- }
- // 이동 폴더의 (과, 사용자) 정보, 이동 대상의 (과, 사용자) 정보
- var deptcd = model.getValue(sSETLIST + "[" + rowpos + "]/deptcd");
- var userid = model.getValue(sSETLIST + "[" + rowpos + "]/userid");
- var cmpdeptcd = model.getValue(sSETLIST_HIDDEN + "/deptcd");
- var cmpuserid = model.getValue(sSETLIST_HIDDEN + "/userid");
- // 같은 과, 같은 사용자가 아니면 이동이 안됨. (why? with문 update가 안되니까..)
- if (deptcd != cmpdeptcd || userid != cmpuserid) {
- //messageBox("지정된 위치로 이동", "E001");
- obj.item(obj.mouseRow).attribute("background-color") = "#ffffff";
- obj.item(obj.mouseRow).attribute("text-decoration") = "";
- return;
- }
-
- // 이동 폴더의 (과, 사용자) 정보를 셋함...
- model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd);
- model.setValue(sSETLIST_HIDDEN + "/userid" , userid);
- model.setValue(sSETLIST_HIDDEN + "/supitemindxseq" , itemindxseq);
- fSaveDiagSet("Y");
- }
- }
- /**
- * @desc : 폴더명 검색할 경우 검색한 위치로 focus를 이동한다.
- * @
- * @param :
- * @return : void
- * @authur :
- * @---------------------------------------------------
- */
- function fSrchDiagIndxNM(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var sFolderNM = model.getValue("/root/main/cond/foldernm");
- if (obj.selectedIndex+1 == obj.length) {
- obj.selectedIndex = 0;
- }
- for(var i=obj.selectedIndex+1; i<obj.length;i++){
- obj.select(i);
- if(sFolderNM == obj.label){
- break;
- }
- }
- fReqDetlSet();
- }
- /**
- * @desc : TreeView 선택된 item의 background color를 clear함
- * @
- * @param :
- * @return : void
- * @authur :
- * @---------------------------------------------------
- */
- function fClrTreeViweSelect(){
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- for(var i = 0; i < obj.length; i++){
- obj.item(i).attribute("background-color") = "#ffffff";
- obj.item(i).attribute("text-decoration") = "";
- }
- }
- /**
- * @desc : 서식 SET INFO SETTING
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetDiagInfo(rowpos, status){
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- if(status == "u" && depth == 1){
- //messageBox("선택한 폴더는 수정", "E001");
- return -1;
- }else if(status == "d" && depth == 1){
- //messageBox("선택한 폴더는 삭제", "E001");
- return -1;
- }
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- var path = model.getValue(sSETLIST + "[" + rowpos + "]/path");
- var itemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/itemindxseq");
- var supitemindxseq = model.getValue(sSETLIST + "[" + rowpos + "]/supitemindxseq");
- var linkflag = model.getValue(sSETLIST + "[" + rowpos + "]/linkflag");
- var indxnm = model.getValue(sSETLIST + "[" + rowpos + "]/indxnm");
- if(status == "d")
- {
- if(parseInt(depth) >= 3) // depth가 4이상 인것부터 확인(삭제대상은 폴더나 파일)
- {
- if(linkflag == "N")
- depth = 3; // 폴더
- else
- depth = 4; // 파일
- }
- }
- model.setValue(sSETLIST_HIDDEN + "/status" , status);
- model.setValue(sSETLIST_HIDDEN + "/depth" , depth);
- model.setValue(sSETLIST_HIDDEN + "/path" , path);
- model.setValue(sSETLIST_HIDDEN + "/itemindxseq" , itemindxseq);
- // supitemindxseq : 새로운 등록이면 상위정보, 수정이면 기존정보
- if(status == "i"){
- model.setValue(sSETLIST_HIDDEN + "/supitemindxseq", itemindxseq);
- }else{
- model.setValue(sSETLIST_HIDDEN + "/supitemindxseq", supitemindxseq);
- }
- //연결구분이 'Y' 인 경우 : 서식명칭에 값을 넣지 않는다.. (2007.06.12)
- if (linkflag == 'N') {
- model.setValue(sSETLIST_HIDDEN + "/indxnm" , indxnm);
- } else {
- model.setValue(sSETLIST_HIDDEN + "/indxnm" , "");
- }
- model.setValue(sSETLIST_HIDDEN + "/linkflag" , "N");
- model.setValue(sSETLIST_HIDDEN + "/linkcd" , "");
- // 상위 정보 (사용자, 과)
- var userid = model.getValue(sSETLIST + "[" + rowpos + "]/userid");
- var deptcd = model.getValue(sSETLIST + "[" + rowpos + "]/deptcd");
- model.setValue(sSETLIST_HIDDEN + "/userid" , userid);
- model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd);
-
- // 기본 정보
- var instflag = model.getValue("/root/send/cond/setflag"); //개인과구분
- if(instflag =="U"){
- var instcd = model.getValue("/root/temp/instcd");
- if(instcd == ""){
- model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd"));
- }else {
- model.setValue(sSETLIST_HIDDEN + "/instcd" , instcd);
- }
- }else{
- model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd"));
- }
- model.setValue(sSETLIST_HIDDEN + "/indxflag" , "F");
- model.setValue(sSETLIST_HIDDEN + "/valiyn" , "Y");
- model.setValue(sSETLIST_HIDDEN + "/sortno" , 1000);
- model.setValue(sSETLIST_HIDDEN + "/comnseq" , 0);
- model.setValue(sSETLIST_HIDDEN + "/slipno" , 0);
- // 사용자 정보(관리자, 일반사용자)
- // 구분 정보(개인,과,전체)
- var admin = model.getValue("/root/send/cond/admin");
- var setflag = model.getValue("/root/send/cond/setflag");
- model.setValue(sSETLIST_HIDDEN + "/admin" , admin);
- model.setValue(sSETLIST_HIDDEN + "/setflag" , setflag);
-
- model.refresh();
- }
- /**
- * @desc : 서식 SET 에 파일 연결하기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddindx(){
-
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- // 선택폴더가 있는가?
- if (obj.selectedIndex == -1) {
- messageBox("폴더를 ", "C002");
- return;
- }
- // 선택한 아이템 로우~!!
- var item = obj.item(obj.selectedIndex);
- var rowpos = item.index + 1;
- // 루트인가? (이동할 수 없다..)
- var depth = model.getValue(sSETLIST + "[" + rowpos + "]/depth");
- if (depth == 1) {
- //messageBox("지정된 위치로 이동", "E001");
- return;
- }
- // 폴더인가? 파일이면 파일을 추가하지 않는다.
- var linkflag = model.getValue(sSETLIST + "[" + rowpos + "]/linkflag");
- if (linkflag == "Y") {
- messageBox("폴더를 ", "C002");
- return;
- }
-
- // 선택한 서식이 있는가?
- var checkflag = "false";
- for(var i = grd_formlist.fixedRows; i < grd_formlist.rows; i++){
- var flag = model.getValue("/root/main/formlist/row["+ i +"]/check");
- if(flag == "true"){
- checkflag = "true";
- break;
- }
- }
- if(checkflag == "false"){
- messageBox("서식을 ", "C002");
- return;
- }
-
- var item = obj.item(obj.selectedIndex);
- var rowpos = item.index + 1;
- var indxfocus = item.value;
- model.setValue("/root/temp/indxfocus", indxfocus);
-
- for(var i = grd_formlist.fixedRows; i < grd_formlist.rows; i++){
- var flag = model.getValue("/root/main/formlist/row["+ i +"]/check");
- if(flag=="true" ){
-
- model.setValue("/root/main/formlist/row["+ i +"]/check","false");
- var formcd = model.getValue("/root/main/formlist/row["+ i +"]/formcd");
- model.setValue(sSETLIST_HIDDEN + "/linkcd" , formcd);
- var userid = model.getValue("/root/send/cond/userid");
- var deptcd = model.getValue("/root/send/cond/deptcd");
- //model.setValue(sSETLIST_HIDDEN + "/userid" , userid);
- model.setValue(sSETLIST_HIDDEN + "/deptcd" , deptcd);
-
- // 서식명칭에 값을 넣지 않는다.. (2007.06.12)
- model.setValue(sSETLIST_HIDDEN + "/indxnm" , "");
- model.setValue(sSETLIST_HIDDEN + "/supitemindxseq" , indxfocus);
- model.setValue(sSETLIST_HIDDEN + "/depth" , "");
- model.setValue(sSETLIST_HIDDEN + "/itemindxseq" , "");
- model.setValue(sSETLIST_HIDDEN + "/path" , "");
- model.setValue(sSETLIST_HIDDEN + "/status" , "i");
- model.setValue(sSETLIST_HIDDEN + "/sortno" , 1000);
- // 기본 정보
- var instflag = model.getValue("/root/send/cond/setflag"); //개인과구분
- if(instflag =="U"){
- var instcd = model.getValue("/root/temp/instcd");
- if(instcd == ""){
- model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd"));
- }else {
- model.setValue(sSETLIST_HIDDEN + "/instcd" , instcd);
- }
- model.setValue(sSETLIST_HIDDEN + "/userid" , userid);
- }else{
- model.setValue(sSETLIST_HIDDEN + "/instcd" , getUserInfo("dutplceinstcd"));
- }
- model.setValue(sSETLIST_HIDDEN + "/indxflag" , "F");
- var admin = model.getValue("/root/send/cond/admin");
- model.setValue(sSETLIST_HIDDEN + "/admin" , admin);
-
- var setflag = model.getValue("/root/send/cond/setflag");
- model.setValue(sSETLIST_HIDDEN + "/setflag" , setflag);
-
- model.setValue(sSETLIST_HIDDEN + "/linkflag" , "Y");
- model.setValue(sSETLIST_HIDDEN + "/valiyn" , "Y");
- model.setValue(sSETLIST_HIDDEN + "/comnseq" , 0);
- model.setValue(sSETLIST_HIDDEN + "/slipno" , 0);
- model.copyNode("/root/send/savedata", sSETLIST_HIDDEN);
- model.makeValue("/root/send/savedata/retflag","ret"); //저장후 조회여부
- submit("TXMRF03101");
- }
- }
- submit("TRMRF03102");
- if (setflag == "U") {
- model.removeNodeset("/root/main/indxlist_u/item");
- model.copyNode("/root/main/indxlist_u", "/root/main/indxlist");
- } else if (setflag == "D") {
- model.removeNodeset("/root/main/indxlist_d/item");
- model.copyNode("/root/main/indxlist_d", "/root/main/indxlist");
- } else if (setflag == "A") {
- model.removeNodeset("/root/main/indxlist_a/item");
- model.copyNode("/root/main/indxlist_a", "/root/main/indxlist");
- }
- model.refresh();
- }
- /**
- * @desc : 폼코드 넘겨주기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendFormInfo()
- {
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var rowpos = obj.mouseRow + 1;
- var formcd = model.getValue(path + "[" + rowpos + "]/formcd");
- if (formcd != "") {
- parent.window.javascript.fOpenNewForm(formcd);
- // window.close();
- }
- }
- /**
- * @desc : 폼코드 넘겨주기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendFormListInfo()
- {
- var rowpos = trv_formlist.mouseRow + 1;
- var formcd = model.getValue("/root/main/formlist/item" + "[" + rowpos + "]/formcd");
- if (formcd != "") {
- // 부모창의 속성값에 정해준다..
- //parent.window.model.makeValue("/root/hidden/parameters/formcd",formcd);
- parent.window.javascript.fOpenNewForm(formcd);
- // 파라메타값으로 넘겨준다..
- //window.close();
- }
- }
- /**
- * @desc : formcd,formnm 넘겨주기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendFormcdFormnm()
- {
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var rowpos = obj.mouseRow + 1;
- var formcd = model.getValue(path + "[" + rowpos + "]/formcd");
-
- if(formcd !=""){ // 폴더 아닌경우만 formcd넘긴다
-
- var formnm = model.getValue(path + "[" + rowpos + "]/formnm");
- opener.javascript.setParameter("formcd", formcd);
- opener.javascript.setParameter("formnm", formnm);
- model.close();
- }
- }
- /**
- * @desc : formcd,formnm 넘겨주기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendFormListFormnm()
- {
- var rowpos = trv_formlist.mouseRow + 1;
- var formcd = model.getValue("/root/main/formlist/item" + "[" + rowpos + "]/formcd");
- if(formcd !=""){ // 폴더 아닌경우만 formcd넘긴다
- var formnm = model.getValue("/root/main/formlist/item" + "[" + rowpos + "]/displaynm");
- opener.javascript.setParameter("formcd", formcd);
- opener.javascript.setParameter("formnm", formnm);
- model.close();
- }
- }
- /**
- * @desc : 공통세션변수에 formlist저장하기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fFormsetglobal()
- {
- model.toggle("case_list");
- return;
- var flag = getGlobalVariable("emr_gsv_formflag");
- //공통세션변수에 formlist 저장
- if(flag!="Y"){
- var reqnode = instance1.selectNodes("/root/main/formlist/item");
- var csv = getNodeListCSV(reqnode);
- setGlobalVariable("emr_gsv_formflag","Y");
- setGlobalVariable("emr_gsv_formflag_userid",getUserId());
- setGlobalVariable("emr_gsv_formlist",csv);
- }
- }
- /**
- * @desc : 공통세션변수에 indxlist저장하기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIndxsetglobal(flag)
- {
- return;
- var reqnode = instance1.selectNodes("/root/main/indxlist_"+ flag +"/item");
- var csv = getNodeListCSV(reqnode);
- setGlobalVariable("emr_gsv_formflag_"+flag, "Y");
- setGlobalVariable("emr_gsv_formlist_"+flag, csv);
- }
- /**
- * @desc : 트리 expand 상태 얻기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fExpandCheck(trvObj)
- {
- //alert(trvObj);
- var Obj = window.document.controls(trvObj);
- //alert(Obj);
- // var Obj = trvObj;
- var expandstr = 0; //트리 expand 값 저장
- for(var i = 0; i < Obj.length ; i++){
- if(Obj.item(i).expanded == 1)
- {
- expandstr += "."+i;
- }
- }
- //공통세션변수에 저장
- // setGlobalVariable("emr_gsv_"+trvObj ,expandstr);
- //alert("a");
- }
- /**
- * @desc : 트리 expand 상태 설정하기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetTreeExpand(trvObj)
- {
-
- return;
- var Obj = window.document.controls(trvObj);
- var str = getGlobalVariable("emr_gsv_"+trvObj);
- if(str != ""){
- var strlen = str.split('.');
- var strArray = new Array(strlen.length);
- for(var i=0; i<strlen.length; i++){
- strArray[i] = strlen[i];
- Obj.expand(strArray[i],true);
- }
- }
- }
- /**
- * @desc : formlsit 재조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fFormlistRefresh()
- {
- //세션 초기화
- // setGlobalVariable("emr_gsv_formflag","");
- // setGlobalVariable("emr_gsv_formflag_userid","");
- // setGlobalVariable("emr_gsv_formlist","");
- // setGlobalVariable("emr_gsv_formflag_u","");
- // setGlobalVariable("emr_gsv_formflag_d","");
- // setGlobalVariable("emr_gsv_formflag_a","");
- // setGlobalVariable("emr_gsv_formlist_u","");
- // setGlobalVariable("emr_gsv_formlist_d","");
- // setGlobalVariable("emr_gsv_formlist_a","");
-
- refresh_u = 0;
- refresh_d = 0;
- refresh_a = 0;
- //선택된버튼 재조회
- if(true== btn_list.selected ){
- case_list.dispatch("DOMActivate");
- submit("TRMMR02501");
- return;
- }
- else if(true == btn_all.selected ){
- case_all.dispatch("DOMActivate");
- fSetIndxListSelect("A");
- return;
- }
- else if(true == btn_dept.selected ){
- case_dept.dispatch("DOMActivate");
- fSetIndxListSelect("D");
- return;
- }
- else if(true == btn_user.selected ){
- case_user.dispatch("DOMActivate");
- fSetIndxListSelect("U");
- return;
- }
- }
-
- /**
- * @desc : formlsit 재조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
-
- function fFormlistRefresh()
- {
- // 서식목록 보여주자~
- // setGlobal에 처음 select해온값 저장후 getGlobal 로 보여준다
- var list = getGlobalVariable("emr_gsv_formlist");
- if(list!=""){
- setCSVToNode("/root/main/formlist/",list,"item");
- model.refresh();
- }else{
- submit("TRMMR02501");
- }
- fFormsetglobal();
- // 첫번째 본인 과는 오픈하자!!
- trv_formlist.expand(0, true);
- fSetTreeExpand("trv_formlist");
- }
- */
- /**
- * @desc : 서식목록조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetFormlist()
- {
- submit("TRMMR02501");
- // 첫번째 본인 과는 오픈하자!!
- trv_formlist.expand(0, true);
- return;
- // 서식목록 보여주자~
- // setGlobal에 처음 select해온값 저장후 getGlobal 로 보여준다
- var list = getGlobalVariable("emr_gsv_formlist");
- if(list!=""){
- setCSVToNode("/root/main/formlist/",list,"item");
- model.refresh();
- }else{
- submit("TRMMR02501");
- }
- }
- /**
- * @desc : 전체 목록에서 level 1 인 경우만 조회해서 트리에 추가해 주기..
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOpenSubTree()
- {
- var TREE_OBJ = trv_indxlist_a;
- var item = TREE_OBJ.item(TREE_OBJ.selectedIndex);
- if (item != null) {
- var rowpos = item.index + 1;
- var depth = model.getValue("/root/main/indxlist_a/item[" + rowpos + "]/depth");
- var userid = model.getValue("/root/main/indxlist_a/item[" + rowpos + "]/userid");
- if (depth == "2" && userid == "") {
- var deptcd = model.getValue("/root/main/indxlist_a/item[" + rowpos + "]/deptcd");
- var itemindxseq = model.getValue("/root/main/indxlist_a/item[" + rowpos + "]/itemindxseq");
-
- var tmpsetflag = model.getValue("/root/send/cond/setflag");
- model.makeValue("/root/send/cond/setflag", "S");
- model.makeValue("/root/send/cond/subdeptcd", deptcd);
- model.makeValue("/root/send/cond/itemindxseq", itemindxseq);
- submit("TRMRF03102", true, "/root/send/cond", "/root/main/indxlist_t/item");
-
- model.makeValue("/root/send/cond/setflag", tmpsetflag);
- model.refresh();
- fMoveInstance(rowpos);
- model.setValue("/root/main/indxlist_a/item[" + rowpos + "]/userid", "x");
- }
- }
- }
- /**
- * @desc : 전체 목록에서 level 1 인 경우만 조회해서 트리에 추가해 주기..
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMoveInstance(rowpos)
- {
- ref = "/root/main/indxlist_a/item";
- stRef = "/root/main/indxlist_t/item";
- var subNode = "";
- var instance = document.models(0).instances(0);
- var refNode = instance.selectSingleNode(ref + "[" + rowpos + "]"); //조회내용의 상위 항목
- var nodelistTmp = instance.selectNodes(stRef);
- var nodelength = nodelistTmp.length;
-
- if(nodelength > 0)
- {
- var depth = "";
- var itemindxseq = "";
- var node = root.main.indxlist_a;
-
- for(var i = nodelength; i > 0; i--)
- {
- itemindxseq = model.getValue(stRef + "[" + i + "]/itemindxseq");
- depth = model.getValue(stRef + "[" + i + "]/depth");
-
- subNode = instance.selectSingleNode(stRef + "[" + i + "]");
- node.insertAfter(subNode, refNode); //조회항목을 상위항목의 자식으로 삽입
- }
-
- // 조회 레벨 오픈하자!!
- model.setValue("/root/main/selected_a", itemindxseq);
- model.refresh();
- }
- }
- /**
- * @desc : 그리드 선택시 check 선택
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetCheck() {
-
- var check = model.getValue("/root/main/formlist/row["+grd_formlist.row+"]/check");
- var gridObj = event.ptarget.parent;
-
- if( gridObj.col == "0")
- {
- if(check == "false")
- {
- model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","false");
- }
- else
- {
- model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","true");
- }
- }
- else
- {
- if(check == "true"){
- model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","false");
- }
- else
- {
- model.setValue("/root/main/formlist/row["+grd_formlist.row+"]/check","true");
- }
- }
- }
- /**
- * @desc : 마우스 우클릭
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMouseBtn(trvObj) {
-
- var selected = trvObj.value;
- if(selected == ""){
- return;
- }
- if(trvObj.isCell(event.target) && trvObj.mouseRow <= trvObj.length)
- {
- fMouseRghtBtnPopup();
- } else {
- initPopupMenu();
- }
- }
- function fReqFormlist()
- {
- model.makeValue("/root/send/reqformlist/reqkindflag", "CPLT"); // complete
- model.makeValue("/root/send/reqformlist/reqformprogflag", "-"); // 서식구분이 '디자인' 인것만 나오게 수정함.
- submit("TRMRF03101");
- }
- function fPreviewForm()
- {
- try
- {
- var rtn = fSetTreeView();
- rtn = rtn.split("|");
- var obj = document.controls(rtn[0]);
- var path = rtn[1];
-
- var item = obj.item(obj.selectedIndex);
- var rowPos = item.index + 1;
-
- var formcd = model.getValue("/root/main/indxlist_d/item[" + rowPos + "]/linkcd");
-
- if(formcd != "")
- {
- setParameter("SPMRF05500_formcd", formcd);
-
- model.makeValue("/root/hidden/condition/formcd", formcd);
- model.makeValue("/root/hidden/condition/formdegnseq", "");
- model.makeValue("/root/hidden/condition/extnunitformlistyn", "N");
- model.makeValue("/root/hidden/condition/cashedformdegnseq", "");
- model.makeValue("/root/hidden/condition/sysformrecdt", "");
- model.makeValue("/root/hidden/condition/mode", "D");
-
- submit("TRMRF02001");
-
- copyNodeset("/root/main/forminfo/formmast", "/root/temp/forminfo/formmast", "replace", model, model);
-
- var formprogflag = model.getValue("/root/main/forminfo/formmast/formprogflag");
- var formxrwyn = model.getValue("/root/main/forminfo/formmast/formxrwyn");
- var formdegnseq = model.getValue("/root/main/forminfo/formmast/formdegnseq");
-
- if(formprogflag == "MAIN" || formprogflag == "PROF" || formprogflag == "-" || formprogflag == "PROG")
- {
- if(formxrwyn == "Y" && formdegnseq != "")
- modal("SPMRF05500", 1,10, 10, "SPMRF05500", "", "");
- //open("SPMRF05500", "2", 0, 0, "SPMRF05500", "", "");
- else
- messageBox("해당 서식은 저장되지", "E007");
- }
- else
- {
- messageBox("해당 서식은 " + formprogflag + " 유형 서식", "I009");
- return;
- }
- }
- }
- catch(e)
- {
-
- }
- }
- function fPreviewFormByGrd()
- {
- try
- {
- var formcd = model.getValue("/root/main/formlist/row["+grd_formlist.row+"]/formcd");
-
- if(formcd != "")
- {
- setParameter("SPMRF05500_formcd", formcd);
-
- model.makeValue("/root/hidden/condition/formcd", formcd);
- model.makeValue("/root/hidden/condition/formdegnseq", "");
- model.makeValue("/root/hidden/condition/extnunitformlistyn", "N");
- model.makeValue("/root/hidden/condition/cashedformdegnseq", "");
- model.makeValue("/root/hidden/condition/sysformrecdt", "");
- model.makeValue("/root/hidden/condition/mode", "D");
-
- submit("TRMRF02001");
-
- copyNodeset("/root/main/forminfo/formmast", "/root/temp/forminfo/formmast", "replace", model, model);
-
- var formprogflag = model.getValue("/root/main/forminfo/formmast/formprogflag");
- var formxrwyn = model.getValue("/root/main/forminfo/formmast/formxrwyn");
- var formdegnseq = model.getValue("/root/main/forminfo/formmast/formdegnseq");
-
- if(formprogflag == "MAIN" || formprogflag == "PROF" || formprogflag == "-" || formprogflag == "PROG")
- {
- if(formxrwyn == "Y" && formdegnseq != "")
- modal("SPMRF05500", 1,10, 10, "SPMRF05500", "", "");
- //open("SPMRF05500", "2", 0, 0, "SPMRF05500", "", "");
- else
- messageBox("해당 서식은 저장되지", "E007");
- }
- else
- {
- messageBox("해당 서식은 " + formprogflag + " 유형 서식", "I009");
- return;
- }
- }
- }
- catch(e)
- {
-
- }
- }
|