SPPIJ02200_중간계산마감.xrw 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. <send>
  10. <judgenddd/>
  11. <data1>
  12. <pid/>
  13. <indd/>
  14. <cretno/>
  15. </data1>
  16. <data2/>
  17. <data3/>
  18. </send>
  19. <main>
  20. <list1>
  21. <mdlcalcend/>
  22. </list1>
  23. </main>
  24. <hidden/>
  25. </root>
  26. </instance>
  27. <script type="javascript" ev:event="xforms-ready">
  28. <![CDATA[
  29. // 중간계산마감일 초기화 (default : 현재일)
  30. model.setValue("/root/send/judgenddd", getCurrentDate());
  31. // 중간계산마감이력 조회
  32. submit("TRPIJ02201");
  33. ]]>
  34. </script>
  35. <submission id="TRPIJ02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/list1"/>
  36. <submission id="TXPIJ02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data2" resultref="/root/temp"/>
  37. <submission id="TXPIJ02202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data3" resultref="/root/temp"/>
  38. </model>
  39. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  40. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  42. <script type="javascript">
  43. <![CDATA[
  44. ]]>
  45. </script>
  46. </xhtml:head>
  47. <xhtml:body pagewidth="480" pageheight="390" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  48. <group id="group1" style="left:0px; top:15px; width:460px; height:307px; ">
  49. <caption id="caption10" style="left:18px; top:15px; width:86px; height:20px; ">중간계산마감일</caption>
  50. <line id="line6" class="line_1" style="x1:5px; y1:38px; x2:452px; y2:38px; "/>
  51. <shape id="roundrect1" class="roundrect_example" appearance="roundrect" style="left:10px; top:14px; width:104px; height:20px; "/>
  52. <button id="btn_mdlcalcend" class="btn2_letter2" style="left:335px; top:15px; width:42px; height:19px; ">
  53. <caption>마감</caption>
  54. <script type="javascript" ev:event="DOMActivate">
  55. <![CDATA[
  56. // 중간계산 마감일자 검사
  57. var judgenddd = model.getValue("/root/send/judgenddd");
  58. if (!isValidDateTime(judgenddd)) {
  59. messageBox("올바른 형식의 시작일자를", "C001"); // 올바른 형식의 시작일자를 입력하십시오.
  60. return;
  61. }
  62. var indd = model.getValue("/root/send/data1/indd");
  63. var dateDif = getDateInterval(indd, judgenddd); // (dateHelper.js) 두 일자사이의 차를 일단위로 반환
  64. if (dateDif < 0) {
  65. messageBox("마감일자가 입원일자 보다 이전", "E008");
  66. return;
  67. }
  68. if (messageBox("중간계산 마감을", "Q004") != 6) {
  69. return;
  70. }
  71. model.removenode("/root/send/data2");
  72. model.makeNode("/root/send/data2");
  73. model.makeValue("/root/send/data2/pid", model.getValue("/root/send/data1/pid"));
  74. model.makeValue("/root/send/data2/indd", indd);
  75. model.makeValue("/root/send/data2/cretno", model.getValue("/root/send/data1/cretno"));
  76. model.makeValue("/root/send/data2/judgenddd", judgenddd);
  77. // 중간계산마감 수행
  78. if (submit("TXPIJ02201")) {
  79. // 다시 조회한다.
  80. submit("TRPIJ02201");
  81. }
  82. ]]>
  83. </script>
  84. </button>
  85. <line id="line4" class="line_3" style="x1:5px; y1:303px; x2:452px; y2:303px; "/>
  86. <button id="btn_mdlcalccancel" class="btn2_letter4" style="left:380px; top:15px; width:64px; height:19px; ">
  87. <caption>마감취소</caption>
  88. <script type="javascript" ev:event="DOMActivate">
  89. <![CDATA[
  90. // 선택된 row 가 있는지 체크
  91. var status = false;
  92. for (var i = 1; i < grd_mdlcalcend.rows; i++) {
  93. var chk = model.getValue("/root/main/list1/mdlcalcend[" + i + "]/chk");
  94. if (chk == "true") {
  95. status = true;
  96. i = grd_mdlcalcend.rows;
  97. }
  98. }
  99. // 선택된 row 가 없는 경우 메세지 처리
  100. if (status == false) {
  101. messageBox("마감을 취소할 데이터가 선택되지", "E007");
  102. return;
  103. }
  104. // 선택된 row 의 마감이력을 삭제한다.
  105. if (messageBox("마감취소를", "Q003") != 6) {
  106. return;
  107. }
  108. model.removenode("/root/send/data3");
  109. model.makeNode("/root/send/data3");
  110. var idx = 1;
  111. for (var j = 1; j < grd_mdlcalcend.rows; j++) {
  112. var chk = model.getValue("/root/main/list1/mdlcalcend[" + j + "]/chk");
  113. if (chk == "true") {
  114. model.makeValue("/root/send/data3/mdlcalcend[" + idx + "]/pid", model.getValue("/root/main/list1/mdlcalcend[" + j + "]/pid"));
  115. model.makeValue("/root/send/data3/mdlcalcend[" + idx + "]/indd", model.getValue("/root/main/list1/mdlcalcend[" + j + "]/indd"));
  116. model.makeValue("/root/send/data3/mdlcalcend[" + idx + "]/cretno", model.getValue("/root/main/list1/mdlcalcend[" + j + "]/cretno"));
  117. model.makeValue("/root/send/data3/mdlcalcend[" + idx + "]/judgenddd", model.getValue("/root/main/list1/mdlcalcend[" + j + "]/judgenddd"));
  118. idx++;
  119. }
  120. }
  121. if (submit("TXPIJ02202")) {
  122. // 다시 조회한다.
  123. submit("TRPIJ02201");
  124. }
  125. ]]>
  126. </script>
  127. </button>
  128. <input id="ipt_judgenddd" ref="/root/send/judgenddd" class="input_search" navindex="4" inputtype="date" format="yyyy-mm-dd" style="left:119px; top:15px; width:100px; height:19px; "/>
  129. <datagrid id="grd_mdlcalcend" nodeset="/root/main/list1/mdlcalcend" caption="선택^pid^indd^cretno^마감일자^fstrgstrid^fstrgstdt^심사자^심사일시" colsep="^" colwidth="30, 100, 100, 100, 135, 100, 100, 120, 135" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:43px; width:447px; height:259px; ">
  130. <col ref="chk" type="checkbox" style="text-align:center; "/>
  131. <col ref="pid" visibility="hidden" style="text-align:center; "/>
  132. <col ref="indd" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
  133. <col ref="cretno" visibility="hidden" style="text-align:center; "/>
  134. <col ref="judgenddd" format="yyyy-mm-dd" style="text-align:center; "/>
  135. <col ref="fstrgstrid" visibility="hidden" style="text-align:center; "/>
  136. <col ref="fstrgstdt" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
  137. <col ref="lastupdtrid" style="text-align:center; "/>
  138. <col ref="lastupdtdt" format="yyyy-mm-dd" style="text-align:center; "/>
  139. </datagrid>
  140. </group>
  141. <caption id="caption3" class="tit_1" style="left:0px; top:0px; width:180px; height:14px; vertical-align:middle; ">중간계산마감</caption>
  142. <button id="btn_close" class="btn4_letter2" style="left:395px; top:325px; width:56px; height:22px; ">
  143. <caption>닫기</caption>
  144. <script type="javascript" ev:event="DOMActivate">
  145. <![CDATA[
  146. window.close();
  147. ]]>
  148. </script>
  149. </button>
  150. </xhtml:body>
  151. </xhtml:html>