SMRBC00200_예산관리부서.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>예산관리부서</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <dept>
  11. <deptlist>
  12. <deptcd/>
  13. <depthngnm/>
  14. </deptlist>
  15. </dept>
  16. <bugt>
  17. <bugtlist>
  18. <deptcd/>
  19. <depthngnm/>
  20. <fromdd/>
  21. <todd/>
  22. <bugtuseyn/>
  23. <bugtprntseq/>
  24. <bugtsumdeptyn/>
  25. <orgtodd/>
  26. </bugtlist>
  27. </bugt>
  28. </main>
  29. <send>
  30. <condition>
  31. <deptcd/>
  32. <depthngnm/>
  33. <instcd/>
  34. </condition>
  35. <deptlist/>
  36. <bugtlist/>
  37. </send>
  38. <init/>
  39. <hidden/>
  40. <temp/>
  41. </root>
  42. </instance>
  43. <submission id="TRRBC00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/condition" resultref="/root/main/dept/deptlist"/>
  44. <submission id="TRRBC00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/bugt/bugtlist"/>
  45. <submission id="TXRBC00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  46. </model>
  47. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  49. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  50. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. // fCheckAuth();
  54. fOpenForm();
  55. misfMsterDetailSet(grd_deptlist, null, "TRRBC00201", "N");
  56. misfMsterDetailSet(grd_bugtlist, null, "TRRBC00202", "Y");
  57. // submit("TRRBC00201");
  58. // submit("TRRBC00202");
  59. ]]>
  60. </script>
  61. <script type="javascript">
  62. <![CDATA[
  63. //========================================================================================
  64. //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
  65. //========================================================================================
  66. function fCheckAuth() {
  67. btn_search.disabled = !checkAuth("R");
  68. btn_save.disabled = !checkAuth("X");
  69. btn_grdadd.disabled = !checkAuth("X");
  70. btn_grddel.disabled = !checkAuth("X");
  71. btn_prt.disabled = !checkAuth("P");
  72. }
  73. //========================================================================================
  74. //화면 로드시 초기화 함수
  75. //========================================================================================
  76. function fOpenForm() {
  77. model.removenode("/root/main/dept/deptlist");
  78. model.removenode("/root/main/bugt/bugtlist");
  79. misfComboComCdList("Z0007", cmb_instcd, "N");
  80. model.setValue("/root/send/condition/instcd", getUserInfo("dutplceinstcd"));
  81. model.refresh();
  82. // fGetBugtMngtList();
  83. }
  84. //========================================================================================
  85. //부서코드 조회
  86. //========================================================================================
  87. function fGetDeptList() {
  88. //기존 데이터 삭제
  89. model.removenode("/root/main/dept/deptlist");
  90. misfMsterDetailRetrieve();
  91. submit("TRRBC00201");
  92. }
  93. //========================================================================================
  94. //예산관리부서 조회
  95. //========================================================================================
  96. function fGetBugtMngtList() {
  97. //기존 데이터 삭제
  98. model.removenode("/root/main/bugt/bugtlist");
  99. submit("TRRBC00202");
  100. }
  101. //========================================================================================
  102. // 저장버튼 클릭시 저장 수행 함수
  103. //========================================================================================
  104. function fClickSaveBtn() {
  105. if(!fIsValidForSave())//저장전 유효성 검사
  106. return;
  107. misfSave("TXRBC00201");
  108. }
  109. //========================================================================================
  110. //저장전 유효성 검사
  111. //========================================================================================
  112. function fIsValidForSave() {
  113. var sBugtList = getGridUpdateData(grd_bugtlist);
  114. if(sBugtList == "") {
  115. messageBox("변경된 데이터가","I004");
  116. return false;
  117. }else if(sBugtList != "" ) {
  118. model.copyNode("/root/send/bugttlist", sBugtList);
  119. return true;
  120. }
  121. }
  122. //========================================================================================
  123. //그리드 행 추가
  124. //========================================================================================
  125. function fAddGrid(pGrid) {
  126. var dept_row = grd_deptlist.row;
  127. if ( dept_row > 0 ) {
  128. var sInstCd = grd_deptlist.valueMatrix(dept_row, grd_deptlist.colRef("instcd"));
  129. var sDeptCd = grd_deptlist.valueMatrix(dept_row, grd_deptlist.colRef("deptcd"));
  130. var sDeptNm = grd_deptlist.valueMatrix(dept_row, grd_deptlist.colRef("depthngnm"));
  131. for(i = grd_bugtlist.fixedRows ; i < grd_bugtlist.rows; i++)
  132. {
  133. if(grd_bugtlist.valueMatrix(i, grd_bugtlist.colRef("deptcd")) == sDeptCd)
  134. {
  135. messageBox("이미 등록된 부 ","E008");
  136. return;
  137. }
  138. }
  139. pGrid.addRow();
  140. model.setValue("/root/main/bugt/bugtlist["+ pGrid.row + "]/instcd", sInstCd);
  141. model.setValue("/root/main/bugt/bugtlist["+ pGrid.row + "]/deptcd", sDeptCd);
  142. model.setValue("/root/main/bugt/bugtlist["+ pGrid.row + "]/depthngnm", sDeptNm);
  143. model.setValue("/root/main/bugt/bugtlist["+ pGrid.row + "]/fromdd", "18000101");
  144. model.setValue("/root/main/bugt/bugtlist["+ pGrid.row + "]/todd", "99991231");
  145. model.setValue("/root/main/bugt/bugtlist["+ pGrid.row + "]/bugtuseyn", "Y");
  146. pGrid.editCell();
  147. model.refresh();
  148. grd_bugtlist.col = grd_deptlist.colRef("depthngnm");
  149. }else {
  150. messageBox("부서목록을 선택하지 ","E007");
  151. }
  152. }
  153. //========================================================================================
  154. //그리드 행 삭제
  155. //========================================================================================
  156. function fDelGrid(pGrid) {
  157. var cur_row = pGrid.row;
  158. if(cur_row > -1) {
  159. deleteSelectedRows(pGrid, true); //true : 바로삭제, false : 상태만 삭제로 변경
  160. model.refresh();
  161. }else if(cur_row == -1) {
  162. messageBox("삭제하려는 행을", "C002");
  163. }
  164. }
  165. //========================================================================================
  166. //부서코드 Help Open
  167. //========================================================================================
  168. function fOpenPopupDeptHelp(pControl, pInstance) {
  169. //02 부서코드Helper
  170. misfOpenPopUpList("02", pControl, "", pInstance);
  171. model.refresh();
  172. }
  173. ]]>
  174. </script>
  175. </xhtml:head>
  176. <xhtml:body guideline="1,1193;1,471;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  177. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  178. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">예산관리부서</caption>
  179. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  180. </group>
  181. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  182. <line id="line2" class="line_1" style="x1:0px; y1:70px; x2:471; y2:70px; "/>
  183. <caption id="caption9" class="tit_2" style="left:5px; top:55px; width:117px; height:14px; ">부서목록</caption>
  184. <group id="grp_sea" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
  185. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35; background-color:#fffbf2; border-color:#ffd799; "/>
  186. <line id="line3" class="line_4" style="x1:1108; y1:8px; x2:1108; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  187. <caption id="caption5" class="search_name" style="left:11px; top:9px; width:74px; height:17px; ">부 서 :</caption>
  188. <input id="ipt_deptcd" ref="/root/send/condition/deptcd" class="input_s_essential" navindex="3" style="left:85px; top:8px; width:80px; height:19px; ">
  189. <script type="javascript" ev:event="onkeypress">
  190. <![CDATA[
  191. if(event.keyCode == 13)
  192. {
  193. racfDeptValidCheck("deptcd,depthngnm");
  194. }
  195. ]]>
  196. </script>
  197. <script type="javascript" ev:event="xforms-value-changed">
  198. <![CDATA[
  199. racfDeptValidCheck("deptcd,depthngnm");
  200. ]]>
  201. </script>
  202. </input>
  203. <input id="ipt_depthngnm" ref="/root/send/condition/depthngnm" class="input_s_essential" navindex="3" style="left:190px; top:8px; width:180px; height:19px; ">
  204. <script type="javascript" ev:event="onkeypress">
  205. <![CDATA[
  206. if(event.keyCode == 13)
  207. {
  208. racfDeptValidCheck("deptcd,depthngnm");
  209. }
  210. ]]>
  211. </script>
  212. <script type="javascript" ev:event="xforms-value-changed">
  213. <![CDATA[
  214. racfDeptValidCheck("deptcd,depthngnm");
  215. ]]>
  216. </script>
  217. </input>
  218. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1123; top:8px; width:56px; height:22px; text-align:left; ">
  219. <caption>조회</caption>
  220. <script type="javascript" ev:event="DOMActivate">
  221. <![CDATA[
  222. fGetDeptList();
  223. ]]>
  224. </script>
  225. </button>
  226. <button id="btn_help" class="icon_search" style="left:170px; top:9px; width:16px; height:16px; ">
  227. <caption/>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. fOpenPopupDeptHelp(ipt_deptcd, "deptcd,depthngnm");
  231. ]]>
  232. </script>
  233. </button>
  234. <select1 id="cmb_instcd" ref="/root/send/condition/instcd" class="combo_s_essential" navindex="1" appearance="minimal" style="left:489px; top:8px; width:175px; height:19px; ">
  235. <choices>
  236. <itemset>
  237. <label/>
  238. <value/>
  239. </itemset>
  240. </choices>
  241. </select1>
  242. <caption id="caption7" class="search_name" style="left:400px; top:9px; width:86px; height:17px; ">기 관 :</caption>
  243. </group>
  244. <button id="button2" class="btn2_letter2" style="left:1040px; top:50px; width:42px; height:19px; text-align:left; ">
  245. <caption>엑셀</caption>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. misfSaveExcel(grd_excelload);
  249. ]]>
  250. </script>
  251. </button>
  252. <line id="line1" class="line_1" style="x1:476px; y1:70px; x2:1194; y2:70px; "/>
  253. <caption id="caption3" class="tit_2" style="left:481px; top:55px; width:131px; height:13px; ">예산관리부서 목록</caption>
  254. <datagrid id="grd_deptlist" nodeset="/root/main/dept/deptlist" caption="기관코드^부서코드^부서명" colsep="^" colwidth="0, 100, 279" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:75px; width:471px; height:663px; ">
  255. <col ref="instcd"/>
  256. <col ref="deptcd"/>
  257. <col ref="depthngnm"/>
  258. <script type="javascript" ev:event="ondblclick">
  259. <![CDATA[
  260. if (isDataCell()) {
  261. fAddGrid(grd_bugtlist);
  262. }
  263. ]]>
  264. </script>
  265. <script type="javascript" ev:event="onaftersort">
  266. <![CDATA[
  267. grd_deptlist.gridToInstance();
  268. ]]>
  269. </script>
  270. </datagrid>
  271. <datagrid id="grd_bugtlist" nodeset="/root/main/bugt/bugtlist" caption="기관코드^부서코드^부서명^시작일자*^종료일자*^예산사용^출력순서^예산취합부서여부^org종료일자" colsep="^" colwidth="0, 80, 330, 35, 35, 110, 124, 100, 0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:476px; top:75px; width:717px; height:663px; ">
  272. <col ref="instcd"/>
  273. <col ref="deptcd"/>
  274. <col ref="depthngnm"/>
  275. <col ref="fromdd" type="inputdate" visibility="hidden"/>
  276. <col ref="todd" type="inputdate" visibility="hidden"/>
  277. <col checkvalue="Y,N" ref="bugtuseyn" type="checkbox"/>
  278. <col ref="bugtprntseq" type="input"/>
  279. <col checkvalue="Y,N" ref="bugtsumdeptyn" type="checkbox"/>
  280. <col ref="orgtodd" visibility="hidden"/>
  281. </datagrid>
  282. <button id="btn_grdadd" class="btn2_letter3" style="left:1084px; top:50px; width:58px; height:19px; ">
  283. <caption>행추가</caption>
  284. <script type="javascript" ev:event="DOMActivate">
  285. <![CDATA[
  286. fAddGrid(grd_bugtlist);
  287. ]]>
  288. </script>
  289. </button>
  290. <button id="btn_grddel" class="btn2_letter3" style="left:1139px; top:50px; width:53px; height:19px; ">
  291. <caption>행삭제</caption>
  292. <script type="javascript" ev:event="DOMActivate">
  293. <![CDATA[
  294. //fDelGrid(grd_bugtlist);
  295. misfGridIUD(grd_bugtlist, "D");
  296. ]]>
  297. </script>
  298. </button>
  299. </group>
  300. <group id="group2" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  301. <line id="line4" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  302. <button id="btn_save" class="btn4_letter2" style="left:1138px; top:3px; width:56px; height:22px; ">
  303. <caption>저장</caption>
  304. <script type="javascript" ev:event="DOMActivate">
  305. <![CDATA[
  306. fClickSaveBtn();
  307. ]]>
  308. </script>
  309. </button>
  310. <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  311. <caption>출력</caption>
  312. </button>
  313. </group>
  314. </xhtml:body>
  315. </xhtml:html>