SPADB61350_성분조회.xfdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPADB61350" position="absolute 0 0 642 591" titletext="성분조회" oninit="SPADB61350_oninit" onload="SPADB61350_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 8 8 633 558" id="group3" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Div position="absolute 0 0 625 35" align="align:center top;" id="group2" class="div_SA" anchor="default">
  11. <Layouts>
  12. <Layout>
  13. <Shape position="absolute 552 7 558 29" linetype="vertical" id="line13" class="line_4" anchor="default"/>
  14. <Button position="absolute 560 7 616 29" id="btn_sea" class="btn1" text="조회" anchor="default" onclick="group3_group2_btn_sea_onclick"/>
  15. <Static text="명칭" position="absolute 225 8 285 25" id="caption3" class="search_name" anchor="default"/>
  16. <Static text="코드" position="absolute 5 8 65 25" id="caption4" class="search_name" anchor="default"/>
  17. <Edit position="absolute 295 8 505 27" id="input1" class="input_search" anchor="default" onkeydown="group3_group2_input1_onkeydown"/>
  18. <Edit position="absolute 80 8 210 27" id="input2" class="input_search" anchor="default" onkeydown="group3_group2_input2_onkeydown"/>
  19. </Layout>
  20. </Layouts>
  21. </Div>
  22. <Static text="성분조회" position="absolute -1 45 94 61" id="caption1" class="tit_2" anchor="default"/>
  23. <Shape position="absolute 0 61 625 67" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;" anchor="default"/>
  24. <Grid position="absolute 0 66 625 350" id="grd_com" binddataset="ds_main_grid" anchor="default" autosizingtype="none" cellsizingtype="col" autofittype="col" treeusecheckbox="false" treeinitstatus="expand,null" treeuseimage="false" oncelldblclick="group3_grd_com_oncelldblclick">
  25. <Formats>
  26. <Format id="default">
  27. <Columns>
  28. <Column size="153"/>
  29. <Column size="48"/>
  30. <Column size="373"/>
  31. <Column size="47"/>
  32. </Columns>
  33. <Rows>
  34. <Row size="24" band="head"/>
  35. <Row size="24"/>
  36. </Rows>
  37. <Band id="head">
  38. <Cell text="코드"/>
  39. <Cell col="1" text="확장"/>
  40. <Cell col="2" text="명칭"/>
  41. <Cell col="3" text="레벨"/>
  42. </Band>
  43. <Band id="body">
  44. <Cell displaytype="tree" style="align:left middle;padding:0 0 0 -10;" text="bind:comcd" treelevel="bind:comlevel"/>
  45. <Cell col="1" text="bind:comexcd"/>
  46. <Cell col="2" text="bind:comnm"/>
  47. <Cell col="3" text="bind:comlevel"/>
  48. </Band>
  49. </Format>
  50. </Formats>
  51. </Grid>
  52. <Static text="추가 항목 선택" position="absolute 0 354 115 370" id="caption2" class="tit_2" anchor="default"/>
  53. <Grid position="absolute 0 375 625 545" id="grd_temp" binddataset="ds_main_selectgrid" autofittype="col" anchor="default" oncelldblclick="group3_grd_temp_oncelldblclick" onheadclick="group3_grd_temp_onheadclick">
  54. <Formats>
  55. <Format id="default">
  56. <Columns>
  57. <Column size="58"/>
  58. <Column size="153"/>
  59. <Column size="321"/>
  60. </Columns>
  61. <Rows>
  62. <Row size="24" band="head"/>
  63. <Row size="24"/>
  64. </Rows>
  65. <Band id="head">
  66. <Cell displaytype="checkbox" edittype="none"/>
  67. <Cell col="1" text="코드"/>
  68. <Cell col="2" text="명칭"/>
  69. </Band>
  70. <Band id="body">
  71. <Cell displaytype="checkbox" edittype="checkbox" text="bind:chk" expr="expr:chk == &quot;true&quot; || chk == &quot;1&quot; ? &quot;1&quot; : &quot;&quot;"/>
  72. <Cell col="1" style="align:left middle;" text="bind:comcd"/>
  73. <Cell col="2" style="align:left middle;" text="bind:comnm"/>
  74. </Band>
  75. </Format>
  76. </Formats>
  77. </Grid>
  78. <Shape position="absolute 0 370 625 376" linetype="horizontal" id="line2" class="line_1" style="strokepen:3 solid #33bbbbff;" anchor="default"/>
  79. </Layout>
  80. </Layouts>
  81. </Div>
  82. <Div position="absolute 8 558 638 585" id="group1" scrollbars="autoboth">
  83. <Layouts>
  84. <Layout>
  85. <Button position="absolute 511 2 567 24" id="btn_cfm" class="btn4" text="확인" onclick="group1_btn_cfm_onclick"/>
  86. <Button position="absolute 570 2 626 24" id="btn_cls" class="btn4" text="닫기" onclick="group1_btn_cls_onclick"/>
  87. </Layout>
  88. </Layouts>
  89. </Div>
  90. </Layout>
  91. </Layouts>
  92. <Objects>
  93. <Dataset id="ds_main_grid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  94. <ColumnInfo>
  95. <Column id="comcd" type="STRING"/>
  96. <Column id="comexcd" type="STRING"/>
  97. <Column id="comnm" type="STRING"/>
  98. <Column id="comlevel" type="STRING"/>
  99. </ColumnInfo>
  100. <Rows>
  101. <Row/>
  102. </Rows>
  103. </Dataset>
  104. <Dataset id="ds_main_selectgrid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  105. <ColumnInfo>
  106. <Column id="chk" type="STRING"/>
  107. <Column id="comcd" type="STRING"/>
  108. <Column id="comnm" type="STRING"/>
  109. </ColumnInfo>
  110. </Dataset>
  111. <Dataset id="ds_main_mode" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  112. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  113. <ColumnInfo>
  114. <Column id="srchcomcd" type="STRING" size="256"/>
  115. <Column id="srchcomnm" type="STRING" size="256"/>
  116. </ColumnInfo>
  117. <Rows>
  118. <Row/>
  119. </Rows>
  120. </Dataset>
  121. <Dataset id="ds_send_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  122. <ColumnInfo>
  123. <Column id="comcd" type="STRING" size="256"/>
  124. <Column id="comexcd" type="STRING" size="256"/>
  125. <Column id="comnm" type="STRING" size="256"/>
  126. <Column id="dddunit" type="STRING" size="256"/>
  127. <Column id="ddd" type="STRING" size="256"/>
  128. <Column id="dddkg" type="STRING" size="256"/>
  129. <Column id="dddchild" type="STRING" size="256"/>
  130. <Column id="childdayno" type="STRING" size="256"/>
  131. <Column id="childage" type="STRING" size="256"/>
  132. </ColumnInfo>
  133. <Rows>
  134. <Row>
  135. <Col id="comcd"/>
  136. <Col id="comexcd"/>
  137. <Col id="comnm"/>
  138. <Col id="dddunit"/>
  139. <Col id="ddd"/>
  140. <Col id="dddkg"/>
  141. <Col id="dddchild"/>
  142. <Col id="childdayno"/>
  143. <Col id="childage"/>
  144. </Row>
  145. </Rows>
  146. </Dataset>
  147. <Dataset id="ds_hidden_receiveref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  148. <ColumnInfo>
  149. <Column id="srchtype" type="STRING" size="256"/>
  150. <Column id="comnm" type="STRING" size="256"/>
  151. <Column id="comcd" type="STRING" size="256"/>
  152. </ColumnInfo>
  153. <Rows>
  154. <Row/>
  155. </Rows>
  156. </Dataset>
  157. </Objects>
  158. <Bind>
  159. <BindItem id="item0" compid="group3.group2.input2" propid="value" datasetid="ds_send" columnid="srchcomcd"/>
  160. <BindItem id="item1" compid="group3.group2.input1" propid="value" datasetid="ds_send" columnid="srchcomnm"/>
  161. </Bind>
  162. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  163. * System Name :
  164. * Job Name :
  165. * Creator :
  166. * Make Date : 2015-11-13
  167. * Description :
  168. *---------------------------------------------------------------------------------------
  169. * Modify Date Modifier Modify Description
  170. *---------------------------------------------------------------------------------------
  171. * 2015-11-13 Live Converter TF->XP
  172. *
  173. *---------------------------------------------------------------------------------------
  174. ****************************************************************************************/
  175. include "com_commonxp::comm_main.xjs";
  176. include "ast_commonxp::AST.xjs";
  177. var arErrorCode = new HashArray();
  178. /******************************************************************
  179. * Argument :
  180. * Description : 초기화
  181. ******************************************************************/
  182. function SPADB61350_oninit(obj:Form, e:InitEventInfo)
  183. {
  184. frmf_initForm(obj);
  185. }
  186. function SPADB61350_onload(obj:Form, e:LoadEventInfo)
  187. {
  188. //grd_temp.fixedcellcheckbox(0,0)=true; // 타이틀에 전체선택 체크박스 추가
  189. ds_main_selectgrid.clearData(); // 그리드 내용 초기화
  190. try{
  191. dsf_copyDs(ds_hidden_receiveref, arg_ds_hidden_receiveref, "replace");
  192. }catch(e){}
  193. /*
  194. * 부모창에서 넘겨받은 데이터 체크박스에 세팅
  195. */
  196. var comcd = ds_hidden_receiveref.getColumn(0, "comcd"); // 성분코드
  197. var comnm = ds_hidden_receiveref.getColumn(0, "comnm"); // 성분명칭
  198. if( !utlf_isNull(comcd) ){
  199. comcd = comcd.replace("'", "");
  200. comcd = comcd.split(",");
  201. comnm = comnm.replace("'", "");
  202. comnm = comnm.split(",");
  203. }
  204. // 데이터 유무 체크( 구분할 값이 없어도 length는 1이 리턴됨. )
  205. if( !utlf_isNull(comnm[0]) ) {
  206. for(var i = 0; i < comcd.length; ++i) {
  207. var iRow = ds_main_selectgrid.addRow();
  208. ds_main_selectgrid.setColumn(iRow, "chk", "true");
  209. ds_main_selectgrid.setColumn(iRow, "comcd", comcd[i]);
  210. ds_main_selectgrid.setColumn(iRow, "comnm", comnm[i]);
  211. }
  212. }
  213. }
  214. /******************************************************************
  215. * Argument :
  216. * Description : 코드
  217. ******************************************************************/
  218. function group3_group2_input2_onkeydown(obj:Edit, e:KeyEventInfo)
  219. {
  220. if( e.keycode == 13 ){
  221. group3.group2.input2.updateToDataset();
  222. //setInputNodeCurText();
  223. frmf_inputEnterKey("group3.group2.btn_sea", "onclick", new ClickEventInfo);
  224. }
  225. }
  226. /******************************************************************
  227. * Argument :
  228. * Description : 명칭
  229. ******************************************************************/
  230. function group3_group2_input1_onkeydown(obj:Edit, e:KeyEventInfo)
  231. {
  232. if( e.keycode == 13 ){
  233. group3.group2.input1.updateToDataset();
  234. //setInputNodeCurText();
  235. frmf_inputEnterKey("group3.group2.btn_sea", "onclick", new ClickEventInfo);
  236. }
  237. }
  238. /******************************************************************
  239. * Argument :
  240. * Description : 조회 button event
  241. ******************************************************************/
  242. function group3_group2_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  243. {
  244. var oParam = {};
  245. oParam.id = "TRADB00201";
  246. oParam.service = "pharmacybaseapp.ComCode";
  247. oParam.method = "reqGetComList";
  248. oParam.inds = "req=ds_send";
  249. oParam.outds = "ds_main_grid=item";
  250. oParam.async = false;
  251. //oParam.callback = "cf_TRADB00201";
  252. tranf_submit(oParam);
  253. }
  254. /******************************************************************
  255. * Argument :
  256. * Description : 성분조회
  257. ******************************************************************/
  258. function group3_grd_com_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  259. {
  260. var cRow = ds_main_grid.rowposition;
  261. var comcd = ds_main_grid.getColumn(cRow, "comcd"); // 성분코드
  262. var comnm = ds_main_grid.getColumn(cRow, "comnm"); // 성분명칭
  263. // 1. 로우 추가
  264. var iRow = ds_main_selectgrid.addRow();
  265. // 2. 코드, 명칭 세팅
  266. ds_main_selectgrid.setColumn(iRow, "chk", "true");
  267. ds_main_selectgrid.setColumn(iRow, "comcd", comcd);
  268. ds_main_selectgrid.setColumn(iRow, "comnm", comnm);
  269. }
  270. /******************************************************************
  271. * Argument :
  272. * Description : 추가항목선택
  273. ******************************************************************/
  274. function group3_grd_temp_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  275. {
  276. var cRow = ds_main_selectgrid.rowposition;
  277. ds_main_selectgrid.deleteRow(cRow);
  278. }
  279. /******************************************************************
  280. * Argument :
  281. * Description : 확인 button evnet
  282. ******************************************************************/
  283. function group1_btn_cfm_onclick(obj:Button, e:ClickEventInfo)
  284. {
  285. var comcd = opener.frmf_getParameter("comcd"); // 성분코드
  286. var comexcd = opener.frmf_getParameter("comexcd"); //
  287. var comnm = opener.frmf_getParameter("comnm"); // 성분명칭
  288. /*
  289. * 체크박스에 선택된 값만 부모창으로 세팅
  290. */
  291. var gridRow = ds_main_selectgrid.rowcount; // 데이터 로우 종 갯수
  292. var isFirst = true;
  293. for(var i = 0; i < gridRow; ++i) {
  294. if( ds_main_selectgrid.getColumn(i, "chk") == "true") {
  295. // 체크박스에 첫번째 선택된 값
  296. if(isFirst) {
  297. // 체크박스에 선택된 값의 명칭이 없을 경우
  298. comcd = "'" + ds_main_selectgrid.getColumn(i, "comcd") + "'";
  299. comnm = "'" + ds_main_selectgrid.getColumn(i, "comnm") + "'";
  300. isFirst = false;
  301. }
  302. // 체크박스에 두번째 이상 선택된 값
  303. else {
  304. comcd += "," + "'" + ds_main_selectgrid.getColumn(i, "comcd") + "'";
  305. comnm += "," + "'" + ds_main_selectgrid.getColumn(i, "comnm") + "'";
  306. }
  307. }
  308. }
  309. // 체크박스에 선택된 값이 없을 경우
  310. if(isFirst) {
  311. comcd = "";
  312. comnm = "";
  313. }
  314. opener.frmf_setParameter("comcd", comcd);
  315. opener.frmf_setParameter("comexcd", comexcd);
  316. opener.frmf_setParameter("comnm", comnm);
  317. this.close();
  318. }
  319. /******************************************************************
  320. * Argument :
  321. * Description : 닫기 button evnet
  322. ******************************************************************/
  323. function group1_btn_cls_onclick(obj:Button, e:ClickEventInfo)
  324. {
  325. this.close();
  326. }
  327. /******************************************************************
  328. * Argument :
  329. * Description : head checkbox click event
  330. ******************************************************************/
  331. function group3_grd_temp_onheadclick(obj:Grid, e:GridClickEventInfo)
  332. {
  333. fn_chkAll(obj);
  334. }
  335. function fn_chkAll(obj){
  336. if( obj.getCellProperty("Head", 0, "displaytype") == "checkbox"){
  337. if( utlf_isNull(obj.getCellProperty("Head", 0, "text")) ){
  338. obj.setCellProperty("Head", 0, "text","expr:1");
  339. for( var i = 0; i < ds_main_selectgrid.rowcount; i++ ){
  340. var getChk = ds_main_selectgrid.getColumn(i, "chk");
  341. if( getChk == "1"){
  342. ds_main_selectgrid.setColumn(i, "chk", "");
  343. } else {
  344. ds_main_selectgrid.setColumn(i, "chk", "true");
  345. }
  346. }
  347. } else {
  348. obj.setCellProperty("Head", 0, "text","");
  349. for( var i = 0; i < ds_main_selectgrid.rowcount; i++ ){
  350. ds_main_selectgrid.setColumn(i, "chk", "");
  351. }
  352. }
  353. }
  354. }]]></Script>
  355. </Form>
  356. </FDL>