123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374 |
- /*
-
- ICNP 관리(SMMNR01200.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var iICNPTreeRow = -1;
- var xICNPInfoPath = "/root/main/icnpmngt/icnpinfo"; // ICNP 코드 상세정보
- var xICNPTreePath = "/root/main/icnptreeinfo/icnptreelist"; // ICNP Semantic Type Tree Info
- var xSmntTypePath = "/root/main/smnttypeinfo/smnttypelist"; // ICNP Semantic Type
- var xRefPath = "/root/hidden/icnpinfo";
- var xSynomInfoPath = "/root/main/icnpmngt/synominfo/synomlist";// 동의어 정보
- var xICNPCodePath = "/root/main/icnpsrchinfo/icnplist"; // 검색된 ICNP Code 정보
- var xCondPath = "/root/main/cond";
- var xRefInfoPath = "/root/hidden/refinfo";
- /**
- * @group :
- * @ver : 2007.02.22
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- model.makeValue("/root/hidden/uid/children/wid","SPMNR02700");
- model.setValue(xCondPath+"/synomvaliyn","%");
- if(model.getValue("/root/hidden/refinfo/flag")==""){ // 팝업이 아닌 경우 선택버튼을 보여주지 않는다.
- btn_select.visible = false
- }
- fSearch("smnttype");
- }
- /**
- * @group :
- * @ver : 2007.02.22
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ICNP 조회 (
- * @param : pFlag ( smnttype : ICNP Semantic Type 조회, icnpcd : ICNP Code 탭 조회,
- * @param : Synom : 동의어 조회, TermSrch : ICNP Code 조회 화면의 조회버튼)
- * @return :
- * @---------------------------------------------------
- */
-
- function fSearch(pFlag){
- if(pFlag == "smnttype"){
- model.toggle("smntTypeSrch");
- model.removenodeset(xICNPTreePath);
- model.removenodeset(xSmntTypePath);
- model.removenode("/root/send");
- model.makeValue("/root/send/flag","smnttype");
- if(submit("TRMNR01201")){
- var RowCnt = grd_smnttype.rows - grd_smnttype.fixedRows;
- if(RowCnt > 0){
- grd_smnttype.row = 1;
- fClicedGrid();
- }
- }
- }else if(pFlag == "icnpcd"){
- model.toggle("icnpcdSrch");
- model.removenodeset(xICNPTreePath);
- model.removenodeset(xICNPCodePath);
- model.setValue(xCondPath+"/termnm","");
- model.setValue(xCondPath+"/codeflag","%");
- model.setValue(xCondPath+"/valiyn","%");
- model.setValue(xCondPath+"/srchscop","1");
- model.setFocus("ipt_srchtermnm");
- }else if(pFlag == "Synom"){ // 동의어 조회
- var localcd = model.getValue(xICNPInfoPath+"/localcd");
- if(localcd ==""){
- messageBox("ICNP 용어가 선택되지","E007");
- return;
- }
- model.removenodeset(xSynomInfoPath);
- model.removenode("/root/send");
- model.makeValue("/root/send/synomvaliyn", model.getValue(xCondPath+"/synomvaliyn"));
- model.makeValue("/root/send/localcd", localcd);
- submit("TRMNR01204");
- }else if(pFlag == "TermSrch"){
- model.removenodeset(xICNPCodePath);
- model.removenodeset(xICNPTreePath);
- model.removenode("/root/send");
-
- model.makeValue("/root/send/termnm", model.getValue(xCondPath+"/termnm"));
- model.makeValue("/root/send/codeflag", model.getValue(xCondPath+"/codeflag"));
- model.makeValue("/root/send/valiyn", model.getValue(xCondPath+"/valiyn"));
- model.makeValue("/root/send/srchscop", model.getValue(xCondPath+"/srchscop"));
- if(submit("TRMNR01205")){
- if((grd_icnp.rows-grd_icnp.fixedrows) < 1){
- messageBox("조회된 데이터가","I004");
- }
- }
- }
-
- if(pFlag != "Synom"){
- fICNPInfoClear();
- model.removenodeset(xSynomInfoPath);
- model.refresh();
- }
-
- }
- /**
- * @group :
- * @ver : 2007.03.12
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 용어 추가 (
- * @param : pFlag ( ICNP : ICNP 용어, Synom : 동의어 용어)
- * @return :
- * @---------------------------------------------------
- */
- function fAddTerm(pFlag){
- if(pFlag == "ICNP"){
- var xpos = event.screenX;
- var ypos = event.screenY-300;
- model.removenode(xRefPath);
- var idx = swt_icnpsrch.selectedIndex;
-
- if(idx == 0 && iICNPTreeRow < 1){
- messageBox("Tree 정보에서 상위 ICNP 용어가 선택되지 않았습니다.\n(최상위 코드는 ICNP Semantic Type 검색 탭에서만 가능합니다)\n 용어 등록을","E001");
- return;
- }
-
- if(idx == 1 && iICNPTreeRow < 1){
- var iRtn = messageBox("Tree 정보에서 상위 ICNP 용어가 선택되지 않았습니다.\n최상위 코드만 등록이 가능합니다. ","Q003");
- if(iRtn != 6) return;
- }
-
- if(iICNPTreeRow < 1){
- var sSmntTypeRow = grd_smnttype.row;
- if(sSmntTypeRow < 1){
- messageBox("ICNP Semantic Type이 선택되지","E007");
- return;
- }
- model.makeValue(xRefPath+"/stat", "I");
- model.makeValue(xRefPath+"/supcd","********");
- model.makeValue(xRefPath+"/supcnptid","");
- model.makeValue(xRefPath+"/smnttypecd", model.getValue(xSmntTypePath+"["+sSmntTypeRow+"]/smnttypecd"));
- model.makeValue(xRefPath+"/smnttypenm", model.getValue(xSmntTypePath+"["+sSmntTypeRow+"]/engnm"));
- model.makeValue(xRefPath+"/levl", 1);
- model.makeValue(xRefPath+"/termflag","ICNP");
- }else{
- model.makeValue(xRefPath+"/stat", "I");
- model.makeValue(xRefPath+"/supcd", model.getValue(xICNPInfoPath+"/localcd"));
- model.makeValue(xRefPath+"/supcnptid", model.getValue(xICNPInfoPath+"/cnptid"));
- model.makeValue(xRefPath+"/smnttypecd", model.getValue(xICNPInfoPath+"/smnttypecd"));
- model.makeValue(xRefPath+"/smnttypenm", model.getValue(xICNPInfoPath+"/smnttypenm"));
- model.makeValue(xRefPath+"/levl", eval(model.getValue(xICNPInfoPath+"/levl"))+1);
- model.makeValue(xRefPath+"/termflag","ICNP");
- }
-
- modal("SPMNR02700",1,xpos,ypos,model.getValue("/root/hidden/uid/children/wid"),"/root/hidden/icnpinfo","/root/hidden/icnpinfo");
- if(getParameter("exec") == "Y"){
- fClicedGrid();
- fICNPInfoClear();
- model.removenodeset(xSynomInfoPath);
- model.refresh();
- }
- }else if(pFlag == "Synom"){
- var xpos = event.screenX-500;
- var ypos = event.screenY-500;
- var localcd = model.getValue(xICNPInfoPath+"/localcd");
- model.removenode(xRefPath);
- if(localcd == ""){
- messageBox("동의어를 등록할 ICNP 용어가 선택되지", "E007");
- return;
- }
-
- model.makeValue(xRefPath+"/stat","I");
- model.makeValue(xRefPath+"/reprlocalcd",model.getValue(xICNPInfoPath+"/localcd"));
- model.makeValue(xRefPath+"/todd",model.getValue(xICNPInfoPath+"/todd"));
- model.makeValue(xRefPath+"/cnptid",model.getValue(xICNPInfoPath+"/cnptid"));
- model.makeValue(xRefPath+"/termflag","Synom");
- modal("SPMNR02700",1,xpos,ypos,model.getValue("/root/hidden/uid/children/wid"),"/root/hidden/icnpinfo","/root/hidden/icnpinfo");
- if(getParameter("exec") == "Y"){
- fSearch("Synom");
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.03.12
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 용어 수정
- * @param : pFlag ( ICNP : ICNP 용어, Synom : 동의어 용어)
- * @return :
- * @---------------------------------------------------
- */
- function fUpdtTerm(pFlag){
- model.removenode(xRefPath);
- if(pFlag == "ICNP"){
- var xpos = event.screenX;
- var ypos = event.screenY-300;
- var localcd = model.getValue(xICNPInfoPath+"/localcd");
-
- if(localcd == ""){
- messageBox("수정할 ICNP 용어가 선택되지", "E007");
- return;
- }
-
- model.makeValue(xRefPath+"/stat", "U");
- model.makeValue(xRefPath+"/localcd", model.getValue(xICNPInfoPath+"/localcd"));
- model.makeValue(xRefPath+"/todd", model.getValue(xICNPInfoPath+"/todd"));
- model.makeValue(xRefPath+"/termflag","ICNP");
-
- modal("SPMNR02700",1,xpos,ypos,model.getValue("/root/hidden/uid/children/wid"),"/root/hidden/icnpinfo","/root/hidden/icnpinfo");
-
- if(getParameter("exec") == "Y"){
- fClicedGrid();
- fICNPInfoClear();
- model.removenodeset(xSynomInfoPath);
- model.refresh();
- }
- }else if(pFlag == "Synom"){
- var xpos = event.screenX-500;
- var ypos = event.screenY-500;
- var iRow = grd_icnpsynom.row;
- if(iRow < 1){
- messageBox("수정할 동의어가 선택되지", "E007");
- return;
- }
-
- model.makeValue(xRefPath+"/stat","U");
- model.makeValue(xRefPath+"/localcd",model.getValue(xSynomInfoPath+"["+iRow+"]/localcd"));
- model.makeValue(xRefPath+"/todd",model.getValue(xSynomInfoPath+"["+iRow+"]/todd"));
- modal("SPMNR02700",1,xpos,ypos,model.getValue("/root/hidden/uid/children/wid"),"/root/hidden/icnpinfo","/root/hidden/icnpinfo");
-
- if(getParameter("exec") == "Y"){
- fSearch("Synom");
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.03.12
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 클릭시..
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClicedGrid(){
- var idx = swt_icnpsrch.selectedIndex;
- var iRow = -1;
- var localcd = "";
-
- if(idx == 0){ // ICNP Code 조회
- iRow = grd_icnp.row;
- if(iRow < 1) return;
- model.removenode("/root/send");
- model.makeValue("/root/send/smnttypecd",model.getValue(xICNPCodePath+"["+iRow+"]/smnttypecd"));
- localcd = model.getValue(xICNPCodePath+"["+iRow+"]/localcd");
-
- }else if(idx == 1) { // ICNP Semantic Type 검색
- iRow = grd_smnttype.row;
- if(iRow < 1) return;
- model.removenode("/root/send");
- model.makeValue("/root/send/smnttypecd",model.getValue(xSmntTypePath+"["+iRow+"]/smnttypecd"));
- }
-
- if(submit("TRMNR01202")){
- iICNPTreeRow = -1;
- if(localcd != ""){
- model.setValue("/root/hidden/treevalue",localcd);
- trv_icnptree2.refresh();
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.03.13
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Tree View 클릭시..
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClickedTreeView(){
- var idx = swt_icnpsrch.selectedIndex;
-
- if(idx == 0){ // ICNP Code 조회
- iICNPTreeRow = trv_icnptree2.focusindex + 1;
- }else if(idx == 1){ // ICNP Semantic Type 검색
- iICNPTreeRow = trv_icnptree1.focusindex + 1;
- }
-
- if(iICNPTreeRow < 1) return;
-
- model.removenode("/root/send");
- model.makeValue("/root/send/localcd", model.getValue(xICNPTreePath+"["+iICNPTreeRow+"]/localcd"));
- model.makeValue("/root/send/todd", model.getValue(xICNPTreePath+"["+iICNPTreeRow+"]/todd"));
- model.makeValue("/root/send/synomvaliyn", model.getValue(xCondPath+"/synomvaliyn"));
- if(submit("TRMNR01203")){
- model.setValue(xICNPInfoPath+"/hngposinfo", model.getValue(xICNPTreePath+"["+iICNPTreeRow+"]/hngposinfo"));
- model.setValue(xICNPInfoPath+"/engposinfo", model.getValue(xICNPTreePath+"["+iICNPTreeRow+"]/engposinfo"));
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2007.03.13
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ICNP 정보 Clear
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fICNPInfoClear(){
- model.setValue(xICNPInfoPath+"/cdflag","");
- model.setValue(xICNPInfoPath+"/smnttypenm","");
- model.setValue(xICNPInfoPath+"/localcd","");
- model.setValue(xICNPInfoPath+"/cnptid","");
- model.setValue(xICNPInfoPath+"/hngnm","");
- model.setValue(xICNPInfoPath+"/engnm","");
- model.setValue(xICNPInfoPath+"/definecnts","");
- model.setValue(xICNPInfoPath+"/levl","");
- model.setValue(xICNPInfoPath+"/srcofdata","");
- model.setValue(xICNPInfoPath+"/fromdd","");
- model.setValue(xICNPInfoPath+"/todd","");
- model.setValue(xICNPInfoPath+"/valiyn","");
- model.setValue(xICNPInfoPath+"/hngposinfo","");
- model.setValue(xICNPInfoPath+"/engposinfo","");
- model.setValue(xICNPInfoPath+"/reprlocalcd","");
- model.setValue(xICNPInfoPath+"/smnttypecd","");
- }
- /**
- * @group :
- * @ver : 2007.03.14
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ICNP 정보 보내기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendITerm(){
- var terminfo = model.getValue(xICNPInfoPath+"/smnttypecd")+"▦"+
- model.getValue(xICNPInfoPath+"/localcd")+"▦"+
- model.getValue(xICNPInfoPath+"/hngnm")+"▦"+
- model.getValue(xICNPInfoPath+"/engnm")+"▦"+
- model.getValue(xICNPInfoPath+"/cnptid");
-
- opener.javascript.setParameter("terminfo",terminfo);
- model.close();
- }
|