123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?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="">
- <send>
- <sentensetype>S</sentensetype>
- <keyword/>
- <sentense/>
- <awttype>P</awttype>
- <userid/>
- </send>
- <save>
- </save>
- <main>
- <awtlist/>
- </main>
- <temp>
- <awtlist/>
- </temp>
- </root>
- </instance>
- <submission id="TRZWT00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/awtlist"/>
- <submission id="TXZWT00200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save" replace="instance"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
- <json/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //model.setValue("/root/send/awttype", getViewer("sysMessage").window.javascript.fGetUserAwtGrpCd()); 이윤주 막음
- model.removenode("/root/main/awtlist");
- model.makeNode("/root/main/awtlist");
-
- if (model.getValue("/root/send/awttype") == "C") {
- button1.disabled = true;
- button2.disabled = true;
- button3.disabled = true;
- button4.disabled = true;
- button5.disabled = true;
- } else {
- button1.disabled = false;
- button2.disabled = false;
- button3.disabled = false;
- button4.disabled = false;
- button5.disabled = false;
- }
-
- model.refresh();
- if (!submit("TRZWT00100"))
- return;
-
- grd_awtlist.clearStatus();
-
- if (model.getValue("/root/send/sentensetype") == "W") {
- grd_awtlist.valueMatrix(0, 1) = "단어";
- grd_awtlist.colHidden(2) = true;
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.valueMatrix(0, 1) = "약어";
- grd_awtlist.colHidden(2) = false;
- cpt_usetxt.visible = true;
- }
-
- var cnt = getNodesetCount("/root/main/awtlist/item");
-
- if( cnt > 0 ){
- cpt_cnt.value = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
-
- grd_awtlist.resizeCells();
- model.refresh();
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="930" pageheight="700">
- <group id="grd_main" style="left:0px; top:0px; width:905px; height:40px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:905px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <input id="ipt_pKeyword" ref="/root/send/keyword" class="input_search" style="left:405px; top:11px; width:115px; height:19px; "/>
- <caption id="caption8" class="search_name" style="left:10px; top:12px; width:60px; height:17px; ">유형 :</caption>
- <select1 id="radio1" ref="/root/send/sentensetype" class="radio_search" appearance="full" cols="2" overflow="visible" style="left:75px; top:12px; width:95px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>단어</label>
- <value>W</value>
- </item>
- <item>
- <label>구문</label>
- <value>S</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (model.getValue("/root/send/sentensetype") == "W") {
- grd_awtlist.valueMatrix(0, 1) = "단어";
- grd_awtlist.colHidden(2) = true;
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.valueMatrix(0, 1) = "약어";
- grd_awtlist.colHidden(2) = false;
- cpt_usetxt.visible = true;
- }
-
- model.removenode("/root/main/awtlist");
- model.makeNode("/root/main/awtlist");
- model.refresh();
-
- if (!submit("TRZWT00100"))
- return;
-
- grd_awtlist.clearStatus();
-
- if (model.getValue("/root/send/sentensetype") == "W") {
- grd_awtlist.valueMatrix(0, 1) = "단어";
- grd_awtlist.colHidden(2) = true;
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.valueMatrix(0, 1) = "약어";
- grd_awtlist.colHidden(2) = false;
- cpt_usetxt.visible = true;
- }
-
- var cnt = getNodesetCount("/root/main/awtlist/item");
-
- if( cnt > 0 ){
- cpt_cnt.value = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
- grd_awtlist.resizeCells();
- model.refresh();
-
- ]]>
- </script>
- </select1>
- <select1 id="rdo_awt" ref="/root/send/awttype" class="radio_search" appearance="full" cols="3" overflow="visible" style="left:180px; top:12px; width:100px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>개인</label>
- <value>P</value>
- </item>
- <item>
- <label>공용</label>
- <value>C</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.removenode("/root/main/awtlist");
- model.makeNode("/root/main/awtlist");
- model.refresh();
-
- if (model.getValue("/root/send/awttype") == "C") {
- button1.disabled = true;
- button2.disabled = true;
- button3.disabled = true;
- button4.disabled = true;
- button5.disabled = true;
- } else {
- button1.disabled = false;
- button2.disabled = false;
- button3.disabled = false;
- button4.disabled = false;
- button5.disabled = false;
- }
-
-
- if (!submit("TRZWT00100"))
- return;
-
- grd_awtlist.clearStatus();
-
- if (model.getValue("/root/send/sentensetype") == "W") {
- grd_awtlist.valueMatrix(0, 1) = "단어";
- grd_awtlist.colHidden(2) = true;
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.valueMatrix(0, 1) = "약어";
- grd_awtlist.colHidden(2) = false;
- cpt_usetxt.visible = true;
- }
-
- var cnt = getNodesetCount("/root/main/awtlist/item");
-
- if( cnt > 0 ){
- cpt_cnt.value = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
-
- grd_awtlist.resizeCells();
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="caption1" class="search_name" style="left:280px; top:12px; width:125px; height:17px; ">단어 또는 약어 :</caption>
- <caption id="caption2" class="search_name" style="left:530px; top:12px; width:135px; height:17px; ">구문 안의 단어 :</caption>
- <input id="input1" ref="/root/send/sentense" class="input_search" style="left:655px; top:11px; width:160px; height:19px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:840px; top:10px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removenode("/root/main/awtlist");
- model.makeNode("/root/main/awtlist");
- model.refresh();
-
- if (!submit("TRZWT00100"))
- return;
-
- grd_awtlist.clearStatus();
-
- if (model.getValue("/root/send/sentensetype") == "W") {
- grd_awtlist.valueMatrix(0, 1) = "단어";
- grd_awtlist.colHidden(2) = true;
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.valueMatrix(0, 1) = "약어";
- grd_awtlist.colHidden(2) = false;
- cpt_usetxt.visible = true;
- }
- var cnt = getNodesetCount("/root/main/awtlist/item");
-
- if( cnt > 0 ){
- cpt_cnt.value = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
-
- grd_awtlist.resizeCells();
- model.refresh();
- ]]>
- </script>
- </button>
- <line id="line13" style="x1:831px; y1:10px; x2:831px; y2:31px; border-color:#ffe4bb; border-left-style:solid; "/>
- </group>
- <datagrid id="grd_awtlist" nodeset="/root/main/awtlist/item" allowuserresize="true" autoresize="true" autosizemouse="true" caption="단어^구문" colwidth="141, 611, 100, 100, 100" dataheight="25" defaultrows="0" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" tooltip="true" style="left:0px; top:74px; width:905px; height:590px; border-color:#808080; ">
- <col ref="keyword" type="input"/>
- <col ref="sentense" type="input"/>
- <col ref="sentensetype" type="input" visibility="hidden"/>
- <col ref="awttype" type="input" visibility="hidden"/>
- <col ref="userid" type="input" visibility="hidden"/>
- <col ref="awtseq" visibility="hidden"/>
- <col ref="backkeyword" visibility="hidden"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_awtlist.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- // 이미 입력되어있는 약어와 같은지 체크
- var keyword = model.getValue("/root/main/awtlist/item[" + grd_awtlist.row + "]/keyword");
- if( keyword != "" ){
- var NodeCnt = 0;
- for( var i = 1; i <= grd_awtlist.rows - grd_awtlist.fixedRows ; i++ ){
- if( keyword == model.getValue("/root/main/awtlist/item[" + i + "]/keyword") ){
- NodeCnt++;
- }
- }
-
- if( NodeCnt > 1 ){
- messageBox("[" + keyword + "] 동일한" + grd_awtlist.valueMatrix(0, 2) + "가 존재합니다." , "C999");
- model.setValue("/root/main/awtlist/item[" + grd_awtlist.row + "]/keyword", "");
- return;
- }
- }
- model.refresh();
- ]]>
- </script>
- </datagrid>
- <button id="button5" class="btn2_letter4" visibility="hidden" style="left:672px; top:46px; width:64px; height:19px; ">
- <caption>엑셀입력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("open", "", false);
- if(fileName==""){
- return;
- }
- grd_awtlist.loadExcel(fileName);
- grd_awtlist.deleteRow(1);
-
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter4" visibility="hidden" style="left:606px; top:46px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save",",",false,"excel","xls","All File(*.*)|*.*|Excel File(*.xls)|*.xls"); // 2009-07-01 엑셀저장 두번째 저장 실패 오류 확인 두번째 테스트
- if (fileName != "")
- {
- grd_awtlist.saveExcel(fileName);
- }
- ]]>
- </script>
- </button>
- <button id="button2" class="btn5_letter3" disabled="true" style="left:738px; top:46px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_awtlist.addRow();
- model.makeValue("/root/main/awtlist/item[" + grd_awtlist.row + "]/sentense", "구문을 \n입력해주세요.");
- grd_awtlist.editCell();
- ]]>
- </script>
- </button>
- <button id="button3" class="btn5_letter3" disabled="true" style="left:793px; top:46px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_awtlist.row;
- var rowStatus = grd_awtlist.rowStatus(row);
- if( rowStatus == 1 ){
- grd_awtlist.deleteRow(row);
- }else if( rowStatus == 0 ){
- grd_awtlist.rowStatus(row) = 4;
- }
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button4" class="btn4_letter2" disabled="true" style="left:850px; top:45px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var cnt = 0;
- for (var i = 1; i <= grd_awtlist.rows-grd_awtlist.fixedRows; i++) {
- cnt = 0;
- if (model.getValue("/root/send/sentensetype") == "W"){
- model.setValue("/root/main/awtlist/item[" + i + "]/sentense", model.getValue("/root/main/awtlist/item[" + i + "]/keyword"));
- }
- if(model.getValue("/root/send/sentensetype") == "S"){
- if( model.getValue("/root/main/awtlist/item[" + i + "]/keyword") == "" ){
- messageBox("빈 값으로 단어를 저장할 수 없습니다.【 " + i + "번째 】", "C999");
- return;
- }
- if( model.getValue("/root/main/awtlist/item[" + i + "]/sentense") == "" ){
- messageBox("빈 값으로 구문을 저장할 수 없습니다. \n【 " + i + "번째 단어 : " + model.getValue("/root/main/awtlist/item[" + i + "]/keyword") + " 】", "C999");
- return;
- }
- }
- model.setValue("/root/main/awtlist/item[" + i + "]/awttype", model.getValue("/root/send/awttype"));
- model.setValue("/root/main/awtlist/item[" + i + "]/sentensetype", model.getValue("/root/send/sentensetype"));
-
- for(var j = 1; j <= grd_awtlist.rows-grd_awtlist.fixedRows; j++){
- if( model.getValue("/root/main/awtlist/item[" + i + "]/keyword") == model.getValue("/root/main/awtlist/item[" + j + "]/keyword")){
- cnt++;
- }
- }
- if( cnt > 1 ){
- messageBox("[" + model.getValue("/root/main/awtlist/item[" + i + "]/keyword") + "] 동일한 " + grd_awtlist.valueMatrix(0, 2) + "가 존재합니다." , "C999");
- return;
- }
- }
-
- // if( messageBox("AWT 단어/구문을 저장","Q002") == 6){
- model.setValue("/root/save", grd_awtlist.getUpdateData());
- if (submit("TXZWT00200")) {
-
- alert("저장되었습니다.");
- btn_search.dispatch("DOMActivate");
- } else {
- alert("저장에 실패하였습니다.");
- return;
- }
- ]]>
- </script>
- </button>
- <caption id="caption5" style="left:15px; top:670px; width:260px; height:15px; font-weight:bold; color:#ff0000; ">셀내에서 한줄띄움은 Ctrl+Enter 입니다.</caption>
- <caption id="caption4" style="left:270px; top:670px; width:235px; height:15px; font-weight:bold; ">단어는 최대 2000개까지 표시됩니다.</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:905px; y2:70px; "/>
- <caption id="cpt_usetxt" style="left:5px; top:50px; width:515px; height:15px; font-weight:bold; color:#0000ff; ">※ 사용법 : 기록화면에서 약어를 입력하신 후 F10을 누르시면 구문이 COPY됩니다.</caption>
- <button id="button6" class="btn2_letter3" visibility="hidden" style="left:510px; top:46px; width:53px; height:19px; ">
- <caption>도움말</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- getHelpPage();
- ]]>
- </script>
- </button>
- <caption id="cpt_cnt" style="left:815px; top:670px; width:90px; height:15px; font-weight:bold; text-align:right; "/>
- <button id="button7" style="left:615px; top:670px; width:20px; height:10px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- getHelpPage();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|