SMLLF00300_검체코드관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF00300_검체코드관리.xrw
  4. * 설 명 : 검체코드 조회 및 등록
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 -
  7. * 작 성 일 : 2006.11.19
  8. * 수정이력 : 2007.06.29 박정은 // 검체유형 추가, lastupdtdt 필드명 변경
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>검체코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <spclist>
  20. <spcfromdd/>
  21. <spctodd/>
  22. <spccd/>
  23. <spcnm/>
  24. <spcscrnnm/>
  25. <spcabbrnm/>
  26. <spcprntnm/>
  27. <spclblnm/>
  28. <spcbasetubecd/>
  29. <spckind/>
  30. <urinspcyn/>
  31. <spcdispseq/>
  32. <microspcyn/>
  33. </spclist>
  34. </main>
  35. <send>
  36. <refgbn/>
  37. <spcdata/>
  38. <searchgbn/>
  39. <searchtext/>
  40. <codeflag/>
  41. <deptflag/>
  42. </send>
  43. <init>
  44. </init>
  45. <hidden>
  46. <ref>
  47. <refgbn>1</refgbn>
  48. <searchgbn>2</searchgbn>
  49. <searchtext/>
  50. </ref>
  51. <today/>
  52. <userid/>
  53. </hidden>
  54. <temp>
  55. <addlist/>
  56. </temp>
  57. </root>
  58. </instance>
  59. <script type="javascript" ev:event="xforms-ready">
  60. <![CDATA[
  61. // 노드 초기화
  62. //model.resetInstanceNode("/root/main/spclist");
  63. //fSetHddentodd();
  64. //var tDay = getCurrentDate();
  65. //model.setValue("/root/hidden/today", tDay);
  66. ]]>
  67. </script>
  68. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  72. <submission id="TRLLF00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spclist"/>
  73. <submission id="TXLLF00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spclist"/>
  74. <submission id="TRLLF00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spclist"/>
  75. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  76. <script type="javascript" ev:event="xforms-ready">
  77. <![CDATA[
  78. //model.setValue("root/properties/menu/menuparam", "N");
  79. //grd_spc.deleteRow(1);
  80. fSetInit();
  81. fSetHddentodd();
  82. // 초기정보 조회
  83. model.setValue("/root/send/codeflag", "0000|"); // 0000= 유저과플래그
  84. submit("TRLZZ00101");
  85. //model.setValue("/root/hidden/userid", getUserInfo("userid"));
  86. //alert("dd= " + dd);
  87. ]]>
  88. </script>
  89. </model>
  90. <script type="javascript">
  91. <![CDATA[
  92. //조회구분에 따라 상용종료일 숨기기
  93. function fSetHddentodd(){
  94. if(cmb_refgbn.value == "1"){
  95. grd_spc.colHidden(2) = true;
  96. }else if(cmb_refgbn.value =="2"){
  97. grd_spc.colHidden(2) = false;
  98. }
  99. }
  100. // 행추가
  101. function fInsRowAdd(pGridId) {
  102. modal("SPLLF10500","","","","","","");
  103. var addstring = model.getValue("/root/temp/addlist/addstring");
  104. var addlen = addstring.split("▩");
  105. for(i = 0 ; i < addlen.length-1 ; i ++){
  106. grd_spc.addRow(false);
  107. grd_spc.rowStatus(0) = 1;
  108. var today = getCurrentDate();
  109. var additemlist = addlen[i].split("▦");
  110. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcfromdd", today);
  111. model.setValue("/root/main/spclist["+grd_spc.row+"]/spctodd", "99991231");
  112. model.setValue("/root/main/spclist["+grd_spc.row+"]/spccd", additemlist[0]);
  113. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcnm", additemlist[1]);
  114. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcscrnnm", additemlist[2]);
  115. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcabbrnm", additemlist[3]);
  116. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcprntnm", additemlist[4]);
  117. model.setValue("/root/main/spclist["+grd_spc.row+"]/spclblnm", additemlist[5]);
  118. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcbasetubecd", additemlist[6]);
  119. model.setValue("/root/main/spclist["+grd_spc.row+"]/urinspcyn", additemlist[7]);
  120. model.setValue("/root/main/spclist["+grd_spc.row+"]/spckind", additemlist[8]);
  121. if(grd_spc.rows < 3){
  122. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", 1);
  123. }else{
  124. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", parseInt(model.getValue("/root/main/spclist["+(grd_spc.row-1)+"]/spcdispseq")) +1);
  125. }
  126. }
  127. /*
  128. pGridId.addRow();
  129. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcfromdd", getCurrentDate());
  130. model.setValue("/root/main/spclist["+grd_spc.row+"]/spctodd", "99991231");
  131. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcabbrnm", "-");
  132. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcprntnm", "-");
  133. model.setValue("/root/main/spclist["+grd_spc.row+"]/spclblnm", "-");
  134. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcbasetubecd", "-");
  135. model.setValue("/root/main/spclist["+grd_spc.row+"]/urinspcyn", "N");
  136. if(grd_spc.rows < 3){
  137. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", 1);
  138. }else{
  139. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", parseInt(model.getValue("/root/main/spclist["+(grd_spc.row-1)+"]/spcdispseq")) +1);
  140. }
  141. */
  142. }
  143. // 초기화
  144. function fSetInit() {
  145. model.removeNodeset("/root/main/spclist");
  146. model.refresh();
  147. }
  148. // 검체코드 조회
  149. function fGetSpcCd(){
  150. grd_spc.rebuildstyle();
  151. model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
  152. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  153. submit("TRLLF00301");
  154. //var gbn = model.getValue("/root/hidden/ref/refgbn");
  155. var today = getCurrentDate();
  156. // 전체조회일때 종료된 데이터 배경색 바꾸기
  157. if(cmb_refgbn.value =="2"){
  158. setRowStyle("grd_spc", "0", today, "spctodd", "small");
  159. }
  160. }
  161. // 검체코드 수정, 등록
  162. function fExeSpcSave(){
  163. var grddata = getGridUpdateData(grd_spc);
  164. // 핵의학 검체는 검체코드 800 ~ 899만 등록가능하게
  165. if(model.getValue("root/properties/menu/menuparam")=="N"){
  166. for(i=1; i<grd_spc.rows; i++){
  167. if(grd_spc.rowStatus(i) == 3 || grd_spc.rowStatus(i) == 1){
  168. var ispccd = model.getValue("/root/main/spclist["+i+"]/spccd");
  169. if(ispccd <= 800 || ispccd >899){
  170. messageBox("핵의학 검체코드는 800 ~ 899 까지만 등록 가능합니다.", "I");
  171. return;
  172. }
  173. }
  174. }
  175. }else{
  176. for(i=1; i<grd_spc.rows; i++){
  177. if(grd_spc.rowStatus(i) == 3 || grd_spc.rowStatus(i) == 1){
  178. var ispccd = model.getValue("/root/main/spclist["+i+"]/spccd");
  179. if(ispccd > 799 && ispccd < 900){
  180. messageBox("800 ~ 899 검체코드는 핵의학에서 등록 가능합니다.", "I");
  181. return;
  182. }
  183. }
  184. }
  185. }
  186. //model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
  187. model.setValue("/root/send/spcdata", grddata);
  188. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  189. if(submit("TXLLF00301")== true){
  190. fGetSpcCd();
  191. }
  192. }
  193. // 검체코드 검색
  194. function fGetSpcSearch(){
  195. /*
  196. var searchGbn = model.getValue("/root/hidden/ref/searchgbn");
  197. var searchText = model.getValue("/root/hidden/ref/searchtext");
  198. if(searchGbn == "1"){ // 검체코드
  199. var row = grd_spc.findRow(searchText, 1, 3, false, true);
  200. }else{ // 검체명
  201. var row = grd_spc.findRow(searchText, 1, 4, false, false);
  202. }
  203. grd_spc.row = row;
  204. */
  205. model.setValue("/root/send/searchgbn", model.getValue("/root/hidden/ref/searchgbn"));
  206. model.setValue("/root/send/searchtext", model.getValue("/root/hidden/ref/searchtext"));
  207. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  208. submit("TRLLF00302");
  209. }
  210. // 검체명 입력시 화면, 약어, 출력, 라벨명 설정
  211. function fSetSpcNm(){
  212. var rState = grd_spc.rowStatus(grd_spc.row);
  213. //alert("rState= " + rState);
  214. if(rState =="1"){
  215. if(grd_spc.col == "4"){
  216. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcscrnnm", model.getValue("/root/main/spclist["+grd_spc.row+"]/spcnm"));
  217. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcabbrnm", "-");
  218. model.setValue("/root/main/spclist["+grd_spc.row+"]/spcprntnm", "-");
  219. model.setValue("/root/main/spclist["+grd_spc.row+"]/spclblnm", "-");
  220. }
  221. }
  222. }
  223. // Null 체크
  224. function fNullCheck(){
  225. var msg = "";
  226. var nullyn = "true";
  227. var spccd = "";
  228. var spcfromdd = "";
  229. var spctodd = "";
  230. var spcnm = "";
  231. var spcscrnnm = "";
  232. var spcabbrnm = "";
  233. var spckind = "";
  234. for(i=1; i<grd_spc.rows; i++ ){
  235. if((grd_spc.rowStatus(i) == 3) || (grd_spc.rowStatus(i) == 1) ||(grd_spc.rowStatus(i) == 2)){
  236. spccd = model.getValue("/root/main/spclist["+i+"]/spccd");
  237. spcfromdd = model.getValue("/root/main/spclist["+i+"]/spcfromdd");
  238. spctodd = model.getValue("/root/main/spclist["+i+"]/spctodd");
  239. spcnm = model.getValue("/root/main/spclist["+i+"]/spcnm");
  240. spcscrnnm = model.getValue("/root/main/spclist["+i+"]/spcscrnnm");
  241. spcabbrnm = model.getValue("/root/main/spclist["+i+"]/spcabbrnm");
  242. spckind = model.getValue("/root/main/spclist["+i+"]/spckind");
  243. if(spcfromdd == ""){
  244. msg = "검체 사용시작일자를 ";
  245. messageBox(msg, "I003", "");
  246. return "false";
  247. }
  248. if(spctodd == ""){
  249. msg = "검체 사용종료일자를 ";
  250. messageBox(msg, "I003", "");
  251. return "false";
  252. }
  253. if(spccd == ""){
  254. msg = "검체코드를 ";
  255. messageBox(msg, "I003", "");
  256. return "false";
  257. }
  258. if(spcnm == ""){
  259. msg = "검체명을 ";
  260. messageBox(msg, "I003", "");
  261. return "false";
  262. }
  263. if(spcscrnnm == ""){
  264. msg = "검체화면명을 ";
  265. messageBox(msg, "I003", "");
  266. return "false";
  267. }
  268. if(spcabbrnm == ""){
  269. msg = "검체약어명을 ";
  270. messageBox(msg, "I003", "");
  271. return "false";
  272. }
  273. return nullyn;
  274. }
  275. }
  276. }
  277. function fExeExcel(pGridId) {
  278. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  279. if (fileName != "")
  280. {
  281. pGridId.saveExcel(fileName);
  282. }
  283. }
  284. ]]>
  285. </script>
  286. </xhtml:head>
  287. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  288. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  289. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  290. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; ">검체코드상세내역</caption>
  291. <datagrid id="grd_spc" nodeset="/root/main/spclist" caption="사용시작일자^사용종료일자^검체코드^검체명^검체명(화면)^검체명(약어)^검체명(출력)^검체명(라벨)^기본용기코드^검체유형^유린검체여부^검체표시순서^미생물검체여부" colwidth="90, 90, 60, 140, 140, 120, 120, 120, 78, 122, 80, 80, 0" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" tooltip="true" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:669px; ">
  292. <col ref="spcfromdd" type="inputdate" format="yyyy-mm-dd"/>
  293. <col ref="spctodd" type="inputdate" format="yyyy-mm-dd"/>
  294. <col ref="spccd" type="input"/>
  295. <col ref="spcnm" type="input"/>
  296. <col ref="spcscrnnm" type="input"/>
  297. <col ref="spcabbrnm" type="input"/>
  298. <col ref="spcprntnm" type="input"/>
  299. <col ref="spclblnm" type="input"/>
  300. <col ref="spcbasetubecd" type="input"/>
  301. <col ref="spckind" type="combo">
  302. <choices>
  303. <item>
  304. <label>기타검체</label>
  305. <value>0</value>
  306. </item>
  307. <item>
  308. <label>일반검체</label>
  309. <value>1</value>
  310. </item>
  311. <item>
  312. <label>미생물검체</label>
  313. <value>2</value>
  314. </item>
  315. <item>
  316. <label>혈액용량</label>
  317. <value>3</value>
  318. </item>
  319. <item>
  320. <label>핵의학검체</label>
  321. <value>4</value>
  322. </item>
  323. <item>
  324. <label>판독검체(종합검증용)</label>
  325. <value>5</value>
  326. </item>
  327. <item>
  328. <label>조직은행검체</label>
  329. <value>6</value>
  330. </item>
  331. <item>
  332. <label>감시배양검체</label>
  333. <value>7</value>
  334. </item>
  335. </choices>
  336. </col>
  337. <col checkvalue="Y,N" ref="urinspcyn" type="checkbox"/>
  338. <col ref="spcdispseq" type="input"/>
  339. <col checkvalue="1,0" ref="microspcyn" type="checkbox"/>
  340. <script type="javascript" ev:event="xforms-value-changed">
  341. <![CDATA[
  342. fSetSpcNm();
  343. ]]>
  344. </script>
  345. <script type="javascript" ev:event="onaftersort">
  346. <![CDATA[
  347. grd_spc.gridToInstance();
  348. ]]>
  349. </script>
  350. </datagrid>
  351. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  352. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1195px; height:35px; "/>
  353. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  354. <caption>검색</caption>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. fGetSpcSearch();
  358. ]]>
  359. </script>
  360. </button>
  361. <button id="btn_ref" class="btn1_letter2" style="left:288px; top:7px; width:56px; height:22px; ">
  362. <caption>조회</caption>
  363. <script type="javascript" ev:event="DOMActivate">
  364. <![CDATA[
  365. fGetSpcCd();
  366. ]]>
  367. </script>
  368. </button>
  369. <line id="line11" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
  370. <line id="line14" class="line_4" style="x1:273px; y1:6px; x2:273px; y2:28px; "/>
  371. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  372. <select1 id="cmb_srchflag" ref="/root/hidden/ref/searchgbn" class="combo_search" appearance="minimal" style="left:830px; top:8px; width:150px; height:19px; ">
  373. <choices>
  374. <item>
  375. <label>검체코드</label>
  376. <value>1</value>
  377. </item>
  378. <item>
  379. <label>검체명</label>
  380. <value>2</value>
  381. </item>
  382. </choices>
  383. </select1>
  384. <caption id="caption4" class="search_name" style="left:737px; top:9px; width:90px; height:17px; ">검색구분 :</caption>
  385. <input id="ipt_refflag" ref="/root/hidden/ref/searchtext" class="input_search" style="left:983px; top:8px; width:110px; height:19px; "/>
  386. <select1 id="cmb_refgbn" ref="/root/hidden/ref/refgbn" class="combo_search" appearance="minimal" style="left:108px; top:8px; width:150px; height:19px; ">
  387. <choices>
  388. <item>
  389. <label>사용코드</label>
  390. <value>1</value>
  391. </item>
  392. <item>
  393. <label>전체코드</label>
  394. <value>2</value>
  395. </item>
  396. </choices>
  397. <script type="javascript" ev:event="xforms-value-changed">
  398. <![CDATA[
  399. fSetHddentodd();
  400. ]]>
  401. </script>
  402. </select1>
  403. </group>
  404. <button id="btn_rowadd" class="btn2_letter3" style="left:1142px; top:50px; width:53px; height:19px; ">
  405. <caption>행추가</caption>
  406. <script type="javascript" ev:event="DOMActivate">
  407. <![CDATA[
  408. fInsRowAdd(grd_spc);
  409. ]]>
  410. </script>
  411. </button>
  412. <button id="button2" class="btn2_letter2" style="left:1098px; top:50px; width:42px; height:19px; ">
  413. <caption>엑셀</caption>
  414. <script type="javascript" ev:event="DOMActivate">
  415. <![CDATA[
  416. fExeExcel(grd_spc);
  417. ]]>
  418. </script>
  419. </button>
  420. </group>
  421. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검체코드관리</caption>
  422. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  423. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  424. <caption>초기화</caption>
  425. <script type="javascript" ev:event="DOMActivate">
  426. <![CDATA[
  427. fSetInit();
  428. ]]>
  429. </script>
  430. </button>
  431. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  432. <caption>저장</caption>
  433. <script type="javascript" ev:event="DOMActivate">
  434. <![CDATA[
  435. if(fNullCheck()=="true"){
  436. fExeSpcSave();
  437. }
  438. ]]>
  439. </script>
  440. </button>
  441. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  442. </group>
  443. </xhtml:body>
  444. </xhtml:html>