SMPAE00100_수익.인원 마감.xrw 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>수익.인원 마감</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. </main>
  11. <send>
  12. <enddate/>
  13. <ordflag>O</ordflag>
  14. <endkind>1</endkind>
  15. <modulenm/>
  16. <prgmid/>
  17. <endflag>U</endflag>
  18. <befodt/>
  19. </send>
  20. <temp>
  21. <result/>
  22. </temp>
  23. </root>
  24. </instance>
  25. <submission id="TXPAE00101" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" resultref="root/temp/result"/>
  26. <submission id="TXPAE00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  27. <submission id="TRPAE00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  28. </model>
  29. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  30. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  31. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  32. <script type="javascript" src="../../../com/batchinfoweb/js/ZSB001.js"/>
  33. <script type="javascript">
  34. <![CDATA[
  35. var gRepeatTimerID = ""; // 자동 조회용 타이머
  36. var progres = ".";
  37. model.setValue("root/send/enddate", getCurrentDate());
  38. var beforeDate = model.getValue("root/send/enddate").toDate().getAddDate(-1, 'D');
  39. beforeDate = beforeDate.getDateFormat("YYYYMMDD");
  40. model.setValue("root/send/befodt", beforeDate);
  41. model.refresh();
  42. function fEndExecute() {
  43. var result = messageBox(" 마감일자 : '" + model.getValue("/root/send/enddate") + "'" +
  44. " 마감종류 : '" + cmb_endkind.label + "'" +
  45. " 입원/외래구분 : '" + combo1.label + "' 의 조건으로 마감하시겠습니까..?","Q000","");
  46. if ( result == "6" ) {
  47. if ( model.getValue("root/send/endkind") == '1' ) {
  48. // 수익마감
  49. if (submit("TXPAE00102")) {
  50. if ( model.getValue("root/temp/endstat/endgubn") == 'Y' ) {
  51. var result = messageBox("마감 Data가 존재합니다. 기존 마감내역을 취소하고 재마감 하시겠습니까..?","Q000","");
  52. if (result == "6") {
  53. submit("TXPAE00101");
  54. //fSetAutoRepeat();
  55. } else {
  56. return;
  57. }
  58. } else {
  59. submit("TXPAE00101");
  60. //fSetAutoRepeat();
  61. }
  62. } else {
  63. return;
  64. }
  65. } else {
  66. // 인원마감
  67. submit("TXPAE00101");
  68. //fSetAutoRepeat();
  69. }
  70. }
  71. }
  72. function fSetAutoRepeat() {
  73. if (gRepeatTimerID == "") {
  74. gRepeatTimerID = window.setInterval("fGetEndPrcsStat()",5000);
  75. } else {
  76. window.clearInterval(gRepeatTimerID);
  77. }
  78. }
  79. function fGetEndPrcsStat() {
  80. var modulenm;
  81. var prgmid;
  82. if (model.getValue("/root/send/endkind") == "1" ) {
  83. modulenm = model.setValue("/root/send/modulenm", "pamendstatsmgr");
  84. prgmid = model.setValue("/root/send/prgmid", "PamEndStatsbatch");
  85. } else {
  86. modulenm = model.setValue("/root/send/modulenm", "pampsnnostatsmngtmgr");
  87. prgmid = model.setValue("/root/send/prgmid", "OrdPsnNoEndbatch");
  88. }
  89. var result;
  90. submit("TRPAE00101");
  91. result = model.getValue("/root/temp/result/prcsstat");
  92. if ( result == "E" ) {
  93. caption26.text = "성공적으로 마감되었습니다..!";
  94. gRepeatTimerID = "E"
  95. } else if ( result == "F" ) {
  96. caption26.text = "마감작업 중 에러 발생..작업을 중단합니다..!";
  97. gRepeatTimerID = "F"
  98. } else {
  99. progres = progres + ".....";
  100. caption26.text = "마감 작업 중." + progres;
  101. if ( caption26.text.length > 50) {
  102. progres = "."
  103. }
  104. gRepeatTimerID = ""
  105. }
  106. }
  107. ]]>
  108. </script>
  109. </xhtml:head>
  110. <xhtml:body pagewidth="400" pageheight="200" guideline="1,721;1,720;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  111. <caption id="caption1" class="tit_2" style="left:20px; top:25px; width:121px; height:13px; ">수익마감</caption>
  112. <caption id="caption5" class="cell_1" style="left:15px; top:50px; width:115px; height:23px; vertical-align:middle; ">마감일자</caption>
  113. <line id="line1" class="line_1" style="x1:15px; y1:45px; x2:290px; y2:45px; "/>
  114. <button id="btn_confirm" class="btn4_letter2" navindex="7" style="left:235px; top:20px; width:56px; height:22px; ">
  115. <caption>마감</caption>
  116. <script type="javascript" ev:event="DOMActivate">
  117. <![CDATA[
  118. fEndExecute();
  119. ]]>
  120. </script>
  121. </button>
  122. <button id="button1" style="left:300px; top:20px; width:100px; height:20px; ">
  123. <caption>배치 팝업</caption>
  124. <script type="javascript" ev:event="DOMActivate">
  125. <![CDATA[
  126. zsbfOpenBatchLogPopup("pamendstatsmgr.PamEndStatsbatch");
  127. ]]>
  128. </script>
  129. </button>
  130. <line id="line2" class="line_3" style="x1:15px; y1:76px; x2:290px; y2:76px; "/>
  131. <caption id="caption26" style="left:15px; top:155px; width:282px; height:19px; vertical-align:middle; background-color:#ffff99; ">* 마감일자를 확인하세요...</caption>
  132. <input id="ipt_enddate" ref="/root/send/enddate" class="input_default" navindex="5" inputtype="date" appearance="input" style="left:135px; top:52px; width:157px; height:19px; text-align:right; ">
  133. <script type="javascript" ev:event="xforms-value-changed">
  134. <![CDATA[
  135. model.setValue("root/send/befodt", model.getValue("root/send/enddate") - 1);
  136. ]]>
  137. </script>
  138. </input>
  139. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:98px; height:14px; ">수익 마감</caption>
  140. <caption id="caption2" class="cell_1" style="left:15px; top:80px; width:115px; height:23px; vertical-align:middle; ">마감종류</caption>
  141. <line id="line3" class="line_3" style="x1:15px; y1:105px; x2:290px; y2:105px; "/>
  142. <caption id="caption3" class="cell_1" style="left:16px; top:108px; width:115px; height:23px; vertical-align:middle; ">외래/입원 구분</caption>
  143. <line id="line4" class="line_3" style="x1:15px; y1:135px; x2:290px; y2:135px; "/>
  144. <select1 id="combo1" ref="/root/send/ordflag" class="combo_default" appearance="minimal" style="left:135px; top:110px; width:157px; height:19px; ">
  145. <choices>
  146. <item>
  147. <label>외래</label>
  148. <value>O</value>
  149. </item>
  150. <item>
  151. <label>입원</label>
  152. <value>I</value>
  153. </item>
  154. </choices>
  155. </select1>
  156. <select1 id="cmb_endkind" ref="/root/send/endkind" class="combo_default" appearance="minimal" style="left:135px; top:80px; width:157px; height:19px; ">
  157. <choices>
  158. <item>
  159. <label>수익마감</label>
  160. <value>1</value>
  161. </item>
  162. <item>
  163. <label>인원마감</label>
  164. <value>2</value>
  165. </item>
  166. </choices>
  167. </select1>
  168. </xhtml:body>
  169. </xhtml:html>