123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550 |
- /**
- * @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 : val버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fValBtnDisable(flag){
- cmb_highestlvel.disabled = flag;
- //ipt_itemindxseq1.disabled = flag;
- ipt_indxnm1.disabled = flag;
- ipt_indxcnts1.disabled = flag;
- //ipt_supitemindxseq1.disabled = flag;
- //ipt_upindxnm1.disabled = flag;
- cmb_valiyn1.disabled = flag;
- }
- /**
- * @desc :term버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTermBtnDisable(flag){
- cmb_highestlvel.disabled = flag;
- //ipt_itemindxseq2.disabled = flag;
- ipt_indxnm2.disabled = flag;
- ipt_indxcnts2.disabled = flag;
- //ipt_supitemindxseq2.disabled = flag;
- //ipt_upindxnm2.disabled = flag;
- cmb_valiyn2.disabled = flag;
- }
- /**
- * @desc :img버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fImgBtnDisable(flag){
- cmb_highestlvel.disabled = flag;
- //ipt_itemindxseq4.disabled = flag;
- ipt_indxnm4.disabled = flag;
- ipt_indxcnts4.disabled = flag;
- //ipt_supitemindxseq4.disabled = flag;
- //ipt_upindxnm4.disabled = flag;
- cmb_valiyn4.disabled = flag;
- }
- /**
- * @desc :unit버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUnitBtnDisable(flag){
- cmb_highestlvel.disabled = flag;
- //ipt_itemindxseq3.disabled = flag;
- ipt_indxnm3.disabled = flag;
- ipt_indxcnts3.disabled = flag;
- //ipt_supitemindxseq3.disabled = flag;
- //ipt_upindxnm3.disabled = flag;
- cmb_valiyn3.disabled = flag;
- }
- /**
- * @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();
- }
- /* @group :
- * @ver : 2007.06.13
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 두개의 노드셋을 비교한다.
- * @param : originalNode :
- * @param : copyNode :
- * @return : true, false
- * @---------------------------------------------------
- */
- function fCompareNodes1(originalNode, copyNode, newstr, oldstr){
- var ins = document.models( 0 ).instances( 0 );
- var original = ins.selectSingleNode(originalNode).xml;
- var copy = ins.selectSingleNode(copyNode).xml;
- var replace = original.setReplaceWord(newstr,oldstr);
- if(replace == null || copy == null){
-
- return false;
- }else if (replace == copy){
-
- return true;
- }else{
-
- return false;
- }
- }
- /**
- * @desc : indx정보 저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveIndx(flag){
-
- var indx = null;
- if(flag == "I" || flag == "U" || flag == "D"){ //?? ?? ??
- model.removeNodeset("/root/send");
-
- model.makeValue("/root/send/state", flag); //?? : ??,??,??
- model.makeValue("/root/send/indxflag", model.getValue("/root/temp/condition/indxflag")); //??:??,??,???,?
-
- if(model.getValue("/root/temp/condition/indxflag") == "V"){
- indx = "valindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "F"){
- indx = "formindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "P"){
- indx = "imgindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "U"){
- indx = "unitindx";
- }
- model.makeValue("/root/send/supitemindxseq", model.getValue("/root/main/indxinfo/" + indx + "/supitemindxseq"));
- model.makeValue("/root/send/itemindxseq", model.getValue("/root/main/indxinfo/" + indx + "/itemindxseq"));
- model.makeValue("/root/send/indxnm", model.getValue("/root/main/indxinfo/" + indx + "/indxnm"));
- model.makeValue("/root/send/valiyn", model.getValue("/root/main/indxinfo/" + indx + "/valiyn"));
- model.makeValue("/root/send/indxcnts", model.getValue("/root/main/indxinfo/" + indx + "/indxcnts"));
- //model.makeValue("/root/send/sortno", model.getValue("/root/main/indxinfo/" + indx + "/sortno"));
- //model.makeValue("/root/send/indxengnm", model.getValue("/root/main/indxinfo/" + indx + "/indxengnm"));
- model.makeValue("/root/send/sortno", 0);
- if(flag =="U"){
- //수정 여부 check
- var compare = fCompareNodes1("/root/main/indxinfo/" + indx + "2","/root/main/indxinfo/" + indx , indx + "2", indx);
- if(flag =="U" && compare == true){
-
- messageBox("수정된 내용이","I004");
- return;
- }
- }
- submit("TXMRF01901");
- var focus = model.getValue("/root/temp/condition/focusindx") - 1; //??? ???? ???
- treeview1.select(focus);
- }
- var iIndx = model.getValue("/root/temp/condition/rowcnt");
-
- model.setValue("/root/temp/condition/indexcode", model.getValue("/root/main/indxlist/item[indxnm='" + model.getValue("/root/main/indxinfo/"+indx+"/indxnm") + "']/itemindxseq"));
- model.refresh();
- }
- /**
- * @desc : indx 선택 정보 표시( 밸류, 이미지, 서식, 단위)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIndxSelect(){
- fValBtnDisable(true);
- fTermBtnDisable(true);
- fImgBtnDisable(true);
- fUnitBtnDisable(true);
-
- model.resetInstanceNode("/root/main/indxinfo");
- model.refresh();
- 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(){
- fValBtnDisable(true);
- fTermBtnDisable(true);
- fImgBtnDisable(true);
- fUnitBtnDisable(true);
- 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)));
- }
- //alert("itemseq"+model.getValue("/root/main/indxlist/item["+iIndx+"]/itemindxseq"));
- //model.setValue("/root/main/indxinfo/valindx/supitemindxseq" ,model.getValue("/root/main/indxlist/item/itemindxseq"));
- model.refresh();
- }
- /**
- * @desc : indx정보 저장( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveIndxinfo(){
- var state = model.getValue("/root/temp/condition/state");
- /*
- //입력한 색인코드와 동일한 코드가 존재하는지 체크해본 후 동일한 코드 존재하면 수정, 존재하지 않으면 등록
- model.removeNodeset("/root/send");
- if(model.getValue("/root/temp/condition/indxflag") == "V") {
- model.makeValue("/root/send/itemindxseq", model.getValue("/root/main/indxinfo/valindx/itemindxseq")); //분기: 밸류리스트
-
- }else if(model.getValue("/root/temp/condition/indxflag") == "F") {
- model.makeValue("/root/send/itemindxseq", model.getValue("/root/main/indxinfo/formindx/itemindxseq")); //분기:서식
-
- }else if(model.getValue("/root/temp/condition/indxflag") == "P") {
- model.makeValue("/root/send/itemindxseq", model.getValue("/root/main/indxinfo/imgindx/itemindxseq")); //분기:이미지
-
- }else if(model.getValue("/root/temp/condition/indxflag") == "U") {
- model.makeValue("/root/send/itemindxseq", model.getValue("/root/main/indxinfo/unitindx/itemindxseq")); //분기:
-
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/temp/condition/indxflag"));
-
- submit("TRMRF01903");
-
- */
- // if(treeview1.focusindex == -1){
- // messageBox("색인을","C002");
- // return;
- // }
- if(state == "I") {
-
- fSaveIndx("I");
- } else if(state == "U") {
- fSaveIndx("U");
-
- }
- model.setValue("/root/temp/condition/state", "");
- //fClear();
- model.resetInstanceNode("/root/main/indxinfo");
- //최상위checkbox 초기화
- model.setValue("/root/temp/condition/highestlvel","");
- fValBtnDisable(true);
- fTermBtnDisable(true);
- fImgBtnDisable(true);
- fUnitBtnDisable(true);
- model.refresh();
- }
- /**
- * @desc : indx정보 삭제( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelindx(){
- var rtn = messageBox("색인을 ", "Q001");
- if (rtn == "6"){
- model.setValue("/root/temp/condition/state", "D");
-
- fSaveIndx("D");
- model.setValue("/root/temp/condition/state", "");
- fClear();
- model.refresh();
- }
- }
- /**
- * @desc : indx정보 추가( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddindx(){
- var indx = model.getValue("/root/temp/condition/rowcnt");
-
- if(indx == "" ){
- indx = -1;
- }
- var indxpath = null;
-
- fValBtnDisable(false);
- fTermBtnDisable(false);
- fImgBtnDisable(false);
- fUnitBtnDisable(false);
-
- //if(model.getValue("/root/temp/condition/selectedindx") == "" || model.getValue("/root/temp/condition/selectedindx") == null){
- //var rtn1 = messageBox("상위 색인을 ", "C002");
- //}
- fClear();
- // alert("indxexcode"+model.getValue("/root/temp/condition/indexcode"));
- // if(model.getValue("/root/temp/condition/indexcode") != "" ) {
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + indx + "]/itemindxseq");
- if(model.getValue("/root/temp/condition/indxflag") == "V") {
- fValBtnDisable(false);
- indxpath = "valindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "F") {
- fTermBtnDisable(false);
- indxpath = "formindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "P") {
- fImgBtnDisable(false);
- indxpath = "imgindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "U") {
- fUnitBtnDisable(false);
-
- indxpath = "unitindx";
-
- }
- // }
- model.makeValue("/root/main/indxinfo/" + indxpath + "/valiyn","Y");
- model.makeValue("/root/main/indxinfo/" + indxpath + "/supitemindxseq", model.getValue("/root/main/indxlist/item[" + indx + "]/itemindxseq"));
- model.makeValue("/root/main/indxinfo/" + indxpath + "/upindxnm", model.getValue("/root/main/indxlist/item[" + indx + "]/indxnm"));
- model.makeValue("/root/main/indxinfo/" + indxpath + "/indxflag", model.getValue("/root/temp/condition/indxflag"));
-
-
- model.setValue("/root/temp/condition/state", "I"); //최상위 레벨 등록(상위코드=인덱스코드)
- model.setValue("/root/temp/condition/highestlvel", "");
- model.refresh();
-
-
- }
-
- /**
- * @desc : indx정보 수정( 밸류, 이미지, 서식, 단위)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUpdateIndx(){
- var focus = model.getValue("/root/temp/condition/focusindx");
- if(focus == ""){
- return;
- }
- /* fValBtnDisable(false);
- fTermBtnDisable(false);
- fImgBtnDisable(false);
- fUnitBtnDisable(false);
- */
- model.setValue("/root/temp/condition/state", "U");
- var indxpath;
- if(model.getValue("/root/temp/condition/indxflag") == "V") {
- fValBtnDisable(false);
- indxpath = "valindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "F") {
- fTermBtnDisable(false);
- indxpath = "formindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "P") {
- fImgBtnDisable(false);
- indxpath = "imgindx";
- } else if(model.getValue("/root/temp/condition/indxflag") == "U") {
- fUnitBtnDisable(false);
- indxpath = "unitindx";
- }
- //fCompareNodes 비교위해 copynode
- model.makeNode("/root/main/indxinfo/" + indxpath + "2");
- model.copyNode("/root/main/indxinfo/" + indxpath + "2","/root/main/indxinfo/" + indxpath);
- }
- /**
- * @desc : 최상위 버튼 선택
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fHighbtn(){
- if(model.getValue("/root/temp/condition/highestlvel") == "Y"){
-
- if(model.getValue("/root/temp/condition/indxflag") == "V") {
- model.makeValue("/root/main/indxinfo/valindx/supitemindxseq", model.getValue("/root/main/indxinfo/valindx/itemindxseq"));
- } else if(model.getValue("/root/temp/condition/indxflag") == "F") {
- model.makeValue("/root/main/indxinfo/formindx/supitemindxseq", model.getValue("/root/main/indxinfo/formindx/itemindxseq"));
- } else if(model.getValue("/root/temp/condition/indxflag") == "P"){
- model.makeValue("/root/main/indxinfo/imgindx/supitemindxseq", model.getValue("/root/main/indxinfo/imgindx/itemindxseq"));
- } else if(model.getValue("/root/temp/condition/indxflag") == "U"){
- model.makeValue("/root/main/indxinfo/unitindx/supitemindxseq", model.getValue("/root/main/indxinfo/unitindx/itemindxseq"));
- } else{
- model.makeValue("/root/main/indxinfo/imgindx/supitemindxseq", model.getValue("/root/main/indxinfo/imgindx/itemindxseq"));
- }
- model.refresh();
- }
-
- }
|