123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * Name : SPCDT00700_처방코드및처방명검색.xrw
- * Summary : 처방코드및처방명검색
- * Programmer : 최정환
- * Date Written : 2007.05.17
- * History :
- * Remark :
- -->
- <?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 xmlns="">
- <main>
- <list>
- <prcplist>
- <prcpnm/>
- <prcpcd/>
- <oldordcd/>
- </prcplist>
- </list>
- <search>
- <searchcondition>prcpnm</searchcondition>
- <searchterm/>
- </search>
- </main>
- <send>
- <searchcondition/>
- <searchterm/>
- </send>
- <temp>
- <prcplist>
- <status>I</status>
- <dtmnkey/>
- <seq/>
- <prcpcd/>
- <prcpnm/>
- </prcplist>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // 그리드의 col을 초기화 시켜준다.
- model.removenodeset("/root/main/list/prcplist");
- model.refresh();
- fCheckAuth();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
-
- // 권한체크
- function fCheckAuth() {
- if (!checkAuth("r")) {
- btn_search.disabled=true;
- }
- }
-
- function fGetPrcpList() {
- var receive_prcplist_path = opener.window.javascript.getParameter("receive_prcplist_path");
- var count = 0;
- var essnchk = "N";
-
- if (grd_prcplist.row < 1 || grd_prcplist.selectedRows < 1) {
- messageBox("처방을","C002");
- } else {
- for (i=0; i < grd_prcplist.selectedRows; i++) {
- var prcpcd = grd_prcplist.valuematrix(grd_prcplist.selectedRow(i),1)
- var prcpnm = grd_prcplist.valuematrix(grd_prcplist.selectedRow(i),3)
- count = count + 1
- model.makeValue("/root/temp/prcplist/prcpcd", prcpcd);
- model.makeValue("/root/temp/prcplist/prcpnm", prcpnm); // 임시노드에 선택된 항목을 넣어준다.
-
- model.duplicate(opener.root.main, root.temp.prcplist); // 임시노드에 있는 항목을 메인(부모)창에 복사해준다.
- model.removenodeset("/root/temp/prcplist/prcpcd"); // 다음항목 복사시 중복되지 않도록 임시노드를 지워준다.
- model.removenodeset("/root/temp/prcplist/prcpnm"); // 다음항목 복사시 중복되지 않도록 임시노드를 지워준다.
- }
- opener.model.refresh();
- window.close();
- }
- }
-
- function fGetPrcpInfo() {
- var receive_prcpnm_path = opener.window.javascript.getParameter("receive_prcpnm_path");
- var receive_prcpcd_path = opener.window.javascript.getParameter("receive_prcpcd_path");
- var row = grd_prcplist.row;
- var prcpnm = grd_prcplist.valueMatrix(row, grd_prcplist.colRef("prcpnm"));
- var prcpcd = grd_prcplist.valueMatrix(row, grd_prcplist.colRef("prcpcd"));
-
- if (grd_prcplist.row > 0){
- if (receive_prcpnm_path != "") { opener.model.setValue(receive_prcpnm_path, prcpnm); }
- if (receive_prcpcd_path != "") { opener.model.setValue(receive_prcpcd_path, prcpcd); }
- opener.model.refresh();
- window.close();
- } else {
- messageBox("조회하신 후 목록을 ","C002");
- model.SetFocus("grd_prcplist");
- }
- }
- ]]>
- </script>
- <submission id="TRCDT00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="534" pageheight="350" style="border-color:#c7a3cf; ">
- <group id="group5" scroll="auto" style="left:0px; top:0px; width:534px; height:335px; ">
- <group id="group2" style="left:0px; top:0px; width:517px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:517px; height:35px; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:8px; width:86px; height:17px; ">검색조건 :</caption>
- <select1 id="combo1" ref="/root/main/search/searchcondition" class="combo_search" appearance="minimal" style="left:101px; top:8px; width:110px; height:19px; ">
- <choices>
- <item>
- <label>처방영문명</label>
- <value>prcpnm</value>
- </item>
- <item>
- <label>처방한글명</label>
- <value>prcphngnm</value>
- </item>
- <item>
- <label>처방코드</label>
- <value>prcpcd</value>
- </item>
- <!--<item>
- <label>기존처방코드</label>
- <value>oldordcd</value>
- </item>-->
- </choices>
- </select1>
- <input id="input3" ref="/root/main/search/searchterm" class="input_search" style="left:214px; top:8px; width:150px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <line id="line13" class="line_4" style="x1:429px; y1:7px; x2:429px; y2:29px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:445px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var searchterm = model.getValue("/root/main/search/searchterm");
- var searchcondition = model.getValue("/root/main/search/searchcondition");
- model.setValue("/root/send/searchterm", "%"+searchterm+"%");
- model.setValue("/root/send/searchcondition", searchcondition);
-
- if (searchcondition == "prcpnm") {
- if (searchterm.length < 5) {
- messageBox("영문검색의 조건은 5글자 이상 ","C001");
- } else {
- submit("TRCDT00701");
- }
- } else if (searchcondition == "prcphngnm" ) {
- if (searchterm.length < 2) {
- messageBox("한글검색의 조건은 2글자 이상 ","C001");
- } else {
- submit("TRCDT00701");
- }
- } else if (searchcondition == "prcpcd" ) {
- if (searchterm.length < 2) {
- messageBox("처방코드검색의 조건은 2글자 이상 ","C001");
- } else {
- submit("TRCDT00701");
- }
- }
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption9" class="tit_2" style="left:0px; top:40px; width:180px; height:14px; vertical-align:middle; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">처방코드 및 처방명 검색</caption>
- <line id="line12" class="line_1" style="x1:0px; y1:55px; x2:517px; y2:55px; "/>
- <datagrid id="grd_prcplist" nodeset="/root/main/list/prcplist" class="text_left" caption="처방코드^기존처방코드^처방영문명^처방한글명" colwidth="100,100,200,200" dataheight="25" defaultrows="0" ellipsis="true" explorerbar="sortshowmove" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" tooltip="true" style="left:0px; top:60px; width:517px; height:255px; ">
- <col ref="prcpcd"/>
- <col ref="oldordcd" visibility="hidden"/>
- <col ref="prcpnm"/>
- <col ref="prcphngnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if( grd_prcplist.isCell(event.target) && grd_prcplist.row >= grd_prcplist.fixedRows ){
- var one = opener.window.javascript.getParameter("one");
- if(one == "one"){
- fGetPrcpInfo();
- }else{
- fGetPrcpList();
- }
- }
- ]]>
- </script>
- </datagrid>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:315px; width:517px; height:27px; ">
- <button id="btn_cnfm" class="btn4_letter2" style="left:402px; top:5px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var one = opener.window.javascript.getParameter("one");
- if(one == "one"){
- fGetPrcpInfo();
- }else{
- fGetPrcpList();
- }
- ]]>
- </script>
- </button>
- <button id="btn_cncl" class="btn4_letter2" style="left:461px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <close ev:event="DOMActivate"/>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|