SMRSD00800_안전재고량 조회(약국).xrw 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. <cond>
  11. <instcd/>
  12. <fromdd/>
  13. <todd/>
  14. <goodcd/>
  15. </cond>
  16. <goodbaseqtyinfo>
  17. <goodbaseqtylist/>
  18. </goodbaseqtyinfo>
  19. </main>
  20. <send/>
  21. <init/>
  22. <hidden/>
  23. <temp/>
  24. </root>
  25. </instance>
  26. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  27. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  28. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  29. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  30. <script type="javascript" ev:event="xforms-ready">
  31. <![CDATA[
  32. fInitialize();
  33. rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  34. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  35. model.refresh();
  36. ]]>
  37. </script>
  38. <submission id="TRRSD00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retvcond" resultref="/root/main/reqlist"/>
  39. <submission id="TRRSD00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdeptlist" resultref="/root/main/goodbaseqtylist"/>
  40. <submission id="TRRSD00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/goodbaseqtyinfo"/>
  41. <submission id="TXRSD00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/hidden"/>
  42. </model>
  43. <script type="javascript">
  44. <![CDATA[
  45. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  46. function fInitialize() {
  47. model.resetInstanceNode("/root/send");
  48. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  49. model.refresh();
  50. }
  51. ]]>
  52. </script>
  53. </xhtml:head>
  54. <xhtml:body guideline="2,717;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  55. <datagrid id="grd_goodbaseqtylist" nodeset="/root/main/goodbaseqtyinfo/goodbaseqtylist" class="text_center" caption="약품코드^약품명^부서명1^부서명1^부서명2^부서명2^부서명3^부서명3^부서명4^부서명4^부서명5^부서명5^부서명6^부서명6^부서명7^부서명7^부서명8^부서명8^부서명9^부서명9^부서명10^부서명10^color|약품코드^약품명^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^color" colsep="^" colwidth="111, 152, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 0" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:85px; width:1195px; height:632px; ">
  56. <col disabled="true" ref="goodcd"/>
  57. <col disabled="true" ref="goodnm" style="text-align:left; "/>
  58. <col ref="dept1totqty"/>
  59. <col ref="dept1baseqty"/>
  60. <col ref="dept2totqty"/>
  61. <col ref="dept2baseqty"/>
  62. <col ref="dept3totqty"/>
  63. <col ref="dept3baseqty"/>
  64. <col ref="dept4totqty"/>
  65. <col ref="dept4baseqty"/>
  66. <col ref="dept5totqty"/>
  67. <col ref="dept5baseqty"/>
  68. <col ref="dept6totqty"/>
  69. <col ref="dept6baseqty"/>
  70. <col ref="dept7totqty"/>
  71. <col ref="dept7baseqty"/>
  72. <col ref="dept8totqty"/>
  73. <col ref="dept8baseqty"/>
  74. <col ref="dept9totqty"/>
  75. <col ref="dept9baseqty"/>
  76. <col ref="dept10totqty"/>
  77. <col ref="dept10baseqty"/>
  78. <col ref="color" visibility="hidden"/>
  79. <script type="javascript" ev:event="onaftersort">
  80. <![CDATA[
  81. grd_goodbaseqtylist.gridToInstance();
  82. ]]>
  83. </script>
  84. </datagrid>
  85. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:15px; width:1195px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  86. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">약품 안전재고량 관리</caption>
  87. <select1 id="cmb_instcd" ref="/root/main/cond/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:25px; width:165px; height:19px; ">
  88. <choices>
  89. <itemset>
  90. <label/>
  91. <value/>
  92. </itemset>
  93. </choices>
  94. </select1>
  95. <input id="ipt_reqdd" ref="/root/main/cond/fromdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:375px; top:25px; width:94px; height:19px; "/>
  96. <caption id="caption1" style="left:480px; top:25px; width:20px; height:15px; ">~</caption>
  97. <caption id="caption2" class="search_name" style="left:15px; top:25px; width:89px; height:17px; ">기관코드 :</caption>
  98. <caption id="caption4" class="tit_2" style="left:1px; top:65px; width:190px; height:13px; ">부서별 안전재고량</caption>
  99. <line id="line1" class="line_1" style="x1:1px; y1:80px; x2:1191px; y2:80px; "/>
  100. <input id="input1" ref="/root/main/cond/todd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:495px; top:25px; width:94px; height:19px; "/>
  101. <line id="line3" class="line_4" style="x1:1048px; y1:20px; x2:1048px; y2:47px; border-color:#ffe4bb; border-left-style:solid; "/>
  102. <caption id="caption16" class="search_name" style="left:290px; top:25px; width:86px; height:17px; ">조회일자</caption>
  103. <button id="btn_save" class="btn4_letter2" style="left:1060px; top:25px; width:56px; height:22px; ">
  104. <caption>저장</caption>
  105. <script type="javascript" ev:event="DOMActivate">
  106. <![CDATA[
  107. if (submit("TXRSD00801")) {
  108. messageBox("저장되었습니다.", "I");
  109. }
  110. ]]>
  111. </script>
  112. </button>
  113. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:25px; width:56px; height:22px; ">
  114. <caption>조회</caption>
  115. <script type="javascript" ev:event="DOMActivate">
  116. <![CDATA[
  117. submit("TRRSD00801");
  118. var caption = model.getValue("/root/main/goodbaseqtyinfo/deptlist/grd_deptcd");
  119. var size = model.getValue("/root/main/goodbaseqtyinfo/deptlist/grd_size");
  120. var hiddencols = size * 2 + 3;
  121. grd_goodbaseqtylist.caption = "약품코드^약품명^" + caption + "^color|약품코드^약품명^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^총합^안전재고량^color"
  122. for(var currow = 0; currow < grd_goodbaseqtylist.rows; currow++){
  123. var color = model.getValue("/root/main/goodbaseqtyinfo/goodbaseqtylist[" + currow + "]/color");
  124. var grd_color= "FFFFFF"
  125. if(color == "Y"){
  126. grd_color = "#ff00ff"
  127. }
  128. grd_goodbaseqtylist.rowStyle(currow+ 1, "data", "background-color") = "#" + grd_color;
  129. }
  130. //넘어온 부서 수만큼만 화면에 보여줌. 아닌것들은 숨김.
  131. for(var i = 1; i <= grd_goodbaseqtylist.cols; i++) {
  132. if(i < hiddencols) {
  133. grd_goodbaseqtylist.colHidden(i) = false;
  134. } else {
  135. grd_goodbaseqtylist.colHidden(i) = true;
  136. }
  137. }
  138. grd_goodbaseqtylist.refresh();
  139. ]]>
  140. </script>
  141. </button>
  142. <button id="button2" class="btn2_letter2" navindex="7" style="left:1145px; top:60px; width:42px; height:19px; text-align:left; ">
  143. <caption>엑셀</caption>
  144. <script type="javascript" ev:event="DOMActivate">
  145. <![CDATA[
  146. if(grd_goodbaseqtylist.rows == "1") {
  147. messageBox("엑셀로 저장할 데이터가 존재하지않습니다.", "E");
  148. return;
  149. }
  150. var fileName = window.fileDialog("save", ",", false, "부서별 안전재고량", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  151. if (fileName != "")
  152. {
  153. grd_goodbaseqtylist.saveExcel(fileName);
  154. }
  155. ]]>
  156. </script>
  157. </button>
  158. </xhtml:body>
  159. </xhtml:html>