SPMNG00401_세탁물청구부서코드HELP.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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>세탁물청구부서코드 HELP</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <deptcodelist>
  11. <deptcd/>
  12. <deptnm/>
  13. <csrreqdeptcd/>
  14. <supdeptnm/>
  15. <userid/>
  16. <useyn/>
  17. </deptcodelist>
  18. <cond>
  19. <deptcd/>
  20. </cond>
  21. <csrdeptlist/>
  22. </main>
  23. <target/>
  24. <init>
  25. <refcond>
  26. <label>부서코드</label>
  27. <value>deptcd</value>
  28. <label>부서명</label>
  29. <value>deptnm</value>
  30. </refcond>
  31. </init>
  32. <send>
  33. <deptref>
  34. <refcond/>
  35. <deptnm/>
  36. <deptcd/>
  37. <instcd/>
  38. </deptref>
  39. <comcdref>
  40. <cdgrupid/>
  41. <cdid/>
  42. <cdnm/>
  43. </comcdref>
  44. <reqdata>
  45. <deptcd/>
  46. </reqdata>
  47. </send>
  48. </root>
  49. </instance>
  50. <script type="javascript" ev:event="xforms-ready">
  51. <![CDATA[
  52. submit("TRMNG00402");
  53. model.makeValue("/root/send/useyn", "Y");
  54. submit("TRMNG00401");
  55. ]]>
  56. </script>
  57. <script type="javascript">
  58. <![CDATA[
  59. function fSettingGoodList(pnode) {
  60. var codynode = instance1.selectNodes(pnode + "/*");
  61. var addRow = grd_deptlist.rows - grd_deptlist.fixedRows;
  62. for (var j = 1; j <= codynode.length; j++)
  63. {
  64. if(addRow > grd_deptlist.rows - grd_deptlist.fixedRows)
  65. {
  66. misfGridIUD(grd_deptlist,"A");
  67. addRow = grd_deptlist.rows - grd_deptlist.fixedRows;
  68. }
  69. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/deptcd" , model.getValue(pnode +"/" + "grd_deptlist" + "[" + j + "]/deptcd"));
  70. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/deptnm" , model.getValue(pnode +"/" + "grd_deptlist" + "[" + j + "]/depthngnm"));
  71. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/supdeptcd" , cmb_dept.value);
  72. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/supdeptnm" , cmb_dept.label);
  73. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/userid" , getUserInfo("userid"));
  74. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/useyn" , "Y");
  75. addRow = addRow + 1;
  76. }
  77. model.recalculate();
  78. model.refresh();
  79. }
  80. ]]>
  81. </script>
  82. <submission id="TRMNG00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/csrdeptlist"/>
  83. <submission id="TRMNG00404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/deptcodelist"/>
  84. <submission id="TXMNG00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata1" resultref="/root/temp"/>
  85. <submission id="TRMNG00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csrreqdeptlist"/>
  86. <submission id="TXMNG00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata2" resultref="/root/temp"/>
  87. </model>
  88. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  90. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  91. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  92. </xhtml:head>
  93. <xhtml:body pagewidth="600" pageheight="550" guideline="1,622;2,552;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  94. <group id="group3" scroll="auto" style="left:0px; top:0px; width:580px; height:520px; ">
  95. <group id="group2" style="left:0px; top:0px; width:580px; height:30px; ">
  96. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:580px; height:29px; "/>
  97. <button id="btn_search" class="btn1_letter2" style="left:519px; top:4px; width:56px; height:22px; ">
  98. <caption>조회</caption>
  99. <script type="javascript" ev:event="DOMActivate">
  100. <![CDATA[
  101. var chk = cmb_dept.value;
  102. if (chk == null || chk == "") {
  103. alert("상위부서를 선택하세요");
  104. return;
  105. }
  106. model.setValue("/root/send/reqdata/deptcd", model.getValue("/root/main/cond/deptcd"));
  107. submit("TRMNG00404");
  108. ]]>
  109. </script>
  110. </button>
  111. <line id="line13" class="line_4" style="x1:515px; y1:0px; x2:515px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  112. <caption id="caption2" class="search_name" style="left:10px; top:6px; width:86px; height:17px; ">조회조건:</caption>
  113. <select1 id="cmb_dept" ref="/root/main/cond/deptcd" appearance="minimal" style="left:100px; top:5px; width:100px; height:19px; ">
  114. <choices>
  115. <itemset nodeset="/root/main/csrdeptlist">
  116. <label ref="deptnm"/>
  117. <value ref="deptcd"/>
  118. </itemset>
  119. </choices>
  120. <script type="javascript" ev:event="xforms-value-changed">
  121. <![CDATA[
  122. btn_search.dispatch("DOMActivate");
  123. ]]>
  124. </script>
  125. </select1>
  126. </group>
  127. <caption id="caption1" class="tit_2" style="left:5px; top:45px; width:113px; height:14px; ">하위부서 리스트</caption>
  128. <line id="line1" class="line_1" style="x1:0px; y1:60px; x2:580px; y2:60px; "/>
  129. <datagrid id="grd_deptlist" nodeset="/root/main/deptcodelist" caption="부서코드^부서명^부서구분" colsep="^" colwidth="144, 230, 100, 100, 100, 100, 100" dataheight="23" defaultrows="0" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="never" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:65px; width:580px; height:455px; ">
  130. <col class="input_essential" editable="false" ref="deptcd" type="inputbutton"/>
  131. <col ref="deptnm"/>
  132. <col class="input_essential" ref="csrreqdeptcd" type="combo" _key="true" style="text-align:center; ">
  133. <choices>
  134. <itemset nodeset="/root/main/csrreqdeptlist">
  135. <label ref="csrreqdeptnm"/>
  136. <value ref="csrreqdeptcd"/>
  137. </itemset>
  138. </choices>
  139. </col>
  140. <col ref="supdeptcd" visibility="hidden"/>
  141. <col ref="supdeptnm" visibility="hidden"/>
  142. <col ref="userid" visibility="hidden"/>
  143. <col ref="useyn" visibility="hidden"/>
  144. <script type="javascript" ev:event="onaftersort">
  145. <![CDATA[
  146. grd_deptlist.gridToInstance();
  147. ]]>
  148. </script>
  149. <script type="javascript" ev:event="onbuttonclick">
  150. <![CDATA[
  151. var chk = cmb_dept.value;
  152. if (chk == null || chk == "") {
  153. alert("상위부서를 선택하세요");
  154. return;
  155. }
  156. model.property("flag") = "req";
  157. if (grd_deptlist.col == grd_deptlist.colRef("deptcd")) {//부서코드 버튼을 눌렀을 때
  158. // var recv_list = "deptcd,deptnm";
  159. model.removeNodeset("/root/copynode");
  160. model.makeNode("/root/copynode");
  161. model.refresh();
  162. rszfOpenPopUpListByWndName(grd_deptlist,"","deptcd,deptnm","SPMNG00400","","", "Y");
  163. var CSV = model.getValue(gvParamPath +"/SPMNG00400_/SPMNG00400_value");
  164. setCSVToNode("/root/copynode", CSV, "grd_deptlist");
  165. fSettingGoodList("/root/copynode");
  166. // model.setValue("/root/main/deptcodelist[" + grd_deptlist.row + "]/deptcd", model.getValue("/root/copynode/grd_deptlist/deptcd"));
  167. // model.setValue("/root/main/deptcodelist[" + grd_deptlist.row + "]/deptnm", model.getValue("/root/copynode/grd_deptlist/depthngnm"));
  168. }
  169. ]]>
  170. </script>
  171. </datagrid>
  172. <button id="btn_save" class="btn5_letter2" style="left:530px; top:40px; width:100px; height:20px; ">
  173. <caption>저장</caption>
  174. <script type="javascript" ev:event="DOMActivate">
  175. <![CDATA[
  176. for (i=grd_deptlist.fixedRows; i<grd_deptlist.rows; i++ ) {
  177. var csrreqdeptcd = grd_deptlist.valueMatrix(i, grd_deptlist.colRef("csrreqdeptcd"));
  178. if (csrreqdeptcd == null || csrreqdeptcd == "") {
  179. if ( grd_deptlist.rowStatus(i) != "3" ) {
  180. alert("부서구분을 입력하세요");
  181. return;
  182. }
  183. }
  184. }
  185. var update = getGridUpdateData(grd_deptlist);
  186. if (update == "")
  187. {
  188. messageBox("변경된 데이터가","I004");
  189. return;
  190. }
  191. model.makeValue("/root/send/reqdata1/reqdeptinfo", update);
  192. model.makeValue("/root/send/reqdata2/csrreqdept", update);
  193. submit("TXMNG00403");
  194. submit("TXMNG00402");
  195. btn_search.dispatch("DOMActivate");
  196. ]]>
  197. </script>
  198. </button>
  199. <button id="button1" class="btn2_letter3" style="left:415px; top:40px; width:53px; height:19px; ">
  200. <caption>행추가</caption>
  201. <script type="javascript" ev:event="DOMActivate">
  202. <![CDATA[
  203. grd_deptlist.addRow();
  204. grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("useyn")) = "Y";
  205. ]]>
  206. </script>
  207. </button>
  208. <button id="btn_del" class="btn2_letter3" style="left:470px; top:40px; width:53px; height:19px; ">
  209. <caption>행삭제</caption>
  210. <script type="javascript" ev:event="DOMActivate">
  211. <![CDATA[
  212. if(grd_deptlist.rows - grd_deptlist.fixedRows == 0) {
  213. messageBox("삭제할 행이 존재하지 않습니다.");
  214. return;
  215. }
  216. if(grd_deptlist.row < 0) {
  217. messageBox("삭제할 행을 선택하십시오.", "E");
  218. return;
  219. }
  220. grd_deptlist.rowStatus(grd_deptlist.row) = "4";
  221. ]]>
  222. </script>
  223. </button>
  224. </group>
  225. <group id="group1" scroll="auto" style="left:0px; top:521px; width:580px; height:27px; ">
  226. <button id="btn_confirm" class="btn4_letter2" style="left:461px; top:2px; width:56px; height:22px; ">
  227. <caption>확인</caption>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. if(grd_deptlist.rows - grd_deptlist.fixedRows == 0)
  231. {
  232. messageBox("적용할 내역이","I004");
  233. window.close();
  234. return;
  235. }
  236. var iParam = model.getValue(grd_deptlist.nodeset);
  237. var nodelist = instance1.selectNodes(grd_deptlist.nodeset + "[chkyn='Y']");
  238. var rCVS = getNodeListCSV(nodelist);
  239. if ( checkOpener() ) {
  240. opener.javascript.setParameter("SPMNG00400_", rCVS);
  241. } else {
  242. var rtn = messageBox("상위화면을 찾을 수", "E001");
  243. }
  244. window.close();
  245. // misfPopUpListReturn(grd_deptlist);
  246. ]]>
  247. </script>
  248. </button>
  249. <button id="btn_cancel" class="btn4_letter2" style="left:520px; top:2px; width:56px; height:22px; ">
  250. <caption>취소</caption>
  251. <script type="javascript" ev:event="DOMActivate">
  252. <![CDATA[
  253. misfPopUpListCancel();
  254. ]]>
  255. </script>
  256. </button>
  257. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:518px; y2:0px; "/>
  258. </group>
  259. </xhtml:body>
  260. </xhtml:html>