123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361 |
- <?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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root>
- <main>
- <brgstinfo>
- <brgstlist>
- <rgstdd/>
- <minbrgstno/>
- <maxbrgstno/>
- <donkind/>
- <brgststocqty/>
- <cmtcnts/>
- <fstrgstrid/>
- </brgstlist>
- </brgstinfo>
- <brgstinfo1>
- <brgstdetl>
- <rgstdd/>
- <minbrgstno/>
- <maxbrgstno/>
- <donkind/>
- <brgststocqty/>
- <cmtcnts/>
- <iudgb/>
- </brgstdetl>
- </brgstinfo1>
- <popupendflag/>
- </main>
- <init>
- <cmbinfo>
- <payflagcd>
- <M0029>
- <cdid/>
- <cdnm/>
- </M0029>
- </payflagcd>
- </cmbinfo>
- </init>
- <send>
- <baseinfo>
- <sdate/>
- <tdate/>
- </baseinfo>
- <globalinstance>
- <instance1/>
- </globalinstance>
- </send>
- <hidden>
- <count/>
- </hidden>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- function readfunc(){
- btn_save.disabled = false;
- btn_upd.disabled = true;
- btn_del.disabled = true;
- ipt_rgstdd.disabled = false;
- model.removeNodeset("/root/main/brgstinfo/brgstlist");
- model.resetInstanceNode("/root/main/brgstinfo1/brgstdetl");
- model.setValue("/root/main/brgstinfo1/brgstdetl/iudgb", "I");
- if (submit("TRLBD01101")){
- }
- if (model.getValue("/root/main/brgstinfo/brgstlist[" + 1 + "]/rgstdd") == ""){
- model.removeNodeset("/root/main/brgstinfo/brgstlist");
- }
- model.refresh();
- }
- function readfunc1(){
- btn_save.disabled = true;
- btn_upd.disabled = false;
- btn_del.disabled = false;
- ipt_rgstdd.disabled = true;
- var irow = datagrid1.row;
- model.resetInstanceNode("/root/main/brgstinfo1/brgstdetl");
- model.setValue("/root/main/brgstinfo1/brgstdetl/rgstdd", model.getValue("/root/main/brgstinfo/brgstlist[" + irow + "]/rgstdd"));
- model.setValue("/root/main/brgstinfo1/brgstdetl/minbrgstno", model.getValue("/root/main/brgstinfo/brgstlist[" + irow + "]/minbrgstno"));
- model.setValue("/root/main/brgstinfo1/brgstdetl/maxbrgstno", model.getValue("/root/main/brgstinfo/brgstlist[" + irow + "]/maxbrgstno"));
- model.setValue("/root/main/brgstinfo1/brgstdetl/donkind", model.getValue("/root/main/brgstinfo/brgstlist[" + irow + "]/donkind"));
- model.setValue("/root/main/brgstinfo1/brgstdetl/cmtcnts", model.getValue("/root/main/brgstinfo/brgstlist[" + irow + "]/cmtcnts"));
- model.setValue("/root/main/brgstinfo1/brgstdetl/brgststocqty", model.getValue("/root/main/brgstinfo/brgstlist[" + irow + "]/brgststocqty"));
- model.setValue("/root/main/brgstinfo1/brgstdetl/iudgb", "U");
- model.refresh();
- }
- function fSaveData(){
- if (datacheck() == false){
- return;
- }
- //fCalcuqty();
- if(submit("TXLBD01101")){
- readfunc();
- }
- }
- function datacheck(){
- if (model.getValue("/root/main/brgstinfo1/brgstdetl/rgstdd") == ""){
- messageBox("입고일자는 필수 입력항목입니다.", "E999", "");
- return false;
- }
- if (isDate(model.getValue("/root/main/brgstinfo1/brgstdetl/rgstdd")) == false){
- messageBox("입고일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- var ibgstno1 = model.getValue("/root/main/brgstinfo1/brgstdetl/minbrgstno");
- var ibgstno2 = model.getValue("/root/main/brgstinfo1/brgstdetl/maxbrgstno");
- if (ibgstno1.length != 10){
- messageBox("Min 헌혈증번호는 10자리로 입력하셔야 합니다.", "E999", "");
- return false;
- }
- if (ibgstno2.length != 10){
- messageBox("Max 헌혈증번호는 10자리로 입력하셔야 합니다.", "E999", "");
- return false;
- }
- if (ibgstno1 > ibgstno2){
- messageBox("Min 헌혈증번호가 Max 헌혈증번호 보다 큽니다.", "E999", "");
- return false;
- }
- }
- function fCalcuqty(){
- var iqty1 = model.getValue("/root/main/brgstinfo1/brgstdetl/minbrgstno");
- var iqty2 = model.getValue("/root/main/brgstinfo1/brgstdetl/maxbrgstno");
- var iqty = parseFloat(iqty2) - parseFloat(iqty1) +1;
- if (iqty < 0){
- model.setValue("/root/main/brgstinfo1/brgstdetl/brgststocqty", 0);
- }else{
- model.setValue("/root/main/brgstinfo1/brgstdetl/brgststocqty", iqty);
- }
- model.refresh();
- }
- function isDate(str) { // 날짜 형식에 대한 적합여부 체크
- if (str == "") return true; // 빈건 체크안함
- if (trim(str) == "") return true; // 빈건 체크안함
- if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
- if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
-
- var yy = new Number(str.substring(0, 4));
- var mm = new Number(str.substring(4, 6)) - 1;
- var dd = new Number(str.substring(6, 8));
- var date = new Date(yy, mm, dd);
- //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
- if (yy != date.getFullYear() ||
- mm != date.getMonth() ||
- dd != date.getDate()) {
- return false; // 존재하지 않는 날짜
- }
-
- return true; // 존재하는 날짜
- }
- function trim(data){ // 문자에 대한 TRIM 작업
- return data.replace(/(^\s*)|(\s*$)/g, "");
- }
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" src="../../../com/userdeptinfoweb/js/ZSU001.js"/>
- <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //zbcfGetCodeList( new Array("M0029"), new Array("/root/init/cmbinfo/payflagcd"));
- readfunc();
- model.refresh();
- ]]>
- </script>
- <submission id="TRLBD01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/baseinfo" resultref="/root/main/brgstinfo"/>
- <submission id="TXLBD01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/brgstinfo1" resultref="/root/hidden"/>
- </model>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:224px; height:14px; ">헌혈증번호 관리</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
- <input id="input2" ref="/root/main/brgstinfo1/brgstdetl/maxbrgstno" navindex="3" format="99-99-999999" style="left:585px; top:669px; width:125px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fCalcuqty();
- ]]>
- </script>
- </input>
- <line id="line1" class="line_1" style="x1:0px; y1:65px; x2:1194px; y2:65px; "/>
- <button id="button2" class="btn2_letter2" style="left:1152px; top:44px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(file != "") {
- datagrid1.saveExcel(file);
- }
- ]]>
- </script>
- </button>
- <caption id="caption58" class="cell_1" style="left:0px; top:668px; width:100px; height:23px; vertical-align:middle; ">헌혈종류</caption>
- <caption id="caption1" class="cell_1" style="left:0px; top:692px; width:100px; height:23px; vertical-align:middle; ">비고사항</caption>
- <select1 id="combo1" ref="/root/main/brgstinfo1/brgstdetl/donkind" navindex="1" appearance="minimal" style="left:105px; top:669px; width:115px; height:19px; ">
- <choices>
- <item>
- <label>혈소판헌혈</label>
- <value>1</value>
- </item>
- <item>
- <label>백혈구헌혈</label>
- <value>2</value>
- </item>
- <item>
- <label>기타헌혈</label>
- <value>9</value>
- </item>
- </choices>
- </select1>
- <caption id="caption2" class="cell_1" style="left:230px; top:668px; width:105px; height:23px; vertical-align:middle; ">Min 헌혈증번호</caption>
- <caption id="caption3" class="cell_1" style="left:475px; top:668px; width:105px; height:23px; vertical-align:middle; ">Max 헌혈증번호</caption>
- <input id="input1" ref="/root/main/brgstinfo1/brgstdetl/minbrgstno" navindex="2" format="99-99-999999" style="left:340px; top:669px; width:125px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fCalcuqty();
- ]]>
- </script>
- </input>
- <caption id="caption4" class="cell_1" style="left:930px; top:668px; width:75px; height:23px; vertical-align:middle; ">입고일자</caption>
- <input id="ipt_rgstdd" ref="/root/main/brgstinfo1/brgstdetl/rgstdd" class="input_search" navindex="4" inputtype="date" format="yyyy-mm-dd" style="left:1010px; top:669px; width:125px; height:19px; text-align:center; "/>
- <input id="input3" ref="/root/main/brgstinfo1/brgstdetl/cmtcnts" navindex="5" style="left:105px; top:693px; width:1030px; height:19px; "/>
- <datagrid id="datagrid1" nodeset="/root/main/brgstinfo/brgstlist" caption="입고일자^Min 헌혈증 번호^Max 헌혈증 번호^헌혈구분^입고량^입고자^비고사항" colsep="^" colwidth="128, 144, 146, 120, 100, 80, 535" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:70px; width:1193px; height:565px; ">
- <col ref="rgstdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="minbrgstno" format="99-99-999999" style="text-align:center; "/>
- <col ref="maxbrgstno" format="99-99-999999" style="text-align:center; "/>
- <col disabled="true" ref="donkind" type="combo">
- <choices>
- <item>
- <label>혈소판헌혈</label>
- <value>1</value>
- </item>
- <item>
- <label>백혈구헌혈</label>
- <value>2</value>
- </item>
- <item>
- <label>기타헌혈</label>
- <value>9</value>
- </item>
- </choices>
- </col>
- <col ref="brgststocqty" format="#,###" style="text-align:center; "/>
- <col ref="fstrgstrid"/>
- <col ref="cmtcnts"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- datagrid1.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if ( (datagrid1.row >= datagrid1.fixedRows) && (datagrid1.isCell(event.target))) {
- readfunc1();
- }
- ]]>
- </script>
- </datagrid>
- <caption id="caption5" class="cell_1" style="left:720px; top:668px; width:75px; height:23px; vertical-align:middle; ">입고량</caption>
- <input id="input4" ref="/root/main/brgstinfo1/brgstdetl/brgststocqty" format="#,###" style="left:800px; top:669px; width:120px; height:19px; text-align:center; "/>
- <group id="group2" style="left:0px; top:5px; 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; "/>
- <line id="line11" class="line_4" style="x1:1114px; y1:7px; x2:1114px; y2:29px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1126px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- readfunc();
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption7" class="tit_2" style="left:5px; top:49px; width:131px; height:13px; ">헌혈증번호</caption>
- <line id="line8" class="line_2" style="x1:0px; y1:690px; x2:600px; y2:690px; "/>
- <caption id="caption19" class="tit_2" style="left:5px; top:648px; width:139px; height:14px; background-image:../../../com/commonweb/images/tit_bullet2.gif; ">헌혈증 상세</caption>
- <line id="line7" class="line_1" style="x1:0px; y1:663px; x2:1193px; y2:663px; "/>
- <line id="line2" class="line_2" style="x1:0px; y1:690px; x2:1193px; y2:690px; "/>
- <caption id="caption8" class="cell_1" style="left:0px; top:692px; width:100px; height:23px; vertical-align:middle; ">비고사항</caption>
- <caption id="caption9" class="cell_1" style="left:230px; top:668px; width:105px; height:23px; vertical-align:middle; ">Min 헌혈증번호</caption>
- <select1 id="combo2" ref="/root/main/brgstinfo1/brgstdetl/donkind" navindex="1" appearance="minimal" style="left:105px; top:669px; width:115px; height:19px; ">
- <choices>
- <item>
- <label>혈소판헌혈</label>
- <value>1</value>
- </item>
- <item>
- <label>백혈구헌혈</label>
- <value>2</value>
- </item>
- <item>
- <label>기타헌혈</label>
- <value>9</value>
- </item>
- </choices>
- </select1>
- <caption id="caption10" class="cell_1" style="left:475px; top:668px; width:105px; height:23px; vertical-align:middle; ">Max 헌혈증번호</caption>
- <caption id="caption11" class="cell_1" style="left:0px; top:668px; width:100px; height:23px; vertical-align:middle; ">헌혈종류</caption>
- <input id="input5" ref="/root/main/brgstinfo1/brgstdetl/minbrgstno" navindex="2" format="99-99-999999" style="left:340px; top:669px; width:125px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fCalcuqty();
- ]]>
- </script>
- </input>
- <line id="line3" class="line_3" style="x1:0px; y1:714px; x2:1193px; y2:714px; "/>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- <button id="btn_cre" class="btn4_letter2" disabled="true" navindex="9" visibility="hidden" style="left:1139px; top:3px; width:56px; height:22px; ">
- <caption>신규</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.resetInstanceNode("/root/main/brgstinfo1/brgstdetl");
- model.setValue("/root/main/brgstinfo1/brgstdetl/iudgb", "I");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_upd" class="btn4_letter2" disabled="true" navindex="7" style="left:1078px; top:3px; width:56px; height:22px; ">
- <caption>수정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveData();
- ]]>
- </script>
- </button>
- <button id="btn_del" class="btn4_letter2" disabled="true" navindex="8" style="left:1137px; top:3px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/main/brgstinfo1/brgstdetl/iudgb", "D");
- fSaveData();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" disabled="true" navindex="6" style="left:1018px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var rgstdd = model.getValue("/root/main/brgstinfo1/brgstdetl/rgstdd");
- var irow = datagrid1.findRow(rgstdd, 1, datagrid1.colRef("rgstdd"), false, false);
- if (irow > 0){
- messageBox("선택한 날짜에 등록된 자료가 존재합니다.", "E999", "");
- return;
- }
- fSaveData();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|