SPAHA02140__감액입력.xrw 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPAHA02140_감액입력.xrw
  4. * 설 명 : 감액입력
  5. * 설 계 자 : 채희철
  6. * 작 성 자 : 채희철
  7. * 작 성 일 : 2007.05.28
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>감액입력</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <p_dcgm/>
  20. <h_dcgm>
  21. <totamt/>
  22. <reduamt/>
  23. <percent/>
  24. <discamt/>
  25. <rcptamt/>
  26. </h_dcgm>
  27. </main>
  28. <send>
  29. <srchdiscuncoflag>%</srchdiscuncoflag>
  30. </send>
  31. <init>
  32. <baseinfo/>
  33. </init>
  34. <hidden>
  35. <session/>
  36. </hidden>
  37. </root>
  38. </instance>
  39. <script type="javascript" ev:event="xforms-ready">
  40. <![CDATA[
  41. fInit();
  42. fGetBaseInfo();
  43. fCheckOpener();
  44. ]]>
  45. </script>
  46. <submission id="TRAHA02141" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/init/baseinfo"/>
  47. </model>
  48. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  50. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  54. <script type="javascript" src="../../../ast/healexamrcptweb/js/SPAHA02140.js"/>
  55. <script type="javascript">
  56. <![CDATA[
  57. ]]>
  58. </script>
  59. <script type="javascript" src="D:\CMCProject\application\webapps\com\hismainweb\js\DocTitle.js"/>
  60. </xhtml:head>
  61. <xhtml:body pagewidth="534" pageheight="317" guideline="1,518;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  62. <group id="group3" scroll="auto" style="left:0px; top:0px; width:518px; height:290px; ">
  63. <line id="line1" class="line_1" style="x1:0px; y1:24px; x2:517px; y2:24px; "/>
  64. <button id="button1" class="btn2_letter3" style="left:464px; top:4px; width:53px; height:19px; ">
  65. <caption>행삭제</caption>
  66. <script type="javascript" ev:event="DOMActivate">
  67. <![CDATA[
  68. fDeleteRow();
  69. ]]>
  70. </script>
  71. </button>
  72. <button id="button2" class="btn2_letter3" style="left:408px; top:4px; width:53px; height:19px; ">
  73. <caption>행추가</caption>
  74. <script type="javascript" ev:event="DOMActivate">
  75. <![CDATA[
  76. fAddRow();
  77. ]]>
  78. </script>
  79. </button>
  80. <caption id="caption3" class="cell_1" style="left:57px; top:264px; width:60px; height:23px; vertical-align:middle; ">수납금액</caption>
  81. <caption id="caption4" class="cell_1" style="left:379px; top:264px; width:60px; height:23px; vertical-align:middle; ">감액총액</caption>
  82. <output id="output2" ref="/root/main/h_dcgm/rcptamt" class="output_fix" format="#,###" style="left:120px; top:265px; width:100px; height:19px; text-align:right; "/>
  83. <output id="output3" ref="/root/main/h_dcgm/reduamt" class="output_fix" format="#,###" style="left:440px; top:265px; width:77px; height:19px; text-align:right; "/>
  84. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:108px; height:13px; ">감액내역</caption>
  85. <input id="input1" ref="/root/main/h_dcgm/percent" visibility="hidden" style="left:10px; top:265px; width:30px; height:19px; text-align:right; ">
  86. <script type="javascript" ev:event="onkeypress">
  87. <![CDATA[
  88. if (event.keyCode == "13")
  89. {
  90. setInputNodeCurText();
  91. if (getNodesetCount("/root/main/h_dcgm/dcgm") < 1)
  92. {
  93. model.resetInstanceNode("/root/main/dcgm/percent");
  94. model.refresh();
  95. return;
  96. }
  97. if (datagrid1.row < 1)
  98. {
  99. model.resetInstanceNode("/root/main/dcgm/percent");
  100. model.refresh();
  101. messageBox("적용할 감액 행을 선택하십시요!","E999","");
  102. return;
  103. }
  104. var percent = model.getValue("/root/main/dcgm/percent");
  105. if (percent.isNumber() == false)
  106. {
  107. model.resetInstanceNode("/root/main/dcgm/percent");
  108. model.refresh();
  109. messageBox("숫자형태만 입력가능합니다!","E999","");
  110. return;
  111. }
  112. if (eval(percent) < 1 || eval(percent) > 100)
  113. {
  114. model.resetInstanceNode("/root/main/dcgm/percent");
  115. model.refresh();
  116. messageBox("1 ~100 까지만 입력가능합니다!","E999","");
  117. return;
  118. }
  119. var totrcptamt = model.getValue("/root/main/dcgm/totrcptamt");
  120. //test
  121. //totrcptamt = "1000";
  122. if (totrcptamt.isNumber() == false)
  123. {
  124. messageBox("수납금액이 올바르지 않습니다!","E999","");
  125. return;
  126. }
  127. var reduamt = 0;
  128. reduamt = eval(totrcptamt) * eval(percent) / 100;
  129. model.setValue("/root/main/h_dcgm/dcgm["+ datagrid1.row +"]/dcgm_discreduamt",reduamt);
  130. datagrid1.rebuild();
  131. fReduamtCalc();
  132. }
  133. ]]>
  134. </script>
  135. </input>
  136. <caption id="caption2" visibility="hidden" style="left:40px; top:265px; width:20px; height:20px; ">%</caption>
  137. <datagrid id="grd_dcgm" nodeset="/root/main/p_dcgm" caption="감액분류^감액명칭^감액^적용사유" colwidth="76, 147, 90, 271" dataheight="23" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" colsep="^" style="left:0px; top:29px; width:518px; height:232px; ">
  138. <col ref="discreduflag" type="combo" disabled="true">
  139. <choices>
  140. <item>
  141. <label>할인</label>
  142. <value>D</value>
  143. </item>
  144. <item>
  145. <label>감액</label>
  146. <value>G</value>
  147. </item>
  148. </choices>
  149. </col>
  150. <col ref="discreducd" type="combo">
  151. <choices>
  152. <itemset nodeset="/root/init/baseinfo/disccdlist">
  153. <label ref="cdnm"/>
  154. <value ref="cdid"/>
  155. </itemset>
  156. </choices>
  157. </col>
  158. <col ref="discreduamt" type="input" format="(-)#,###" style="text-align:right; "/>
  159. <col ref="apprsn" type="input"/>
  160. <script type="javascript" ev:event="xforms-value-changed">
  161. <![CDATA[
  162. var currow = grd_dcgm.row;
  163. var curcol = grd_dcgm.col;
  164. if (curcol == "2")
  165. {
  166. if ( model.getValue("/root/main/p_dcgm[" + currow + "]/discreduflag") == "D"){
  167. messageBox("할인 계정에 해당하는 금액은 변경 할 수 없습니다!","E999","");
  168. return
  169. }else
  170. fAmtCalc();
  171. }
  172. ]]>
  173. </script>
  174. </datagrid>
  175. <caption id="caption5" class="cell_1" style="left:239px; top:264px; width:60px; height:23px; vertical-align:middle; ">할인총액</caption>
  176. <output id="output1" ref="/root/main/h_dcgm/discamt" class="output_fix" format="#,###" style="left:300px; top:265px; width:77px; height:19px; text-align:right; "/>
  177. </group>
  178. <group id="group1" scroll="auto" style="left:0px; top:290px; width:518px; height:27px; ">
  179. <button id="btn_confirm" class="btn4_letter2" style="left:402px; top:5px; width:56px; height:22px; ">
  180. <caption>확인</caption>
  181. <script type="javascript" ev:event="DOMActivate">
  182. <![CDATA[
  183. fConfirm();
  184. ]]>
  185. </script>
  186. </button>
  187. <button id="btn_cancel" class="btn4_letter2" style="left:461px; top:5px; width:56px; height:22px; ">
  188. <caption>취소</caption>
  189. <script type="javascript" ev:event="DOMActivate">
  190. <![CDATA[
  191. fCancel();
  192. ]]>
  193. </script>
  194. </button>
  195. <line id="line88" class="line_6" style="x1:0px; y1:0px; x2:518px; y2:0px; "/>
  196. </group>
  197. </xhtml:body>
  198. </xhtml:html>