SMLAF00400_사용부서목록관리.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLAF00400_사용부서목록관리.xrw
  4. * 설 명 : 사용부서목록관리 화면
  5. * 설 계 자 : 한음미
  6. * 작 성 자 : 한음미
  7. * 작 성 일 : 2007.11.01
  8. * 수정이력 : 2008.04.14 - 유동철
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>사용부서목록관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <deptlist>
  20. <choi/>
  21. <deptflag/>
  22. <deptnm/>
  23. <dutdeptcd/>
  24. <unitnm/>
  25. <grsectcd/>
  26. <fromdd/>
  27. <todd/>
  28. <exist/>
  29. </deptlist>
  30. </main>
  31. <send>
  32. <use/>
  33. </send>
  34. <init>
  35. <sysdt>
  36. <sysdtinfo>
  37. <sysdd/>
  38. <systm/>
  39. </sysdtinfo>
  40. </sysdt>
  41. <deptinfo>
  42. <cd/>
  43. </deptinfo>
  44. </init>
  45. <hidden>
  46. </hidden>
  47. </root>
  48. </instance>
  49. <script type="javascript" ev:event="xforms-ready">
  50. <![CDATA[
  51. fExeInitialize();
  52. ]]>
  53. </script>
  54. <submission id="TRLPZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/sysdt/sysdtinfo"/>
  55. <submission id="TRLAF00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/deptlist"/>
  56. <submission id="TRLAF00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/deptinfo"/>
  57. <submission id="TXLAF00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/deptlist"/>
  58. </model>
  59. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  63. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  64. <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
  65. <script type="javascript">
  66. <![CDATA[
  67. /* @group : 물품코드관리
  68. * @ver : 2007.11.01 (CMCDEV-0001)
  69. * @by : 한음미
  70. * @-----------------------------------
  71. * @type : function
  72. * @access : public
  73. * @desc : 화면 초기값 Function
  74. */
  75. function fExeInitialize() {
  76. //--------------------------------
  77. model.removeNodeset("/root/send");
  78. model.removeNodeset("/root/main/deptlist");
  79. //-----------------------------------------------------------------
  80. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  81. submit("TRLPZ00102"); // 현재의 time 가져오기
  82. submit("TRLAF00402"); // 로그인 사용자의 과코드에 해당하는 대체 과코드 검색
  83. //model.makeValue("/root/init/deptinfo/cd", "P");
  84. model.makeValue("/root/send/useyn", "");
  85. submit("TRLAF00401"); // 부서목록 조회하여 그리드에 가져오기
  86. //----------------------------------------------
  87. for(var iNo=1; iNo < grd_deptlist.rows; iNo++) {
  88. grd_deptlist.isReadOnly(iNo,2) = true;
  89. grd_deptlist.isReadOnly(iNo,4) = true;
  90. grd_deptlist.isReadOnly(iNo,7) = true;
  91. //grd_deptlist.isReadOnly(iNo,6) = true;
  92. }
  93. //--------------
  94. model.refresh();
  95. }
  96. /* @group : 물품코드관리
  97. * @ver : 2007.11.01 (CMCDEV-0001)
  98. * @by : 한음미
  99. * @-----------------------------------
  100. * @type : function
  101. * @access : public
  102. * @desc : 각 과에 사용부서 저장 Function
  103. */
  104. function fExeSaveDept(){
  105. var sNode = "/root/main/deptlist";
  106. /*
  107. //------------------------------------
  108. if(!getGridUpdateData(grd_deptlist)) {
  109. messageBox("저장할 데이터를","C002");
  110. return ;
  111. }
  112. */
  113. //------------------------------------------------------
  114. for(var iRow=1;iRow <= getNodesetCount(sNode); iRow++) {
  115. //------------------------------------------------------
  116. if (model.getValue(sNode+"["+iRow+"]/choi") == "true") {
  117. //----------------------------------------------------
  118. if (model.getValue(sNode+"["+iRow+"]/dutdeptcd") == "" ||
  119. model.getValue(sNode+"["+iRow+"]/unitnm") == "" ||
  120. model.getValue(sNode+"["+iRow+"]/grsectcd") == "") {
  121. messageBox(iRow + "행에 데이터를","C001");
  122. return false;
  123. } else {
  124. //-------------------------------
  125. // 신규 부서코드 등록일 경우 처리
  126. if (model.getValue(sNode+"["+iRow+"]/exist") != "Y") {
  127. if (model.getValue(sNode+"["+iRow+"]/todd") == "") {
  128. //messageBox(iRow + "행에 종료일자를","C001");
  129. //return ;
  130. model.makeValue(sNode+"["+iRow+"]/todd", "99991231");
  131. }
  132. //------------------------------------
  133. grd_deptlist.addStatus(iRow,"insert");
  134. } else {
  135. if(model.getValue(sNode+"["+iRow+"]/todd") == "") {
  136. messageBox(iRow + "행에 종료일자를","C001");
  137. return ;
  138. }
  139. //------------------------------------
  140. grd_deptlist.addStatus(iRow,"update");
  141. }
  142. }
  143. }
  144. }
  145. //-------------------------------------------------------------------
  146. model.makeValue("/root/send/deptlist", grd_deptlist.getUpdateData());
  147. setAlertOn();
  148. if (submit("TXLAF00401")) {
  149. fExeInitialize();
  150. }
  151. }
  152. /* @group : 물품코드관리
  153. * @ver : 2007.11.01 (CMCDEV-0001)
  154. * @by : 한음미
  155. * @-----------------------------------
  156. * @type : function
  157. * @access : public
  158. * @desc : 행추가 Function
  159. */
  160. function fExeInsertRow() {
  161. var sNode = "/root/main/deptlist";
  162. var iRowNo = 0;
  163. //-----------------------------------------------------------------------------------------------------
  164. if(model.getValue("/root/init/deptinfo/cd") == "" || model.getValue("/root/init/deptinfo/cd") == " ") {
  165. messageBox("소속 과에 해당하는 코드가 없습니다! ","I007");
  166. return false;
  167. }
  168. //-----------------------------
  169. grd_deptlist.addRow(true,true);
  170. iRowNo = getNodesetCount(sNode);
  171. //-----------------------------------------------------------------
  172. model.setValue(sNode+"["+ grd_deptlist.row +"]/choi", "true");
  173. model.setValue(sNode+"["+ grd_deptlist.row +"]/deptflag", model.getValue("/root/init/deptinfo/cd"));
  174. model.setValue(sNode+"["+ grd_deptlist.row +"]/deptnm", model.getValue("/root/init/deptinfo/cd"));
  175. model.setValue(sNode+"["+ grd_deptlist.row +"]/dutdeptcd", "");
  176. model.setValue(sNode+"["+ grd_deptlist.row +"]/unitnm", "");
  177. model.setValue(sNode+"["+ grd_deptlist.row +"]/grsectcd", "");
  178. model.setValue(sNode+"["+ grd_deptlist.row +"]/fromdd", model.getValue("/root/init/sysdt/sysdtinfo/sysdd"));
  179. model.setValue(sNode+"["+ grd_deptlist.row +"]/todd", "99991231");
  180. model.setValue(sNode+"["+ grd_deptlist.row +"]/exist", "N");
  181. grd_deptlist.refresh();
  182. }
  183. /* @group : 물품코드관리
  184. * @ver : 2007.11.01 (CMCDEV-0001)
  185. * @by : 한음미
  186. * @-----------------------------------
  187. * @type : function
  188. * @access : public
  189. * @desc : 행삭제 Function
  190. */
  191. function fExeDeleteRow() {
  192. var sNode = "/root/main/deptlist";
  193. //-------------------------------
  194. if (getNodesetCount(sNode) > 0) {
  195. //-----------------------------------------------------------------
  196. if(model.getValue(sNode+"["+ grd_deptlist.row +"]/exist") != "Y") {
  197. grd_deptlist.deleteRow(grd_deptlist.row, true);
  198. grd_deptlist.refresh();
  199. } else {
  200. if (model.getValue(sNode+"["+ grd_deptlist.row +"]/todd") == "") {
  201. messageBox("종료일자를 ","C001");
  202. return false;
  203. }
  204. }
  205. }
  206. }
  207. ]]>
  208. </script>
  209. </xhtml:head>
  210. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  211. <group id="group1" scroll="auto" style="left:0px; top:0px; width:1194px; height:15px; ">
  212. <caption id="caption6" class="tit_1" autoresize="true" style="left:0px; top:0px; width:140px; height:14px; background-image:../../../com/commonweb/images/tit_bullet1.gif; ">사용부서목록관리</caption>
  213. </group>
  214. <group id="group3" style="left:0px; top:40px; width:1194px; height:679px; ">
  215. <caption id="caption22" class="tit_2" style="left:10px; top:4px; width:82px; height:14px; background-image:../../../com/commonweb/images/tit_bullet2.gif; ">부서목록</caption>
  216. <line id="line2" class="line_1" style="x1:10px; y1:23px; x2:1190px; y2:23px; "/>
  217. <datagrid id="grd_deptlist" nodeset="/root/main/deptlist" caption="선택^과구분^과명^부서코드^부서명^그룹부서^시작일자^종료일자^존재" colsep="^" colwidth="50, 100, 200, 130, 250, 120, 150, 150, 0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:10px; top:28px; width:1180px; height:644px; vertical-align:middle; ">
  218. <col ref="choi" type="checkbox"/>
  219. <col disabled="true" editmode="input" ref="deptflag" type="input" visibility="visible" appearance="minimal" style="text-align:center; "/>
  220. <col disabled="true" ref="deptnm" type="combo" style="text-align:center; ">
  221. <choices>
  222. <item>
  223. <label>진단검사의학과</label>
  224. <value>L</value>
  225. </item>
  226. <item>
  227. <label>병리과</label>
  228. <value>P</value>
  229. </item>
  230. <item>
  231. <label>핵의학-체외</label>
  232. <value>N</value>
  233. </item>
  234. </choices>
  235. </col>
  236. <col ref="dutdeptcd" type="input" maxlength="5" style="text-align:center; "/>
  237. <col ref="unitnm" type="input" maxlength="60" style="text-align:center; "/>
  238. <col autonext="false" ref="grsectcd" type="input" maxlength="1" style="text-align:center; "/>
  239. <col ref="fromdd" type="inputdate" style="text-align:center; "/>
  240. <col ref="todd" type="inputdate" style="text-align:center; "/>
  241. <col ref="exist"/>
  242. </datagrid>
  243. <button id="button4" class="btn2_letter3" navindex="6" style="left:1080px; top:3px; width:53px; height:19px; ">
  244. <caption>행추가</caption>
  245. <script type="javascript" ev:event="DOMActivate">
  246. <![CDATA[
  247. fExeInsertRow();
  248. ]]>
  249. </script>
  250. </button>
  251. <button id="btn_del" class="btn2_letter3" navindex="6" style="left:1136px; top:3px; width:53px; height:19px; ">
  252. <caption>행삭제</caption>
  253. <script type="javascript" ev:event="DOMActivate">
  254. <![CDATA[
  255. fExeDeleteRow();
  256. ]]>
  257. </script>
  258. </button>
  259. </group>
  260. <group id="group2" style="left:0px; top:15px; width:1194px; height:25px; ">
  261. <line id="line05" class="line_6" style="x1:10px; y1:23px; x2:1190px; y2:23px; "/>
  262. <button id="button1" class="btn4_letter2" style="left:1133px; top:3px; width:56px; height:22px; ">
  263. <caption>저장</caption>
  264. <script type="javascript" ev:event="DOMActivate">
  265. <![CDATA[
  266. fExeSaveDept();
  267. ]]>
  268. </script>
  269. </button>
  270. </group>
  271. </xhtml:body>
  272. </xhtml:html>