123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?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="">
- <send>
- <srchdata>
- </srchdata>
- </send>
- <hidden>
- <message/>
- </hidden>
- <main>
- <smslist>
- <item>
- <useyn/>
- <cdnm/>
- <cdid/>
- <orgcdid/>
- <m>-</m>
- </item>
- </smslist>
- </main>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- function fAddRow(){
- grd_smsinfo.addRow(true);
- //hidden value 생성 (m 값을 i로 셋팅)
- model.makeValue("/root/main/smslist/item[" + (grd_smsinfo.rows - grd_smsinfo.fixedRows) + "]/m", "i");
- }
-
- //행삭제 or 삭제 mark
- function fDelRow(){
- var iRow = grd_smsinfo.row;
- if( grd_smsinfo.rowStatus(iRow) == 1 ){
- //신규 row는 바로 행삭제
- grd_smsinfo.deleteRow(iRow);
- }else if( grd_smsinfo.rowStatus(iRow) == 4 ){
- //삭제 falg를 갖는 row는 삭제 취소 및 m 값을 -로 셋팅
- grd_smsinfo.rowStatus(iRow) = 0;
- model.makeValue("/root/main/smslist/item[" + iRow + "]/m", "");
- }else{
- //그 외에는 모두 삭제 flag 처리 및 m 값을 d로 셋팅
- grd_smsinfo.rowStatus(iRow) = 4;
- model.makeValue("/root/main/smslist/item[" + iRow + "]/m", "d");
- }
- }
-
- //값 변경 시, 수정 mark
- function fSetRow(){
- var iRow = grd_smsinfo.row;
- if( model.getValue("/root/main/smslist/item[" + iRow + "]/m") != "i" ){
- //신규 row가 아닌 경우 m 값을 u로 셋팅
- grd_smsinfo.rowStatus(iRow) = 2;
- model.makeValue("/root/main/smslist/item[" + iRow + "]/m", "u");
- }
- }
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- submit("TRADT20601");
- model.refresh();
- ]]>
- </script>
- <submission id="TRADT20601" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main/smslist"/>
- <submission id="TXADT20601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/smslist" replace="instance" resultref="/root/hidden/message"/>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="500" pageheight="500">
- <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:211px; height:14px; ">외래 항암환자 방문 확인</caption>
- <group id="group1" scroll="auto" style="left:0px; top:17px; width:380px; height:27px; ">
- <button id="btn_save" class="btn4_letter2" style="left:320px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(!checkGridUpdate(grd_smsinfo))
- {
- alert("저장할 자료가 존재하지 않습니다.");
- return;
- }
-
- if(checkGridField(grd_smsinfo,"cdnm")==false)
- {
- alert("데이터중에 비어있는 필수필드가 있습니다.");
- return;
- }
- if(checkGridField(grd_smsinfo,"cdid")==false)
- {
- alert("데이터중에 비어있는 필수필드가 있습니다.");
- return;
- }
-
- //alert(update);
- if ( submit("TXADT20601") ) {
- //grd_smsinfo.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- submit("TRADT20601");
- //model.refresh();
- //changeNodeSet();
- }
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter3" style="left:211px; top:5px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fAddRow();
- ]]>
- </script>
- </button>
- <button id="button2" class="btn2_letter3" style="left:266px; top:5px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_smsinfo.selectedRows>0)
- fDelRow();
- ]]>
- </script>
- </button>
- </group>
- <datagrid id="grd_smsinfo" nodeset="/root/main/smslist/item" caption="사용유무^이름^전화번호^orgcdid^m" colsep="^" colwidth="75, 112, 169, 100, 100" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:45px; width:375px; height:190px; ">
- <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
- <col ref="cdnm" type="input"/>
- <col ref="cdid" type="input"/>
- <col ref="orgcdid" visibility="hidden"/>
- <col ref="m" visibility="hidden"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_smsinfo.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSetRow();
- ]]>
- </script>
- </datagrid>
- <line id="line1" class="line_1" style="x1:0px; y1:13px; x2:380px; y2:13px; "/>
- </xhtml:body>
- </xhtml:html>
|