SMRSG03700_계정별부서별연간불출현황.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <init>
  10. </init>
  11. <send>
  12. <instcd/>
  13. <yearfrdd/>
  14. <yeartodd/>
  15. <yeardd/>
  16. <delaystatus/>
  17. </send>
  18. <main>
  19. <acntcddeptcdyearinoutlist/>
  20. </main>
  21. <list>
  22. <acntcdlist/>
  23. </list>
  24. </root>
  25. </instance>
  26. <script type="javascript" ev:event="xforms-ready">
  27. <![CDATA[
  28. //화면 Control을 초기화한다
  29. fInitialize();
  30. ]]>
  31. </script>
  32. <submission id="TRRSG03701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/acntcddeptcdyearinoutlist"/>
  33. </model>
  34. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  35. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  36. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  37. <script type="javascript" src="../../../mis/purccommonweb/js/PURC.js"/>
  38. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  39. <script type="javascript">
  40. <![CDATA[
  41. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  42. function fInitialize() {
  43. model.resetInstanceNode("/root/send");
  44. misfComboComCdListMulti("Z0007","cmb_instcd" );
  45. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  46. misfGridInit(grd_acntcddeptcdyearinoutlist);
  47. misfMsterDetailSet(grd_acntcddeptcdyearinoutlist,null, "TRRSG03701" ,"N");
  48. misfGridInit(grd_acntcdlist);
  49. // grd_acntcddeptcdyearinoutlist.subtotalPosition = "after";
  50. model.refresh();
  51. }
  52. //필수항목 체크하는 메소드
  53. function fCheckRetrieveData()
  54. {
  55. if(!isRequiredControls("cmb_instcd") )return false; // 기관코드 , commonweb/js/tfHelper.js
  56. if(!isRequiredControls("cmb_yeardd") )return false; // 입고시작일자
  57. //if(!isRequiredControls("ipt_wintodd") )return false; // 입고종료일자
  58. //if(!isRequiredControls("cmb_stocdeptcd") )return false; // 부서코드
  59. }
  60. ]]>
  61. </script>
  62. </xhtml:head>
  63. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  64. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  65. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">계정별/부서별 연간 불출현황</caption>
  66. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  67. </group>
  68. <group id="group3" scroll="auto" style="left:0px; top:38; width:1195px; height:744px; ">
  69. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:61px; vertical-align:top; ">
  70. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  71. <caption id="cap_instcd" class="search_name" style="left:15px; top:9px; width:94px; height:17px; ">기관코드 :</caption>
  72. <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_s_essential" navindex="2" appearance="minimal" style="left:100px; top:8px; width:140px; height:19px; ">
  73. <choices>
  74. <itemset nodeset="/root/init/instcd">
  75. <label ref="cdnm"/>
  76. <value ref="cdid"/>
  77. </itemset>
  78. </choices>
  79. </select1>
  80. <caption id="caption3" class="search_name" style="left:340px; top:11px; width:87px; height:17px; ">연간통계 :</caption>
  81. <caption id="caption1" style="left:529px; top:12px; width:15px; height:20px; font-weight:bold; ">~</caption>
  82. <input id="input1" ref="/root/send/yearfrdd" class="input_s_essential" inputtype="date" style="left:425px; top:8; width:100px; height:19px; "/>
  83. <input id="input3" ref="/root/send/yeartodd" class="input_s_essential" inputtype="date" style="left:547px; top:8; width:100px; height:19px; "/>
  84. <caption id="caption2" style="left:180px; top:35px; width:111px; height:20px; ">년 03월 ~ 익년 02월</caption>
  85. <caption id="cap_yeardd" class="search_name" style="left:15px; top:35; width:87px; height:17px; ">연간통계 :</caption>
  86. <select1 id="cmb_yeardd" ref="/root/send/yeardd" class="combo_s_essential" navindex="2" appearance="minimal" style="left:100px; top:34px; width:78px; height:19px; ">
  87. <choices>
  88. <item>
  89. <label>2001</label>
  90. <value>2001</value>
  91. </item>
  92. <item>
  93. <label>2002</label>
  94. <value>2002</value>
  95. </item>
  96. <item>
  97. <label>2003</label>
  98. <value>2003</value>
  99. </item>
  100. <item>
  101. <label>2004</label>
  102. <value>2004</value>
  103. </item>
  104. <item>
  105. <label>2005</label>
  106. <value>2005</value>
  107. </item>
  108. <item>
  109. <label>2006</label>
  110. <value>2006</value>
  111. </item>
  112. <item>
  113. <label>2007</label>
  114. <value>2007</value>
  115. </item>
  116. <item>
  117. <label>2008</label>
  118. <value>2008</value>
  119. </item>
  120. <item>
  121. <label>2009</label>
  122. <value>2009</value>
  123. </item>
  124. <item>
  125. <label>2010</label>
  126. <value>2010</value>
  127. </item>
  128. </choices>
  129. </select1>
  130. <caption id="caption8" class="search_name" style="left:340px; top:35; width:94px; height:17px; ">휴면상태 :</caption>
  131. <select1 id="radio2" ref="/root/send/delaystatus" class="radio_search" appearance="full" cellspacing="20" cols="3" overflow="visible" style="left:425px; top:35px; width:207px; height:20px; vertical-align:middle; border-style:none; ">
  132. <choices>
  133. <item>
  134. <label>연간</label>
  135. <value>A</value>
  136. </item>
  137. <item>
  138. <label>분기별</label>
  139. <value>B</value>
  140. </item>
  141. <item>
  142. <label>자재별</label>
  143. <value>C</value>
  144. </item>
  145. </choices>
  146. </select1>
  147. <button id="button2" class="btn1_letter2" navindex="4" style="left:1124px; top:17px; width:56px; height:22px; text-align:left; ">
  148. <caption>조회</caption>
  149. <script type="javascript" ev:event="DOMActivate">
  150. <![CDATA[
  151. misfGridInit(grd_acntcddeptcdyearinoutlist);
  152. misfGridInit(grd_acntcdlist);
  153. if(fCheckRetrieveData(false) == false)return;
  154. misfMsterDetailRetrieve();
  155. // grd_acntcddeptcdyearinoutlist.subtotal("clear" , 0 , 0);
  156. // grd_acntcddeptcdyearinoutlist.subtotal("sum", 1, 6, "format:#,###.0; ", "background-color:#ffff99; font-weight:bold; ", 2, "계정별Total");
  157. var gridrow = grd_acntcddeptcdyearinoutlist.rows; //그리드 전체 행수
  158. // alert(gridrow);
  159. var tempdeptnm1 = 0; //내과
  160. var tempdeptnm2 = 0; //내과초음파
  161. var tempdeptnm3 = 0; //류마티스클리닉
  162. var tempdeptnm4 = 0; //심장센터
  163. var tempdeptnm5 = 0; //신경과
  164. var purcacntnm = null; //계정명
  165. var j = 1 ;
  166. for ( i = 1 ; i<= gridrow ; i++ ) {
  167. temppurcacntnm = model.getValue("/root/main/acntcddeptcdyearinoutlist["+i+"]/purcacntnm"); //계정명을 그리드 행에 따라 가져옴
  168. tempdeptnm = model.getValue("/root/main/acntcddeptcdyearinoutlist["+i+"]/deptnm"); //부서명을 그리드 행에 따라 가져옴
  169. //부서별로 불출갯수를 가져옴(계정명에 따라서)
  170. if( tempdeptnm == "내과") {
  171. tempdeptnm1 = model.getValue("/root/main/acntcddeptcdyearinoutlist["+i+"]/delivedeptqty");
  172. }
  173. if( tempdeptnm == "04층동병동") {
  174. tempdeptnm2 = model.getValue("/root/main/acntcddeptcdyearinoutlist["+i+"]/delivedeptqty");
  175. }
  176. if( tempdeptnm == "간호부 사무실") {
  177. tempdeptnm3 = model.getValue("/root/main/acntcddeptcdyearinoutlist["+i+"]/delivedeptqty");
  178. }
  179. if( tempdeptnm == "의료정보팀") {
  180. tempdeptnm4 = model.getValue("/root/main/acntcddeptcdyearinoutlist["+i+"]/delivedeptqty");
  181. }
  182. if( tempdeptnm == "신경과") {
  183. tempdeptnm5 = model.getValue("/root/main/acntcddeptcdyearinoutlist["+i+"]/delivedeptqty");
  184. }
  185. //계정명이 동일 할때는 위에 해당하는 부서별로 불출갯수를 찾아서 변수에 저장해 놓는다.
  186. if(purcacntnm != temppurcacntnm) { //계정명이 서로 다를 경우(계정명으로 group by 하는 의미
  187. purcacntnm = temppurcacntnm;
  188. grd_acntcdlist.addRow(false); //그리드 열추가
  189. model.setValue("/root/list/acntcdlist["+j+"]/temppurcacntnm",purcacntnm);
  190. model.setValue("/root/list/acntcdlist["+j+"]/tempdeptnm1",tempdeptnm1);
  191. model.setValue("/root/list/acntcdlist["+j+"]/tempdeptnm2",tempdeptnm2);
  192. model.setValue("/root/list/acntcdlist["+j+"]/tempdeptnm3",tempdeptnm3);
  193. model.setValue("/root/list/acntcdlist["+j+"]/tempdeptnm4",tempdeptnm4);
  194. model.setValue("/root/list/acntcdlist["+j+"]/tempdeptnm5",tempdeptnm5);
  195. j = j+1;
  196. tempdeptnm1 = 0;
  197. tempdeptnm2 = 0;
  198. tempdeptnm3 = 0;
  199. tempdeptnm4 = 0;
  200. tempdeptnm5 = 0;
  201. //계정명이 유일 할때 마다 그동안에 찾아 놓았던 부서의 불풀갯수를 그리드에 뿌려준다.
  202. }
  203. }
  204. model.refresh();
  205. ]]>
  206. </script>
  207. </button>
  208. <line id="line5" class="line_4" style="x1:1109px; y1:9px; x2:1109px; y2:52px; border-color:#ffe4bb; border-left-style:solid; "/>
  209. </group>
  210. <button id="button5" class="btn2_letter3" style="left:1080px; top:408px; width:53px; height:19px; ">
  211. <caption>줄추가</caption>
  212. </button>
  213. <button id="button6" class="btn2_letter3" style="left:1135px; top:408px; width:53px; height:19px; ">
  214. <caption>줄삭제</caption>
  215. </button>
  216. <line id="line3" class="line_1" style="x1:0px; y1:95px; x2:1195px; y2:95px; "/>
  217. <line id="line4" class="line_3" style="x1:0px; y1:121px; x2:1194px; y2:121px; "/>
  218. <datagrid id="grd_acntcdlist" nodeset="/root/list/acntcdlist" caption="구분^내과^내과초음파^류마티스클리닉^심장센터^신경과" colsep="^" colwidth="309, 170, 170, 170, 170, 170" extendlastcol="scroll" mergecellsfixedrows="bycol" rowheader="seq" rowheight="16" rowsep="|" style="left:0px; top:100px; width:1195px; height:634px; ">
  219. <col ref="temppurcacntnm"/>
  220. <col ref="tempdeptnm1" format="#,###" style="text-align:right; "/>
  221. <col ref="tempdeptnm2" style="text-align:right; "/>
  222. <col ref="tempdeptnm3" style="text-align:right; "/>
  223. <col ref="tempdeptnm4" style="text-align:right; "/>
  224. <col ref="tempdeptnm5" style="text-align:right; "/>
  225. </datagrid>
  226. <caption id="caption9" class="tit_2" style="left:5px; top:80px; width:159px; height:13px; ">계정별/부서별 불출목록</caption>
  227. <datagrid id="grd_acntcddeptcdyearinoutlist" nodeset="/root/main/acntcddeptcdyearinoutlist" visibility="hidden" caption="계정코드^계정명^부서코드^부서명^출고날짜^불출갯수^불출금액" colsep="^" colwidth="101, 156, 102, 162, 100, 107, 100" rowheader="seq" rowheight="16" rowsep="|" style="left:110px; top:365px; width:880px; height:345px; ">
  228. <col ref="purcacntcd"/>
  229. <col ref="purcacntnm"/>
  230. <col ref="windeptcd"/>
  231. <col ref="deptnm"/>
  232. <col ref="ym"/>
  233. <col ref="delivedeptqty"/>
  234. <col ref="outamt"/>
  235. </datagrid>
  236. </group>
  237. <group id="group4" scroll="auto" style="left:0px; top:12; width:1195px; height:27px; ">
  238. <line id="line1" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  239. <button id="button16" class="btn4_letter2" visibility="hidden" style="left:1069px; top:3px; width:56px; height:22px; ">
  240. <caption>저장</caption>
  241. </button>
  242. <button id="button18" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  243. <caption>초기화</caption>
  244. <script type="javascript" ev:event="DOMActivate">
  245. <![CDATA[
  246. fInitialize();
  247. ]]>
  248. </script>
  249. </button>
  250. </group>
  251. </xhtml:body>
  252. </xhtml:html>