SMSDT04000_사회사업협의뢰및회신실적.xrw 14 KB

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