SPZSD00600_부서트리검색팝업.xfdl 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPZSD00600" position="absolute 0 0 600 454" titletext="부서트리검색팝업" class="frm_POP" onload="SPZSD00600_onload" onkeydown="SPZSD00600_onkeydown">
  5. <Layouts>
  6. <Layout>
  7. <Div id="div_search" anchor="left top right" taborder="2" style="align:center top;" class="div_SA" position="absolute 12 46 588 88">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption2" text="검색조건" class="search_name" position="absolute 8 10 82 30" anchor="default"/>
  11. <Combo id="cb_condition" taborder="1" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_search" position="absolute 82 10 162 30" anchor="default" index="0" value="deptcd" text="부서코드" onitemchanged="div_search_cb_condition_onitemchanged">
  12. <Dataset id="innerdataset">
  13. <ColumnInfo>
  14. <Column id="codecolumn"/>
  15. <Column id="datacolumn"/>
  16. </ColumnInfo>
  17. <Rows>
  18. <Row>
  19. <Col id="codecolumn">deptcd</Col>
  20. <Col id="datacolumn">부서코드</Col>
  21. </Row>
  22. <Row>
  23. <Col id="codecolumn">deptnm</Col>
  24. <Col id="datacolumn">부서명</Col>
  25. </Row>
  26. </Rows>
  27. </Dataset>
  28. </Combo>
  29. <Edit id="ed_searchValue" taborder="2" imemode="alpha" class="input_search" position="absolute 165 10 265 30" anchor="default" onkeydown="div_search_ed_searchValue_onkeydown"/>
  30. <Button id="btn_search" taborder="3" text="조회" class="btn1" position="absolute 508 10 564 30" anchor="top right" onclick="div_search_btn_search_onclick"/>
  31. </Layout>
  32. </Layouts>
  33. </Div>
  34. <Static id="stt_titleText" text="부서트리검색" class="sta_POP_title" position="absolute 12 8 112 30"/>
  35. <Button id="btn_close" taborder="1" class="btn_POP_cls" position="absolute 574 12 588 25" anchor="top right" onclick="btn_close_onclick"/>
  36. <Static id="caption1" text="부서코드 목록" class="tit_2" position="absolute 12 98 135 118"/>
  37. <Grid id="grd_deptlist" taborder="3" binddataset="ds_deptList" useinputpanel="false" position="absolute 12 118 588 419" anchor="all" oncelldblclick="grd_deptlist_oncelldblclick" cellsizingtype="col">
  38. <Formats>
  39. <Format id="default">
  40. <Columns>
  41. <Column size="179"/>
  42. <Column size="387"/>
  43. </Columns>
  44. <Rows>
  45. <Row size="22" band="head"/>
  46. <Row size="20"/>
  47. </Rows>
  48. <Band id="head">
  49. <Cell text="부서 코드"/>
  50. <Cell col="1" text="부서이름"/>
  51. </Band>
  52. <Band id="body">
  53. <Cell text="bind:deptcd"/>
  54. <Cell col="1" text="bind:depthngnm"/>
  55. </Band>
  56. </Format>
  57. </Formats>
  58. </Grid>
  59. <Button id="btn_confirm" taborder="4" text="확인" class="btn4" position="absolute 473 422 529 442" anchor="right bottom" onclick="btn_confirm_onclick"/>
  60. <Button id="btn_cancel" taborder="5" text="취소" class="btn4" position="absolute 532 422 588 442" anchor="right bottom" onclick="btn_cancel_onclick"/>
  61. </Layout>
  62. </Layouts>
  63. <Objects>
  64. <Dataset id="ds_deptList" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  65. </Objects>
  66. <Script type="xscript4.0"><![CDATA[/************************************************************************************************
  67. * 파 일 명 : SPZSD00600_부서트리검색팝업.xfdl
  68. * 작 성 자 : 임준호
  69. * 작 성 일 : 2014.02.14
  70. * 설 명 : 부서트리검색 팝업
  71. * return value - (deptcd:부서코드, deptnm:부서명)
  72. * 수 정 자 :
  73. * 수정이력 :
  74. ************************************************************************************************/
  75. include "com_commonxp::comm_main.xjs"
  76. /************************************************************************************************
  77. ******************************** Form Variable **************************************************
  78. ************************************************************************************************/
  79. /************************************************************************************************
  80. ******************************** Form Function **************************************************
  81. ************************************************************************************************/
  82. /********************************************************************************
  83. * 설 명 : 부서정보를 서버에서 가져온다.
  84. * argument :
  85. ********************************************************************************/
  86. function lf_getDeptList(){
  87. var S_IN_DS_REQ = "ds_req";
  88. if(!utlf_isNull(this.objects["ds_req"])){
  89. ds_req.clear();
  90. }
  91. var objColInfo = new Array();
  92. objColInfo.push({col: "searchcondition", val: div_search.cb_condition.value});
  93. objColInfo.push({col: "searchterm", val: div_search.ed_searchValue.value});
  94. objColInfo.push({col: "instcd", val: plgv_sInstCd});
  95. objColInfo.push({col: "supdeptcolumn", val: plgv_sSupDeptColumn});
  96. dsf_createDsRow(S_IN_DS_REQ, objColInfo);
  97. tranf_submit({
  98. id: "tr_reqGetDepartmentListInTree"
  99. , service: "departmentcodeapp.DepartmentCodeAdmin"
  100. , method: "reqGetDepartmentListInTree"
  101. , inds : "req="+S_IN_DS_REQ
  102. , outds: "ds_deptList=dept"
  103. , async: true
  104. });
  105. }
  106. /********************************************************************************
  107. * 설 명 : 부모창의 return function을 호출하고 인자값을 넘겨준다.
  108. * argument :
  109. ********************************************************************************/
  110. function lf_setDeptInfo(){
  111. var sDeptcd = ds_deptList.getColumn(ds_deptList.rowposition, "deptcd");
  112. var sDepthngnm = ds_deptList.getColumn(ds_deptList.rowposition, "depthngnm");
  113. //eval("opener."+plgv_sReturnFuncNm+"('"+sDeptcd+"', '"+sDepthngnm+"')");
  114. var objRetVal = new Object();
  115. objRetVal.deptcd = sDeptcd;
  116. objRetVal.depthngnm = sDepthngnm;
  117. this.close(objRetVal);
  118. }
  119. /************************************************************************************************
  120. ******************************** Form Event *****************************************************
  121. ************************************************************************************************/
  122. /********************************************************************************
  123. * 설 명 : form onload - argument로 넘어온 검색조건과 검색어를
  124. * 해당 컴포넌트에 입력하고 조회한다.
  125. * argument :
  126. ********************************************************************************/
  127. function SPZSD00600_onload(obj:Form, e:LoadEventInfo)
  128. {
  129. frmf_initForm(obj);
  130. //div_search.cb_condition.index = 0;
  131. //div_search.ed_searchValue.value = "";
  132. if(!utlf_isNull(plgv_sSearchCondition)){
  133. div_search.cb_condition.value = plgv_sSearchCondition;
  134. }
  135. if(!utlf_isNull(plgv_sSearchTerm)){
  136. div_search.ed_searchValue.value = plgv_sSearchTerm;
  137. lf_getDeptList();
  138. }
  139. div_search.ed_searchValue.setFocus();
  140. setImemode(div_search.ed_searchValue, div_search.cb_condition.value);
  141. }
  142. /********************************************************************************
  143. * 설 명 : 조회 - 코드목록을 조회한다.
  144. * argument :
  145. ********************************************************************************/
  146. function div_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  147. {
  148. //trace("opener.arglgv_test="+opener.arglgv_test);
  149. lf_getDeptList();
  150. }
  151. /********************************************************************************
  152. * 설 명 : 취소 - 팝업을 닫는다.
  153. * argument :
  154. ********************************************************************************/
  155. function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  156. {
  157. this.close();
  158. }
  159. /********************************************************************************
  160. * 설 명 : 선택한 그리드의 cdid와 cdnm을 부모창으로 넘겨준다.
  161. * argument :
  162. ********************************************************************************/
  163. function gd_deptList_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  164. {
  165. lf_setDeptInfo();
  166. }
  167. /********************************************************************************
  168. * 설 명 : 선택한 그리드의 cdid와 cdnm을 부모창으로 넘겨준다.
  169. * argument :
  170. ********************************************************************************/
  171. function btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  172. {
  173. lf_setDeptInfo();
  174. }
  175. /********************************************************************************
  176. * 설 명 : edit박스에서 enter키 입력했을때 목록을 조회한다.
  177. * argument :
  178. ********************************************************************************/
  179. function div_search_ed_searchValue_onkeydown(obj:Edit, e:KeyEventInfo)
  180. {
  181. if(e.keycode == 13){
  182. lf_getDeptList();
  183. }
  184. }
  185. /********************************************************************************
  186. * 설 명 : 선택한 그리드의 cdid와 cdnm을 부모창으로 넘겨준다.
  187. * argument :
  188. ********************************************************************************/
  189. function gd_deptList_onkeydown(obj:Grid, e:KeyEventInfo)
  190. {
  191. if(e.keycode == 13){
  192. lf_setDeptInfo();
  193. }
  194. }
  195. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  196. {
  197. this.close();
  198. }
  199. function setImemode(objEdt:Edit, sValue){
  200. if(sValue == "deptcd"){
  201. objEdt.imemode = "alpha";
  202. }else if(sValue == "deptnm"){
  203. objEdt.imemode = "hangul";
  204. }
  205. }
  206. function div_search_cb_condition_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  207. {
  208. div_search.ed_searchValue.value = "";
  209. div_search.ed_searchValue.setFocus();
  210. setImemode(div_search.ed_searchValue, e.postvalue);
  211. }
  212. function SPZSD00600_onkeydown(obj:Form, e:KeyEventInfo)
  213. {
  214. if(e.keycode == 27) this.close();
  215. }
  216. function grd_deptlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  217. {
  218. lf_setDeptInfo();
  219. }
  220. ]]></Script>
  221. </Form>
  222. </FDL>