123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLLF00300_검체코드관리.xrw
- * 설 명 : 검체코드 조회 및 등록
- * 설 계 자 : (주)에이씨케이 -
- * 작 성 자 : (주)에이씨케이 -
- * 작 성 일 : 2006.11.19
- * 수정이력 : 2007.06.29 박정은 // 검체유형 추가, lastupdtdt 필드명 변경
- * 기 타 :
- -->
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>검체코드관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root>
- <main>
- <spclist>
- <spcfromdd/>
- <spctodd/>
- <spccd/>
- <spcnm/>
- <spcscrnnm/>
- <spcabbrnm/>
- <spcprntnm/>
- <spclblnm/>
- <spcbasetubecd/>
- <spckind/>
- <urinspcyn/>
- <spcdispseq/>
- <microspcyn/>
- </spclist>
- </main>
- <send>
- <refgbn/>
- <spcdata/>
- <searchgbn/>
- <searchtext/>
- <codeflag/>
- <deptflag/>
- </send>
- <init>
- </init>
- <hidden>
- <ref>
- <refgbn>1</refgbn>
- <searchgbn>2</searchgbn>
- <searchtext/>
- </ref>
- <today/>
- <userid/>
- </hidden>
- <temp>
- <addlist/>
- </temp>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // 노드 초기화
- //model.resetInstanceNode("/root/main/spclist");
- //fSetHddentodd();
- //var tDay = getCurrentDate();
- //model.setValue("/root/hidden/today", tDay);
-
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <submission id="TRLLF00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spclist"/>
- <submission id="TXLLF00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spclist"/>
- <submission id="TRLLF00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spclist"/>
- <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //model.setValue("root/properties/menu/menuparam", "N");
- //grd_spc.deleteRow(1);
- fSetInit();
- fSetHddentodd();
-
- // 초기정보 조회
- model.setValue("/root/send/codeflag", "0000|"); // 0000= 유저과플래그
- submit("TRLZZ00101");
-
- //model.setValue("/root/hidden/userid", getUserInfo("userid"));
- //alert("dd= " + dd);
- ]]>
- </script>
- </model>
- <script type="javascript">
- <![CDATA[
-
- //조회구분에 따라 상용종료일 숨기기
- function fSetHddentodd(){
- if(cmb_refgbn.value == "1"){
- grd_spc.colHidden(2) = true;
-
- }else if(cmb_refgbn.value =="2"){
- grd_spc.colHidden(2) = false;
-
- }
- }
- // 행추가
- function fInsRowAdd(pGridId) {
-
- modal("SPLLF10500","","","","","","");
-
- var addstring = model.getValue("/root/temp/addlist/addstring");
- var addlen = addstring.split("▩");
-
- for(i = 0 ; i < addlen.length-1 ; i ++){
- grd_spc.addRow(false);
- grd_spc.rowStatus(0) = 1;
- var today = getCurrentDate();
- var additemlist = addlen[i].split("▦");
-
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcfromdd", today);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spctodd", "99991231");
-
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spccd", additemlist[0]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcnm", additemlist[1]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcscrnnm", additemlist[2]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcabbrnm", additemlist[3]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcprntnm", additemlist[4]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spclblnm", additemlist[5]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcbasetubecd", additemlist[6]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/urinspcyn", additemlist[7]);
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spckind", additemlist[8]);
-
- if(grd_spc.rows < 3){
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", 1);
- }else{
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", parseInt(model.getValue("/root/main/spclist["+(grd_spc.row-1)+"]/spcdispseq")) +1);
- }
-
- }
-
-
-
- /*
- pGridId.addRow();
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcfromdd", getCurrentDate());
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spctodd", "99991231");
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcabbrnm", "-");
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcprntnm", "-");
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spclblnm", "-");
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcbasetubecd", "-");
- model.setValue("/root/main/spclist["+grd_spc.row+"]/urinspcyn", "N");
-
- if(grd_spc.rows < 3){
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", 1);
- }else{
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcdispseq", parseInt(model.getValue("/root/main/spclist["+(grd_spc.row-1)+"]/spcdispseq")) +1);
- }
- */
-
- }
-
- // 초기화
- function fSetInit() {
- model.removeNodeset("/root/main/spclist");
-
- model.refresh();
- }
-
- // 검체코드 조회
- function fGetSpcCd(){
- grd_spc.rebuildstyle();
-
- model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
- model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
-
- submit("TRLLF00301");
- //var gbn = model.getValue("/root/hidden/ref/refgbn");
- var today = getCurrentDate();
-
- // 전체조회일때 종료된 데이터 배경색 바꾸기
- if(cmb_refgbn.value =="2"){
- setRowStyle("grd_spc", "0", today, "spctodd", "small");
- }
-
-
-
- }
-
- // 검체코드 수정, 등록
- function fExeSpcSave(){
- var grddata = getGridUpdateData(grd_spc);
-
- // 핵의학 검체는 검체코드 800 ~ 899만 등록가능하게
- if(model.getValue("root/properties/menu/menuparam")=="N"){
-
- for(i=1; i<grd_spc.rows; i++){
- if(grd_spc.rowStatus(i) == 3 || grd_spc.rowStatus(i) == 1){
- var ispccd = model.getValue("/root/main/spclist["+i+"]/spccd");
- if(ispccd <= 800 || ispccd >899){
- messageBox("핵의학 검체코드는 800 ~ 899 까지만 등록 가능합니다.", "I");
- return;
- }
- }
- }
- }else{
- for(i=1; i<grd_spc.rows; i++){
- if(grd_spc.rowStatus(i) == 3 || grd_spc.rowStatus(i) == 1){
- var ispccd = model.getValue("/root/main/spclist["+i+"]/spccd");
- if(ispccd > 799 && ispccd < 900){
- messageBox("800 ~ 899 검체코드는 핵의학에서 등록 가능합니다.", "I");
- return;
- }
- }
- }
- }
-
- //model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
- model.setValue("/root/send/spcdata", grddata);
- model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
-
- if(submit("TXLLF00301")== true){
- fGetSpcCd();
- }
-
- }
-
- // 검체코드 검색
- function fGetSpcSearch(){
-
- /*
- var searchGbn = model.getValue("/root/hidden/ref/searchgbn");
- var searchText = model.getValue("/root/hidden/ref/searchtext");
-
- if(searchGbn == "1"){ // 검체코드
- var row = grd_spc.findRow(searchText, 1, 3, false, true);
-
- }else{ // 검체명
- var row = grd_spc.findRow(searchText, 1, 4, false, false);
- }
-
- grd_spc.row = row;
- */
-
- model.setValue("/root/send/searchgbn", model.getValue("/root/hidden/ref/searchgbn"));
- model.setValue("/root/send/searchtext", model.getValue("/root/hidden/ref/searchtext"));
- model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
-
- submit("TRLLF00302");
- }
-
- // 검체명 입력시 화면, 약어, 출력, 라벨명 설정
- function fSetSpcNm(){
-
- var rState = grd_spc.rowStatus(grd_spc.row);
- //alert("rState= " + rState);
- if(rState =="1"){
- if(grd_spc.col == "4"){
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcscrnnm", model.getValue("/root/main/spclist["+grd_spc.row+"]/spcnm"));
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcabbrnm", "-");
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spcprntnm", "-");
- model.setValue("/root/main/spclist["+grd_spc.row+"]/spclblnm", "-");
-
- }
- }
- }
-
- // Null 체크
- function fNullCheck(){
-
- var msg = "";
-
- var nullyn = "true";
-
- var spccd = "";
- var spcfromdd = "";
- var spctodd = "";
- var spcnm = "";
- var spcscrnnm = "";
- var spcabbrnm = "";
- var spckind = "";
-
- for(i=1; i<grd_spc.rows; i++ ){
- if((grd_spc.rowStatus(i) == 3) || (grd_spc.rowStatus(i) == 1) ||(grd_spc.rowStatus(i) == 2)){
-
- spccd = model.getValue("/root/main/spclist["+i+"]/spccd");
- spcfromdd = model.getValue("/root/main/spclist["+i+"]/spcfromdd");
- spctodd = model.getValue("/root/main/spclist["+i+"]/spctodd");
- spcnm = model.getValue("/root/main/spclist["+i+"]/spcnm");
- spcscrnnm = model.getValue("/root/main/spclist["+i+"]/spcscrnnm");
- spcabbrnm = model.getValue("/root/main/spclist["+i+"]/spcabbrnm");
- spckind = model.getValue("/root/main/spclist["+i+"]/spckind");
-
- if(spcfromdd == ""){
- msg = "검체 사용시작일자를 ";
- messageBox(msg, "I003", "");
- return "false";
- }
-
- if(spctodd == ""){
- msg = "검체 사용종료일자를 ";
- messageBox(msg, "I003", "");
- return "false";
- }
-
- if(spccd == ""){
- msg = "검체코드를 ";
- messageBox(msg, "I003", "");
- return "false";
- }
-
- if(spcnm == ""){
- msg = "검체명을 ";
- messageBox(msg, "I003", "");
- return "false";
- }
-
- if(spcscrnnm == ""){
- msg = "검체화면명을 ";
- messageBox(msg, "I003", "");
- return "false";
- }
-
- if(spcabbrnm == ""){
- msg = "검체약어명을 ";
- messageBox(msg, "I003", "");
- return "false";
- }
-
- return nullyn;
- }
- }
- }
-
-
- function fExeExcel(pGridId) {
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "")
- {
- pGridId.saveExcel(fileName);
- }
-
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
- <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; ">검체코드상세내역</caption>
- <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; ">
- <col ref="spcfromdd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="spctodd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="spccd" type="input"/>
- <col ref="spcnm" type="input"/>
- <col ref="spcscrnnm" type="input"/>
- <col ref="spcabbrnm" type="input"/>
- <col ref="spcprntnm" type="input"/>
- <col ref="spclblnm" type="input"/>
- <col ref="spcbasetubecd" type="input"/>
- <col ref="spckind" type="combo">
- <choices>
- <item>
- <label>기타검체</label>
- <value>0</value>
- </item>
- <item>
- <label>일반검체</label>
- <value>1</value>
- </item>
- <item>
- <label>미생물검체</label>
- <value>2</value>
- </item>
- <item>
- <label>혈액용량</label>
- <value>3</value>
- </item>
- <item>
- <label>핵의학검체</label>
- <value>4</value>
- </item>
- <item>
- <label>판독검체(종합검증용)</label>
- <value>5</value>
- </item>
- <item>
- <label>조직은행검체</label>
- <value>6</value>
- </item>
- <item>
- <label>감시배양검체</label>
- <value>7</value>
- </item>
- </choices>
- </col>
- <col checkvalue="Y,N" ref="urinspcyn" type="checkbox"/>
- <col ref="spcdispseq" type="input"/>
- <col checkvalue="1,0" ref="microspcyn" type="checkbox"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSetSpcNm();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_spc.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1195px; height:35px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
- <caption>검색</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetSpcSearch();
- ]]>
- </script>
- </button>
- <button id="btn_ref" class="btn1_letter2" style="left:288px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetSpcCd();
- ]]>
- </script>
- </button>
- <line id="line11" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
- <line id="line14" class="line_4" style="x1:273px; y1:6px; x2:273px; y2:28px; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
- <select1 id="cmb_srchflag" ref="/root/hidden/ref/searchgbn" class="combo_search" appearance="minimal" style="left:830px; top:8px; width:150px; height:19px; ">
- <choices>
- <item>
- <label>검체코드</label>
- <value>1</value>
- </item>
- <item>
- <label>검체명</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- <caption id="caption4" class="search_name" style="left:737px; top:9px; width:90px; height:17px; ">검색구분 :</caption>
- <input id="ipt_refflag" ref="/root/hidden/ref/searchtext" class="input_search" style="left:983px; top:8px; width:110px; height:19px; "/>
- <select1 id="cmb_refgbn" ref="/root/hidden/ref/refgbn" class="combo_search" appearance="minimal" style="left:108px; top:8px; width:150px; height:19px; ">
- <choices>
- <item>
- <label>사용코드</label>
- <value>1</value>
- </item>
- <item>
- <label>전체코드</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSetHddentodd();
- ]]>
- </script>
- </select1>
- </group>
- <button id="btn_rowadd" class="btn2_letter3" style="left:1142px; top:50px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInsRowAdd(grd_spc);
- ]]>
- </script>
- </button>
- <button id="button2" class="btn2_letter2" style="left:1098px; top:50px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeExcel(grd_spc);
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검체코드관리</caption>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetInit();
-
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fNullCheck()=="true"){
- fExeSpcSave();
- }
- ]]>
- </script>
- </button>
- <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|