SMANB00900_식품월재고마감관리.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>식품월재고마감처리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <cond>
  10. <srch1>
  11. <instcd/>
  12. <instnm/>
  13. <strmm/>
  14. <userid/>
  15. <usernm/>
  16. </srch1>
  17. <srch2>
  18. <instcd/>
  19. <instnm/>
  20. <strmm/>
  21. <endmm/>
  22. <sumflag/>
  23. </srch2>
  24. </cond>
  25. <main>
  26. <stocinfo>
  27. <foodstocrsltlist/>
  28. </stocinfo>
  29. </main>
  30. <send>
  31. <reqdata/>
  32. <savedata/>
  33. </send>
  34. <init>
  35. </init>
  36. <hidden/>
  37. </root>
  38. </instance>
  39. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  40. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. model.setValue("/root/cond/srch1/instcd",getUserInfo("dutplceinstcd"));
  46. model.setValue("/root/cond/srch1/instnm",getUserInfo("dutplceinstnm"));
  47. model.setValue("/root/cond/srch1/strmm" ,getCurrentDate().substring(0,6));
  48. model.setValue("/root/cond/srch1/userid",getUserInfo("userid"));
  49. model.setValue("/root/cond/srch1/usernm",getUserInfo("usernm"));
  50. model.removeNodeset(grd_foodstocrsltlist.nodeset);
  51. model.setValue("/root/cond/srch2/instcd",getUserInfo("dutplceinstcd"));
  52. model.setValue("/root/cond/srch2/instnm",getUserInfo("dutplceinstnm"));
  53. model.setValue("/root/cond/srch2/strmm" ,getCurrentDate().substring(0,6));
  54. model.setValue("/root/cond/srch2/endmm" ,getCurrentDate().substring(0,6));
  55. model.refresh();
  56. ]]>
  57. </script>
  58. <script type="javascript">
  59. <![CDATA[
  60. function saveGridToExcel(grdObj){
  61. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  62. if (fileName != ""){
  63. grdObj.saveExcel(fileName, "SheetName", false, false, "", "", true);
  64. }
  65. }
  66. ]]>
  67. </script>
  68. <submission id="TXANB00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/hidden"/>
  69. <submission id="TRANB00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/stocinfo"/>
  70. </model>
  71. </xhtml:head>
  72. <xhtml:body guideline="2,765;1,1182;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  73. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:132px; height:14px; ">식품월재고마감처리</caption>
  74. <case id="case1" selected="true" style="left:0px; top:0px; width:640px; height:340px; "/>
  75. <switch id="switch1" style="left:0px; top:40px; width:1135px; height:705px; ">
  76. <case id="cse_stocrslt" selected="true">
  77. <datagrid id="grd_foodstocrsltlist" nodeset="/root/main/stocinfo/foodstocrsltlist" caption="작업년월^비용계정명^ 이월수량^ 전월이월&#xA;금액^ 입고수량^ 입고금액^출고수량^ 출고금액^ 재고수량^재고금액|작업년월^비용계정명^ 이월수량^ 전월이월&#xA;금액^ 입고수량^ 입고금액^출고수량^ 출고금액^ 재고수량^재고금액" colsep="^" colwidth="57, 94, 82, 113, 112, 113, 98, 127, 91, 118" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" style="left:0px; top:62px; width:1090px; height:635px; ">
  78. <col ref="stocym" format="yyyy-mm" style="text-align:center; "/>
  79. <col ref="acntnm" style="text-align:left; "/>
  80. <col ref="beftotqty" format="#,###.##" style="text-align:right; "/>
  81. <col ref="beftotamt" format="#,###.##" style="text-align:right; "/>
  82. <col ref="inputqty" format="#,###.##" style="text-align:right; "/>
  83. <col ref="inputamt" format="#,###.##" style="text-align:right; "/>
  84. <col ref="outputqty" format="#,###.##" style="text-align:right; "/>
  85. <col ref="outputamt" format="#,###.##" style="text-align:right; "/>
  86. <col ref="apptotqty" format="#,###.##" style="text-align:right; "/>
  87. <col ref="apptotamt" format="#,###.##" style="text-align:right; "/>
  88. </datagrid>
  89. <caption id="caption18" class="tit_2" style="left:0px; top:45px; width:140px; height:14px; ">재고마감 처리결과</caption>
  90. <button id="button4" class="btn2_letter2" style="left:1044px; top:42px; width:42px; height:19px; ">
  91. <caption>엑셀</caption>
  92. <script type="javascript" ev:event="DOMActivate">
  93. <![CDATA[
  94. saveGridToExcel(grd_foodstocrsltlist);
  95. ]]>
  96. </script>
  97. </button>
  98. <group id="group3" style="left:0px; top:0px; width:1090px; height:40px; vertical-align:top; ">
  99. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:-10px; top:0px; width:1095px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  100. <caption id="caption17" class="search_name" style="left:5px; top:11px; width:89px; height:17px; ">기관코드 :</caption>
  101. <output id="output2" ref="/root/cond/srch2/instcd" class="output_fix" style="left:95px; top:10px; width:30px; height:19px; "/>
  102. <output id="output3" ref="/root/cond/srch2/instnm" class="output_fix" style="left:128px; top:10px; width:202px; height:19px; text-align:center; "/>
  103. <button id="button9" class="btn4_letter2" style="left:970px; top:10px; width:56px; height:22px; ">
  104. <caption>조회</caption>
  105. <script type="javascript" ev:event="DOMActivate">
  106. <![CDATA[
  107. model.makeValue("/root/send/reqdata/instcd" ,model.getValue("/root/cond/srch2/instcd"));
  108. model.makeValue("/root/send/reqdata/strmm" ,model.getValue("/root/cond/srch2/strmm"));
  109. model.makeValue("/root/send/reqdata/endmm" ,model.getValue("/root/cond/srch2/endmm"));
  110. model.makeValue("/root/send/reqdata/sumflag" ,model.getValue("/root/cond/srch2/sumflag"));
  111. if(submit("TRANB00901")){
  112. var sumflag = model.getValue("/root/cond/srch2/sumflag");
  113. if(sumflag=="Y"){
  114. grd_foodstocrsltlist.subtotal("clear", 0, 0);
  115. for(iCol = 1; iCol <=grd_foodstocrsltlist.cols ; iCol++){
  116. if((grd_foodstocrsltlist.colRef("stocym")!= iCol)&&(grd_foodstocrsltlist.colRef("acntnm")!= iCol)) {
  117. grd_foodstocrsltlist.subtotal("sum", 2, iCol, "format:#,###.##; ", "background-color:#ffff99; font-weight:bold; ", grd_foodstocrsltlist.colRef("acntnm"), "합계");
  118. }
  119. }
  120. }else{
  121. grd_foodstocrsltlist.subtotal("clear", 0, 0);
  122. for(iCol = 1; iCol <=grd_foodstocrsltlist.cols ; iCol++){
  123. if((grd_foodstocrsltlist.colRef("stocym")!= iCol)&&(grd_foodstocrsltlist.colRef("acntnm")!= iCol)) {
  124. grd_foodstocrsltlist.subtotal("sum", 1, iCol, "format:#,###.##; ", "background-color:#ffff99; font-weight:bold; ", grd_foodstocrsltlist.colRef("stocym"), "합계");
  125. }
  126. }
  127. }
  128. }
  129. ]]>
  130. </script>
  131. </button>
  132. <caption id="caption19" class="search_name" style="left:355px; top:11px; width:101px; height:17px; ">작업년월 :</caption>
  133. <input id="input4" ref="/root/cond/srch2/strmm" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:455px; top:10px; width:97px; height:19px; text-align:center; "/>
  134. <line id="line14" class="line_4" style="x1:950px; y1:5px; x2:950px; y2:33px; "/>
  135. <caption id="caption11" class="search_no_b" style="left:560px; top:10px; width:12px; height:17px; ">~</caption>
  136. <input id="input5" ref="/root/cond/srch2/endmm" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:575px; top:10px; width:97px; height:19px; text-align:center; "/>
  137. <select id="checkbox1" ref="/root/cond/srch2/sumflag" overflow="visible" appearance="full" style="left:695px; top:10px; width:70px; height:20px; border-style:none; ">
  138. <choices>
  139. <item>
  140. <label>월별합계</label>
  141. <value>Y</value>
  142. </item>
  143. </choices>
  144. <script type="javascript" ev:event="xforms-value-changed">
  145. <![CDATA[
  146. /*var sumflag = model.getValue("/root/cond/srch2/sumflag");
  147. if(sumflag=="Y"){
  148. grd_foodstocrsltlist.colHidden(grd_foodstocrsltlist.colRef("stocym"))=true;
  149. }else{
  150. grd_foodstocrsltlist.colHidden(grd_foodstocrsltlist.colRef("stocym"))=false;
  151. }
  152. grd_foodstocrsltlist.refresh();*/
  153. ]]>
  154. </script>
  155. </select>
  156. </group>
  157. <button id="button13" class="btn6_letter2" style="left:980px; top:40px; width:56px; height:22px; ">
  158. <caption>출력</caption>
  159. <script type="javascript" ev:event="DOMActivate">
  160. <![CDATA[
  161. exeReportPreview("RPANB00901","XMLSTR");
  162. ]]>
  163. </script>
  164. </button>
  165. </case>
  166. <case id="cse_cretstoc" style="left:0px; top:0px; width:1133px; height:703px; ">
  167. <group id="group1" style="left:0px; top:5px; width:470px; height:205px; border-left-style:solid; border-top-style:solid; border-right-style:solid; border-bottom-style:solid; ">
  168. <caption id="caption61" class="tit_2" style="left:45px; top:35px; width:157px; height:13px; ">식품월재고마감처리</caption>
  169. <line id="line23" class="line_2" style="x1:40px; y1:129px; x2:417px; y2:129px; "/>
  170. <line id="line35" class="line_3" style="x1:40px; y1:133px; x2:417px; y2:133px; "/>
  171. <button id="btn_del" class="btn2_letter2" style="left:329px; top:142px; width:42px; height:19px; ">
  172. <caption>삭제</caption>
  173. <script type="javascript" ev:event="DOMActivate">
  174. <![CDATA[
  175. model.makeValue("/root/send/savedata/iudflag" ,"D");
  176. model.makeValue("/root/send/savedata/instcd" ,model.getValue("/root/cond/srch1/instcd"));
  177. model.makeValue("/root/send/savedata/strmm" ,model.getValue("/root/cond/srch1/strmm"));
  178. model.makeValue("/root/send/savedata/userid" ,model.getValue("/root/cond/srch1/userid"));
  179. if(submit("TXANB00901")==true){
  180. var certflag = model.getValue("/root/hidden/certinfo/certflag");
  181. if(certflag=="N"){
  182. messageBox("재고마감 삭제가","I001");
  183. return;
  184. }else{
  185. messageBox("재고마감 삭제가 실패하였습니다\n다시한번","C003");
  186. return;
  187. }
  188. }
  189. ]]>
  190. </script>
  191. </button>
  192. <line id="line1" class="line_2" style="x1:40px; y1:77px; x2:417px; y2:77px; "/>
  193. <button id="btn_gen" class="btn2_letter2" style="left:374px; top:142px; width:42px; height:19px; ">
  194. <caption>실행</caption>
  195. <script type="javascript" ev:event="DOMActivate">
  196. <![CDATA[
  197. model.makeValue("/root/send/savedata/iudflag" ,"I");
  198. model.makeValue("/root/send/savedata/instcd" ,model.getValue("/root/cond/srch1/instcd"));
  199. model.makeValue("/root/send/savedata/strmm" ,model.getValue("/root/cond/srch1/strmm"));
  200. model.makeValue("/root/send/savedata/userid" ,model.getValue("/root/cond/srch1/userid"));
  201. if(submit("TXANB00901")){
  202. var certflag = model.getValue("/root/hidden/certinfo/certflag");
  203. if(certflag=="Y"){
  204. messageBox("재고마감 생성이","I001");
  205. return;
  206. }else{
  207. messageBox("재고마감 생성이 실패하였습니다\n다시한번","C003");
  208. return;
  209. }
  210. }
  211. ]]>
  212. </script>
  213. </button>
  214. <line id="line19" class="line_2" style="x1:40px; y1:104px; x2:417px; y2:104px; "/>
  215. <caption id="caption7" class="cell_1" style="left:40px; top:55px; width:108px; height:23px; text-align:center; vertical-align:middle; ">기관코드</caption>
  216. <line id="line7" class="line_1" style="x1:40px; y1:50px; x2:417px; y2:50px; "/>
  217. <input id="input1" ref="/root/cond/srch1/strmm" class="input_default" inputtype="date" format="yyyy-mm" style="left:150px; top:81px; width:120px; height:19px; text-align:center; "/>
  218. <caption id="caption5" class="cell_1" style="left:40px; top:79px; width:108px; height:23px; text-align:center; ">작업년월</caption>
  219. <caption id="caption2" class="cell_1" style="left:40px; top:104px; width:108px; height:23px; text-align:center; ">작업자</caption>
  220. <input id="input2" ref="/root/cond/srch1/userid" class="input_default" appearance="input" style="left:150px; top:106px; width:79px; height:19px; "/>
  221. <input id="input3" ref="/root/cond/srch1/usernm" class="input_default" appearance="input" style="left:233px; top:106px; width:130px; height:19px; "/>
  222. <output id="output1" ref="/root/cond/srch1/instcd" class="output_fix" visibility="hidden" style="left:369px; top:54px; width:30px; height:19px; "/>
  223. <output id="output4" ref="/root/cond/srch1/instnm" class="output_fix" style="left:149px; top:55px; width:212px; height:19px; text-align:center; "/>
  224. </group>
  225. </case>
  226. </switch>
  227. <button id="button1" class="btn_sw" group="tab" style="left:1px; top:20px; width:115px; height:22px; ">
  228. <caption>재고마감처리</caption>
  229. <script type="javascript" ev:event="DOMActivate">
  230. <![CDATA[
  231. model.toggle("cse_cretstoc");
  232. ]]>
  233. </script>
  234. </button>
  235. <button id="button8" class="btn_sw" group="tab" selected="true" style="left:115px; top:20px; width:115px; height:22px; ">
  236. <caption>처리결과</caption>
  237. <script type="javascript" ev:event="DOMActivate">
  238. <![CDATA[
  239. model.toggle("cse_stocrslt");
  240. ]]>
  241. </script>
  242. </button>
  243. </xhtml:body>
  244. </xhtml:html>