SMMNG00401_린넨부서구분등록.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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. <grupdeptlist/>
  11. <deptlist/>
  12. </main>
  13. <send>
  14. <instcd/>
  15. <grupdeptnm/>
  16. </send>
  17. <init>
  18. </init>
  19. <hidden>
  20. <common>
  21. <instcdinfo/>
  22. </common>
  23. </hidden>
  24. <temp/>
  25. <copynode/>
  26. </root>
  27. </instance>
  28. <script type="javascript">
  29. <![CDATA[
  30. var rowStat = "C";
  31. var curRow = -1;
  32. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  33. function fInitialize() {
  34. model.removeNodeset("/root/main/csrreqdeptlist");
  35. model.removeNodeset("/root/main/csrdeptlist");
  36. zbcfGetCodeList (new Array("Z0007"),new Array("/root/hidden/common/instcdinfo"),true);
  37. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  38. model.resetInstanceNode("/root/send/reqdata");
  39. fSearch();
  40. //화면 권한 설정
  41. btn_save.disabled = !(checkAuth("X"));
  42. model.refresh();
  43. }
  44. function fSearch(){
  45. model.removeNodeset("/root/main/deptlist");
  46. submit("TRMNG00405");
  47. }
  48. function fSearch2() {
  49. model.makeValue("/root/send/reqdata1/grupdeptcd", grd_grupdeptlist.valueMatrix(grd_grupdeptlist.row, grd_grupdeptlist.colRef("grupdeptcd"))); //청구부서구분코드
  50. submit("TRMNG00406");
  51. }
  52. function fSavData() {
  53. model.makeValue("/root/send/reqdata/grupdeptlist", getGridUpdateData(grd_grupdeptlist) );
  54. submit("TXMNG00404");
  55. }
  56. function fsave(){
  57. var updtdata = getGridUpdateData(grd_deptlist);
  58. if (updtdata == "")
  59. {
  60. messageBox("변경된 데이터가","I004");
  61. return;
  62. }
  63. model.makeValue("/root/send/reqdata2/deptlist", updtdata);
  64. submit("TXMNG00405");
  65. fSearch2();
  66. }
  67. function fSettingGoodList(pnode)
  68. {
  69. var codynode = instance1.selectNodes(pnode + "/*");
  70. var addRow = grd_deptlist.rows - grd_deptlist.fixedRows;
  71. for (var j = 1; j <= codynode.length; j++)
  72. {
  73. if(addRow > grd_deptlist.rows - grd_deptlist.fixedRows)
  74. {
  75. misfGridIUD(grd_deptlist,"A");
  76. addRow = grd_deptlist.rows - grd_deptlist.fixedRows;
  77. }
  78. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/deptcd" , model.getValue(pnode +"/" + "grd_deptlist" + "[" + j + "]/deptcd"));
  79. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/deptnm" , model.getValue(pnode +"/" + "grd_deptlist" + "[" + j + "]/depthngnm"));
  80. model.setValue(grd_deptlist.nodeset + "[" + addRow + "]/grupdeptcd", grd_grupdeptlist.valueMatrix(grd_grupdeptlist.row, grd_grupdeptlist.colRef("grupdeptcd")));
  81. addRow = addRow + 1;
  82. }
  83. model.recalculate();
  84. model.refresh();
  85. }
  86. ]]>
  87. </script>
  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. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  93. <script type="javascript" ev:event="xforms-ready">
  94. <![CDATA[
  95. fInitialize();
  96. submit("TRMNG02302");
  97. var getuserinstcd = model.getValue("/root/temp/useinfo/cdid");
  98. if ( getuserinstcd == "N") {
  99. btn_clndept.visible = false;
  100. }
  101. // btn_search.dispatch("DOMActivate");
  102. ]]>
  103. </script>
  104. <submission id="TRMNG00405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/grupdeptlist"/>
  105. <submission id="TXMNG00404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp"/>
  106. <submission id="TXMNG00405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata2" resultref="/root/temp"/>
  107. <submission id="TRMNG00406" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata1" resultref="/root/main/deptlist"/>
  108. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  109. <submission id="TRMNG02302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  110. </model>
  111. </xhtml:head>
  112. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  113. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  114. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">린넨부서구분 등록</caption>
  115. </group>
  116. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  117. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  118. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
  119. <caption id="cap_instcd" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">기관코드 :</caption>
  120. <line id="line13" class="line_4" style="x1:1120px; y1:5px; x2:1120px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  121. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:1130px; top:8px; width:56px; height:22px; ">
  122. <caption>조회</caption>
  123. <script type="javascript" ev:event="DOMActivate">
  124. <![CDATA[
  125. fSearch();
  126. ]]>
  127. </script>
  128. </button>
  129. <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_s_essential" disabled="true" appearance="minimal" style="left:102px; top:8px; width:158px; height:19px; ">
  130. <choices>
  131. <itemset nodeset="/root/hidden/common/instcdinfo/Z0007">
  132. <label ref="cdnm"/>
  133. <value ref="cdid"/>
  134. </itemset>
  135. </choices>
  136. <script type="javascript" ev:event="xforms-value-changed">
  137. <![CDATA[
  138. btn_search.dispatch("DOMActivate");
  139. ]]>
  140. </script>
  141. </select1>
  142. <caption id="caption2" class="search_name" style="left:270px; top:10px; width:88px; height:17px; ">그룹명 :</caption>
  143. <input id="ipt_reqdeptnm" ref="/root/send/grupdeptnm" class="input_search" style="left:348px; top:8px; width:172px; height:19px; "/>
  144. </group>
  145. <line id="line2" class="line_1" style="x1:250px; y1:74px; x2:1195px; y2:74px; "/>
  146. <caption id="caption8" class="tit_2" style="left:5px; top:59px; width:133px; height:14px; ">그룹구분</caption>
  147. <button id="btn_grdadd" class="btn2_letter2" disabled="true" style="left:1064px; top:54px; width:42px; height:19px; ">
  148. <caption>추가</caption>
  149. <script type="javascript" ev:event="DOMActivate">
  150. <![CDATA[
  151. grd_deptlist.addRow();
  152. var cur_row = grd_deptlist.row;
  153. grd_deptlist.editCell();
  154. ]]>
  155. </script>
  156. </button>
  157. <caption id="caption1" class="tit_2" style="left:255px; top:59px; width:133px; height:14px; ">린넨청구부서 등록</caption>
  158. <line id="line1" class="line_1" style="x1:5px; y1:74px; x2:245px; y2:74px; "/>
  159. <datagrid id="grd_grupdeptlist" nodeset="/root/main/grupdeptlist" caption="코드^그룹명^사용" colsep="^" colwidth="50, 109, 40" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:5px; top:79px; width:240px; height:641px; ">
  160. <col disabled="true" ref="grupdeptcd" style="text-align:center; "/>
  161. <col ref="grupdeptnm" type="input"/>
  162. <script type="javascript" ev:event="onclick">
  163. <![CDATA[
  164. if(grd_grupdeptlist.isCell(event.target) && grd_grupdeptlist.mouseRow >= grd_grupdeptlist.fixedrows){
  165. if(grd_grupdeptlist.rowStatus(grd_grupdeptlist.row) == "0") {
  166. fSearch2();
  167. btn_grdadd.disabled = false;
  168. btn_save.disabled = false;
  169. }
  170. }
  171. ]]>
  172. </script>
  173. </datagrid>
  174. <button id="button1" class="btn2_letter3" style="left:1009px; top:54px; width:53px; height:19px; ">
  175. <caption>초기화</caption>
  176. <script type="javascript" ev:event="DOMActivate">
  177. <![CDATA[
  178. fInitialize();
  179. ]]>
  180. </script>
  181. </button>
  182. <button id="btn_save" class="btn5_letter2" disabled="true" style="left:1152px; top:54px; width:42px; height:19px; ">
  183. <caption>저장</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. fsave();
  187. fSearch2();
  188. ]]>
  189. </script>
  190. </button>
  191. <datagrid id="grd_deptlist" nodeset="/root/main/deptlist" caption="부서코드^부서명^그룹구분^비고^정렬^수정자ID^수정자^수정일자" colsep="^" colwidth="107, 150, 100, 250, 60, 0, 100, 100" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:250px; top:79px; width:945px; height:640px; ">
  192. <col class="input_essential" ref="deptcd" type="inputbutton" _key="true"/>
  193. <col ref="deptnm"/>
  194. <col class="input_essential" ref="grupdeptcd" type="combo" _key="true" style="text-align:center; ">
  195. <choices>
  196. <itemset nodeset="/root/main/grupdeptlist">
  197. <label ref="grupdeptnm"/>
  198. <value ref="grupdeptcd"/>
  199. </itemset>
  200. </choices>
  201. </col>
  202. <col ref="cmt" type="input"/>
  203. <col ref="sortseq" type="input" style="text-align:center; "/>
  204. <col ref="lastupdtrid" type="output" style="text-align:center; "/>
  205. <col ref="lastupdtrnm" type="output" style="text-align:center; "/>
  206. <col ref="lastupdtdt" type="output" format="yyyy-mm-dd" style="text-align:center; "/>
  207. <script type="javascript" ev:event="onaftersort">
  208. <![CDATA[
  209. grd_deptlist.gridToInstance();
  210. ]]>
  211. </script>
  212. <script type="javascript" ev:event="onbuttonclick">
  213. <![CDATA[
  214. model.property("flag") = "req";
  215. if (grd_deptlist.col == grd_deptlist.colRef("deptcd")) {//부서코드 버튼을 눌렀을 때
  216. // var recv_list = "deptcd,deptnm";
  217. model.removeNodeset("/root/copynode");
  218. model.makeNode("/root/copynode");
  219. model.refresh();
  220. rszfOpenPopUpListByWndName(grd_deptlist,"","deptcd,deptnm","SPMNG00402","","", "Y");
  221. var CSV = model.getValue(gvParamPath +"/SPMNG00402_/SPMNG00402_value");
  222. setCSVToNode("/root/copynode", CSV, "grd_deptlist");
  223. fSettingGoodList("/root/copynode");
  224. }
  225. ]]>
  226. </script>
  227. <script type="javascript" ev:event="xforms-value-changed">
  228. <![CDATA[
  229. if (grd_deptlist.col == grd_deptlist.colRef("deptcd"))
  230. {
  231. if(grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("deptcd")) != "")
  232. {
  233. model.removenode("/root/init/main/deptcodelist");
  234. rszfOpenPopUpListByWndName(grd_deptlist,"","deptcd,deptnm","SPRSS00230","","", "Y");
  235. var CSV = model.getValue(gvParamPath +"/SPRSS00230_/SPRSS00230_value");
  236. setCSVToNode("/root/copynode", CSV, "grd_deptlist");
  237. fSettingGoodList("/root/copynode");
  238. }
  239. model.refresh();
  240. }
  241. ]]>
  242. </script>
  243. <script type="javascript" ev:event="onclick">
  244. <![CDATA[
  245. grd_deptlist.editCell();
  246. ]]>
  247. </script>
  248. </datagrid>
  249. <button id="btn_new" class="btn2_letter2" navindex="3" style="left:111px; top:54px; width:42px; height:19px; ">
  250. <caption>추가</caption>
  251. <script type="javascript" ev:event="DOMActivate">
  252. <![CDATA[
  253. grd_grupdeptlist.addRow();
  254. ]]>
  255. </script>
  256. </button>
  257. <button id="btn_updt" class="btn2_letter2" navindex="4" style="left:156px; top:54px; width:42px; height:19px; ">
  258. <caption>삭제</caption>
  259. <script type="javascript" ev:event="DOMActivate">
  260. <![CDATA[
  261. if((grd_grupdeptlist.rowStatus(grd_grupdeptlist.row) =="1")||(grd_grupdeptlist.rowStatus(grd_grupdeptlist.row) =="3")){
  262. grd_grupdeptlist.deleteRow(grd_grupdeptlist.row);
  263. }else{
  264. grd_grupdeptlist.rowStatus(grd_grupdeptlist.row) = "4";
  265. }
  266. ]]>
  267. </script>
  268. </button>
  269. <button id="btn_save1" class="btn5_letter2" navindex="17" style="left:201px; top:54px; width:42px; height:19px; ">
  270. <caption>저장</caption>
  271. <script type="javascript" ev:event="DOMActivate">
  272. <![CDATA[
  273. var btn = messageBox("저장하시겠습니까?", "Q");
  274. if(btn == "6") {
  275. fSavData();
  276. fSearch()
  277. } else {
  278. return;
  279. }
  280. ]]>
  281. </script>
  282. </button>
  283. <button id="button3" class="btn2_letter2" style="left:1108px; top:54px; width:45px; height:19px; ">
  284. <caption>삭제</caption>
  285. <script type="javascript" ev:event="DOMActivate">
  286. <![CDATA[
  287. if(grd_deptlist.row > -1 && grd_deptlist.row >= grd_deptlist.fixedrows){
  288. var firstRow = grd_deptlist.selectedRow(0);
  289. var lastRow = grd_deptlist.selectedRow(grd_deptlist.selectedRows-1);
  290. for(var i = firstRow; i <= lastRow; i++) {
  291. grd_deptlist.addStatus(i, "delete");
  292. }
  293. }
  294. ]]>
  295. </script>
  296. </button>
  297. </group>
  298. </xhtml:body>
  299. </xhtml:html>