SMZSB00101_배치프로그램관리.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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. <bizabbr/>
  11. <selectitem>1</selectitem>
  12. <selectcond/>
  13. <list>
  14. <batprgm>
  15. <bizabbr/>
  16. <modulenm/>
  17. <prgmid/>
  18. <prgmnm/>
  19. <useyn/>
  20. <fstrgstrid/>
  21. <fstrgstdt/>
  22. <lastupdtrid/>
  23. <lastupdtdt/>
  24. </batprgm>
  25. </list>
  26. <exe>
  27. <bizabbr/>
  28. <modulenm/>
  29. <prgmid/>
  30. <prgmnm/>
  31. <paramcnts/>
  32. <systemcnts/>
  33. </exe>
  34. </main>
  35. <send>
  36. <bizabbr/>
  37. <modulenm/>
  38. <prgmid/>
  39. <prgmnm/>
  40. <updtdata/>
  41. <offset/>
  42. <pagesize>200</pagesize>
  43. </send>
  44. <init>
  45. <bizabbr>
  46. </bizabbr>
  47. <useyn>
  48. <label>Y</label>
  49. <value>Y</value>
  50. </useyn>
  51. <useyn>
  52. <label>N</label>
  53. <value>N</value>
  54. </useyn>
  55. </init>
  56. <hidden>
  57. </hidden>
  58. </root>
  59. </instance>
  60. <submission id="TRZSB00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" add="bottom" resultref="/root/main/list/batprgm"/>
  61. <script type="javascript" ev:event="xforms-ready">
  62. <![CDATA[
  63. zbcfGetKindCodeList(new Array("Z0001"), new Array("Z0009"), new Array("/root/init/bizabbr"), false, new Array("cdnm","cdengabbrnm"));
  64. fInitialize();
  65. model.refresh();
  66. ]]>
  67. </script>
  68. <submission id="TXZSB00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  69. <submission id="TXZSB00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/exe" resultref="/root/dummy"/>
  70. <submission id="TRZBC00104" mediatype="application/x-www-form-urlencoded" method="post"/>
  71. </model>
  72. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  74. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  75. <script type="javascript">
  76. <![CDATA[
  77. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  78. function fInitialize() {
  79. model.removeNodeset("/root/main/list/batprgm");
  80. model.resetInstanceNode("/root/main/exe");
  81. model.setValue("/root/main/bizabbr","");
  82. model.setValue("/root/main/selectitem","1");
  83. model.setValue("/root/main/selectcond","");
  84. // Light Grid 경우 초기화
  85. grd_batprgm.rebuild();
  86. }
  87. function fNodeCopyXmlGrid() {
  88. var cur_row = grd_batprgm.row;
  89. if ( cur_row > 0 ) {
  90. model.copyNode("/root/main/exe","/root/main/list/batprgm["+cur_row+"]");
  91. model.makeNode("/root/main/exe/paramcnts");
  92. model.makeNode("/root/main/exe/systemcnts");
  93. }
  94. }
  95. function fNodeCopyDelimeterGrid() {
  96. var cur_row = grd_batprgm.row;
  97. if ( cur_row > 0 ) {
  98. model.setValue("/root/main/exe/bizabbr",grd_batprgm.valueMatrix(cur_row,1));
  99. model.setValue("/root/main/exe/modulenm",grd_batprgm.valueMatrix(cur_row,2));
  100. model.setValue("/root/main/exe/prgmid",grd_batprgm.valueMatrix(cur_row,3));
  101. model.setValue("/root/main/exe/prgmnm",grd_batprgm.valueMatrix(cur_row,4));
  102. }
  103. }
  104. function fSubmitOnScroll() {
  105. if(grd_batprgm.vscroll.attribute("max") == grd_batprgm.vscroll.attribute("pos")) {
  106. // end of scroll
  107. model.setValue("/root/send/offset",grd_batprgm.rows-1); // grid의 header row는 제외
  108. submit("TRZSB00101");
  109. grd_batprgm.dispatch("onmouseup");
  110. }
  111. }
  112. ]]>
  113. </script>
  114. </xhtml:head>
  115. <xhtml:body guideline="1,1243;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  116. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  117. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:13px; ">배치 프로그램 관리</caption>
  118. </group>
  119. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  120. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  121. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
  122. <caption>초기화</caption>
  123. <script type="javascript" ev:event="DOMActivate">
  124. <![CDATA[
  125. var updtdata = getGridUpdateData(grd_batprgm);
  126. if (updtdata != "" ) {
  127. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  128. if (ret != 6) { // not OK
  129. return;
  130. }
  131. }
  132. fInitialize();
  133. model.refresh();
  134. ]]>
  135. </script>
  136. </button>
  137. <button id="btn_save" class="btn4_letter2" style="left:1067px; top:3px; width:56px; height:22px; ">
  138. <caption>저장</caption>
  139. <script type="javascript" ev:event="DOMActivate">
  140. <![CDATA[
  141. var updtdata = getGridUpdateData(grd_batprgm);
  142. if (updtdata == "") {
  143. messageBox("변경된 데이터가","I004");
  144. return;
  145. }
  146. model.setValue("/root/send/updtdata",updtdata);
  147. if ( submit("TXZSB00101") ) {
  148. grd_batprgm.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  149. model.setValue("/root/send/updtdata","");
  150. }
  151. ]]>
  152. </script>
  153. </button>
  154. </group>
  155. <group id="group5" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  156. <line id="line15" class="line_2" style="x1:0px; y1:734px; x2:1194px; y2:734px; "/>
  157. <line id="line16" class="line_2" style="x1:0px; y1:735px; x2:1194px; y2:735px; "/>
  158. <line id="line17" class="line_2" style="x1:0px; y1:736px; x2:1194px; y2:736px; "/>
  159. <group id="group6" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  160. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  161. <caption id="caption21" class="search_name" style="left:16px; top:8px; width:125px; height:17px; ">업무 구분 :</caption>
  162. <line id="line18" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; border-left-style:solid; "/>
  163. <caption id="caption59" class="search_name" style="left:275px; top:8px; width:125px; height:17px; ">조회 항목 :</caption>
  164. <button id="btn_select" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; ">
  165. <caption>조회</caption>
  166. <script type="javascript" ev:event="DOMActivate">
  167. <![CDATA[
  168. var updtdata = getGridUpdateData(grd_batprgm);
  169. if ( updtdata != "" ) {
  170. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  171. if (ret != 6) { // not OK
  172. return;
  173. }
  174. }
  175. model.resetInstanceNode("/root/send/select");
  176. model.setValue("/root/send/bizabbr",model.getValue("/root/main/bizabbr"));
  177. model.setValue("/root/send/offset","0");
  178. var queryitem = model.getValue("/root/main/selectitem");
  179. if ( queryitem == "1" ) {
  180. model.setValue("/root/send/modulenm",model.getValue("/root/main/selectcond")+"%");
  181. model.resetInstanceNode("/root/send/prgmid");
  182. model.resetInstanceNode("/root/send/prgmnm");
  183. } else if ( queryitem == "2" ) {
  184. model.setValue("/root/send/prgmid",model.getValue("/root/main/selectcond")+"%");
  185. model.resetInstanceNode("/root/send/modulenm");
  186. model.resetInstanceNode("/root/send/prgmnm");
  187. } else if ( queryitem == "3" ) {
  188. model.setValue("/root/send/prgmnm",model.getValue("/root/main/selectcond")+"%");
  189. model.resetInstanceNode("/root/send/prgmid");
  190. model.resetInstanceNode("/root/send/modulenm");
  191. }
  192. model.removeNodeset("/root/main/list/batprgm");
  193. grd_batprgm.rebuild(); // delimeter grid 초기화.
  194. //var stime = new Date();
  195. submit("TRZSB00101");
  196. //var etime = new Date();
  197. //alert(etime -stime);
  198. ]]>
  199. </script>
  200. </button>
  201. <select1 id="cmb_selectitem" ref="/root/main/selectitem" class="combo_search" appearance="minimal" style="left:370px; top:8px; width:165px; height:19px; ">
  202. <choices>
  203. <item>
  204. <label>모듈명</label>
  205. <value>1</value>
  206. </item>
  207. <item>
  208. <label>프로그램 ID</label>
  209. <value>2</value>
  210. </item>
  211. <item>
  212. <label>프로그램 명</label>
  213. <value>3</value>
  214. </item>
  215. </choices>
  216. </select1>
  217. <input id="ipt_selectcond" ref="/root/main/selectcond" class="input_search" style="left:540px; top:8px; width:310px; height:19px; "/>
  218. <select1 id="cmb_bizcd" ref="/root/main/bizabbr" class="combo_search" appearance="minimal" style="left:110px; top:8px; width:105px; height:19px; ">
  219. <choices>
  220. <itemset nodeset="/root/init/bizabbr/Z0001Z0009">
  221. <label ref="cdengabbrnm"/>
  222. <value ref="cdengabbrnm"/>
  223. </itemset>
  224. </choices>
  225. </select1>
  226. </group>
  227. <caption id="caption22" class="tit_2" style="left:5px; top:594px; width:131px; height:13px; ">배치 프로그램 실행</caption>
  228. <line id="line19" class="line_1" style="x1:0px; y1:609px; x2:1194px; y2:609px; "/>
  229. <caption id="caption23" class="cell_1" style="left:0px; top:614px; width:100px; height:23px; vertical-align:middle; ">업무 구분</caption>
  230. <caption id="caption34" class="cell_1" style="left:223px; top:614px; width:100px; height:23px; vertical-align:middle; ">모듈명</caption>
  231. <caption id="caption42" class="cell_1" style="left:793px; top:614px; width:100px; height:23px; vertical-align:middle; ">프로그램 명</caption>
  232. <caption id="caption47" class="cell_1" style="left:0px; top:638px; width:100px; height:47px; vertical-align:middle; ">실행 매개변수</caption>
  233. <caption id="caption48" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; ">배치 프로그램 목록</caption>
  234. <line id="line20" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  235. <line id="line23" class="line_2" style="x1:856px; y1:221px; x2:1194px; y2:221px; "/>
  236. <line id="line24" class="line_3" style="x1:0px; y1:732px; x2:1194px; y2:732px; "/>
  237. <button id="button8" class="btn5_letter2" style="left:1151px; top:589px; width:42px; height:19px; ">
  238. <caption>실행</caption>
  239. <script type="javascript" ev:event="DOMActivate">
  240. <![CDATA[
  241. setAlertOn();
  242. submit("TXZSB00102");
  243. ]]>
  244. </script>
  245. </button>
  246. <caption id="caption35" class="cell_1" style="left:513px; top:614px; width:100px; height:23px; vertical-align:middle; ">프로그램 ID</caption>
  247. <button id="btn_delrow" class="btn2_letter5" style="left:1117px; top:50px; width:75px; height:19px; ">
  248. <caption>선택행삭제</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. deleteSelectedRows(grd_batprgm,false);
  252. grd_batprgm.refresh();
  253. ]]>
  254. </script>
  255. </button>
  256. <button id="btn_addrow" class="btn2_letter3" style="left:1062px; top:50px; width:53px; height:19px; ">
  257. <caption>행추가</caption>
  258. <script type="javascript" ev:event="DOMActivate">
  259. <![CDATA[
  260. grd_batprgm.addrow(false);
  261. var curRow = grd_batprgm.row;
  262. var bizAbbr;
  263. if (curRow > 1) { // 윗 행의 업무구분 값으로 설정
  264. bizAbbr = grd_batprgm.valueMatrix(curRow-1,1);
  265. } else { // 맨 위에 있는 행이면 조회 조건의 업무 구분값으로 설정
  266. bizAbbr = model.getValue("/root/main/bizabbr");
  267. if (bizAbbr == "") { // 디폴트는 com
  268. bizAbbr = "com";
  269. }
  270. }
  271. //grd_batprgm.isReadOnly(curRow,2) = false;
  272. grd_batprgm.valueMatrix(curRow,1) = bizAbbr;
  273. grd_batprgm.valueMatrix(curRow,5) ="Y";
  274. grd_batprgm.refresh();
  275. ]]>
  276. </script>
  277. </button>
  278. <datagrid id="grd_batprgm" nodeset="/root/main/list/batprgm" caption="업무구분^모듈명^프로그램 ID^프로그램 명^사용^최초등록자^최초등록일자^최종수정자^최종수정일자" colsep="^" colwidth="73, 177, 177, 355, 40, 80, 80, 80, 80" dataheight="23" datatype="xml" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:1194px; height:515px; ">
  279. <col ref="bizabbr" type="combo">
  280. <choices>
  281. <itemset nodeset="/root/init/bizabbr/Z0001Z0009">
  282. <label ref="cdengabbrnm"/>
  283. <value ref="cdengabbrnm"/>
  284. </itemset>
  285. </choices>
  286. </col>
  287. <col ref="modulenm" type="input" _key="true"/>
  288. <col ref="prgmid" type="input" _key="true"/>
  289. <col ref="prgmnm" type="input"/>
  290. <col ref="useyn" type="combo">
  291. <choices>
  292. <itemset nodeset="/root/init/useyn">
  293. <label ref="label"/>
  294. <value ref="value"/>
  295. </itemset>
  296. </choices>
  297. </col>
  298. <col ref="fstrgstrid"/>
  299. <col ref="fstrgstdt" format="yyyy-mm-dd" showmask="true"/>
  300. <col ref="lastupdtrid"/>
  301. <col ref="lastupdtdt" format="yyyy-mm-dd" showmask="true"/>
  302. <script type="javascript" ev:event="onrowchanged">
  303. <![CDATA[
  304. fNodeCopyXmlGrid();
  305. //fNodeCopyDelimeterGrid();
  306. model.refresh();
  307. ]]>
  308. </script>
  309. <script type="javascript" ev:event="onscroll">
  310. <![CDATA[
  311. fSubmitOnScroll();
  312. ]]>
  313. </script>
  314. </datagrid>
  315. <output id="ipt_exebizcd" ref="/root/main/exe/bizabbr" class="output_fix" appearance="input" style="left:103px; top:615px; width:117px; height:19px; "/>
  316. <output id="ipt_exemodulenm" ref="/root/main/exe/modulenm" class="output_fix" appearance="input" style="left:326px; top:615px; width:184px; height:19px; "/>
  317. <output id="ipt_exeprgmid" ref="/root/main/exe/prgmid" class="output_fix" appearance="input" style="left:616px; top:615px; width:174px; height:19px; "/>
  318. <output id="ipt_exeprgmnm" ref="/root/main/exe/prgmnm" class="output_fix" appearance="input" style="left:895px; top:615px; width:299px; height:19px; "/>
  319. <textarea id="tar_exeparamcnts" ref="/root/main/exe/paramcnts" style="left:103px; top:639px; width:1091px; height:43px; "/>
  320. <button id="btn_saveexcel" class="btn2_letter4" style="left:930px; top:50px; width:64px; height:19px; ">
  321. <caption>엑셀저장</caption>
  322. <script type="javascript" ev:event="DOMActivate">
  323. <![CDATA[
  324. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  325. if (fileName != "")
  326. {
  327. grd_batprgm.saveExcel(fileName, "SheetName", true, true, "", "", false);
  328. }
  329. ]]>
  330. </script>
  331. </button>
  332. <button id="btn_loadexcel" class="btn2_letter4" style="left:996px; top:50px; width:64px; height:19px; ">
  333. <caption>엑셀입력</caption>
  334. <script type="javascript" ev:event="DOMActivate">
  335. <![CDATA[
  336. var fileName = window.fileDialog("open", "", false);
  337. grd_batprgm.loadExcel(fileName, 1);
  338. // 입력 상태로 변경
  339. var rows = grd_batprgm.rows;
  340. for(var i=1;i<rows;i++) {
  341. grd_batprgm.addStatus(i,"insert");
  342. }
  343. ]]>
  344. </script>
  345. </button>
  346. <caption id="caption1" class="cell_1" style="left:0px; top:686px; width:100px; height:47px; vertical-align:middle; ">시스템변수</caption>
  347. <textarea id="textarea1" ref="/root/main/exe/systemcnts" style="left:103px; top:688px; width:1091px; height:43px; "/>
  348. </group>
  349. </xhtml:body>
  350. </xhtml:html>