123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413 |
- <?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>
- <rsrvupdtinfo>
- <rsrvupdt>
- <rsrvupdtfromdd/>
- <rsrvupdtfromtm/>
- <rsrvupdttodd/>
- <rsrvupdttotm/>
- <updtresndesc/>
- <updtresncnts/>
- <excuroomcd/>
- <suppdeptcd/>
- <ioflag/>
- </rsrvupdt>
- </rsrvupdtinfo>
- </main>
- <init>
- <cmb_info>
- <initexecroom>
- <excuroomcdid/>
- <excuroomcdnm/>
- </initexecroom>
- <suppdept>
- <suppdeptcd/>
- <depthngnm/>
- </suppdept>
- </cmb_info>
- </init>
- <send>
- <baseinfo>
- <excuroomcd/>
- <suppdeptcd/>
- <sdate/>
- <tdate/>
- </baseinfo>
- <execdata>
- <rsrvupdt/>
- </execdata>
- <globalinstance>
- <instance1/>
- </globalinstance>
- </send>
- <hidden>
- <count/>
- </hidden>
- <init2>
- <cmb_info2>
- <initexcuroomcd>
- <excuroomcdnm/>
- <excuroomcdid/>
- </initexcuroomcd>
- </cmb_info2>
- </init2>
- <send1>
- <suppdeptcd/>
- <excuroomcd/>
- <gb/>
- <instance1/>
- </send1>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- function readfunc(){
- if (model.getValue("/root/send/baseinfo/sdate") == ""){
- messageBox("조회 시작일자는 필수 입력항목입니다.", "E999", "");
- return;
- }
- if (isDate(model.getValue("/root/send/baseinfo/sdate")) == false){
- messageBox("조회 시작일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return;
- }
- if (model.getValue("/root/send/baseinfo/tdate") == ""){
- messageBox("조회 종료일자는 필수 입력항목입니다.", "E999", "");
- return;
- }
- if (isDate(model.getValue("/root/send/baseinfo/tdate")) == false){
- messageBox("조회 종료일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return;
- }
- if (model.getValue("/root/send/baseinfo/sdate") == model.getValue("/root/send/baseinfo/tdate")){
- messageBox("조회 시작일자가 종료일자 보다 큽니다.", "E999", "");
- return;
- }
- model.removeNodeset("/root/main/rsrvupdtinfo/rsrvupdt");
- model.setValue("/root/send/baseinfo/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
- if (submit("TRAEA00701")){
- }
- model.refresh();
- }
- function fSaveData() {
- for (var i = 1; i < datagrid2.rows; i++){
- var fromdt = model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromdd");
- var fromtm = model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromtm");
- var todt = model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdttodd");
- var totm = model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdttotm");
- if (fromdt == ""){
- messageBox(i + "번째 시작일시의 일자는 필수 입력 또는 선택 항목입니다. ", "E999", "");
- return;
- }
- if (fromtm == ""){
- messageBox(i + "번째 시작일시의 시간은 필수 입력 항목입니다. ", "E999", "");
- return;
- }
- if(!isValidDateTime(fromtm, "hhmm")) {
- messageBox(i + "번째 휴무 시작 시간형식이 정확하지 않습니다.", "E999", "");
- return;
- }
- if (todt == ""){
- messageBox(i + "번째 종료일시의 일자는 필수 입력 또는 선택 항목입니다. ", "E999", "");
- return;
- }
- if (totm == ""){
- messageBox(i + "번째 종료일시의 시간은 필수 입력 항목입니다. ", "E999", "");
- return;
- }
- if(!isValidDateTime(totm, "hhmm")) {
- messageBox(i + "번째 휴무 종료 시간형식이 정확하지 않습니다.", "E999", "");
- return;
- }
- if ((fromdt + fromtm) > (todt + totm)){
- messageBox(i + "번째 시작일시가 종료일시 보다 큽니다.", "E999", "");
- return;
- }
- }
- var mindate = model.getValue("/root/send/baseinfo/sdate");
- var maxdate = model.getValue("/root/send/baseinfo/tdate");
- for (var i = 1; i < datagrid2.rows; i++){
- if (mindate > model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromdd")){
- mindate = model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromdd");
- }
- if (maxdate < model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromdd")){
- maxdate = model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromdd");
- }
- }
- var update = getGridUpdateData(datagrid2);
- model.setValue("/root/send/execdata/rsrvupdt",update);
- //setAlertOn();
- if(submit("TXAEA00701")){
- model.setValue("/root/send/baseinfo/sdate", mindate);
- model.setValue("/root/send/baseinfo/tdate", maxdate);
- readfunc();
- }
- }
- 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>
- <submission id="TRZBC00101"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- aezfSetSuppDeptcd();
-
- //검사실코드 갖고오기
- submit("TRAEA01301", false);
-
- if( instance1.selectSingleNode("/root/init/cmb_info/suppdept[suppdeptcd='" + model.getValue("/root/send/globalinstance/instance1") + "']") == null ){
- caption15.visible = true;
- cmb_deptcd.visible = true;
- btn_grdadd.disabled = true;
- btn_grddel.disabled = true;
- btn_save.disabled = true;
- }else{
- caption15.visible = false;
- cmb_deptcd.visible = false;
- btn_grdadd.disabled = false;
- btn_grddel.disabled = false;
- btn_save.disabled = false;
- }
-
- //2011.08.10 해당부서,검사실 디폴트셋팅 - 박재영
- var suppdept = model.getValue("/root/send1/instance1");
- // if(suppdept != null || suppdept != ""){
- // alert(suppdept);
- // var excuroomcd= model.getValue("/root/send1/excuroomcd");
- // model.setValue("/root/send/globalinstance/instance1",suppdept);
- // model.setValue("/root/send/baseinfo/excuroomcd",excuroomcd);
- // //검사실코드 갖고오기
- // submit("TRAEA01301", false);
- // }
- if(suppdept == null || suppdept == ""){
- //alert("aa");
- }else{
- //alert("bb");
- var excuroomcd= model.getValue("/root/send1/excuroomcd");
- model.setValue("/root/send/globalinstance/instance1",suppdept);
- model.setValue("/root/send/baseinfo/excuroomcd",excuroomcd);
- //검사실코드 갖고오기
- submit("TRAEA01301", false);
- }
-
- model.removeNodeset("/root/main/rsrvupdtinfo/rsrvupdt");
- model.setValue("/root/send/baseinfo/sdate", getCurrentDate());
- var date = getCurrentDate().toDate().getAddDate(1,"M").getDateFormat("YYYYMMDD");
- model.setValue("/root/send/baseinfo/tdate", date);
- //*********************************************************************************************************************************************
- //담당 검사실 갖고오기
- submit("TRAEA01115",false);
-
- //담당 검사실 세팅 2011.08.10 주석처리 - 박재영
- //model.setValue("/root/send/baseinfo/excuroomcd",model.getValue("/root/init2/cmb_info/initexcuroomcd[1]/excuroomcd"));
- //*********************************************************************************************************************************************
-
-
- model.refresh();
- ]]>
- </script>
- <submission id="TRAEA01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance" replace="instance" resultref="/root/init/cmb_info"/>
- <submission id="TRAOA01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/excuprcplist"/>
- <submission id="TRAEA00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/baseinfo" resultref="/root/main/rsrvupdtinfo"/>
- <submission id="TXAEA00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/execdata" resultref="/root/hidden"/>
- <submission id="TRAEA01115" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance" replace="instance" resultref="/root/init2/cmb_info"/>
- </model>
- <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"/>
- </xhtml:head>
- <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1095px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:142px; height:14px; ">검사실 휴검관리</caption>
- </group>
- <line id="line3" class="line_2" style="x1:5px; y1:47px; x2:289px; y2:47px; "/>
- <line id="line1" class="line_2" style="x1:5px; y1:73px; x2:289px; y2:73px; "/>
- <group id="group3" scroll="auto" style="left:0px; top:18px; width:1095px; height:722px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1080px; height:40px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:2px; width:1073px; height:38px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption5" class="search_name" style="left:540px; top:12px; width:86px; height:17px; ">조회일자</caption>
- <caption id="caption7" style="left:729px; top:10px; width:20px; height:20px; vertical-align:middle; ">~</caption>
- <input id="input4" ref="/root/send/baseinfo/tdate" class="input_search" navindex="4" inputtype="date" style="left:745px; top:12px; width:102px; height:19px; text-align:center; "/>
- <input id="input6" ref="/root/send/baseinfo/sdate" class="input_search" navindex="3" inputtype="date" style="left:626px; top:12px; width:100px; height:19px; text-align:center; "/>
- <button id="btn_sea" class="btn1_letter2" navindex="5" style="left:1010px; top:10px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- readfunc();
- ]]>
- </script>
- </button>
- <select1 id="combo2" ref="/root/send/baseinfo/excuroomcd" class="combo_search" navindex="1" appearance="minimal" editmode="inputsearch" style="left:90px; top:12px; width:205px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_info/initexecroom">
- <label ref="excuroomcdnm"/>
- <value ref="excuroomcdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- readfunc();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_deptcd" ref="/root/send/globalinstance/instance1" navindex="2" appearance="minimal" editmode="inputsearch" style="left:405px; top:12px; width:120px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_info/suppdept">
- <label ref="depthngnm"/>
- <value ref="suppdeptcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.removeNodeset("/root/main/rsrvupdtinfo/rsrvupdt");
- model.setValue("/root/send/globalinstance/instance1", cmb_deptcd.value);
- model.setValue("/root/send/baseinfo/excuroomcd", "");
- submit("TRAEA01301", false);
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="caption1" class="search_name" style="left:10px; top:12px; width:73px; height:17px; ">검사실 :</caption>
- <caption id="caption15" class="search_name" style="left:315px; top:12px; width:86px; height:17px; ">지원부서 :</caption>
- <line id="line13" class="line_4" style="x1:1004px; y1:8px; x2:1004px; y2:35px; "/>
- </group>
- <datagrid id="datagrid2" nodeset="/root/main/rsrvupdtinfo/rsrvupdt" caption="검사실명^최종변경자^시작일시^시작일시^종료일시^종료일시^사유^Remark^최종변경일시^부서코드^ioflag^지원부서코드^입원외래구분" colsep="^" colwidth="143, 71, 90, 48, 90, 48, 458, 317, 116, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" navindex="8" style="left:0px; top:79px; width:1075px; height:641px; ">
- <col ref="excuroomcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/cmb_info/initexecroom">
- <label ref="excuroomcdnm"/>
- <value ref="excuroomcdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="lastupdtrid" style="text-align:center; "/>
- <col disabled="true" ref="rsrvupdtfromdd" type="inputdate" style="text-align:center; "/>
- <col disabled="true" ref="rsrvupdtfromtm" type="input" format="hh:nn" style="text-align:center; "/>
- <col disabled="true" ref="rsrvupdttodd" type="inputdate" style="text-align:center; "/>
- <col disabled="true" ref="rsrvupdttotm" type="input" format="hh:nn" style="text-align:center; "/>
- <col ref="updtresndesc" type="input"/>
- <col ref="updtresncnts" type="input"/>
- <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
- <col ref="suppdeptcd" visibility="hidden"/>
- <col ref="ioflag" visibility="hidden"/>
- <script type="javascript" ev:event="DOMFocusIn">
- <![CDATA[
- checkKeyColumn("datagrid2");
- ]]>
- </script>
- </datagrid>
- <caption id="caption8" class="tit_2" style="left:0px; top:60px; width:82px; height:13px; ">변경내역</caption>
- <line id="line7" class="line_1" style="x1:0px; y1:75px; x2:1075px; y2:75px; "/>
- <button id="btn_grddel" class="btn2_letter3" navindex="7" style="left:957px; top:55px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- datagrid2.deleteRow(datagrid2.row);
- ]]>
- </script>
- </button>
- <button id="btn_grdadd" class="btn2_letter3" navindex="6" style="left:903px; top:55px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (model.getValue("/root/send/baseinfo/excuroomcd") == ""){
- messageBox("검사실을 선택한 후 처리하시기 바랍니다.", "E999", "");
- return;
- }
- datagrid2.addRow(false);
- model.setValue("/root/main/rsrvupdtinfo/rsrvupdt[" + datagrid2.row + "]/excuroomcd", model.getValue("/root/send/baseinfo/excuroomcd"));
- model.setValue("/root/main/rsrvupdtinfo/rsrvupdt[" + datagrid2.row + "]/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
- model.setValue("/root/main/rsrvupdtinfo/rsrvupdt[" + datagrid2.row + "]/ioflag", "-");
- model.setValue("/root/main/rsrvupdtinfo/rsrvupdt[" + datagrid2.row + "]/updtresncnts","-");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_savexls" class="btn2_letter4" style="left:1011px; top:55px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var period = model.getValue("/root/send/baseinfo/sdate") + "-" + model.getValue("/root/send/baseinfo/tdate");
- var filename = window.fileDialog("save", ",", false, "검사실 휴검 내역_" + period, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
-
- datagrid2.saveExcel(filename, "sheetname:휴검내역;colhiddenextend:false;rowhiddenextend:false;col_1:label;");
-
- messageBox("엑셀 저장이 완료되었습니다.", "I999");
- ]]>
- </script>
- </button>
- </group>
- <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:745px; width:56px; height:22px; ">
- <caption>출력</caption>
- </button>
- <button id="btn_save" class="btn1_letter2" navindex="9" style="left:1020px; top:745px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for (var i = 1; i < datagrid2.rows; i ++){
- if(model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromtm") == ""){
- messageBox("종료시간을", "C001");
- return;
- }
- if(model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdttodd")== ""){
- messageBox("종료일자를", "C001");
- return;
- }
- if(model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdttotm")== ""){
- messageBox("시작시간을", "C001");
- return;
- }
- if(model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/rsrvupdtfromdd")== ""){
- messageBox("시작일자를", "C001");
- return;
- }
- if(model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/updtresndesc")== ""){
- messageBox("사유를", "C001");
- return;
- }
-
- if(model.getValue("/root/main/rsrvupdtinfo/rsrvupdt[" + i + "]/updtresncnts")== ""){
- messageBox("Remark을", "C001");
- return;
- }
- }
-
- fSaveData();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|