SMRSS01201_CSR 청구부서 등록.xrw 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  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>CSR 청구부서 등록</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <csrreqdeptlist>
  11. <csrreqdeptcd/>
  12. <csrreqdeptnm/>
  13. <useyn/>
  14. <updtspec/>
  15. <cmt/>
  16. <fstrgstdt/>
  17. <fstrgstrid/>
  18. <fstrgstrnm/>
  19. <lastupdtrid/>
  20. <lastupdtrnm/>
  21. <lastupdtdt/>
  22. </csrreqdeptlist>
  23. <csrdeptlist>
  24. <deptcd/>
  25. <deptnm/>
  26. <csrreqdeptcd/>
  27. <useyn/>
  28. <cmt/>
  29. <lastupdtrid/>
  30. <lastupdtrnm/>
  31. <lastupdtdt/>
  32. <fstrgstdt/>
  33. <instcd/>
  34. <csrreqdeptnm/>
  35. <useynnm/>
  36. </csrdeptlist>
  37. <cond>
  38. <csrreqdeptcd/>
  39. <csrreqdeptnm/>
  40. <useyn/>
  41. <fstrgstdt/>
  42. <fstrgstrid/>
  43. <fstrgstrnm/>
  44. <lastupdtdt/>
  45. <lastupdtrid/>
  46. <lastupdtrnm/>
  47. <updtspec/>
  48. <cmt/>
  49. </cond>
  50. <cond2>
  51. <csrreqdeptcd/>
  52. </cond2>
  53. </main>
  54. <send>
  55. <instcd/>
  56. <deptcd/>
  57. <deptnm/>
  58. <csrreqdeptcd2/>
  59. <useyn>Y</useyn>
  60. </send>
  61. <init>
  62. </init>
  63. <hidden/>
  64. <temp/>
  65. <copynode/>
  66. </root>
  67. </instance>
  68. <script type="javascript">
  69. <![CDATA[
  70. var rowStat = "C";
  71. var curRow = -1;
  72. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  73. function fInitialize() {
  74. model.removeNodeset("/root/main/csrreqdeptlist");
  75. model.removeNodeset("/root/main/csrdeptlist");
  76. //model.resetInstanceNode("/root/send");
  77. misfGridInit(grd_csrreqdeptlist);
  78. misfComboComCdListMulti("Z0007", "cmb_instcd");
  79. // rszfComboAppendBlankChild("rdo_daykind");
  80. //misfMsterDetailSet(grd_csrtmlist,null,"TRRSC06301","Y"); //마스터 설정
  81. model.resetInstanceNode("/root/send/reqData");
  82. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  83. fSearch();
  84. //화면 권한 설정
  85. btn_save.disabled = !(checkAuth("X"));
  86. btn_prt.disabled= !(checkAuth("P"));
  87. model.refresh();
  88. }
  89. /* ---------------------------------------------------------------------
  90. *
  91. * SMRSS01201_CSR 청구부서 등록.xrw (SMRFC00700.xfm - JScript )
  92. *
  93. * - Version :
  94. * 1) : Ver.1.00.01
  95. * : Create By
  96. * : 2009.01.09
  97. ---------------------------------------------------------------------- */
  98. /*
  99. * 부서구분을 조회
  100. */
  101. function fSearch(){
  102. model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  103. model.removeNodeset("/root/main/csrdeptlist");
  104. if(!isRequiredControls("cmb_instcd")) return;
  105. submit("TRRSS01211");
  106. }
  107. function fSearch2() {
  108. // model.copyNode("/root/main/cond", "/root/main/csrreqdeptlist[" + grd_csrreqdeptlist.row + "]"); //부서구분이 가지고 있는 instance를 복사(아래 상세 화면에 보여줌.)
  109. model.makeValue("/root/send/reqdata/csrreqdeptcd", grd_csrreqdeptlist.valueMatrix(grd_csrreqdeptlist.row, grd_csrreqdeptlist.colRef("csrreqdeptcd"))); //청구부서구분코드
  110. model.makeValue("/root/send/reqdata/useyn", model.getValue("/root/send/useyn"));
  111. submit("TRRSS01212");
  112. var useyn;
  113. var csrreqdeptcd;
  114. var useynnm;
  115. for(var i = 1; i < grd_reqcollcdeptlist.rows; i++) {
  116. useyn = grd_reqcollcdeptlist.valueMatrix(i, grd_reqcollcdeptlist.colRef("useyn"));
  117. csrreqdeptcd = grd_reqcollcdeptlist.valueMatrix(i, grd_reqcollcdeptlist.colRef("csrreqdeptcd"));
  118. grd_reqcollcdeptlist.valueMatrix(i, grd_reqcollcdeptlist.colRef("csrreqdeptnm")) = model.getValue("/root/main/csrreqdeptlist[csrreqdeptcd='" + csrreqdeptcd + "']/csrreqdeptnm");
  119. if(useyn == "Y") {
  120. useynnm = "사용";
  121. } else {
  122. useynnm = "미사용";
  123. }
  124. grd_reqcollcdeptlist.valueMatrix(i ,grd_reqcollcdeptlist.colRef("useynnm")) = useynnm;
  125. }
  126. }
  127. function fSavData() {
  128. if(!checkKeyColumn("grd_csrreqdeptlist")) return;
  129. model.makeValue("/root/send/reqdata/csrdeptlist", getGridUpdateData(grd_csrreqdeptlist) );
  130. submit("TXRSS01211");
  131. }
  132. function fsave(){
  133. if(!checkKeyColumn("grd_reqcollcdeptlist")) return;
  134. var updtdata = getGridUpdateData(grd_reqcollcdeptlist);
  135. if (updtdata == "")
  136. {
  137. messageBox("변경된 데이터가","I004");
  138. return;
  139. }
  140. // rtn = messageBox("", "Q002");
  141. // if(rtn != "6" ) return;
  142. model.makeValue("/root/send/reqdata/csrreqdept", updtdata);
  143. submit("TXRSS01212");
  144. //fSearch2();
  145. }
  146. function fCheckTime()
  147. {
  148. if(grd_csrtmlist.col == grd_csrtmlist.colRef("clotm"))
  149. {
  150. var sTime = grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm"));
  151. if(sTime == "" || sTime == null)
  152. {
  153. return;
  154. }
  155. if(sTime.length != 4)
  156. {
  157. messageBox("네자리를 ","C001");
  158. grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm")) = "";
  159. return;
  160. }
  161. var sFrontTime = sTime.substr(0, 2);
  162. var sBackTime = sTime.substr(2, 2);
  163. if(parseInt(sFrontTime) > 24)
  164. {
  165. messageBox("24시를 ","E001");
  166. grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm")) = "";
  167. return;
  168. }
  169. if(parseInt(sBackTime) > 59)
  170. {
  171. messageBox("59분을 ","E001");
  172. grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm")) = "";
  173. return;
  174. }
  175. }
  176. }
  177. function fUpdtCtrl() {
  178. ipt_csrreqdeptnm.disabled = false;
  179. rdo_useyn.disabled = false;
  180. tar_cmt.disabled = false;
  181. ipt_updtspec.disabled = false;
  182. }
  183. function fInitCtrl() {
  184. model.resetInstanceNode("/root/main/cond");
  185. ipt_csrreqdeptcd.disabled = false;
  186. ipt_csrreqdeptnm.disabled = false;
  187. rdo_useyn.disabled = false;
  188. ipt_updtspec.disabled = false;
  189. tar_cmt.disabled = false;
  190. model.refresh();
  191. }
  192. function fInitData() {
  193. model.resetInstanceNode("/root/main/cond");
  194. }
  195. function fDisCtrl() {
  196. ipt_csrreqdeptcd.disabled = true;
  197. ipt_csrreqdeptnm.disabled = true;
  198. rdo_useyn.disabled = true;
  199. ipt_updtspec.disabled = true;
  200. tar_cmt.disabled = true;
  201. model.refresh();
  202. btn_new.disabled = false;
  203. btn_updt.disabled = false;
  204. }
  205. function fPrintRex() {
  206. model.makeNode("/root/send/report/csrdeptlist");
  207. copyNodesetType("/root/send/report/csrdeptlist", "/root/main/csrdeptlist");
  208. exeReportPreview("RPRSS01201", "XMLSTR", "/root/send/report/csrdeptlist");
  209. }
  210. function fSettingGoodList(pnode)
  211. {
  212. var codynode = instance1.selectNodes(pnode + "/*");
  213. var addRow = grd_reqcollcdeptlist.rows - grd_reqcollcdeptlist.fixedRows;
  214. for (var j = 1; j <= codynode.length; j++)
  215. {
  216. if(addRow > grd_reqcollcdeptlist.rows - grd_reqcollcdeptlist.fixedRows)
  217. {
  218. misfGridIUD(grd_reqcollcdeptlist,"A");
  219. addRow = grd_reqcollcdeptlist.rows - grd_reqcollcdeptlist.fixedRows;
  220. }
  221. model.setValue(grd_reqcollcdeptlist.nodeset + "[" + addRow + "]/deptcd" , model.getValue(pnode +"/" + "grd_reqcollcdeptlist" + "[" + j + "]/deptcd"));
  222. model.setValue(grd_reqcollcdeptlist.nodeset + "[" + addRow + "]/deptnm" , model.getValue(pnode +"/" + "grd_reqcollcdeptlist" + "[" + j + "]/depthngnm"));
  223. model.setValue(grd_reqcollcdeptlist.nodeset + "[" + addRow + "]/csrreqdeptcd", grd_csrreqdeptlist.valueMatrix(grd_csrreqdeptlist.row, grd_csrreqdeptlist.colRef("csrreqdeptcd")));
  224. model.setValue(grd_reqcollcdeptlist.nodeset + "[" + addRow + "]/useyn" , "Y");
  225. model.setValue(grd_reqcollcdeptlist.nodeset + "[" + addRow + "]/instcd" , model.getValue(cmb_instcd.attribute("ref")));
  226. addRow = addRow + 1;
  227. }
  228. model.recalculate();
  229. model.refresh();
  230. }
  231. ]]>
  232. </script>
  233. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  234. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  235. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  236. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  237. <script type="javascript" ev:event="xforms-ready">
  238. <![CDATA[
  239. fInitialize();
  240. // btn_search.dispatch("DOMActivate");
  241. ]]>
  242. </script>
  243. <submission id="TXRSS01211" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp"/>
  244. <submission id="TXRSS01212" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp"/>
  245. <submission id="TRRSS01211" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csrreqdeptlist"/>
  246. <submission id="TRRSS01212" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/csrdeptlist"/>
  247. </model>
  248. </xhtml:head>
  249. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  250. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  251. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">CSR 청구부서 등록</caption>
  252. </group>
  253. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  254. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  255. <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>
  256. <caption id="cap_instcd" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">기관코드 :</caption>
  257. <line id="line13" class="line_4" style="x1:1000px; y1:5px; x2:1000px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  258. <caption id="cap_csrreqdeptcd" class="search_name" style="left:650px; top:10px; width:89px; height:17px; ">사용여부 :</caption>
  259. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:1015px; top:8px; width:56px; height:22px; ">
  260. <caption>조회</caption>
  261. <script type="javascript" ev:event="DOMActivate">
  262. <![CDATA[
  263. fSearch();
  264. ]]>
  265. </script>
  266. </button>
  267. <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; ">
  268. <choices>
  269. <itemset>
  270. <label/>
  271. <value/>
  272. </itemset>
  273. </choices>
  274. <script type="javascript" ev:event="xforms-value-changed">
  275. <![CDATA[
  276. btn_search.dispatch("DOMActivate");
  277. ]]>
  278. </script>
  279. </select1>
  280. <caption id="caption2" class="search_name" style="left:270px; top:10px; width:88px; height:17px; ">부 서 명 :</caption>
  281. <input id="ipt_reqdeptnm" ref="/root/send/deptnm" class="input_search" style="left:468px; top:8px; width:172px; height:19px; ">
  282. <script type="javascript" ev:event="xforms-value-changed">
  283. <![CDATA[
  284. misfValidationCheck("02", "", "deptcd,deptnm");
  285. model.refresh();
  286. ]]>
  287. </script>
  288. </input>
  289. <input id="ipt_reqdeptcd" ref="/root/send/deptcd" class="input_default" style="left:355px; top:8px; width:85px; height:19px; "/>
  290. <button id="btn_excel" class="btn1_letter2" style="left:1073px; top:8px; width:56px; height:22px; ">
  291. <caption>엑셀</caption>
  292. <script type="javascript" ev:event="DOMActivate">
  293. <![CDATA[
  294. var fileName = window.fileDialog("save", ",", false, "CSR 청구부서 등록현황", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  295. if (fileName != "")
  296. {
  297. grd_reqcollcdeptlist.saveExcel(fileName, "CSR 청구부서 등록현황");
  298. }
  299. ]]>
  300. </script>
  301. </button>
  302. <button id="btn_prt" class="btn1_letter2" style="left:1131px; top:8px; width:56px; height:22px; ">
  303. <caption>출력</caption>
  304. <script type="javascript" ev:event="DOMActivate">
  305. <![CDATA[
  306. fPrintRex();
  307. ]]>
  308. </script>
  309. </button>
  310. <select1 id="rdo_useyn2" ref="/root/send/useyn" navindex="1" appearance="full" cellspacing="20" cols="3" overflow="visible" style="left:740px; top:10px; width:245px; height:13px; border-style:none; ">
  311. <choices>
  312. <item>
  313. <label>전체</label>
  314. <value/>
  315. </item>
  316. <item>
  317. <label>사용</label>
  318. <value>Y</value>
  319. </item>
  320. <item>
  321. <label>미사용</label>
  322. <value>N</value>
  323. </item>
  324. </choices>
  325. </select1>
  326. <button id="btn_reqdept" class="icon_search" style="left:445px; top:10px; width:16px; height:16px; ">
  327. <caption/>
  328. <script type="javascript" ev:event="DOMActivate">
  329. <![CDATA[
  330. modal("SPRSS01203");
  331. model.setValue(ipt_reqdeptcd.attribute("ref"), model.property("deptcd"));
  332. model.setValue(ipt_reqdeptnm.attribute("ref"), model.property("deptnm"));
  333. model.setValue(ipt_csrreqdeptcd2.attribute("ref"), model.property("csrreqdeptcd"));
  334. ipt_reqdeptcd.refresh();
  335. ipt_reqdeptnm.refresh();
  336. for(var i = 1; i <= grd_csrreqdeptlist.rows; i++) {
  337. if( grd_csrreqdeptlist.valueMatrix(i, grd_csrreqdeptlist.colRef("csrreqdeptcd")) == ipt_csrreqdeptcd2.value ) {
  338. grd_csrreqdeptlist.row = i;
  339. fSearch2();
  340. // fDisCtrl();
  341. btn_grdadd.disabled = false;
  342. btn_save.disabled = false;
  343. curDept = grd_csrreqdeptlist.row;
  344. break;
  345. }
  346. }
  347. ]]>
  348. </script>
  349. </button>
  350. </group>
  351. <line id="line2" class="line_1" style="x1:250px; y1:74px; x2:1195px; y2:74px; "/>
  352. <caption id="caption8" class="tit_2" style="left:5px; top:59px; width:133px; height:13px; ">부서구분</caption>
  353. <button id="btn_grdadd" class="btn2_letter2" disabled="true" style="left:1064px; top:54px; width:42px; height:19px; ">
  354. <caption>추가</caption>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. if(!isRequiredControls("cmb_instcd")) return;
  358. grd_reqcollcdeptlist.addRow();
  359. var cur_row = grd_reqcollcdeptlist.row;
  360. grd_reqcollcdeptlist.editCell();
  361. ]]>
  362. </script>
  363. </button>
  364. <caption id="caption1" class="tit_2" style="left:255px; top:59px; width:133px; height:13px; ">CSR 청구부서 등록</caption>
  365. <line id="line1" class="line_1" style="x1:5px; y1:74px; x2:245px; y2:74px; "/>
  366. <datagrid id="grd_csrreqdeptlist" nodeset="/root/main/csrreqdeptlist" caption="코드^부서구분명^사용" colsep="^" colwidth="50, 109, 40" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:5px; top:79px; width:240px; height:641px; ">
  367. <col disabled="true" ref="csrreqdeptcd" type="input" _key="true" style="text-align:center; "/>
  368. <col ref="csrreqdeptnm" type="input"/>
  369. <col ref="useyn" type="combo">
  370. <choices>
  371. <item>
  372. <label>Y</label>
  373. <value>Y</value>
  374. </item>
  375. <item>
  376. <label>N</label>
  377. <value>N</value>
  378. </item>
  379. </choices>
  380. </col>
  381. <script type="javascript" ev:event="onclick">
  382. <![CDATA[
  383. if(grd_csrreqdeptlist.isCell(event.target) && grd_csrreqdeptlist.mouseRow >= grd_csrreqdeptlist.fixedrows){
  384. if(grd_csrreqdeptlist.rowStatus(grd_csrreqdeptlist.row) == "0") {
  385. fSearch2();
  386. // fDisCtrl();
  387. btn_grdadd.disabled = false;
  388. btn_save.disabled = false;
  389. } else {
  390. }
  391. }
  392. ]]>
  393. </script>
  394. </datagrid>
  395. <input id="ipt_csrreqdeptcd2" ref="/root/send/csrreqdeptcd2" visibility="hidden" style="left:525px; top:50px; width:100px; height:20px; "/>
  396. <button id="button1" class="btn2_letter3" style="left:1009px; top:54px; width:53px; height:19px; ">
  397. <caption>초기화</caption>
  398. <script type="javascript" ev:event="DOMActivate">
  399. <![CDATA[
  400. fInitialize();
  401. ]]>
  402. </script>
  403. </button>
  404. <button id="btn_save" class="btn5_letter2" disabled="true" style="left:1152px; top:54px; width:42px; height:19px; ">
  405. <caption>저장</caption>
  406. <script type="javascript" ev:event="DOMActivate">
  407. <![CDATA[
  408. fsave();
  409. fSearch2();
  410. ]]>
  411. </script>
  412. </button>
  413. <datagrid id="grd_reqcollcdeptlist" nodeset="/root/main/csrdeptlist" caption="부서코드^부서명^부서구분^사용^비고^수정자ID^수정자^수정일자^최초등록일자^기관코드^부서구분명^사용명" colsep="^" colwidth="107, 150, 80, 50, 141, 100, 100, 100, 98, 100, 100, 100" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:250px; top:79px; width:945px; height:640px; ">
  414. <col class="input_essential" ref="deptcd" type="inputbutton" _key="true"/>
  415. <col ref="deptnm"/>
  416. <col class="input_essential" ref="csrreqdeptcd" type="combo" _key="true" style="text-align:center; ">
  417. <choices>
  418. <itemset nodeset="/root/main/csrreqdeptlist">
  419. <label ref="csrreqdeptnm"/>
  420. <value ref="csrreqdeptcd"/>
  421. </itemset>
  422. </choices>
  423. </col>
  424. <col class="input_essential" ref="useyn" type="combo" _key="true" style="text-align:center; ">
  425. <choices>
  426. <item>
  427. <label>사용</label>
  428. <value>Y</value>
  429. </item>
  430. <item>
  431. <label>미사용</label>
  432. <value>N</value>
  433. </item>
  434. </choices>
  435. </col>
  436. <col ref="cmt" type="input"/>
  437. <col ref="lastupdtrid" type="output" style="text-align:center; "/>
  438. <col ref="lastupdtrnm" type="output" style="text-align:center; "/>
  439. <col ref="lastupdtdt" type="output" format="yyyy-mm-dd" style="text-align:center; "/>
  440. <col ref="fstrgstdt" type="output" format="yyyy-mm-dd" style="text-align:center; "/>
  441. <col ref="instcd" visibility="hidden"/>
  442. <col ref="csrreqdeptnm" visibility="hidden"/>
  443. <col ref="useynnm" visibility="hidden"/>
  444. <script type="javascript" ev:event="onaftersort">
  445. <![CDATA[
  446. grd_reqcollcdeptlist.gridToInstance();
  447. ]]>
  448. </script>
  449. <script type="javascript" ev:event="onbuttonclick">
  450. <![CDATA[
  451. model.property("flag") = "req";
  452. if (grd_reqcollcdeptlist.col == grd_reqcollcdeptlist.colRef("deptcd")) {//부서코드 버튼을 눌렀을 때
  453. // var recv_list = "deptcd,deptnm";
  454. model.removeNodeset("/root/copynode");
  455. model.makeNode("/root/copynode");
  456. model.refresh();
  457. rszfOpenPopUpListByWndName(grd_reqcollcdeptlist,"","deptcd,deptnm","SPRSS00230","","", "Y");
  458. var CSV = model.getValue(gvParamPath +"/SPRSS00230_/SPRSS00230_value");
  459. setCSVToNode("/root/copynode", CSV, "grd_reqcollcdeptlist");
  460. fSettingGoodList("/root/copynode");
  461. }
  462. model.property("instcd") = "";
  463. model.property("useryn") = "";
  464. ]]>
  465. </script>
  466. <script type="javascript" ev:event="xforms-value-changed">
  467. <![CDATA[
  468. if (grd_reqcollcdeptlist.col == grd_reqcollcdeptlist.colRef("deptcd"))
  469. {
  470. if(grd_reqcollcdeptlist.valueMatrix(grd_reqcollcdeptlist.row, grd_reqcollcdeptlist.colRef("deptcd")) != "")
  471. {
  472. model.removenode("/root/init/main/deptcodelist");
  473. rszfOpenPopUpListByWndName(grd_reqcollcdeptlist,"","deptcd,deptnm","SPRSS00230","","", "Y");
  474. var CSV = model.getValue(gvParamPath +"/SPRSS00230_/SPRSS00230_value");
  475. setCSVToNode("/root/copynode", CSV, "grd_reqcollcdeptlist");
  476. fSettingGoodList("/root/copynode");
  477. // if(model.getValue("/root/init/main/deptcodelist/deptcd") != "")
  478. // {
  479. // grd_reqcollcdeptlist.valueMatrix(grd_reqcollcdeptlist.row, grd_reqcollcdeptlist.colRef("deptcd")) = model.getValue("/root/init/main/deptcodelist/deptcd");
  480. // grd_reqcollcdeptlist.valueMatrix(grd_reqcollcdeptlist.row, grd_reqcollcdeptlist.colRef("deptnm")) = model.getValue("/root/init/main/deptcodelist/depthngnm");
  481. // grd_reqcollcdeptlist.valueMatrix(grd_reqcollcdeptlist.row, grd_reqcollcdeptlist.colRef("deptnm")) = model.getValue("/root/init/main/deptcodelist/depthngnm");
  482. // }
  483. //
  484. // }else{
  485. // grd_reqcollcdeptlist.valueMatrix(grd_reqcollcdeptlist.row, grd_reqcollcdeptlist.colRef("deptcd")) = "";
  486. // grd_reqcollcdeptlist.valueMatrix(grd_reqcollcdeptlist.row, grd_reqcollcdeptlist.colRef("deptnm")) = "";
  487. // }
  488. //
  489. }
  490. //misfValidationCheck("02", "", "deptcd,deptnm");
  491. model.refresh();
  492. }
  493. ]]>
  494. </script>
  495. <script type="javascript" ev:event="onclick">
  496. <![CDATA[
  497. grd_reqcollcdeptlist.editCell();
  498. ]]>
  499. </script>
  500. </datagrid>
  501. <button id="btn_new" class="btn2_letter2" navindex="3" style="left:111px; top:54px; width:42px; height:19px; ">
  502. <caption>추가</caption>
  503. <script type="javascript" ev:event="DOMActivate">
  504. <![CDATA[
  505. grd_csrreqdeptlist.addRow();
  506. for(var i = grd_csrreqdeptlist.rows -1 ; i > 0;i--){
  507. if (Number(grd_csrreqdeptlist.valueMatrix(i-1,grd_csrreqdeptlist.colRef("csrreqdeptcd")))+1 < 10) {
  508. grd_csrreqdeptlist.valueMatrix(i,grd_csrreqdeptlist.colRef("csrreqdeptcd")) = "0"+(Number(grd_csrreqdeptlist.valueMatrix(i-1,grd_csrreqdeptlist.colRef("csrreqdeptcd")))+1).toString();
  509. }else{
  510. if(i==1){
  511. grd_csrreqdeptlist.valueMatrix(i,grd_csrreqdeptlist.colRef("csrreqdeptcd")) = "01";
  512. }else{
  513. grd_csrreqdeptlist.valueMatrix(i,grd_csrreqdeptlist.colRef("csrreqdeptcd")) = Number(grd_csrreqdeptlist.valueMatrix(i-1,grd_csrreqdeptlist.colRef("csrreqdeptcd")))+1;
  514. }
  515. }
  516. break;
  517. }
  518. if(grd_csrreqdeptlist.rowStatus(grd_csrreqdeptlist.row) == "1" || grd_csrreqdeptlist.rowStatus(grd_csrreqdeptlist.row) == "3") {
  519. grd_csrreqdeptlist.colDisabled(grd_csrreqdeptlist.colRef("csrreqdeptcd")) = true;
  520. grd_csrreqdeptlist.valueMatrix(grd_csrreqdeptlist.row, grd_csrreqdeptlist.colRef("useyn")) = "Y";
  521. }
  522. ]]>
  523. </script>
  524. </button>
  525. <button id="btn_updt" class="btn2_letter2" navindex="4" style="left:156px; top:54px; width:42px; height:19px; ">
  526. <caption>삭제</caption>
  527. <script type="javascript" ev:event="DOMActivate">
  528. <![CDATA[
  529. /*var firstRow = grd_csrreqdeptlist.selectedRow(0);
  530. var lastRow = grd_csrreqdeptlist.selectedRow(grd_csrreqdeptlist.selectedRows-1);
  531. for(var i = firstRow; i <= lastRow; i++) {
  532. grd_csrreqdeptlist.addStatus(i, "delete");
  533. }*/
  534. if((grd_csrreqdeptlist.rowStatus(grd_csrreqdeptlist.row) =="1")||(grd_csrreqdeptlist.rowStatus(grd_csrreqdeptlist.row) =="3")){
  535. grd_csrreqdeptlist.deleteRow(grd_csrreqdeptlist.row);
  536. }else{
  537. grd_csrreqdeptlist.rowStatus(grd_csrreqdeptlist.row) = "4";
  538. }
  539. if(grd_reqcollcdeptlist.rows > 1) {
  540. var rtn = messageBox("삭제할 부서구분에 등록된 부서들이 존재합니다. 등록된부서의 부서구분을 지금 변경하시겠습니까?", "Q");
  541. if(rtn == "6") {
  542. model.property("instcd") = cmb_instcd.value;
  543. model.property("useryn") = rdo_useyn2.value;
  544. //부서변경 팝업 모달창으로 띄움..
  545. modal("SMRSS01202", "", "", "", "", "", "","width:200px;height:80px;align:center;");
  546. var csrdeptcd = model.property("csrreqdeptcd");
  547. if(csrdeptcd == grd_csrreqdeptlist.valueMatrix(grd_csrreqdeptlist.row, grd_csrreqdeptlist.colRef("csrreqdeptcd")) ) {
  548. messageBox("같은부서로 변경을 할수 없습니다.", "E");
  549. fSearch();
  550. return;
  551. }
  552. for(var i = 1; i <= grd_reqcollcdeptlist.rows; i++) {
  553. grd_reqcollcdeptlist.addStatus(i, "update");
  554. grd_reqcollcdeptlist.valueMatrix(i, grd_reqcollcdeptlist.colRef("csrreqdeptcd")) = csrdeptcd;
  555. }
  556. fsave();
  557. fSavData();
  558. btn_search.dispatch("DOMActivate");
  559. } else {
  560. for(var i = 1; i <= grd_reqcollcdeptlist.rows; i++) {
  561. grd_reqcollcdeptlist.addStatus(i, "delete");
  562. grd_reqcollcdeptlist.valueMatrix(i, grd_reqcollcdeptlist.colRef("csrreqdeptcd")) = csrdeptcd;
  563. }
  564. fsave();
  565. fSavData();
  566. btn_search.dispatch("DOMActivate");
  567. }
  568. }
  569. ]]>
  570. </script>
  571. </button>
  572. <button id="btn_save1" class="btn5_letter2" navindex="17" style="left:201px; top:54px; width:42px; height:19px; ">
  573. <caption>저장</caption>
  574. <script type="javascript" ev:event="DOMActivate">
  575. <![CDATA[
  576. //
  577. var btn = messageBox("저장하시겠습니까?", "Q");
  578. if(btn == "6") {
  579. var rowStat;
  580. var useyn;
  581. for(var i = 1; i < grd_csrreqdeptlist.rows; i++) {
  582. rowStat = grd_csrreqdeptlist.rowStatus(i);
  583. useyn = grd_csrreqdeptlist.valueMatrix(i, grd_csrreqdeptlist.colRef("useyn"));
  584. grd_csrreqdeptlist.row = i;
  585. if(rowStat == "2" && useyn == "N") {
  586. fSearch2();
  587. if(grd_reqcollcdeptlist.rows > 1) {
  588. var rtn = messageBox("등록된 하위청구부서가 존재합니다. 일괄수정하시겠습니까?", "Q");
  589. if(rtn == "6") {
  590. model.property("instcd") = cmb_instcd.value;
  591. model.property("useryn") = rdo_useyn2.value;
  592. //부서변경 팝업 모달창으로 띄움..
  593. modal("SMRSS01202", "", "", "", "", "", "","width:200px;height:80px;align:center;");
  594. var csrdeptcd = model.property("csrreqdeptcd");
  595. if(csrdeptcd == grd_csrreqdeptlist.valueMatrix(grd_csrreqdeptlist.row, grd_csrreqdeptlist.colRef("csrreqdeptcd")) ) {
  596. messageBox("같은부서로 변경을 할수 없습니다.", "E");
  597. return;
  598. }
  599. for(var i = 1; i <= grd_reqcollcdeptlist.rows; i++) {
  600. grd_reqcollcdeptlist.addStatus(i, "update");
  601. grd_reqcollcdeptlist.valueMatrix(i, grd_reqcollcdeptlist.colRef("csrreqdeptcd")) = csrdeptcd;
  602. }
  603. fsave();
  604. } else {
  605. grd_csrreqdeptlist.rowStatus(i) = "0";
  606. }
  607. }
  608. }
  609. }
  610. fSavData();
  611. btn_new.disabled = false;
  612. btn_updt.disabled = false;
  613. btn_search.dispatch("DOMActivate");
  614. grd_csrreqdeptlist.row = curRow;
  615. fSearch2();
  616. } else {
  617. return;
  618. }
  619. ]]>
  620. </script>
  621. </button>
  622. <button id="button3" class="btn2_letter2" style="left:1108px; top:54px; width:45px; height:19px; ">
  623. <caption>삭제</caption>
  624. <script type="javascript" ev:event="DOMActivate">
  625. <![CDATA[
  626. if(grd_reqcollcdeptlist.row > -1 && grd_reqcollcdeptlist.row >= grd_reqcollcdeptlist.fixedrows){
  627. var firstRow = grd_reqcollcdeptlist.selectedRow(0);
  628. var lastRow = grd_reqcollcdeptlist.selectedRow(grd_reqcollcdeptlist.selectedRows-1);
  629. for(var i = firstRow; i <= lastRow; i++) {
  630. grd_reqcollcdeptlist.addStatus(i, "delete");
  631. }
  632. }
  633. ]]>
  634. </script>
  635. </button>
  636. </group>
  637. </xhtml:body>
  638. </xhtml:html>