SMSDT07100_사회사업장기이식상담실적A.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT07100.사회사업장기이식상담실적.xrw
  4. * 설 명 : 사회사업장기이식상담실적
  5. * 작 성 자 : 임여원
  6. * 작 성 일 : 2008.11.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. <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="TRSDT07101" 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. ipt_fromentryy.visible=false;
  83. ipt_toentryy.visible=false;
  84. caption1.visible=true;
  85. caption2.visible=false;
  86. model.removeNodeset("/root/main/brgstincmexpspres");
  87. var CurrentDate=getCurrentDate();
  88. var CurrentDateYM=CurrentDate.substr(0,6);
  89. var LastDate=CurrentDate.toDate().getAddDate(-1,"M").getDateFormat();
  90. var LastDateYM=LastDate.substr(0,6);
  91. model.makeValue("/root/main/search/fromdd",LastDateYM);
  92. model.makeValue("/root/main/search/todd",LastDateYM);
  93. var CurrentDateYY=CurrentDate.substring(0,4);
  94. model.makeValue("/root/main/search/fromentryy",CurrentDateYY);
  95. model.makeValue("/root/main/search/toentryy",CurrentDateYY);
  96. model.refresh();
  97. }
  98. /**========================================================================================================================================
  99. * 조회
  100. =========================================================================================================================================*/
  101. function fReqBrgstIncmExpsCond()
  102. {
  103. model.removeNodeset("/root/send/reqdata");
  104. model.makeNode("/root/send/reqdata");
  105. var fdate=model.getValue("/root/main/search/fromdd");
  106. var todate=model.getValue("/root/main/search/todd");
  107. var reqflag=model.getValue("/root/main/search/reqflag");
  108. var fromentryy=model.getValue("/root/main/search/fromentryy");
  109. var toentryy=model.getValue("/root/main/search/toentryy");
  110. var fromdd=fdate.substr(4,2);
  111. var todd=todate.substr(4,2);
  112. var fromendyy=fdate.substr(0,4);
  113. var toendyy=todate.substr(0,4);
  114. //alert(todd.substring(6,2));
  115. model.makeValue("/root/send/reqdata/fromdd",fromdd);
  116. model.makeValue("/root/send/reqdata/todd",todd);
  117. model.makeValue("/root/send/reqdata/fromendyy",fromendyy);
  118. model.makeValue("/root/send/reqdata/toendyy",toendyy);
  119. model.makeValue("/root/send/reqdata/reqflag",reqflag);
  120. model.makeValue("/root/send/reqdata/fromentryy",fromentryy);
  121. model.makeValue("/root/send/reqdata/toentryy",toentryy);
  122. //alert(reqflag);
  123. if(reqflag=='1')
  124. {
  125. if(isNull(fromdd))
  126. {
  127. messageBox("조회시작일자는","I003");
  128. model.setFocus("ipt_fromdd");
  129. return;
  130. }
  131. if(isNull(todd))
  132. {
  133. messageBox("조회종료일자는","I003");
  134. model.setFocus("ipt_todd");
  135. return;
  136. }
  137. var dateintval=getDateInterval(fdate+"01",todate+"31");
  138. if(fdate>todate)
  139. {
  140. messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  141. model.setFocus("ipt_todd");
  142. return;
  143. }
  144. if(dateintval>"370")
  145. {
  146. messageBox("조회기간은 최대 1년까지 할 수 있습니다","I");
  147. model.setFocus("ipt_fromdd");
  148. return;
  149. }
  150. }
  151. else
  152. {
  153. if(isNull(fromentryy))
  154. {
  155. messageBox("조회시작연도는","I003");
  156. model.setFocus("ipt_fromentryy");
  157. return;
  158. }
  159. if(isNull(toentryy))
  160. {
  161. messageBox("조회종료연도는","I003");
  162. model.setFocus("ipt_toentryy");
  163. return;
  164. }
  165. var dateintval=getDateInterval(fromentryy+"0101",toentryy+"1231");
  166. if(fromentryy>toentryy)
  167. {
  168. messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  169. model.setFocus("ipt_todd");
  170. return;
  171. }
  172. if(dateintval>"1980")
  173. {
  174. messageBox("조회기간은 최대 5년까지 할 수 있습니다","I");
  175. model.setFocus("ipt_fromdd");
  176. return;
  177. }
  178. }
  179. // 조회종료일자와 조회시작일자사이의 길이, 월별일 때는 1년, 년도별 5년으로 제약
  180. //model.makeValue("");
  181. //model.makeValue("");
  182. //model.makeValue("");
  183. //model.copyNode("/root/send/reqdata","/root/main/search");
  184. submit("TRSDT07101");
  185. var idxRow=grd_brgstincmexpsprescond.rows;
  186. var fixRow=grd_brgstincmexpsprescond.fixedRows;
  187. var reqflag=model.getValue("/root/main/search/reqflag");
  188. for(i=1;i<=idxRow-fixRow;i++)
  189. {
  190. var cond=model.getValue("/root/main/brgstincmexpspres/brgstincmexpsprescond"+"["+i+"]/cond");
  191. if(cond=='전기간실적'&&i=='1')
  192. {
  193. //grd_brgstincmexpsprescond.removeRow(false);
  194. model.removeNodeset("/root/main/brgstincmexpspres/brgstincmexpsprescond");
  195. }
  196. else
  197. {
  198. if(reqflag=='1')
  199. {
  200. fGetBfResult();
  201. return;
  202. }
  203. }
  204. }
  205. model.refresh();
  206. }
  207. /**========================================================================================================================================
  208. * 전년실적
  209. =========================================================================================================================================*/
  210. function fGetBfResult(){
  211. if(grd_brgstincmexpsprescond.rows - grd_brgstincmexpsprescond.fixedRows >1){
  212. var sStat = 0;
  213. var insRow = grd_brgstincmexpsprescond.rows;
  214. grd_brgstincmexpsprescond.addRow(insRow, false);
  215. grd_brgstincmexpsprescond.valueMatrix(insRow, grd_brgstincmexpsprescond.colRef("cond") ) = "전기간대비실적비교";
  216. for(var i= grd_brgstincmexpsprescond.colRef("a1"); i<= grd_brgstincmexpsprescond.colRef("total4"); i++)
  217. {
  218. var bfResult = eval(grd_brgstincmexpsprescond.valueMatrix(insRow -1 , i));
  219. var sSum = eval(grd_brgstincmexpsprescond.valueMatrix(insRow-2, i));
  220. sStat = eval(sSum)- eval(bfResult) ;
  221. grd_brgstincmexpsprescond.valueMatrix(insRow, i ) = eval(sStat);
  222. }
  223. }else{
  224. model.removeNodeset("/root/main/brgstincmexpspres/brgstincmexpsprescond");
  225. }
  226. model.refresh();
  227. }
  228. /**========================================================================================================================================
  229. * 초기화
  230. =========================================================================================================================================*/
  231. function fResetBrgstIncmExps()
  232. {
  233. model.removeNodeset("/root/main/brgstincmexpspres");
  234. model.refresh();
  235. }
  236. /**========================================================================================================================================
  237. * 엑셀저장 버튼 클릭시
  238. =========================================================================================================================================*/
  239. function fExcel() {
  240. if (grd_brgstincmexpsprescond.rows <= 2) {
  241. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  242. return;
  243. }
  244. var fileName = window.fileDialog("save", ",", false, "장기이식상담실적", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  245. if (fileName != ""){
  246. grd_brgstincmexpsprescond.saveExcel(fileName, "SheetName", false, false, "", "", false);
  247. }
  248. }
  249. ]]>
  250. </script>
  251. </xhtml:head>
  252. <xhtml:body guideline="1,1195;1,1191;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  253. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  254. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">사회사업 장기이식상담실적</caption>
  255. </group>
  256. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  257. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  258. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  259. <caption>초기화</caption>
  260. <script type="javascript" ev:event="DOMActivate">
  261. <![CDATA[
  262. fResetBrgstIncmExps();
  263. ]]>
  264. </script>
  265. </button>
  266. </group>
  267. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  268. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:232px; height:14px; ">사회사업 장기이식상담실적</caption>
  269. <line id="line1" class="line_1" style="x1:0px; y1:73px; x2:1190px; y2:72px; "/>
  270. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  271. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  272. <button id="button2" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
  273. <caption>조회</caption>
  274. <script type="javascript" ev:event="DOMActivate">
  275. <![CDATA[
  276. fReqBrgstIncmExpsCond();
  277. ]]>
  278. </script>
  279. </button>
  280. <caption id="caption23" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
  281. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  282. <caption id="cap1" style="left:409px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
  283. <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; "/>
  284. <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; "/>
  285. <caption id="caption1" class="search_name" style="left:240px; top:10px; width:100px; height:17px; ">조회기간 :</caption>
  286. <select1 id="cmb_reqflag" ref="/root/main/search/reqflag" navindex="1" appearance="minimal" style="left:110px; top:10px; width:85px; height:19px; ">
  287. <choices>
  288. <item>
  289. <label>월별</label>
  290. <value>1</value>
  291. </item>
  292. <item>
  293. <label>년도별</label>
  294. <value>2</value>
  295. </item>
  296. </choices>
  297. <script type="javascript" ev:event="xforms-value-changed">
  298. <![CDATA[
  299. var CurrentDate=getCurrentDate();
  300. if(cmb_reqflag.value=='1')
  301. {
  302. ipt_fromdd.visible=true;
  303. ipt_todd.visible=true;
  304. ipt_fromentryy.visible=false;
  305. ipt_toentryy.visible=false;
  306. cap1.visible=true;
  307. caption1.visible=true;
  308. caption2.visible=false;
  309. //var CurrentDateYM=CurrentDate.substr(0,6);
  310. //var LastDateYM=CurrentDate.toDate().getAddDate(-1,"M").getDateFormat();
  311. //model.makeValue("/root/main/search/fromdd",LastDateYM);
  312. //model.makeValue("/root/main/search/todd",LastDateYM);
  313. model.removeNodeset("/root/send/reqdata/entryy");
  314. }
  315. else
  316. {
  317. ipt_fromdd.visible=false;
  318. ipt_todd.visible=false;
  319. ipt_fromentryy.visible=true;
  320. ipt_toentryy.visible=true;
  321. cap1.visible=true;
  322. caption1.visible=false;
  323. caption2.visible=true;
  324. model.removeNodeset("/root/send/reqdata/fromdd");
  325. model.removeNodeset("/root/send/reqdata/todd");
  326. //model.removeNodeset("");
  327. }
  328. model.removeNodeset("/root/send/reqdata");
  329. model.makeNode("/root/send/reqdata");
  330. fReqBrgstIncmExpsCond(); //조회함수
  331. model.refresh();
  332. ]]>
  333. </script>
  334. </select1>
  335. <input id="ipt_fromentryy" ref="/root/main/search/fromentryy" class="input_search" navindex="2" inputtype="date" format="yyyy" style="left:347px; top:8px; width:58px; height:19px; "/>
  336. <caption id="caption2" class="search_name" style="left:239px; top:10px; width:100px; height:17px; ">조회년도:</caption>
  337. <input id="ipt_toentryy" ref="/root/main/search/toentryy" class="input_search" navindex="2" inputtype="date" format="yyyy" style="left:439px; top:8px; width:58px; height:19px; "/>
  338. </group>
  339. <button id="btn_excel" class="btn2_letter4" style="left:1126px; top:50px; width:64px; height:19px; ">
  340. <caption>엑셀저장</caption>
  341. <script type="javascript" ev:event="DOMActivate">
  342. <![CDATA[
  343. fExcel();
  344. ]]>
  345. </script>
  346. </button>
  347. <datagrid id="grd_brgstincmexpsprescond" nodeset="/root/main/brgstincmexpspres/brgstincmexpsprescond" class="datagrid2" caption="구분^적격^적격^적격^적격^부적격^부적격^부적격^부적격^기타^기타^기타^기타^총계^총계^총계^총계^장소^장소명^장소^담당자|구분^혈연^비혈연^대상자미선정^합계^혈연^비혈연^대상자미선정^합계^혈연^비혈연^대상자미선정^합계^혈연^비혈연^대상자미선정^합계^장소^장소명^장소^담당자" colsep="^" colwidth="147, 60, 60, 80, 60, 60, 60, 80, 60, 60, 60, 80, 60, 60, 60, 80, 60" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:1px; top:76px; width:1190px; height:664px; ">
  348. <col ref="cond" style="text-align:center; "/>
  349. <col ref="a1" style="text-align:center; "/>
  350. <col ref="a2" style="text-align:center; "/>
  351. <col ref="a3" style="text-align:center; "/>
  352. <col ref="atotal" style="text-align:center; "/>
  353. <col ref="b1" style="text-align:center; "/>
  354. <col ref="b2" style="text-align:center; "/>
  355. <col ref="b3" style="text-align:center; "/>
  356. <col ref="btotal" style="text-align:center; "/>
  357. <col ref="c1" style="text-align:center; "/>
  358. <col ref="c2" style="text-align:center; "/>
  359. <col ref="c3" style="text-align:center; "/>
  360. <col ref="ctotal" style="text-align:center; "/>
  361. <col ref="total1" style="text-align:center; "/>
  362. <col ref="total2" style="text-align:center; "/>
  363. <col ref="total3" style="text-align:center; "/>
  364. <col ref="total4" style="text-align:center; "/>
  365. </datagrid>
  366. </group>
  367. </xhtml:body>
  368. </xhtml:html>