SMSDT00600_의뢰종류별영적돌봄의뢰현황.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT00600_의뢰종류별영적돌봄의뢰현황.xrw
  4. * 설 명 : 의뢰종류별영적돌봄의뢰현황
  5. * 작 성 자 : 김다영
  6. * 작 성 일 : 2008.08.25
  7. * 수정이력 :
  8. * 기 타 :
  9. -->
  10. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <reqcareinfo>
  19. <reqcareinfolist>
  20. <item/>
  21. <nursecnt/>
  22. <othercnt/>
  23. <fthcnt/>
  24. <total/>
  25. </reqcareinfolist>
  26. </reqcareinfo>
  27. <cond>
  28. <searchflag>1</searchflag>
  29. <endyy/>
  30. <entryy/>
  31. <fromyear/>
  32. <toyear/>
  33. <cap2/>
  34. </cond>
  35. </main>
  36. <send>
  37. <reqdata/>
  38. </send>
  39. <init>
  40. <comcodelist>
  41. </comcodelist>
  42. <jobrespcd/>
  43. </init>
  44. <hidden/>
  45. </root>
  46. </instance>
  47. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  50. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  51. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  52. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  53. <script type="javascript" ev:event="xforms-ready">
  54. <![CDATA[
  55. fGetComCdList();
  56. //fGetJobrespcd(); //원목자권한
  57. ]]>
  58. </script>
  59. <submission id="TRAYA00101" ref="/send/reqdata" resultref="/root/init/comcodelist/conslrlist"/>
  60. <submission id="TRSDT00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/reqcareinfo"/>
  61. <bind id="total" ref="/root/main/reqcareinfo/reqcareinfolist/total" calculate="../nursecnt + ../othercnt + ../fthcnt"/>
  62. </model>
  63. <script type="javascript">
  64. <![CDATA[
  65. /**========================================================================================================================================
  66. * 원목자조회, 그리드초기화
  67. =========================================================================================================================================*/
  68. function fGetComCdList(){
  69. ipt_endyy.visible = true;
  70. ipt_entryy.visible = false;
  71. ipt_fromyear.visible = false;
  72. ipt_toyear.visible = false;
  73. cap2.visible = false;
  74. var currentDate = getCurrentDate();
  75. var currentYear = currentDate.substring(0, 4);
  76. // 그리드초기화
  77. model.removeNodeset("/root/main/reqcareinfo/reqcareinfolist");
  78. model.setValue("/root/main/cond/endyy" ,currentYear);
  79. model.setValue("/root/main/cond/entryy" ,currentYear);
  80. model.setValue("/root/main/cond/fromyear" ,currentYear);
  81. model.setValue("/root/main/cond/toyear" ,currentYear);
  82. model.removeNodeset(grd_reqcareinfo.nodeset);
  83. model.refresh();
  84. }
  85. /**========================================================================================================================================
  86. * 월별원목업무총집계표 조회
  87. =========================================================================================================================================*/
  88. function fGetReqCareInfo(){
  89. var searchflag = model.getValue("/root/main/cond/searchflag");
  90. var endyy = model.getValue("/root/main/cond/endyy");
  91. var entryy = model.getValue("/root/main/cond/entryy");
  92. var fromyear = model.getValue("/root/main/cond/fromyear");//+ "0101";
  93. var toyear = model.getValue("/root/main/cond/toyear");//+ "0101";
  94. var currentDate = getCurrentDate();
  95. var currentYear = currentDate.substring(0, 4);
  96. //조회기간 제한
  97. var dateintval = getDateInterval(fromyear,toyear);
  98. //lert(endyy);
  99. //alert(entryy);
  100. if(searchflag == '1'){ //월별
  101. if( endyy == ""){
  102. messageBox("조회년도를","C001" );
  103. model.setFocus("ipt_endyy");
  104. model.refresh();
  105. return;
  106. }
  107. }else if(searchflag == '2'){ //분기별
  108. if( entryy == ""){
  109. messageBox("조회년도를","C001" );
  110. model.setFocus("ipt_entryy");
  111. //model.setValue("/root/main/cond/entryy" ,currentYear);
  112. model.refresh();
  113. return;
  114. }
  115. }else if(searchflag == '3'){ //년도별
  116. if(dateintval>1825)
  117. {
  118. messageBox("조회기간은 최대5년까지 할 수 있습니다.","I");
  119. model.setFocus("ipt_fromyear");
  120. return;
  121. }
  122. else if(fromyear =="" || toyear ==""){ //날짜변경
  123. messageBox("조회년도를","C001" );
  124. model.setFocus("ipt_fromyear");
  125. return;
  126. }
  127. else if(fromyear>toyear)
  128. {
  129. messageBox("조회시작일자보다 큰 조회종료일자를 입력하십시요.","I");
  130. model.setFocus("ipt_fromyear");
  131. return;
  132. }
  133. }
  134. model.removeNodeset("/root/send/reqdata");
  135. model.makeNode("/root/send/reqdata");
  136. model.copyNode("/root/send/reqdata", "/root/main/cond");
  137. submit("TRSDT00601");
  138. //데이터가없을때 return
  139. if (model.instances(0).selectNodes("/root/main/reqcareinfo/reqcareinfolist").length == 0){
  140. return;
  141. }
  142. // 합계계산
  143. var insRow = grd_reqcareinfo.rows ;
  144. grd_reqcareinfo.addRow(insRow, false);
  145. grd_reqcareinfo.valueMatrix(insRow, grd_reqcareinfo.colRef("item")) = "합계";
  146. for(var i = grd_reqcareinfo.colRef("nursecnt") ; i <= grd_reqcareinfo.colRef("total") ; i++){
  147. var sSum = 0 ;
  148. //alert(grd_patvstinfolist.fixedRows);
  149. //alert( eval(grd_patvstinfolist.rows));
  150. for(var j = grd_reqcareinfo.fixedRows; j < eval(grd_reqcareinfo.rows -1 ) ; j++){
  151. sSum = sSum + eval(grd_reqcareinfo.valueMatrix(j, i));
  152. //alert(grd_patvstinfolist.valueMatrix(j, i));
  153. }
  154. //alert(grd_patvstinfolist.valueMatrix(j, i) + " : " + j + " : " + i);
  155. grd_reqcareinfo.valueMatrix(insRow, i) = sSum;
  156. }
  157. model.refresh();
  158. }
  159. /**========================================================================================================================================
  160. * 엑셀저장 버튼 클릭시
  161. =========================================================================================================================================*/
  162. function fExcel() {
  163. if (grd_reqcareinfo.rows <= 1) {
  164. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  165. return;
  166. }
  167. var fileName = window.fileDialog("save", ",", false, "의뢰종류별 영적돌봄의뢰현황", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  168. if (fileName != ""){
  169. grd_reqcareinfo.saveExcel(fileName, "SheetName", false, false, "", "", false);
  170. }
  171. }
  172. /**========================================================================================================================================
  173. * 월별원목업무총집계표 초기화
  174. =========================================================================================================================================*/
  175. function fInitialize()
  176. {
  177. // 그리드초기화
  178. model.removeNodeset("/root/main/reqcareinfo/reqcareinfolist");
  179. model.removeNodeset("/root/main/cond/endyy");
  180. model.removeNodeset("/root/main/cond/entryy");
  181. model.removeNodeset("/root/main/cond/fromyear");
  182. model.removeNodeset("/root/main/cond/toyear");
  183. model.removeNodeset(grd_reqcareinfo.nodeset);
  184. var currentDate = getCurrentDate();
  185. var currentYear = currentDate.substring(0, 4);
  186. model.makeValue("/root/main/cond/endyy" ,currentYear);
  187. model.makeValue("/root/main/cond/entryy" ,currentYear);
  188. model.makeValue("/root/main/cond/fromyear" ,currentYear);
  189. model.makeValue("/root/main/cond/toyear" ,currentYear);
  190. //cmb_conslrid.select(0);
  191. model.refresh();
  192. }
  193. /**========================================================================================================================================
  194. * 원목자 권한
  195. =========================================================================================================================================*/
  196. function fGetJobrespcd(){
  197. //사용자ID (입력자 또는 로그인한 사용자ID)
  198. var userid = getUserInfo("userid");
  199. model.setValue(cmb_conslrid.attribute("ref"), userid);
  200. model.refresh();
  201. var code = getUserInfo('jobrespcd');
  202. if(code == '1070' || code == '1020' || code =='1030'){
  203. cmb_conslrid.disabled = false;
  204. }else{
  205. cmb_conslrid.disabled = true;
  206. }
  207. }
  208. /**========================================================================================================================================
  209. * 조회조건 구분(원목자별,월별,분기별,년도별)
  210. =========================================================================================================================================*/
  211. function fSearchflag(){
  212. var searchflag = model.getValue("/root/main/cond/searchflag");
  213. var todd = model.getValue("/root/main/cond/toddg");
  214. var endyy = model.getValue("/root/main/cond/sendyy");
  215. var entryy = model.getValue("/root/main/cond/entryy");
  216. var fromyear = model.getValue("/root/main/cond/fromyear");
  217. var toyear = model.getValue("/root/main/cond/toyear");
  218. //var cap1 = model.getValue("/root/main/cond/cap1");
  219. //var cap2 = model.getValue("/root/main/cond/cap2");
  220. if(searchflag == '1'){ //월별
  221. ipt_endyy.visible = true;
  222. ipt_entryy.visible = false;
  223. ipt_fromyear.visible = false;
  224. ipt_toyear.visible = false;
  225. cap2.visible = false;
  226. model.refresh();
  227. }else if(searchflag == '2'){ //분기별
  228. ipt_endyy.visible = false;
  229. ipt_entryy.visible = true;
  230. ipt_fromyear.visible = false;
  231. ipt_toyear.visible = false;
  232. cap2.visible = false;
  233. model.refresh();
  234. }else if(searchflag == '3'){ //년도별
  235. ipt_endyy.visible = false;
  236. ipt_entryy.visible = false;
  237. ipt_fromyear.visible = true;
  238. ipt_toyear.visible = true;
  239. cap2.visible = true;
  240. model.refresh();
  241. }
  242. model.refresh();
  243. }
  244. ]]>
  245. </script>
  246. </xhtml:head>
  247. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  248. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  249. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:194px; height:14px; ">의뢰종류별 영적돌봄의뢰 현황</caption>
  250. </group>
  251. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  252. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  253. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  254. <caption>초기화</caption>
  255. <script type="javascript" ev:event="DOMActivate">
  256. <![CDATA[
  257. fInitialize();
  258. ]]>
  259. </script>
  260. </button>
  261. </group>
  262. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  263. <caption id="caption21" class="tit_2" style="left:0px; top:50px; width:196px; height:14px; ">의뢰종류별 영적돌봄의뢰 현황</caption>
  264. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:69px; "/>
  265. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  266. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  267. <button id="button2" class="btn1_letter2" navindex="3" style="left:1123px; top:7px; width:56px; height:22px; ">
  268. <caption>조회</caption>
  269. <script type="javascript" ev:event="DOMActivate">
  270. <![CDATA[
  271. fGetReqCareInfo();
  272. ]]>
  273. </script>
  274. </button>
  275. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  276. <input id="ipt_endyy" ref="/root/main/cond/endyy" maxlength="4" style="left:195px; top:8px; width:55px; height:19px; "/>
  277. <select1 id="rdo_flag" ref="/root/main/cond/searchflag" overflow="visible" appearance="full" cols="4" rows="1" style="left:15px; top:8px; width:175px; height:20px; border-style:none; ">
  278. <choices>
  279. <item>
  280. <label>월별</label>
  281. <value>1</value>
  282. </item>
  283. <item>
  284. <label>분기별</label>
  285. <value>2</value>
  286. </item>
  287. <item>
  288. <label>년도별</label>
  289. <value>3</value>
  290. </item>
  291. </choices>
  292. <script type="javascript" ev:event="xforms-value-changed">
  293. <![CDATA[
  294. fSearchflag();
  295. fGetReqCareInfo();
  296. ]]>
  297. </script>
  298. </select1>
  299. <input id="ipt_entryy" ref="/root/main/cond/entryy" maxlength="4" style="left:196px; top:8px; width:55px; height:19px; "/>
  300. <input id="ipt_fromyear" ref="/root/main/cond/fromyear" navindex="1" maxlength="4" style="left:195px; top:8px; width:55px; height:19px; "/>
  301. <input id="ipt_toyear" ref="/root/main/cond/toyear" navindex="2" maxlength="4" style="left:274px; top:8px; width:55px; height:19px; "/>
  302. <caption id="cap2" style="left:250px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
  303. </group>
  304. <datagrid id="grd_reqcareinfo" nodeset="/root/main/reqcareinfo/reqcareinfolist" autoresize="true" caption="구 분^간호정보지에 의한 의뢰(건)^타과의뢰(건)^기타의뢰(건)^총계(건)|구 분^간호정보지에 의한 의뢰(건)^타과의뢰(건)^기타의뢰(건)^총계(건)|구 분^간호정보지에 의한 의뢰(건)^타과의뢰(건)^기타의뢰(건)^총계(건)" colsep="^" colwidth="160, 160, 150, 150, 150" mergecellsfixedrows="byrowrec" rowsep="|" style="left:0px; top:73px; width:1195px; height:662px; ">
  305. <col ref="item" style="text-align:center; "/>
  306. <col ref="nursecnt" format="#,###" style="text-align:center; "/>
  307. <col ref="othercnt" format="#,###" style="text-align:center; "/>
  308. <col ref="fthcnt" format="#,###" style="text-align:center; "/>
  309. <col ref="total" format="#,###" style="text-align:center; "/>
  310. </datagrid>
  311. <button id="btn_excel" class="btn2_letter4" navindex="4" style="left:1125px; top:46px; width:64px; height:19px; ">
  312. <caption>엑셀저장</caption>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. fExcel();
  316. ]]>
  317. </script>
  318. </button>
  319. </group>
  320. </xhtml:body>
  321. </xhtml:html>