SPMNH08000_호스피스상담 상용구.xfdl 7.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="SPMNH08000" position="absolute 0 0 640 380" titletext="상용구" oninit="SPMNH08000_oninit" onload="SPMNH08000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Grid position="absolute 5 36 635 341" id="grd_sentslist" binddataset="ds_main_sentslist" oncelldblclick="grd_sentslist_oncelldblclick" oncellclick="grd_sentslist_oncellclick" cellclickbound="cell" cellsizingtype="both" style="font:Dotum,8,bold;" extendsizetype="row">
  8. <Formats>
  9. <Format id="default">
  10. <Columns>
  11. <Column size="21" band="left"/>
  12. <Column size="25" band="left"/>
  13. <Column size="140"/>
  14. <Column size="425"/>
  15. </Columns>
  16. <Rows>
  17. <Row size="24" band="head"/>
  18. <Row size="24"/>
  19. </Rows>
  20. <Band id="head">
  21. <Cell/>
  22. <Cell col="1"/>
  23. <Cell col="2" text="상담구분"/>
  24. <Cell col="3" text="상담내용"/>
  25. </Band>
  26. <Band id="body">
  27. <Cell celltype="head" expr="currow+1"/>
  28. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chk" expr="expr:chk == 'Y' || chk == '1' ? 1 : 0"/>
  29. <Cell col="2" text="bind:cnst3" suppress="1" suppressalign="middle,over" tooltiptext="bind:cnst3"/>
  30. <Cell col="3" style="align:left;" text="bind:cnst2" wordwrap="word" tooltiptext="bind:cnst2"/>
  31. </Band>
  32. </Format>
  33. </Formats>
  34. </Grid>
  35. <Static text="단어는 최대 2000개까지 표시됩니다." position="absolute 335 353 570 368" id="caption4" style="font:Dotum,9,bold;"/>
  36. <Shape position="absolute 5 31 635 37" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  37. <Button position="absolute 579 9 635 31" id="btn_ok" class="btn4" text="확인" onclick="btn_ok_onclick"/>
  38. <Button position="absolute 580 348 636 370" id="button1" class="btn2" text="닫기" onclick="button1_onclick"/>
  39. <Static text="상용구" position="absolute 5 15 118 36" id="caption76" class="tit_2"/>
  40. </Layout>
  41. </Layouts>
  42. <Objects>
  43. <Dataset id="ds_main_sentslist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_main_sentslist_oncolumnchanged">
  44. <ColumnInfo>
  45. <Column id="chk" type="STRING" size="256" sumtext="상태"/>
  46. <Column id="cnst1" type="STRING" size="256" sumtext="하드코드번호"/>
  47. <Column id="cnst2" type="STRING" size="256" sumtext="상담내용"/>
  48. <Column id="cnst3" type="STRING" size="256" sumtext="상담구분"/>
  49. </ColumnInfo>
  50. </Dataset>
  51. </Objects>
  52. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  53. * System Name :
  54. * Job Name :
  55. * Creator :
  56. * Make Date : 2015-11-13
  57. * Description :
  58. *---------------------------------------------------------------------------------------
  59. * Modify Date Modifier Modify Description
  60. *---------------------------------------------------------------------------------------
  61. * 2015-11-13 Live Converter TF->XP
  62. *
  63. *---------------------------------------------------------------------------------------
  64. ****************************************************************************************/
  65. include "com_commonxp::comm_main.xjs";
  66. function SPMNH08000_oninit(obj:Form, e:InitEventInfo)
  67. {
  68. frmf_initForm(obj);
  69. }
  70. function SPMNH08000_onload(obj:Form, e:LoadEventInfo)
  71. {
  72. dsf_createDsRow("ds_send", [{col:"instcd", type:"STRING", size:256, val: sysf_getUserInfo("dutplceinstcd")}]);
  73. var oParam = {};
  74. oParam.id = "TRMNH08000";
  75. oParam.service = "hospiceapp.HospiceRecMngt";
  76. oParam.method = "reqGetUsefulSentences";
  77. oParam.inds = "req=ds_send";
  78. oParam.outds = "ds_main_sentslist=sentslist";
  79. oParam.async = false;
  80. oParam.callback = "cf_TRMNH08000";
  81. tranf_submit(oParam);
  82. }
  83. function cf_TRMNH08000(sSvcId, nErrorCode, sErrorMsg)
  84. {
  85. if(nErrorCode < 0)
  86. {
  87. return;
  88. }
  89. }
  90. function btn_ok_onclick(obj:Button, e:ClickEventInfo)
  91. {
  92. chkList2();
  93. }
  94. function button1_onclick(obj:Button, e:ClickEventInfo)
  95. {
  96. opener.frmf_setParameter("cnst2", "");
  97. this.close();
  98. }
  99. function chkList2()
  100. {
  101. var cnt = 0;
  102. var cntchk = 0;
  103. var status = opener.ds_main_hospiceinfo_hospicedetl.getColumn(opener.ds_main_hospiceinfo_hospicedetl.rowposition, "cnstkind");
  104. sysf_trace(status)
  105. if(utlf_isNull(status))
  106. {
  107. sysf_messageBox("가족상담 내용을 ", "C002");
  108. this.close();
  109. }
  110. var cnst2List ="";
  111. for (var i = 0; i < ds_main_sentslist.rowcount; i++)
  112. {
  113. if(ds_main_sentslist.getColumn(i, "chk") == "Y")
  114. {
  115. cntchk += 1;
  116. }
  117. }
  118. for (var i = 0; i < ds_main_sentslist.rowcount; i++)
  119. {
  120. if (ds_main_sentslist.getColumn(i, "chk") == "Y")
  121. {
  122. cnt += 1;
  123. cnst2List = cnst2List + ds_main_sentslist.getColumn(i, "cnst2");
  124. if(cntchk < 2)
  125. {
  126. cnst2List += "";
  127. }
  128. else
  129. {
  130. cnst2List += ". ";
  131. }
  132. }
  133. else
  134. {
  135. cnt += 0;
  136. }
  137. }
  138. opener.frmf_setParameter("cnst2", cnst2List);
  139. this.close();
  140. if (cnt == 0)
  141. {
  142. sysf_messageBox("복사할 항목을 체크해 주십시요","I");
  143. }
  144. }
  145. function chkList1()
  146. {
  147. var cnt = 0;
  148. var status = opener.ds_main_hospiceinfo_hospicedetl.getColumn(opener.ds_main_hospiceinfo_hospicedetl.rowposition, "cnstkind");
  149. if(utlf_isNull(status))
  150. {
  151. sysf_messageBox("가족상담 내용을", "C002");
  152. this.close();
  153. }
  154. var cnst2List ="";
  155. for (var i = 0; i < ds_main_sentslist.rowcount; i++)
  156. {
  157. if(ds_main_sentslist.getColumn(i, "chk") == "Y")
  158. {
  159. cnt += 1;
  160. opener.frmf_setParameter("cnst2", ds_main_sentslist.getColumn(i, "cnst3"));
  161. this.close();
  162. }
  163. else
  164. {
  165. cnt += 0;
  166. }
  167. }
  168. if (cnt == 0)
  169. {
  170. sysf_messageBox("복사할 항목을 체크해 주십시요","I");
  171. }
  172. }
  173. function ds_main_sentslist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  174. {
  175. if(e.columnid == "chk")
  176. {
  177. obj.setColumn(e.row, "chk", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  178. }
  179. }
  180. function grd_sentslist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  181. {
  182. ds_main_sentslist.setColumn(e.row, "chk", "Y");
  183. if(e.col == 2)
  184. {
  185. chkList1();
  186. }
  187. if(e.col == 3)
  188. {
  189. chkList2();
  190. }
  191. }
  192. function grd_sentslist_oncellclick(obj:Grid, e:GridClickEventInfo)
  193. {
  194. var chk = ds_main_sentslist.getColumn(e.row, "chk");
  195. if(e.col != 1 && chk == "Y")
  196. {
  197. ds_main_sentslist.setColumn(e.row, "chk", "N");
  198. }
  199. }
  200. ]]></Script>
  201. </Form>
  202. </FDL>