SPMRT02000.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /**
  2. * @group :
  3. * @ver : 2009.12.19
  4. * @by : 박구순
  5. * @---------------------------------------------------
  6. * @type : function
  7. * @access : public
  8. * @desc : 화면을 초기화 한다
  9. * @param :
  10. * @return :
  11. * @---------------------------------------------------
  12. */
  13. function fInitalize(){
  14. grd_abbrLists.attribute("height") = 645;
  15. model.setValue("/root/init/abbrkind","01");
  16. var MenuParam = getScreenMenuParameter();
  17. if ( MenuParam == "S") {
  18. model.setValue("/root/init/abbrtype","02");
  19. radio1.dispatch("xforms-value-changed");
  20. radio1.refresh();
  21. fSelectAbbrMasterLists();
  22. radio1.disabled = true;
  23. }
  24. submit("TRMRF00802");
  25. }
  26. function fInit1(){
  27. grd_abbrLists.attribute("height") = 645;
  28. model.removeNodeset("/root/main/abbrinfo");
  29. model.makeNode("/root/main/abbrinfo");
  30. model.copyNode("/root/main/abbrinfo","/root/init/abbrinfo");
  31. }
  32. function fSelectAbbrType(){
  33. if(radio1.value =="01"){
  34. group2.visible = "true";
  35. model.setValue("/root/init/abbrkind","%");
  36. cmb_abbrkind.disabled = "false";
  37. cmb_abbrkind.refresh();
  38. }else{
  39. group2.visible = "false";
  40. model.setValue("/root/init/abbrkind","%");
  41. cmb_abbrkind.disabled = "true";
  42. cmb_abbrkind.refresh();
  43. }
  44. }
  45. function fSelectAbbrNM(param){
  46. fInit1();
  47. model.setValue("/root/send/abbrtype" ,model.getValue("/root/init/abbrtype"));
  48. model.setValue("/root/send/abbrkind" ,model.getValue("/root/init/abbrkind"));
  49. model.setValue("/root/send/perfectyn",model.getValue("/root/init/perfectyn"));
  50. model.setValue("/root/send/useyn" ,model.getValue("/root/init/useyn"));
  51. model.setValue("/root/send/keyword",param);
  52. model.setValue("/root/send/keytag","09");
  53. submit("TRMRT00801");
  54. fSetGridColor();
  55. }
  56. function fSelectAbbrMasterLists(){
  57. model.setValue("/root/send/abbrtype" ,model.getValue("/root/init/abbrtype"));
  58. model.setValue("/root/send/abbrkind" ,model.getValue("/root/init/abbrkind"));
  59. model.setValue("/root/send/perfectyn",model.getValue("/root/init/perfectyn"));
  60. model.setValue("/root/send/useyn" ,model.getValue("/root/init/useyn"));
  61. model.setValue("/root/send/keyword" ,model.getValue("/root/init/keyword"));
  62. if(ipt_keyword.value.length < 2 && model.getValue("/root/init/perfectyn") =="N" && model.getValue("/root/init/abbrtype")=="%"){
  63. if(model.getValue("/root/init/abbrkind")=="%"||model.getValue("/root/init/abbrkind")=="01"||model.getValue("/root/init/abbrkind")=="02"){
  64. messageBox("검색어는 2자 이상 입력해야 가능 합니다. ","I007");//I007=확인하십시오.
  65. return;
  66. }
  67. }
  68. if(ipt_keyword.value.length < 2 && model.getValue("/root/init/perfectyn") =="N" &&model.getValue("/root/init/abbrtype")=="01"){
  69. if(model.getValue("/root/init/abbrkind")=="%"||model.getValue("/root/init/abbrkind")=="01"||model.getValue("/root/init/abbrkind")=="02"){
  70. messageBox("검색어는 2자 이상 입력해야 가능 합니다. ","I007");//I007=확인하십시오.
  71. return;
  72. }
  73. }
  74. model.setValue("/root/send/keytag" ,model.getValue("/root/init/keytag"));
  75. submit("TRMRT00801");
  76. fSetGridColor();
  77. }
  78. function fSetGridColor(){
  79. var vRowCount = grd_abbrLists.Rows;
  80. for(i=0 ; i < vRowCount; i++){
  81. if ("02"==grd_abbrLists.valueMatrix(i, 1)){
  82. grd_abbrLists.cellstyle("color", i,1,i,6) = "#ff0000";
  83. grd_abbrLists.cellstyle("color", i,11) = "#0066FF";
  84. }else{
  85. grd_abbrLists.cellstyle("color", i,1,i,6) = "#000000";
  86. grd_abbrLists.cellstyle("color", i,11) = "#000000";
  87. }
  88. }
  89. grd_abbrLists.refresh();
  90. }
  91. function fSaveExecl(){
  92. var vRowCount = grd_abbrLists.Rows;
  93. if( vRowCount <= 1){
  94. messageBox("저장 할 정보가 없습니다.","I003");
  95. }else{
  96. var saveFileName = getCurrentDate().substr(0, 8)+"_약어검색";
  97. var fileName = window.fileDialog("save", ",", false, saveFileName, "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  98. if (fileName != ""){
  99. grd_abbrLists.saveExcel(fileName);
  100. }
  101. }
  102. }