123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- /**
- * @group :
- * @ver : 2009.12.19
- * @by : 박구순
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면을 초기화 한다
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitalize(){
-
- var MenuParam = getScreenMenuParameter();
-
-
- grd_abbrLists.attribute("height") = 645;
-
- // 공통코드를 조회한다.
- //zbcfGetCodeList( new Array("A0129"), new Array("/root/init/A0129list") );
- submit("TRMRF00802");
-
- if ( MenuParam == "S") {
- model.setValue("/root/init/abbrtype","02");
- radio1.dispatch("xforms-value-changed");
- radio1.refresh();
- fSelectAbbrMasterLists();
- radio1.disabled = true;
- }
-
- }
- function fInit1(){
- grd_abbrLists.attribute("height") = 645;
- model.removeNodeset("/root/main/abbrinfo");
- model.makeNode("/root/main/abbrinfo");
- model.copyNode("/root/main/abbrinfo","/root/init/abbrinfo");
- button9.visible = "true";
- button5.visible = "false"
- button29.visible = "false"
-
- }
- function fSelectAbbrType(){
- if(radio1.value =="01"){
- group2.visible = "true";
- model.setValue("/root/init/abbrkind","%");
- cmb_abbrkind.refresh();
- cmb_abbrkind.disabled = "false";
- }else{
- group2.visible = "false";
- model.setValue("/root/init/abbrkind","%");
- cmb_abbrkind.refresh();
- cmb_abbrkind.disabled = "true";
- }
- }
- function fSelectAbbrNM(param){
- fInit1();
- // model.setValue("/root/send/abbrtype","01");
- // model.setValue("/root/send/abbrkind","%");
- // model.setValue("/root/send/perfectyn","N");
- // model.setValue("/root/send/useyn","%");
- // model.setValue("/root/send/keyword",param);
- // model.setValue("/root/send/keytag","09");
- model.setValue("/root/send/abbrtype" ,model.getValue("/root/init/abbrtype"));
- model.setValue("/root/send/abbrkind" ,model.getValue("/root/init/abbrkind"));
- model.setValue("/root/send/perfectyn",model.getValue("/root/init/perfectyn"));
- model.setValue("/root/send/useyn" ,model.getValue("/root/init/useyn"));
- model.setValue("/root/send/keyword",param);
- model.setValue("/root/send/keytag","09");
- submit("TRMRT00801");
- }
- function fSelectAbbrMasterLists(){
- model.setValue("/root/send/abbrtype" ,model.getValue("/root/init/abbrtype"));
- model.setValue("/root/send/abbrkind" ,model.getValue("/root/init/abbrkind"));
- model.setValue("/root/send/perfectyn",model.getValue("/root/init/perfectyn"));
- model.setValue("/root/send/useyn" ,model.getValue("/root/init/useyn"));
- model.setValue("/root/send/keyword" ,model.getValue("/root/init/keyword"));
-
- if(ipt_keyword.value.length < 2 && model.getValue("/root/init/perfectyn") =="N" &&model.getValue("/root/init/abbrtype")=="01"){
- if(model.getValue("/root/init/abbrkind")=="%"||model.getValue("/root/init/abbrkind")=="01"||model.getValue("/root/init/abbrkind")=="02"){
- messageBox("검색어는 2자 이상 입력해야 가능 합니다. ","I007");//I007=확인하십시오.
- return;
- }
- }
-
- model.setValue("/root/send/keytag" ,model.getValue("/root/init/keytag"));
- submit("TRMRT00801");
- }
- function fSelectAbbrMasterInfo(){
- var cur_row = grd_abbrLists.row;
- var vAbbrcd = grd_abbrLists.valueMatrix(cur_row,3);
-
- if(cur_row <= 0 || cur_row =="undefined") {
- messageBox("수정 할 행을 선택하시기 바랍니다.","I007");
- return;
- }
-
- if(vAbbrcd !=""){
- var vAbbrType = grd_abbrLists.valueMatrix(cur_row,1);
- fSetAbbrMasterInfo("update", vAbbrType);
- rdo_abbrtype.disabled="true";
- grd_abbrLists.attribute("height") = 360;
- button9.visible = "false";
- button5.visible = "true"
- button29.visible = "true"
-
- model.setValue("/root/send/abbrcd" ,vAbbrcd);
- submit("TRMRT00802");
- }else{
- messageBox("약어코드 정보가 없습니다.","I003");
- }
- }
- function fSetAbbrMasterInfo(flag, vAbbrType){
-
- if(flag=="new"){
- if(vAbbrType =="01"){ // 약어인경우세팅
- // rdo_abbrtype.disabled="true"; // 수정시 약어 금지어 변경 못하게 막음
- btn_synominfo.visible ="true";
- btn_recminfo.visible ="false";
- model.setValue("/root/main/abbrinfo/abbrkind","01");
- rdo_abbrkind.refresh();
- rdo_abbrkind.disabled = "false";
-
- model.setValue("/root/main/abbrinfo/unitkindseq","");
- cmb_unitkindseq.refresh();
- cmb_unitkindseq.disabled = "false";
-
- model.setValue("/root/main/abbrinfo/exchval","");
- ipt_exchval.refresh();
- ipt_exchval.disabled = "false";
-
- ipt_dclrtresn.disabled="true";
- }else if(vAbbrType =="02"){ // 금지어 인 경우 세팅
- // rdo_abbrtype.disabled="true"; // 수정시 약어 금지어 변경 못하게 막음
- btn_synominfo.visible ="false";
- btn_recminfo.visible ="true";
- ipt_dclrtresn.disabled="false";
- model.setValue("/root/main/abbrinfo/abbrkind","-");
- rdo_abbrkind.refresh();
- model.setValue("/root/main/abbrinfo/unitkindseq","");
- cmb_unitkindseq.refresh();
- cmb_unitkindseq.disabled = "true";
- model.setValue("/root/main/abbrinfo/exchval","");
- ipt_exchval.refresh();
- ipt_exchval.disabled = "true";
- rdo_abbrkind.disabled = "true";
-
- }
- }else{
- if(flag =="01"){ // 약어인경우세팅
- // rdo_abbrtype.disabled="true"; // 수정시 약어 금지어 변경 못하게 막음
- btn_synominfo.visible ="true";
- btn_recminfo.visible ="false";
- rdo_abbrkind.disabled = "false";
- cmb_unitkindseq.disabled = "false";
- ipt_exchval.disabled = "false";
-
- ipt_dclrtresn.disabled="true";
- }else if(flag =="02"){ // 금지어 인 경우 세팅
- // rdo_abbrtype.disabled="true"; // 수정시 약어 금지어 변경 못하게 막음
- btn_synominfo.visible ="false";
- btn_recminfo.visible ="true";
- ipt_dclrtresn.disabled="false";
- cmb_unitkindseq.disabled = "true";
- ipt_exchval.disabled = "true";
- rdo_abbrkind.disabled = "true";
-
- }
- }
- }
- function fSetNewAbbrMasterInfo(){
- grd_abbrLists.attribute("height") = 360;
- rdo_abbrtype.disabled="false";
- model.removeNodeset("/root/main/abbrinfo");
- model.makeNode("/root/main/abbrinfo");
- model.copyNode("/root/main/abbrinfo","/root/init/abbrinfo");
- button9.visible = "false";
- button5.visible = "true"
- button29.visible = "true"
- model.makeValue("/root/main/abbrinfo/abbrtodd","29991231");
- model.makeValue("/root/main/abbrinfo/abbrfromdd",getCurrentDate().substr(0, 8));
- model.refresh();
- fSetAbbrMasterInfo("new","01");
- }
- /*
- * 저장 버튼을 클릭하였을 경우 이벤트
- *
- */
- function fOnClickSaveBtn(){
- if(""==model.getValue("/root/main/abbrinfo/abbrnm")){
- messageBox("약어 항목이 누락 되었습니다.","I003");
- return;
- }
- if(""==model.getValue("/root/main/abbrinfo/abbrengnm")){
- messageBox("영문명 항목이 누락 되었습니다.","I003");
- return;
- }
- // if(""==model.getValue("/root/main/abbrinfo/abbrhngnm")){
- // messageBox("한글명 항목이 누락 되었습니다.","I003");
- // return;
- // }
- if(""==model.getValue("/root/main/abbrinfo/abbrfromdd")){
- messageBox("시작일자 항목이 누락 되었습니다.","I003");
- return;
- }
- if(""==model.getValue("/root/main/abbrinfo/abbrtodd")){
- messageBox("종료일자 항목이 누락 되었습니다.","I003");
- return;
- }
-
- if("01"==model.getValue("/root/main/abbrinfo/abbrtype") && "03"==model.getValue("/root/main/abbrinfo/abbrkind")){ // 약어+단위
- if(""==model.getValue("/root/main/abbrinfo/unitkindseq")){ // 금지어
- messageBox("단위유형 항목이 누락 되었습니다.","I003");
- return;
- }
- // if(""==model.getValue("/root/main/abbrinfo/exchval")){ // 금지어
- // messageBox("단위환산값 항목이 누락 되었습니다.","I003");
- // return;
- // }
- }
- if("02"==model.getValue("/root/main/abbrinfo/abbrtype")){ // 금지어
- if(""==model.getValue("/root/main/abbrinfo/dclrtresn")){ // 금지어
- messageBox("금지사유 항목이 누락 되었습니다.","I003");
- return;
- }
- }
-
-
- // model.removeNodeset("/root/newabbrcd");
- if( submit("TXMRT00801")){
-
- // model.setValue("/root/send/abbrcd" ,model.getValue("/root/newabbrcd/abbrcd"));
- // submit("TRMRT00802");
- fSetAbbrMasterInfo("save",model.getValue("/root/main/abbrinfo/abbrtype"));
- button9.visible = "true";
- button5.visible = "false"
- button29.visible = "false"
-
- }
- }
- function fOnClickCancleBtn(){
- model.removeNodeset("/root/main/abbrinfo");
- model.makeNode("/root/main/abbrinfo");
- model.copyNode("/root/main/abbrinfo","/root/init/abbrinfo");
- button9.visible = "true";
- button5.visible = "false";
- button29.visible = "false";
- model.refresh();
-
-
- }
- function fOpenSynomPop(){
- var vAbbrcd = model.getValue("/root/main/abbrinfo/abbrcd");
- if(vAbbrcd!=""){
- setParameter("SPMRJ01800_abbrcd", vAbbrcd);
-
- modal("SPMRT01800"); //SPMRT01800_약어의동의어관리.xrw
- submit("TRMRT00802");
-
- }else{
- messageBox("약어코드 정보가 없습니다.","I003");
- }
- }
- function fOpenRecmPop(){
- var vAbbrcd = model.getValue("/root/main/abbrinfo/abbrcd");
- if(vAbbrcd!=""){
- setParameter("SPMRJ01900_abbrcd", vAbbrcd);
-
- modal("SPMRT01900"); //SPMRT01800_약어의동의어관리.xrw
- submit("TRMRT00802");
- }else{
- messageBox("약어코드 정보가 없습니다.","I003");
- }
- }
- function fOpenAbbrPop(){
- modal("SPMRT02000"); //SPMRT02000_약어검색.xrw
- }
- function fSaveExecl(){
- var vRowCount = grd_abbrLists.Rows;
- if( vRowCount <= 1){
- messageBox("저장 할 정보가 없습니다.","I003");
- }else{
- var saveFileName = getCurrentDate().substr(0, 8)+"_약어검색";
- var fileName = window.fileDialog("save", ",", false, saveFileName, "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != ""){
- grd_abbrLists.saveExcel(fileName);
- }
- }
- }
|