SMSDT07300_사회사업연구및교육실적.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT07300.사회사업연구및교육실적.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. <b02cnt/>
  22. <b02/>
  23. <b06cnt/>
  24. <b06/>
  25. <a05cnt/>
  26. <a05/>
  27. <a06cnt/>
  28. <a06/>
  29. <a04cnt/>
  30. <a04/>
  31. <a02cnt/>
  32. <a02/>
  33. <a03cnt/>
  34. <a03/>
  35. <cnttotal/>
  36. <amttotal/>
  37. <lstachivcnt/>
  38. <lstachivamt/>
  39. <lstachivcntcomp/>
  40. <lstachivamtcomp/>
  41. </brgstincmexpsprescond>
  42. </brgstincmexpspres>
  43. <search>
  44. <reqflag>1</reqflag>
  45. <fromdd/>
  46. <todd/>
  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. <submission id="TRSDT07301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/brgstincmexpspres"/>
  71. <bind id="lstachivcntcomp" ref="/root/main/brgstincmexpspres/brgstincmexpsprescond/lstachivcntcomp" calculate="../cnttotal - ../lstachivcnt"/>
  72. <bind id="lstachivamtcomp" ref="/root/main/brgstincmexpspres/brgstincmexpsprescond/lstachivamtcomp" calculate="../amttotal - ../lstachivamt"/>
  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. grd_brgstincmexpsprescond.colHidden(17)=true;
  91. grd_brgstincmexpsprescond.colHidden(18)=true;
  92. grd_brgstincmexpsprescond.colHidden(19)=true;
  93. grd_brgstincmexpsprescond.colHidden(20)=true;
  94. //grd_brgstincmexpsprescond.colWidth(15)=150;
  95. //grd_brgstincmexpsprescond.colHidden(21)=true;
  96. //grd_brgstincmexpsprescond.colHidden(22)=true;
  97. //grd_brgstincmexpsprescond.visible=true;
  98. //grd_brgstincmexpsprescond2.visible=false;
  99. model.refresh();
  100. }
  101. /**========================================================================================================================================
  102. * 조회
  103. =========================================================================================================================================*/
  104. function fReqBrgstIncmExpsCond()
  105. {
  106. model.removeNodeset("/root/send/reqdata");
  107. model.makeNode("/root/send/reqdata");
  108. var fromdd=model.getValue("/root/main/search/fromdd");
  109. var todd=model.getValue("/root/main/search/todd");
  110. var reqflag=model.getValue("/root/main/search/reqflag");
  111. //var fromdd=fdate.substr(4,2);
  112. //var todd=todate.substr(4,2);
  113. //var fromendyy=fdate.substr(0,4);
  114. //var toendyy=todate.substr(0,4);
  115. //alert(todd.substring(6,2));
  116. model.makeValue("/root/send/reqdata/fromdd",fromdd);
  117. model.makeValue("/root/send/reqdata/todd",todd);
  118. model.makeValue("/root/send/reqdata/reqflag",reqflag);
  119. if(isNull(fromdd))
  120. {
  121. messageBox("조회시작일자는","I003");
  122. model.setFocus("ipt_fromdd");
  123. return;
  124. }
  125. if(isNull(todd))
  126. {
  127. messageBox("조회종료일자는","I003");
  128. model.setFocus("ipt_todd");
  129. return;
  130. }
  131. var dateintval=getDateInterval(fromdd+"01",todd+"31");
  132. if(fromdd>todd)
  133. {
  134. messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  135. model.setFocus("ipt_todd");
  136. return;
  137. }
  138. if(dateintval>"370")
  139. {
  140. messageBox("조회기간은 최대 1년까지 할 수 있습니다","I");
  141. model.setFocus("ipt_fromdd");
  142. return;
  143. }
  144. submit("TRSDT07301");
  145. var idxRow=grd_brgstincmexpsprescond.rows;
  146. var fixRow=grd_brgstincmexpsprescond.fixedRows;
  147. var reqflag=model.getValue("/root/main/search/reqflag");
  148. for(i=1;i<=idxRow-fixRow;i++)
  149. {
  150. var cond=model.getValue("/root/main/brgstincmexpspres/brgstincmexpsprescond"+"["+i+"]/cond");
  151. if(cond=='전기간실적'&&i=='1')
  152. {
  153. //grd_brgstincmexpsprescond.removeRow(false);
  154. model.removeNodeset("/root/main/brgstincmexpspres/brgstincmexpsprescond");
  155. }
  156. else
  157. {
  158. if(reqflag=='2')
  159. {
  160. fGetBfResult();
  161. return;
  162. }
  163. }
  164. }
  165. model.refresh();
  166. }
  167. /**========================================================================================================================================
  168. * 전년실적
  169. =========================================================================================================================================*/
  170. function fGetBfResult(){
  171. if(grd_brgstincmexpsprescond.rows - grd_brgstincmexpsprescond.fixedRows >1){
  172. var sStat = 0;
  173. var insRow = grd_brgstincmexpsprescond.rows;
  174. grd_brgstincmexpsprescond.addRow(insRow, false);
  175. grd_brgstincmexpsprescond.valueMatrix(insRow, grd_brgstincmexpsprescond.colRef("cond") ) = "전기간대비실적비교";
  176. for(var i= grd_brgstincmexpsprescond.colRef("b02cnt"); i<= grd_brgstincmexpsprescond.colRef("amttotal"); i++)
  177. {
  178. var bfResult = eval(grd_brgstincmexpsprescond.valueMatrix(insRow -1 , i));
  179. var sSum = eval(grd_brgstincmexpsprescond.valueMatrix(insRow-2, i));
  180. sStat = eval(sSum)- eval(bfResult) ;
  181. grd_brgstincmexpsprescond.valueMatrix(insRow, i ) = eval(sStat);
  182. //alert("sSum "+ sSum +"bfResult " + bfResult + "sStat " + sStat);
  183. }
  184. grd_brgstincmexpsprescond.valueMatrix(insRow-1, grd_brgstincmexpsprescond.colRef("lstachivcnt")) = "";
  185. grd_brgstincmexpsprescond.valueMatrix(insRow-1, grd_brgstincmexpsprescond.colRef("lstachivcntcomp")) = "";
  186. grd_brgstincmexpsprescond.valueMatrix(insRow, grd_brgstincmexpsprescond.colRef("lstachivcntcomp")) = "";
  187. grd_brgstincmexpsprescond.valueMatrix(insRow-1, grd_brgstincmexpsprescond.colRef("lstachivamt")) = "";
  188. grd_brgstincmexpsprescond.valueMatrix(insRow-1, grd_brgstincmexpsprescond.colRef("lstachivamtcomp")) = "";
  189. grd_brgstincmexpsprescond.valueMatrix(insRow, grd_brgstincmexpsprescond.colRef("lstachivamtcomp")) = "";
  190. }else{
  191. model.removeNodeset("/root/main/brgstincmexpspres/brgstincmexpsprescond");
  192. }
  193. model.refresh();
  194. }
  195. /**========================================================================================================================================
  196. * 초기화
  197. =========================================================================================================================================*/
  198. function fResetBrgstIncmExps()
  199. {
  200. model.removeNodeset("/root/main/brgstincmexpspres");
  201. model.refresh();
  202. }
  203. /**========================================================================================================================================
  204. * 엑셀저장 버튼 클릭시
  205. =========================================================================================================================================*/
  206. function fExcel() {
  207. if (grd_brgstincmexpsprescond.rows <= 2) {
  208. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  209. return;
  210. }
  211. var fileName = window.fileDialog("save", ",", false, "사회사업연구및교육실적", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  212. if (fileName != ""){
  213. grd_brgstincmexpsprescond.saveExcel(fileName, "SheetName", false, false, "", "", false);
  214. }
  215. }
  216. ]]>
  217. </script>
  218. </xhtml:head>
  219. <xhtml:body guideline="1,1195;1,1191;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  220. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  221. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">사회사업 연구및교육실적</caption>
  222. </group>
  223. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  224. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  225. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  226. <caption>초기화</caption>
  227. <script type="javascript" ev:event="DOMActivate">
  228. <![CDATA[
  229. fResetBrgstIncmExps();
  230. ]]>
  231. </script>
  232. </button>
  233. </group>
  234. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  235. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:232px; height:14px; ">사회사업 연구및교육실적</caption>
  236. <line id="line1" class="line_1" style="x1:0px; y1:73px; x2:1190px; y2:72px; "/>
  237. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  238. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  239. <button id="button2" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
  240. <caption>조회</caption>
  241. <script type="javascript" ev:event="DOMActivate">
  242. <![CDATA[
  243. fReqBrgstIncmExpsCond();
  244. ]]>
  245. </script>
  246. </button>
  247. <caption id="caption23" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
  248. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  249. <caption id="cap1" style="left:409px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
  250. <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; "/>
  251. <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; "/>
  252. <caption id="caption1" class="search_name" style="left:240px; top:10px; width:100px; height:17px; ">조회기간 :</caption>
  253. <select1 id="cmb_reqflag" ref="/root/main/search/reqflag" navindex="1" appearance="minimal" style="left:110px; top:10px; width:85px; height:19px; ">
  254. <choices>
  255. <item>
  256. <label>업무분야별</label>
  257. <value>1</value>
  258. </item>
  259. <item>
  260. <label>월별</label>
  261. <value>2</value>
  262. </item>
  263. </choices>
  264. <script type="javascript" ev:event="xforms-value-changed">
  265. <![CDATA[
  266. model.removeNodeset("/root/send/reqdata");
  267. model.makeNode("/root/send/reqdata");
  268. if(cmb_reqflag.value=='1')
  269. {
  270. //grd_brgstincmexpsprescond.colWidth(1)=150;
  271. grd_brgstincmexpsprescond.colHidden(17)=true;
  272. grd_brgstincmexpsprescond.colHidden(18)=true;
  273. grd_brgstincmexpsprescond.colHidden(19)=true;
  274. grd_brgstincmexpsprescond.colHidden(20)=true;
  275. //grd_brgstincmexpsprescond.colWidth(15)=100;
  276. }
  277. else
  278. {
  279. //grd_brgstincmexpsprescond.colWidth(15)=46;
  280. grd_brgstincmexpsprescond.colHidden(17)=false;
  281. grd_brgstincmexpsprescond.colHidden(18)=false;
  282. grd_brgstincmexpsprescond.colHidden(19)=false;
  283. grd_brgstincmexpsprescond.colHidden(20)=false;
  284. }
  285. model.refresh();
  286. fReqBrgstIncmExpsCond(); //조회함수
  287. ]]>
  288. </script>
  289. </select1>
  290. </group>
  291. <button id="btn_excel" class="btn2_letter4" style="left:1126px; top:50px; width:64px; height:19px; ">
  292. <caption>엑셀저장</caption>
  293. <script type="javascript" ev:event="DOMActivate">
  294. <![CDATA[
  295. fExcel();
  296. ]]>
  297. </script>
  298. </button>
  299. <datagrid id="grd_brgstincmexpsprescond" bind="bind_grd_brgstincmexpsprescond" nodeset="/root/main/brgstincmexpspres/brgstincmexpsprescond" class="datagrid2" caption="구분^사회사업사례집담회^사회사업사례집담회^사회사업연구조사활동^사회사업연구조사활동^사회사업실습교육^사회사업실습교육^사회사업수련교육^사회사업수련교육^사회사업자체교육^사회사업자체교육^사회사업원내교육^사회사업원내교육^사회사업원외교육^사회사업원외교육^연구및교육합계^연구및교육합계^전월실적^전월실적^전월대비실적비교^전월대비실적비교^장소^장소명^장소^담당자|구분^횟수^인원^횟수^인원^횟수^인원^횟수^인원^횟수^인원^횟수^인원^횟수^인원^횟수^인원^횟수^인원^횟수^인원^장소^장소명^장소^담당자" colsep="^" colwidth="132, 58, 58, 63, 63, 52, 53, 52, 52, 52, 52, 52, 52, 52, 52, 46, 46, 47, 47, 53, 53" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:76px; width:1190px; height:664px; ">
  300. <col ref="cond" style="text-align:center; "/>
  301. <col ref="b02cnt" style="text-align:center; "/>
  302. <col ref="b02" style="text-align:center; "/>
  303. <col ref="b06cnt" style="text-align:center; "/>
  304. <col ref="b06" style="text-align:center; "/>
  305. <col ref="a05cnt" style="text-align:center; "/>
  306. <col ref="a05" style="text-align:center; "/>
  307. <col ref="a06cnt" style="text-align:center; "/>
  308. <col ref="a06" style="text-align:center; "/>
  309. <col ref="a04cnt" style="text-align:center; "/>
  310. <col ref="a04" style="text-align:center; "/>
  311. <col ref="a02cnt" style="text-align:center; "/>
  312. <col ref="a02" style="text-align:center; "/>
  313. <col ref="a03cnt" style="text-align:center; "/>
  314. <col ref="a03" style="text-align:center; "/>
  315. <col ref="cnttotal" style="text-align:center; "/>
  316. <col ref="amttotal" style="text-align:center; "/>
  317. <col ref="lstachivcnt" style="text-align:center; "/>
  318. <col ref="lstachivamt" style="text-align:center; "/>
  319. <col ref="lstachivcntcomp" style="text-align:center; "/>
  320. <col ref="lstachivamtcomp" style="text-align:center; "/>
  321. </datagrid>
  322. </group>
  323. </xhtml:body>
  324. </xhtml:html>