SMSDT07200_사회사업장기이식상담실적B.xrw 16 KB

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