SMRPB03000_부서별근무지등록.xrw 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <deptdutplcelist>
  11. <unitcd/>
  12. <unitnm/>
  13. <dutplcedeptcd/>
  14. <dutplcedeptnm/>
  15. <cmt/>
  16. <instcd/>
  17. </deptdutplcelist>
  18. </main>
  19. <send>
  20. <search>
  21. <instcd/>
  22. <unitcd/>
  23. <unitnm/>
  24. </search>
  25. <savelist>
  26. <deptdutplcelist/>
  27. </savelist>
  28. </send>
  29. <init/>
  30. <temp/>
  31. </root>
  32. </instance>
  33. <script type="javascript" ev:event="xforms-ready">
  34. <![CDATA[
  35. fInitialize();
  36. misfGridInit(grd_deptdutplcelist);
  37. misfMsterDetailSet(grd_deptdutplcelist,null,"TRRPB03001","Y");
  38. btn_save.disabled = !(checkAuth("X"));
  39. // 공통코드 바인딩 silver
  40. misfComboComCdListMulti("Z0007,Z0007","cmb_instcd,grd_deptdutplcelist.dutplceinst");
  41. //misfComboComCdList('Z0007', cmb_instcd);
  42. var instcd = getUserInfo("dutplceinstcd");
  43. cmb_instcd.value=instcd;
  44. var unitcd = getUserInfo("dutplcecd");
  45. var unitnm = getUserInfo("dutplcenm");
  46. ipt_unitcd.value=unitcd;
  47. ipt_unitnm.value=unitnm;
  48. btn_search.dispatch("DOMActivate");
  49. ]]>
  50. </script>
  51. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  53. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  54. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  55. <script type="javascript">
  56. <![CDATA[
  57. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  58. function fInitialize() {
  59. model.removeNodeset("/root/main/deptdutplcelist");
  60. model.resetInstanceNode("/root/send");
  61. model.refresh();
  62. var instcd = getUserInfo("dutplceinstcd");
  63. cmb_instcd.value=instcd;
  64. }
  65. function fsaveCheckValue(){
  66. var iInsCnt = 0;
  67. var iDupCnt = 0;
  68. var bDel = false;
  69. var icolidx=grd_deptdutplcelist.colRef("instcd");
  70. var icolidx1=grd_deptdutplcelist.colRef("unitcd");
  71. var icolidx2=grd_deptdutplcelist.colRef("dutplcedeptcd");
  72. for(var i=0; i<grd_deptdutplcelist.rows; i++)
  73. {
  74. if(grd_deptdutplcelist.rowStatus(i) == 1 || grd_deptdutplcelist.rowStatus(i) == 3)
  75. {
  76. iInsCnt = i;
  77. break;
  78. }
  79. }
  80. for(var i=iInsCnt; i<grd_deptdutplcelist.rows; i++)
  81. {
  82. for(var j=1; j<i; j++)
  83. {
  84. if(grd_deptdutplcelist.valueMatrix(i, icolidx) == grd_deptdutplcelist.valueMatrix(j, icolidx) && grd_deptdutplcelist.valueMatrix(i, icolidx1) == grd_deptdutplcelist.valueMatrix(j, icolidx1) && grd_deptdutplcelist.valueMatrix(i, icolidx2) == grd_deptdutplcelist.valueMatrix(j, icolidx2))
  85. {
  86. if(grd_deptdutplcelist.rowStatus(i) == 1 || grd_deptdutplcelist.rowStatus(i) == 3)
  87. { var ret= messageBox("중복된 행을 삭제", "Q001");
  88. if (ret != 6) { // not OK
  89. bDel = false;
  90. return false;
  91. }else{
  92. grd_deptdutplcelist.deleteItem(i);
  93. iDupCnt++;
  94. bDel = true;
  95. }
  96. }
  97. }
  98. }
  99. if(bDel)
  100. {
  101. bDel = false;
  102. i--;
  103. }
  104. }
  105. if(iDupCnt > 0)
  106. {
  107. messageBox("[ " + iDupCnt + " ]" + " 건의 중복된 행이 삭제", "I001");
  108. }
  109. return true;
  110. }
  111. ]]>
  112. </script>
  113. <submission id="TRRPB03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/deptdutplcelist"/>
  114. <submission id="TXRPB03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savelist" resultref="/root/temp"/>
  115. </model>
  116. </xhtml:head>
  117. <xhtml:body style="margin-left:8; margin-right:8; ">
  118. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  119. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">부서별 근무지 등록</caption>
  120. </group>
  121. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  122. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:35px; "/>
  123. <caption id="cap_instcd" class="search_name" style="left:15px; top:19; width:86px; height:17px; ">기 관 :</caption>
  124. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:16px; width:56px; height:22px; ">
  125. <caption>조회</caption>
  126. <script type="javascript" ev:event="DOMActivate">
  127. <![CDATA[
  128. if(!isRequiredControls("ipt_instcd"))return;
  129. submit("TRRPB03001");
  130. ]]>
  131. </script>
  132. </button>
  133. <line id="line13" class="line_4" style="x1:1110px; y1:16px; x2:1110px; y2:38px; "/>
  134. <line id="line207" class="line_1" style="x1:0; y1:69; x2:1195; y2:69px; "/>
  135. <datagrid id="grd_deptdutplcelist" nodeset="/root/main/deptdutplcelist" caption="부서코드^부서명^근무지기관^근무지부서코드^근무지부서명^비고^기관^부서OLD^근무지기관OLD^근무지OLD" colsep="^" colwidth="129, 150, 142, 141, 200, 388, 31, 29, 31, 36" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:74px; width:1195px; height:660px; ">
  136. <col ref="unitcd" type="inputbutton"/>
  137. <col ref="unitnm"/>
  138. <col ref="dutplceinst" type="combo">
  139. <choices>
  140. <itemset>
  141. <label/>
  142. <value/>
  143. </itemset>
  144. </choices>
  145. </col>
  146. <col ref="dutplcedeptcd" type="inputbutton"/>
  147. <col ref="dutplcedeptnm"/>
  148. <col ref="cmt" type="input"/>
  149. <col ref="instcd" visibility="hidden"/>
  150. <col ref="oldunitcd" visibility="hidden"/>
  151. <col ref="olddutplceinst" visibility="hidden"/>
  152. <col ref="olddutplcedeptcd" visibility="hidden"/>
  153. <script type="javascript" ev:event="onbuttonclick">
  154. <![CDATA[
  155. if (grd_deptdutplcelist.col == grd_deptdutplcelist.colRef("unitcd"))
  156. { //부서코드 버튼을 눌렀을 때
  157. misfOpenPopUpList("02", grd_deptdutplcelist, "", "unitcd,unitnm");
  158. }
  159. else if(grd_deptdutplcelist.col == grd_deptdutplcelist.colRef("dutplcedeptcd"))
  160. { //근무코드 버튼을 눌렀을 때
  161. var recv_list = "dutplcedeptcd,dutplcedeptnm";
  162. var instcd = grd_deptdutplcelist.valueMatrix(grd_deptdutplcelist.row, grd_deptdutplcelist.colRef("dutplceinst"));
  163. rpbfOpenDeptCdHelp(grd_deptdutplcelist,recv_list, instcd, "instcd");
  164. //misfOpenPopUpList("02", grd_deptdutplcelist, "", "dutplcedeptcd,dutplcedeptnm","dutplceinst");
  165. }
  166. model.refresh();
  167. ]]>
  168. </script>
  169. </datagrid>
  170. <caption id="caption1" class="search_name" style="left:250px; top:19px; width:99px; height:17px; ">부 서 :</caption>
  171. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:18px; width:135px; height:19px; ">
  172. <choices>
  173. <itemset>
  174. <label/>
  175. <value/>
  176. </itemset>
  177. </choices>
  178. </select1>
  179. <button id="btn_deptcdhelp" class="icon_search" style="left:409px; top:20px; width:16px; height:16px; ">
  180. <caption/>
  181. <script type="javascript" ev:event="DOMActivate">
  182. <![CDATA[
  183. var precv_list = "unitcd" + "," + "unitnm";
  184. //alert(precv_list);
  185. misfOpenPopUpList("02", ipt_unitcd, "", precv_list);
  186. model.refresh();
  187. ]]>
  188. </script>
  189. </button>
  190. <input id="ipt_unitnm" ref="/root/send/search/unitnm" class="input_search" style="left:428px; top:18px; width:150px; height:19px; "/>
  191. <input id="ipt_unitcd" ref="/root/send/search/unitcd" class="input_search" style="left:335px; top:18px; width:70; height:19px; "/>
  192. <button id="btn_grddel" class="btn2_letter3" style="left:1142px; top:48px; width:53px; height:19px; ">
  193. <caption>행삭제</caption>
  194. <script type="javascript" ev:event="DOMActivate">
  195. <![CDATA[
  196. misfGridIUD(grd_deptdutplcelist,"D");
  197. model.refresh();
  198. ]]>
  199. </script>
  200. </button>
  201. <button id="btn_grdadd" class="btn2_letter3" style="left:1087px; top:48px; width:53px; height:19px; ">
  202. <caption>행추가</caption>
  203. <script type="javascript" ev:event="DOMActivate">
  204. <![CDATA[
  205. misfGridIUD(grd_deptdutplcelist, "A");
  206. var cur_row=grd_deptdutplcelist.row;
  207. grd_deptdutplcelist.valueMatrix(cur_row, grd_deptdutplcelist.colRef("instcd")) =cmb_instcd.value;
  208. ]]>
  209. </script>
  210. </button>
  211. <caption id="caption9" class="tit_2" style="left:5px; top:54px; width:170px; height:13px; ">부서별 근무지 내역</caption>
  212. </group>
  213. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  214. <line id="line11" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  215. <button id="btn_save" class="btn4_letter2" style="left:1139px; top:3px; width:56px; height:22px; ">
  216. <caption>저장</caption>
  217. <script type="javascript" ev:event="DOMActivate">
  218. <![CDATA[
  219. var updtdata = getGridUpdateData(grd_deptdutplcelist);
  220. if (updtdata == "" ) {
  221. messageBox("변경된 데이터가","I004");
  222. return;
  223. }
  224. if(!fsaveCheckValue())return;
  225. misfSave("TXRPB03001");
  226. ]]>
  227. </script>
  228. </button>
  229. <button id="btn_clear" class="btn4_letter3" style="left:1069px; top:3px; width:68px; height:22px; ">
  230. <caption>초기화</caption>
  231. <script type="javascript" ev:event="DOMActivate">
  232. <![CDATA[
  233. var updtdata = getGridUpdateData(grd_deptdutplcelist);
  234. if (updtdata != "" ) {
  235. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  236. if (ret != 6) { // not OK
  237. return;
  238. }
  239. }
  240. fInitialize();
  241. ]]>
  242. </script>
  243. </button>
  244. </group>
  245. </xhtml:body>
  246. </xhtml:html>