SMMNG00400_CSR 청구부서 등록.xrw 28 KB

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