SMSDT07400_사회사업간병관리실적.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT07400.사회사업간병관리실적.xrw
  4. * 설 명 : 사회사업간병관리실적
  5. * 작 성 자 : 임여원
  6. * 작 성 일 : 2008.11.17
  7. * 수정이력 :
  8. * 기 타 :
  9. -->
  10. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  11. <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">
  12. <xhtml:head>
  13. <xhtml:title>사회사업간병관리실적</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <brgstincmexpspres>
  19. <brgstincmexpsprescond>
  20. <cond/>
  21. <nurspatcnt/>
  22. <nursdayno/>
  23. <nursexchamt/>
  24. </brgstincmexpsprescond>
  25. </brgstincmexpspres>
  26. <search>
  27. <reqflag>1</reqflag>
  28. <fromdd/>
  29. <todd/>
  30. <fromentryy/>
  31. <fromendyy/>
  32. <toendyy/>
  33. <toentryy/>
  34. </search>
  35. </main>
  36. <send>
  37. <reqdata/>
  38. </send>
  39. <init/>
  40. <hidden/>
  41. </root>
  42. </instance>
  43. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  44. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  45. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  49. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  50. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. fInit();
  54. ]]>
  55. </script>
  56. <submission id="TRSDT04002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/cnstinfo"/>
  57. <bind id="bfreqcntconsult" ref="/root/main/cnstinfo/cnstlist/bfreqcntconsult" calculate="../reqtot - ../bfreqcnt"/>
  58. <bind id="bfreplcntreply" ref="/root/main/cnstinfo/cnstlist/bfreplcntreply" calculate="../repltot - ../bfreplcnt"/>
  59. <submission id="TRSDT07401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/brgstincmexpspres"/>
  60. </model>
  61. <script type="javascript">
  62. <![CDATA[
  63. /**========================================================================================================================================
  64. * 조회기간 그리드초기화
  65. =========================================================================================================================================*/
  66. function fInit()
  67. {
  68. //cmb_reqflag.select(0);
  69. //ipt_fromdd.visible=true;
  70. //ipt_todd.visible=true;
  71. caption1.visible=true;
  72. model.removeNodeset("/root/main/brgstincmexpspres");
  73. var CurrentDate=getCurrentDate();
  74. var CurrentDateYM=CurrentDate.substr(0,6);
  75. var LastDate=CurrentDate.toDate().getAddDate(-1,"M").getDateFormat();
  76. var LastDateYM=LastDate.substr(0,6);
  77. model.makeValue("/root/main/search/fromdd",LastDateYM);
  78. model.makeValue("/root/main/search/todd",LastDateYM);
  79. model.refresh();
  80. }
  81. /**========================================================================================================================================
  82. * 조회
  83. =========================================================================================================================================*/
  84. function fReqBrgstIncmExpsCond()
  85. {
  86. model.removeNodeset("/root/send/reqdata");
  87. model.makeNode("/root/send/reqdata");
  88. model.refresh();
  89. var fromdd=model.getValue("/root/main/search/fromdd");
  90. var todd=model.getValue("/root/main/search/todd");
  91. var reqflag=model.getValue("/root/main/search/reqflag");
  92. model.makeValue("/root/send/reqdata/fromdd",fromdd);
  93. model.makeValue("/root/send/reqdata/todd",todd);
  94. model.makeValue("/root/send/reqdata/reqflag",reqflag);
  95. if(isNull(fromdd))
  96. {
  97. messageBox("조회시작일자는","I003");
  98. model.setFocus("ipt_fromdd");
  99. return;
  100. }
  101. if(isNull(todd))
  102. {
  103. messageBox("조회종료일자는","I003");
  104. model.setFocus("ipt_todd");
  105. return;
  106. }
  107. if(fromdd>todd)
  108. {
  109. messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  110. model.setFocus("ipt_todd");
  111. return;
  112. }
  113. var dateintval=getDateInterval(fromdd+"01",todd+"31");
  114. //alert(dateintval);
  115. if(dateintval>"370")
  116. {
  117. messageBox("조회기간은 최대 1년까지 할 수 있습니다","I");
  118. model.setFocus("ipt_fromdd");
  119. return;
  120. }
  121. submit("TRSDT07401");
  122. var idxRow=grd_brgstincmexpsprescond.rows;
  123. var fixRow=grd_brgstincmexpsprescond.fixedRows;
  124. var reqflag=model.getValue("/root/main/search/reqflag");
  125. for(i=1;i<=idxRow-fixRow;i++)
  126. {
  127. var cond=model.getValue("/root/main/brgstincmexpspres/brgstincmexpsprescond"+"["+i+"]/cond");
  128. if(cond=='전기간실적'&&i=='1')
  129. {
  130. grd_brgstincmexpsprescond.removeRow(false);
  131. }
  132. else
  133. {
  134. fGetBfResult();
  135. return;
  136. }
  137. }
  138. //model.resetInstanceNode("/root/send/reqdata");
  139. }
  140. /**========================================================================================================================================
  141. * 전년실적
  142. =========================================================================================================================================*/
  143. function fGetBfResult()
  144. {
  145. if(grd_brgstincmexpsprescond.rows - grd_brgstincmexpsprescond.fixedRows >1)
  146. {
  147. var sStat = 0;
  148. var insRow = grd_brgstincmexpsprescond.rows;
  149. grd_brgstincmexpsprescond.addRow(insRow, false);
  150. grd_brgstincmexpsprescond.valueMatrix(insRow, grd_brgstincmexpsprescond.colRef("cond") ) = "전기간대비실적비교";
  151. for(var i= grd_brgstincmexpsprescond.colRef("nurspatcnt"); i<= grd_brgstincmexpsprescond.colRef("nursexchamt"); i++)
  152. {
  153. var bfResult = eval(grd_brgstincmexpsprescond.valueMatrix(insRow -1 , i));
  154. var sSum = eval(grd_brgstincmexpsprescond.valueMatrix(insRow-2, i));
  155. sStat = eval(sSum)- eval(bfResult) ;
  156. grd_brgstincmexpsprescond.valueMatrix(insRow, i ) = eval(sStat);
  157. }
  158. }else
  159. {
  160. model.removeNodeset("/root/main/brgstincmexpspres/brgstincmexpsprescond");
  161. }
  162. model.refresh();
  163. }
  164. /**========================================================================================================================================
  165. * 초기화
  166. =========================================================================================================================================*/
  167. function fResetBrgstIncmExps()
  168. {
  169. model.removeNodeset("/root/main/brgstincmexpspres");
  170. model.refresh();
  171. }
  172. /**========================================================================================================================================
  173. * 엑셀저장 버튼 클릭시
  174. =========================================================================================================================================*/
  175. function fExcel() {
  176. if (grd_brgstincmexpsprescond.rows <= 2) {
  177. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  178. return;
  179. }
  180. var fileName = window.fileDialog("save", ",", false, "사회사업간병관리실적", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  181. if (fileName != ""){
  182. grd_brgstincmexpsprescond.saveExcel(fileName, "SheetName", false, false, "", "", false);
  183. }
  184. }
  185. ]]>
  186. </script>
  187. </xhtml:head>
  188. <xhtml:body guideline="1,1195;1,1191;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  189. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  190. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">사회사업 간병관리실적</caption>
  191. </group>
  192. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  193. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  194. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  195. <caption>초기화</caption>
  196. <script type="javascript" ev:event="DOMActivate">
  197. <![CDATA[
  198. fResetBrgstIncmExps();
  199. ]]>
  200. </script>
  201. </button>
  202. </group>
  203. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  204. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:232px; height:14px; ">사회사업간병관리실적</caption>
  205. <line id="line1" class="line_1" style="x1:0px; y1:73px; x2:1190px; y2:72px; "/>
  206. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  207. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  208. <button id="button2" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
  209. <caption>조회</caption>
  210. <script type="javascript" ev:event="DOMActivate">
  211. <![CDATA[
  212. fReqBrgstIncmExpsCond();
  213. ]]>
  214. </script>
  215. </button>
  216. <caption id="caption23" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
  217. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  218. <caption id="cap1" style="left:415px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
  219. <input id="ipt_fromdd" ref="/root/main/search/fromdd" class="input_search" navindex="2" inputtype="date" format="yyyy-mm" style="left:332px; top:8px; width:73px; height:19px; "/>
  220. <input id="ipt_todd" ref="/root/main/search/todd" class="input_search" navindex="3" inputtype="date" format="yyyy-mm" style="left:445px; top:8px; width:73px; height:19px; "/>
  221. <caption id="caption1" class="search_name" style="left:240px; top:10px; width:100px; height:17px; ">조회기간 :</caption>
  222. <select1 id="cmb_reqflag" ref="/root/main/search/reqflag" navindex="1" appearance="minimal" style="left:110px; top:10px; width:85px; height:19px; ">
  223. <choices>
  224. <item>
  225. <label>병동별</label>
  226. <value>1</value>
  227. </item>
  228. <item>
  229. <label>간병단체별</label>
  230. <value>2</value>
  231. </item>
  232. </choices>
  233. <script type="javascript" ev:event="xforms-value-changed">
  234. <![CDATA[
  235. /*
  236. var CurrentDate=getCurrentDate();
  237. var CurrentDateYM=CurrentDate.substr(0,6);
  238. var LastDate=CurrentDate.toDate().getAddDate(-1,"M").getDateFormat();
  239. var LastDateYM=LastDate.substr(0,6);
  240. model.makeValue("/root/main/search/fromdd",LastDateYM);
  241. model.makeValue("/root/main/search/todd",LastDateYM);
  242. var fromdd=model.getValue("/root/main/search/fromdd");
  243. var todd=model.getValue("/root/main/search/todd");
  244. */
  245. model.removeNodeset("/root/send/reqdata");
  246. model.makeNode("/root/send/reqdata");
  247. model.refresh();
  248. fReqBrgstIncmExpsCond(); //조회함수
  249. ]]>
  250. </script>
  251. </select1>
  252. </group>
  253. <button id="btn_excel" class="btn2_letter4" style="left:1126px; top:50px; width:64px; height:19px; ">
  254. <caption>엑셀저장</caption>
  255. <script type="javascript" ev:event="DOMActivate">
  256. <![CDATA[
  257. fExcel();
  258. ]]>
  259. </script>
  260. </button>
  261. <datagrid id="grd_brgstincmexpsprescond" nodeset="/root/main/brgstincmexpspres/brgstincmexpsprescond" class="datagrid2" caption="구분^사회사업간병연계환자수^사회사업간병활동일수^사회사업간병활동환산액^reply^장소^장소^장소^장소명^장소^담당자|구분^사회사업간병연계환자수^사회사업간병활동일수^사회사업간병활동환산액^reply^장소^장소^장소^장소명^장소^담당자" colsep="^" colwidth="199, 200, 200, 200" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:1px; top:76px; width:1190px; height:664px; ">
  262. <col ref="cond" style="text-align:center; "/>
  263. <col ref="nurspatcnt" style="text-align:center; "/>
  264. <col ref="nursdayno" style="text-align:center; "/>
  265. <col ref="nursexchamt" format="#,###" style="text-align:center; "/>
  266. </datagrid>
  267. </group>
  268. </xhtml:body>
  269. </xhtml:html>