SMSDT02000_사회사업상담관리실적.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT02000.사회사업 상담 관리 실적.xrw
  4. * 설 명 : 사회사업 상담 관리 실적
  5. * 작 성 자 : 황혜민
  6. * 작 성 일 : 2008.09.02
  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. <cond/>
  21. <soclpsy/>
  22. <socleco/>
  23. <soclio/>
  24. <soclloc/>
  25. <soclret/>
  26. <socletc/>
  27. <soclssum/>
  28. <soclper/>
  29. <soclfam/>
  30. <soclgcon/>
  31. <soclgedu/>
  32. <socltel/>
  33. <soclvst/>
  34. <soclcur/>
  35. <soclhom/>
  36. <soclclin/>
  37. <soclesum/>
  38. <soclsum/>
  39. <bfcnt/>
  40. <bfcompare/>
  41. </cnstlist>
  42. </cnstinfo>
  43. </main>
  44. <send>
  45. <reqdata>
  46. <fromdd/>
  47. <todd/>
  48. <sumflag>1</sumflag>
  49. </reqdata>
  50. </send>
  51. <init/>
  52. <hidden/>
  53. </root>
  54. </instance>
  55. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  61. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  62. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  63. <script type="javascript" ev:event="xforms-ready">
  64. <![CDATA[
  65. fInit();
  66. ]]>
  67. </script>
  68. <submission id="TRSDT06001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/cnstinfo"/>
  69. <bind id="bfcompare" ref="/root/main/cnstinfo/cnstlist/bfcompare" calculate="../soclsum - ../bfcnt"/>
  70. </model>
  71. <script type="javascript">
  72. <![CDATA[
  73. /**========================================================================================================================================
  74. * 조회기간 그리드초기화
  75. =========================================================================================================================================*/
  76. function fInit(){
  77. var currentDate = getCurrentDate();
  78. var LastDate=currentDate.toDate().getAddDate(-1,"M").getDateFormat();
  79. var LastDateYM=LastDate.substr(0,6);
  80. model.setValue("/root/send/reqdata/fromdd", LastDateYM );
  81. model.setValue("/root/send/reqdata/todd" , LastDateYM );
  82. // 그리드초기화
  83. model.removeNodeset("/root/main/cnstinfo/cnstlist");
  84. model.refresh();
  85. }
  86. /**========================================================================================================================================
  87. * 조회
  88. =========================================================================================================================================*/
  89. function fDefaultCheck(){
  90. var fromdd = model.getValue("/root/send/reqdata/fromdd") +"01";
  91. var todd = model.getValue("/root/send/reqdata/todd")+ "01";
  92. if( isNull(fromdd) == true || isNull(todd) == true){
  93. model.removeNodeset("/root/main/cnstinfo/cnstlist");
  94. model.refresh();
  95. messageBox("조회기간을", "C001");
  96. model.setFocus("ipt_fromdd");
  97. return false;
  98. }
  99. // dataHelper 함수 isValidDateTime
  100. if( !isValidDateTime(fromdd, 'YYYYMMDD') || !isValidDateTime(todd, 'YYYYMMDD')){
  101. model.removeNodeset("/root/main/cnstinfo/cnstlist");
  102. model.refresh();
  103. messageBox("입력하신 일이 정확한 날짜타입이 아닙니다.", "E999", "");
  104. model.setFocus("ipt_fromdd");
  105. return false;
  106. }
  107. if(fromdd>todd)
  108. {
  109. model.removeNodeset("/root/main/cnstinfo/cnstlist");
  110. model.refresh();
  111. messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  112. model.setFocus("ipt_todd");
  113. return;
  114. }
  115. var dateintval=getDateInterval(fromdd,todd);
  116. //alert(dateintval);
  117. if(dateintval>=365)
  118. {
  119. model.removeNodeset("/root/main/cnstinfo/cnstlist");
  120. model.refresh();
  121. messageBox("조회기간은 최대1년까지 할 수 있습니다.","I");
  122. model.setFocus("ipt_fromdd");
  123. return false;
  124. }
  125. else
  126. {
  127. return true;
  128. }
  129. }
  130. /**========================================================================================================================================
  131. *-- 조회 (STS.SDTSCNST)
  132. =========================================================================================================================================*/
  133. function fAllSearch(){
  134. //model.resetInstanceNode("/root/main/cnstinfo/cnstlist");
  135. model.removeNodeset("/root/main/cnstinfo/cnstlist");
  136. var val = model.getValue("/root/send/reqdata/sumflag");
  137. switch(val){
  138. // 월별
  139. case("1"):
  140. fDisableGrd(false);
  141. fSearch();
  142. //fGetBfResult();
  143. break;
  144. // 임상과
  145. case("3"):
  146. fDisableGrd(true);
  147. fSearch();
  148. break;
  149. // 업무분야별
  150. case("2"):
  151. fDisableGrd(true);
  152. fSearch();
  153. break;
  154. }
  155. }
  156. function fSearch(){
  157. //alert(fDefaultCheck());
  158. if(!fDefaultCheck()) return;
  159. if(submit("TRSDT06001") == true){
  160. }else{
  161. messageBox("조회를", "E009");
  162. }
  163. var val = model.getValue("/root/send/reqdata/sumflag");
  164. if(val=='1')
  165. {
  166. fGetBfResult(); //월별로 조회했을 때 전년도 합계 구하는 함수
  167. }
  168. }
  169. /**========================================================================================================================================
  170. * 조회구분 변경했을때
  171. =========================================================================================================================================*/
  172. function fDisableGrd(flag){
  173. grd_cnst.colHidden(19) = flag;
  174. grd_cnst.colHidden(20) = flag;
  175. }
  176. function fCmbChange(){
  177. //model.resetInstanceNode("/root/main/cnstinfo/cnstlist");
  178. // model.removeNodeset("/root/main/cnstinfo/cnstlist");
  179. // model.refresh();
  180. fAllSearch();
  181. // var val = model.getValue("/root/send/reqdata/sumflag");
  182. //
  183. // switch(val){
  184. // // 월별
  185. // case("1"):
  186. // fDisableGrd(false);
  187. // fSearch();
  188. // fGetBfResult();
  189. // break;
  190. // // 임상과
  191. // case("3"):
  192. // fDisableGrd(true);
  193. // fSearch();
  194. // break;
  195. // // 업무분야별
  196. // case("2"):
  197. // fDisableGrd(true);
  198. // fSearch();
  199. // break;
  200. // }
  201. }
  202. /*
  203. * 전월대비 실적비교 합계-전월실적
  204. ===========================================*/
  205. function fGetBfResult(){
  206. //if(!fDefaultCheck()) return; // 조건에 만족하지 않을 때는 함수 타지 않게 수정
  207. if(grd_cnst.rows - grd_cnst.fixedRows >1){
  208. var sStat = 0;
  209. var insRow = grd_cnst.rows;
  210. grd_cnst.addRow(insRow, false);
  211. grd_cnst.valueMatrix(insRow, grd_cnst.colRef("cond") ) = "전기간대비실적비교";
  212. for(var i= grd_cnst.colRef("soclpsy"); i<= grd_cnst.colRef("soclsum"); i++){
  213. var bfResult = eval(grd_cnst.valueMatrix(insRow -1 , i));
  214. var sSum = eval(grd_cnst.valueMatrix(insRow-2, i));
  215. sStat = eval(sSum)- eval(bfResult) ;
  216. grd_cnst.valueMatrix(insRow, i ) = eval(sStat);
  217. //alert("sSum "+ sSum +"bfResult " + bfResult + "sStat " + sStat);
  218. }
  219. grd_cnst.valueMatrix(insRow-1, grd_cnst.colRef("bfcnt")) = "";
  220. grd_cnst.valueMatrix(insRow-1, grd_cnst.colRef("bfcompare")) = "";
  221. grd_cnst.valueMatrix(insRow, grd_cnst.colRef("bfcompare")) = "";
  222. }else{
  223. model.removeNodeset("/root/main/cnstinfo/cnstlist");
  224. }
  225. model.refresh();
  226. }
  227. /**========================================================================================================================================
  228. * 엑셀저장 버튼 클릭시
  229. =========================================================================================================================================*/
  230. function fExcel() {
  231. if (grd_cnst.rows <= 1) {
  232. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  233. return;
  234. }
  235. var fileName = window.fileDialog("save", ",", false, "사회사업상담관리실적", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  236. if (fileName != ""){
  237. grd_cnst.saveExcel(fileName, "SheetName", false, false, "", "", false);
  238. }
  239. }
  240. ]]>
  241. </script>
  242. </xhtml:head>
  243. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  244. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  245. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:224px; height:14px; ">사회사업상담관리실적</caption>
  246. </group>
  247. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  248. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  249. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  250. <caption>초기화</caption>
  251. <script type="javascript" ev:event="DOMActivate">
  252. <![CDATA[
  253. fInit();
  254. ]]>
  255. </script>
  256. </button>
  257. </group>
  258. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  259. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:195px; height:13px; ">사회사업상담관리실적</caption>
  260. <line id="line1" class="line_1" style="x1:0px; y1:74px; x2:1190px; y2:73px; "/>
  261. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  262. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  263. <button id="button2" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  264. <caption>조회</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. //fCmbChange();
  268. fAllSearch();
  269. ]]>
  270. </script>
  271. </button>
  272. <caption id="caption23" class="search_name" style="left:25px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
  273. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  274. <select1 id="cmb_sumflaga2" ref="/root/send/reqdata/sumflag" appearance="minimal" style="left:125px; top:10px; width:100px; height:19px; ">
  275. <choices>
  276. <item>
  277. <label>월별</label>
  278. <value>1</value>
  279. </item>
  280. <item>
  281. <label>임상과별</label>
  282. <value>3</value>
  283. </item>
  284. <item>
  285. <label>업무분야별</label>
  286. <value>2</value>
  287. </item>
  288. </choices>
  289. <script type="javascript" ev:event="xforms-select">
  290. <![CDATA[
  291. fCmbChange();
  292. ]]>
  293. </script>
  294. </select1>
  295. <caption id="cap1" style="left:455px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
  296. <input id="ipt_fromdd" ref="/root/send/reqdata/fromdd" class="input_search" inputtype="date" format="yyyy-mm" style="left:357px; top:8px; width:100px; height:19px; "/>
  297. <input id="ipt_todd" ref="/root/send/reqdata/todd" class="input_search" inputtype="date" format="yyyy-mm" style="left:480px; top:8px; width:100px; height:19px; "/>
  298. <caption id="caption1" class="search_name" style="left:265px; top:10px; width:100px; height:17px; ">조회기간 :</caption>
  299. </group>
  300. <button id="btn_excel" class="btn2_letter4" style="left:1130px; top:51px; width:64px; height:19px; ">
  301. <caption>엑셀저장</caption>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. fExcel();
  305. ]]>
  306. </script>
  307. </button>
  308. <datagrid id="grd_cnst" nodeset="/root/main/cnstinfo/cnstlist" class="datagrid2" caption="구분^사회사업&#xA;심리사회적&#xA;문제^사회사업&#xA;경제적&#xA;문제^사회사업&#xA;입퇴원계획&#xA;문제^사회사업&#xA;지역사회자원&#xA;연결문제^사회사업&#xA;사회복귀및&#xA;재활문제^사회사업&#xA;기타문제^소계^사회사업&#xA;개별상담^사회사업&#xA;가족상담^사회사업&#xA;집단상담^사회사업&#xA;집단교육^전화&#xA;상담^사회사업&#xA;병실방문^사회사업&#xA;치료적&#xA;협의^가정&#xA;방문^사회사업&#xA;임상기록^소계^합계^전월실적^전월대비&#xA;실적비교^caption3^caption4^caption5^caption6^caption7^caption8^사회사업&#xA;가족상담^사회사업&#xA;집단상담^사회사업&#xA;집단상담^사회사업&#xA;집단교육^전화상담^사회사업&#xA;병실방문^사회사업&#xA;치료적&#xA;협의^사회사업&#xA;임상기록^소계^합계|구분^사회사업&#xA;심리사회적&#xA;문제^사회사업&#xA;경제적&#xA;문제^사회사업&#xA;입퇴원계획&#xA;문제^사회사업&#xA;지역사회자원&#xA;연결문제^사회사업&#xA;사회복귀및&#xA;재활문제^사회사업&#xA;기타문제^소계^사회사업&#xA;개별상담^사회사업&#xA;가족상담^사회사업&#xA;집단상담^사회사업&#xA;집단교육^전화&#xA;상담^사회사업&#xA;병실방문^사회사업&#xA;치료적&#xA;협의^가정&#xA;방문^사회사업&#xA;임상기록^소계^합계^전월실적^전월대비&#xA;실적비교^caption2^caption3^caption4^caption5^caption6^caption7^caption8^사회사업&#xA;집단상담^사회사업&#xA;집단교육^전화상담^사회사업&#xA;병실방문^사회사업&#xA;치료적&#xA;협의^사회사업&#xA;임상기록^소계^합계" colsep="^" colwidth="120, 68, 58, 69, 80, 69, 58, 52, 56, 55, 57, 55, 45, 55, 54, 41, 56, 50, 50, 55, 55" dataheight="25" frozencols="8" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:1px; top:76px; width:1190px; height:664px; ">
  309. <col ref="cond" format="yyyy-mm" style="text-align:center; "/>
  310. <col ref="soclpsy" style="text-align:center; "/>
  311. <col ref="socleco" style="text-align:center; "/>
  312. <col ref="soclio" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  313. <col ref="soclloc" style="text-align:center; "/>
  314. <col ref="soclret" format="yyyy-mm-dd" style="text-align:center; "/>
  315. <col ref="socletc" style="text-align:center; "/>
  316. <col ref="soclssum" style="text-align:center; "/>
  317. <col ref="soclper" style="text-align:center; "/>
  318. <col ref="soclfam" style="text-align:center; "/>
  319. <col ref="soclgcon" style="text-align:center; "/>
  320. <col ref="soclgedu" style="text-align:center; "/>
  321. <col ref="socltel" style="text-align:center; "/>
  322. <col ref="soclvst" style="text-align:center; "/>
  323. <col ref="soclcur" style="text-align:center; "/>
  324. <col ref="soclhom" style="text-align:center; "/>
  325. <col ref="soclclin" style="text-align:center; "/>
  326. <col ref="soclesum" style="text-align:center; "/>
  327. <col ref="soclsum" style="text-align:center; "/>
  328. <col ref="bfcnt" style="text-align:center; "/>
  329. <col ref="bfcompare" style="text-align:center; "/>
  330. </datagrid>
  331. </group>
  332. </xhtml:body>
  333. </xhtml:html>