SMZHI01200_전산장비장소관리.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : 전산장비장소관리.xrw
  4. * 설 명 : 장비장소관리
  5. * 설 계 자 : 김병국
  6. * 작 성 자 : 김병국
  7. * 작 성 일 : 2012.11.21
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  13. <xhtml:head>
  14. <xhtml:title>전산장비장소관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <cond>
  20. <instcd/>
  21. <deptnm/>
  22. <rgstyn/>
  23. </cond>
  24. <eqmtiteminfo>
  25. <eqmtitemlist/>
  26. </eqmtiteminfo>
  27. <deptinfo>
  28. <deptlist>
  29. <deptcd/>
  30. <instcd/>
  31. <deptnm/>
  32. </deptlist>
  33. </deptinfo>
  34. <plceinfo>
  35. <plcelist/>
  36. </plceinfo>
  37. </main>
  38. <send>
  39. <reqdata/>
  40. </send>
  41. <init>
  42. <mlist/>
  43. </init>
  44. </root>
  45. </instance>
  46. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  48. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  49. <script type="javascript" ev:event="xforms-ready">
  50. <![CDATA[
  51. fInit();
  52. ]]>
  53. </script>
  54. <submission id="TRZHI01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/deptinfo"/>
  55. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  56. <submission id="TRZHI01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata2" resultref="/root/main/plceinfo"/>
  57. <submission id="TXZHI01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  58. </model>
  59. <script type="javascript">
  60. <![CDATA[
  61. /*
  62. * SMZHI01200_param : 값을 넘기면 팝업용 장소관리. 그외는 기준자료관리용 장소관리
  63. */
  64. var param;
  65. var deptonly;
  66. function fInit(){
  67. if(checkOpener()) {
  68. param = opener.javascript.getParameter("SMZHI01200_param");
  69. deptonly = opener.javascript.getParameter("SMZHI01200_deptonly");
  70. if(param == "" || param == null) {
  71. fButtonDisabled("2");
  72. } else {
  73. fButtonDisabled("1");
  74. }
  75. } else {
  76. }
  77. zbcfGetCodeList( new Array ( "Z0007")
  78. , new Array ( "/root/init/mlist","/root/init/mlist")
  79. );
  80. addComboItem("cmb_instcd", "전체", "", "above");
  81. model.setValue(cmb_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
  82. model.removeNodeset(grd_deptlist.nodeset);
  83. model.removeNodeset(grd_plcelist.nodeset);
  84. fSearch();
  85. }
  86. /*
  87. param : flag : 1(팝업): 장소정보가져오기
  88. 2(메인) : 기준자료관리
  89. */
  90. function fButtonDisabled(flag) {
  91. if(flag == "1") {
  92. btn_add.visible = false;
  93. btn_del.visible = false;
  94. btn_sav.visible = false;
  95. grd_plcelist.colDisabled(grd_plcelist.colRef("plcenm")) = true;
  96. grd_plcelist.colDisabled(grd_plcelist.colRef("bigo")) = true;
  97. btn_cnfm.visible = true;
  98. model.setValue(rdo_rgstyn.attribute("ref"), "Y", true);
  99. } else {
  100. btn_add.visible = true;
  101. btn_del.visible = true;
  102. btn_sav.visible = true;
  103. btn_cnfm.visible = false;
  104. }
  105. }
  106. /*
  107. * 조회
  108. */
  109. function fSearch(){
  110. model.copyNode("/root/send/reqdata", "/root/main/cond");
  111. submit("TRZHI01201");
  112. }
  113. function fSearchDetl() {
  114. var iRow = grd_deptlist.row;
  115. model.makeValue("/root/send/reqdata2/instcd", grd_deptlist.valueMatrix(iRow, grd_deptlist.colRef("instcd")));
  116. model.makeValue("/root/send/reqdata2/deptcd", grd_deptlist.valueMatrix(iRow, grd_deptlist.colRef("deptcd")));
  117. submit("TRZHI01202");
  118. }
  119. function fSave() {
  120. var updtdata = getGridUpdateData(grd_plcelist);
  121. if(updtdata == null || updtdata == "") {
  122. messageBox("저장할 내역이 존재하지 않습니다,", "E");
  123. return;
  124. }
  125. model.makeValue("/root/send/savedata/plcelist", getGridUpdateData(grd_plcelist));
  126. if(submit("TXZHI01201") ) {
  127. messageBox("저장되었습니다", "I");
  128. fSearchDetl();
  129. }
  130. }
  131. function fCnfm() {
  132. var iRow = grd_plcelist.row;
  133. opener.javascript.setParameter("SMZHI01200_deptcd", grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("deptcd")));
  134. opener.javascript.setParameter("SMZHI01200_deptnm", grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("deptnm")));
  135. opener.javascript.setParameter("SMZHI01200_plcecd", grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("plcecd")));
  136. opener.javascript.setParameter("SMZHI01200_plcenm", grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("plcenm")));
  137. opener.javascript.setParameter("SMZHI01200_instcd", grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("instcd")));
  138. opener.javascript.setParameter("SMZHI01200_cnfm", "Y");
  139. window.close();
  140. }
  141. function fCnfm2() {
  142. var iRow = grd_deptlist.row;
  143. opener.javascript.setParameter("SMZHI01200_deptcd", grd_deptlist.valueMatrix(iRow, grd_deptlist.colRef("deptcd")));
  144. opener.javascript.setParameter("SMZHI01200_deptnm", grd_deptlist.valueMatrix(iRow, grd_deptlist.colRef("deptnm")));
  145. window.close();
  146. }
  147. ]]>
  148. </script>
  149. </xhtml:head>
  150. <xhtml:body pagewidth="784" pageheight="563" guideline="1,1194;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  151. <group id="group3" scroll="auto" style="left:0px; top:0px; width:765px; height:515px; ">
  152. <group id="group2" style="left:0px; top:0px; width:764px; height:40px; vertical-align:top; ">
  153. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:764px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  154. <line id="line13" style="x1:684px; y1:9px; x2:684px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  155. <button id="btn_search" class="btn1_letter2" style="left:695px; top:10px; width:56px; height:22px; ">
  156. <caption>조회</caption>
  157. <script type="javascript" ev:event="DOMActivate">
  158. <![CDATA[
  159. fSearch();
  160. ]]>
  161. </script>
  162. </button>
  163. <caption id="caption2" class="search_name" style="left:235px; top:10px; width:77px; height:17px; font-family:돋움체; ">부서명 :</caption>
  164. <input id="ipt_deptnm" ref="/root/main/cond/deptnm" imemode="hangul" style="left:314px; top:9px; width:115px; height:19px; ">
  165. <script type="javascript" ev:event="xforms-value-changed">
  166. <![CDATA[
  167. ]]>
  168. </script>
  169. <script type="javascript" ev:event="onkeyup">
  170. <![CDATA[
  171. if(event.keyCode == 13) {
  172. setInputNodeCurText();
  173. fSearch();
  174. }
  175. ]]>
  176. </script>
  177. </input>
  178. <select1 id="cmb_instcd" ref="/root/main/cond/instcd" class="combo_search" appearance="minimal" style="left:100px; top:10px; width:120px; height:19px; ">
  179. <choices>
  180. <itemset nodeset="/root/init/mlist/Z0007[cdid='031' or cdid='032' or cdid='']">
  181. <label ref="cdnm"/>
  182. <value ref="cdid"/>
  183. </itemset>
  184. </choices>
  185. </select1>
  186. <caption id="caption3" class="search_name" style="left:5px; top:10px; width:93px; height:17px; font-family:돋움체; ">기 관 :</caption>
  187. <caption id="caption4" class="search_name" style="left:440px; top:10px; width:90px; height:17px; font-family:돋움체; ">등록여부 :</caption>
  188. <select1 id="rdo_rgstyn" ref="/root/main/cond/rgstyn" appearance="full" cols="3" overflow="visible" style="left:533px; top:12px; width:145px; height:13px; border-style:none; ">
  189. <choices>
  190. <item>
  191. <label>전체</label>
  192. <value/>
  193. </item>
  194. <item>
  195. <label>등록</label>
  196. <value>Y</value>
  197. </item>
  198. <item>
  199. <label>미등록</label>
  200. <value>N</value>
  201. </item>
  202. </choices>
  203. </select1>
  204. </group>
  205. <line id="line1" class="line_1" style="x1:0px; y1:65px; x2:200px; y2:65px; "/>
  206. <caption id="caption34" class="tit_2" style="left:0px; top:50px; width:130px; height:14px; font-family:돋움체; ">부서목록내역</caption>
  207. <datagrid id="grd_deptlist" nodeset="/root/main/deptinfo/deptlist" class="datagrid2" caption="부서코드^기관코드^부서명^등&#xA;록" colsep="^" colwidth="0, 0, 155, 25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:70px; width:200px; height:445px; ">
  208. <col ref="deptcd"/>
  209. <col ref="instcd"/>
  210. <col ref="deptnm"/>
  211. <col ref="rgstyn" style="text-align:center; "/>
  212. <script type="javascript" ev:event="onclick">
  213. <![CDATA[
  214. if(deptonly != "Y") {
  215. fSearchDetl();
  216. }
  217. ]]>
  218. </script>
  219. <script type="javascript" ev:event="ondblclick">
  220. <![CDATA[
  221. if(deptonly == "Y") {
  222. fCnfm2();
  223. }
  224. ]]>
  225. </script>
  226. </datagrid>
  227. <datagrid id="grd_plcelist" nodeset="/root/main/plceinfo/plcelist" class="datagrid2" autoresize="true" caption="기관코드^부서코드^부서명^장소&#xA;코드^장소명^비고" colsep="^" colwidth="0, 0, 100, 44, 130, 368" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:205px; top:70px; width:559px; height:445px; ">
  228. <col ref="instcd"/>
  229. <col ref="deptcd"/>
  230. <col ref="deptnm"/>
  231. <col ref="plcecd" type="output" style="text-align:center; "/>
  232. <col ref="plcenm" type="input"/>
  233. <col ref="bigo" type="input"/>
  234. <script type="javascript" ev:event="ondblclick">
  235. <![CDATA[
  236. if(param == "Y") {
  237. fCnfm();
  238. }
  239. ]]>
  240. </script>
  241. </datagrid>
  242. <caption id="caption1" class="tit_2" style="left:205px; top:50px; width:75px; height:13px; font-family:돋움체; ">장소내역</caption>
  243. <line id="line2" class="line_1" style="x1:205px; y1:65px; x2:764px; y2:65px; "/>
  244. <button id="btn_add" class="btn5_letter2" style="left:630px; top:45px; width:42px; height:19px; ">
  245. <caption>추가</caption>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. var iRow = grd_deptlist.row;
  249. var instcd = grd_deptlist.valueMatrix(iRow, grd_deptlist.colRef("instcd"));
  250. var deptcd = grd_deptlist.valueMatrix(iRow, grd_deptlist.colRef("deptcd"));
  251. var deptnm = grd_deptlist.valueMatrix(iRow, grd_deptlist.colRef("deptnm"));
  252. grd_plcelist.addRow(); //행추가.
  253. var iRow = grd_plcelist.row;
  254. grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("instcd")) = instcd;
  255. grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("deptcd")) = deptcd;
  256. grd_plcelist.valueMatrix(iRow, grd_plcelist.colRef("deptnm")) = deptnm;
  257. ]]>
  258. </script>
  259. </button>
  260. <button id="btn_del" class="btn5_letter2" style="left:675px; top:45px; width:42px; height:19px; ">
  261. <caption>삭제</caption>
  262. <script type="javascript" ev:event="DOMActivate">
  263. <![CDATA[
  264. grd_plcelist.rowStatus(grd_plcelist.row) = "4";
  265. ]]>
  266. </script>
  267. </button>
  268. <button id="btn_sav" class="btn5_letter2" style="left:720px; top:45px; width:42px; height:19px; ">
  269. <caption>저장</caption>
  270. <script type="javascript" ev:event="DOMActivate">
  271. <![CDATA[
  272. fSave();
  273. ]]>
  274. </script>
  275. </button>
  276. </group>
  277. <button id="btn_cnfm" class="btn4_letter2" style="left:705px; top:515px; width:56px; height:22px; ">
  278. <caption>확인</caption>
  279. <script type="javascript" ev:event="DOMActivate">
  280. <![CDATA[
  281. fCnfm();
  282. ]]>
  283. </script>
  284. </button>
  285. <button id="button1" class="btn4_letter2" style="left:145px; top:515px; width:56px; height:22px; ">
  286. <caption>확인</caption>
  287. <script type="javascript" ev:event="DOMActivate">
  288. <![CDATA[
  289. fCnfm2();
  290. ]]>
  291. </script>
  292. </button>
  293. </xhtml:body>
  294. </xhtml:html>