123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- /**
- * @desc : 화면 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- var indxflag = opener.javascript.getParameter("indxflag");
- model.setValue("/root/temp/condition/indxflag",indxflag);
- model.setValue("/root/init/today", getCurrentDate());
- var value = model.getValue("/root/temp/condition/indxflag");
- if(model.getValue("/root/temp/condition/indxflag") == "V") {
- fIndxListSrch();
- } else if(model.getValue("/root/temp/condition/indxflag") == "F") {
- fIndxListSrch();
- } else if(model.getValue("/root/temp/condition/indxflag") == "P"){
- fIndxListSrch();
- } else if(model.getValue("/root/temp/condition/indxflag") == "U"){
- fIndxListSrch();
- }
- }
- /**
- * @desc : ?????? (?????? ?????? tree?? road????)
- * @param : ???? id (btnID)
- * @return :
- * @---------------------------------------------------
- */
- function fIndxListSrch(){
- model.removeNodeset("/root/send/indxflag");
- model.makeValue("/root/send/indxflag","");
- model.setValue("/root/send/indxflag", model.getValue("/root/temp/condition/indxflag"));
-
- submit("TRMRF01901");
-
- }
- /**
- * @desc : ?????? (?????? ?????? tree?? road????)
- * @param : ???? id (btnID)
- * @return :
- * @---------------------------------------------------
- */
- function fIndxInfoListSrch(){
- var iIndx = treeview1.focusIndex + 1;
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/itemindxseq");
- model.setValue("/root/temp/condition/rowcnt", iIndx);
-
- model.setValue("/root/temp/condition/selectedindx", selIndxCd);
- model.setValue("/root/temp/condition/focusindx", iIndx);
- model.makeValue("/root/send/itemindxseq", selIndxCd );
- model.makeValue("/root/send/indxflag", model.getValue("/root/temp/condition/indxflag"));
- submit("TRMRF01902");
-
- }
- /**
- * @desc :indxinfo 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClear(){
-
- model.resetInstanceNode("/root/main/indxinfo");
- model.refresh();
- }
- /**
- * @desc :버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDisable(flag){
- if(flag == "DA"){
- ipt_indxhngnm.disabled = "false";
- ipt_indxengnm.disabled = "false";
- btn_upindxcd.disabled = "false";
- cmb_indxdrdiflag.disabled = "false";
- ipt_indxseqno.disabled = "false";
- } else if(flag == "DD"){
- ipt_indxhngnm.disabled = "true";
- ipt_indxengnm.disabled = "true";
- btn_upindxcd.disabled = "true";
- cmb_indxdrdiflag.disabled = "true";
- ipt_indxseqno.disabled = "true";
- }
- model.refresh();
- }
- /**
- * @desc : indx 선택 정보 표시( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIndxSelect(){
- if(model.getValue("/root/temp/condition/indxflag") == "V") {
-
- model.toggle("case1");
- fIndxListSrch();
-
- }else if(model.getValue("/root/temp/condition/indxflag") == "F") {
-
- model.toggle("case2");
- fIndxListSrch();
- }else if(model.getValue("/root/temp/condition/indxflag") == "P"){
- model.toggle("case4");
- fIndxListSrch();
- }else if(model.getValue("/root/temp/condition/indxflag") == "U"){
- model.toggle("case3");
- fIndxListSrch();
- }else if(model.getValue("/root/temp/condition/indxflag") == ""){
- model.toggle("case1");
- model.setValue("/root/temp/condition/indxflag",'V');
- fIndxListSrch();
- }
- }
- /**
- * @desc : tree 선택 정보 표시( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTreeSelect(){
- fIndxInfoListSrch();
- //itemPath 분할후 정보란에 입력
- var depthnm = treeview1.getItemPath(treeview1.selectedindex,"\\");
- var depth;
- depth = depthnm.split('\\');
- var a1 = new Array(depth.length);
- var b1 = new Array(depth.length);
- var cc = depthnm.size;
- var count =0;
- for(var i=0; i<depth.length; i++){
- b1[i]= depth[i];
- count++;
- }
- var indx = model.getValue("/root/temp/condition/indxflag");
- var indxpath = null;
- if(indx=="V"){
- indxpath = "valindx";
- }else if(indx=="F"){
-
- indxpath = "formindx";
-
- }else if(indx=="P"){
- indxpath = "imgindx";
- }else if(indx=="U"){
- indxpath = "unitindx";
- }
- for(var i=0; i< count; i++){
- model.makeValue("/root/temp/condition/depthnm"+(i+1),b1[i]);
- model.makeValue("/root/main/indxinfo/" + indxpath + "/depthnm"+(i+1) ,model.getValue("/root/temp/condition/depthnm"+(i+1)));
- }
-
- model.refresh();
- }
- /**
- * @desc : deptcd 를 나누어 저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDeptcdSplit(){
- //해당 정보 조회/등록화면에 뿌려준다.
- //fDisable("DD");
- fTreeSelect();
- var deptcd =model.getValue("/root/main/indxlist/item["+(treeview1.selectedindex + 1)+"]/pathcd");
- var depth;
- depth = deptcd.split('.');
- var a1 = new Array(depth.length);
- var b1 = new Array(depth.length);
- var cc = deptcd.size;
- var count =0;
- for(var i=0; i<depth.length; i++){
- b1[i]= depth[i];
- count++;
- }
-
- for(var i=0; i < count; i++){
-
- model.makeValue("/root/temp/condition/depthcd"+(i+1),b1[i]);
- model.makeValue("/root/main/indxinfo/imgindx/depthcd"+(i+1) ,model.getValue("/root/temp/condition/depthcd"+(i+1)));
- }
- model.setValue("/root/temp/condition/count",count);
- }
- /**
- * @desc : 취소
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClose(){
- opener.javascript.setParameter("unitnm", "");
- model.close();
- }
- /**
- * @desc : 확인
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function findxConfirm(){
- iRow = treeview1.focusIndex;
-
- //alert(iRow);
- //if(iRow == -1){
- // return;
- //} //선택창일 경우
-
- var indx = model.getValue("/root/temp/condition/indxflag");
- var indxnm;
- var indxpath;
-
- if(indx=="V"){
-
- indxnm = "valindxnm";
- indxpath = "valindx";
-
- }else if(indx=="F"){
-
- indxnm = "formindxnm";
- indxpath = "formindx";
-
- }else if(indx=="P"){
-
- indxnm = "imgindxnm";
- indxpath = "imgindx";
- }
- for(var i=0; i < 5; i++ ){
- opener.javascript.setParameter("depthcd"+(i+1),"");
- opener.javascript.setParameter("depthnm"+(i+1),"");
- }
- //deptcd의 갯수
- var count = model.getValue("/root/temp/condition/count");
- var indxnm =model.getValue("/root/main/indxinfo/" + indxpath + "/indxnm");
-
- for(var i=0; i < count; i++ ){
-
- opener.javascript.setParameter("depthnm"+(i+1), model.getValue("/root/main/indxinfo/" + indxpath + "/depthnm"+(i+1)));
- opener.javascript.setParameter("depthcd"+(i+1), model.getValue("/root/main/indxinfo/" + indxpath + "/depthcd"+(i+1)));
-
- }
- //deptcd의 count
- opener.javascript.setParameter("count",count);
- opener.javascript.setParameter("indexcode", model.getValue("/root/temp/condition/indexcode"));
- opener.javascript.setParameter("pathcd", model.getValue("/root/main/indxlist/item["+(treeview1.selectedindex + 1)+"]/pathcd"));
- //밸류리스트 항목색인순번
- model.close();
- }
|