SPCCM00300_부서검색.xfdl 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPCCM00300" position="absolute 0 0 495 350" titletext="부서 조회" oninit="SPCCM00300_oninit" onload="SPCCM00300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption9" text="부서 조회" class="tit_2" position="absolute 0 47 111 69"/>
  8. <Shape id="line12" class="line_10" position="absolute 0 63 489 69"/>
  9. <Grid id="grd_deptlist" taborder="1" binddataset="ds_main_list_deptlist" useinputpanel="false" position="absolute 0 68 489 311" autoenter="select" cellsizingtype="col" oncelldblclick="grd_deptlist_oncelldblclick">
  10. <Formats>
  11. <Format id="default">
  12. <Columns>
  13. <Column size="29"/>
  14. <Column size="150"/>
  15. <Column size="180"/>
  16. <Column size="130"/>
  17. </Columns>
  18. <Rows>
  19. <Row size="24" band="head"/>
  20. <Row size="24"/>
  21. </Rows>
  22. <Band id="head">
  23. <Cell/>
  24. <Cell col="1" text="기관명"/>
  25. <Cell col="2" text="부서명"/>
  26. <Cell col="3" text="부서코드"/>
  27. </Band>
  28. <Band id="body">
  29. <Cell celltype="head" expr="currow+1"/>
  30. <Cell col="1" text="bind:instnm"/>
  31. <Cell col="2" style="align:center top;padding:5 2 3 1;" text="bind:depthngnm" wordwrap="word"/>
  32. <Cell col="3" text="bind:deptcd"/>
  33. </Band>
  34. </Format>
  35. </Formats>
  36. </Grid>
  37. <Div id="group2" taborder="2" class="div_SA2" position="absolute 0 0 489 40">
  38. <Layouts>
  39. <Layout>
  40. <Static id="caption1" text="검색조건" class="search_name" position="absolute 9 11 126 28"/>
  41. <Shape id="line1" linetype="vertical" position="absolute 394 9 400 31"/>
  42. <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 412 9 468 31" onclick="group2_btn_search_onclick"/>
  43. <Edit id="ipt_search_item" taborder="2" autoselect="true" class="input_s_essential" position="absolute 249 10 371 29" onkeyup="group2_ipt_search_item_onkeyup"/>
  44. <Combo id="combo1" taborder="3" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_search" position="absolute 107 10 237 29">
  45. <Dataset id="innerdataset">
  46. <ColumnInfo>
  47. <Column id="codecolumn"/>
  48. <Column id="datacolumn"/>
  49. </ColumnInfo>
  50. <Rows>
  51. <Row>
  52. <Col id="codecolumn">deptcd</Col>
  53. <Col id="datacolumn">부서코드</Col>
  54. </Row>
  55. <Row>
  56. <Col id="codecolumn">deptnm</Col>
  57. <Col id="datacolumn">부서명</Col>
  58. </Row>
  59. </Rows>
  60. </Dataset>
  61. </Combo>
  62. </Layout>
  63. </Layouts>
  64. </Div>
  65. <Button id="button2" taborder="3" text="확인" class="btn4" position="absolute 373 317 429 339" onclick="button2_onclick"/>
  66. <Button id="button3" taborder="4" text="닫기" class="btn4" position="absolute 432 317 488 339" onclick="button3_onclick"/>
  67. </Layout>
  68. </Layouts>
  69. <Objects>
  70. <Dataset id="ds_main_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  71. <ColumnInfo>
  72. <Column id="searchcondition" type="STRING" size="256"/>
  73. <Column id="searchterm" type="STRING" size="256"/>
  74. <Column id="instcd" type="STRING" size="256"/>
  75. </ColumnInfo>
  76. <Rows>
  77. <Row>
  78. <Col id="searchcondition">deptnm</Col>
  79. <Col id="searchterm"/>
  80. <Col id="instcd"/>
  81. </Row>
  82. </Rows>
  83. </Dataset>
  84. <Dataset id="ds_main_list_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  85. <ColumnInfo>
  86. <Column id="instnm" type="STRING" size="256" sumtext="기관코드"/>
  87. <Column id="depthngnm" type="STRING" size="256" sumtext="부서명"/>
  88. <Column id="deptcd" type="STRING" size="256" sumtext="부서 코드"/>
  89. </ColumnInfo>
  90. </Dataset>
  91. <Dataset id="ds_send_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  92. </Objects>
  93. <Bind>
  94. <BindItem id="item0" compid="group2.combo1" propid="value" datasetid="ds_main_search" columnid="searchcondition"/>
  95. <BindItem id="item1" compid="group2.ipt_search_item" propid="value" datasetid="ds_main_search" columnid="searchterm"/>
  96. </Bind>
  97. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  98. * System Name :
  99. * Job Name :
  100. * Creator :
  101. * Make Date : 2016-05-24
  102. * Description :
  103. *---------------------------------------------------------------------------------------
  104. * Modify Date Modifier Modify Description
  105. *---------------------------------------------------------------------------------------
  106. * 2016-05-24 Live Converter TF->XP
  107. *
  108. *---------------------------------------------------------------------------------------
  109. ****************************************************************************************/
  110. include "com_commonxp::comm_main.xjs";
  111. function SPCCM00300_oninit(obj:Form, e:InitEventInfo)
  112. {
  113. frmf_initForm(obj);
  114. }
  115. function SPCCM00300_onload(obj:Form, e:LoadEventInfo)
  116. {
  117. grdf_initGrid(grd_deptlist);
  118. var search_condition = opener.frmf_getParameter("search_condition");
  119. var search_term = opener.frmf_getParameter("search_term");
  120. var orddeptflag = opener.frmf_getParameter("orddeptflag");
  121. // 두번째 검색시 첫번째 검색내용을 초기화시킴.
  122. ds_main_list_deptlist.clearData();
  123. ds_main_search.setColumn(0, "searchcondition", search_condition);
  124. ds_main_search.setColumn(0, "searchterm", search_term);
  125. dsf_makeValue(ds_send_data, "insttype", "string", "dutplceinstcd");
  126. dsf_makeValue(ds_send_data, "searchcondition", "string", search_condition);
  127. dsf_makeValue(ds_send_data, "searchterm", "string", search_term);
  128. dsf_makeValue(ds_send_data, "orddeptflag", "string", orddeptflag);
  129. // 처음 검색 팝업을 띄울 때에는 기본 정보를 안 보여주고, 한번 검색 한 이후에는 최종선택한 정보를 기본적으로 가져옴..
  130. if (utlf_isNull(search_term))
  131. {
  132. group2.ipt_search_item.setFocus();
  133. }
  134. else if (search_condition == "deptnm" && String(group2.ipt_search_item.value).length < 2)
  135. {
  136. sysf_messageBox("부서명 검색은 최소 2글자 이상 ", "C001");
  137. group2.ipt_search_item.setFocus();
  138. }
  139. else
  140. {
  141. var oParam = {};
  142. oParam.id = "TRCCM00301";
  143. oParam.service = "crmapp.Common";
  144. oParam.method = "reqGetDeptCodeList";
  145. oParam.inds = "req=ds_main_search";
  146. oParam.outds = "ds_main_list_deptlist=deptlist";
  147. oParam.async = false;
  148. //oParam.callback = "cf_TRCCM00301";
  149. tranf_submit(oParam);
  150. grd_deptlist.setFocus();
  151. }
  152. }
  153. function group2_ipt_search_item_onkeyup(obj:Edit, e:KeyEventInfo)
  154. {
  155. if(e.keycode == 13)
  156. {
  157. obj.updateToDataset();
  158. group2.btn_search.click();
  159. }
  160. }
  161. function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
  162. {
  163. var search_condition = ds_main_search.getColumn(0, "searchcondition");
  164. var search_term = ds_main_search.getColumn(0, "searchterm");
  165. var orddeptflag = opener.frmf_getParameter("orddeptflag");
  166. arrCompId = new Array("group2.ipt_search_item");
  167. if(frmf_isRequiredControls(arrCompId))
  168. {
  169. if (search_condition == "deptnm" && String(group2.ipt_search_item.value).length < 2)
  170. {
  171. sysf_messageBox("부서명 검색은 최소 2글자 이상 ", "C001");
  172. group2.ipt_search_item.setFocus();
  173. }
  174. else
  175. {
  176. ds_main_list_deptlist.clearData();
  177. dsf_makeValue(ds_send_data, "searchcondition", "string", search_condition);
  178. dsf_makeValue(ds_send_data, "searchterm", "string", search_term);
  179. dsf_makeValue(ds_send_data, "insttype", "string", "dutplceinstcd");
  180. dsf_makeValue(ds_send_data, "orddeptflag", "string", orddeptflag);
  181. var oParam = {};
  182. oParam.id = "TRCCM00301";
  183. oParam.service = "crmapp.Common";
  184. oParam.method = "reqGetDeptCodeList";
  185. oParam.inds = "req=ds_send_data";
  186. oParam.outds = "ds_main_list_deptlist=deptlist";
  187. oParam.async = false;
  188. //oParam.callback = "cf_TRCCM00301";
  189. tranf_submit(oParam);
  190. grd_deptlist.setFocus();
  191. }
  192. }
  193. }
  194. function grd_deptlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  195. {
  196. var row = ds_main_list_deptlist.rowposition;
  197. var deptcd = ds_main_list_deptlist.getColumn(row, "deptcd");
  198. var deptnm = ds_main_list_deptlist.getColumn(row, "depthngnm");
  199. if (row >= 0)
  200. {
  201. var objArg = new Object();
  202. objArg.deptcd = deptcd;
  203. objArg.deptnm = deptnm;
  204. this.close(objArg);
  205. }
  206. }
  207. function button2_onclick(obj:Button, e:ClickEventInfo)
  208. {
  209. var row = ds_main_list_deptlist.rowposition;
  210. var deptcd = ds_main_list_deptlist.getColumn(row, "deptcd");
  211. var deptnm = ds_main_list_deptlist.getColumn(row, "depthngnm");
  212. if (row >= 0)
  213. {
  214. var objArg = new Object();
  215. objArg.deptcd = deptcd;
  216. objArg.deptnm = deptnm;
  217. this.close(objArg);
  218. }
  219. else
  220. {
  221. sysf_messageBox("조회하신 후 목록을 ","C002");
  222. grd_deptlist.setFocus();
  223. }
  224. }
  225. function button3_onclick(obj:Button, e:ClickEventInfo)
  226. {
  227. this.close();
  228. }
  229. ]]></Script>
  230. </Form>
  231. </FDL>