SPZSD00600_부서트리검색팝업.xrw 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>부서트리검색팝업</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <deptlist>
  11. <dept>
  12. <deptcd/>
  13. <deptnm/>
  14. <deptdesc/>
  15. <deptcdlevl2/>
  16. <deptcdlevl3/>
  17. <deptcdlevl4/>
  18. <deptcdlevl5/>
  19. <deptcdlevl6/>
  20. <deptcdlevl7/>
  21. <updeptcd/>
  22. <fstrgstdt/>
  23. <fstrgstrid/>
  24. <lastrgstdt/>
  25. <lastrgstrid/>
  26. </dept>
  27. </deptlist>
  28. <search>
  29. <searchcondition>deptnm</searchcondition>
  30. <searchterm/>
  31. <instcd/>
  32. <supdeptcolumn/>
  33. </search>
  34. </main>
  35. <send>
  36. <data>
  37. <searchcondition/>
  38. <searchterm/>
  39. <instcd/>
  40. <supdeptcolumn/>
  41. </data>
  42. </send>
  43. </root>
  44. </instance>
  45. <script type="javascript" src="../../../com/basiccodeweb/js/basiccodeweb.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. var searchcondition = opener.window.javascript.getParameter("searchCondition");
  51. var searchterm = opener.window.javascript.getParameter("searchTerm");
  52. var instcd = opener.window.javascript.getParameter("instCd");
  53. var supdeptcolumn = opener.window.javascript.getParameter("supDeptColumn");
  54. model.setValue("/root/main/search/searchcondition", searchcondition);
  55. model.setValue("/root/main/search/searchterm", searchterm);
  56. model.setValue("/root/send/data/searchcondition", searchcondition);
  57. model.makeValue("/root/send/data/searchterm", searchterm);
  58. model.setValue("/root/send/data/instcd", instcd);
  59. model.setValue("/root/send/data/supdeptcolumn", supdeptcolumn);
  60. submit("TRZSD00115");
  61. model.refresh();
  62. grd_deptlist.rebuild();
  63. ]]>
  64. </script>
  65. <submission id="TRZSD00115" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/deptlist"/>
  66. </model>
  67. </xhtml:head>
  68. <xhtml:body pagewidth="534" pageheight="343" guideline="1,518;2,342;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  69. <group id="group3" scroll="auto" style="left:0px; top:0px; width:518px; height:316px; ">
  70. <group id="group2" style="left:0px; top:0px; width:518px; height:35px; vertical-align:top; ">
  71. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:517px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  72. <caption id="caption2" class="search_name" style="left:15px; top:8px; width:86px; height:17px; ">검색조건 :</caption>
  73. <button id="btn_search" class="btn1_letter2" style="left:445px; top:7px; width:56px; height:22px; ">
  74. <caption>조회</caption>
  75. <script type="javascript" ev:event="DOMActivate">
  76. <![CDATA[
  77. var searchterm = model.getValue("/root/main/search/searchterm");
  78. var searchcondition = model.getValue("/root/main/search/searchcondition");
  79. var instcd = opener.window.javascript.getParameter("instCd");
  80. var supdeptcolumn = opener.window.javascript.getParameter("supDeptColumn");
  81. model.setValue("/root/send/data/searchterm", searchterm);
  82. model.setValue("/root/send/data/searchcondition", searchcondition);
  83. model.setValue("/root/send/data/instcd", instcd);
  84. model.setValue("/root/send/data/supdeptcolumn", supdeptcolumn);
  85. success = submit("TRZSD00115");
  86. if(success) {
  87. var dept_fixed_rows = grd_deptlist.fixedRows;
  88. var dept_rows = grd_deptlist.rows;
  89. }
  90. /*
  91. if(success) {
  92. var dept_fixed_rows = grd_deptlist.fixedRows;
  93. var dept_rows = grd_deptlist.rows;
  94. alert("dept_fixed_rows = "+dept_fixed_rows);
  95. alert("dept_rows = "+dept_rows);
  96. var dept_iscurrent_index = grd_deptlist.colRef("iscurrent");
  97. var dept_color_index = grd_deptlist.colRef("color");
  98. for(var i = dept_fixed_rows; i<dept_rows; i++){
  99. var iscurrent = grd_deptlist.valueMatrix(i, dept_iscurrent_index);//현재 사용중인것과 종료된것을 구분한다.
  100. if(iscurrent=='Y'){//기관에서 현재사용중인부서
  101. //grd_clsdeptlist.rowstyle( i , "data" , "background-color" ) = "#ffffff";//현제 기관에서 사용중인 부서
  102. grd_deptlist.valueMatrix(i, cls_color_index) = "#ffffff";
  103. }else if(iscurrent=='F'){
  104. grd_deptlist.cellStyle("background-color", i, grd_deptlist.colRef("deptnm") ) = "#fcd2c1";//현제 기관에서 사용중이며 미래에 적용될 부서.
  105. grd_deptlist.valueMatrix(i, cls_color_index) = "#fcd2c1";
  106. }else if(iscurrent=='P'){
  107. grd_deptlist.cellStyle("background-color", i, grd_deptlist.colRef("deptnm") ) = "#b9e5fb";//현제 기관에서 사용중이며, 종료된부서.
  108. grd_deptlist.valueMatrix(i, dept_color_index) = "#b9e5fb";
  109. }else{
  110. grd_deptlist.cellStyle("background-color", i, grd_deptlist.colRef("deptnm") ) = "#c8e67b";//현제 기관에서는 사용하지 않는 부서
  111. grd_deptlist.valueMatrix(i, dept_color_index) = "#c8e67b";
  112. }
  113. }
  114. for(var j = grd_deptlist.fixedRows; j<grd_deptlist.rows;j++){
  115. var iscurrent = grd_deptlist.valueMatrix(j, grd_deptlist.colRef("iscurrent"));
  116. if(iscurrent=="Y"){
  117. //grd_deptlist.rowstyle( j , "data" , "background-color" ) = "#ffffff";//현제 기관의 선택된업무에서 사용중인 부서
  118. grd_deptlist.valueMatrix(j, grd_deptlist.colRef("color")) = "#ffffff";
  119. }else if(iscurrent=="F"){
  120. grd_deptlist.cellStyle("background-color", j, grd_deptlist.colRef("depthngnm") ) = "#fcd2c1";//현제 기관에서는 사용중이며, 종료된부서.
  121. grd_deptlist.valueMatrix(j, grd_deptlist.colRef("color")) = "#fcd2c1";
  122. }else if(iscurrent=="P"){
  123. grd_deptlist.cellStyle("background-color", j, grd_deptlist.colRef("depthngnm") ) = "#b9e5fb";//현제 기관에서는 사용중이며, 종료된부서.
  124. grd_deptlist.valueMatrix(j, grd_deptlist.colRef("color")) = "#b9e5fb";
  125. }
  126. }
  127. }
  128. */
  129. ]]>
  130. </script>
  131. </button>
  132. <line id="line13" style="x1:429px; y1:7px; x2:429px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  133. <select1 id="combo1" ref="/root/main/search/searchcondition" class="combo_search" appearance="minimal" style="left:101px; top:8px; width:80px; height:19px; ">
  134. <choices>
  135. <item>
  136. <label>부서코드</label>
  137. <value>deptcd</value>
  138. </item>
  139. <item>
  140. <label>부서명</label>
  141. <value>deptnm</value>
  142. </item>
  143. </choices>
  144. </select1>
  145. <input id="input3" ref="/root/main/search/searchterm" class="input_search" style="left:184px; top:8px; width:100px; height:19px; "/>
  146. <script type="javascript" ev:event="onkeyup">
  147. <![CDATA[
  148. inputEnterKey("btn_search", "DOMActivate");
  149. ]]>
  150. </script>
  151. </group>
  152. <caption id="caption1" class="tit_2" style="left:5px; top:46px; width:118px; height:14px; ">부서코드 목록</caption>
  153. <line id="line1" class="line_1" style="x1:0px; y1:61px; x2:517px; y2:61px; "/>
  154. <datagrid id="grd_deptlist" nodeset="/root/main/deptlist/dept" caption="부서 코드^부서이름" colsep="^" colwidth="100, 100" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:66px; width:517px; height:250px; ">
  155. <col ref="deptcd"/>
  156. <col ref="deptnm"/>
  157. <script type="javascript" ev:event="ondblclick">
  158. <![CDATA[
  159. if (isDataCell()) {
  160. var deptcdpath = opener.window.javascript.getParameter("receiveDeptCDPath");
  161. var deptnmpath = opener.window.javascript.getParameter("receiveDeptNMPath");
  162. var row = grd_deptlist.row;
  163. var deptcd = grd_deptlist.textmatrix( row, grd_deptlist.colRef("deptcd") );
  164. var deptnm = grd_deptlist.textmatrix( row, grd_deptlist.colRef("deptnm"));
  165. opener.model.setValue(deptcdpath, deptcd);
  166. opener.model.setValue(deptnmpath, deptnm);
  167. opener.model.refresh();
  168. window.close();
  169. }
  170. ]]>
  171. </script>
  172. </datagrid>
  173. </group>
  174. <group id="group1" scroll="auto" style="left:0px; top:316px; width:518px; height:27px; ">
  175. <button id="btn_confirm" class="btn4_letter2" style="left:402px; top:5px; width:56px; height:22px; ">
  176. <caption>확인</caption>
  177. <script type="javascript" ev:event="DOMActivate">
  178. <![CDATA[
  179. var deptcdpath = opener.window.javascript.getParameter("receiveDeptCDPath");
  180. var deptnmpath = opener.window.javascript.getParameter("receiveDeptNMPath");
  181. var row = grd_deptlist.row;
  182. var deptcd = grd_deptlist.textmatrix( row, grd_deptlist.colRef("deptcd") );
  183. var deptnm = grd_deptlist.textmatrix( row, grd_deptlist.colRef("deptnm"));
  184. opener.model.setValue(deptcdpath, deptcd);
  185. opener.model.setValue(deptnmpath, deptnm);
  186. opener.model.refresh();
  187. window.close();
  188. ]]>
  189. </script>
  190. </button>
  191. <button id="btn_cancel" class="btn4_letter2" style="left:461px; top:5px; width:56px; height:22px; ">
  192. <caption>취소</caption>
  193. <script type="javascript" ev:event="DOMActivate">
  194. <![CDATA[
  195. window.close();
  196. ]]>
  197. </script>
  198. </button>
  199. </group>
  200. </xhtml:body>
  201. </xhtml:html>