SMZSD00600_기관별부서정보관리.xrw 106 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302
  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. <clsdeptlist>
  11. </clsdeptlist>
  12. <deptlist>
  13. </deptlist>
  14. <depthistorylist/>
  15. <prevddata>
  16. <standarduseyn/>
  17. <standardflag/>
  18. </prevddata>
  19. <data>
  20. <instcd/>
  21. <deptcd/>
  22. <valifromddkey/>
  23. <valitoddkey/>
  24. <valifromdd/>
  25. <depthngnm/>
  26. <inorddeptnm/>
  27. <deptengnm/>
  28. <deptchinm/>
  29. <deptplce/>
  30. <deptengabbr/>
  31. <depthngabbr/>
  32. <reqfild/>
  33. <reqdeptno/>
  34. <nextplceyn/>
  35. <nextplceprity/>
  36. <inetrsrvyn/>
  37. <cntctel/>
  38. <dutplceuseyn/>
  39. <reqauthdeptyn/>
  40. <planuseyn/>
  41. <plansupdeptcd/>
  42. <plandispseq/>
  43. <orduseyn/>
  44. <orddeptflag/>
  45. <orddispseq/>
  46. <ordsupdeptcd/>
  47. <clincdeptdispseq/>
  48. <psnworkuseyn/>
  49. <psnworksupdeptcd/>
  50. <psnworkdispseq/>
  51. <purcuseyn/>
  52. <purcsupdeptcd/>
  53. <purcdispseq/>
  54. <fnworkuseyn/>
  55. <fnworksupdeptcd/>
  56. <fnworkdispseq/>
  57. <careuseyn/>
  58. <caresupdeptcd/>
  59. <caredispseq/>
  60. <gafruseyn/>
  61. <gafrsupdeptcd/>
  62. <gafrdispseq/>
  63. <rcptuseyn/>
  64. <rcptsupdeptcd/>
  65. <rcptdispseq/>
  66. <pamuseyn/>
  67. <pamsupdeptcd/>
  68. <pamdispseq/>
  69. <healcareinfouseyn/>
  70. <healcareinfosupdeptcd/>
  71. <healcareinfodispseq/>
  72. <insuuseyn/>
  73. <insusupdeptcd/>
  74. <insudispseq/>
  75. <dgenuseyn/>
  76. <dgensupdeptcd/>
  77. <dgendispseq/>
  78. <homecareuseyn/>
  79. <homecaresupdeptcd/>
  80. <homecaredispseq/>
  81. <instsupdeptcd/>
  82. <instdispseq/>
  83. <valitodd/>
  84. <orddeptkind/>
  85. <ordclsdeptflag/>
  86. <indepthngnm/>
  87. </data>
  88. <search>
  89. <deptmaster>
  90. <supdeptcd/>
  91. <supdeptnm/>
  92. </deptmaster>
  93. <authority/>
  94. <authorities/>
  95. <deptinfo>
  96. <deptcd/>
  97. <depthngnm/>
  98. </deptinfo>
  99. </search>
  100. <move>
  101. <mvdest/>
  102. <mvsrc/>
  103. </move>
  104. <mode/>
  105. <modedetail/>
  106. <modedetailstatus/>
  107. <label>
  108. <left/>
  109. <right/>
  110. <deptinfo/>
  111. </label>
  112. </main>
  113. <send>
  114. <dept/>
  115. </send>
  116. <hidden>
  117. </hidden>
  118. <init>
  119. <reqdeptnocode>
  120. <P0322>
  121. <cdid/>
  122. <cdnm/>
  123. </P0322>
  124. </reqdeptnocode>
  125. <reqfieldcode>
  126. <P0291>
  127. <cdid/>
  128. <cdnm/>
  129. </P0291>
  130. </reqfieldcode>
  131. <insuuseyn>
  132. <Z0015>
  133. <cdid/>
  134. <cdnm/>
  135. </Z0015>
  136. </insuuseyn>
  137. </init>
  138. </root>
  139. </instance>
  140. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  141. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  142. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  143. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  144. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  145. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  146. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD003.js"/>
  147. <script type="javascript" ev:event="xforms-ready">
  148. <![CDATA[
  149. model.setValue("/root/main/label/left", "부서마스터");
  150. model.setValue("/root/main/label/right", "부서목록");
  151. model.setValue("/root/main/search/authority", "instsupdeptcd");
  152. zbcfGetCodeList(
  153. new Array("P0322", "P0291", "Z0015"),
  154. new Array("/root/init/reqdeptnocode", "/root/init/reqfieldcode", "/root/init/insuuseyn")
  155. );
  156. var nodelist = instance1.selectNodes("/root/init/reqdeptnocode/P0322");
  157. for(i=0; i<nodelist.length; i++){
  158. var node = nodelist.item(i);
  159. var cdid_node = node.selectSingleNode("cdid");
  160. var cdnm_node = node.selectSingleNode("cdnm");
  161. var cdid_value = model.getValue(cdid_node);
  162. var cdnm_value = model.getValue(cdnm_node);
  163. if( cdid_value.length!=0 && cdnm_value.length!=0){
  164. cdnm_value = cdnm_value + "("+cdid_value+")";
  165. model.setValue(cdnm_node, cdnm_value);
  166. }
  167. }
  168. var nodelist = instance1.selectNodes("/root/init/reqfieldcode/P0291");
  169. for(i=0; i<nodelist.length; i++){
  170. var node = nodelist.item(i);
  171. var cdid_node = node.selectSingleNode("cdid");
  172. var cdnm_node = node.selectSingleNode("cdnm");
  173. var cdid_value = model.getValue(cdid_node);
  174. var cdnm_value = model.getValue(cdnm_node);
  175. if( cdid_value.length!=0 && cdnm_value.length!=0){
  176. cdnm_value = cdnm_value + "("+cdid_value+")";
  177. model.setValue(cdnm_node, cdnm_value);
  178. }
  179. }
  180. var nodelist = instance1.selectNodes("/root/init/insuuseyn/Z0015");
  181. for(i=0; i<nodelist.length; i++){
  182. var node = nodelist.item(i);
  183. var cdid_node = node.selectSingleNode("cdid");
  184. var cdnm_node = node.selectSingleNode("cdnm");
  185. var cdid_value = model.getValue(cdid_node);
  186. var cdnm_value = model.getValue(cdnm_node);
  187. if( cdid_value.length!=0 && cdnm_value.length!=0){
  188. cdnm_value = cdnm_value + "("+cdid_value+")";
  189. model.setValue(cdnm_node, cdnm_value);
  190. }
  191. }
  192. fInitMainData();
  193. model.setValue("/root/main/mode", "init");
  194. model.setValue("/root/main/modedetail", "init");
  195. model.setValue("/root/main/modedetailstatus", "none");
  196. model.refresh();
  197. fInitMainDataControls(true);
  198. ]]>
  199. </script>
  200. <submission id="TRZSD00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/clsdeptlist"/>
  201. <submission id="TRZSD00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/deptlist"/>
  202. <submission id="TXZSD00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/temp"/>
  203. <submission id="TRZSD00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dept" replace="instance" resultref="/root/hidden"/>
  204. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
  205. <submission id="TRZSD00108" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main/search/authorities"/>
  206. <submission id="TRZSD00110" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/deptlisthistory"/>
  207. <submission id="TXZSD00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dept" replace="instance" resultref="/root/hidden"/>
  208. <submission id="TXZSD00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dept" replace="instance" resultref="/root/hidden"/>
  209. <submission id="TXZSD00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dept" replace="instance" resultref="/root/hidden"/>
  210. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dept" replace="instance" resultref="/root/hidden"/>
  211. <submission id="TRZSD00112" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/clsdeptlist"/>
  212. <submission id="TXZSD00107" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/temp"/>
  213. <submission id="TXZSD00108" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dept" replace="instance" resultref="/root/hidden/temp"/>
  214. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  215. </model>
  216. </xhtml:head>
  217. <xhtml:body guideline="1,1201;2,87;1,837;" style="color:transparent; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  218. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  219. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">기관별부서정보관리</caption>
  220. </group>
  221. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  222. <group id="group5" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  223. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  224. <line id="line12" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  225. <button id="btn_retrive" class="btn1_letter2" style="left:1120px; top:7px; width:56px; height:22px; ">
  226. <caption>조회</caption>
  227. <script type="javascript" ev:event="DOMActivate">
  228. <![CDATA[
  229. model.setValue("/root/main/search/deptmaster/supdeptcd", "");
  230. model.setValue("/root/main/search/deptmaster/supdeptnm", "");
  231. model.setValue("/root/main/search/deptinfo/deptcd", "");
  232. model.setValue("/root/main/search/deptinfo/depthngnm", "");
  233. model.removenode("/root/main/clsdeptlist");
  234. model.makeNode("/root/main/clsdeptlist");
  235. model.removenode("/root/main/deptlist");
  236. model.makeNode("/root/main/deptlist");
  237. model.removenode("/root/main/depthistorylist");
  238. model.makeNode("/root/main/depthistorylist");
  239. model.setValue("/root/main/mode", "init");
  240. model.setValue("/root/main/modedetail", "init");
  241. model.setValue("/root/main/modedetailstatus", "none");
  242. fInitMainData();
  243. model.refresh();
  244. fInitMainDataControls(true);
  245. var success = submit("TRZSD00103"); /*부서 마스터와 조인하여 현재기관에서 사용하고 있는 부서와 현재 사용하고 있지 않은 과거의 부서를 취합하여 보여준다. 부서통합마스터 Grid*/
  246. if(success){
  247. grd_clsdeptlist.rebuild();
  248. setTree( grd_clsdeptlist, grd_clsdeptlist.colRef("level"), grd_clsdeptlist.colRef("deptnm"), true);
  249. var standard = model.getValue("/root/main/search/authority");
  250. model.setValue("/root/main/search/deptmaster/supdeptcd", "root");
  251. model.makeValue("/root/send/data/standard", standard);
  252. model.makeValue("/root/send/data/supdeptcd", "root");
  253. success = submit("TRZSD00104");
  254. if(success){
  255. grd_deptlist.rebuild();
  256. setTree(grd_deptlist, grd_deptlist.colRef("level"), grd_deptlist.colRef("inorddeptnm"), true);
  257. grd_clsdeptlist.rebuildStyle();
  258. var dept_standard_idx = grd_clsdeptlist.colRef(standard);
  259. var cls_fixed_rows = grd_clsdeptlist.fixedRows;
  260. var cls_rows = grd_clsdeptlist.rows;
  261. var cls_iscurrent_index = grd_clsdeptlist.colRef("iscurrent");
  262. var cls_color_index = grd_clsdeptlist.colRef("color");
  263. for(var i = cls_fixed_rows; i<cls_rows; i++){
  264. var iscurrent = grd_clsdeptlist.valueMatrix(i, cls_iscurrent_index);//현재 사용중인것과 종료된것을 구분한다.
  265. if(iscurrent=='Y'){//기관에서 현재사용중인부서
  266. grd_clsdeptlist.rowstyle( i , "data" , "background-color" ) = "#ffffff";//현제 기관에서 사용중인 부서
  267. grd_clsdeptlist.valueMatrix(i, cls_color_index) = "#ffffff";
  268. }else if(iscurrent=='F'){
  269. grd_clsdeptlist.cellStyle("background-color", i, grd_clsdeptlist.colRef("deptnm") ) = "#fcd2c1";//현제 기관에서 사용중이며 미래에 적용될 부서.
  270. grd_clsdeptlist.valueMatrix(i, cls_color_index) = "#fcd2c1";
  271. }else if(iscurrent=='P'){
  272. grd_clsdeptlist.cellStyle("background-color", i, grd_clsdeptlist.colRef("deptnm") ) = "#b9e5fb";//현제 기관에서 사용중이며, 종료된부서.
  273. grd_clsdeptlist.valueMatrix(i, cls_color_index) = "#b9e5fb";
  274. }else{
  275. grd_clsdeptlist.cellStyle("background-color", i, grd_clsdeptlist.colRef("deptnm") ) = "#c8e67b";//현제 기관에서는 사용하지 않는 부서
  276. grd_clsdeptlist.valueMatrix(i, cls_color_index) = "#c8e67b";
  277. }
  278. }
  279. for(var j = grd_deptlist.fixedRows; j<grd_deptlist.rows;j++){
  280. var iscurrent = grd_deptlist.valueMatrix(j, grd_deptlist.colRef("iscurrent"));
  281. if(iscurrent=="Y"){
  282. //grd_deptlist.rowstyle( j , "data" , "background-color" ) = "#ffffff";//현제 기관의 선택된업무에서 사용중인 부서
  283. grd_deptlist.valueMatrix(j, grd_deptlist.colRef("color")) = "#ffffff";
  284. }else if(iscurrent=="F"){
  285. grd_deptlist.cellStyle("background-color", j, grd_deptlist.colRef("inorddeptnm") ) = "#fcd2c1";//현제 기관에서는 사용중이며, 종료된부서.
  286. grd_deptlist.valueMatrix(j, grd_deptlist.colRef("color")) = "#fcd2c1";
  287. }else if(iscurrent=="P"){
  288. grd_deptlist.cellStyle("background-color", j, grd_deptlist.colRef("inorddeptnm") ) = "#b9e5fb";//현제 기관에서는 사용중이며, 종료된부서.
  289. grd_deptlist.valueMatrix(j, grd_deptlist.colRef("color")) = "#b9e5fb";
  290. }
  291. }
  292. model.setValue("/root/main/mode", "retrived");
  293. model.setValue("/root/main/modedetail", "init");
  294. model.setValue("/root/main/modedetailstatus", "none");
  295. }
  296. }
  297. grd_clsdeptlist.hscroll.attribute("pos") = 300;
  298. grd_deptlist.hscroll.attribute("pos") = 300;
  299. model.refresh();
  300. ]]>
  301. </script>
  302. </button>
  303. <caption id="caption10" class="search_name" style="left:5px; top:10px; width:112px; height:17px; ">통합부서선택</caption>
  304. <img id="img2" class="icon_search" style="left:294px; top:10px; width:16px; height:16px; background-stretch:stretch; ">
  305. <script type="javascript" ev:event="onclick">
  306. <![CDATA[
  307. if(grd_clsdeptlist.rows<2){
  308. messageBox("조회된 아이템이 없습니다.", "C");
  309. return;
  310. }
  311. var searchcondition = "deptnm";
  312. var searchterm = model.getValue("/root/main/search/deptmaster/supdeptnm");
  313. var receivedeptcdpath = "/root/main/search/deptmaster/supdeptcd";
  314. var receivedeptnmpath = "/root/main/search/deptmaster/supdeptnm";
  315. zbcfOpenMasterDeptCodeList(searchcondition, searchterm, receivedeptcdpath, receivedeptnmpath);
  316. var deptcd = model.getValue("/root/main/search/deptmaster/supdeptcd").getTrim();
  317. var deptnm = model.getValue("/root/main/search/deptmaster/supdeptnm").getTrim();
  318. var selected_index = -1;
  319. if(deptcd!=""&&deptnm!=""){
  320. selected_index = fFindGridTreeItem(grd_clsdeptlist, deptcd, grd_clsdeptlist.colRef("deptcd"), grd_clsdeptlist.colRef("level"));
  321. if(selected_index==-1){
  322. var deptnm = model.getValue("/root/main/search/deptmaster/supdeptnm").getTrim();
  323. messageBox("해당 부서(부서코드:"+deptcd+",부서명:"+deptnm+")이 존재하지 않습니다.", "C");
  324. }else{
  325. grd_clsdeptlist.row = selected_index;
  326. grd_clsdeptlist.topRow = selected_index;
  327. }
  328. }
  329. ]]>
  330. </script>
  331. </img>
  332. <input id="ipt_searchdeptcd" ref="/root/main/search/deptmaster/supdeptnm" class="input_s_essential" navindex="32" inputtype="button" style="left:109px; top:9px; width:180px; height:19px; ">
  333. <script type="javascript" ev:event="onbuttonclick">
  334. <![CDATA[
  335. var deptcd = model.getValue("/root/main/search/deptmaster/supdeptcd").getTrim();
  336. var deptnm = model.getValue("/root/main/search/deptmaster/supdeptnm").getTrim();
  337. var selected_index = -1;
  338. if(deptcd!=""&&deptnm!=""){
  339. selected_index = fFindGridTreeItem(grd_clsdeptlist, deptcd, grd_clsdeptlist.colRef("deptcd"), grd_clsdeptlist.colRef("level"));
  340. if(selected_index==-1){
  341. var deptnm = model.getValue("/root/main/search/deptmaster/supdeptnm").getTrim();
  342. messageBox("해당 부서(부서코드:"+deptcd+",부서명:"+deptnm+")이 존재하지 않습니다.", "C");
  343. }else{
  344. grd_clsdeptlist.row = selected_index;
  345. grd_clsdeptlist.topRow = selected_index;
  346. }
  347. }
  348. ]]>
  349. </script>
  350. </input>
  351. <img id="img1" class="icon_search" style="left:688px; top:10px; width:16px; height:16px; background-stretch:stretch; ">
  352. <script type="javascript" ev:event="onclick">
  353. <![CDATA[
  354. if(grd_deptlist.rows<2){
  355. messageBox("조회된 아이템이 없습니다.", "C");
  356. return;
  357. }
  358. var supdeptcolumn = model.getValue("/root/main/search/authority");
  359. var searchcondition = "deptnm";
  360. var searchterm = model.getValue("/root/main/search/deptinfo/depcd");
  361. var receivedeptcdpath = "/root/main/search/deptinfo/deptcd";
  362. var receivedeptnmpath = "/root/main/search/deptinfo/depthngnm";
  363. var instcd = getUserInfo("dutplceinstcd");
  364. //zbcfGetDeptCodeListFromTree(searchcondition, searchterm, instcd, supdeptcolumn, receivedeptcdpath, receivedeptnmpath);
  365. zbcfGetDeptListFromTree(searchcondition, searchterm, instcd, supdeptcolumn, receivedeptcdpath, receivedeptnmpath);
  366. var deptcd = model.getValue("/root/main/search/deptinfo/deptcd");
  367. var depthngnm = model.getValue("/root/main/search/deptinfo/depthngnm");
  368. if(deptcd!=""&&depthngnm!=""){
  369. var selected_index = fFindGridTreeItem(grd_deptlist, deptcd, grd_deptlist.colRef("deptcd"), grd_deptlist.colRef("level"));
  370. if(selected_index==-1){
  371. messageBox("해당 부서(부서코드:"+deptcd+",부서명:"+deptnm+")이 존재하지 않습니다.", "C");
  372. }else{
  373. grd_deptlist.row = selected_index;
  374. grd_deptlist.topRow = selected_index;
  375. }
  376. }
  377. ]]>
  378. </script>
  379. </img>
  380. <caption id="caption16" class="search_name" style="left:405px; top:10px; width:107px; height:17px; ">기관부서선택</caption>
  381. <input id="input2" ref="/root/main/search/deptinfo/depthngnm" class="input_s_essential" navindex="32" inputtype="button" style="left:510px; top:9px; width:175px; height:19px; ">
  382. <script type="javascript" ev:event="onbuttonclick">
  383. <![CDATA[
  384. var deptcd = model.getValue("/root/main/search/deptinfo/deptcd");
  385. var depthngnm = model.getValue("/root/main/search/deptinfo/depthngnm");
  386. if(deptcd!=""&&depthngnm!=""){
  387. var selected_index = fFindGridTreeItem(grd_deptlist, deptcd, grd_deptlist.colRef("deptcd"), grd_deptlist.colRef("level"));
  388. if(selected_index==-1){
  389. messageBox("해당 부서(부서코드:"+deptcd+",부서명:"+deptnm+")이 존재하지 않습니다.", "C");
  390. }else{
  391. grd_deptlist.row = selected_index;
  392. grd_deptlist.topRow = selected_index;
  393. }
  394. }
  395. ]]>
  396. </script>
  397. </input>
  398. </group>
  399. <caption id="caption12" ref="/root/main/label/left" class="tit_2" style="left:0px; top:60px; width:144px; height:14px; ">통합부서마스터</caption>
  400. <line id="line15" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  401. <img id="img3">
  402. <script type="javascript" ev:event="onclick">
  403. <![CDATA[
  404. var searchcondition = "deptnm";
  405. var searchterm = model.getValue("/root/main/search/deptcd");
  406. var receivedeptcdpath = "/root/main/search/deptcd";
  407. var receivedeptnmpath = "/root/main/search/deptnm";
  408. zbcfOpenMasterDeptCodeList(searchcondition, searchterm, receivedeptcdpath, receivedeptnmpath);
  409. ]]>
  410. </script>
  411. </img>
  412. <datagrid id="grd_clsdeptlist" nodeset="/root/main/clsdeptlist/dept" scroll="autovscroll" caption="^색상^상위 부서명^부서명^부서영문명^부서한문명^부서영문약어^부서한글약어^부서코드^기획상위부서^진료 상위부서^인사 상위부서^구매 상위부서^재무 상위부서^간호 상위부서^총무 상위부서^수납 상위부서^원무 상위부서^의료정보 상위부서^보험 상위부서^근태 상위부서^그룹웨어상위부서코드^기관상위부서코드^기관코드^유효시작일자^유효종료일자^현재사용여부^레벨" colsep="▦" colwidth="16, 100, 300, 300, 100, 100, 100, 100, 140, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" defaultrows="0" extendlastcol="noscroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="▩" select.background-color="transparent" style="left:0px; top:80px; width:371px; height:460px; border-color:#808080; ">
  413. <col checkvalue="true,false" disabled="true" ref="useyn" type="checkbox" visibility="hidden"/>
  414. <col ref="color" visibility="hidden"/>
  415. <col ref="supdeptnm" visibility="hidden"/>
  416. <col ref="deptnm"/>
  417. <col ref="deptengnm" visibility="hidden"/>
  418. <col ref="deptchinm" visibility="hidden"/>
  419. <col ref="deptengabbr" visibility="hidden"/>
  420. <col ref="depthngabbr" visibility="hidden"/>
  421. <col ref="deptcd" visibility="hidden"/>
  422. <col ref="plansupdeptcd" visibility="hidden"/>
  423. <col ref="ordsupdeptcd" visibility="hidden"/>
  424. <col ref="psnworksupdeptcd" visibility="hidden"/>
  425. <col ref="purcsupdeptcd" visibility="hidden"/>
  426. <col ref="fnworksupdeptcd" visibility="hidden"/>
  427. <col ref="caresupdeptcd" visibility="hidden"/>
  428. <col ref="gafrsupdeptcd" visibility="hidden"/>
  429. <col ref="rcptsupdeptcd" visibility="hidden"/>
  430. <col ref="pamsupdeptcd" visibility="hidden"/>
  431. <col ref="healcareinfosupdeptcd" visibility="hidden"/>
  432. <col ref="insusupdeptcd" visibility="hidden"/>
  433. <col ref="dgensupdeptcd" visibility="hidden"/>
  434. <col ref="homecaresupdeptcd" visibility="hidden"/>
  435. <col ref="instsupdeptcd" visibility="hidden"/>
  436. <col ref="instcd" visibility="hidden"/>
  437. <col ref="valifromdd" visibility="hidden"/>
  438. <col ref="valitodd" visibility="hidden"/>
  439. <col ref="iscurrent" visibility="hidden"/>
  440. <col ref="level" visibility="hidden"/>
  441. </datagrid>
  442. <img id="img4" class="icon_right" style="left:372px; top:275px; width:26px; height:19px; background-stretch:stretch; ">
  443. <script type="javascript" ev:event="onclick">
  444. <![CDATA[
  445. var mode = model.getValue("/root/main/mode");//부서정보관리프로그램에서 프로그램의 현재상태를 얻어온다.
  446. if(mode!="retrived"){//검색이 되지 않은상태에서 부서관리작업을 수행할수 없다.
  447. messageBox("검색되지 않은상태에서 작업을 진행할수", "I004");
  448. return;
  449. }
  450. /*
  451. 선택한 자원이 없는 경우에는 자원의 등록을 막는다.
  452. */
  453. var src_row = grd_clsdeptlist.row;
  454. if(src_row==-1){
  455. messageBox("이동할 대상 부서를 선택하지 않은상태에서 이동", "E001");
  456. return;
  457. }
  458. /*
  459. 임시로 등록할 자원이 이미 등록되어 있는 자원인지 판단한다.
  460. */
  461. var standard = model.getValue("/root/main/search/authority");//기관상위부서코드 기준이라고 나와야만 한다.
  462. var master_standard_supdeptcd = grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef(standard));//기관상위부서코드가 등록되어 있다면 널이 아닌상태가 나오고 기관상위부서코드가 등록되지 않았다면 "" String인 상태인 결과가 나온다.
  463. if(master_standard_supdeptcd!=""){
  464. messageBox("이미 등록된부서는 이동", "E001");
  465. return;
  466. }
  467. /*
  468. 등록된 자원중 어느행을 대상으로 삽입할것인지 얻어온다.
  469. */
  470. var dest_row = grd_deptlist.row;
  471. var dest_row_style = grd_deptlist.valueMatrix(dest_row, grd_deptlist.colRef("color"));
  472. if(dest_row_style=="#b9e5fb"){
  473. messageBox("종료된 부서하위로 이동", "E001");
  474. return;
  475. }
  476. var child_info = fGetGridTreeNextChild(grd_deptlist, dest_row, "level", "deptcd");
  477. var child_offset = child_info[0];
  478. var insert_index = child_info[1];
  479. var child_index = child_info[2];
  480. var parents = child_info[3];
  481. var child_level = child_info[4];
  482. var child_seq = new Number(child_info[5]);
  483. if(insert_index==-1){
  484. messageBox("최상위 부서를 추가합니다.", "I");
  485. grd_deptlist.addItem();
  486. }else{
  487. grd_deptlist.insertrow(insert_index, "after", false);
  488. }
  489. var authority = model.getValue("/root/main/search/authority");
  490. var master_deptcd = grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef("deptcd"));
  491. var master_deptnm = grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef("deptnm"));
  492. var master_deptengnm = grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef("deptengnm"));
  493. var master_deptchinm = grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef("deptchinm"));
  494. var master_deptengabbr = grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef("deptengabbr"));
  495. var master_depthngabbr = grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef("depthngabbr"));
  496. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("deptcd")) = master_deptcd;//부서코드는 기관관리자가
  497. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("depthngnm")) = master_deptnm;
  498. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("deptengnm")) = master_deptengnm;
  499. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("deptchinm")) = master_deptchinm;
  500. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("deptengabbr")) = master_deptengabbr;
  501. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("depthngabbr")) = master_depthngabbr;
  502. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("orddeptkind")) = "D";
  503. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("ordclsdeptflag")) = "R";
  504. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("inorddeptnm")) = master_deptnm;
  505. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("indepthngnm")) = master_deptnm;
  506. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("nextplceyn")) = 'N';
  507. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("inetrsrvyn")) = 'N';
  508. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("dutplceuseyn")) = 'N';
  509. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("reqauthdeptyn")) = 'N';
  510. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("planuseyn")) = 'N';
  511. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("orduseyn")) = 'N';
  512. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("clincdeptdispseq")) = "";
  513. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("psnworkuseyn")) = 'N';
  514. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("purcuseyn")) = 'N';
  515. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("fnworkuseyn")) = 'N';
  516. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("careuseyn")) = 'N';
  517. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("gafruseyn")) = 'N';
  518. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("rcptuseyn")) = 'N';
  519. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("pamuseyn")) = 'N';
  520. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("healcareinfouseyn")) = 'N';
  521. //grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("insuuseyn")) = 'N';
  522. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("dgenuseyn")) = 'N';
  523. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("homecareuseyn")) = 'N';
  524. var current_date = new Date();
  525. var next_date = current_date.getAddDate(1, "D");
  526. var next_date_string = next_date.getDateFormat("YYYYMMDD");
  527. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("valifromdd")) = next_date_string;
  528. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("valitodd")) = "99991231";
  529. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("rowstatus")) = 1;//등록대상창에 'Insert'상태로 표시되야 하기 때문에 1로 설정한다.
  530. grd_deptlist.rowStatus(child_index) = 1;
  531. grd_deptlist.rowstyle(child_index , "data" , "background-color" ) = "#dec6a4";
  532. grd_deptlist.valueMatrix(child_index , grd_deptlist.colRef("color")) = "#dec6a4";
  533. grd_clsdeptlist.rowstyle( src_row , "data" , "background-color" ) = "#dec6a4";
  534. grd_clsdeptlist.valueMatrix( src_row , grd_clsdeptlist.colRef("color")) = "#dec6a4";
  535. grd_clsdeptlist.valueMatrix(src_row, grd_clsdeptlist.colRef(standard)) = parents; //등록된 부서 마스터 자원에 부모부서의 코드를 적어준다.
  536. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef(standard)) = parents; //등록된 부서 정보 자원에 부모부서의 코드를 적어준다.
  537. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("level")) = child_level;//등록된 부서정보중 새로 추가한 부서의 레벨을 설정한다.
  538. var standard_dispseq = standard.substring(0, standard.indexOf("supdeptcd")) + "dispseq"; //등록된 부서정보중 새로 추가한 부서의 선택된 업무의 출력순서 컬럼 라벨을 얻어온다.
  539. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef(standard_dispseq)) = child_seq; //등록된 부서정보중 새로 추가한 부서의 선택된 업무의 출력수서의 출력순서를 설정한다.
  540. //등록된 부서정보중 새로 추가한 부서의 상위부서이름을 설정한다.
  541. var parents_name;
  542. if( dest_row>0 ){
  543. parents_name = fGetParentsName(grd_deptlist, dest_row, "inorddeptnm");
  544. }else{
  545. parents_name = "";
  546. }
  547. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("supdeptnm")) = parents_name;
  548. var dutplceinstcd = getUserInfo("dutplceinstcd");
  549. grd_deptlist.valueMatrix(child_index, grd_deptlist.colRef("instcd")) = dutplceinstcd;
  550. setTreeItem(grd_deptlist, grd_deptlist.colRef("level"), grd_deptlist.colRef("inorddeptnm"));
  551. grd_deptlist.topRow = grd_deptlist.row;
  552. ]]>
  553. </script>
  554. </img>
  555. <group id="group_master" style="left:228px; top:54px; width:145px; height:19px; ">
  556. <button id="btn_clsdepttotalopen" class="btn2_letter5" style="left:0px; top:0px; width:75px; height:19px; ">
  557. <caption>전체펼치기</caption>
  558. <script type="javascript" ev:event="DOMActivate">
  559. <![CDATA[
  560. for(var i=grd_clsdeptlist.fixedRows; i<grd_clsdeptlist.rows;i++){
  561. grd_clsdeptlist.iscollapsed(i)=false;
  562. }
  563. ]]>
  564. </script>
  565. </button>
  566. <button id="btn_clsdepttotalclose" class="btn2_letter4" style="left:76px; top:0px; width:64px; height:19px; ">
  567. <caption>전체닫기</caption>
  568. <script type="javascript" ev:event="onclick">
  569. <![CDATA[
  570. for(var i=grd_clsdeptlist.fixedRows; i<grd_clsdeptlist.rows;i++){
  571. grd_clsdeptlist.iscollapsed(i)=true;
  572. }
  573. ]]>
  574. </script>
  575. </button>
  576. </group>
  577. <group id="group6" style="left:533px; top:54px; width:275px; height:19px; ">
  578. <button id="button2" class="btn2_letter5" style="left:0px; top:0px; width:75px; height:19px; ">
  579. <caption>전체펼치기</caption>
  580. <script type="javascript" ev:event="DOMActivate">
  581. <![CDATA[
  582. for(var i=grd_deptlist.fixedRows; i<grd_deptlist.rows;i++){
  583. grd_deptlist.iscollapsed(i)=false;
  584. }
  585. ]]>
  586. </script>
  587. </button>
  588. <button id="button3" class="btn2_letter4" style="left:76px; top:0px; width:64px; height:19px; ">
  589. <caption>전체닫기</caption>
  590. <script type="javascript" ev:event="onclick">
  591. <![CDATA[
  592. for(var i=grd_deptlist.fixedRows; i<grd_deptlist.rows;i++){
  593. grd_deptlist.iscollapsed(i)=true;
  594. }
  595. ]]>
  596. </script>
  597. </button>
  598. <button id="btn_relocatedeptcd" class="btn2_letter4" style="left:141px; top:0px; width:64px; height:19px; ">
  599. <caption>위치이동</caption>
  600. <script type="javascript" ev:event="DOMActivate">
  601. <![CDATA[
  602. var has_temporary = fHasTemporaryFromDeptGrid();
  603. if(has_temporary){
  604. messageBox("임시부서가 있는 상태에서 위치이동을 할수 없습니다.", "C");
  605. return;
  606. }
  607. var modedetail = model.getValue("/root/main/modedetail");
  608. if(modedetail!="init"&&modedetail!="reorg"){
  609. if(modedetail=="create"){
  610. var nextstep = messageBox("부서이력 추가작업중이었습니다. 추가작업이 초기화되며, 위치이동 작업을 진행하게 됩니다", "S001");
  611. if(nextstep==6){
  612. messageBox("위치이동 작업을 진행합니다.", "I");
  613. }else{
  614. return;
  615. }
  616. }else if(modedetail=="update"){
  617. var nextstep = messageBox("부서이력 수정작업중이었습니다. 수정작업이 초기화되며, 위치이동 작업을 진행하게 됩니다", "S001");
  618. if(nextstep==6){
  619. messageBox("위치이동 작업을 진행합니다.", "I");
  620. }else{
  621. return;
  622. }
  623. }
  624. fInitialize();
  625. }
  626. var mv_src = grd_deptlist.row;
  627. if(mv_src<1){
  628. messageBox("위치이동 대상 부서를", "C002") ;
  629. return;
  630. }else{
  631. model.setValue("/root/main/move/mvsrc", mv_src);
  632. modal("SPZSD00400",1,"","","SPZSD00400","/root/main/deptlist","/root/main/deptlist");
  633. var mv_dest = model.getValue("/root/main/move/mvdest").getTrim();
  634. if( mv_dest!="" && mv_dest!=null ){
  635. var mv_dest_deptcd = grd_deptlist.valueMatrix(mv_dest, grd_deptlist.colRef("deptcd"));
  636. var mv_dest_depthngnm = grd_deptlist.valueMatrix(mv_dest, grd_deptlist.colRef("depthngnm"));
  637. var last_src = fCacheDeptBundle(grd_deptlist, mv_src, "/root/main/deptlist/dept", "/root/main/temp/mvsrc");
  638. var src_level = new Number(grd_deptlist.valueMatrix(mv_src, grd_deptlist.colRef("level")));
  639. var standard_supdeptcd_cols = model.getValue("/root/main/search/authority");
  640. var standard_displayseq_cols = standard_supdeptcd_cols.substring(0, standard_supdeptcd_cols.indexOf("supdeptcd")) + "dispseq";
  641. var mv_src_parents = grd_deptlist.valueMatrix(mv_src, grd_deptlist.colRef(standard_supdeptcd_cols));
  642. for(var i=0; i<instance1.selectNodes("/root/main/temp/mvsrc").length; i++){
  643. grd_deptlist.deleterow(mv_src, false);
  644. }
  645. fReorgSequence(grd_deptlist, mv_src_parents, standard_supdeptcd_cols, standard_displayseq_cols);
  646. mv_dest = fFindItem(grd_deptlist, mv_dest_deptcd, "deptcd");
  647. var last_dest = fCacheDeptBundle(grd_deptlist, mv_dest, "/root/main/deptlist/dept", "/root/main/temp/mvdest");
  648. var dest_level = new Number(grd_deptlist.valueMatrix(mv_dest, grd_deptlist.colRef("level")));
  649. var difference = dest_level-src_level;
  650. fCache2Grid("/root/main/temp/mvsrc", last_dest, difference);
  651. grd_deptlist.valueMatrix(new Number(last_dest)+1, grd_deptlist.colRef(standard_supdeptcd_cols)) = mv_dest_deptcd;
  652. fReorgSequence(grd_deptlist, mv_dest_deptcd, standard_supdeptcd_cols, standard_displayseq_cols);
  653. grd_deptlist.valueMatrix(new Number(last_dest)+1, grd_deptlist.colRef("supdeptnm")) = mv_dest_depthngnm;
  654. grd_deptlist.valueMatrix(new Number(last_dest)+1, grd_deptlist.colRef("rowstatus")) = 2;
  655. grd_deptlist.rowStatus(new Number(last_dest)+1) = 2;//상위부서가 변경되었기 때문에 update상태로 변경
  656. setTreeItem(grd_deptlist, grd_deptlist.colRef("level"), grd_deptlist.colRef("inorddeptnm"));
  657. model.setValue("/root/main/modedetail", "reorg");
  658. fRefreshGridRowStatus(grd_deptlist, "rowstatus");
  659. }
  660. }
  661. ]]>
  662. </script>
  663. </button>
  664. <button id="btn_selectdepthistory" class="btn2_letter4" style="left:206x; top:0px; width:64px; height:19px; ">
  665. <caption>이력선택</caption>
  666. <script type="javascript" ev:event="onclick">
  667. <![CDATA[
  668. var modedetail = model.getValue("/root/main/modedetail");
  669. if(modedetail=="reorg"){
  670. messageBox("출력순서 재조정이나 위치이동을 하는 재구성 작업중에는 이력을 선택할수 없습니다.", "C");
  671. return;
  672. }
  673. var row = grd_deptlist.row;
  674. if(row<1){
  675. messageBox("부서코드 목록을 선택하세요.", "C");
  676. return;
  677. }
  678. var color_status = grd_deptlist.valueMatrix(row, grd_deptlist.colRef("color"));
  679. fClearDeptHistory();
  680. model.refresh();
  681. if(color_status=="#dec6a4"){//임시인 경우
  682. model.setValue("/root/main/label/deptinfo", "부서정보추가");
  683. grd_depthistorylist.addItem();
  684. var add_offset = 1;
  685. fDept2DeptHistory(grd_deptlist.row,add_offset);
  686. }else{//임시가 아닌경우
  687. var deptcd = grd_deptlist.valueMatrix(row, grd_deptlist.colRef("deptcd"));
  688. model.removenode("/root/send/data");
  689. model.makeValue("/root/send/data/deptcd", deptcd);
  690. submit("TRZSD00110");
  691. for( var i=grd_depthistorylist.fixedrows; i<grd_depthistorylist.rows; i++){
  692. var iscurrent = grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("iscurrent"));
  693. if(iscurrent=='Y'){//기관에서 현재사용중인부서
  694. grd_depthistorylist.rowstyle( i , "data" , "background-color" ) = "#ffffff";//현제 기관의 선택된업무에서 사용중인 부서
  695. grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("color")) = "#ffffff";
  696. }else if(iscurrent=='F'){
  697. grd_depthistorylist.rowstyle( i , "data" , "background-color" ) = "#fcd2c1";//현제 기관에서 사용중이며 미래에 적용될 부서.
  698. grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("color")) = "#fcd2c1";
  699. }else if(iscurrent=='P'){
  700. grd_depthistorylist.rowstyle( i , "data" , "background-color" ) = "#b9e5fb";//현제 기관에서 사용중이며, 종료된부서.
  701. grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("color")) = "#b9e5fb";
  702. }
  703. }
  704. var history_target_deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("deptcd"));
  705. var history_target_valifromdd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("valifromdd"));
  706. for( var i=grd_depthistorylist.fixedrows; i<grd_depthistorylist.rows; i++){
  707. var history_deptcd = grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("deptcd"));
  708. var history_valifromdd = grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("valifromdd"));
  709. if(history_target_deptcd==history_deptcd && history_target_valifromdd==history_valifromdd){
  710. grd_depthistorylist.row = i;
  711. break;
  712. }
  713. }
  714. }
  715. fInitMainDataControls(false);
  716. fHistoryGrid2Main();
  717. model.setValue("/root/main/modedetail", "retrived");
  718. model.setValue("/root/main/label/deptinfo", "부서정보보기")
  719. model.refresh();
  720. fInitMainDataControls(true);
  721. ]]>
  722. </script>
  723. </button>
  724. </group>
  725. <group id="group2" style="left:1095px; top:54px; width:85px; height:20px; ">
  726. <button id="btn_create" class="btn2_letter2" style="left:0px; top:0px; width:60px; height:19px; ">
  727. <caption>추가</caption>
  728. <script type="javascript" ev:event="DOMActivate">
  729. <![CDATA[
  730. //부서추가시 출력순서 재구성, 출력순서재조정, 기관관리자권한이 아닌 사용자인 경우에 기능을 수행할수 없다.
  731. var modedetail = model.getValue("/root/main/modedetail");
  732. if(modedetail=="reorg"){
  733. messageBox("출력순서 재조정이나 위치이동을 하는 재구성 작업중에는 이력수정에 해당하는 '추가','수정' 작업을 수행할수 없습니다.", "C");
  734. return;
  735. }else if(!fGridSelected(grd_depthistorylist)){
  736. messageBox("부서이력목록을", "C002");
  737. return;
  738. }else if(fHasDeptHistoryBundle("future")){
  739. messageBox("미래이력이 존재합니다.", "C");
  740. return;
  741. }else{
  742. var deptcd = model.getValue("/root/main/data/deptcd");
  743. var deptcd_offset = fFindGridItem(grd_deptlist, grd_deptlist.colRef("deptcd"), deptcd);
  744. var authority = model.getValue("/root/main/search/authority");
  745. var supdeptcd = grd_deptlist.valueMatrix(deptcd_offset, grd_deptlist.colRef(authority));
  746. if(supdeptcd!=""){
  747. var parents_offset = fGetGridItemIndex(grd_deptlist, grd_deptlist.colRef("deptcd"), supdeptcd);
  748. var paretns_status = grd_deptlist.valueMatrix(parents_offset, grd_deptlist.colRef("color"));
  749. if(paretns_status=="#dec6a4"){
  750. messageBox("상위부서가 임시인경우 하위부서를 추가할수 없습니다.", "C");
  751. return;
  752. }
  753. }
  754. }
  755. //해당부서이력의 상태를 구한다.
  756. var has_present = fHasDeptHistoryBundle("present");
  757. //해당 부서의 이력이 임시이력만 있는 경우
  758. if(!has_present){
  759. fInitMainDataControls(false);
  760. fHistoryGrid2Main();
  761. var min_valifromdd = fGetMinValifromddFutureDeptHistory();
  762. var min_valifromdd_date = min_valifromdd.toDate("YYYYMMDD");
  763. var next_valifromdd_date = min_valifromdd_date.getAddDate(1, "D");
  764. var next_valifromdd = next_valifromdd_date.getDateFormat("YYYYMMDD");
  765. model.setValue("/root/main/data/valifromdd", next_valifromdd);
  766. model.setValue("/root/main/data/valitodd", "99991231");
  767. model.setValue("/root/main/modedetail", "create");
  768. model.setValue("/root/main/modedetailstatus", "temporary");
  769. model.setValue("/root/main/label/deptinfo", "부서정보추가");
  770. model.refresh();
  771. ipt_deptcd.disabled = true;
  772. ipt_supdeptcd.disabled = true;
  773. }else{
  774. var present_index = fIndexOfDeptHistory('present');
  775. var valitodd = grd_depthistorylist.valueMatrix(present_index, grd_depthistorylist.colRef("valitodd"));
  776. var currentdd = new Date().getDateFormat("YYYYMMDD");
  777. var interval = getDateInterval(currentdd, valitodd);
  778. if(interval>365){
  779. messageBox("미래이력의 유효한 시작일자가 현재일자와 1년이상 차이가 납니다. 현재이력을 먼저 종료한후 미래이력을 추가하십시오.", "C");
  780. return;
  781. }else{
  782. var min_valifromdd = valitodd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD");
  783. fInitMainDataControls(false);
  784. fHistoryGrid2Main();
  785. model.setValue("/root/main/data/valifromdd", min_valifromdd);
  786. model.setValue("/root/main/data/valitodd", "99991231");
  787. model.setValue("/root/main/modedetail", "create");
  788. model.setValue("/root/main/label/deptinfo", "부서정보추가");
  789. model.refresh();
  790. ipt_deptcd.disabled = true;
  791. ipt_supdeptcd.disabled = true;
  792. }
  793. }
  794. ]]>
  795. </script>
  796. </button>
  797. <button id="btn_update" class="btn2_letter2" style="left:42px; top:0px; width:42px; height:19px; ">
  798. <caption>수정</caption>
  799. <script type="javascript" ev:event="DOMActivate">
  800. <![CDATA[
  801. var modedetail = model.getValue("/root/main/modedetail");
  802. if(modedetail=="reorg"){
  803. messageBox("출력순서 재조정이나 위치이동을 하는 재구성 작업중에는 이력수정에 해당하는 '추가','수정' 작업을 수행할수 없습니다.", "C");
  804. return;
  805. }
  806. var history_selected = fGridSelected(grd_depthistorylist);
  807. if(!history_selected){
  808. messageBox("부서이력목록을", "C002");
  809. return;
  810. }
  811. var history_status = fGetDeptHistoryStatus(grd_depthistorylist.row);
  812. if(history_status=="present"){
  813. fHistoryGrid2Main();
  814. model.refresh();
  815. fInitMainDataControls(true);
  816. ipt_valitodd.disabled = false;
  817. model.setValue("/root/main/modedetail", "update");
  818. model.setValue("/root/main/modedetailstatus", "present");
  819. model.setValue("/root/main/label/deptinfo", "부서정보수정");
  820. model.refresh();
  821. }else if(history_status=="future"){
  822. fHistoryGrid2Main();
  823. model.refresh();
  824. fInitMainDataControls(false);
  825. ipt_deptcd.disabled = true;
  826. ipt_supdeptcd.disabled = true;
  827. model.setValue("/root/main/modedetail", "update");
  828. model.setValue("/root/main/modedetailstatus", "future");
  829. model.setValue("/root/main/label/deptinfo", "부서정보수정");
  830. model.refresh();
  831. }else if(history_status=="past"){
  832. messageBox("과거부서이력은 수정할수 없습니다.", "C");
  833. return;
  834. }else if(history_status=="temporary"){
  835. messageBox("임시부서이력은 추가만 가능합니다.", "C");
  836. }else{
  837. messageBox("error=>history_status:"+history_status, "C");
  838. }
  839. ]]>
  840. </script>
  841. </button>
  842. </group>
  843. <input id="ipt_deptcd" ref="/root/main/data/deptcd" class="input_essential" navindex="3" style="left:959px; top:130px; width:228px; height:19px; "/>
  844. <input id="ipt_inorddeptnm" ref="/root/main/data/inorddeptnm" class="input_essential" navindex="4" maxlength="21" style="left:959px; top:154px; width:228px; height:19px; ">
  845. <script type="javascript" ev:event="onkeyup">
  846. <![CDATA[
  847. var strlen = 0;
  848. var str = ipt_inorddeptnm.currentText
  849. for (var i=0; i<str.length; i++) {
  850. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  851. if (strlen > 64) {
  852. messageBox("최대입력글자인 64byte를 ", "E003");
  853. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  854. break;
  855. }
  856. }
  857. ]]>
  858. </script>
  859. </input>
  860. <input id="ipt_deptchinm" ref="/root/main/data/deptchinm" class="input_essential" navindex="6" maxlength="21" style="left:959px; top:201px; width:228px; height:19px; ">
  861. <script type="javascript" ev:event="onkeyup">
  862. <![CDATA[
  863. var strlen = 0;
  864. var str = ipt_deptchinm.currentText
  865. for (var i=0; i<str.length; i++) {
  866. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  867. if (strlen > 64) {
  868. messageBox("최대입력글자인 64byte를 ", "E003");
  869. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  870. break;
  871. }
  872. }
  873. ]]>
  874. </script>
  875. </input>
  876. <input id="ipt_depthngabbr" ref="/root/main/data/depthngabbr" class="input_essential" navindex="7" maxlength="21" style="left:959px; top:273px; width:228px; height:19px; ">
  877. <script type="javascript" ev:event="onkeyup">
  878. <![CDATA[
  879. var strlen = 0;
  880. var str = ipt_depthngabbr.currentText
  881. for (var i=0; i<str.length; i++) {
  882. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  883. if (strlen > 64) {
  884. messageBox("최대입력글자인 64byte를 ", "E003");
  885. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  886. break;
  887. }
  888. }
  889. ]]>
  890. </script>
  891. </input>
  892. <input id="ipt_deptengnm" ref="/root/main/data/deptengnm" class="input_essential" navindex="5" imemode="disabled" maxlength="60" style="left:959px; top:177px; width:228px; height:19px; ">
  893. <script type="javascript" ev:event="onkeyup">
  894. <![CDATA[
  895. var strlen = 0;
  896. var str = ipt_deptengnm.currentText
  897. for (var i=0; i<str.length; i++) {
  898. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  899. if (strlen > 64) {
  900. messageBox("최대입력글자인 64byte를 ", "E003");
  901. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  902. break;
  903. }
  904. }
  905. ]]>
  906. </script>
  907. </input>
  908. <input id="ipt_deptengabbr" ref="/root/main/data/deptengabbr" class="input_essential" navindex="8" imemode="disabled" maxlength="10" style="left:959px; top:297px; width:228px; height:19px; ">
  909. <script type="javascript" ev:event="onkeyup">
  910. <![CDATA[
  911. var strlen = 0;
  912. var str = ipt_deptengabbr.currentText
  913. for (var i=0; i<str.length; i++) {
  914. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  915. if (strlen > 10) {
  916. messageBox("최대입력글자인 10byte를 ", "E003");
  917. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  918. break;
  919. }
  920. }
  921. ]]>
  922. </script>
  923. </input>
  924. <textarea id="tar_deptplce" ref="/root/main/data/deptplce" navindex="9" maxlength="21" style="left:959px; top:321px; width:228px; height:42px; ">
  925. <script type="javascript" ev:event="onkeyup">
  926. <![CDATA[
  927. var strlen = 0;
  928. var str = tar_deptplce.currentText
  929. for (var i=0; i<str.length; i++) {
  930. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  931. if (strlen > 64) {
  932. messageBox("최대입력글자인 64byte를 ", "E003");
  933. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  934. break;
  935. }
  936. }
  937. ]]>
  938. </script>
  939. </textarea>
  940. <input id="ipt_nextplceprity" ref="/root/main/data/nextplceprity" class="input_essential" navindex="13" maxlength="4" format="999999-9999999" style="left:1136px; top:388px; width:50px; height:19px; ">
  941. <script type="javascript" ev:event="onkeyup">
  942. <![CDATA[
  943. var strlen = 0;
  944. var str = ipt_nextplceprity.currentText
  945. for (var i=0; i<str.length; i++) {
  946. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  947. if (strlen > 4) {
  948. messageBox("최대입력글자인 4byte를 ", "E003");
  949. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  950. break;
  951. }
  952. }
  953. ]]>
  954. </script>
  955. </input>
  956. <select1 id="cmb_inetrsrvyn" ref="/root/main/data/inetrsrvyn" class="combo_essential" navindex="11" appearance="minimal" style="left:1136px; top:364px; width:50px; height:19px; ">
  957. <choices>
  958. <item>
  959. <label>N</label>
  960. <value>N</value>
  961. </item>
  962. <item>
  963. <label>Y</label>
  964. <value>Y</value>
  965. </item>
  966. </choices>
  967. </select1>
  968. <select1 id="cmb_reqauthdeptyn" ref="/root/main/data/reqauthdeptyn" class="combo_essential" navindex="15" appearance="minimal" style="left:959px; top:436px; width:50px; height:19px; ">
  969. <choices>
  970. <item>
  971. <label>N</label>
  972. <value>N</value>
  973. </item>
  974. <item>
  975. <label>Y</label>
  976. <value>Y</value>
  977. </item>
  978. </choices>
  979. </select1>
  980. <select1 id="cmb_nextplceyn" ref="/root/main/data/nextplceyn" class="combo_essential" navindex="12" appearance="minimal" style="left:959px; top:388px; width:50px; height:19px; ">
  981. <choices>
  982. <item>
  983. <label>N</label>
  984. <value>N</value>
  985. </item>
  986. <item>
  987. <label>Y</label>
  988. <value>Y</value>
  989. </item>
  990. </choices>
  991. </select1>
  992. <select1 id="cmb_dutplceuseyn" ref="/root/main/data/dutplceuseyn" class="combo_essential" navindex="10" appearance="minimal" style="left:959px; top:364px; width:50px; height:19px; ">
  993. <choices>
  994. <item>
  995. <label>N</label>
  996. <value>N</value>
  997. </item>
  998. <item>
  999. <label>Y</label>
  1000. <value>Y</value>
  1001. </item>
  1002. </choices>
  1003. </select1>
  1004. <select1 id="cmb_planuseyn" ref="/root/main/data/planuseyn" class="combo_essential" navindex="22" appearance="minimal" style="left:959px; top:605px; width:50px; height:19px; ">
  1005. <choices>
  1006. <item>
  1007. <label>N</label>
  1008. <value>N</value>
  1009. </item>
  1010. <item>
  1011. <label>Y</label>
  1012. <value>Y</value>
  1013. </item>
  1014. </choices>
  1015. </select1>
  1016. <input id="ipt_valifromdd" ref="/root/main/data/valifromdd" class="input_search" navindex="1" inputtype="date" style="left:959px; top:82px; width:228px; height:19px; ">
  1017. <script type="javascript" ev:event="onbuttonclick">
  1018. <![CDATA[
  1019. ipt_valifromdd.attribute("_value") = ipt_valifromdd.value;
  1020. ]]>
  1021. </script>
  1022. <script type="javascript" ev:event="DOMFocusIn">
  1023. <![CDATA[
  1024. ipt_valifromdd.attribute("_value") = ipt_valifromdd.value;
  1025. ]]>
  1026. </script>
  1027. <script type="javascript" ev:event="xforms-value-changed">
  1028. <![CDATA[
  1029. var valifromdd = model.getValue("/root/main/data/valifromdd").getTrim();
  1030. var valitodd = model.getValue("/root/main/data/valitodd").getTrim();
  1031. var valifromdd_key = model.getValue("/root/main/data/valifromddkey").getTrim();
  1032. var valitodd_key = model.getValue("/root/main/data/valitoddkey").getTrim();
  1033. if(valifromdd!=""&&valitodd!=""){
  1034. var result = fInspectDate(valifromdd, valitodd, valifromdd_key, valitodd_key);
  1035. if(!result){
  1036. ipt_valifromdd.value = ipt_valifromdd.attribute("_value");
  1037. model.setFocus("ipt_valifromdd");
  1038. return;
  1039. }
  1040. }
  1041. ]]>
  1042. </script>
  1043. </input>
  1044. <caption id="caption11" class="cell_1" style="left:833px; top:81px; width:125px; height:23px; vertical-align:middle; ">유효 시작일자</caption>
  1045. <select1 id="cmb_orduseyn" ref="/root/main/data/orduseyn" class="combo_essential" navindex="18" appearance="minimal" style="left:920px; top:508px; width:80px; height:19px; ">
  1046. <choices>
  1047. <item>
  1048. <label>사용안함</label>
  1049. <value>N</value>
  1050. </item>
  1051. <item>
  1052. <label>사용함</label>
  1053. <value>Y</value>
  1054. </item>
  1055. </choices>
  1056. <script type="javascript" ev:event="xforms-value-changed">
  1057. <![CDATA[
  1058. var orduseyn = model.getValue("/root/main/data/orduseyn");
  1059. if(orduseyn=="Y"){
  1060. cmb_orddeptflag.disabled = false;
  1061. }
  1062. ]]>
  1063. </script>
  1064. </select1>
  1065. <select1 id="cmb_reqfild" ref="/root/main/data/reqfild" class="combo_essential" navindex="17" appearance="minimal" style="left:959px; top:484px; width:226px; height:19px; ">
  1066. <choices>
  1067. <itemset nodeset="/root/init/reqfieldcode/P0291">
  1068. <label ref="cdnm"/>
  1069. <value ref="cdid"/>
  1070. </itemset>
  1071. </choices>
  1072. </select1>
  1073. <select1 id="cmb_psnworkuseyn" ref="/root/main/data/psnworkuseyn" class="combo_essential" navindex="27" appearance="minimal" style="left:1136px; top:653px; width:50px; height:19px; ">
  1074. <choices>
  1075. <item>
  1076. <label>N</label>
  1077. <value>N</value>
  1078. </item>
  1079. <item>
  1080. <label>Y</label>
  1081. <value>Y</value>
  1082. </item>
  1083. </choices>
  1084. </select1>
  1085. <select1 id="cmb_purcuseyn" ref="/root/main/data/purcuseyn" class="combo_essential" navindex="23" appearance="minimal" style="left:1136px; top:605px; width:50px; height:19px; ">
  1086. <choices>
  1087. <item>
  1088. <label>N</label>
  1089. <value>N</value>
  1090. </item>
  1091. <item>
  1092. <label>Y</label>
  1093. <value>Y</value>
  1094. </item>
  1095. </choices>
  1096. </select1>
  1097. <select1 id="cmb_fnworkuseyn" ref="/root/main/data/fnworkuseyn" class="combo_essential" navindex="28" appearance="minimal" style="left:959px; top:677px; width:50px; height:19px; ">
  1098. <choices>
  1099. <item>
  1100. <label>N</label>
  1101. <value>N</value>
  1102. </item>
  1103. <item>
  1104. <label>Y</label>
  1105. <value>Y</value>
  1106. </item>
  1107. </choices>
  1108. </select1>
  1109. <select1 id="cmb_careuseyn" ref="/root/main/data/careuseyn" class="combo_essential" navindex="24" appearance="minimal" style="left:959px; top:629px; width:50px; height:19px; ">
  1110. <choices>
  1111. <item>
  1112. <label>N</label>
  1113. <value>N</value>
  1114. </item>
  1115. <item>
  1116. <label>Y</label>
  1117. <value>Y</value>
  1118. </item>
  1119. </choices>
  1120. </select1>
  1121. <select1 id="cmb_gafruseyn" ref="/root/main/data/gafruseyn" class="combo_essential" navindex="29" appearance="minimal" style="left:1136px; top:677px; width:50px; height:19px; ">
  1122. <choices>
  1123. <item>
  1124. <label>N</label>
  1125. <value>N</value>
  1126. </item>
  1127. <item>
  1128. <label>Y</label>
  1129. <value>Y</value>
  1130. </item>
  1131. </choices>
  1132. </select1>
  1133. <caption id="caption36" class="cell_1" style="left:1010px; top:628px; width:125px; height:23px; vertical-align:middle; ">수납 사용여부</caption>
  1134. <select1 id="cmb_rcptuseyn" ref="/root/main/data/rcptuseyn" class="combo_essential" navindex="25" appearance="minimal" style="left:1136px; top:629px; width:50px; height:19px; ">
  1135. <choices>
  1136. <item>
  1137. <label>N</label>
  1138. <value>N</value>
  1139. </item>
  1140. <item>
  1141. <label>Y</label>
  1142. <value>Y</value>
  1143. </item>
  1144. </choices>
  1145. </select1>
  1146. <select1 id="cmb_pamuseyn" ref="/root/main/data/pamuseyn" class="combo_essential" navindex="30" appearance="minimal" style="left:959px; top:701px; width:50px; height:19px; ">
  1147. <choices>
  1148. <item>
  1149. <label>N</label>
  1150. <value>N</value>
  1151. </item>
  1152. <item>
  1153. <label>Y</label>
  1154. <value>Y</value>
  1155. </item>
  1156. </choices>
  1157. </select1>
  1158. <select1 id="cmb_healcareinfouseyn" ref="/root/main/data/healcareinfouseyn" class="combo_essential" navindex="26" appearance="minimal" style="left:959px; top:653px; width:50px; height:19px; ">
  1159. <choices>
  1160. <item>
  1161. <label>N</label>
  1162. <value>N</value>
  1163. </item>
  1164. <item>
  1165. <label>Y</label>
  1166. <value>Y</value>
  1167. </item>
  1168. </choices>
  1169. </select1>
  1170. <caption id="caption40" class="cell_1" style="left:833px; top:652px; width:125px; height:23px; vertical-align:middle; ">의료정보 사용여부</caption>
  1171. <caption id="caption43" class="cell_1" style="left:1010px; top:652px; width:125px; height:23px; vertical-align:middle; ">인사 사용여부</caption>
  1172. <caption id="caption44" class="cell_1" style="left:833px; top:628px; width:125px; height:23px; vertical-align:middle; ">간호사용여부</caption>
  1173. <caption id="caption45" class="cell_1" style="left:833px; top:508px; width:86px; height:23px; vertical-align:middle; ">진료사용여부</caption>
  1174. <caption id="caption46" class="cell_1" style="left:833px; top:436px; width:125px; height:23px; vertical-align:middle; ">청구 권한 부서</caption>
  1175. <caption id="caption48" class="cell_1" style="left:1010px; top:604px; width:125px; height:23px; vertical-align:middle; ">구매 사용여부</caption>
  1176. <caption id="caption49" class="cell_1" style="left:833px; top:273px; width:125px; height:23px; vertical-align:middle; ">부서 한글약어</caption>
  1177. <caption id="caption51" class="cell_1" style="left:1010px; top:676px; width:125px; height:23px; vertical-align:middle; ">총무 사용여부</caption>
  1178. <caption id="caption53" class="cell_1" style="left:833px; top:201px; width:125px; height:23px; vertical-align:middle; ">부서코드 한문명칭</caption>
  1179. <caption id="caption54" class="cell_1" style="left:833px; top:321px; width:125px; height:42px; vertical-align:middle; ">부서 위치</caption>
  1180. <caption id="caption55" class="cell_1" style="left:833px; top:484px; width:125px; height:23px; vertical-align:middle; ">청구분야</caption>
  1181. <caption id="caption56" class="cell_1" style="left:833px; top:460px; width:125px; height:23px; vertical-align:middle; ">청구과 번호</caption>
  1182. <caption id="caption57" class="cell_1" style="left:833px; top:388px; width:125px; height:23px; vertical-align:middle; ">다음 가실곳 여부</caption>
  1183. <caption id="caption58" class="cell_1" style="left:833px; top:177px; width:125px; height:23px; vertical-align:middle; ">부서코드 영문명칭</caption>
  1184. <caption id="caption59" class="cell_1" style="left:833px; top:129px; width:125px; height:23px; vertical-align:middle; ">부서코드</caption>
  1185. <caption id="caption61" class="cell_1" style="left:833px; top:532px; width:86px; height:23px; vertical-align:middle; ">진료부서구분</caption>
  1186. <caption id="caption62" class="cell_1" style="left:1010px; top:388px; width:125px; height:23px; vertical-align:middle; ">다음 가실곳 우선순위</caption>
  1187. <caption id="caption63" class="cell_1" style="left:833px; top:700px; width:125px; height:23px; vertical-align:middle; ">원무 사용여부</caption>
  1188. <caption id="caption65" class="cell_1" style="left:1010px; top:364px; width:125px; height:23px; vertical-align:middle; ">인터넷 예약구분</caption>
  1189. <caption id="caption66" class="cell_1" style="left:833px; top:153px; width:125px; height:23px; vertical-align:middle; ">부서명 (MIS사용)</caption>
  1190. <caption id="caption68" class="cell_1" style="left:833px; top:364px; width:125px; height:23px; vertical-align:middle; ">근무지사용여부</caption>
  1191. <caption id="caption69" class="cell_1" style="left:833px; top:297px; width:125px; height:23px; vertical-align:middle; ">부서 영문약어</caption>
  1192. <caption id="caption70" class="cell_1" style="left:833px; top:676px; width:125px; height:23px; vertical-align:middle; ">재무 사용여부</caption>
  1193. <caption id="caption71" class="cell_1" style="left:833px; top:604px; width:125px; height:23px; vertical-align:middle; ">기획 사용여부</caption>
  1194. <caption id="caption72" class="cell_1" style="left:833px; top:412px; width:125px; height:23px; vertical-align:middle; ">전화번호</caption>
  1195. <input id="ipt_cntctel" ref="/root/main/data/cntctel" class="input_essential" navindex="14" maxlength="20" style="left:959px; top:412px; width:228px; height:19px; ">
  1196. <script type="javascript" ev:event="onkeyup">
  1197. <![CDATA[
  1198. var strlen = 0;
  1199. var str = ipt_cntctel.currentText;
  1200. for (var i=0; i<str.length; i++) {
  1201. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  1202. if (strlen > 20) {
  1203. messageBox("최대입력글자인 20byte를 ", "E003");
  1204. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  1205. break;
  1206. }
  1207. }
  1208. ]]>
  1209. </script>
  1210. </input>
  1211. <select1 id="cmb_orddeptflag" ref="/root/main/data/orddeptflag" class="combo_essential" navindex="19" appearance="minimal" style="left:920px; top:532px; width:95px; height:19px; ">
  1212. <choices>
  1213. <item>
  1214. <label>입원진료과(D)</label>
  1215. <value>D</value>
  1216. </item>
  1217. <item>
  1218. <label>병동(W)</label>
  1219. <value>W</value>
  1220. </item>
  1221. <item>
  1222. <label>Consult부서(A)</label>
  1223. <value>A</value>
  1224. </item>
  1225. <item>
  1226. <label>기타(X)</label>
  1227. <value>X</value>
  1228. </item>
  1229. <item>
  1230. <label>진료지원수행부서(E)</label>
  1231. <value>E</value>
  1232. </item>
  1233. </choices>
  1234. </select1>
  1235. <select1 id="cmb_reqdeptno" ref="/root/main/data/reqdeptno" class="combo_essential" navindex="16" appearance="minimal" style="left:960px; top:460px; width:225px; height:19px; ">
  1236. <choices>
  1237. <itemset nodeset="/root/init/reqdeptnocode/P0322">
  1238. <label ref="cdnm"/>
  1239. <value ref="cdid"/>
  1240. </itemset>
  1241. </choices>
  1242. </select1>
  1243. <caption id="caption3" class="cell_1" style="left:833px; top:105px; width:125px; height:23px; vertical-align:middle; ">유효 종료일자</caption>
  1244. <input id="ipt_valitodd" ref="/root/main/data/valitodd" class="input_search" navindex="2" inputtype="date" style="left:960px; top:106px; width:228px; height:19px; ">
  1245. <script type="javascript" ev:event="onbuttonclick">
  1246. <![CDATA[
  1247. ipt_valitodd.attribute("_value") = ipt_valitodd.value;
  1248. ]]>
  1249. </script>
  1250. <script type="javascript" ev:event="DOMFocusIn">
  1251. <![CDATA[
  1252. ipt_valitodd.attribute("_value") = ipt_valitodd.value;
  1253. ]]>
  1254. </script>
  1255. <script type="javascript" ev:event="xforms-value-changed">
  1256. <![CDATA[
  1257. var valifromdd = model.getValue("/root/main/data/valifromdd").getTrim();
  1258. var valifromdd_key = model.getValue("/root/main/data/valifromddkey").getTrim();
  1259. var valitodd = model.getValue("/root/main/data/valitodd").getTrim();
  1260. var valitodd_key = model.getValue("/root/main/data/valitoddkey").getTrim();
  1261. if(valifromdd!=""&&valitodd!=""){
  1262. var result = fInspectDate(valifromdd, valitodd, valifromdd_key, valitodd_key);
  1263. if(!result){
  1264. ipt_valitodd.value = ipt_valitodd.attribute("_value");
  1265. model.setFocus("ipt_valitodd");
  1266. return;
  1267. }
  1268. }
  1269. ]]>
  1270. </script>
  1271. </input>
  1272. <select1 id="cmb_homecareuseyn" ref="/root/main/data/homecareuseyn" class="combo_essential" navindex="31" appearance="minimal" style="left:1136px; top:701px; width:50px; height:19px; ">
  1273. <choices>
  1274. <item>
  1275. <label>N</label>
  1276. <value>N</value>
  1277. </item>
  1278. <item>
  1279. <label>Y</label>
  1280. <value>Y</value>
  1281. </item>
  1282. </choices>
  1283. </select1>
  1284. <caption id="caption5" class="cell_1" style="left:1010px; top:700px; width:125px; height:23px; vertical-align:middle; ">그룹웨어 사용여부</caption>
  1285. <caption id="caption7" class="cell_1" style="left:832px; top:580px; width:128px; height:23px; vertical-align:middle; ">보험사용여부</caption>
  1286. <select1 id="cmb_insuuseyn" ref="/root/main/data/insuuseyn" class="combo_essential" navindex="21" appearance="minimal" style="left:961px; top:581px; width:221px; height:19px; ">
  1287. <choices>
  1288. <itemset nodeset="/root/init/insuuseyn/Z0015">
  1289. <label ref="cdnm"/>
  1290. <value ref="cdid"/>
  1291. </itemset>
  1292. </choices>
  1293. </select1>
  1294. <select1 id="cmb_dgenuseyn" ref="/root/main/data/dgenuseyn" class="combo_essential" navindex="20" appearance="minimal" style="left:1097px; top:556px; width:88px; height:19px; ">
  1295. <choices>
  1296. <item>
  1297. <label>N</label>
  1298. <value>N</value>
  1299. </item>
  1300. <item>
  1301. <label>Y</label>
  1302. <value>Y</value>
  1303. </item>
  1304. </choices>
  1305. </select1>
  1306. <caption id="caption9" class="cell_1" style="left:1001px; top:555px; width:94px; height:23px; vertical-align:middle; ">근태 사용여부</caption>
  1307. <datagrid id="grd_deptlist" nodeset="/root/main/deptlist/dept" scroll="autovscroll" caption="색상^행상태^진료과유형^진료분과구분^입원진료부서명^외래진료부서명^부서명(MIS사용)^상위 부서명^부서코드^부서 영문명^부서 한문명^부서위치^부서 영문약어^부서 한글약어^청구분야^진료부서구분^임상과출력순서^청구부서번호^청구세부진료과^다음 가실곳 여부^다음 가실곳 우선순위^인터넷 예약구분^전화번호^근무지부서여부^청구권한부서^기획부서여부^기획상위부서^기획부서 출력순서^진료부서여부^진료상위부서^진료부서 출력순서^인사부서 여부^인사 상위부서^인사부서 출력순서^구매부서 사용여부^구매 상위부서^구매부서 출력순서^재무부서 사용여부^재무 상위부서^재무 출력순서^간호 사용여부^간호 상위부서^간호 출력순서^총무 사용여부^총무 상위부서^총무 출력순서^수납 사용여부^수납 상위부서^수납 출력순서^원무 사용여부^원무 상위부서^원무 출력순서^의료정보 사용여부^의료정보 상위부서^의료정보 출력순서^보험 사용여부^보험 상위부서^보험 출력순서^근태 사용여부^근태 상위부서^근태 출력순서^그룹웨어사용여부^그룹웨어상위부서코드^그룹웨어출력순서^기관상위부서코드^기관출력순서^기관코드^유효 시작일자^유효 종료일자^레벨^현재사용여부" colsep="▦" colwidth="100, 47, 100, 100, 100, 100, 115, 300, 127, 120, 100, 100, 100, 100, 100, 100, 100, 124, 100, 100, 100, 100, 121, 100, 100, 100, 100, 100, 100, 111, 100, 100, 113, 100, 100, 105, 111, 100, 107, 108, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 106, 107, 107, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" defaultrows="0" extendlastcol="noscroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="▩" style="left:399px; top:80px; width:406px; height:460px; border-color:#808080; ">
  1308. <col ref="color" visibility="hidden"/>
  1309. <col ref="rowstatus" visibility="hidden"/>
  1310. <col ref="orddeptkind" visibility="hidden"/>
  1311. <col ref="ordclsdeptflag" visibility="hidden"/>
  1312. <col ref="indepthngnm" visibility="hidden"/>
  1313. <col ref="depthngnm" visibility="hidden"/>
  1314. <col ref="inorddeptnm"/>
  1315. <col ref="supdeptnm" visibility="hidden"/>
  1316. <col ref="deptcd" visibility="hidden"/>
  1317. <col ref="deptengnm" visibility="hidden"/>
  1318. <col ref="deptchinm" visibility="hidden"/>
  1319. <col ref="deptplce" visibility="hidden"/>
  1320. <col ref="deptengabbr" visibility="hidden"/>
  1321. <col ref="depthngabbr" visibility="hidden"/>
  1322. <col ref="reqfild" visibility="hidden"/>
  1323. <col ref="orddeptflag" visibility="hidden"/>
  1324. <col ref="clincdeptdispseq" visibility="hidden"/>
  1325. <col ref="reqdeptno" visibility="hidden"/>
  1326. <col ref="nextplceyn" visibility="hidden"/>
  1327. <col ref="nextplceprity" visibility="hidden"/>
  1328. <col ref="inetrsrvyn" visibility="hidden"/>
  1329. <col ref="cntctel" visibility="hidden"/>
  1330. <col ref="dutplceuseyn" visibility="hidden"/>
  1331. <col ref="reqauthdeptyn" visibility="hidden"/>
  1332. <col ref="planuseyn" visibility="hidden"/>
  1333. <col ref="plansupdeptcd" visibility="hidden"/>
  1334. <col ref="plandispseq" visibility="hidden"/>
  1335. <col ref="orduseyn" visibility="hidden"/>
  1336. <col ref="ordsupdeptcd" visibility="hidden"/>
  1337. <col ref="orddispseq" visibility="hidden"/>
  1338. <col ref="psnworkuseyn" visibility="hidden"/>
  1339. <col ref="psnworksupdeptcd" visibility="hidden"/>
  1340. <col ref="psnworkdispseq" visibility="hidden"/>
  1341. <col ref="purcuseyn" visibility="hidden"/>
  1342. <col ref="purcsupdeptcd" visibility="hidden"/>
  1343. <col ref="purcdispseq" visibility="hidden"/>
  1344. <col ref="fnworkuseyn" visibility="hidden"/>
  1345. <col ref="fnworksupdeptcd" visibility="hidden"/>
  1346. <col ref="fnworkdispseq" visibility="hidden" style="left:4299px; top:23px; width:107px; height:23px; "/>
  1347. <col ref="careuseyn" visibility="hidden"/>
  1348. <col ref="caresupdeptcd" visibility="hidden"/>
  1349. <col ref="caredispseq" visibility="hidden"/>
  1350. <col ref="gafruseyn" visibility="hidden"/>
  1351. <col ref="gafrsupdeptcd" visibility="hidden"/>
  1352. <col ref="gafrdispseq" visibility="hidden"/>
  1353. <col ref="rcptuseyn" visibility="hidden"/>
  1354. <col ref="rcptsupdeptcd" visibility="hidden"/>
  1355. <col ref="rcptdispseq" visibility="hidden"/>
  1356. <col ref="pamuseyn" visibility="hidden"/>
  1357. <col ref="pamsupdeptcd" visibility="hidden"/>
  1358. <col ref="pamdispseq" visibility="hidden"/>
  1359. <col ref="healcareinfouseyn" visibility="hidden"/>
  1360. <col ref="healcareinfosupdeptcd" visibility="hidden"/>
  1361. <col ref="healcareinfodispseq" visibility="hidden"/>
  1362. <col ref="insuuseyn" visibility="hidden"/>
  1363. <col ref="insusupdeptcd" visibility="hidden"/>
  1364. <col ref="insudispseq" visibility="hidden"/>
  1365. <col ref="dgenuseyn" visibility="hidden"/>
  1366. <col ref="dgensupdeptcd" visibility="hidden"/>
  1367. <col ref="dgendispseq" visibility="hidden"/>
  1368. <col ref="homecareuseyn" visibility="hidden"/>
  1369. <col ref="homecaresupdeptcd" visibility="hidden"/>
  1370. <col ref="homecaredispseq" visibility="hidden"/>
  1371. <col ref="instsupdeptcd" visibility="hidden"/>
  1372. <col ref="instdispseq" visibility="hidden"/>
  1373. <col ref="instcd" visibility="hidden"/>
  1374. <col ref="valifromdd" visibility="hidden"/>
  1375. <col ref="valitodd" visibility="hidden"/>
  1376. <col ref="level" visibility="hidden"/>
  1377. <col ref="iscurrent" visibility="hidden"/>
  1378. <script type="javascript" ev:event="ondblclick">
  1379. <![CDATA[
  1380. var modedetail = model.getValue("/root/main/modedetail");
  1381. if(modedetail=="reorg"){
  1382. messageBox("출력순서 재조정이나 위치이동을 하는 재구성 작업중에는 이력을 선택할수 없습니다.", "C");
  1383. return;
  1384. }
  1385. if( !grd_deptlist.iscell(event.target)){
  1386. return;
  1387. }
  1388. var row = grd_deptlist.row;
  1389. var color_status = grd_deptlist.valueMatrix(row, grd_deptlist.colRef("color"));
  1390. fClearDeptHistory();
  1391. model.refresh();
  1392. if(color_status=="#dec6a4"){//임시인 경우
  1393. model.setValue("/root/main/label/deptinfo", "부서정보추가");
  1394. grd_depthistorylist.addItem();
  1395. var add_offset = 1;
  1396. fDept2DeptHistory(grd_deptlist.row,add_offset);
  1397. }else{//임시가 아닌경우
  1398. var deptcd = grd_deptlist.valueMatrix(row, grd_deptlist.colRef("deptcd"));
  1399. model.removenode("/root/send/data");
  1400. model.makeValue("/root/send/data/deptcd", deptcd);
  1401. submit("TRZSD00110");
  1402. for( var i=grd_depthistorylist.fixedrows; i<grd_depthistorylist.rows; i++){
  1403. var iscurrent = grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("iscurrent"));
  1404. if(iscurrent=='Y'){//기관에서 현재사용중인부서
  1405. grd_depthistorylist.rowstyle( i , "data" , "background-color" ) = "#ffffff";//현제 기관의 선택된업무에서 사용중인 부서
  1406. grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("color")) = "#ffffff";
  1407. }else if(iscurrent=='F'){
  1408. grd_depthistorylist.rowstyle( i , "data" , "background-color" ) = "#fcd2c1";//현제 기관에서 사용중이며 미래에 적용될 부서.
  1409. grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("color")) = "#fcd2c1";
  1410. }else if(iscurrent=='P'){
  1411. grd_depthistorylist.rowstyle( i , "data" , "background-color" ) = "#b9e5fb";//현제 기관에서 사용중이며, 종료된부서.
  1412. grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("color")) = "#b9e5fb";
  1413. }
  1414. }
  1415. var history_target_deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("deptcd"));
  1416. var history_target_valifromdd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("valifromdd"));
  1417. for( var i=grd_depthistorylist.fixedrows; i<grd_depthistorylist.rows; i++){
  1418. var history_deptcd = grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("deptcd"));
  1419. var history_valifromdd = grd_depthistorylist.valueMatrix(i, grd_depthistorylist.colRef("valifromdd"));
  1420. if(history_target_deptcd==history_deptcd && history_target_valifromdd==history_valifromdd){
  1421. grd_depthistorylist.row = i;
  1422. break;
  1423. }
  1424. }
  1425. }
  1426. fInitMainDataControls(false);
  1427. fHistoryGrid2Main();
  1428. model.setValue("/root/main/modedetail", "retrived");
  1429. model.setValue("/root/main/label/deptinfo", "부서정보보기")
  1430. model.refresh();
  1431. fInitMainDataControls(true);
  1432. ]]>
  1433. </script>
  1434. </datagrid>
  1435. <img id="img5" class="icon_left" style="left:372px; top:305px; width:26px; height:19px; background-stretch:stretch; ">
  1436. <script type="javascript" ev:event="onclick">
  1437. <![CDATA[
  1438. var row = grd_deptlist.row;
  1439. var status = grd_deptlist.rowStatus(row);
  1440. var deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("deptcd"));
  1441. if( status == 1 ){
  1442. var has_child = fFindGridTreeItemHasChild(grd_deptlist, row, "level");
  1443. if(!has_child){
  1444. grd_deptlist.deleterow(row, false); //행삭제
  1445. //alert(grd_deptlist.colRef("level")+", "+grd_deptlist.colRef("depthngnm"))
  1446. var standard = model.getValue("/root/main/search/authority");
  1447. var display_cols = standard.substring(0, standard.indexOf("supdeptcd")) + "dispseq"; //기준이 어떤상위부서인지 찾아보고, 해당 출력순서 행의 이름을 얻어온다.
  1448. var parents = fGetParents(grd_deptlist, row, standard);
  1449. fReorgSequence(grd_deptlist, parents, standard, display_cols);//부서정보그리드, 상위부서코드, 기준상위부서라벨, 기준출력순서라벨으로 해당상위부서 하위의 부서순서를 재정렬한다.
  1450. setTreeItem(grd_deptlist, grd_deptlist.colRef("level"), grd_deptlist.colRef("inorddeptnm"));//삭제한후에 그리드의 아웃라인을 다시 만든다.
  1451. var class_dept_index = fFindGridItem(grd_clsdeptlist, grd_clsdeptlist.colRef("deptcd"), deptcd);
  1452. var standard = model.getValue("/root/main/search/authority");
  1453. grd_clsdeptlist.valueMatrix(class_dept_index, grd_clsdeptlist.colRef(standard)) = "";
  1454. grd_clsdeptlist.rowstyle(class_dept_index , "data" , "background-color" ) = "#c8e67b";
  1455. setTreeItem( grd_clsdeptlist, grd_clsdeptlist.colRef("level"), grd_clsdeptlist.colRef("deptnm"));
  1456. fInitMainData();
  1457. fClearDeptHistory();
  1458. model.setValue("/root/main/modedetail", "reorg");
  1459. model.setValue("/root/main/modedetailstatus", "");
  1460. model.refresh();
  1461. fInitMainDataControls(true);
  1462. }else{
  1463. messageBox("부서코드 : "+deptcd+"는 하위부서코드를 포함하므로 삭제할수 없습니다.", "C");
  1464. return;
  1465. }
  1466. }
  1467. ]]>
  1468. </script>
  1469. </img>
  1470. <img id="img6" class="icon_top" style="left:806px; top:275px; width:26px; height:19px; background-stretch:stretch; ">
  1471. <script type="javascript" ev:event="onclick">
  1472. <![CDATA[
  1473. /*임시부서가 있는지 확인*/
  1474. var has_temporary = fHasTemporaryFromDeptGrid();
  1475. if(has_temporary){
  1476. messageBox("임시부서가 있는 상태에서 출력상태를 변경할수 없습니다.", "C");
  1477. return;
  1478. }
  1479. var modedetail = model.getValue("/root/main/modedetail");
  1480. if(modedetail!="init"&&modedetail!="reorg"){
  1481. if(modedetail=="create"){
  1482. var nextstep = messageBox("부서이력 추가작업중이었습니다. 추가작업이 초기화되며, 출력상태변경 작업을 진행하게 됩니다", "S001");
  1483. if(nextstep==6){
  1484. messageBox("출력상태 변경작업을 진행합니다.", "I");
  1485. }else{
  1486. return;
  1487. }
  1488. }else if(modedetail=="update"){
  1489. var nextstep = messageBox("부서이력 수정작업중이었습니다. 수정작업이 초기화되며, 출력상태변경 작업을 진행하게 됩니다", "S001");
  1490. if(nextstep==6){
  1491. messageBox("출력상태 변경작업을 진행합니다.", "I");
  1492. }else{
  1493. return;
  1494. }
  1495. }
  1496. fInitialize();
  1497. }
  1498. var dn_row = grd_deptlist.row;//부서정보 그리드에서 현재 선택된 부서
  1499. var deptcd = grd_deptlist.valueMatrix(dn_row, grd_deptlist.colRef("deptcd")); //부서정보 그리드에서 현재 선택된 부서의 부서코드
  1500. var up_row = fFindUpSameLevelRow(grd_deptlist);//상위에 같은레벨의 부서코드가 있는지 확인
  1501. if( up_row == -1 ){
  1502. messageBox("상위로 이동할수", "I004");
  1503. return;
  1504. }else{
  1505. var last_up_row = fCacheDeptBundle(grd_deptlist, up_row, "/root/main/deptlist/dept", "/root/main/temp/updept");//위에있는 같은레벨의 부서를 인스턴스 캐쉬에 저장한다.
  1506. var last_dn_row = fCacheDeptBundle(grd_deptlist, dn_row, "/root/main/deptlist/dept", "/root/main/temp/dndept");//선택된부서와 같은레벨의 부서를 인스턴스 캐쉬에 저장한다.
  1507. var parents_cols = model.getValue("/root/main/search/authority");//현재 설정된 부모부서코드라벨을 가져온다.
  1508. var parents = grd_deptlist.valueMatrix(dn_row, grd_deptlist.colRef(parents_cols));
  1509. var dispseq_cols = parents_cols.substring(0, parents_cols.indexOf("supdeptcd")) + "dispseq";
  1510. fCache2Grid("/root/main/temp/updept", last_dn_row);//위에있는 같은레벨의 부서('캐쉬에저장되어있음')를 선택된부서와 같은레벨의 부서의 마지막 위치부터 붙인다.
  1511. var updept_list = instance1.selectNodes("/root/main/temp/updept");//위에있는 같은레벨의 부서의 수를 알아내기위해 캐쉬에 저장되어있는 정보를 가져온다.
  1512. for(var i=0; i<updept_list.length; i++){//위에있는 같은레벨의 부서의 수만큼 시작위치부터 삭제한다.
  1513. grd_deptlist.deleterow(up_row, false);
  1514. }
  1515. fReorgSequence(grd_deptlist, parents, parents_cols, dispseq_cols);
  1516. model.setValue("/root/main/modedetail", "reorg");
  1517. model.setValue("/root/main/modedetailstatus", "");
  1518. grd_deptlist.refresh();
  1519. setTreeItem(grd_deptlist, grd_deptlist.colRef("level"), grd_deptlist.colRef("inorddeptnm"));
  1520. }
  1521. ]]>
  1522. </script>
  1523. </img>
  1524. <img id="img8" class="icon_bottom" style="left:806px; top:305px; width:26px; height:19px; background-stretch:stretch; ">
  1525. <script type="javascript" ev:event="onclick">
  1526. <![CDATA[
  1527. var has_temporary = fHasTemporaryFromDeptGrid();
  1528. if(has_temporary){
  1529. messageBox("임시부서가 있는 상태에서 출력상태를 변경할수 없습니다.", "C");
  1530. return;
  1531. }
  1532. var modedetail = model.getValue("/root/main/modedetail");
  1533. if(modedetail!="init"&&modedetail!="reorg"){
  1534. if(modedetail=="create"){
  1535. var nextstep = messageBox("부서이력 추가작업중이었습니다. 추가작업이 초기화되며, 출력상태변경 작업을 진행하게 됩니다", "S001");
  1536. if(nextstep==6){
  1537. messageBox("출력상태 변경작업을 진행합니다.", "I");
  1538. }else{
  1539. return;
  1540. }
  1541. }else if(modedetail=="update"){
  1542. var nextstep = messageBox("부서이력 수정작업중이었습니다. 수정작업이 초기화되며, 출력상태변경 작업을 진행하게 됩니다", "S001");
  1543. if(nextstep==6){
  1544. messageBox("출력상태 변경작업을 진행합니다.", "I");
  1545. }else{
  1546. return;
  1547. }
  1548. }
  1549. fInitialize();
  1550. }
  1551. var deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("deptcd"));//선택된 부서의 부서코드
  1552. var dn_row = fFindDownSameLevelRow(grd_deptlist);//선택된부서 아래에 있는 같은레벨의 부서위치
  1553. //alert("dn_row : "+dn_row);
  1554. if( dn_row == -1 ){
  1555. messageBox("하위로 이동할수", "I004");
  1556. }else{
  1557. var up_row = grd_deptlist.row;//위에있는부서위치('선택된부서')
  1558. var parents_cols = model.getValue("/root/main/search/authority");
  1559. var parents = grd_deptlist.valueMatrix(grd_deptlist.row,grd_deptlist.colRef(parents_cols));
  1560. var dispseq_cols = parents_cols.substring(0, parents_cols.indexOf("supdeptcd")) + "dispseq";
  1561. fCacheDeptBundle(grd_deptlist, up_row, "/root/main/deptlist/dept", "/root/main/temp/updept");//위에있는부서('선택된부서')와 그하위에 있는 부서를 캐쉬에 보관
  1562. var last_dn_row = fCacheDeptBundle(grd_deptlist, dn_row, "/root/main/deptlist/dept", "/root/main/temp/dndept");//아래에있는부서와 그하위에 있는 부서를 캐쉬에 보관
  1563. fCache2Grid("/root/main/temp/updept", last_dn_row);//위에있는부서('선택된부서')와 그하위에 있는부서들을 아래에있는부서와 그하위에 있는 부서다음에 붙인다.
  1564. var updept_list = instance1.selectNodes( "/root/main/temp/updept");//캐쉬에 저장된 위에있는부서의 수를 구하기위해 목록을 가져온다.
  1565. for(var i=0; i<updept_list.length; i++){//위에서부터 길이만큼 삭제한다.
  1566. grd_deptlist.deleterow(up_row, false);
  1567. }
  1568. fReorgSequence(grd_deptlist, parents, parents_cols, dispseq_cols);
  1569. setTreeItem(grd_deptlist, grd_deptlist.colRef("level"), grd_deptlist.colRef("inorddeptnm"));
  1570. fRefreshGridRowStatus(grd_deptlist, "rowstatus");
  1571. fFindItem(grd_deptlist, deptcd, "deptcd");
  1572. model.setValue("/root/main/modedetail", "reorg");
  1573. model.setValue("/root/main/modedetailstatus", "");
  1574. model.refresh();
  1575. }
  1576. ]]>
  1577. </script>
  1578. </img>
  1579. <caption id="caption4" ref="/root/main/label/right" class="tit_2" style="left:405px; top:60px; width:144px; height:14px; ">기관부서마스터</caption>
  1580. <caption id="caption1" ref="/root/main/label/deptinfo" class="tit_2" style="left:840px; top:60px; width:213px; height:13px; "/>
  1581. <datagrid id="grd_depthistorylist" nodeset="/root/main/depthistorylist/depthistory" caption="색상^유효시작일자^유효종료일자^부서명(MIS사용)^외래진료부서명^입원진료부서명^부서코드^부서 영문명^부서 한문명^부서위치^부서 영문약어^부서 한글약어^청구분야^진료부서구분^진료부서유형^진료분과구분^청구부서번호^다음 가실곳 여부^다음가실곳 우선순위^인터넷 예약구분^전화번호^근무지부서여부^청구권한부서^기획부서여부^기획상위부서^기획부서 출력순서^진료부서여부^진료상위부서^진료부서 출력순서^임상과출력순서^인사부서 여부^인사 상위부서^인사부서 출력순서^구매부서 사용여부^구매 상위부서^구매부서 출력순서^재무부서 사용여부^재무 상위부서^재무 출력순서^간호 사용여부^간호 상위부서^간호 출력순서^총무 사용여부^총무 상위부서^총무 출력순서^수납 사용여부^수납 상위부서^수납 출력순서^원무 사용여부^원무 상위부서^원무 출력순서^의료정보 사용여부^의료정보 상위부서^의료정보 출력순서^보험 사용여부^보험 상위부서^보험 출력순서^근태 사용여부^근태 상위부서^근태 출력순서^그룹웨어사용여부^그룹웨어상위부서코드^그룹웨어출력순서^기관상위부서코드^기관출력순서^기관코드^현재사용여부" colsep="▦" colwidth="100, 100, 100, 300, 100, 100, 127, 120, 100, 100, 100, 100, 100, 100, 100, 100, 124, 100, 120, 100, 121, 100, 100, 100, 100, 104, 100, 111, 109, 100, 100, 113, 107, 107, 105, 111, 110, 107, 108, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 110, 114, 106, 107, 107, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="▩" style="left:0px; top:580px; width:805px; height:150px; border-color:#808080; ">
  1582. <col ref="color" visibility="hidden" style="left:20px; top:23px; width:100px; height:23px; "/>
  1583. <col ref="valifromdd"/>
  1584. <col ref="valitodd"/>
  1585. <col ref="inorddeptnm"/>
  1586. <col ref="depthngnm"/>
  1587. <col ref="indepthngnm"/>
  1588. <col ref="deptcd" visibility="hidden"/>
  1589. <col ref="deptengnm"/>
  1590. <col ref="deptchinm"/>
  1591. <col ref="deptplce"/>
  1592. <col ref="deptengabbr"/>
  1593. <col ref="depthngabbr"/>
  1594. <col ref="reqfild"/>
  1595. <col ref="orddeptflag" type="combo">
  1596. <choices>
  1597. <item>
  1598. <label>입원진료과</label>
  1599. <value>D</value>
  1600. </item>
  1601. <item>
  1602. <label>병동</label>
  1603. <value>W</value>
  1604. </item>
  1605. <item>
  1606. <label>진료지원수행부서</label>
  1607. <value>E</value>
  1608. </item>
  1609. <item>
  1610. <label>Consult부서</label>
  1611. <value>A</value>
  1612. </item>
  1613. <item>
  1614. <label>기타부서</label>
  1615. <value>X</value>
  1616. </item>
  1617. </choices>
  1618. </col>
  1619. <col ref="orddeptkind" type="combo">
  1620. <choices>
  1621. <item>
  1622. <label>센터</label>
  1623. <value>C</value>
  1624. </item>
  1625. <item>
  1626. <label>일반부서</label>
  1627. <value>D</value>
  1628. </item>
  1629. </choices>
  1630. </col>
  1631. <col ref="ordclsdeptflag" type="combo">
  1632. <choices>
  1633. <item>
  1634. <label>대표과</label>
  1635. <value>R</value>
  1636. </item>
  1637. <item>
  1638. <label>분과</label>
  1639. <value>C</value>
  1640. </item>
  1641. <item>
  1642. <label>간호외래</label>
  1643. <value>A</value>
  1644. </item>
  1645. </choices>
  1646. </col>
  1647. <col ref="reqdeptno" type="combo">
  1648. <choices>
  1649. <itemset nodeset="/root/init/reqdeptnocode/P0322">
  1650. <label ref="cdnm"/>
  1651. <value ref="cdid"/>
  1652. </itemset>
  1653. </choices>
  1654. </col>
  1655. <col ref="nextplceyn" type="combo">
  1656. <choices>
  1657. <item>
  1658. <label>사용함</label>
  1659. <value>Y</value>
  1660. </item>
  1661. <item>
  1662. <label>사용안함</label>
  1663. <value>N</value>
  1664. </item>
  1665. </choices>
  1666. </col>
  1667. <col ref="nextplceprity"/>
  1668. <col ref="inetrsrvyn" type="combo">
  1669. <choices>
  1670. <item>
  1671. <label>사용함</label>
  1672. <value>Y</value>
  1673. </item>
  1674. <item>
  1675. <label>사용안함</label>
  1676. <value>N</value>
  1677. </item>
  1678. </choices>
  1679. </col>
  1680. <col ref="cntctel"/>
  1681. <col ref="dutplceuseyn" type="combo">
  1682. <choices>
  1683. <item>
  1684. <label>사용함</label>
  1685. <value>Y</value>
  1686. </item>
  1687. <item>
  1688. <label>사용안함</label>
  1689. <value>N</value>
  1690. </item>
  1691. </choices>
  1692. </col>
  1693. <col ref="reqauthdeptyn"/>
  1694. <col ref="planuseyn" type="combo">
  1695. <choices>
  1696. <item>
  1697. <label>사용함</label>
  1698. <value>Y</value>
  1699. </item>
  1700. <item>
  1701. <label>사용안함</label>
  1702. <value>N</value>
  1703. </item>
  1704. </choices>
  1705. </col>
  1706. <col ref="plansupdeptcd" visibility="hidden"/>
  1707. <col ref="plandispseq" visibility="hidden"/>
  1708. <col ref="orduseyn" type="combo">
  1709. <choices>
  1710. <item>
  1711. <label>사용함</label>
  1712. <value>Y</value>
  1713. </item>
  1714. <item>
  1715. <label>사용안함</label>
  1716. <value>N</value>
  1717. </item>
  1718. </choices>
  1719. </col>
  1720. <col ref="ordsupdeptcd" visibility="hidden"/>
  1721. <col ref="orddispseq"/>
  1722. <col ref="clincdeptdispseq"/>
  1723. <col ref="psnworkuseyn" type="combo">
  1724. <choices>
  1725. <item>
  1726. <label>사용함</label>
  1727. <value>Y</value>
  1728. </item>
  1729. <item>
  1730. <label>사용안함</label>
  1731. <value>N</value>
  1732. </item>
  1733. </choices>
  1734. </col>
  1735. <col ref="psnworksupdeptcd" visibility="hidden"/>
  1736. <col ref="psnworkdispseq" visibility="hidden"/>
  1737. <col ref="purcuseyn" type="combo">
  1738. <choices>
  1739. <item>
  1740. <label>사용함</label>
  1741. <value>Y</value>
  1742. </item>
  1743. <item>
  1744. <label>사용안함</label>
  1745. <value>N</value>
  1746. </item>
  1747. </choices>
  1748. </col>
  1749. <col ref="purcsupdeptcd" visibility="hidden"/>
  1750. <col ref="purcdispseq" visibility="hidden"/>
  1751. <col ref="fnworkuseyn" type="combo">
  1752. <choices>
  1753. <item>
  1754. <label>사용함</label>
  1755. <value>Y</value>
  1756. </item>
  1757. <item>
  1758. <label>사용안함</label>
  1759. <value>N</value>
  1760. </item>
  1761. </choices>
  1762. </col>
  1763. <col ref="fnworksupdeptcd" visibility="hidden"/>
  1764. <col ref="fnworkdispseq" visibility="hidden"/>
  1765. <col ref="careuseyn" type="combo">
  1766. <choices>
  1767. <item>
  1768. <label>사용함</label>
  1769. <value>Y</value>
  1770. </item>
  1771. <item>
  1772. <label>사용안함</label>
  1773. <value>N</value>
  1774. </item>
  1775. </choices>
  1776. </col>
  1777. <col ref="caresupdeptcd" visibility="hidden"/>
  1778. <col ref="caredispseq" visibility="hidden"/>
  1779. <col ref="gafruseyn" type="combo">
  1780. <choices>
  1781. <item>
  1782. <label>사용함</label>
  1783. <value>Y</value>
  1784. </item>
  1785. <item>
  1786. <label>사용안함</label>
  1787. <value>N</value>
  1788. </item>
  1789. </choices>
  1790. </col>
  1791. <col ref="gafrsupdeptcd" visibility="hidden"/>
  1792. <col ref="gafrdispseq" visibility="hidden"/>
  1793. <col ref="rcptuseyn" type="combo">
  1794. <choices>
  1795. <item>
  1796. <label>사용함</label>
  1797. <value>Y</value>
  1798. </item>
  1799. <item>
  1800. <label>사용안함</label>
  1801. <value>N</value>
  1802. </item>
  1803. </choices>
  1804. </col>
  1805. <col ref="rcptsupdeptcd" visibility="hidden"/>
  1806. <col ref="rcptdispseq" visibility="hidden"/>
  1807. <col ref="pamuseyn" type="combo">
  1808. <choices>
  1809. <item>
  1810. <label>사용함</label>
  1811. <value>Y</value>
  1812. </item>
  1813. <item>
  1814. <label>사용안함</label>
  1815. <value>N</value>
  1816. </item>
  1817. </choices>
  1818. </col>
  1819. <col ref="pamsupdeptcd" visibility="hidden"/>
  1820. <col ref="pamdispseq" visibility="hidden"/>
  1821. <col ref="healcareinfouseyn" type="combo">
  1822. <choices>
  1823. <item>
  1824. <label>사용함</label>
  1825. <value>Y</value>
  1826. </item>
  1827. <item>
  1828. <label>사용안함</label>
  1829. <value>N</value>
  1830. </item>
  1831. </choices>
  1832. </col>
  1833. <col ref="healcareinfosupdeptcd" visibility="hidden"/>
  1834. <col ref="healcareinfodispseq" visibility="hidden"/>
  1835. <col ref="insuuseyn" type="combo">
  1836. <choices>
  1837. <itemset nodeset="/root/init/insuuseyn/Z0015">
  1838. <label ref="cdnm"/>
  1839. <value ref="cdid"/>
  1840. </itemset>
  1841. </choices>
  1842. </col>
  1843. <col ref="insusupdeptcd" visibility="hidden"/>
  1844. <col ref="insudispseq" visibility="hidden"/>
  1845. <col ref="dgenuseyn" type="combo">
  1846. <choices>
  1847. <item>
  1848. <label>사용함</label>
  1849. <value>Y</value>
  1850. </item>
  1851. <item>
  1852. <label>사용안함</label>
  1853. <value>N</value>
  1854. </item>
  1855. </choices>
  1856. </col>
  1857. <col ref="dgensupdeptcd" visibility="hidden"/>
  1858. <col ref="dgendispseq" visibility="hidden"/>
  1859. <col ref="homecareuseyn" type="combo">
  1860. <choices>
  1861. <item>
  1862. <label>사용함</label>
  1863. <value>Y</value>
  1864. </item>
  1865. <item>
  1866. <label>사용안함</label>
  1867. <value>N</value>
  1868. </item>
  1869. </choices>
  1870. </col>
  1871. <col ref="homecaresupdeptcd" visibility="hidden"/>
  1872. <col ref="homecaredispseq" visibility="hidden"/>
  1873. <col ref="instsupdeptcd" visibility="hidden"/>
  1874. <col ref="instdispseq" visibility="hidden"/>
  1875. <col ref="instcd" visibility="hidden"/>
  1876. <col ref="iscurrent" type="combo">
  1877. <choices>
  1878. <item>
  1879. <label>미래사용</label>
  1880. <value>F</value>
  1881. </item>
  1882. <item>
  1883. <label>현재사용</label>
  1884. <value>Y</value>
  1885. </item>
  1886. <item>
  1887. <label>과거사용</label>
  1888. <value>P</value>
  1889. </item>
  1890. </choices>
  1891. </col>
  1892. <script type="javascript" ev:event="ondblclick">
  1893. <![CDATA[
  1894. if( !grd_depthistorylist.iscell(event.target) || grd_depthistorylist.row<1){
  1895. return;
  1896. }
  1897. fInitMainDataControls(false);
  1898. fHistoryGrid2Main();
  1899. model.setValue("/root/main/modedetail", "retrived");
  1900. model.setValue("/root/main/label/deptinfo", "부서정보보기");
  1901. model.refresh();
  1902. fInitMainDataControls(true);
  1903. ]]>
  1904. </script>
  1905. </datagrid>
  1906. <caption id="caption18" class="tit_2" style="left:0px; top:561px; width:75px; height:13px; ">부서이력</caption>
  1907. <input id="ipt_supdeptcd" class="input_essential" navindex="13" style="left:1076px; top:436px; width:109px; height:19px; ">
  1908. <script type="javascript" ev:event="onclick">
  1909. <![CDATA[
  1910. /*
  1911. if(mode_detail=="create"){//추가시 상위부서를 지정하는 경우
  1912. var from = model.getValue("/root/main/data/valifromdd");
  1913. var to= model.getValue("/root/main/data/valitodd");
  1914. var is_valid_duration = fValidateDuration(from, to);
  1915. if(!is_valid_duration){
  1916. alert("유효종료일자는 유효시작일자보다 커야합니다.");
  1917. return;
  1918. }
  1919. var min_valifromdd = fGetMinValifromddFutureDeptHistory();
  1920. if(min_valifromdd>from){
  1921. alert("유효시작일자는 이전이력의 종료일자보다 커야 합니다.");
  1922. return;
  1923. }
  1924. }else if(mode_detail=="update"){
  1925. }else if(mode_detail=="delete"){
  1926. }
  1927. */
  1928. ]]>
  1929. </script>
  1930. </input>
  1931. <caption id="caption19" class="cell_1" style="left:1010px; top:436px; width:65px; height:23px; vertical-align:middle; ">상위부서</caption>
  1932. <caption id="caption20" style="left:499px; top:550px; width:38px; height:14px; ">미사용</caption>
  1933. <caption id="caption21" class="color_5" style="left:546px; top:549px; width:15px; height:15px; "/>
  1934. <caption id="caption22" style="left:564px; top:550px; width:32px; height:14px; ">종료</caption>
  1935. <caption id="caption35" class="color_1" style="left:611px; top:549px; width:15px; height:15px; "/>
  1936. <caption id="caption23" style="left:629px; top:550px; width:32px; height:14px; ">미래</caption>
  1937. <caption id="caption47" class="cell_2" style="left:403px; top:547px; width:70px; height:20px; ">범 례</caption>
  1938. <caption id="caption37" class="color_8" style="left:676px; top:549px; width:15px; height:15px; background-color:#ffffff; border-style:solid; "/>
  1939. <caption id="caption38" style="left:694px; top:550px; width:32px; height:14px; ">현재</caption>
  1940. <caption id="caption24" class="color_9" style="left:481px; top:549px; width:15px; height:15px; "/>
  1941. <caption id="caption8" class="color_8" style="left:741px; top:549px; width:15px; height:15px; "/>
  1942. <caption id="caption13" style="left:759px; top:550px; width:32px; height:14px; ">임시</caption>
  1943. <shape id="roundrect1" class="roundrect_example" appearance="roundrect" style="left:400px; top:542px; width:405px; height:30px; "/>
  1944. <line id="line2" class="line_1" style="x1:0px; y1:575px; x2:805px; y2:575px; "/>
  1945. <caption id="caption15" class="cell_1" style="left:1001px; top:507px; width:94px; height:23px; vertical-align:middle; ">임상과출력순서</caption>
  1946. <input id="ipt_clincdeptdispseq" ref="/root/main/data/clincdeptdispseq" class="input_essential" navindex="13" style="left:1096px; top:508px; width:90px; height:19px; "/>
  1947. <caption id="caption14" class="cell_1" style="left:833px; top:249px; width:125px; height:23px; vertical-align:middle; ">입원진료부서명</caption>
  1948. <input id="ipt_indepthngnm" ref="/root/main/data/indepthngnm" class="input_essential" navindex="6" maxlength="21" style="left:959px; top:249px; width:228px; height:19px; ">
  1949. <script type="javascript" ev:event="onkeyup">
  1950. <![CDATA[
  1951. var strlen = 0;
  1952. var str = ipt_indepthngnm.currentText
  1953. for (var i=0; i<str.length; i++) {
  1954. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  1955. if (strlen > 64) {
  1956. messageBox("최대입력글자인 64byte를 ", "E003");
  1957. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  1958. break;
  1959. }
  1960. }
  1961. ]]>
  1962. </script>
  1963. </input>
  1964. <caption id="caption17" class="cell_1" style="left:833px; top:556px; width:86px; height:23px; vertical-align:middle; ">진료분과구분</caption>
  1965. <select1 id="cmb_ordclsdeptflag" ref="/root/main/data/ordclsdeptflag" class="combo_essential" navindex="19" appearance="minimal" style="left:920px; top:556px; width:80px; height:19px; ">
  1966. <choices>
  1967. <item>
  1968. <label>분과(C)</label>
  1969. <value>C</value>
  1970. </item>
  1971. <item>
  1972. <label>대표과(R)</label>
  1973. <value>R</value>
  1974. </item>
  1975. <item>
  1976. <label>간호외래(A)</label>
  1977. <value>A</value>
  1978. </item>
  1979. </choices>
  1980. </select1>
  1981. <caption id="caption25" class="cell_1" style="left:1016px; top:531px; width:84px; height:23px; vertical-align:middle; ">진료부서유형</caption>
  1982. <select1 id="cmb_orddeptkind" ref="/root/main/data/orddeptkind" class="combo_essential" navindex="19" appearance="minimal" style="left:1101px; top:532px; width:85px; height:19px; ">
  1983. <choices>
  1984. <item>
  1985. <label>센터(C)</label>
  1986. <value>C</value>
  1987. </item>
  1988. <item>
  1989. <label>일반부서(D)</label>
  1990. <value>D</value>
  1991. </item>
  1992. </choices>
  1993. </select1>
  1994. <input id="ipt_depthngnm" ref="/root/main/data/depthngnm" class="input_essential" navindex="6" maxlength="21" style="left:959px; top:225px; width:228px; height:19px; ">
  1995. <script type="javascript" ev:event="onkeyup">
  1996. <![CDATA[
  1997. var strlen = 0;
  1998. var str = ipt_depthngnm.currentText
  1999. for (var i=0; i<str.length; i++) {
  2000. strlen += (str.charCodeAt(i) > 128) ? 2 : 1;
  2001. if (strlen > 64) {
  2002. messageBox("최대입력글자인 64byte를 ", "E003");
  2003. strlen -= (str.charCodeAt(i) > 128) ? 2 : 1;
  2004. break;
  2005. }
  2006. }
  2007. ]]>
  2008. </script>
  2009. </input>
  2010. <caption id="caption2" class="cell_1" style="left:833px; top:225px; width:125px; height:23px; vertical-align:middle; ">외래진료부서명</caption>
  2011. </group>
  2012. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  2013. <button id="button6" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  2014. <caption>초기화</caption>
  2015. <script type="javascript" ev:event="DOMActivate">
  2016. <![CDATA[
  2017. model.setValue("/root/main/search/deptmaster/supdeptcd", "");
  2018. model.setValue("/root/main/search/deptmaster/supdeptnm", "");
  2019. model.setValue("/root/main/search/deptinfo/deptcd", "");
  2020. model.setValue("/root/main/search/deptinfo/depthngnm", "");
  2021. model.removenode("/root/main/clsdeptlist");
  2022. model.makeNode("/root/main/clsdeptlist");
  2023. model.removenode("/root/main/deptlist");
  2024. model.makeNode("/root/main/deptlist");
  2025. model.removenode("/root/main/depthistorylist");
  2026. model.makeNode("/root/main/depthistorylist");
  2027. model.setValue("/root/main/mode", "init");
  2028. model.setValue("/root/main/modedetail", "init");
  2029. model.setValue("/root/main/modedetailstatus", "none");
  2030. fInitMainData();
  2031. model.refresh();
  2032. fInitMainDataControls(true);
  2033. ]]>
  2034. </script>
  2035. </button>
  2036. <button id="button7" class="btn4_letter2" navindex="34" focus.background-color="#99ccff" style="left:1067px; top:5px; width:56px; height:22px; ">
  2037. <caption>저장</caption>
  2038. <script type="javascript" ev:event="DOMActivate">
  2039. <![CDATA[
  2040. var mode = model.getValue("/root/main/mode");
  2041. if(mode!="retrived"){
  2042. messageBox("조회된 경우에만 저장 가능합니다.", "C");
  2043. return;
  2044. }
  2045. /* 1. 정보창 작업에 대한 처리 */
  2046. var mode_detail = model.getValue("/root/main/modedetail");
  2047. if(mode_detail=="create"){
  2048. var from = model.getValue("/root/main/data/valifromdd");
  2049. var to= model.getValue("/root/main/data/valitodd");
  2050. var is_valid_duration = fValidateDuration(from, to);
  2051. if(!is_valid_duration){
  2052. messageBox("유효종료일자는 유효시작일자보다 커야합니다.", "C");
  2053. return;
  2054. }
  2055. var latestValitodd = fGetLatestDeptHistoryValitodd();
  2056. if(latestValitodd>=from){
  2057. messageBox("유효시작일자는 이전이력의 종료일자보다 커야 합니다.", "C");
  2058. return;
  2059. }
  2060. var standard = model.getValue("/root/main/search/authority");
  2061. var standard_supdeptcd = model.getValue("/root/main/data/"+standard);
  2062. if(standard_supdeptcd==""){
  2063. messageBox("상위부서를 지정하십시오", "C");
  2064. model.setFocus(ipt_supdeptcd);
  2065. return;
  2066. }
  2067. var standard_dispseq_label = standard.substring(0, standard.indexOf("supdeptcd")) + "dispseq";
  2068. var standard_dispseq = model.getValue("/root/main/data/"+standard_dispseq_label);
  2069. if(standard_supdeptcd==""){
  2070. messgeBox("상위부서출력순서를 지정하십시오.", "C");
  2071. return;
  2072. }
  2073. fCopyDetail2Send();
  2074. var success = submit("TXZSD00104");
  2075. if(success){
  2076. var has_temporary = fHasDeptHistoryBundle("temporary");
  2077. if(has_temporary){//임시에서 추가되는 부서인 경우
  2078. var deptcd = model.getValue("/root/main/data/deptcd");
  2079. var selected_row = fFindGridItem(grd_deptlist, grd_deptlist.colRef("deptcd"), deptcd);
  2080. fCopyDetail2DeptGrid(selected_row);//부서정보창의 저장된 내용과 부서그리드의 내용을 동기화 시킨다.
  2081. var current_date = new Date();
  2082. var current_date_string = current_date.getDateFormat("YYYYMMDD");
  2083. var valifromdd = model.getValue("/root/main/data/valifromdd");
  2084. var valitodd = model.getValue("/root/main/data/valitodd");
  2085. if(valifromdd<=current_date_string&&current_date_string<=valitodd){
  2086. grd_deptlist.valueMatrix( selected_row, grd_deptlist.colRef("iscurrent")) = "Y";
  2087. grd_deptlist.valueMatrix( selected_row, grd_deptlist.colRef("color") ) = "#ffffff";
  2088. grd_deptlist.rowstyle( selected_row , "data" , "background-color" ) = "#ffffff";//현재사용부서 색깔을 입힌다.
  2089. }else if(valifromdd>current_date_string){
  2090. grd_deptlist.valueMatrix( selected_row, grd_deptlist.colRef("iscurrent")) = "F";
  2091. grd_deptlist.valueMatrix( selected_row, grd_deptlist.colRef("color") ) = "#fcd2c1";
  2092. grd_deptlist.rowstyle( selected_row , "data" , "background-color" ) = "#fcd2c1";//사용예정부서 색깔을 입힌다.
  2093. }
  2094. grd_deptlist.valueMatrix(selected_row, grd_deptlist.colRef("rowstatus")) = 0;
  2095. grd_deptlist.rowStatus(selected_row) = 0;
  2096. fDept2DeptHistory(selected_row, 1);
  2097. grd_depthistorylist.rowStatus(1) = 0;
  2098. selected_row = fFindGridItem(grd_clsdeptlist, grd_clsdeptlist.colRef("deptcd"), deptcd);
  2099. if(valifromdd<=current_date_string&&current_date_string<=valitodd){
  2100. grd_clsdeptlist.valueMatrix( selected_row, grd_clsdeptlist.colRef("iscurrent")) = "Y";
  2101. grd_clsdeptlist.valueMatrix( selected_row, grd_clsdeptlist.colRef("color") ) = "#ffffff";
  2102. grd_clsdeptlist.rowstyle( selected_row , "data" , "background-color" ) = "#ffffff";//현재사용부서 색깔을 입힌다.
  2103. }else if(valifromdd>current_date_string){
  2104. grd_clsdeptlist.valueMatrix( selected_row, grd_clsdeptlist.colRef("iscurrent")) = "F";
  2105. grd_clsdeptlist.valueMatrix( selected_row, grd_clsdeptlist.colRef("color") ) = "#fcd2c1";
  2106. grd_clsdeptlist.rowstyle( selected_row , "data" , "background-color" ) = "#fcd2c1";//사용예정부서 색깔을 입힌다.
  2107. }
  2108. grd_clsdeptlist.rowStatus( selected_row ) = 0;
  2109. model.setValue("/root/main/modedetail", "retrived");
  2110. model.setValue("/root/main/label/deptinfo", "부서정보보기")
  2111. model.refresh();
  2112. fInitMainDataControls(true);
  2113. messageBox("부서('"+deptcd+"')의 이력이 추가되었습니다.", "I");
  2114. }else{
  2115. var deptcd = model.getValue("/root/main/data/deptcd");
  2116. var selected_row = fFindGridItem(grd_deptlist, grd_deptlist.colRef("deptcd"), deptcd);
  2117. var history_status = grd_deptlist.valueMatrix(selected_row, grd_deptlist.colRef("color"));
  2118. if(history_status=="#b9e5fb"){//부서목록에 과거로 표시된경우
  2119. fCopyDetail2DeptGrid(selected_row);
  2120. grd_deptlist.valueMatrix( selected_row, grd_deptlist.colRef("iscurrent")) = "F";
  2121. grd_deptlist.valueMatrix( selected_row, grd_deptlist.colRef("color") ) = "#fcd2c1";
  2122. grd_deptlist.rowstyle( selected_row , "data" , "background-color" ) = "#fcd2c1";
  2123. grd_deptlist.valueMatrix( selected_row, grd_deptlist.colRef("rowstatus") ) =0;
  2124. grd_deptlist.rowStatus( selected_row ) = 0;
  2125. grd_depthistorylist.insertrow(1, "before", true);
  2126. fDept2DeptHistory(selected_row, 1);
  2127. grd_depthistorylist.rowStatus(1) = 0;
  2128. selected_row = fFindGridItem(grd_clsdeptlist, grd_clsdeptlist.colRef("deptcd"), deptcd);
  2129. grd_clsdeptlist.valueMatrix( selected_row, grd_clsdeptlist.colRef("iscurrent")) = "F";
  2130. grd_clsdeptlist.valueMatrix( selected_row, grd_clsdeptlist.colRef("color") ) = "#fcd2c1";
  2131. grd_clsdeptlist.rowstyle( selected_row , "data" , "background-color" ) = "#fcd2c1";
  2132. grd_clsdeptlist.rowStatus( selected_row ) = 0;
  2133. messageBox("부서('"+deptcd+"')의 이력이 추가되었습니다.", "I");
  2134. }else if(history_status=="#ffffff"){
  2135. grd_depthistorylist.insertrow(1, "before", true);
  2136. fCopyDetail2DeptHistoryGrid(1);
  2137. grd_depthistorylist.rowStatus(1) = 0;
  2138. grd_depthistorylist.valueMatrix(1, grd_depthistorylist.colRef("color")) = "#fcd2c1";
  2139. grd_depthistorylist.rowstyle( 1 , "data" , "background-color" ) = "#fcd2c1";
  2140. grd_depthistorylist.valueMatrix(1, grd_depthistorylist.colRef("iscurrent")) = "F";
  2141. messageBox("부서('"+deptcd+"')의 이력이 추가되었습니다.", "I");
  2142. }
  2143. model.setValue("/root/main/modedetail", "retrived");
  2144. model.setValue("/root/main/label/deptinfo", "부서정보보기")
  2145. model.refresh();
  2146. fInitMainDataControls(true);
  2147. }
  2148. }
  2149. }else if(mode_detail=="update"){
  2150. var modedetailstatus = model.getValue("/root/main/modedetailstatus");
  2151. if(modedetailstatus=="present"){
  2152. var req_deptcd_key = model.getValue("/root/main/data/deptcd");
  2153. var req_valifromdd_key = model.getValue("/root/main/data/valifromddkey");
  2154. var req_valitodd = model.getValue("/root/main/data/valitodd");
  2155. fCopyDetail2Send();
  2156. var success = submit("TXZSD00106");
  2157. if(success){
  2158. var selected_row = fFindGridItem(grd_deptlist, grd_deptlist.colRef("deptcd"), req_deptcd_key);
  2159. grd_deptlist.valueMatrix(selected_row, grd_deptlist.colRef("valitodd")) = req_valitodd;
  2160. selected_row = fFindDeptHistory(req_deptcd_key, req_valifromdd_key);
  2161. grd_depthistorylist.valueMatrix(selected_row, grd_depthistorylist.colRef("valitodd"))=req_valitodd;
  2162. messageBox("부서코드('"+req_deptcd_key+"')에 대한 종료일자가 '"+req_valitodd+"'로 수정되었습니다.", "I");
  2163. model.setValue("/root/main/modedetail", "retrived");
  2164. model.setValue("/root/main/label/deptinfo", "부서정보보기")
  2165. model.refresh();
  2166. fInitMainDataControls(true);
  2167. }else{
  2168. messageBox("부서코드('"+req_deptcd_key+"')에 대한 종료일자 '"+req_valitodd+"'의 수정이 실패하였습니다. 관리자에게 문의하십시오.", "C");
  2169. }
  2170. }else if(modedetailstatus=="future"){
  2171. fCopyDetail2Send();
  2172. var success = submit("TXZSD00105");
  2173. if(success){
  2174. var req_deptcd_key = model.getValue("/root/main/data/deptcd");
  2175. var selected_row = fFindGridItem(grd_deptlist, grd_deptlist.colRef("deptcd"), req_deptcd_key);
  2176. var dept_status = grd_deptlist.valueMatrix(selected_row, grd_deptlist.colRef("color"));
  2177. if(dept_status=="#fcd2c1"){
  2178. fCopyDetail2DeptGrid(selected_row);
  2179. }
  2180. fCopyDetail2DeptHistoryGrid(1);
  2181. grd_depthistorylist.rowStatus(1) = 0;
  2182. grd_depthistorylist.valueMatrix(1, grd_depthistorylist.colRef("color")) = "#fcd2c1";
  2183. grd_depthistorylist.rowstyle( 1 , "data" , "background-color" ) = "#fcd2c1";
  2184. grd_depthistorylist.valueMatrix(1, grd_depthistorylist.colRef("iscurrent")) = "F";
  2185. messageBox("부서('"+req_deptcd_key+"')의 이력이 수정되었습니다.", "I");
  2186. model.setValue("/root/main/modedetail", "retrived");
  2187. model.setValue("/root/main/label/deptinfo", "부서정보보기")
  2188. model.refresh();
  2189. fInitMainDataControls(true);
  2190. }
  2191. }else{
  2192. messageBox("error=> mode_detail:"+mode_detail+", mode_detail_status:"+modedetailstatus, "C");
  2193. return;
  2194. }
  2195. }else if(mode_detail=="reorg"){
  2196. model.removenode("/root/hidden/temp");
  2197. var update_data = grd_deptlist.getUpdateData ('update');
  2198. model.makeValue("/root/send/deptstructure", update_data);
  2199. var bizcd = fGetBizCD();
  2200. model.makeValue("/root/send/bisiness", bizcd);
  2201. model.makeNode("/root/hidden/temp");
  2202. var success = submit("TXZSD00102");
  2203. if(success){
  2204. for(var i=grd_deptlist.fixedRows; i<grd_deptlist.rows; i++){
  2205. grd_deptlist.rowStatus(i) = 0;
  2206. grd_deptlist.valueMatrix(i, grd_deptlist.colRef("rowstatus")) = 0;
  2207. }
  2208. model.setValue("/root/main/mode", "retrived");
  2209. model.setValue("/root/main/modedetail", "init");
  2210. model.setValue("/root/main/modedetail", "none");
  2211. model.refresh();
  2212. var updated = model.getValue("/root/hidden/temp/resultmsg/updated");
  2213. messageBox(updated+"건의 부서이력이 위치이동 되었습니다.", "I");
  2214. }else{
  2215. messageBox("위치이동, 출력순서변경에 실패하였습니다.", "C");
  2216. }
  2217. }else{
  2218. messageBox("추가, 수정, 위치이동, 출력순서변경만 저장이 가능합니다.", "C");
  2219. }
  2220. ]]>
  2221. </script>
  2222. </button>
  2223. <line id="line1" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  2224. </group>
  2225. </xhtml:body>
  2226. </xhtml:html>