SMSDT03000_사회사업협의진료실적.xrw 14 KB

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