SMZMR00201_원격출력서식관리.xrw 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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. <list>
  11. <doculist>
  12. <docuid/>
  13. <docunm/>
  14. <docuinfo/>
  15. <fstrgstrid/>
  16. <fstrgstdt/>
  17. <lastupdtrid/>
  18. <lastupdtdt/>
  19. </doculist>
  20. </list>
  21. </main>
  22. <send>
  23. <srchcond/>
  24. <srchcnts/>
  25. <doculist/>
  26. </send>
  27. <init/>
  28. <temp/>
  29. </root>
  30. </instance>
  31. <script ev:event="xforms-ready" type="javascript">
  32. <![CDATA[
  33. // 화면초기화
  34. fInitialize();
  35. // 모든 조건으로 설정
  36. model.setValue("/root/send/srchcond","0");
  37. ipt_srchcnts.disabled = true;
  38. model.refresh();
  39. // 조회
  40. submit("TRZMR00201");
  41. ]]>
  42. </script>
  43. <submission id="TRZMR00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  44. <submission id="TXZMR00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  45. </model>
  46. <script src="../../../com/commonweb/js/common.js" type="javascript"/>
  47. <script src="../../../com/commonweb/js/tfHelper.js" type="javascript"/>
  48. <script src="../../../com/commonweb/js/dateHelper.js" type="javascript"/>
  49. <script type="javascript">
  50. <![CDATA[
  51. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  52. function fInitialize() {
  53. model.removeNodeset("/root/main/list");
  54. model.resetInstanceNode("/root/send");
  55. model.resetInstanceNode("/root/main");
  56. }
  57. ]]>
  58. </script>
  59. </xhtml:head>
  60. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1196;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  61. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  62. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:248px; height:14px; ">원격 출력 서식 관리</caption>
  63. </group>
  64. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  65. <line id="line4" class="line_2" style="x1:0px; y1:176px; x2:1194px; y2:176px; "/>
  66. <line id="line3" class="line_2" style="x1:0px; y1:152px; x2:1194px; y2:152px; "/>
  67. <line id="line2" class="line_2" style="x1:0px; y1:128px; x2:1194px; y2:128px; "/>
  68. <line id="line6" class="line_2" style="x1:0px; y1:104px; x2:1194px; y2:104px; "/>
  69. <group id="group2" style="left:0px; top:14px; width:1194px; height:35px; vertical-align:top; ">
  70. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; "/>
  71. <caption id="caption2" class="search_name" style="left:16px; top:8px; width:91px; height:17px; ">검색조건 :</caption>
  72. <line id="line13" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
  73. <input id="ipt_srchcnts" ref="/root/send/srchcnts" class="input_search" navindex="3" style="left:311px; top:8px; width:374px; height:19px; ">
  74. <script ev:event="xforms-value-changed" type="javascript">
  75. <![CDATA[
  76. if (model.getValue("/root/send/srchcond") == "0") {
  77. model.setValue("/root/send/srchcnts","");
  78. }
  79. model.refresh();
  80. ]]>
  81. </script>
  82. </input>
  83. <select1 id="cmb_srchcond" ref="/root/send/srchcond" class="combo_search" navindex="1" appearance="minimal" style="left:110px; top:8px; width:200px; height:19px; ">
  84. <choices>
  85. <item>
  86. <label>전체</label>
  87. <value>0</value>
  88. </item>
  89. <item>
  90. <label>서식ID/서식명칭</label>
  91. <value>1</value>
  92. </item>
  93. <item>
  94. <label>서식ID</label>
  95. <value>2</value>
  96. </item>
  97. <item>
  98. <label>서식명칭</label>
  99. <value>3</value>
  100. </item>
  101. </choices>
  102. <script ev:event="xforms-value-changed" type="javascript">
  103. <![CDATA[
  104. if (model.getValue("/root/send/srchcond") == "0") {
  105. model.setValue("/root/send/srchcnts","");
  106. ipt_srchcnts.disabled = true;
  107. submit("TRZMR00201");
  108. } else {
  109. ipt_srchcnts.disabled = false;
  110. }
  111. model.refresh();
  112. ]]>
  113. </script>
  114. </select1>
  115. <button id="btn_search" class="btn1_letter2" style="left:1112; top:7px; width:56px; height:22px; ">
  116. <caption>조회</caption>
  117. <script ev:event="DOMActivate" type="javascript">
  118. <![CDATA[
  119. submit("TRZMR00201");
  120. ]]>
  121. </script>
  122. </button>
  123. </group>
  124. <line id="line8" class="line_1" style="x1:0px; y1:77px; x2:1194px; y2:77px; "/>
  125. <line id="line7" class="line_3" style="x1:0px; y1:741px; x2:1194px; y2:741px; "/>
  126. <button id="button3" class="btn2_letter3" style="left:1140px; top:54px; width:53px; height:19px; ">
  127. <caption>행삭제</caption>
  128. <script ev:event="DOMActivate" type="javascript">
  129. <![CDATA[
  130. var cur_row = grd_list.row; // 행 번호 가져오기
  131. var iStatus = grd_list.rowstatus(cur_row);
  132. if(cur_row<0) {
  133. alert("삭제할 행을 선택해주세요");
  134. return;
  135. }
  136. if (iStatus == 1) { // 새로 삽입된 행이면
  137. grd_list.deleteitem(cur_row);
  138. } else if (iStatus == 3) { // DB에서 가져온 값은 아니고 임시로 입력한 값이면
  139. grd_list.deleteitem(cur_row);
  140. } else {
  141. messageBox("기존 서식을 삭제", "E001");
  142. }
  143. ]]>
  144. </script>
  145. </button>
  146. <button id="button11" class="btn2_letter3" style="left:1084px; top:54px; width:53px; height:19px; ">
  147. <caption>행추가</caption>
  148. <script ev:event="DOMActivate" type="javascript">
  149. <![CDATA[
  150. grd_list.addItem();
  151. grd_list.editCell();
  152. ]]>
  153. </script>
  154. </button>
  155. <caption id="caption1" class="tit_2" style="left:5px; top:60px; width:149px; height:13px; ">원격 출력 서식 리스트</caption>
  156. <datagrid id="grd_list" nodeset="/root/main/list/doculist" caption="서식ID^서식명칭^서식정보 (URL)^최초등록자^등록일시^최종수정자^최종수정일시" colwidth="70, 268, 374, 100, 130, 100, 130" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" style="left:0px; top:82px; width:1194px; height:660px; border-color:#808080; ">
  157. <col ref="docuid" type="input" maxlength="10" _key="true"/>
  158. <col ref="docunm" type="input" maxlength="60"/>
  159. <col ref="docuinfo" type="input" maxlength="200"/>
  160. <col class="output_fix" ref="fstrgstrid"/>
  161. <col class="output_fix" ref="fstrgstdt" format="yyyy-mm-dd hh:nn:ss"/>
  162. <col class="output_fix" ref="lastupdtrid"/>
  163. <col class="output_fix" ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss"/>
  164. <script ev:event="xforms-value-changed" type="javascript">
  165. <![CDATA[
  166. // 그리드의 한 셀에 값을 입력하는 시점에 등록일시, 최종수정자, 최종수정일이 자동으로 기록되도록 함
  167. var cur_row = grd_list.row; // 행 번호 가져오기
  168. if (model.getValue("/root/main/list/doculist[" + cur_row + "]/fstrgstdt") == ""){ // 등록일시가 없는 경우에만 등록일시, 최초등록자를 setting해줌
  169. model.setValue("/root/main/list/doculist[" + cur_row + "]/fstrgstrid", getUserId()); // 최초등록자
  170. model.setValue("/root/main/list/doculist[" + cur_row + "]/fstrgstdt", getCurrentDate()+getCurrentTime()); // 등록일시
  171. }
  172. model.setValue("/root/main/list/doculist[" + cur_row + "]/lastupdtrid", getUserId()); // 최종수정자
  173. model.setValue("/root/main/list/doculist[" + cur_row + "]/lastupdtdt", getCurrentDate()+getCurrentTime()); // 최종수정일시
  174. ]]>
  175. </script>
  176. </datagrid>
  177. </group>
  178. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  179. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  180. <button id="btn_save" class="btn4_letter2" navindex="15" style="left:1068px; top:2px; width:56px; height:22px; ">
  181. <caption>저장</caption>
  182. <script ev:event="DOMActivate" type="javascript">
  183. <![CDATA[
  184. var updtdata = getGridUpdateData(grd_list);
  185. if (updtdata == "") {
  186. messageBox("변경된 데이터가","I004");
  187. return;
  188. }
  189. var total_row = grd_list.rows; // 전체 행의 수 가져오기
  190. var iStatus;
  191. for (var i = 1; i<total_row; i++){
  192. iStatus = grd_list.rowstatus(i);
  193. if (( iStatus == "1")
  194. && (model.getValue("/root/main/list/doculist[" + i + "]/docuid") == ""
  195. || model.getValue("/root/main/list/doculist[" + i + "]/docunm") == ""
  196. || model.getValue("/root/main/list/doculist[" + i + "]/docuinfo") == "" )) {
  197. grd_list.deleteitem(i);
  198. model.refresh();
  199. return;
  200. }
  201. if ((iStatus == "2" || iStatus == "3") // 0: 상태 없음 2: 수정 3: 추가
  202. && (model.getValue("/root/main/list/doculist[" + i + "]/docuid") == ""
  203. || model.getValue("/root/main/list/doculist[" + i + "]/docunm") == ""
  204. || model.getValue("/root/main/list/doculist[" + i + "]/docuinfo") == "" )) {
  205. messageBox("정보가 입력되지 않은 항목이 있어서, 데이터를 저장/수정", "E001");
  206. return;
  207. }
  208. }
  209. model.setValue("/root/send/doculist",grd_list.getUpdateData());
  210. if ( submit("TXZMR00201") ) {
  211. grd_list.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  212. }
  213. submit("TRZMR00201");
  214. ]]>
  215. </script>
  216. </button>
  217. </group>
  218. <button id="button5" class="btn4_letter3" style="left:1126px; top:15px; width:68px; height:22px; ">
  219. <caption>초기화</caption>
  220. <script ev:event="DOMActivate" type="javascript">
  221. <![CDATA[
  222. model.removeNodeset("/root/main/list");
  223. model.resetInstanceNode("/root/main");
  224. model.resetInstanceNode("/root/send");
  225. model.refresh();
  226. ]]>
  227. </script>
  228. </button>
  229. </xhtml:body>
  230. </xhtml:html>