123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/**
- * @desc : ?????? (?????? ?????? tree?? road????)
- * @param : ???? id (btnID)
- * @return :
- * @---------------------------------------------------
- */
- function fIndxListSrch(){
- ds_send.setColumn(0, "indxflag", ds_temp_condition.getColumn(0, "indxflag"));
-
- var oParam = {};
- oParam.id = "TRMRF01901";
- oParam.service = "formmngtapp.IndxMngt";
- oParam.method = "reqGetIndxList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_indxlist_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF01901";
- tranf_submit(oParam);
-
- ds_main_indxlist_item.rowposition = -1;
- }
- /**
- * @desc : ?????? (?????? ?????? tree?? road????)
- * @param : ???? id (btnID)
- * @return :
- * @---------------------------------------------------
- */
- function fIndxInfoListSrch(){
- var iIndx = ds_main_indxlist_item.rowposition;
- var selIndxCd = ds_main_indxlist_item.getColumn(iIndx, "itemindxseq");
- ds_temp_condition.setColumn(0, "rowcnt", iIndx);
-
- ds_temp_condition.setColumn(0, "selectedindx", selIndxCd);
- ds_temp_condition.setColumn(0, "focusindx", iIndx);
- ds_send.setColumn(0, "itemindxseq", selIndxCd );
- ds_send.setColumn(0, "indxflag", ds_temp_condition.getColumn(0, "indxflag"));
-
- var oParam = {};
- oParam.id = "TRMRF01902";
- oParam.service = "formmngtapp.IndxMngt";
- oParam.method = "reqGetIndxInfo";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_indxinfo_valindx=valindx ds_main_indxinfo_formindx=formindx ds_main_indxinfo_imgindx=imgindx ds_main_indxinfo_unitindx=unitindx";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF01902";
- tranf_submit(oParam);
-
- ds_main_indxinfo_valindx.addColumn("upindxnm", "string");
- ds_main_indxinfo_formindx.addColumn("upindxnm", "string");
- ds_main_indxinfo_imgindx.addColumn("upindxnm", "string");
- ds_main_indxinfo_unitindx.addColumn("upindxnm", "string");
- }
- /**
- * @desc :indxinfo 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClear(){
-
- ds_main_indxinfo_valindx.clearData();
- ds_main_indxinfo_valindx.addRow();
- ds_main_indxinfo_formindx.clearData();
- ds_main_indxinfo_formindx.addRow();
- ds_main_indxinfo_imgindx.clearData();
- ds_main_indxinfo_imgindx.addRow();
- ds_main_indxinfo_unitindx.clearData();
- ds_main_indxinfo_unitindx.addRow();
- }
- /**
- * @desc : val버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fValBtnDisable(flag){
- group2.cmb_highestlvel.enable = !flag;
- //ipt_itemindxseq1.disabled = flag;
- group2.switch1.case1.ipt_indxnm1.enable = !flag;
- group2.switch1.case1.ipt_indxcnts1.enable = !flag;
- //ipt_supitemindxseq1.disabled = flag;
- //ipt_upindxnm1.disabled = flag;
- group2.switch1.case1.cmb_valiyn1.enable = !flag;
- }
- /**
- * @desc :term버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTermBtnDisable(flag){
- group2.cmb_highestlvel.enable = !flag;
- //ipt_itemindxseq2.disabled = flag;
- group2.switch1.case2.ipt_indxnm2.enable = !flag;
- group2.switch1.case2.ipt_indxcnts2.enable = !flag;
- //ipt_supitemindxseq2.disabled = flag;
- //ipt_upindxnm2.disabled = flag;
- group2.switch1.case2.cmb_valiyn2.enable = !flag;
- }
- /**
- * @desc :img버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fImgBtnDisable(flag){
- group2.cmb_highestlvel.enable = !flag;
- //ipt_itemindxseq4.disabled = flag;
- group2.switch1.case4.ipt_indxnm4.enable = !flag;
- group2.switch1.case4.ipt_indxcnts4.enable = !flag;
- //ipt_supitemindxseq4.disabled = flag;
- //ipt_upindxnm4.disabled = flag;
- group2.switch1.case4.cmb_valiyn4.enable = !flag;
- }
- /**
- * @desc :unit버튼 disabled
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUnitBtnDisable(flag){
- group2.cmb_highestlvel.enable = !flag;
- //ipt_itemindxseq3.disabled = flag;
- group2.switch1.case3.ipt_indxnm3.enable = !flag;
- group2.switch1.case3.ipt_indxcnts3.enable = !flag;
- //ipt_supitemindxseq3.disabled = flag;
- //ipt_upindxnm3.disabled = flag;
- group2.switch1.case3.cmb_valiyn3.enable = !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 = eval(originalNode);
- var copy = eval(copyNode);
- 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"){ //?? ?? ??
- ds_send.clearData();
- ds_send.addRow();
-
- ds_send.setColumn(0, "state", flag); //?? : ??,??,??
- ds_send.setColumn(0, "indxflag", ds_temp_condition.getColumn(0, "indxflag")); //??:??,??,???,?
-
- if(ds_temp_condition.getColumn(0, "indxflag") == "V"){
- indx = "valindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "F"){
- indx = "formindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "P"){
- indx = "imgindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "U"){
- indx = "unitindx";
- }
- ds_send.setColumn(0, "supitemindxseq", eval("ds_main_indxinfo_"+indx).getColumn(0, "supitemindxseq"));
- ds_send.setColumn(0, "itemindxseq", eval("ds_main_indxinfo_"+indx).getColumn(0, "itemindxseq"));
- ds_send.setColumn(0, "indxnm", eval("ds_main_indxinfo_"+indx).getColumn(0, "indxnm"));
- ds_send.setColumn(0, "valiyn", eval("ds_main_indxinfo_"+indx).getColumn(0, "valiyn"));
- ds_send.setColumn(0, "indxcnts", eval("ds_main_indxinfo_"+indx).getColumn(0, "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"));
- ds_send.setColumn(0, "sortno", 0);
- if(flag =="U"){
- //수정 여부 check
- var compare = false;
-
- if( dsf_getDsCSV(eval("ds_main_indxinfo_"+indx+"2")) == dsf_getDsCSV(eval("ds_main_indxinfo_"+indx)) ){
- compare = true;
- }
-
- if(flag =="U" && compare == true){
-
- sysf_messageBox("수정된 내용이","I004");
- return;
- }
- }
-
- dsf_setDefaultVal(ds_send, "supitemindxseq:0");
-
- var oParam = {};
- oParam.id = "TXMRF01901";
- oParam.service = "formmngtapp.IndxMngt";
- oParam.method = "reqExeIndxCd";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_indxlist_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TXMRF01901";
- tranf_submit(oParam);
-
- var focus = ds_temp_condition.getColumn(0, "focusindx") - 1; //??? ???? ???
-
- ds_main_indxlist_item.rowposition = focus;
- }
- var iIndx = ds_temp_condition.getColumn(0, "rowcnt");
-
- ds_temp_condition.setColumn(0, "indexcode", ds_main_indxlist_item.lookupExpr("indxnm=='"+eval("ds_main_indxinfo_"+indx).getColumn(0, "indxnm")+"'", "itemindxseq"));
- }
- /**
- * @desc : indx 선택 정보 표시( 밸류, 이미지, 서식, 단위)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIndxSelect(){
- fValBtnDisable(true);
- fTermBtnDisable(true);
- fImgBtnDisable(true);
- fUnitBtnDisable(true);
-
- ds_main_indxinfo_valindx.clearData();
- ds_main_indxinfo_valindx.addRow();
- ds_main_indxinfo_formindx.clearData();
- ds_main_indxinfo_formindx.addRow();
- ds_main_indxinfo_imgindx.clearData();
- ds_main_indxinfo_imgindx.addRow();
- ds_main_indxinfo_unitindx.clearData();
- ds_main_indxinfo_unitindx.addRow();
-
- if(ds_temp_condition.getColumn(0, "indxflag") == "V") {
- group2.switch1.tabindex = 0;
- fIndxListSrch();
-
- }else if(ds_temp_condition.getColumn(0, "indxflag") == "F") {
- group2.switch1.tabindex = 1;
- fIndxListSrch();
- }else if(ds_temp_condition.getColumn(0, "indxflag") == "P"){
- group2.switch1.tabindex = 3;
- fIndxListSrch();
- }else if(ds_temp_condition.getColumn(0, "indxflag") == "U"){
- group2.switch1.tabindex = 2;
- fIndxListSrch();
- }else if(utlf_isNull(ds_temp_condition.getColumn(0, "indxflag"))){
- group2.switch1.tabindex = 0;
- ds_temp_condition.setColumn(0, "indxflag",'V');
- fIndxListSrch();
- }
- }
- /**
- * @desc : tree 선택 정보 표시( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTreeSelect(){
- fValBtnDisable(true);
- fTermBtnDisable(true);
- fImgBtnDisable(true);
- fUnitBtnDisable(true);
- fIndxInfoListSrch();
- //itemPath 분할후 정보란에 입력
- var depthnm = group2.treeview1.getTreePath(ds_main_indxlist_item.rowposition).replace(".", ",");
- 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 = ds_temp_condition.getColumn(0, "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++){
- dsf_makeValue(ds_temp_condition, "depthnm"+(i+1), "string", b1[i], 0);
- dsf_makeValue(eval("ds_main_indxinfo_"+indxpath), "depthnm"+(i+1), "string", ds_temp_condition.getColumn(0, "depthnm"+(i+1)), 0);
- }
- //alert("itemseq"+model.getValue("/root/main/indxlist/item["+iIndx+"]/itemindxseq"));
- //model.setValue("/root/main/indxinfo/valindx/supitemindxseq" ,model.getValue("/root/main/indxlist/item/itemindxseq"));
- }
- /**
- * @desc : indx정보 저장( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveIndxinfo(){
- var state = ds_temp_condition.getColumn(0, "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");
-
- }
- ds_temp_condition.setColumn(0, "state", "");
- //fClear();
- ds_main_indxinfo_valindx.clearData();
- ds_main_indxinfo_valindx.addRow();
- ds_main_indxinfo_formindx.clearData();
- ds_main_indxinfo_formindx.addRow();
- ds_main_indxinfo_imgindx.clearData();
- ds_main_indxinfo_imgindx.addRow();
- ds_main_indxinfo_unitindx.clearData();
- ds_main_indxinfo_unitindx.addRow();
- //최상위checkbox 초기화
- ds_temp_condition.setColumn(0, "highestlvel","");
- fValBtnDisable(true);
- fTermBtnDisable(true);
- fImgBtnDisable(true);
- fUnitBtnDisable(true);
- }
- /**
- * @desc : indx정보 삭제( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelindx(){
- var rtn = sysf_messageBox("색인을 ", "Q001");
- if (rtn == "6"){
- ds_temp_condition.setColumn(0, "state", "D");
-
- fSaveIndx("D");
- ds_temp_condition.setColumn(0, "state", "");
- fClear();
- }
- }
- /**
- * @desc : indx정보 추가( 밸류, 이미지, 서식)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddindx(){
- var indx = ds_temp_condition.getColumn(0, "rowcnt");
-
- if(utlf_isNull(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 = ds_main_indxlist_item.getColumn(indx, "itemindxseq");
- if(ds_temp_condition.getColumn(0, "indxflag") == "V") {
- fValBtnDisable(false);
- indxpath = "valindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "F") {
- fTermBtnDisable(false);
- indxpath = "formindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "P") {
- fImgBtnDisable(false);
- indxpath = "imgindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "U") {
- fUnitBtnDisable(false);
-
- indxpath = "unitindx";
-
- }
- // }
- dsf_makeValue(eval("ds_main_indxinfo_"+indxpath), "valiyn", "string", "Y", 0);
- dsf_makeValue(eval("ds_main_indxinfo_"+indxpath), "supitemindxseq", "string", ds_main_indxlist_item.getColumn(indx, "itemindxseq"), 0);
- dsf_makeValue(eval("ds_main_indxinfo_"+indxpath), "upindxnm", "string", ds_main_indxlist_item.getColumn(indx, "indxnm"), 0);
- dsf_makeValue(eval("ds_main_indxinfo_"+indxpath), "indxflag", "string", ds_temp_condition.getColumn(0, "indxflag"), 0);
-
-
- ds_temp_condition.setColumn(0, "state", "I"); //최상위 레벨 등록(상위코드=인덱스코드)
- ds_temp_condition.setColumn(0, "highestlvel", "");
-
-
- }
-
- /**
- * @desc : indx정보 수정( 밸류, 이미지, 서식, 단위)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUpdateIndx(){
- var focus = ds_temp_condition.getColumn(0, "focusindx");
- if(utlf_isNull(focus)){
- return;
- }
- /* fValBtnDisable(false);
- fTermBtnDisable(false);
- fImgBtnDisable(false);
- fUnitBtnDisable(false);
- */
- ds_temp_condition.setColumn(0, "state", "U");
- var indxpath;
- if(ds_temp_condition.getColumn(0, "indxflag") == "V") {
- fValBtnDisable(false);
- indxpath = "valindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "F") {
- fTermBtnDisable(false);
- indxpath = "formindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "P") {
- fImgBtnDisable(false);
- indxpath = "imgindx";
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "U") {
- fUnitBtnDisable(false);
- indxpath = "unitindx";
- }
- //fCompareNodes 비교위해 copynode
- dsf_createDs("ds_main_indxinfo_"+indxpath+"2");
- eval("ds_main_indxinfo_"+indxpath+"2").copyData(eval("ds_main_indxinfo_"+indxpath));
- }
- /**
- * @desc : 최상위 버튼 선택
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fHighbtn(){
- if(ds_temp_condition.getColumn(0, "highestlvel") == "Y"){
-
- if(ds_temp_condition.getColumn(0, "indxflag") == "V") {
- ds_main_indxinfo_valindx.setColumn(0, "supitemindxseq", ds_main_indxinfo_valindx.getColumn(0, "itemindxseq"));
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "F") {
- ds_main_indxinfo_formindx.setColumn(0, "supitemindxseq", ds_main_indxinfo_formindx.getColumn(0, "itemindxseq"));
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "P"){
- ds_main_indxinfo_imgindx.setColumn(0, "supitemindxseq", ds_main_indxinfo_imgindx.getColumn(0, "itemindxseq"));
- } else if(ds_temp_condition.getColumn(0, "indxflag") == "U"){
- ds_main_indxinfo_unitindx.setColumn(0, "supitemindxseq", ds_main_indxinfo_unitindx.getColumn(0, "itemindxseq"));
- } else{
- ds_main_indxinfo_imgindx.setColumn(0, "supitemindxseq", ds_main_indxinfo_imgindx.getColumn(0, "itemindxseq"));
- }
- }
-
- }
- ]]></Script>
|