SPMMO21900_미처방사유입력.xfdl 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMO21900" position="absolute 0 0 713 326" titletext="미처방 사유 선택" oninit="SPMMO21900_oninit" onload="SPMMO21900_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button position="absolute 549 306 629 326" id="btn_save" class="btn4" text="계속저장" onclick="btn_save_onclick"/>
  8. <Static text="미처방 사유 선택" position="absolute 0 0 302 20" id="caption1" class="tit_2"/>
  9. <Shape position="absolute 3 17 710 18" linetype="vertical" id="line7" class="line_1"/>
  10. <Static text="* 누락된 처방이 있습니다. 저장하시겠습니까 ?" position="absolute 285 307 545 327" id="caption2" style="color:red;"/>
  11. <Button position="absolute 633 306 713 326" id="button2" class="btn3" text="처방취소" onclick="button2_onclick"/>
  12. <Grid position="absolute 0 21 713 299" id="grd_resnlist" binddataset="ds_grd_resnlist" oncellclick="grd_resnlist_oncellclick">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="30"/>
  17. <Column size="50"/>
  18. <Column size="403"/>
  19. <Column size="202"/>
  20. </Columns>
  21. <Rows>
  22. <Row size="24" band="head"/>
  23. <Row size="24"/>
  24. </Rows>
  25. <Band id="head">
  26. <Cell text="선택"/>
  27. <Cell col="1" text="코드"/>
  28. <Cell col="2" text="사유"/>
  29. <Cell col="3" text="상세사유"/>
  30. </Band>
  31. <Band id="body">
  32. <Cell displaytype="checkbox" edittype="checkbox" text="bind:status" expr="expr:(status == &quot;Y&quot; || status == 1) ? 1 : 0"/>
  33. <Cell col="1" text="bind:hardcd"/>
  34. <Cell col="2" style="align:left middle;" text="bind:hardcdnm"/>
  35. <Cell col="3" displaytype="text" edittype="text" text="bind:resncmt" editimemode="hangul" editautoselect="true"/>
  36. </Band>
  37. </Format>
  38. </Formats>
  39. </Grid>
  40. </Layout>
  41. </Layouts>
  42. <Objects>
  43. <Dataset id="ds_hardcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_hardcd_oncolumnchanged">
  44. <ColumnInfo>
  45. <Column id="status" type="STRING" size="256" sumtext="상태값"/>
  46. <Column id="hardcd" type="STRING" size="256" sumtext="하드코드"/>
  47. <Column id="hardcdnm" type="STRING" size="256" sumtext="하드코드명"/>
  48. <Column id="resncmt" type="STRING" size="256" sumtext="상세사유"/>
  49. </ColumnInfo>
  50. </Dataset>
  51. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  52. <ColumnInfo>
  53. <Column id="selcond1" type="STRING" size="256"/>
  54. </ColumnInfo>
  55. <Rows>
  56. <Row>
  57. <Col id="selcond1">1</Col>
  58. </Row>
  59. </Rows>
  60. </Dataset>
  61. </Objects>
  62. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  63. * System Name :
  64. * Job Name :
  65. * Creator :
  66. * Make Date : 2014-12-10
  67. * Description :
  68. *---------------------------------------------------------------------------------------
  69. * Modify Date Modifier Modify Description
  70. *---------------------------------------------------------------------------------------
  71. * 2014-12-10 Live Converter TF->XP
  72. *
  73. *---------------------------------------------------------------------------------------
  74. ****************************************************************************************/
  75. include "com_commonxp::comm_main.xjs";
  76. function SPMMO21900_oninit(obj:Form, e:InitEventInfo)
  77. {
  78. frmf_initForm(obj);
  79. }
  80. function SPMMO21900_onload(obj:Form, e:LoadEventInfo)
  81. {
  82. grdf_setToolTipBind(grd_resnlist);
  83. caption1.text = opener.frmf_getParameter("SPMMO21900_title");
  84. ds_send.setColumn(0, "hardcd", opener.frmf_getParameter("SPMMO21900_hardcdno"));
  85. var oParam = {};
  86. oParam.id = "TRMMB16401";
  87. oParam.service = "prcpbaseapp.EnvInfoMngt";
  88. oParam.method = "reqGetHardCodeCD";
  89. oParam.inds = "req=ds_send";
  90. oParam.outds = "ds_hardcd=hardcd";
  91. oParam.async = true;
  92. oParam.callback = "cf_TRMMB16401";
  93. tranf_submit(oParam);
  94. }
  95. function cf_TRMMB16401(sSvcId, nErrorCode, sErrorMsg) {
  96. if(nErrorCode < 0) return;
  97. dsf_setDefaultVal(ds_hardcd, "status:N");
  98. }
  99. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  100. {
  101. var sSelHardCd = "";
  102. var sSelResnCmt = "";
  103. var oSelNode = ds_hardcd.getCaseCount("status == 'Y'");
  104. if( oSelNode == 1 ) {
  105. var findRow = ds_hardcd.findRow("status", "Y");
  106. sSelHardCd = ds_hardcd.getColumn(findRow, "hardcd");
  107. if (sSelHardCd == "999") { // 기타 선택시
  108. if (ds_hardcd.getColumn(findRow, "resncmt") == "") {
  109. sysf_messageBox ( "기타사유 선택시 상세사유을 입력", "I008" );
  110. return;
  111. }
  112. sSelResnCmt = ds_hardcd.getColumn(findRow, "hardcdnm") + ":" + ds_hardcd.getColumn(findRow, "resncmt");
  113. } else {
  114. sSelResnCmt = ds_hardcd.getColumn(findRow, "hardcdnm");
  115. }
  116. opener.frmf_setParameter ( "SPMMO21900_resncode", sSelHardCd );
  117. opener.frmf_setParameter ( "SPMMO21900_resncmt", sSelResnCmt );
  118. } else {
  119. sysf_messageBox ( "미처방 사유는 하나만 선택", "I006" );
  120. return;
  121. }
  122. opener.frmf_setParameter ( "SPMMO21900_rtn1", "Y" );
  123. close();
  124. }
  125. function button2_onclick(obj:Button, e:ClickEventInfo)
  126. {
  127. opener.frmf_setParameter ( "SPMMO21900_rtn1", "N" );
  128. close();
  129. }
  130. function grd_resnlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  131. {
  132. if(e.row < 0 || e.col < 0) return;
  133. var currow = e.row;
  134. if (e.col != obj.getBindCellIndex("body", "status")) {
  135. if ( ds_hardcd.getColumn(currow, "status") == "Y" ) {
  136. ds_hardcd.setColumn(currow, "status", "N");
  137. } else {
  138. ds_hardcd.setColumn(currow, "status", "Y");
  139. }
  140. }
  141. // 기타 선택시만 상세 내용 입력 하도록
  142. if (obj.getBindCellIndex("body", "resncmt") != -1 && ds_hardcd.getColumn(currow, "hardcd") == "999"){
  143. if ( ds_hardcd.getColumn(currow, "status") == "Y" ) {
  144. obj.setCellPos(obj.getBindCellIndex("body", "resncmt"));
  145. obj.showEditor(true);
  146. } else {
  147. ds_hardcd.setColumn(currow, "resncmt", "");
  148. }
  149. }
  150. }
  151. function ds_hardcd_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  152. {
  153. // 그리드안의 checkbox 값 변경 용도
  154. if(e.columnid == "status") {
  155. obj.setColumn(e.row, e.columnid, (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  156. }
  157. }]]></Script>
  158. </Form>
  159. </FDL>