SPCRC00500_휴일관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * Name : SPCRC00500_휴일관리.xrw
  4. * Summary : 휴일 관리 및 검색
  5. * Programmer : 조영민
  6. * Date Written : 2009.02.04
  7. * History : 2009.02.04
  8. * Remark :
  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. <holiattr>
  19. <holidd/>
  20. <dept/>
  21. <deptnm/>
  22. <holinm/>
  23. <savemode/>
  24. <rgstr/>
  25. <rgstdd/>
  26. <usernm/>
  27. <rgstno/>
  28. </holiattr>
  29. <holiList>
  30. <no/>
  31. <rgstdd/>
  32. <Rgstr/>
  33. <holidd/>
  34. <rgstrdept/>
  35. <holinm/>
  36. <rgstrdeptcd/>
  37. </holiList>
  38. </main>
  39. <send>
  40. <holiattr>
  41. </holiattr>
  42. <srch>
  43. <holifromdd/>
  44. <holitodd/>
  45. <dept/>
  46. <rgstdd/>
  47. <rgstr/>
  48. <deptnm/>
  49. <usernm/>
  50. </srch>
  51. <holilist/>
  52. </send>
  53. <init/>
  54. </root>
  55. </instance>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. model.removenodeset("/root/main/holilist"); // SMS 템플릿 리스트
  59. model.setValue("/root/main/holiattr/savemode","I"); //저장모드 초기화
  60. grd_holiList.clearStatus();
  61. var dutplcenm = getUserInfo("dutplcenm");
  62. var dutplcecd = getUserInfo("dutplcecd");
  63. model.setValue("/root/main/holiattr/dept", dutplcecd);
  64. model.setValue("/root/main/holiattr/deptnm", dutplcenm);
  65. var usernm = getUserInfo("usernm");
  66. model.setValue("/root/main/holiattr/usernm", usernm);
  67. model.refresh();
  68. ]]>
  69. </script>
  70. <submission id="TXCRC00501" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" ref="/root/send/holiattr" replace="instance"/>
  71. <submission id="TXCRC00502" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" ref="/root/send/holilist" replace="instance"/>
  72. <submission id="TRCRC00501" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" ref="/root/send/srch" replace="instance" resultref="/root/main/holiList"/>
  73. <script type="javascript">
  74. <![CDATA[
  75. // 각 컴포넌트 초기화
  76. function fInitHoli(){
  77. var savemode = model.getValue("/root/main/holiattr/savemode");
  78. if(savemode == "I"){
  79. model.setValue("/root/main/holiattr/holidd","");
  80. model.setValue("/root/main/holiattr/holinm","");
  81. model.refresh();
  82. }else if(savemode == "U"){
  83. fGetHoliAttr();
  84. }
  85. }
  86. //저장버튼 클릭시 이벤트 발생 저장모드 I, 수정모드 U
  87. function fSaveHoli(){
  88. var savemode = model.getValue("/root/main/holiattr/savemode");
  89. if(savemode == "I"){
  90. //fSaveGridStatus(grd_holiList); //삭제
  91. var holiDD = model.getValue("/root/main/holiattr/holidd"); //컴포넌트의 값을 받아 저장
  92. var holiNm = model.getValue("/root/main/holiattr/holinm"); //상동
  93. if(holiNm == ""){ //값이 없을시 에러 메시지발생
  94. messageBox("휴일 일명을 ", "I007");
  95. }
  96. else if(holiDD == ""){
  97. messageBox("휴일 일자를 ", "I007");
  98. }else{
  99. model.copyNode("/root/send/holiattr", "/root/main/holiattr");
  100. if(submit("TXCRC00501")){
  101. messageBox("휴일 저장을 ","I002");
  102. }
  103. }
  104. }else if(savemode == "U"){ //수정모드일경우 이벤트 발생
  105. model.copyNode("/root/send/holiattr", "/root/main/holiattr");
  106. if(submit("TXCRC00501")){
  107. messageBox("휴일 수정을 ","I002");
  108. }
  109. }
  110. model.setValue("/root/main/holiattr/savemode","I"); //저장모드 초기화
  111. fInitHoli(); //이벤트 발생 후 컴포넌트들 초기화 시킴
  112. fGetHoliInfo(); //reflash효과로 등록되거나 수정된 값을 보여주기위해 목록을 다시 조회
  113. }
  114. // 조회된 목록을 선택 더블클릭시 아래 컴포넌트로 선택된 항목의 상세내용 나타냄
  115. function fGetHoliAttr(){
  116. var row = grd_holiList.row;
  117. var RgstDD = grd_holiList.valueMatrix(row, grd_holiList.colRef("rgstdd"));
  118. model.setValue("/root/main/holiattr/rgstdd", RgstDD);
  119. var Rgstr = grd_holiList.valueMatrix(row, grd_holiList.colRef("rgstr"));
  120. model.setValue("/root/main/holiattr/rgstr", Rgstr);
  121. var holiDD = grd_holiList.valueMatrix(row, grd_holiList.colRef("holidd"));
  122. model.setValue("/root/main/holiattr/holidd", holiDD);
  123. var RgstrDept = grd_holiList.valueMatrix(row, grd_holiList.colRef("rgstrdeptcd"));
  124. model.setValue("/root/main/holiattr/dept",RgstrDept);
  125. var holiNm = grd_holiList.valueMatrix(row, grd_holiList.colRef("holinm"));
  126. model.setValue("/root/main/holiattr/holinm",holiNm);
  127. var rgstno = grd_holiList.valueMatrix(row, grd_holiList.colRef("rgstno"));
  128. model.setValue("/root/main/holiattr/rgstno",rgstno);
  129. model.setValue("/root/main/holiattr/savemode","U");
  130. model.refresh();
  131. }
  132. //목록을 선택해 삭제
  133. function fDelHoli(){
  134. var grid = grd_holiList
  135. deleteSelectedRows(grid, true); // 대상자 선택행 삭제
  136. // submit("TXCRC00502");
  137. // messageBox("선택된 목록 삭제가", "I002");
  138. }
  139. function fDelHoliEnd(){
  140. var gridupdate = "";
  141. gridupdate = grd_holiList.getUpdateData();
  142. model.setValue("/root/send/holilist", gridupdate);
  143. if(submit("TXCRC00502")){
  144. messageBox("휴일 삭제를 ","I002");
  145. }
  146. model.setValue("/root/main/holiattr/savemode","I"); //저장모드 초기화
  147. fInitHoli(); //이벤트 발생 후 컴포넌트들 초기화 시킴
  148. fGetHoliInfo(); //reflash효과로 등록되거나 수정된 값을 보여주기위해 목록을 다시 조회
  149. model.setValue("/root/main/holiattr/savemode","I"); //저장모드 초기화
  150. }
  151. //목록조회
  152. function fGetHoliInfo(){
  153. submit("TRCRC00501");
  154. }
  155. ]]>
  156. </script>
  157. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  158. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  159. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  160. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  161. </model>
  162. </xhtml:head>
  163. <xhtml:body pagewidth="706" pageheight="500" guideline="1,1195;2,-5;1,719;1,723;1,726;1,722;2,-4;1,-20;1,-86;1,-56;1,719;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  164. <group id="group1" style="left:0px; top:0px; width:690px; height:80px; ">
  165. <caption id="caption6" class="tit_1" style="left:1230px; top:605px; width:650px; height:13px; ">휴일관리</caption>
  166. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:15px; width:680px; height:61px; "/>
  167. <caption id="caption1" class="search_name" style="left:8px; top:24px; width:86px; height:17px; ">휴일일자 :</caption>
  168. <input id="ipt_holifromDD" ref="/root/send/srch/holifromdd" class="input_search" navindex="1" inputtype="date" style="left:100px; top:23px; width:105px; height:19px; "/>
  169. <caption id="caption11" class="search_n_b" style="left:211px; top:24px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  170. <input id="ipt_holitoDD" ref="/root/send/srch/holitodd" class="input_search" navindex="2" inputtype="date" style="left:229px; top:23px; width:105px; height:19px; "/>
  171. <caption id="caption7" class="search_name" style="left:359px; top:24px; width:77px; height:17px; ">부 서 :</caption>
  172. <input id="ipt_Dept" ref="/root/send/srch/dept" class="input_search" navindex="4" maxlength="64" style="left:442px; top:23px; width:105px; height:19px; "/>
  173. <caption id="caption10" class="search_name" style="left:8px; top:48px; width:96px; height:17px; ">등록일자 :</caption>
  174. <input id="ipt_RgstDD" ref="/root/send/srch/rgstdd" class="input_search" navindex="3" inputtype="date" style="left:100px; top:50px; width:105px; height:19px; "/>
  175. <caption id="caption14" class="search_name" style="left:359px; top:48px; width:90px; height:17px; ">등록자 :</caption>
  176. <input id="ipt_Rgstr" ref="/root/send/srch/rgstr" class="input_search" navindex="5" maxlength="10" style="left:442px; top:47px; width:105px; height:19px; "/>
  177. <line id="line1" class="line_4" style="x1:572px; y1:23px; x2:572px; y2:66px; "/>
  178. <button id="btn_Ref" class="btn1_letter2" style="left:597px; top:34px; width:56px; height:22px; ">
  179. <caption>조회</caption>
  180. <script type="javascript" ev:event="DOMActivate">
  181. <![CDATA[
  182. fGetHoliInfo();
  183. ]]>
  184. </script>
  185. </button>
  186. </group>
  187. <group id="group2" style="left:0px; top:85px; width:690px; height:245px; ">
  188. <caption id="caption32" class="tit_2" style="left:0px; top:6px; width:95px; height:13px; ">휴일목록</caption>
  189. <button id="btn_prcpdel" class="btn2_letter3" style="left:581px; top:0px; width:53px; height:19px; ">
  190. <caption>행삭제</caption>
  191. <script type="javascript" ev:event="DOMActivate">
  192. <![CDATA[
  193. //deleteSelectedRows(grd_holiList, true);
  194. fDelHoli(); // 휴일 목록삭제
  195. ]]>
  196. </script>
  197. </button>
  198. <button id="btn_save" class="btn5_letter2" style="left:635px; top:0px; width:42px; height:19px; ">
  199. <caption>저장</caption>
  200. <script type="javascript" ev:event="DOMActivate">
  201. <![CDATA[
  202. //==========================//
  203. //그리드 저장삭제를 실행한다//
  204. //==========================//
  205. fDelHoliEnd();
  206. ]]>
  207. </script>
  208. </button>
  209. <line id="line12" class="line_1" style="x1:0px; y1:20px; x2:680px; y2:20px; "/>
  210. <datagrid id="grd_holiList" nodeset="/root/main/holiList" autoresize="true" caption="휴일명^휴일^ 등록부서^등록자^등록일^^" colsep="^" colwidth="200, 100, 120, 70, 168, 0, 0" dataheight="30" explorerbar="sortshowmove" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="30" rowsep="|" style="left:0px; top:25px; width:680px; height:218px; ">
  211. <col ref="holinm"/>
  212. <col ref="holidd"/>
  213. <col ref="dept"/>
  214. <col ref="rgstr"/>
  215. <col ref="rgstdd" format="yyyy-mm-dd hh:mm"/>
  216. <col ref="rgstno" visivility="hidden"/>
  217. <col ref="rgstrdeptcd" visivility="hidden"/>
  218. <script type="javascript" ev:event="ondblclick">
  219. <![CDATA[
  220. var grid = grd_holiList;
  221. if(grid.row > 0 && grid.col > 0 && grid.isCell(event.target)){
  222. fGetHoliAttr(); //목록 더블클릭
  223. }
  224. ]]>
  225. </script>
  226. </datagrid>
  227. </group>
  228. <group id="group3" style="left:0px; top:330px; width:690px; height:110px; ">
  229. <caption id="caption2" class="tit_2" style="left:0px; top:12px; width:111px; height:13px; ">등록정보</caption>
  230. <line id="line2" class="line_1" style="x1:0px; y1:26px; x2:680px; y2:26px; "/>
  231. <caption id="caption18" class="cell_1" style="left:0px; top:31px; width:90px; height:23px; ">휴일명</caption>
  232. <caption id="caption3" class="cell_1" style="left:0px; top:55px; width:90px; height:23px; ">휴일일자</caption>
  233. <caption id="caption4" class="cell_1" style="left:342px; top:55px; width:90px; height:23px; ">등록부서</caption>
  234. <output id="opt_Dept" ref="/root/main/holiattr/deptnm" class="output_fix" style="left:435px; top:56px; width:245px; height:19px; "/>
  235. <input id="ipt_holiDD" ref="/root/main/holiattr/holidd" class="input_essential" navindex="7" inputtype="date" style="left:93px; top:56px; width:245px; height:19px; "/>
  236. <textarea id="tar_holiNm" ref="/root/main/holiattr/holinm" class="input_essential" navindex="6" overflow="hidden" scroll="no" maxlength="126" style="left:93px; top:32px; width:587px; height:19px; "/>
  237. <line id="line6" class="line_2" style="x1:0px; y1:53px; x2:680px; y2:53px; "/>
  238. <line id="line3" class="line_3" style="x1:0px; y1:77px; x2:680px; y2:77px; "/>
  239. <button id="btn_Save" class="btn4_letter2" style="left:562px; top:84px; width:56px; height:22px; ">
  240. <caption>저장</caption>
  241. <script type="javascript" ev:event="DOMActivate">
  242. <![CDATA[
  243. fSaveHoli();
  244. ]]>
  245. </script>
  246. </button>
  247. <button id="btn_prcpreset" class="btn4_letter3" style="left:491px; top:84px; width:68px; height:22px; ">
  248. <caption>초기화</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. fInitHoli(); // 휴일등록 초기화
  252. ]]>
  253. </script>
  254. </button>
  255. <button id="btn_close" class="btn4_letter2" style="left:621px; top:84px; width:56px; height:22px; ">
  256. <caption>닫기</caption>
  257. <close ev:event="DOMActivate"/>
  258. </button>
  259. </group>
  260. <button id="btn_writsrch" class="icon_search" style="left:550px; top:48px; width:16px; height:16px; ">
  261. <caption/>
  262. <script type="javascript" ev:event="DOMActivate">
  263. <![CDATA[
  264. var search_condition = "usernm";
  265. var search_term = model.getValue("/root/send/srch/usernm");
  266. var receive_usernm_path = "/root/send/srch/usernm";
  267. var receive_rgstr_path = "/root/send/srch/rgstr";
  268. var receive_dept_path = "/root/send/srch/dept";
  269. var receive_deptnm_path = "/root/send/srch/deptnm";
  270. setParameter("search_condition", search_condition);
  271. setParameter("search_term", search_term);
  272. setParameter("receive_empid_path", receive_rgstr_path);
  273. setParameter("receive_empnm_path", receive_usernm_path);
  274. setParameter("receive_deptcd_path", receive_dept_path);
  275. setParameter("receive_deptnm_path", receive_deptnm_path);
  276. modal("SPCCM00400")
  277. clearParameter("search_condition");
  278. clearParameter("search_term");
  279. clearParameter("receive_empid_path");
  280. clearParameter("receive_empnm_path");
  281. clearParameter("receive_deptcd_path");
  282. clearParameter("receive_deptnm_path");
  283. ]]>
  284. </script>
  285. </button>
  286. <button id="btn_deptsrch" class="icon_search" style="left:550px; top:25px; width:16px; height:16px; ">
  287. <caption/>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. var search_condition = "Deptnm";
  291. var search_term = model.getValue("/root/main/holiattr/deptnm");
  292. var receive_deptcd_path = "/root/send/srch/dept";
  293. var receive_deptnm_path = "/root/send/srch/deptnm";
  294. setParameter("receive_deptnm_path", receive_deptnm_path);
  295. setParameter("receive_deptcd_path", receive_deptcd_path);
  296. modal("SPCCM00300")
  297. clearParameter("receive_deptcd_path");
  298. clearParameter("receive_deptnm_path");
  299. ]]>
  300. </script>
  301. </button>
  302. </xhtml:body>
  303. </xhtml:html>