SPMNP00201_SMS상용문구관리.xfdl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMNP00201" position="absolute 0 0 680 480" titletext="Untitle" oninit="SPMNP00201_oninit" onload="SPMNP00201_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="SMS상용문구관리" position="absolute 0 10 225 26" align="align:center middle;" id="caption1" class="tit_2"/>
  8. <Grid position="absolute 0 30 665 435" id="grd_smslist" binddataset="ds_main_smsinfo_smslist">
  9. <Formats>
  10. <Format id="default">
  11. <Columns>
  12. <Column size="20"/>
  13. <Column size="100"/>
  14. <Column size="542"/>
  15. <Column size="100"/>
  16. <Column size="100"/>
  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="caption1"/>
  27. <Cell col="4" text="caption2"/>
  28. </Band>
  29. <Band id="body">
  30. <Cell/>
  31. <Cell col="1" displaytype="text" edittype="text" text="bind:codenm1"/>
  32. <Cell col="2" displaytype="text" edittype="text" text="bind:code3commt"/>
  33. <Cell col="3" style="align:left;" text="bind:lrgclscd"/>
  34. <Cell col="4" style="align:left;" text="bind:kindcd"/>
  35. </Band>
  36. </Format>
  37. </Formats>
  38. </Grid>
  39. <Button position="absolute 513 5 566 24" id="button1" class="btn2" text="행추가" onclick="button1_onclick"/>
  40. <Button position="absolute 568 5 621 24" id="button2" class="btn2" text="행삭제" onclick="button2_onclick"/>
  41. <Button position="absolute 623 5 665 24" id="button3" class="btn5" text="저장" onclick="button3_onclick"/>
  42. <Button position="absolute 610 440 666 462" id="btn_cncl" class="btn4" text="취소" onclick="btn_cncl_onclick"/>
  43. <Button position="absolute 550 440 606 462" id="btn_cnfm" class="btn4" text="확인" onclick="btn_cnfm_onclick"/>
  44. <Static text="상용문구에 @로 입력하시면, 수술전처치에서 @가 환자명으로 바뀝니다.&#13;&#10;ex) @보호자님 대기실로 오세요 =&gt; 김XX 보호자님 대기실로 오세요." position="absolute 10 440 404 468" id="caption2"/>
  45. </Layout>
  46. </Layouts>
  47. <Objects>
  48. <Dataset id="ds_main_smsinfo_smslist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  49. <ColumnInfo>
  50. <Column id="lrgclscd" type="STRING" size="256" sumtext="이력일련번호"/>
  51. <Column id="kindcd" type="STRING" size="256" sumtext="코드ID"/>
  52. <Column id="codenm1" type="STRING" size="256" sumtext="정렬순서"/>
  53. <Column id="codenm2" type="STRING" size="256" sumtext="수술상태확인내역"/>
  54. <Column id="codenm3" type="STRING" size="256" sumtext="수술준비체크(YES)"/>
  55. <Column id="code3commt" type="STRING" size="256" sumtext="수술준비체크(NO)"/>
  56. </ColumnInfo>
  57. </Dataset>
  58. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  59. <ColumnInfo>
  60. <Column id="lrgclscd" type="STRING" size="256" sumtext="기관코드"/>
  61. </ColumnInfo>
  62. <Rows>
  63. <Row/>
  64. </Rows>
  65. </Dataset>
  66. <Dataset id="ds_send_savedata_smslist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  67. <ColumnInfo>
  68. <Column id="status" type="STRING" size="256" sumtext="status"/>
  69. <Column id="lrgclscd" type="STRING" size="256" sumtext="분류코드"/>
  70. <Column id="codenm1" type="STRING" size="256" sumtext="SMS분류명"/>
  71. <Column id="code3commt" type="STRING" size="256" sumtext="SMS내용"/>
  72. <Column id="kindcd" type="STRING" size="256" sumtext="코드번호"/>
  73. </ColumnInfo>
  74. </Dataset>
  75. </Objects>
  76. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  77. * System Name : 경대 의료정보시스템
  78. * Job Name : emr_opanstxp -> SPMNP00201
  79. * Creator : yjh
  80. * Make Date : 2016-06-08
  81. * Description :
  82. *---------------------------------------------------------------------------------------
  83. * Modify Date Modifier Modify Description
  84. *---------------------------------------------------------------------------------------
  85. * 2016-06-08 yjh TF->XP
  86. *
  87. *---------------------------------------------------------------------------------------
  88. ****************************************************************************************/
  89. //=======================================================================================
  90. // Lib Include
  91. //---------------------------------------------------------------------------------------
  92. include "com_commonxp::comm_main.xjs";
  93. //=======================================================================================
  94. // Global Form Variable
  95. //---------------------------------------------------------------------------------------
  96. //=======================================================================================
  97. // Function
  98. //---------------------------------------------------------------------------------------
  99. function fSearch() {
  100. ds_send_reqdata.setColumn(0, "lrgclscd", "'03'");
  101. var oParam = {};
  102. oParam.id = "TRMNP00230";
  103. oParam.service = "opanstapp.OpAnstRec";
  104. oParam.method = "reqGetSmsBaseInfo";
  105. oParam.inds = "req=ds_send_reqdata";
  106. oParam.outds = "ds_main_smsinfo_smslist=smslist";
  107. oParam.async = false;
  108. //oParam.callback = "cf_TRMNP00230";
  109. tranf_submit(oParam);
  110. }
  111. function fSave() {
  112. var node = -1;
  113. for( var i=0 ; i<ds_main_smsinfo_smslist.rowcount ; i++ ){
  114. if( utlf_isNull(ds_main_smsinfo_smslist.getColumn(i, "codenm1")) ){
  115. node = i;
  116. }
  117. }
  118. var node2 = -1;
  119. for( var i=0 ; i<ds_main_smsinfo_smslist.rowcount ; i++ ){
  120. if( utlf_isNull(ds_main_smsinfo_smslist.getColumn(i, "code3commt")) ){
  121. node2 = i;
  122. }
  123. }
  124. if( node > -1 ){
  125. sysf_messageBox("분류를 입력하십시오.", "E");
  126. return;
  127. }
  128. if( node2 > -1 ){
  129. sysf_messageBox("SMS상용문구를 입력하십시오.", "E");
  130. return;
  131. }
  132. var savedata = grdf_getGridUpdateData(grd_smslist, "all");
  133. grdf_setStatusColumn(savedata, "status");
  134. if( savedata.rowcount < 1 ){
  135. sysf_messageBox("변경된 데이터가 없습니다", "E");
  136. return;
  137. }
  138. ds_send_savedata_smslist.assign(savedata);
  139. var oParam = {};
  140. oParam.id = "TXMNP00230";
  141. oParam.service = "opanstapp.OpAnstRec";
  142. oParam.method = "reqExeSmsBaseInfo";
  143. oParam.inds = "smslist=ds_send_savedata_smslist:A";
  144. oParam.outds = "";
  145. oParam.async = false;
  146. //oParam.callback = "cf_TXMNP00230";
  147. tranf_submit(oParam);
  148. }
  149. //=======================================================================================
  150. // Event
  151. //---------------------------------------------------------------------------------------
  152. /****************************************************************************************
  153. * Components : Form
  154. * Components ID : SPMNP00201
  155. * Event : oninit
  156. * Argument : 01.obj : Object Event has occurred
  157. * : 02.e : Event Object
  158. * Description : 화면 처음 초기화시
  159. ****************************************************************************************/
  160. function SPMNP00201_oninit(obj:Form, e:InitEventInfo)
  161. {
  162. frmf_initForm(obj); //폼 초기화
  163. }
  164. /****************************************************************************************
  165. * Components : Form
  166. * Components ID : SPMNP00201
  167. * Event : onload
  168. * Argument : 01.obj : Object Event has occurred
  169. * : 02.e : Event Object
  170. * Description : 화면 로딩 완료시
  171. ****************************************************************************************/
  172. function SPMNP00201_onload(obj:Form, e:LoadEventInfo)
  173. {
  174. var popyn = sysf_getModelProperty("popyn");
  175. if(popyn == "Y") {
  176. btn_cnfm.enable = true;
  177. btn_cncl.enable = true;
  178. } else {
  179. btn_cnfm.enable = false;
  180. btn_cncl.enable = false;
  181. }
  182. fSearch() ;
  183. grdf_setRowTypeIcon(grd_smslist, 0);
  184. }
  185. /****************************************************************************************
  186. * Components : Button
  187. * Components ID : button1
  188. * Event : onclick
  189. * Argument : 01.obj : Object Event has occurred
  190. * : 02.e : Event Object
  191. * Description : 행추가버튼 클릭시
  192. ****************************************************************************************/
  193. function button1_onclick(obj:Button, e:ClickEventInfo)
  194. {
  195. var nRow = ds_main_smsinfo_smslist.addRow();
  196. ds_main_smsinfo_smslist.setColumn(nRow, "lrgclscd", "03");
  197. }
  198. /****************************************************************************************
  199. * Components : Button
  200. * Components ID : button2
  201. * Event : onclick
  202. * Argument : 01.obj : Object Event has occurred
  203. * : 02.e : Event Object
  204. * Description : 행삭제버튼 클릭시
  205. ****************************************************************************************/
  206. function button2_onclick(obj:Button, e:ClickEventInfo)
  207. {
  208. if( grd_smslist.currentrow > -1 ){
  209. ds_main_smsinfo_smslist.enableevent = false;
  210. ds_main_smsinfo_smslist.updatecontrol = false;
  211. ds_main_smsinfo_smslist.setRowType(ds_main_smsinfo_smslist.rowposition, 8);
  212. ds_main_smsinfo_smslist.updatecontrol = true;
  213. ds_main_smsinfo_smslist.enableevent = true;
  214. }
  215. }
  216. /****************************************************************************************
  217. * Components : Button
  218. * Components ID : button3
  219. * Event : onclick
  220. * Argument : 01.obj : Object Event has occurred
  221. * : 02.e : Event Object
  222. * Description : 저장버튼 클릭시
  223. ****************************************************************************************/
  224. function button3_onclick(obj:Button, e:ClickEventInfo)
  225. {
  226. fSave();
  227. fSearch();
  228. }
  229. /****************************************************************************************
  230. * Components : Button
  231. * Components ID : btn_cncl
  232. * Event : onclick
  233. * Argument : 01.obj : Object Event has occurred
  234. * : 02.e : Event Object
  235. * Description : 취소버튼 클릭시
  236. ****************************************************************************************/
  237. function btn_cncl_onclick(obj:Button, e:ClickEventInfo)
  238. {
  239. close();
  240. }
  241. /****************************************************************************************
  242. * Components : Button
  243. * Components ID : btn_cnfm
  244. * Event : onclick
  245. * Argument : 01.obj : Object Event has occurred
  246. * : 02.e : Event Object
  247. * Description : 확인버튼 클릭시
  248. ****************************************************************************************/
  249. function btn_cnfm_onclick(obj:Button, e:ClickEventInfo)
  250. {
  251. var row = grd_smslist.currentrow;
  252. if(row < 0) {
  253. sysf_messageBox("SMS 상용문구가 선택되지 않았습니다.", "E");
  254. return;
  255. }
  256. var smsmsg = ds_main_smsinfo_smslist.getColumn(row, "code3commt");
  257. opener.frmf_setParameter("SPMNP00201_smsmsg", smsmsg);
  258. close();
  259. }
  260. ]]></Script>
  261. </Form>
  262. </FDL>