MRF02100.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. /**
  2. * @desc : 화면 초기화
  3. * @
  4. * @param :
  5. * @return :
  6. * @---------------------------------------------------
  7. */
  8. function fInitialize(){
  9. var indxflag = opener.javascript.getParameter("indxflag");
  10. model.setValue("/root/temp/condition/indxflag",indxflag);
  11. model.setValue("/root/init/today", getCurrentDate());
  12. var value = model.getValue("/root/temp/condition/indxflag");
  13. if(model.getValue("/root/temp/condition/indxflag") == "V") {
  14. fIndxListSrch();
  15. } else if(model.getValue("/root/temp/condition/indxflag") == "F") {
  16. fIndxListSrch();
  17. } else if(model.getValue("/root/temp/condition/indxflag") == "P"){
  18. fIndxListSrch();
  19. } else if(model.getValue("/root/temp/condition/indxflag") == "U"){
  20. fIndxListSrch();
  21. }
  22. }
  23. /**
  24. * @desc : ?????? (?????? ?????? tree?? road????)
  25. * @param : ???? id (btnID)
  26. * @return :
  27. * @---------------------------------------------------
  28. */
  29. function fIndxListSrch(){
  30. model.removeNodeset("/root/send/indxflag");
  31. model.makeValue("/root/send/indxflag","");
  32. model.setValue("/root/send/indxflag", model.getValue("/root/temp/condition/indxflag"));
  33. submit("TRMRF01901");
  34. }
  35. /**
  36. * @desc : ?????? (?????? ?????? tree?? road????)
  37. * @param : ???? id (btnID)
  38. * @return :
  39. * @---------------------------------------------------
  40. */
  41. function fIndxInfoListSrch(){
  42. var iIndx = treeview1.focusIndex + 1;
  43. var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/itemindxseq");
  44. model.setValue("/root/temp/condition/rowcnt", iIndx);
  45. model.setValue("/root/temp/condition/selectedindx", selIndxCd);
  46. model.setValue("/root/temp/condition/focusindx", iIndx);
  47. model.makeValue("/root/send/itemindxseq", selIndxCd );
  48. model.makeValue("/root/send/indxflag", model.getValue("/root/temp/condition/indxflag"));
  49. submit("TRMRF01902");
  50. }
  51. /**
  52. * @desc :indxinfo 초기화
  53. * @
  54. * @param :
  55. * @return :
  56. * @---------------------------------------------------
  57. */
  58. function fClear(){
  59. model.resetInstanceNode("/root/main/indxinfo");
  60. model.refresh();
  61. }
  62. /**
  63. * @desc :버튼 disabled
  64. * @
  65. * @param :
  66. * @return :
  67. * @---------------------------------------------------
  68. */
  69. function fDisable(flag){
  70. if(flag == "DA"){
  71. ipt_indxhngnm.disabled = "false";
  72. ipt_indxengnm.disabled = "false";
  73. btn_upindxcd.disabled = "false";
  74. cmb_indxdrdiflag.disabled = "false";
  75. ipt_indxseqno.disabled = "false";
  76. } else if(flag == "DD"){
  77. ipt_indxhngnm.disabled = "true";
  78. ipt_indxengnm.disabled = "true";
  79. btn_upindxcd.disabled = "true";
  80. cmb_indxdrdiflag.disabled = "true";
  81. ipt_indxseqno.disabled = "true";
  82. }
  83. model.refresh();
  84. }
  85. /**
  86. * @desc : indx 선택 정보 표시( 밸류, 이미지, 서식)
  87. * @
  88. * @param :
  89. * @return :
  90. * @---------------------------------------------------
  91. */
  92. function fIndxSelect(){
  93. if(model.getValue("/root/temp/condition/indxflag") == "V") {
  94. model.toggle("case1");
  95. fIndxListSrch();
  96. }else if(model.getValue("/root/temp/condition/indxflag") == "F") {
  97. model.toggle("case2");
  98. fIndxListSrch();
  99. }else if(model.getValue("/root/temp/condition/indxflag") == "P"){
  100. model.toggle("case4");
  101. fIndxListSrch();
  102. }else if(model.getValue("/root/temp/condition/indxflag") == "U"){
  103. model.toggle("case3");
  104. fIndxListSrch();
  105. }else if(model.getValue("/root/temp/condition/indxflag") == ""){
  106. model.toggle("case1");
  107. model.setValue("/root/temp/condition/indxflag",'V');
  108. fIndxListSrch();
  109. }
  110. }
  111. /**
  112. * @desc : tree 선택 정보 표시( 밸류, 이미지, 서식)
  113. * @
  114. * @param :
  115. * @return :
  116. * @---------------------------------------------------
  117. */
  118. function fTreeSelect(){
  119. fIndxInfoListSrch();
  120. //itemPath 분할후 정보란에 입력
  121. var depthnm = treeview1.getItemPath(treeview1.selectedindex,"\\");
  122. var depth;
  123. depth = depthnm.split('\\');
  124. var a1 = new Array(depth.length);
  125. var b1 = new Array(depth.length);
  126. var cc = depthnm.size;
  127. var count =0;
  128. for(var i=0; i<depth.length; i++){
  129. b1[i]= depth[i];
  130. count++;
  131. }
  132. var indx = model.getValue("/root/temp/condition/indxflag");
  133. var indxpath = null;
  134. if(indx=="V"){
  135. indxpath = "valindx";
  136. }else if(indx=="F"){
  137. indxpath = "formindx";
  138. }else if(indx=="P"){
  139. indxpath = "imgindx";
  140. }else if(indx=="U"){
  141. indxpath = "unitindx";
  142. }
  143. for(var i=0; i< count; i++){
  144. model.makeValue("/root/temp/condition/depthnm"+(i+1),b1[i]);
  145. model.makeValue("/root/main/indxinfo/" + indxpath + "/depthnm"+(i+1) ,model.getValue("/root/temp/condition/depthnm"+(i+1)));
  146. }
  147. model.refresh();
  148. }
  149. /**
  150. * @desc : deptcd 를 나누어 저장
  151. * @
  152. * @param :
  153. * @return :
  154. * @---------------------------------------------------
  155. */
  156. function fDeptcdSplit(){
  157. //해당 정보 조회/등록화면에 뿌려준다.
  158. //fDisable("DD");
  159. fTreeSelect();
  160. var deptcd =model.getValue("/root/main/indxlist/item["+(treeview1.selectedindex + 1)+"]/pathcd");
  161. var depth;
  162. depth = deptcd.split('.');
  163. var a1 = new Array(depth.length);
  164. var b1 = new Array(depth.length);
  165. var cc = deptcd.size;
  166. var count =0;
  167. for(var i=0; i<depth.length; i++){
  168. b1[i]= depth[i];
  169. count++;
  170. }
  171. for(var i=0; i < count; i++){
  172. model.makeValue("/root/temp/condition/depthcd"+(i+1),b1[i]);
  173. model.makeValue("/root/main/indxinfo/imgindx/depthcd"+(i+1) ,model.getValue("/root/temp/condition/depthcd"+(i+1)));
  174. }
  175. model.setValue("/root/temp/condition/count",count);
  176. }
  177. /**
  178. * @desc : 취소
  179. * @
  180. * @param :
  181. * @return :
  182. * @---------------------------------------------------
  183. */
  184. function fClose(){
  185. opener.javascript.setParameter("unitnm", "");
  186. model.close();
  187. }
  188. /**
  189. * @desc : 확인
  190. * @
  191. * @param :
  192. * @return :
  193. * @---------------------------------------------------
  194. */
  195. function findxConfirm(){
  196. iRow = treeview1.focusIndex;
  197. //alert(iRow);
  198. //if(iRow == -1){
  199. // return;
  200. //} //선택창일 경우
  201. var indx = model.getValue("/root/temp/condition/indxflag");
  202. var indxnm;
  203. var indxpath;
  204. if(indx=="V"){
  205. indxnm = "valindxnm";
  206. indxpath = "valindx";
  207. }else if(indx=="F"){
  208. indxnm = "formindxnm";
  209. indxpath = "formindx";
  210. }else if(indx=="P"){
  211. indxnm = "imgindxnm";
  212. indxpath = "imgindx";
  213. }
  214. for(var i=0; i < 5; i++ ){
  215. opener.javascript.setParameter("depthcd"+(i+1),"");
  216. opener.javascript.setParameter("depthnm"+(i+1),"");
  217. }
  218. //deptcd의 갯수
  219. var count = model.getValue("/root/temp/condition/count");
  220. var indxnm =model.getValue("/root/main/indxinfo/" + indxpath + "/indxnm");
  221. for(var i=0; i < count; i++ ){
  222. opener.javascript.setParameter("depthnm"+(i+1), model.getValue("/root/main/indxinfo/" + indxpath + "/depthnm"+(i+1)));
  223. opener.javascript.setParameter("depthcd"+(i+1), model.getValue("/root/main/indxinfo/" + indxpath + "/depthcd"+(i+1)));
  224. }
  225. //deptcd의 count
  226. opener.javascript.setParameter("count",count);
  227. opener.javascript.setParameter("indexcode", model.getValue("/root/temp/condition/indexcode"));
  228. opener.javascript.setParameter("pathcd", model.getValue("/root/main/indxlist/item["+(treeview1.selectedindex + 1)+"]/pathcd"));
  229. //밸류리스트 항목색인순번
  230. model.close();
  231. }