SMMNT002.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. (SMMNT00200.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. /**
  7. * @group :
  8. * @ver : 2007.05.15
  9. * @by : 김진명
  10. * @---------------------------------------------------
  11. * @type : function
  12. * @access : public
  13. * @desc : 설명
  14. * @param :
  15. * @return :
  16. * @---------------------------------------------------
  17. */
  18. function fSearch()
  19. {
  20. var iRow = -1, iRow1, iRow2;
  21. model.copyNode("/root/send/reqdata", "/root/main/cond");
  22. submit("TRMNT00201", false);
  23. model.resetInstancenode("/root/send");
  24. var message = model.getValue("/root/properties/error/msg");
  25. var messageTemp = message.substring(0,1);
  26. if( messageTemp != "0" ){//조회건이 있으면
  27. model.setValue("/root/hidden/searflag", "ok");//검색 체크 플래그 값
  28. var synonym = model.getValue("/root/main/icnpinfo/icnpinfolist/synonym");
  29. var smlarty = model.getValue("/root/main/icnpinfo/icnpinfolist/smlarty");
  30. var antonym = model.getValue("/root/main/icnpinfo/icnpinfolist/antonym");
  31. var synonymTemp = synonym.split(","); //동의어
  32. var cnt1 = synonymTemp.length;
  33. var count = 1;
  34. for( var i = 0; i < cnt1; i++ ){
  35. if( i == 0 ){
  36. iRow = grd_wrdlist.row;
  37. model.setValue("/root/main/wrdlists/wrdlist/ssawrd", "동의어");
  38. }
  39. if( ( i != 0 )&&( i % 5 == 0 ) ){
  40. grd_wrdlist.addRow();
  41. iRow = grd_wrdlist.rows;
  42. model.setValue("/root/main/wrdlists/wrdlist[" + iRow + "]/ssawrd", "동의어");
  43. model.setValue("/root/main/wrdlists/wrdlist[" + iRow + "]/wrd"+((i+1)-(count*5)), synonymTemp[i]);
  44. count++;
  45. }else{
  46. if( iRow > 1 ){//첫번째 row인지 체크
  47. model.setValue("/root/main/wrdlists/wrdlist[" + iRow + "]/wrd"+((i+1)-((count-1)*5)), synonymTemp[i]);
  48. }else{
  49. model.setValue("/root/main/wrdlists/wrdlist/wrd"+((i+1)-((count-1)*5)), synonymTemp[i]);
  50. }
  51. }
  52. }
  53. var smlartyTemp = smlarty.split(","); //유사어
  54. var cnt2 = smlartyTemp.length;
  55. grd_wrdlist.addRow();
  56. count = 1;
  57. for( var j = 0; j < cnt2; j++ ){
  58. if( j == 0 ){
  59. iRow1 = grd_wrdlist.rows;
  60. model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/ssawrd", "유사어");
  61. }
  62. if( ( j != 0 )&&( j % 5 == 0 ) ){
  63. grd_wrdlist.addRow();
  64. iRow1 = grd_wrdlist.rows;
  65. model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/ssawrd", "유사어");
  66. model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/wrd"+((j+1)-(count*5)), smlartyTemp[j]);
  67. count++;
  68. }else{
  69. model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/wrd"+((j+1)-((count-1)*5)), smlartyTemp[j]);
  70. }
  71. }
  72. var antonymTemp = antonym.split(","); //반대어
  73. var cnt3 = antonymTemp.length;
  74. grd_wrdlist.addRow();
  75. count = 1;
  76. for( var k = 0; k < cnt3; k++ ){
  77. if( k == 0 ){
  78. iRow2 = grd_wrdlist.rows;
  79. model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/ssawrd", "반대어");
  80. }
  81. if( ( k != 0 )&&( k % 5 == 0 ) ){
  82. grd_wrdlist.addRow();
  83. iRow2 = grd_wrdlist.rows;
  84. model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/ssawrd", "반대어");
  85. model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/wrd"+((k+1)-(count*5)), antonymTemp[k]);
  86. count++;
  87. }else{
  88. model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/wrd"+((k+1)-((count-1)*5)), antonymTemp[k]);
  89. }
  90. }
  91. grd_wrdlist.colStyle(0, "all", "background-color") = "#cce8ff";
  92. model.refresh();
  93. }else{
  94. messageBox("검색된 데이터가 ", "I004");
  95. if( model.getValue("/root/hidden/searflag") == "ok" ){//검색된것이 있는지 없는지
  96. window.reload();
  97. }else {
  98. ipt_srchwrd.value = "";
  99. model.setFocus("ipt_srchwrd");
  100. }
  101. }
  102. grd_wrdlist.autoResize = true;
  103. }