SPZBC00500_사용자코드관리.xfdl 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPZBC00500" position="absolute 0 0 1000 700" titletext="사용자 코드관리" oninit="SPZBC00500_oninit" onload="SPZBC00500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="사용자코드 관리" position="absolute 0 0 173 20" id="caption1" class="tit_1"/>
  8. <Div position="absolute 0 20 490 700" id="grp_left" anchor="left top bottom">
  9. <Layouts>
  10. <Layout>
  11. <Static text="사용자코드 항목" position="absolute 0 7 220 23" align="align:left middle;" id="caption6" class="tit_2" anchor="default"/>
  12. <Shape position="absolute 0 23 490 29" linetype="horizontal" id="line2" class="line_10" anchor="default"/>
  13. <Div position="absolute 0 28 490 86" id="roundrect2" type="roundrectangle" anchor="default" class="div_SA2">
  14. <Layouts>
  15. <Layout/>
  16. </Layouts>
  17. </Div>
  18. <Static text="코드 :" position="absolute 6 37 53 54" id="caption2" class="search_name" anchor="default"/>
  19. <Edit position="absolute 87 35 187 54" id="ipt_search_usercd" class="input_search" enableevent="true" anchor="default" onkeydown="grp_left_ipt_search_usercd_onkeydown"/>
  20. <Static text="코드명 :" position="absolute 215 37 273 54" id="caption9" class="search_name" anchor="default"/>
  21. <Edit position="absolute 277 35 377 54" id="ipt_search_codenm" class="input_search" anchor="default" onkeydown="grp_left_ipt_search_codenm_onkeydown"/>
  22. <Shape position="absolute 408 32 417 82" linetype="vertical" id="line1" anchor="default"/>
  23. <Button position="absolute 426 47 482 67" id="btn_search_muscd" class="btn1" text="조회" anchor="default" onclick="grp_left_btn_search_muscd_onclick"/>
  24. <Grid position="absolute 0 108 490 680" id="grd_muscdlist" binddataset="ds_main_muscdlist" selecttype="treecell" useinputpanel="false" treeusecheckbox="false" anchor="left top bottom" autofittype="col" oncellclick="grp_left_grd_muscdlist_oncellclick" ondrag="grp_left_grd_muscdlist_ondrag" ondragleave="grp_left_grd_muscdlist_ondragleave" ondragmove="grp_left_grd_muscdlist_ondragmove" ondrop="grp_left_grd_muscdlist_ondrop" cantreestatuschange="grp_left_grd_muscdlist_cantreestatuschange">
  25. <Formats>
  26. <Format id="default">
  27. <Columns>
  28. <Column size="489"/>
  29. </Columns>
  30. <Rows>
  31. <Row size="24" band="head"/>
  32. <Row size="24"/>
  33. </Rows>
  34. <Band id="head">
  35. <Cell displaytype="normal" text="코드-코드명"/>
  36. </Band>
  37. <Band id="body">
  38. <Cell displaytype="tree" edittype="tree" style="background:EXPR(fDragOverColorChng(currow));background2:EXPR(fDragOverColorChng(currow));" text="bind:displaynm" treestartlevel="1" treelevel="bind:levl" autosizecol="limitmax"/>
  39. </Band>
  40. </Format>
  41. </Formats>
  42. </Grid>
  43. <Static id="caption00" text="상세코드 :" class="search_name" position="absolute 6 60 77 77"/>
  44. <Edit id="ipt_search_cdid" taborder="1" class="input_search" position="absolute 87 58 187 77" onkeydown="grp_left_ipt_search_cdid_onkeydown"/>
  45. <CheckBox id="chk_propcp" taborder="2" text="종료된 상세코드 포함" value="N" truevalue="Y" falsevalue="N" position="absolute 215 58 376 78" onclick="grp_left_chk_propcp_onclick"/>
  46. </Layout>
  47. </Layouts>
  48. </Div>
  49. <Div position="absolute 500 20 1000 153" id="grp_right_top" anchor="left top right">
  50. <Layouts>
  51. <Layout>
  52. <Static text="기본정보" position="absolute 0 7 220 23" align="align:left middle;" id="caption3" class="tit_2" anchor="default"/>
  53. <Shape position="absolute 0 23 500 29" linetype="horizontal" id="line5" class="line_10" anchor="left top right"/>
  54. <Button position="absolute 304 3 346 23" id="button1" class="btn2" text="삭제" onclick="grp_right_top_button1_onclick" anchor="top right"/>
  55. <Button position="absolute 349 3 391 23" id="button2" class="btn2" text="신규" onclick="grp_right_top_button2_onclick" anchor="top right"/>
  56. <Button position="absolute 394 3 436 23" id="button7" class="btn2" text="수정" onclick="grp_right_top_button7_onclick" anchor="top right"/>
  57. <Button position="absolute 441 3 497 23" id="btn_SaveMuscd" class="btn4" text="저장" anchor="top right" onclick="grp_right_top_btn_SaveMuscd_onclick"/>
  58. <Static text="코드" position="absolute 0 28 60 51" align="align:center middle;" id="caption4" class="cell_1" anchor="default"/>
  59. <Edit position="absolute 62 30 162 49" id="ipt_usercd" class="input" anchor="default" maxlength="5" style="font:arial,9,bold;"/>
  60. <Static text="상위코드" position="absolute 169 28 229 51" align="align:center middle;" id="caption10" class="cell_1" anchor="default"/>
  61. <Edit position="absolute 231 30 331 49" id="ipt_supcd" class="input" anchor="left top right" maxlength="5"/>
  62. <Static text="코드명" position="absolute 0 53 60 76" align="align:center middle;" id="caption5" class="cell_1" anchor="default"/>
  63. <Edit position="absolute 62 55 500 74" id="ipt_codenm" class="input" anchor="left top right"/>
  64. <Static text="비고" position="absolute 0 78 60 133" align="align:center middle;" id="caption8" class="cell_1" anchor="default"/>
  65. <TextArea position="absolute 62 80 500 133" id="txt_rmk" enable="false" anchor="left top right"/>
  66. <Static id="caption00" text="정렬순서" class="cell_1" position="absolute 339 28 399 51" anchor="default"/>
  67. <Edit id="ipt_seqno" taborder="1" class="input" position="absolute 400 30 500 49" inputtype="number" maxlength="5" anchor="default"/>
  68. </Layout>
  69. </Layouts>
  70. </Div>
  71. <Div position="absolute 500 154 1000 290" id="grp_right_middle" anchor="left top right">
  72. <Layouts>
  73. <Layout>
  74. <Static text="권한정보" position="absolute 0 7 220 27" align="align:left middle;" id="caption7" class="tit_2" anchor="default"/>
  75. <Shape position="absolute 0 23 500 29" linetype="horizontal" id="line3" class="line_10" anchor="left top right"/>
  76. <Button position="absolute 441 3 497 23" id="btn_SaveAuscd" class="btn4" text="저장" anchor="top right" onclick="grp_right_middle_btn_SaveAuscd_onclick"/>
  77. <Button position="absolute 394 3 436 23" id="button5" class="btn2" text="삭제" onclick="grp_right_middle_button5_onclick" anchor="top right"/>
  78. <Button position="absolute 329 3 392 23" id="button11" class="btn2" text="부서추가" onclick="grp_right_middle_button11_onclick" anchor="top right"/>
  79. <Grid position="absolute 0 28 500 135" id="grd_auscdlist" binddataset="ds_main_auscdlist" autofittype="col" anchor="left top right" selecttype="multirow">
  80. <Formats>
  81. <Format id="default">
  82. <Columns>
  83. <Column size="25" band="left"/>
  84. <Column size="0"/>
  85. <Column size="70"/>
  86. <Column size="70"/>
  87. <Column size="120"/>
  88. <Column size="200"/>
  89. </Columns>
  90. <Rows>
  91. <Row size="24" band="head"/>
  92. <Row size="24"/>
  93. </Rows>
  94. <Band id="head">
  95. <Cell/>
  96. <Cell col="1" displaytype="normal" text="hardcdno"/>
  97. <Cell col="2" displaytype="normal" text="구분"/>
  98. <Cell col="3" displaytype="normal" text="권한"/>
  99. <Cell col="4" displaytype="normal" text="부서코드/사번"/>
  100. <Cell col="5" displaytype="normal" text="부서명/사용자명"/>
  101. </Band>
  102. <Band id="body">
  103. <Cell celltype="head"/>
  104. <Cell col="1" displaytype="normal" text="bind:hardcdno"/>
  105. <Cell col="2" displaytype="combo" edittype="combo" style="align:center;" text="bind:authcls" combodataset="ds_authcls" combocodecol="value" combodatacol="label"/>
  106. <Cell col="3" displaytype="combo" edittype="combo" style="align:center;" text="bind:authtype" combodataset="ds_authtype" combocodecol="value" combodatacol="label"/>
  107. <Cell col="4" displaytype="text" edittype="text" style="align:center;" text="bind:authtrgt" editautoselect="true"/>
  108. <Cell col="5" displaytype="normal" style="align:left middle;" text="bind:authtrgtnm"/>
  109. </Band>
  110. </Format>
  111. </Formats>
  112. </Grid>
  113. <Button id="button00" taborder="1" text="사용자추가" class="btn2" position="absolute 251 3 327 23" anchor="top right" onclick="grp_right_middle_button00_onclick"/>
  114. </Layout>
  115. </Layouts>
  116. </Div>
  117. <Div position="absolute 500 289 1000 700" id="grp_right_bottom" anchor="all">
  118. <Layouts>
  119. <Layout>
  120. <Static text="상세코드 리스트" position="absolute 0 7 220 27" align="align:left middle;" id="caption11" class="tit_2" anchor="default"/>
  121. <Shape position="absolute 0 47 500 53" linetype="horizontal" id="line6" class="line_10" anchor="left top right"/>
  122. <Button position="absolute 441 3 497 23" id="btn_SaveDuscd" class="btn4" text="저장" anchor="top right" onclick="grp_right_bottom_btn_SaveDuscd_onclick"/>
  123. <Button position="absolute 349 3 391 23" id="button8" class="btn2" text="추가" onclick="grp_right_bottom_button8_onclick" anchor="top right"/>
  124. <Button position="absolute 393 3 435 23" id="button9" class="btn2" text="삭제" onclick="grp_right_bottom_button9_onclick" anchor="top right"/>
  125. <Grid position="absolute 0 52 500 411" id="grd_duscdlist" binddataset="ds_main_duscdlist" style="align:center middle;" autosizingtype="row" extendsizetype="row" anchor="all" selecttype="multirow">
  126. <Formats>
  127. <Format id="default">
  128. <Columns>
  129. <Column size="25" band="left"/>
  130. <Column size="0"/>
  131. <Column size="35"/>
  132. <Column size="80"/>
  133. <Column size="200"/>
  134. <Column size="80"/>
  135. <Column size="80"/>
  136. <Column size="150"/>
  137. <Column size="100"/>
  138. <Column size="100"/>
  139. <Column size="100"/>
  140. <Column size="100"/>
  141. <Column size="100"/>
  142. </Columns>
  143. <Rows>
  144. <Row size="24" band="head"/>
  145. <Row size="24"/>
  146. </Rows>
  147. <Band id="head">
  148. <Cell/>
  149. <Cell col="1" displaytype="normal" text="hardcdno"/>
  150. <Cell col="2" displaytype="normal" text="순번"/>
  151. <Cell col="3" displaytype="normal" text="코드"/>
  152. <Cell col="4" displaytype="normal" text="코드명"/>
  153. <Cell col="5" displaytype="normal" text="시작일자"/>
  154. <Cell col="6" displaytype="normal" text="종료일자"/>
  155. <Cell col="7" text="비고"/>
  156. <Cell col="8" displaytype="normal" text="OPTION1"/>
  157. <Cell col="9" displaytype="normal" text="OPTION2"/>
  158. <Cell col="10" displaytype="normal" text="OPTION3"/>
  159. <Cell col="11" displaytype="normal" edittype="text" style="align:center;" text="OPTION4"/>
  160. <Cell col="12" text="OPTION5"/>
  161. </Band>
  162. <Band id="body">
  163. <Cell celltype="head"/>
  164. <Cell col="1" displaytype="normal" text="bind:hardcdno"/>
  165. <Cell col="2" displaytype="normal" edittype="text" style="align:center;" text="bind:seqno"/>
  166. <Cell col="3" displaytype="normal" edittype="text" style="align:center;" text="bind:cdid" editautoselect="true"/>
  167. <Cell col="4" displaytype="normal" edittype="text" style="align:left middle;" text="bind:cdnm" editautoselect="true" autosizerow="limitmin"/>
  168. <Cell col="5" displaytype="date" edittype="date" text="bind:fromdd"/>
  169. <Cell col="6" displaytype="date" edittype="date" text="bind:todd"/>
  170. <Cell col="7" edittype="text" text="bind:rmk"/>
  171. <Cell col="8" displaytype="normal" edittype="text" style="align:left middle;" text="bind:option1"/>
  172. <Cell col="9" displaytype="normal" edittype="text" style="align:left middle;" text="bind:option2"/>
  173. <Cell col="10" displaytype="normal" edittype="text" style="align:left middle;" text="bind:option3"/>
  174. <Cell col="11" displaytype="normal" edittype="text" style="align:left middle;" text="bind:option4"/>
  175. <Cell col="12" edittype="text" style="align:left middle;" text="bind:option5"/>
  176. </Band>
  177. </Format>
  178. </Formats>
  179. </Grid>
  180. <Button id="btn_excel" taborder="1" text="Excel" onclick="btn_excel_onclick" class="btn7" position="absolute 274 3 337 23" anchor="top right"/>
  181. <Button id="button00" taborder="2" text="처방추가" class="btn2" position="absolute 161 26 224 46" anchor="top right" onclick="grp_right_bottom_button00_onclick"/>
  182. <Button id="button01" taborder="3" text="환자추가" class="btn2" position="absolute 434 26 497 46" anchor="top right" onclick="grp_right_bottom_button01_onclick"/>
  183. <Button id="button02" taborder="4" text="사용자추가" class="btn2" position="absolute 356 26 432 46" anchor="top right" onclick="grp_right_bottom_button02_onclick"/>
  184. <Button id="button03" taborder="5" text="부서추가" class="btn2" position="absolute 291 26 354 46" anchor="top right" onclick="grp_right_bottom_button03_onclick"/>
  185. <Button id="button04" taborder="6" text="진단추가" class="btn2" position="absolute 226 26 289 46" anchor="top right" onclick="grp_right_bottom_button04_onclick"/>
  186. </Layout>
  187. </Layouts>
  188. </Div>
  189. </Layout>
  190. </Layouts>
  191. <Objects>
  192. <Dataset id="ds_main_muscdinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  193. <ColumnInfo>
  194. <Column id="usercd" type="STRING" size="256"/>
  195. <Column id="codenm" type="STRING" size="256"/>
  196. <Column id="supcd" type="STRING" size="256"/>
  197. <Column id="seqno" type="STRING" size="256"/>
  198. <Column id="rmk" type="STRING" size="256"/>
  199. <Column id="authtype" type="STRING" size="256"/>
  200. <Column id="status" type="STRING" size="256"/>
  201. </ColumnInfo>
  202. </Dataset>
  203. <Dataset id="ds_main_duscdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  204. <ColumnInfo>
  205. <Column id="usercd" type="STRING" size="256"/>
  206. <Column id="cdid" type="STRING" size="256"/>
  207. <Column id="oldcdid" type="STRING" size="256"/>
  208. <Column id="cdnm" type="STRING" size="256"/>
  209. <Column id="fromdd" type="STRING" size="256"/>
  210. <Column id="todd" type="STRING" size="256"/>
  211. <Column id="seqno" type="STRING" size="256"/>
  212. <Column id="oldseqno" type="STRING" size="256"/>
  213. <Column id="rmk" type="STRING" size="256"/>
  214. <Column id="option1" type="STRING" size="256"/>
  215. <Column id="option2" type="STRING" size="256"/>
  216. <Column id="option3" type="STRING" size="256"/>
  217. <Column id="option4" type="STRING" size="256"/>
  218. <Column id="option5" type="STRING" size="256"/>
  219. </ColumnInfo>
  220. <Rows>
  221. <Row/>
  222. </Rows>
  223. </Dataset>
  224. <Dataset id="ds_main_auscdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  225. <ahrcdlist>
  226. <hardcdno/>
  227. <authclscd/>
  228. <authtypecd/>
  229. <authtrgtcd/>
  230. <authtrgtnm/>
  231. </ahrcdlist>
  232. <ColumnInfo>
  233. <Column id="usercd" type="STRING" size="256"/>
  234. <Column id="authcls" type="STRING" size="256"/>
  235. <Column id="authtype" type="STRING" size="256"/>
  236. <Column id="authtrgt" type="STRING" size="256"/>
  237. <Column id="authtrgtnm" type="STRING" size="256"/>
  238. </ColumnInfo>
  239. <Rows>
  240. <Row/>
  241. </Rows>
  242. <ahrcdlist>
  243. <hardcdno/>
  244. <authclscd/>
  245. <authtypecd/>
  246. <authtrgtcd/>
  247. <authtrgtnm/>
  248. </ahrcdlist>
  249. </Dataset>
  250. <Dataset id="ds_main_muscdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  251. <ColumnInfo>
  252. <Column id="levl" type="STRING" size="256"/>
  253. <Column id="displaynm" type="STRING" size="256"/>
  254. <Column id="usercd" type="STRING" size="256"/>
  255. <Column id="codenm" type="STRING" size="256"/>
  256. <Column id="supcd" type="STRING" size="256"/>
  257. <Column id="rmk" type="STRING" size="256"/>
  258. </ColumnInfo>
  259. </Dataset>
  260. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  261. <ColumnInfo>
  262. <Column id="deptcd" type="STRING" size="256"/>
  263. <Column id="userid" type="STRING" size="256"/>
  264. <Column id="usercd" type="STRING" size="256"/>
  265. <Column id="codenm" type="STRING" size="256"/>
  266. <Column id="cdid" type="STRING" size="256"/>
  267. <Column id="endyn" type="STRING" size="256"/>
  268. <Column id="adminyn" type="STRING" size="256"/>
  269. </ColumnInfo>
  270. <Rows>
  271. <Row>
  272. <Col id="deptcd"/>
  273. <Col id="userid"/>
  274. <Col id="usercd"/>
  275. <Col id="codenm"/>
  276. <Col id="cdid"/>
  277. <Col id="endyn"/>
  278. <Col id="adminyn"/>
  279. </Row>
  280. </Rows>
  281. </Dataset>
  282. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  283. <Dataset id="ds_authcls" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  284. <ColumnInfo>
  285. <Column id="label" type="STRING" size="256"/>
  286. <Column id="value" type="STRING" size="256"/>
  287. </ColumnInfo>
  288. <Rows>
  289. <Row>
  290. <Col id="label">사용자</Col>
  291. <Col id="value">P</Col>
  292. </Row>
  293. <Row>
  294. <Col id="label">부서</Col>
  295. <Col id="value">D</Col>
  296. </Row>
  297. </Rows>
  298. </Dataset>
  299. <Dataset id="ds_authtype" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  300. <ColumnInfo>
  301. <Column id="label" type="STRING" size="256"/>
  302. <Column id="value" type="STRING" size="256"/>
  303. </ColumnInfo>
  304. <Rows>
  305. <Row>
  306. <Col id="label">관리</Col>
  307. <Col id="value">A</Col>
  308. </Row>
  309. <Row>
  310. <Col id="value">E</Col>
  311. <Col id="label">저장</Col>
  312. </Row>
  313. <Row>
  314. <Col id="label">조회</Col>
  315. <Col id="value">R</Col>
  316. </Row>
  317. </Rows>
  318. </Dataset>
  319. <Dataset id="ds_patinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  320. <ColumnInfo>
  321. <Column id="pid" type="STRING" size="256"/>
  322. <Column id="hngnm" type="STRING" size="256"/>
  323. </ColumnInfo>
  324. <Rows>
  325. <Row/>
  326. </Rows>
  327. </Dataset>
  328. </Objects>
  329. <Bind>
  330. <BindItem id="item0" compid="grp_left.ipt_search_usercd" propid="value" datasetid="ds_main_cond" columnid="usercd"/>
  331. <BindItem id="item1" compid="grp_left.ipt_search_codenm" propid="value" datasetid="ds_main_cond" columnid="codenm"/>
  332. <BindItem id="item2" compid="grp_right_top.ipt_usercd" propid="value" datasetid="ds_main_muscdinfo" columnid="usercd"/>
  333. <BindItem id="item3" compid="grp_right_top.ipt_supcd" propid="value" datasetid="ds_main_muscdinfo" columnid="supcd"/>
  334. <BindItem id="item4" compid="grp_right_top.ipt_codenm" propid="value" datasetid="ds_main_muscdinfo" columnid="codenm"/>
  335. <BindItem id="item5" compid="grp_right_top.txt_rmk" propid="value" datasetid="ds_main_muscdinfo" columnid="rmk"/>
  336. <BindItem id="item6" compid="grp_left.ipt_search_cdid" propid="value" datasetid="ds_main_cond" columnid="cdid"/>
  337. <BindItem id="item7" compid="grp_left.chk_propcp" propid="value" datasetid="ds_main_cond" columnid="endyn"/>
  338. <BindItem id="item8" compid="grp_right_top.ipt_seqno" propid="value" datasetid="ds_main_muscdinfo" columnid="seqno"/>
  339. </Bind>
  340. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  341. * System Name :
  342. * Job Name :
  343. * Creator :
  344. * Make Date : 2019-04-19
  345. * Description :
  346. *---------------------------------------------------------------------------------------
  347. * Modify Date Modifier Modify Description
  348. *---------------------------------------------------------------------------------------
  349. * 2019-04-19 엄영만 Create
  350. *
  351. *---------------------------------------------------------------------------------------
  352. ****************************************************************************************/
  353. include "com_commonxp::comm_main.xjs";
  354. include "emr_prcpmngtxp::MMO001.xjs";
  355. var g_prevmouserow = -1;
  356. function SPZBC00500_oninit(obj:Form, e:InitEventInfo)
  357. {
  358. frmf_initForm(obj);
  359. grdf_initGrid(grp_right_middle.grd_auscdlist);
  360. grdf_initGrid(grp_right_bottom.grd_duscdlist);
  361. }
  362. function SPZBC00500_onload(obj:Form, e:LoadEventInfo)
  363. {
  364. fInitialize_SPZBC00500();
  365. grdf_setRowTypeIcon(grp_right_middle.grd_auscdlist, 0);
  366. grdf_setRowTypeIcon(grp_right_bottom.grd_duscdlist, 0);
  367. grdf_setToolTipBind(grp_right_middle.grd_auscdlist);
  368. grdf_setToolTipBind(grp_right_bottom.grd_duscdlist);
  369. grdf_setToolTipBind(grp_left.grd_muscdlist);
  370. }
  371. function grp_left_ipt_search_usercd_onkeydown(obj:Edit, e:KeyEventInfo)
  372. {
  373. if(e.keycode == 13) {
  374. fGetMuscdList();
  375. }
  376. }
  377. function grp_left_ipt_search_codenm_onkeydown(obj:Edit, e:KeyEventInfo)
  378. {
  379. if(e.keycode == 13) {
  380. fGetMuscdList();
  381. }
  382. }
  383. function grp_left_ipt_search_cdid_onkeydown(obj:Edit, e:KeyEventInfo)
  384. {
  385. if(e.keycode == 13) {
  386. fGetMuscdList();
  387. }
  388. }
  389. function grp_left_chk_propcp_onclick(obj:CheckBox, e:ClickEventInfo)
  390. {
  391. fGetMuscdList();
  392. }
  393. function grp_left_btn_search_muscd_onclick(obj:Button, e:ClickEventInfo)
  394. {
  395. fGetMuscdList();
  396. }
  397. function grp_left_grd_muscdlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  398. {
  399. fSetUscdInfo();
  400. }
  401. function grp_right_top_button1_onclick(obj:Button, e:ClickEventInfo)
  402. {
  403. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  404. if(utlf_isNull(sUserCd)) {
  405. alert("선택 된 사용자코드가 없습니다.");
  406. return;
  407. }
  408. var sStatus = ds_main_muscdinfo.getColumn(0, "status");
  409. if(sStatus == "u" || sStatus == "i" ) {
  410. alert("신규 또는 수정중인 코드는 삭제 할수 없습니다.");
  411. return;
  412. }
  413. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  414. var sAuthType = ds_main_muscdinfo.getColumn(0, "authtype");
  415. if(sAdminYn == "Y" || sAuthType == "A") {
  416. ds_main_muscdinfo.setColumn(0, "status", "d"); // 입력 설정
  417. fSaveMUscdInfo();
  418. } else {
  419. alert("삭제 권한이 없습니다.");
  420. return;
  421. }
  422. }
  423. function grp_right_top_button2_onclick(obj:Button, e:ClickEventInfo)
  424. {
  425. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  426. if(sAdminYn == "Y") {
  427. var nRow = ds_main_muscdlist.rowposition;
  428. var sUserCd = ds_main_muscdlist.getColumn(nRow, "usercd");
  429. ds_main_muscdinfo.clearData();
  430. ds_main_duscdlist.clearData();
  431. ds_main_auscdlist.clearData();
  432. ds_main_muscdinfo.addRow();
  433. ds_main_muscdinfo.setColumn(0, "status", "i"); // 입력 설정
  434. ds_main_muscdinfo.setColumn(0, "authtype", "A"); // 저장 버튼을 사용할수 있도록 설정
  435. ds_main_muscdinfo.setColumn(0, "supcd", sUserCd);
  436. grp_right_top.btn_SaveMuscd.enable = true; // 저장버튼 활성화
  437. grp_right_top.ipt_usercd.enable = true;
  438. grp_right_top.ipt_codenm.enable = true;
  439. grp_right_top.ipt_supcd.enable = true;
  440. grp_right_top.ipt_seqno.enable = true;
  441. grp_right_top.txt_rmk.enable = true;
  442. } else {
  443. alert("입력 권한이 없습니다.");
  444. return;
  445. }
  446. }
  447. function grp_right_top_button7_onclick(obj:Button, e:ClickEventInfo)
  448. {
  449. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  450. if(utlf_isNull(sUserCd)) {
  451. alert("선택 된 사용자코드가 없습니다.");
  452. return;
  453. }
  454. var sStatus = ds_main_muscdinfo.getColumn(0, "status");
  455. if(sStatus == "i" || sStatus == "d" ) {
  456. alert("신규 또는 삭제 중인 코드는 수정 할수 없습니다.");
  457. return;
  458. }
  459. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  460. var sAuthType = ds_main_muscdinfo.getColumn(0, "authtype");
  461. if(sAdminYn == "Y" || sAuthType == "A") {
  462. ds_main_muscdinfo.setColumn(0, "status", "u"); // 수정 설정
  463. grp_right_top.ipt_usercd.enable = false;
  464. grp_right_top.ipt_codenm.enable = true;
  465. grp_right_top.ipt_supcd.enable = true;
  466. grp_right_top.ipt_seqno.enable = true;
  467. grp_right_top.txt_rmk.enable = true;
  468. } else {
  469. alert("수정 권한이 없습니다.");
  470. return;
  471. }
  472. }
  473. function grp_right_top_btn_SaveMuscd_onclick(obj:Button, e:ClickEventInfo)
  474. {
  475. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  476. var sAuthType = ds_main_muscdinfo.getColumn(0, "authtype");
  477. if(sAdminYn == "Y" || sAuthType == "A") {
  478. fSaveMUscdInfo();
  479. } else {
  480. alert("저장 권한이 없습니다.");
  481. return;
  482. }
  483. }
  484. function grp_right_middle_btn_SaveAuscd_onclick(obj:Button, e:ClickEventInfo)
  485. {
  486. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  487. var sAuthType = ds_main_muscdinfo.getColumn(0, "authtype");
  488. if(sAdminYn == "Y" || sAuthType == "A") {
  489. fSaveAUscdList();
  490. } else {
  491. alert("저장 권한이 없습니다.");
  492. return;
  493. }
  494. }
  495. function grp_right_middle_button5_onclick(obj:Button, e:ClickEventInfo)
  496. {
  497. var cur_row = "";
  498. var iStatus = "";
  499. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  500. if(utlf_isNull(sUserCd)) {
  501. alert("선택 된 사용자 코드가 없습니다.");
  502. return;
  503. }
  504. var selectedRows = grdf_getSelectedRows(grp_right_middle.grd_auscdlist);
  505. for( var i = selectedRows.length-1; i >= 0 ; i--) {
  506. cur_row = selectedRows[i];
  507. iStatus = ds_main_auscdlist.getRowType(cur_row);
  508. if (iStatus == 2) { // 새로 삽입된 행이면
  509. ds_main_auscdlist.deleteRow(cur_row);
  510. } else if (iStatus == 8) { // 삭제 상태이면
  511. grdf_setStatus(grp_right_middle.grd_auscdlist, "", [cur_row])
  512. } else {
  513. grdf_setStatus(grp_right_middle.grd_auscdlist, "D", [cur_row])
  514. }
  515. }
  516. }
  517. function grp_right_middle_button11_onclick(obj:Button, e:ClickEventInfo)
  518. {
  519. fAuscdListGridAdd("D");
  520. }
  521. function grp_right_middle_button00_onclick(obj:Button, e:ClickEventInfo)
  522. {
  523. fAuscdListGridAdd("U");
  524. }
  525. /*
  526. * 권한코드리스트에 항목 추가
  527. * sFlag = D:부서, U:사용자
  528. */
  529. function fAuscdListGridAdd(sFlag){
  530. var sAuthCls = "";
  531. var sAuthTrgt = "";
  532. var sAuthTrgtNm = "";
  533. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  534. if(utlf_isNull(sUserCd)) {
  535. alert("선택 된 사용자코드가 없습니다.");
  536. return;
  537. }
  538. if(sFlag == "D") { // 부서
  539. var sReturn = appf_openDeptCodeList("dutplceinstcd", sysf_getUserInfo("dutplceinstcd"), "deptnm", "", "", "", "", "deptcd depthngnm cntctel");
  540. sAuthCls = "D";
  541. sAuthTrgt = sReturn.deptcd;
  542. sAuthTrgtNm = sReturn.depthngnm;
  543. if(utlf_isNull(sAuthTrgt)) {
  544. return;
  545. }
  546. } else if(sFlag == "U") { // 사용자
  547. var sReturn = appf_openUserInfo('usernm', '', '', '', '');
  548. sReturn = utlf_transNullToEmpty(sReturn.userInfo).split('|');
  549. sAuthCls = "P";
  550. sAuthTrgt = sReturn[0];
  551. sAuthTrgtNm = sReturn[1];
  552. if(utlf_isNull(sAuthTrgt)) {
  553. return;
  554. }
  555. } else {
  556. sAuthCls = "P";
  557. sAuthTrgt = "";
  558. sAuthTrgtNm = "";
  559. }
  560. ds_main_auscdlist.addRow();
  561. grp_right_middle.grd_auscdlist.showEditor(true);
  562. var nRow = ds_main_auscdlist.rowposition;
  563. ds_main_auscdlist.setColumn(nRow, "usercd", sUserCd);
  564. ds_main_auscdlist.setColumn(nRow, "authcls", sAuthCls);
  565. ds_main_auscdlist.setColumn(nRow, "authtrgt", sAuthTrgt);
  566. ds_main_auscdlist.setColumn(nRow, "authtrgtnm", sAuthTrgtNm);
  567. ds_main_auscdlist.setColumn(nRow, "authtype", "R");
  568. }
  569. function grp_right_bottom_btn_SaveDuscd_onclick(obj:Button, e:ClickEventInfo)
  570. {
  571. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  572. var sAuthType = ds_main_muscdinfo.getColumn(0, "authtype");
  573. if(sAdminYn == "Y" || sAuthType == "A" || sAuthType == "E") {
  574. fSaveDUscdList();
  575. } else {
  576. alert("저장 권한이 없습니다.");
  577. return;
  578. }
  579. }
  580. function grp_right_bottom_button8_onclick(obj:Button, e:ClickEventInfo)
  581. {
  582. fDuscdListGridAdd(); // 상세항목 추가
  583. }
  584. function grp_right_bottom_button9_onclick(obj:Button, e:ClickEventInfo)
  585. {
  586. var cur_row = "";
  587. var iStatus = "";
  588. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  589. if(utlf_isNull(sUserCd)) {
  590. alert("선택 된 사용자코드가 없습니다.");
  591. return;
  592. }
  593. var selectedRows = grdf_getSelectedRows(grp_right_bottom.grd_duscdlist);
  594. for( var i = selectedRows.length-1; i >= 0 ; i--) {
  595. cur_row = selectedRows[i];
  596. iStatus = ds_main_duscdlist.getRowType(cur_row);
  597. if (iStatus == 2) { // 새로 삽입된 행이면
  598. ds_main_duscdlist.deleteRow(cur_row);
  599. } else if (iStatus == 8) { // 삭제 상태이면
  600. grdf_setStatus(grp_right_bottom.grd_duscdlist, "", [cur_row])
  601. } else {
  602. grdf_setStatus(grp_right_bottom.grd_duscdlist, "D", [cur_row])
  603. }
  604. }
  605. }
  606. /**
  607. * @desc : 화면 초기화
  608. * @
  609. * @param :
  610. * @return :
  611. * @author : 엄영만
  612. * @---------------------------------------------------
  613. */
  614. function fInitialize_SPZBC00500(){
  615. var sAdminYn = "N";
  616. if(appf_ContainsUserCD("00001", sysf_getUserInfo("userid"))) {
  617. sAdminYn = "Y";
  618. }
  619. ds_main_cond.setColumn(0, "userid", sysf_getUserInfo("userid"));
  620. ds_main_cond.setColumn(0, "deptcd", sysf_getUserInfo("dutplcecd"));
  621. ds_main_cond.setColumn(0, "adminyn", sAdminYn);
  622. fGetMuscdList();
  623. }
  624. /**
  625. * @desc : 사용자코드 리스트 조회
  626. * @
  627. * @param :
  628. * @return :
  629. * @author : 엄영만
  630. * @---------------------------------------------------
  631. */
  632. function fGetMuscdList(){
  633. ds_main_muscdinfo.clearData();
  634. ds_main_muscdinfo.addRow();
  635. ds_main_muscdlist.clearData();
  636. // ds_main_muscdinfo.clearData();
  637. ds_main_duscdlist.clearData();
  638. ds_main_auscdlist.clearData();
  639. ds_main_cond.setColumn(0, "usercd", grp_left.ipt_search_usercd.value);
  640. ds_main_cond.setColumn(0, "codenm", grp_left.ipt_search_codenm.value);
  641. var oParam = {};
  642. oParam.id = "TRZBC00501";
  643. oParam.service = "basiccodeapp.UserCode";
  644. oParam.method = "reqGetUserCodeTreeList";
  645. oParam.inds = "req=ds_main_cond";
  646. oParam.outds = "ds_main_muscdlist=muscdlist";
  647. oParam.async = false;
  648. tranf_submit(oParam);
  649. grdf_expandDepth(grp_left.grd_muscdlist, 3);
  650. //input박스 비활성화
  651. grp_right_top.ipt_usercd.enable = false;
  652. grp_right_top.ipt_codenm.enable = false;
  653. grp_right_top.ipt_supcd.enable = false;
  654. grp_right_top.ipt_seqno.enable = false;
  655. grp_right_top.txt_rmk.enable = false;
  656. // 저장버튼 비활성화
  657. grp_right_top.btn_SaveMuscd.enable = false;
  658. grp_right_middle.btn_SaveAuscd.enable = false;
  659. grp_right_bottom.btn_SaveDuscd.enable = false;
  660. }
  661. /**
  662. * @desc : 사용자코드 리스트 클릭시 기본정보 설정
  663. * @
  664. * @param :
  665. * @return :
  666. * @author : 엄영만
  667. * @---------------------------------------------------
  668. */
  669. function fSetUscdInfo(){
  670. var nRow = ds_main_muscdlist.rowposition;
  671. var sUserCd = ds_main_muscdlist.getColumn(nRow, "usercd");
  672. var sEndYn = ds_main_cond.getColumn(0, "endyn");
  673. if(!utlf_isNull(sUserCd)) {
  674. dsf_makeValue(ds_send_reqdata, "userid","string", sysf_getUserInfo("userid"));
  675. dsf_makeValue(ds_send_reqdata, "deptcd","string", sysf_getUserInfo("dutplcecd"));
  676. dsf_makeValue(ds_send_reqdata, "usercd","string", sUserCd);
  677. dsf_makeValue(ds_send_reqdata, "endyn", "string", sEndYn);
  678. var oParam = {};
  679. oParam.id = "TRZBC00502";
  680. oParam.service = "basiccodeapp.UserCode";
  681. oParam.method = "reqGetUserCodeInfo";
  682. oParam.inds = "req=ds_send_reqdata";
  683. oParam.outds = "ds_main_muscdinfo=muscdinfo ds_main_auscdlist=auscdlist ds_main_duscdlist=duscdlist";
  684. oParam.async = false;
  685. if(tranf_submit(oParam)) {
  686. ds_main_muscdinfo.addColumn("status", "string");
  687. //input박스 비활성화
  688. grp_right_top.ipt_usercd.enable = false;
  689. grp_right_top.ipt_codenm.enable = false;
  690. grp_right_top.ipt_supcd.enable = false;
  691. grp_right_top.ipt_seqno.enable = false;
  692. grp_right_top.txt_rmk.enable = false;
  693. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  694. var sAuthType = ds_main_muscdinfo.getColumn(0, "authtype");
  695. if(sAdminYn == "Y" || sAuthType == "A") {
  696. grp_right_top.btn_SaveMuscd.enable = true;
  697. grp_right_middle.btn_SaveAuscd.enable = true;
  698. grp_right_bottom.btn_SaveDuscd.enable = true;
  699. } else if(sAuthType == "E"){
  700. grp_right_top.btn_SaveMuscd.enable = false;
  701. grp_right_middle.btn_SaveAuscd.enable = false;
  702. grp_right_bottom.btn_SaveDuscd.enable = true;
  703. } else {
  704. grp_right_top.btn_SaveMuscd.enable = false;
  705. grp_right_middle.btn_SaveAuscd.enable = false;
  706. grp_right_bottom.btn_SaveDuscd.enable = false;
  707. }
  708. } else {
  709. grp_right_top.btn_SaveMuscd.enable = false;
  710. grp_right_middle.btn_SaveAuscd.enable = false;
  711. grp_right_bottom.btn_SaveDuscd.enable = false;
  712. }
  713. }
  714. }
  715. /**
  716. * @desc : 사용자코드 기본정보 저장
  717. * @
  718. * @param :
  719. * @return :
  720. * @author : 엄영만
  721. * @---------------------------------------------------
  722. */
  723. function fSaveMUscdInfo(){
  724. var sMsg = "";
  725. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  726. var sStatus = ds_main_muscdinfo.getColumn(0, "status");
  727. if(sStatus == "i") {
  728. sMsg = "사용자코드[ " + sUserCd + " ]의 기본정보를 입력 하시겠습니까?";
  729. } else if(sStatus == "u") {
  730. sMsg = "사용자코드[ " + sUserCd + " ]의 기본정보를 수정 하시겠습니까?";
  731. } else {
  732. sMsg = "사용자코드[ " + sUserCd + " ]의 기본정보를 삭제 하시겠습니까?";
  733. }
  734. if( sysf_messageBox(sMsg, "Q999") == 6 ){
  735. var oParam = {};
  736. oParam.id = "TXZBC00501";
  737. oParam.service = "basiccodeapp.UserCode";
  738. oParam.method = "reqExeSaveMUserCodeInfo";
  739. oParam.inds = "req=ds_main_muscdinfo";
  740. oParam.outds = "";
  741. oParam.async = false;
  742. if(tranf_submit(oParam)) {
  743. fGetMuscdList();
  744. }
  745. }
  746. }
  747. /**
  748. * @desc : 사용자코드 상세 리스트 저장
  749. * @
  750. * @param :
  751. * @return :
  752. * @author : 엄영만
  753. * @---------------------------------------------------
  754. */
  755. function fSaveDUscdList(){
  756. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  757. if( sysf_messageBox("사용자코드[ " + sUserCd + " ]의 상세코드","Q002") == 6 ){
  758. dsf_createDs("ds_send_duscddata");
  759. var updateData = grdf_getGridUpdateData(grp_right_bottom.grd_duscdlist);
  760. grdf_setStatusColumn(updateData, "status");
  761. ds_send_duscddata.copyData(updateData, true);
  762. var oParam = {};
  763. oParam.id = "TXZBC00502";
  764. oParam.service = "basiccodeapp.UserCode";
  765. oParam.method = "reqExeSaveDUserCodeList";
  766. oParam.inds = "req=ds_send_duscddata";
  767. oParam.outds = "";
  768. oParam.async = false;
  769. if(tranf_submit(oParam)) {
  770. fSetUscdInfo();
  771. }
  772. }
  773. }
  774. /**
  775. * @desc : 사용자코드 권한 리스트 저장
  776. * @
  777. * @param :
  778. * @return :
  779. * @author : 엄영만
  780. * @---------------------------------------------------
  781. */
  782. function fSaveAUscdList(){
  783. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  784. if( sysf_messageBox("사용자코드[ " + sUserCd + " ]의 권한정보를","Q002") == 6 ){
  785. dsf_createDs("ds_send_auscddata");
  786. var updateData = grdf_getGridUpdateData(grp_right_middle.grd_auscdlist);
  787. grdf_setStatusColumn(updateData, "status");
  788. ds_send_auscddata.copyData(updateData, true);
  789. var oParam = {};
  790. oParam.id = "TXZBC00503";
  791. oParam.service = "basiccodeapp.UserCode";
  792. oParam.method = "reqExeSaveAUserCodeList";
  793. oParam.inds = "req=ds_send_auscddata";
  794. oParam.outds = "";
  795. oParam.async = false;
  796. if(tranf_submit(oParam)) {
  797. fSetUscdInfo();
  798. }
  799. }
  800. }
  801. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  802. {
  803. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  804. if(utlf_isNull(sUserCd)) {
  805. alert("선택 된 사용자코드가 없습니다.");
  806. return;
  807. }
  808. grdf_exportExcel(grp_right_bottom.grd_duscdlist, "사용자코드" + sUserCd, sUserCd, false, null, "user", true);
  809. }
  810. function grp_right_bottom_button00_onclick(obj:Button, e:ClickEventInfo)
  811. {
  812. fDuscdListGridAdd("C"); // 처방
  813. }
  814. function grp_right_bottom_button01_onclick(obj:Button, e:ClickEventInfo)
  815. {
  816. fDuscdListGridAdd("P"); // 환자
  817. }
  818. function grp_right_bottom_button02_onclick(obj:Button, e:ClickEventInfo)
  819. {
  820. fDuscdListGridAdd("U"); // 사용자
  821. }
  822. function grp_right_bottom_button03_onclick(obj:Button, e:ClickEventInfo)
  823. {
  824. fDuscdListGridAdd("D"); // 부서
  825. }
  826. function grp_right_bottom_button04_onclick(obj:Button, e:ClickEventInfo)
  827. {
  828. fDuscdListGridAdd("I"); // 진단
  829. }
  830. /*
  831. * 상세코드리스트에 항목 추가
  832. * sFlag = D:부서, U:사용자, P:환자, C:처방코드, I:진단
  833. */
  834. function fDuscdListGridAdd(sFlag){
  835. var sCdId = "";
  836. var sCdNm = "";
  837. var sUserCd = ds_main_muscdinfo.getColumn(0, "usercd");
  838. if(utlf_isNull(sUserCd)) {
  839. alert("선택 된 사용자코드가 없습니다.");
  840. return;
  841. }
  842. if(sFlag == "C") { // 처방코드
  843. frmf_setParameter("SPMMB21700_recive_srchflag", "prcpcd");
  844. frmf_modal("SPMMB21700","SPMMB21700","","","","","","","","","","","M");
  845. sCdId = frmf_getParameter("SPMMB21700_prcpcd");
  846. sCdNm = frmf_getParameter("SPMMB21700_prcpnm");
  847. if(utlf_isNull(sCdId)) {
  848. return;
  849. }
  850. } else if(sFlag == "D") { // 부서
  851. var sReturn = appf_openDeptCodeList("dutplceinstcd", sysf_getUserInfo("dutplceinstcd"), "deptnm", "", "", "", "", "deptcd depthngnm cntctel");
  852. sCdId = sReturn.deptcd;
  853. sCdNm = sReturn.depthngnm;
  854. if(utlf_isNull(sCdId)) {
  855. return;
  856. }
  857. } else if(sFlag == "P") { // 환자
  858. frmf_modal("SPPMC02500","SPPMC02500","","","","","","","","","","","M");
  859. sCdId = ds_patinfolist.getColumn(0,"pid");
  860. sCdNm = ds_patinfolist.getColumn(0,"hngnm");
  861. if(utlf_isNull(sCdId)) {
  862. return;
  863. }
  864. } else if(sFlag == "I") { // 진단
  865. frmf_modal("SPMMO03200","SPMMO03200",null,null,null,null,null,null,null,null,null,null,"M");
  866. var useyn = frmf_getParameter("SPMMO03200_rtn_useyn");
  867. if(useyn == "Y"){
  868. frmf_setParameter("SPMMO03200_rtn_useyn", "");
  869. var totcnt = ds_temp_selectdiaglist.rowcount;
  870. for(var i = 0 ; i < totcnt ; i++) {
  871. sCdId = ds_temp_selectdiaglist.getColumn(i,"icd10cd");
  872. sCdNm = ds_temp_selectdiaglist.getColumn(i,"diagengnm");
  873. ds_main_duscdlist.addRow();
  874. grp_right_bottom.grd_duscdlist.showEditor(true);
  875. var nRow = ds_main_duscdlist.rowposition;
  876. ds_main_duscdlist.setColumn(nRow, "usercd", sUserCd);
  877. ds_main_duscdlist.setColumn(nRow, "cdid", sCdId);
  878. ds_main_duscdlist.setColumn(nRow, "cdnm", sCdNm);
  879. ds_main_duscdlist.setColumn(nRow, "fromdd", utlf_getCurrentDate());
  880. ds_main_duscdlist.setColumn(nRow, "todd", "99991231");
  881. }
  882. }
  883. return; // 멀티row 선택 처리를 위해
  884. } else if(sFlag == "U") { // 사용자
  885. var sReturn = appf_openUserInfo('usernm', '', '', '', '');
  886. sReturn = utlf_transNullToEmpty(sReturn.userInfo).split('|');
  887. sCdId = sReturn[0];
  888. sCdNm = sReturn[1];
  889. if(utlf_isNull(sCdId)) {
  890. return;
  891. }
  892. } else {
  893. sCdId = "";
  894. sCdNm = "";
  895. }
  896. ds_main_duscdlist.addRow();
  897. grp_right_bottom.grd_duscdlist.showEditor(true);
  898. var nRow = ds_main_duscdlist.rowposition;
  899. ds_main_duscdlist.setColumn(nRow, "usercd", sUserCd);
  900. ds_main_duscdlist.setColumn(nRow, "cdid", sCdId);
  901. ds_main_duscdlist.setColumn(nRow, "cdnm", sCdNm);
  902. ds_main_duscdlist.setColumn(nRow, "fromdd", utlf_getCurrentDate());
  903. ds_main_duscdlist.setColumn(nRow, "todd", "99991231");
  904. }
  905. function grp_left_grd_muscdlist_ondrag(obj:Grid, e:GridDragEventInfo)
  906. {
  907. if(e.row < 0 || e.col < 0) return false;
  908. return true;
  909. }
  910. function grp_left_grd_muscdlist_ondragleave(obj:Grid, e:DragEventInfo)
  911. {
  912. g_prevmouserow = -1;
  913. }
  914. function grp_left_grd_muscdlist_ondragmove(obj:Grid, e:GridDragEventInfo)
  915. {
  916. var sAdminYn = ds_main_cond.getColumn(0, "adminyn");
  917. if (sAdminYn == "Y" && e.row != g_prevmouserow) {
  918. g_prevmouserow = e.row;
  919. }
  920. }
  921. function grp_left_grd_muscdlist_ondrop(obj:Grid, e:GridDragEventInfo)
  922. {
  923. if(g_prevmouserow == -1) return false;
  924. fDropTrvItem(obj, e.row);
  925. g_prevmouserow = -1;
  926. }
  927. /**
  928. * @desc : Mouse Drop시 item의 상위 코드 변경
  929. * @param :
  930. * @return :
  931. * @author : 엄영만 2019. 04. 25
  932. * @---------------------------------------------------
  933. */
  934. function fDropTrvItem(obj:Grid, nSel){
  935. var sSupCd = "";
  936. var sMsg = "";
  937. var nRow = ds_main_muscdlist.rowposition;
  938. var sUserCd = ds_main_muscdlist.getColumn(nRow, "usercd"); //선택된 사용자코드
  939. var sCodeNm = ds_main_muscdlist.getColumn(nRow, "codenm"); //선택된 사용자코드명
  940. if(nSel < 0) {
  941. sSupCd = "ROOT"; // 최상위 항목으로
  942. sMsg = "최상위 항목으로 이동하시겠습니까?";
  943. } else {
  944. sSupCd = ds_main_muscdlist.getColumn(nSel, "usercd"); //드롭 위치의 아이템
  945. sMsg = "[" + sSupCd + "] 코드 하위 항목으로 이동하시겠습니까?";
  946. }
  947. if( sysf_messageBox(sMsg, "Q999") == 6 ){
  948. var sInputDs = dsf_createDsRow("ds_TXZBC00501", [{col:"status", type:"string", size:256, val:"u"}
  949. , {col:"usercd", type:"string", size:256, val:sUserCd}
  950. , {col:"codenm", type:"string", size:256, val:sCodeNm}
  951. , {col:"supcd", type:"string", size:256, val:sSupCd}]);
  952. var oParam = {};
  953. oParam.id = "TXZBC00501";
  954. oParam.service = "basiccodeapp.UserCode";
  955. oParam.method = "reqExeSaveMUserCodeInfo";
  956. oParam.inds = "req=" + sInputDs;
  957. oParam.outds = "";
  958. oParam.async = false;
  959. if(tranf_submit(oParam)) {
  960. fGetMuscdList();
  961. }
  962. }
  963. }
  964. /**
  965. * @desc : Mouse Drag Over중 선택한 treeview item의 색깔 변경
  966. * @
  967. * @param :
  968. * @return :
  969. * @author : 오지훈 2007. 10. 30
  970. * @---------------------------------------------------
  971. */
  972. function fDragOverColorChng(currow){
  973. return (currow == g_prevmouserow) ? "#ccffff" : "#ffffff";
  974. }
  975. ]]></Script>
  976. </Form>
  977. </FDL>