SMLLF10300_통합검체코드관리.xrw 14 KB

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