123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>
- <envestblist>
- <qestuseflag/>
- <qestkindcd/>
- <qestnm/>
- <qestremfact/>
- <qestcd/>
- <qestclscd/>
- </envestblist>
- <envestbanswlist>
- <answval/>
- <baseanswvalflag/>
- <answvalnm/>
- <qestcd/>
- <qestclscd/>
- <answvalold/>
- </envestbanswlist>
- <qestclscd>D</qestclscd>
- </main>
- <send>
- <qestclscd/>
- <qestcd/>
- <envestb/>
- <envestbansw/>
- </send>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize ();
- ]]>
- </script>
- <submission id="TRMMB01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/envestblist"/>
- <submission id="TXMMB01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TRMMB01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/envestbanswlist"/>
- <submission id="TXMMB01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript">
- <![CDATA[
- // 화면 open, 저장시 초기화 기능을 수행한다.
- function fInitialize() {
-
- //환경설정 list 조회
- model.setValue ( "/root/send/qestclscd", cmb_qestclscd.value);
- submit( "TRMMB01201" );
-
- //1번째 환경설정 답안 조회
- model.setValue ( "/root/send/qestcd", model.getValue( "/root/main/envestblist[1]/qestcd" ));
- submit ( "TRMMB01202" );
-
- //1번째 환경설정 답안이 기본 선택으로 함
- grd_envestblist.row = 1; // 첫번째 row 선택
-
- }
-
- // 필수항목 체크
- function fCheckSave() {
- var count = 0;
- if (grd_envestbanswlist.rows < 1) {
- messageBox ( "저장할 답안이", "I004" );
- return false;
- }
-
- for ( i=1; i < grd_envestbanswlist.rows; i++ ) {
-
- if (model.getValue( "/root/main/envestbanswlist[" + i + "]/answval") == "" ) {
- messageBox ( "답안코드값이", "I004" );
- return false;
- } else if (model.getValue( "/root/main/envestbanswlist[" + i + "]/answval").length > 2) {
- messageBox ( "답안코드는 2", "E015" );
- return false;
- }
-
- if (model.getValue( "/root/main/envestbanswlist[" + i + "]/baseanswvalflag") == "Y") {
- count++;
- }
- }
- if ( count >1 ) {
- messageBox ( "기본답안은 1", "E015" );
- return false;
- } else if ( count < 1 ) {
- messageBox ( "기본답안이", "E014" );
- return false;
- }
- }
-
- function fDeleteSelectedRows(grd,markonly) {
- var rowIdx;
- if (grd.selectedRows > 0) {
- var selectedRows = Array(grd.selectedRows);
- for(i=0;i<grd.selectedRows;i++) {
- selectedRows[i] = grd.selectedRow(i);
- }
- if (markonly != null && markonly == true) { // mark delete
- for(i=selectedRows.length-1;i>=0;i--) {
- rowIdx = selectedRows[i];
- if(grd.rowstatus(rowIdx) == 1 ) { // just inserted row
- grd.deleterow(rowIdx,false);
- } else {
- grd.addStatus(rowIdx,"delete");
- }
- }
- } else {
- for(i=selectedRows.length-1;i>=0;i--) {
- rowIdx = selectedRows[i];
- grd.deleterow(rowIdx,false);
- }
- }
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="2,0;1,5;1,1194;2,11;1,6;1,1218;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:0px; width:1195px; height:784px; ">
- <group id="group2" style="left:0px; top:0px; width:1195px; height:784px; vertical-align:top; ">
- <line id="line9" class="line_3" style="x1:0px; y1:784px; x2:1194px; y2:784px; "/>
- <line id="line2" class="line_3" style="x1:0px; y1:780px; x2:747px; y2:780px; "/>
- <caption id="caption22" class="tit_2" style="left:6px; top:22px; width:113px; height:13px; ">환경설정 리스트</caption>
- <caption id="caption1" class="tit_2" style="left:755px; top:23px; width:87px; height:13px; ">답안 리스트</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:40px; x2:747px; y2:40px; "/>
- <button id="button10" class="btn2_letter2" style="left:1139px; top:18px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (fCheckSave() == false) {
- return;
- }
-
- model.setValue("/root/send/envestbansw", grd_envestbanswlist.getUpdateData());
- //저장전 질문코드를 담아 놓아서 저장후 조회에 사용한다.
- model.setValue("/root/send/qestcd", model.getValue( "/root/main/envestbanswlist[1]/qestcd"));
-
- if ( submit("TXMMB01202")) {
- model.setValue ( "/root/send/qestcd", model.getValue( "/root/main/envestblist[" +grd_envestblist.row+"]/qestcd" ));
- submit ( "TRMMB01202" );
- }
- ]]>
- </script>
- </button>
- <line id="line3" class="line_1" style="x1:750px; y1:40px; x2:1183px; y2:40px; "/>
- <line id="line4" class="line_3" style="x1:750px; y1:780px; x2:1183px; y2:780px; "/>
- <button id="button1" class="btn2_letter2" style="left:703px; top:18px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.setValue("/root/send/envestb", grd_envestblist.getUpdateData());
- if ( submit("TXMMB01201") ) {
- fInitialize();
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_envestblist" nodeset="/root/main/envestblist" visibility="visible" caption="사용여부^종류^환경설정 질문^질문참고사항^질문코드^질문분류코드" colsep="^" colwidth="55, 70, 300, 300, 0, 0" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:45px; width:748px; height:734px; text-align:center; ">
- <col disabled="false" ref="qestuseflag" type="combo">
- <choices>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- <item>
- <label>N</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col imemode="alpha" ref="qestkindcd" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>공통</label>
- <value>00</value>
- </item>
- <item>
- <label>처방</label>
- <value>10</value>
- </item>
- <item>
- <label>진단</label>
- <value>20</value>
- </item>
- <item>
- <label>기록</label>
- <value>30</value>
- </item>
- </choices>
- </col>
- <col imemode="hangul" ref="qestnm" type="input" style="text-align:center; "/>
- <col imemode="hangul" ref="qestremfact" type="input"/>
- <col ref="qestcd"/>
- <col ref="qestclscd"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if ( grd_envestblist.row != 0 && event.target != "grd_envestblist" ) {
- model.setValue ( "/root/send/qestcd", model.getValue( "/root/main/envestblist[" + grd_envestblist.row + "]/qestcd" ));
- submit ( "TRMMB01202" );
- }
- ]]>
- </script>
- </datagrid>
- <button id="button52" class="btn2_letter3" style="left:593px; top:18px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( (grd_envestblist.rows - 1) > 0 ) {
- grd_envestblist.insertrow(1);
- } else {
- grd_envestblist.addRow(false);
- grd_envestblist.refresh();
- }
- model.setValue ( "/root/main/envestblist[1]/qestclscd", cmb_qestclscd.value );
- model.setValue ( "/root/main/envestblist[1]/qestuseflag", "Y" );
- model.setValue ( "/root/main/envestblist[1]/qestkindcd", "10" );
- ]]>
- </script>
- </button>
- <button id="button2" class="btn2_letter3" style="left:648px; top:18px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDeleteSelectedRows(grd_envestblist, true);
- grd_envestblist.refresh();
-
- ]]>
- </script>
- </button>
- <button id="button3" class="btn2_letter3" style="left:1029px; top:18px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_envestblist.row != 0 && grd_envestblist.row != -1){
- var gestcd = model.getValue("/root/main/envestblist[" + grd_envestblist.row + "]/qestcd");
-
- grd_envestbanswlist.addRow(true, true);
- grd_envestbanswlist.col = grd_envestbanswlist.colRef("answval");
- grd_envestbanswlist.editCell();
-
- var checkval = model.getValue("/root/main/envestbanswlist[baseanswvalflag='Y'/baseanswvalflag");
- if(checkval == "Y"){
- model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/baseanswvalflag", "N");
- }else{
- model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/baseanswvalflag", "Y");
- }
- model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/qestcd", gestcd);
- model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/qestclscd", cmb_qestclscd.value);
- }else{
- messageBox("선택된 질문이", "I004");
- return;
- }
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter3" style="left:1084px; top:18px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDeleteSelectedRows(grd_envestbanswlist, true);
- grd_envestbanswlist.refresh();
-
- ]]>
- </script>
- </button>
- <select1 id="cmb_qestclscd" ref="/root/main/qestclscd" appearance="minimal" style="left:140px; top:19px; width:100px; height:19px; ">
- <choices>
- <item>
- <label>의사</label>
- <value>D</value>
- </item>
- <item>
- <label>간호사</label>
- <value>N</value>
- </item>
- <item>
- <label>기타</label>
- <value>E</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInitialize()
- ]]>
- </script>
- </select1>
- <datagrid id="grd_envestbanswlist" nodeset="/root/main/envestbanswlist" caption="코드^기본답안^답안명^질문코드^질문분류코드^답안코드old" colsep="^" colwidth="60, 60, 290, 0, 0, 0" defaultrows="0" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:750px; top:45px; width:433px; height:734px; ">
- <col ref="answval" type="input" style="text-align:center; "/>
- <col ref="baseanswvalflag" type="combo" style="text-align:center; vertical-align:top; ">
- <choices>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- <item>
- <label>N</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col ref="answvalnm" type="input" style="text-align:center; "/>
- <col ref="qestcd"/>
- <col ref="qestclscd"/>
- <col ref="answvalold" type="output"/>
- </datagrid>
- </group>
- <caption id="cpt_title" class="tit_1" style="left:0px; top:0px; width:163px; height:14px; ">환경설정 등록</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|