SMZSS00101_시스템메시지관리.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <msglist>
  12. </msglist>
  13. </list>
  14. <item>
  15. <msgcd/>
  16. <msgcnts1/>
  17. <msgcnts2/>
  18. <msgcnts3/>
  19. <bizabbr/>
  20. <msgtype/>
  21. <msgno/>
  22. <msgdesc/>
  23. <fstrgstrid/>
  24. <fstrgstdt/>
  25. <lastupdtrid/>
  26. <lastupdtdt/>
  27. </item>
  28. </main>
  29. <send>
  30. <bizabbr/>
  31. <msgtype/>
  32. <msgno/>
  33. <msglist/>
  34. </send>
  35. <init>
  36. <bizabbr>
  37. <Z0001Z0009>
  38. <cdengabbrnm>live</cdengabbrnm>
  39. </Z0001Z0009>
  40. <Z0001Z0009>
  41. <cdengabbrnm>sql</cdengabbrnm>
  42. </Z0001Z0009>
  43. <Z0001Z0009>
  44. <cdengabbrnm>ocs</cdengabbrnm>
  45. </Z0001Z0009>
  46. </bizabbr>
  47. <msgtype>
  48. <label>error</label>
  49. <value>error</value>
  50. </msgtype>
  51. <msgtype>
  52. <label>info</label>
  53. <value>info</value>
  54. </msgtype>
  55. </init>
  56. <temp/>
  57. </root>
  58. </instance>
  59. <submission id="TXZSS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  60. <script type="javascript" ev:event="xforms-ready">
  61. <![CDATA[
  62. zbcfGetKindCodeList(new Array("Z0001"), new Array("Z0009"), new Array("/root/init/bizabbr"), false, new Array("cdnm","cdengabbrnm"));
  63. model.refresh();
  64. //fCheckAuth();
  65. fInitialize();
  66. ]]>
  67. </script>
  68. <submission id="TRZSS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  69. <submission id="TRZBC00104" mediatype="application/x-www-form-urlencoded" method="post"/>
  70. </model>
  71. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  73. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  74. <script type="javascript">
  75. <![CDATA[
  76. function fCheckAuth() {
  77. if (!checkAuth("x")) {
  78. btn_save.disabled = true;
  79. btn_loadexcel.disabled=true;
  80. btn_delete.disabled=true;
  81. btn_insert.disabled=true;
  82. btn_update.disabled=true;
  83. btn_clear.disabled=true;
  84. }
  85. }
  86. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  87. function fInitialize() {
  88. fEnableInsertButton();
  89. model.removeNodeset("/root/main/list/msglist");
  90. model.resetInstanceNode("/root/send");
  91. model.resetInstanceNode("/root/main/item");
  92. var default_syscd = model.getValue("/root/init/syscd[1]/value");
  93. model.setValue("/root/send/bizabbr",default_syscd);
  94. model.refresh();
  95. }
  96. // 시스템코드, 메시지종료, 메시지 번호가 입력되면 이들을 조합하여 메시지코드를 설정한다.
  97. function fSetMessageCode() {
  98. var bizabbr = model.getValue("/root/main/item/bizabbr");
  99. var msgkind = model.getValue("/root/main/item/msgtype");
  100. var msgno = model.getValue("/root/main/item/msgno");
  101. var msgcd = bizabbr + "." + msgkind + "." + msgno;
  102. model.makeValue("/root/main/item/msgcd",msgcd);
  103. model.refresh();
  104. }
  105. function fEnableInsertButton() {
  106. btn_insert.disabled = false;
  107. btn_update.disabled = true;
  108. }
  109. function fEnableUpdateButton() {
  110. btn_insert.disabled = true;
  111. btn_update.disabled = false;
  112. }
  113. function fDeleteSelectedRows(grd,markonly) {
  114. var rowIdx;
  115. if (grd.selectedRows > 0) {
  116. var selectedRows = Array(grd.selectedRows);
  117. for(i=0;i<grd.selectedRows;i++) {
  118. selectedRows[i] = grd.selectedRow(i);
  119. }
  120. if (markonly != null && markonly == true) { // mark delete
  121. for(i=selectedRows.length-1;i>=0;i--) {
  122. rowIdx = selectedRows[i];
  123. if(grd.rowstatus(rowIdx) == 1 ) { // just inserted row
  124. grd.deleterow(rowIdx,false);
  125. } else {
  126. grd.addStatus(rowIdx,"delete");
  127. }
  128. }
  129. } else {
  130. for(i=selectedRows.length-1;i>=0;i--) {
  131. rowIdx = selectedRows[i];
  132. grd.deleterow(rowIdx,false);
  133. }
  134. }
  135. }
  136. }
  137. ]]>
  138. </script>
  139. </xhtml:head>
  140. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  141. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  142. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">시스템 메시지 관리</caption>
  143. </group>
  144. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  145. <line id="line4" class="line_2" style="x1:0px; y1:176px; x2:1194px; y2:176px; "/>
  146. <line id="line3" class="line_2" style="x1:0px; y1:152px; x2:1194px; y2:152px; "/>
  147. <line id="line2" class="line_2" style="x1:0px; y1:128px; x2:1194px; y2:128px; "/>
  148. <line id="line6" class="line_2" style="x1:0px; y1:104px; x2:1194px; y2:104px; "/>
  149. <group id="group2" style="left:0px; top:14px; width:1194px; height:35px; vertical-align:top; ">
  150. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  151. <caption id="caption2" class="search_name" style="left:16px; top:8px; width:91px; height:17px; ">업무 구분 :</caption>
  152. <line id="line13" style="x1:1106px; y1:7px; x2:1106px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  153. <caption id="caption21" class="search_name" style="left:331px; top:8px; width:104px; height:17px; ">메시지 종류 :</caption>
  154. <caption id="caption22" class="search_name" style="left:661px; top:8px; width:104px; height:17px; ">메시지 번호 :</caption>
  155. <input id="ipt_msgno" ref="/root/send/msgno" class="input_search" navindex="3" style="left:770px; top:8px; width:200px; height:19px; "/>
  156. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1122px; top:7px; width:56px; height:22px; ">
  157. <caption>조회</caption>
  158. <script type="javascript" ev:event="DOMActivate">
  159. <![CDATA[
  160. var updtdata = getGridUpdateData(grd_msglist);
  161. if ( updtdata != "" ) {
  162. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  163. if (ret != 6) { // not OK
  164. return;
  165. }
  166. }
  167. //model.send("TRZSS00101");
  168. //setAlertOn();
  169. submit("TRZSS00101");
  170. ]]>
  171. </script>
  172. </button>
  173. <select1 id="cmb_bizabbr" ref="/root/send/bizabbr" class="combo_s_essential" navindex="1" appearance="minimal" style="left:110px; top:8px; width:200px; height:19px; ">
  174. <choices>
  175. <itemset nodeset="/root/init/bizabbr/Z0001Z0009">
  176. <label ref="cdengabbrnm"/>
  177. <value ref="cdengabbrnm"/>
  178. </itemset>
  179. </choices>
  180. </select1>
  181. <select1 id="cmb_msgtype" ref="/root/send/msgtype" class="combo_search" navindex="2" appearance="minimal" style="left:440px; top:8px; width:200px; height:19px; ">
  182. <choices>
  183. <itemset nodeset="/root/init/msgtype">
  184. <label ref="label"/>
  185. <value ref="value"/>
  186. </itemset>
  187. </choices>
  188. </select1>
  189. </group>
  190. <caption id="caption1" class="tit_2" style="left:6px; top:530px; width:139px; height:13px; ">메시지 입력/수정</caption>
  191. <line id="line1" class="line_1" style="x1:0px; y1:545px; x2:1194px; y2:545px; "/>
  192. <caption id="cap_bizabbrinput" class="cell_1" style="left:0px; top:550px; width:100px; height:23px; ">업무 구분</caption>
  193. <caption id="cap_msgtypeinput" class="cell_1" style="left:299px; top:550px; width:100px; height:23px; ">메시지 종류</caption>
  194. <caption id="cap_msgcnts1" class="cell_1" style="left:0px; top:574px; width:100px; height:23px; ">메시지 1</caption>
  195. <caption id="cap_msgcnts2" class="cell_1" style="left:0px; top:598px; width:100px; height:23px; ">메시지 2</caption>
  196. <caption id="cap_msgcnts3" class="cell_1" style="left:0px; top:622px; width:100px; height:23px; ">메시지 3</caption>
  197. <caption id="cap_msgnoinput" class="cell_1" style="left:598px; top:550px; width:100px; height:23px; ">메시지 번호</caption>
  198. <caption id="caption19" class="cell_1" style="left:0px; top:646px; width:100px; height:71px; ">메시지 설명</caption>
  199. <caption id="caption20" class="tit_2" style="left:6px; top:62px; width:118px; height:13px; ">메시지 조회 목록</caption>
  200. <line id="line8" class="line_1" style="x1:0px; y1:77px; x2:1194px; y2:77px; "/>
  201. <line id="line7" class="line_3" style="x1:0px; y1:741px; x2:1194px; y2:741px; "/>
  202. <caption id="cap_msgcd" class="cell_1" style="left:898px; top:550px; width:100px; height:23px; ">메시지 코드</caption>
  203. <datagrid id="grd_msglist" nodeset="/root/main/list/msglist" caption="업무구분^메시지종류^메시지번호^메시지 1^메시지 2^메시지 3^메시지상세설명^최초등록자^등록일시^최종수정자^수정일시" colwidth="60, 70, 80, 380, 290, 270, 100, 100, 100, 100, 66" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" style="left:0px; top:82px; width:1194px; height:438px; ">
  204. <col ref="bizabbr"/>
  205. <col ref="msgtype"/>
  206. <col ref="msgno"/>
  207. <col ref="msgcnts1" style="word-wrap:none; "/>
  208. <col ref="msgcnts2" style="word-wrap:none; "/>
  209. <col ref="msgcnts3" style="word-wrap:none; "/>
  210. <col ref="msgdesc" visibility="hidden"/>
  211. <col ref="fstrgstrid" visibility="hidden"/>
  212. <col ref="fstrgstdt" visibility="hidden"/>
  213. <col ref="lastupdtrid" visibility="hidden"/>
  214. <col ref="lastupdtdt" visibility="hidden"/>
  215. <script type="javascript" ev:event="onrowchanged">
  216. <![CDATA[
  217. var cur_row = grd_msglist.row;
  218. if ( cur_row > 0 ) {
  219. fEnableUpdateButton();
  220. model.copyNode("/root/main/item","/root/main/list/msglist["+cur_row+"]");
  221. fSetMessageCode();
  222. model.refresh();
  223. }
  224. ]]>
  225. </script>
  226. </datagrid>
  227. <select1 id="cmb_bizabbrinput" ref="/root/main/item/bizabbr" class="combo_essential" navindex="5" appearance="minimal" _required="true" style="left:103px; top:551px; width:193px; height:19px; ">
  228. <choices>
  229. <itemset nodeset="/root/init/bizabbr/Z0001Z0009">
  230. <label ref="cdengabbrnm"/>
  231. <value ref="cdengabbrnm"/>
  232. </itemset>
  233. </choices>
  234. <script type="javascript" ev:event="xforms-select">
  235. <![CDATA[
  236. fSetMessageCode();
  237. ]]>
  238. </script>
  239. <script type="javascript" ev:event="xforms-value-changed">
  240. <![CDATA[
  241. fEnableInsertButton();
  242. ]]>
  243. </script>
  244. </select1>
  245. <select1 id="cmb_msgtypeinput" ref="/root/main/item/msgtype" class="combo_essential" navindex="6" appearance="minimal" _required="true" style="left:402px; top:551px; width:193px; height:19px; ">
  246. <choices>
  247. <itemset nodeset="/root/init/msgtype">
  248. <label ref="label"/>
  249. <value ref="value"/>
  250. </itemset>
  251. </choices>
  252. <script type="javascript" ev:event="xforms-select">
  253. <![CDATA[
  254. fSetMessageCode();
  255. ]]>
  256. </script>
  257. <script type="javascript" ev:event="xforms-value-changed">
  258. <![CDATA[
  259. fEnableInsertButton();
  260. ]]>
  261. </script>
  262. </select1>
  263. <input id="ipt_msgnoinput" ref="/root/main/item/msgno" class="input_essential" navindex="7" maxlength="5" _required="true" style="left:701px; top:551px; width:193px; height:19px; ">
  264. <script type="javascript" ev:event="xforms-value-changed">
  265. <![CDATA[
  266. fEnableInsertButton();
  267. fSetMessageCode();
  268. ]]>
  269. </script>
  270. </input>
  271. <input id="ipt_msgcd" ref="/root/main/item/msgcd" class="input_default" appearance="input" style="left:1001px; top:551px; width:193px; height:19px; "/>
  272. <input id="ipt_msgcnts1" ref="/root/main/item/msgcnts1" class="input_essential" navindex="8" _required="true" style="left:103px; top:575px; width:1091px; height:19px; "/>
  273. <input id="ipt_msgcnts2" ref="/root/main/item/msgcnts2" class="input_default" navindex="9" appearance="input" style="left:103px; top:599px; width:1091px; height:19px; "/>
  274. <input id="ipt_msgcnts3" ref="/root/main/item/msgcnts3" class="input_default" navindex="10" appearance="input" style="left:103px; top:623px; width:1091px; height:19px; "/>
  275. <textarea id="tar_msgdesc" ref="/root/main/item/msgdesc" navindex="11" style="left:103px; top:647px; width:1091px; height:67px; "/>
  276. <button id="btn_clear" class="btn2_letter3" navindex="14" style="left:1140px; top:524px; width:53px; height:19px; ">
  277. <caption>지우기</caption>
  278. <script type="javascript" ev:event="DOMActivate">
  279. <![CDATA[
  280. fEnableInsertButton();
  281. model.resetInstanceNode("/root/main/item");
  282. model.refresh();
  283. ]]>
  284. </script>
  285. </button>
  286. <button id="btn_delete" class="btn2_letter5" style="left:1118px; top:56px; width:75px; height:19px; ">
  287. <caption>선택행삭제</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. fDeleteSelectedRows(grd_msglist,false);
  291. grd_msglist.refresh();
  292. ]]>
  293. </script>
  294. </button>
  295. <button id="btn_update" class="btn2_letter2" navindex="13" style="left:1095px; top:524px; width:42px; height:19px; ">
  296. <caption>수정</caption>
  297. <script type="javascript" ev:event="DOMActivate">
  298. <![CDATA[
  299. //if ( !fCheckMandatoryInput() ) return;
  300. if (!isRequiredGroup("group3")) return;
  301. var cur_row = grd_msglist.row; // 행 번호 가져오기
  302. if (cur_row > 0) {
  303. // 그리드에 추가
  304. model.copyNode("/root/main/list/msglist["+cur_row+"]","/root/main/item");
  305. grd_msglist.addStatus(cur_row,"update"); // 행을 업데이트 상태로 변경
  306. model.refresh();
  307. }
  308. ]]>
  309. </script>
  310. </button>
  311. <button id="btn_insert" class="btn2_letter2" navindex="12" style="left:1050px; top:524px; width:42px; height:19px; ">
  312. <caption>추가</caption>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. //if ( !fCheckMandatoryInput() ) return;
  316. if (!isRequiredGroup("group3")) return;
  317. grd_msglist.addItem(); // 입력할 행 추가.
  318. var cur_row = grd_msglist.row; // 추가된 행 번호 가져오기
  319. // 그리드에 추가
  320. model.copyNode("/root/main/list/msglist["+cur_row+"]","/root/main/item");
  321. fEnableUpdateButton();
  322. model.refresh();
  323. ]]>
  324. </script>
  325. </button>
  326. <output id="input1" ref="/root/main/item/lastupdtdt" class="output_fix" format="yyyy-mm-dd hh:nn:ss" appearance="output" style="left:1001px; top:719px; width:193px; height:19px; "/>
  327. <output id="combo1" ref="/root/main/item/fstrgstrid" class="output_fix" style="left:103px; top:719px; width:193px; height:19px; "/>
  328. <caption id="caption4" class="cell_1" style="left:598px; top:718px; width:100px; height:23px; vertical-align:middle; ">최종 수정자</caption>
  329. <caption id="caption10" class="cell_1" style="left:898px; top:718px; width:100px; height:23px; vertical-align:middle; ">최종 수정일시</caption>
  330. <output id="combo2" ref="/root/main/item/fstrgstdt" class="output_fix" format="yyyy-mm-dd hh:nn:ss" appearance="output" style="left:402px; top:719px; width:193px; height:19px; "/>
  331. <caption id="caption12" class="cell_1" style="left:0px; top:718px; width:100px; height:23px; vertical-align:middle; ">최초 등록자</caption>
  332. <caption id="caption13" class="cell_1" style="left:299px; top:718px; width:100px; height:23px; vertical-align:middle; ">최초 등록일시</caption>
  333. <output id="input2" ref="/root/main/item/lastupdtrid" class="output_fix" style="left:701px; top:719px; width:193px; height:19px; "/>
  334. <button id="btn_loadexcel" class="btn2_letter4" style="left:1052px; top:56px; width:64px; height:19px; ">
  335. <caption>엑셀입력</caption>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. var fileName = window.fileDialog("open", "", false);
  339. grd_msglist.loadExcel(fileName, 1);
  340. // 입력 상태로 변경
  341. var rows = grd_msglist.rows;
  342. for(var i=1;i<rows;i++) {
  343. grd_msglist.addStatus(i,"insert");
  344. }
  345. ]]>
  346. </script>
  347. </button>
  348. <button id="btn_saveexcel" class="btn2_letter4" style="left:985px; top:56px; width:64px; height:19px; ">
  349. <caption>엑셀저장</caption>
  350. <script type="javascript" ev:event="DOMActivate">
  351. <![CDATA[
  352. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  353. if (fileName != "")
  354. {
  355. grd_msglist.saveExcel(fileName, "SheetName", true, true, "", "", false);
  356. }
  357. ]]>
  358. </script>
  359. </button>
  360. </group>
  361. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  362. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  363. <button id="btn_save" class="btn4_letter2" navindex="15" style="left:1067px; top:3px; width:56px; height:22px; ">
  364. <caption>저장</caption>
  365. <script type="javascript" ev:event="DOMActivate">
  366. <![CDATA[
  367. var updtdata = getGridUpdateData(grd_msglist);
  368. if (updtdata == "") {
  369. messageBox("변경된 데이터가","I004");
  370. return;
  371. }
  372. //alert("grid update data = " + grd_msglist.getUpdateData());
  373. model.setValue("/root/send/msglist",grd_msglist.getUpdateData());
  374. if ( submit("TXZSS00101") ) {
  375. grd_msglist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  376. model.setValue("/root/send/msglist","");
  377. }
  378. ]]>
  379. </script>
  380. </button>
  381. <button id="btn_init" class="btn4_letter3" navindex="16" style="left:1126px; top:3px; width:68px; height:22px; ">
  382. <caption>초기화</caption>
  383. <script type="javascript" ev:event="DOMActivate">
  384. <![CDATA[
  385. var updtdata = getGridUpdateData(grd_msglist);
  386. if (updtdata != "" ) {
  387. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  388. if (ret != 6) { // not OK
  389. return;
  390. }
  391. }
  392. fInitialize();
  393. ]]>
  394. </script>
  395. </button>
  396. </group>
  397. </xhtml:body>
  398. </xhtml:html>