SPRPZ00500_선택형부서코드HELP.xfdl 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPRPZ00500" position="absolute 0 0 584 545" titletext="Untitle" oninit="SPRPZ00500_oninit" onload="SPRPZ00500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group2" taborder="0" class="div_SA2" position="absolute 0 0 580 40">
  8. <Layouts>
  9. <Layout>
  10. <Edit id="ipt_refcond" taborder="1" class="input_s_essential" position="absolute 252 10 351 29" onkeydown="group2_ipt_refcond_onkeydown"/>
  11. <Button id="btn_search" taborder="2" text="조회" class="btn1" position="absolute 509 9 565 31" onclick="group2_btn_search_onclick"/>
  12. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 491 6 497 33"/>
  13. <Static id="caption2" text="조회조건 :" class="search_name" position="absolute 166 11 252 28"/>
  14. <Radio id="rdo_refcond" taborder="3" columncount="-1" rowcount="-1" innerdataset="@ds_init_refcond" codecolumn="value" datacolumn="label" class="radio_search" position="absolute 15 10 140 30" style="border:1 solid black ;" onitemchanged="group2_rdo_refcond_onitemchanged"/>
  15. </Layout>
  16. </Layouts>
  17. </Div>
  18. <Static id="caption1" text="부서 리스트" class="tit_2" position="absolute 0 43 95 64"/>
  19. <Shape id="line1" class="line_10" position="absolute 0 59 580 65"/>
  20. <Grid id="grd_deptlist" taborder="1" binddataset="ds_main_deptcodelist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 64 580 512" oncelldblclick="grd_deptlist_oncelldblclick">
  21. <Formats>
  22. <Format id="default">
  23. <Columns>
  24. <Column size="25"/>
  25. <Column size="50"/>
  26. <Column size="148"/>
  27. <Column size="324"/>
  28. </Columns>
  29. <Rows>
  30. <Row size="24" band="head"/>
  31. <Row size="24"/>
  32. </Rows>
  33. <Band id="head">
  34. <Cell/>
  35. <Cell col="1" text="선택"/>
  36. <Cell col="2" text="부서코드"/>
  37. <Cell col="3" text="부서명"/>
  38. </Band>
  39. <Band id="body">
  40. <Cell celltype="head" expr="currow+1"/>
  41. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:check" expr="expr:check == 'Y' ? 1 : 0"/>
  42. <Cell col="2" style="align:left middle;padding:2 2 2 2;" text="bind:deptcd"/>
  43. <Cell col="3" style="align:left middle;padding:2 2 2 2;" text="bind:depthngnm"/>
  44. </Band>
  45. </Format>
  46. </Formats>
  47. </Grid>
  48. <Shape id="line32" class="line_6" position="absolute 0 512 580 518"/>
  49. <Button id="btn_confirm" taborder="2" text="확인" class="btn4" position="absolute 466 517 522 539" onclick="btn_confirm_onclick"/>
  50. <Button id="btn_cancel" taborder="3" text="취소" class="btn4" position="absolute 524 517 580 539" onclick="btn_cancel_onclick"/>
  51. </Layout>
  52. </Layouts>
  53. <Objects>
  54. <Dataset id="ds_send_deptref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  55. <ColumnInfo>
  56. <Column id="refcond" type="STRING" size="256"/>
  57. <Column id="deptnm" type="STRING" size="256"/>
  58. <Column id="instcd" type="STRING" size="256"/>
  59. <Column id="deptcd" type="STRING" size="256"/>
  60. </ColumnInfo>
  61. <Rows>
  62. <Row>
  63. <Col id="refcond"/>
  64. <Col id="deptnm"/>
  65. <Col id="instcd"/>
  66. <Col id="deptcd"/>
  67. </Row>
  68. </Rows>
  69. </Dataset>
  70. <Dataset id="ds_init_refcond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  71. <ColumnInfo>
  72. <Column id="label" type="STRING" size="256"/>
  73. <Column id="value" type="STRING" size="256"/>
  74. </ColumnInfo>
  75. <Rows>
  76. <Row>
  77. <Col id="label">부서코드</Col>
  78. <Col id="value">deptcd</Col>
  79. </Row>
  80. <Row>
  81. <Col id="label">부서명</Col>
  82. <Col id="value">deptnm</Col>
  83. </Row>
  84. </Rows>
  85. </Dataset>
  86. <Dataset id="ds_main_deptcodelist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_deptcodelist_oncolumnchanged">
  87. <ColumnInfo>
  88. <Column id="check" type="STRING" size="256" sumtext="선택"/>
  89. <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
  90. <Column id="depthngnm" type="STRING" size="256" sumtext="부서명"/>
  91. </ColumnInfo>
  92. </Dataset>
  93. <Dataset id="ds_target_defaultvalue" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  94. <Dataset id="ds_target_validation" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  95. <Dataset id="ds_target" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  96. </Objects>
  97. <Bind>
  98. <BindItem id="item0" compid="group2.rdo_refcond" propid="value" datasetid="ds_send_deptref" columnid="refcond"/>
  99. <BindItem id="item1" compid="group2.ipt_refcond" propid="value" datasetid="ds_send_deptref" columnid="deptnm"/>
  100. </Bind>
  101. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  102. * System Name :
  103. * Job Name :
  104. * Creator :
  105. * Make Date : 2017-06-19
  106. * Description :
  107. *---------------------------------------------------------------------------------------
  108. * Modify Date Modifier Modify Description
  109. *---------------------------------------------------------------------------------------
  110. * 2017-06-19 Live Converter TF->XP
  111. *
  112. *---------------------------------------------------------------------------------------
  113. ****************************************************************************************/
  114. include "com_commonxp::comm_main.xjs";
  115. include "mis_miscommonxp::MIS.xjs";
  116. include "mis_humtrafactmngtxp::RPB001.xjs";
  117. function SPRPZ00500_oninit(obj:Form, e:InitEventInfo)
  118. {
  119. frmf_initForm(obj);
  120. }
  121. function SPRPZ00500_onload(obj:Form, e:LoadEventInfo)
  122. {
  123. grdf_initGrid(grd_deptlist);
  124. try
  125. {
  126. ds_target_defaultvalue.copyData(arg_ds_target_defaultvalue);
  127. }
  128. catch (e)
  129. {}
  130. try
  131. {
  132. ds_target_validation.copyData(arg_ds_target_validation);
  133. }
  134. catch (e)
  135. {}
  136. try
  137. {
  138. ds_target.copyData(arg_ds_target);
  139. }
  140. catch (e)
  141. {}
  142. ds_send_deptref.setColumn(0, "instcd", ds_target_defaultvalue.getColumn(0, "instcd"));
  143. group2.rdo_refcond.value = "deptnm";
  144. group2.ipt_refcond.setFocus();
  145. }
  146. function group2_rdo_refcond_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  147. {
  148. if(obj.value == "deptnm")
  149. {
  150. group2.ipt_refcond.imemode = "hangul";
  151. }
  152. else if (obj.value == "deptcd")
  153. {
  154. group2.ipt_refcond.imemode = "none";
  155. }
  156. else
  157. {
  158. group2.ipt_refcond.imemode = "none";
  159. }
  160. model.setFocus("ipt_refcond");
  161. }
  162. function group2_ipt_refcond_onkeydown(obj:Edit, e:KeyEventInfo)
  163. {
  164. if(e.keycode == 13)
  165. {
  166. obj.updateToDataset();
  167. group2.btn_search.click();
  168. }
  169. }
  170. function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
  171. {
  172. if(group2.rdo_refcond.value == "deptnm")
  173. {
  174. ds_send_deptref.setColumn(0, "deptnm", group2.ipt_refcond.text);
  175. }
  176. else
  177. {
  178. ds_send_deptref.setColumn(0, "deptcd", group2.ipt_refcond.text);
  179. }
  180. var oParam = {};
  181. oParam.id = "TRRPZ00501";
  182. oParam.service = "miscommoncdrefapp.CommonCdRef";
  183. oParam.method = "reqGetDeptList";
  184. oParam.inds = "req=ds_send_deptref";
  185. oParam.outds = "ds_main_deptcodelist=deptcodelist";
  186. oParam.async = false;
  187. //oParam.callback = "cf_TRRPZ00501";
  188. tranf_submit(oParam);
  189. }
  190. function ds_main_deptcodelist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  191. {
  192. if(e.columnid == "check")
  193. {
  194. obj.setColumn(e.row, "check", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  195. }
  196. }
  197. function grd_deptlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  198. {
  199. ds_main_deptcodelist.setColumn(ds_main_deptcodelist.rowposition, "check", "Y");
  200. btn_confirm.click();
  201. }
  202. function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  203. {
  204. this.close();
  205. }
  206. function btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  207. {
  208. misfPopUpCheckedListReturn(grd_deptlist, "check");
  209. }
  210. ]]></Script>
  211. </Form>
  212. </FDL>