123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMPMB02400_병원달력관리.xrw
- * 설 명 : 병원일정을 관리한다.
- * 설 계 자 : 유정란
- * 작 성 자 : 유정란
- * 작 성 일 : 2007.12.24
- * 수정이력 :
- * 기 타 :
- -->
- <?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="">
- <main>
- <h_hsch>
- <hsch/>
- </h_hsch>
- </main>
- <send>
- <data1/>
- <data2/>
- <data3/>
- </send>
- <init/>
- <hidden>
- <year_q/>
- <month_q/>
- <year_c/>
- <month_c/>
- <session/>
- <rcv/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fGetUserInfosSampling();
- fReset();
- ]]>
- </script>
- <submission id="TRPMB02401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/h_hsch"/>
- <submission id="TXPMB02401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/rcv"/>
- </model>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript">
- <![CDATA[
- var il_evnt = 0;
- var is_flag;
-
- function fGetUserInfosSampling()
- {
- var sUserInfosS = getUserInfos();
-
- sUserInfosS = sUserInfosS + "|";
-
- var UserInfosS_Array = sUserInfosS.split("|");
-
- var userid = UserInfosS_Array[0]; //사용자번호
- var usernm = UserInfosS_Array[1]; //사용자이름
- var posinstcd = UserInfosS_Array[2]; //소속기관코드
- var posinstnm = UserInfosS_Array[3]; //소속기관명
- var posdeptcd = UserInfosS_Array[4]; //소속부서코드
- var posdeptnm = UserInfosS_Array[5]; //소속부서명
-
- model.makeNode("/root/hidden/session/sess_userid");
- model.makeNode("/root/hidden/session/sess_usernm");
- model.makeNode("/root/hidden/session/sess_posinstcd");
- model.makeNode("/root/hidden/session/sess_posinstnm");
- model.makeNode("/root/hidden/session/sess_posdeptcd");
- model.makeNode("/root/hidden/session/sess_posdeptnm")
-
- if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
- if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "012";
-
- model.setValue("/root/hidden/session/sess_userid",userid);
- model.setValue("/root/hidden/session/sess_usernm",usernm);
- model.setValue("/root/hidden/session/sess_posinstcd",posinstcd);
- model.setValue("/root/hidden/session/sess_posinstnm",posinstnm);
- model.setValue("/root/hidden/session/sess_posdeptcd",posdeptcd);
- model.setValue("/root/hidden/session/sess_posdeptnm",posdeptnm);
-
- model.refresh();
- }
-
- function fReset()
- {
- il_evnt = 0;
-
- model.removeNodeset("/root/main/h_hsch/hsch");
- grd_hsch.rebuild();
-
- fInit();
- }
-
- function fInit()
- {
- today = new Date();
-
- var ls_today, ls_year, ls_month, ls_day;
-
- ls_year = (today.getYear()).toString();
- ls_month = (today.getMonth() + 1).toString();
- if ((ls_month.toString()).length == 1) ls_month = ("0".concat(ls_month.toString()));
- ls_day = (today.getDate()).toString();
-
- ls_today = ((ls_year.concat(ls_month)).concat(ls_day));
- var s_year = ls_today.substr(0,4);
- var s_month = ls_today.substr(4,2);
-
- model.setValue("/root/hidden/year_q",s_year);
- model.setValue("/root/hidden/year_c","-");
- model.setValue("/root/hidden/month_q",s_month);
- model.setValue("/root/hidden/month_c","-");
- model.refresh();
- }
-
- function fCalendarRef()
- {
- var year_q = model.getValue("/root/hidden/year_q");
- var month_q = model.getValue("/root/hidden/month_q");
-
- if (year_q == null || year_q == "" || year_q == " " || year_q == "-")
- {
- messageBox("조회 년도를 정확히 선택하십시요!","E999","");
- return false;
- }
-
- if (month_q == null || month_q == "" || month_q == " " || month_q == "-")
- {
- messageBox("조회 월을 정확히 선택하십시요!","E999","");
- return false;
- }
-
- model.removeNodeset("/root/main/h_hsch/hsch");
-
- model.removenode("/root/send/data1");
- model.removenode("/root/send/data2");
- model.removenode("/root/send/data3");
- model.makeNode("/root/send/data1");
- model.makeNode("/root/send/data2");
- model.makeNode("/root/send/data3");
-
- model.setValue("/root/send/data1",model.getValue("/root/hidden/year_q"));
- model.setValue("/root/send/data2",model.getValue("/root/hidden/month_q"));
- model.setValue("/root/send/data3",model.getValue("/root/hidden/session/sess_userid"));
-
- submit("TRPMB02401");
-
- grd_hsch.rebuild();
- }
-
- function fCreate()
- {
- var ll_day_n;
- var ll_day_f;
- var ll_day_t;
- var ll_ins;
- var ll_day;
-
- var ls_date_c, ls_date_l, ls_date_n;
- var ls_duty, ls_amst, ls_amet, ls_pmst, ls_pmet;
-
- var rows = getNodesetCount("/root/main/h_hsch/hsch");
- if (rows > 0)
- {
- var result = messageBox("해당년월에 데이터존재합니다! 그래도 생성작업 진행","S001","");
- if (result != "6") return false;
- }
-
- model.removeNodeset("/root/main/h_hsch/hsch");
- grd_hsch.rebuild();
-
- il_evnt = 1;
-
- ls_date_c = model.getValue("/root/hidden/year_c") + '' + model.getValue("/root/hidden/month_c") + "01";
-
- var date_c = ls_date_c.toDate("YYYYMMDD");
-
- var date_n = date_c.getAddDate(31, "D");
- ls_date_n = (date_n.getDateFormat("YYYYMMDD")).substr(0,6) + "01";
-
- ll_day_f = 1;
-
- ls_date_n = ls_date_n.toDate("YYYYMMDD");
- ll_day_t = ls_date_n.getAddDate(-1, "D");
- ll_day_t = (ls_date_n.getDateFormat("YYYYMMDD")).substr(6,2);
-
- for(ll_day_f = 1; ll_day_f <= ll_day_t; ll_day_f++)
- {
- if (ll_day_f < 10) ls_date_l = ls_date_c.substr(0,6) + "0" + ll_day_f;
- else ls_date_l = ls_date_c.substr(0,6) + ll_day_f;
-
- ll_day_n = (ls_date_l.toDate("YYYYMMDD")).getDayOfWeek("N");
-
- switch(ll_day_n)
- {
- case '0' : //휴일
- ll_day = "8"; ls_duty = "Y";
- break;
- case '6' : //토요일
- ll_day = "4"; ls_duty = "Y";
- break;
- default : //평일
- ll_day = "0"; ls_duty = "Y";
- break;
- }
-
- grd_hsch.addItem();
- var currow = grd_hsch.row;
-
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_basedd",ls_date_l);
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_seqno","");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_instcd","");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_histstat","Y");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_dutflag",ll_day);
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_holinm","-");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_holiflag","0");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_ordyn",ls_duty);
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_fstrgstrid","");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_fstrgstdt","");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_lastupdtrid","");
- model.setValue("/root/main/h_hsch/hsch[" + currow + "]/hsch_lastupdtdt","");
- }
-
- //저장
- if (fSave() == false) return false;
- }
-
- function fSave()
- {
- if (getNodesetCount("/root/main/h_hsch/hsch") < 1)
- {
- messageBox("저장할 내역이 미존재합니다!","E999","");
- return false;
- }
-
- model.removenode("/root/send/data1");
- model.removenode("/root/send/data2");
- model.removenode("/root/send/data3");
- model.makeNode("/root/send/data1");
- model.makeNode("/root/send/data2");
- model.makeNode("/root/send/data3");
-
- model.copyNode("/root/send/data1","/root/hidden");
- model.setValue("/root/send/data2", grd_hsch.getUpdateData());
-
- //alert(model.getValue("/root/send/data2"));
- //return false;
-
- if (submit("TXPMB02401")) fCalendarRef();
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body>
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:240px; height:14px; ">병원달력관리</caption>
- <caption id="caption1" style="left:15px; top:20px; width:55px; height:20px; ">조회조건</caption>
- <caption id="caption2" style="left:145px; top:20px; width:15px; height:20px; ">년</caption>
- <caption id="caption3" style="left:240px; top:20px; width:15px; height:20px; ">월</caption>
- <button id="btn_search" class="btn1_letter2" style="left:275px; top:18px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fCalendarRef();
- ]]>
- </script>
- </button>
- <caption id="caption4" style="left:425px; top:20px; width:62px; height:20px; ">생성조건</caption>
- <caption id="caption5" style="left:555px; top:20px; width:15px; height:20px; ">년</caption>
- <caption id="caption7" style="left:650px; top:20px; width:15px; height:20px; ">월</caption>
- <select1 id="cmb_year1" ref="/root/hidden/year_q" appearance="minimal" style="left:75px; top:20px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>2003</label>
- <value>2003</value>
- </item>
- <item>
- <label>2004</label>
- <value>2004</value>
- </item>
- <item>
- <label>2005</label>
- <value>2005</value>
- </item>
- <item>
- <label>2006</label>
- <value>2006</value>
- </item>
- <item>
- <label>2007</label>
- <value>2007</value>
- </item>
- <item>
- <label>2008</label>
- <value>2008</value>
- </item>
- <item>
- <label>2009</label>
- <value>2009</value>
- </item>
- <item>
- <label>2010</label>
- <value>2010</value>
- </item>
- <item>
- <label>2011</label>
- <value>2011</value>
- </item>
- <item>
- <label>2012</label>
- <value>2012</value>
- </item>
- <item>
- <label>2013</label>
- <value>2013</value>
- </item>
- <item>
- <label>2014</label>
- <value>2014</value>
- </item>
- <item>
- <label>2015</label>
- <value>2015</value>
- </item>
- <item>
- <label>2016</label>
- <value>2016</value>
- </item>
- <item>
- <label>2017</label>
- <value>2017</value>
- </item>
- <item>
- <label>2018</label>
- <value>2018</value>
- </item>
- <item>
- <label>2019</label>
- <value>2019</value>
- </item>
- <item>
- <label>2020</label>
- <value>2020</value>
- </item>
- <item>
- <label>2021</label>
- <value>2021</value>
- </item>
- <item>
- <label>2022</label>
- <value>2022</value>
- </item>
- <item>
- <label>2023</label>
- <value>2023</value>
- </item>
- <item>
- <label>2024</label>
- <value>2024</value>
- </item>
- <item>
- <label>2025</label>
- <value>2025</value>
- </item>
- <item>
- <label>2026</label>
- <value>2026</value>
- </item>
- <item>
- <label>2027</label>
- <value>2027</value>
- </item>
- <item>
- <label>2028</label>
- <value>2028</value>
- </item>
- <item>
- <label>2029</label>
- <value>2029</value>
- </item>
- <item>
- <label>2030</label>
- <value>2030</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fCalendarRef();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_month1" ref="/root/hidden/month_q" appearance="minimal" style="left:170px; top:20px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>01</label>
- <value>01</value>
- </item>
- <item>
- <label>02</label>
- <value>02</value>
- </item>
- <item>
- <label>03</label>
- <value>03</value>
- </item>
- <item>
- <label>04</label>
- <value>04</value>
- </item>
- <item>
- <label>05</label>
- <value>05</value>
- </item>
- <item>
- <label>06</label>
- <value>06</value>
- </item>
- <item>
- <label>07</label>
- <value>07</value>
- </item>
- <item>
- <label>08</label>
- <value>08</value>
- </item>
- <item>
- <label>09</label>
- <value>09</value>
- </item>
- <item>
- <label>10</label>
- <value>10</value>
- </item>
- <item>
- <label>11</label>
- <value>11</value>
- </item>
- <item>
- <label>12</label>
- <value>12</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fCalendarRef();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_year2" ref="/root/hidden/year_c" appearance="minimal" style="left:485px; top:20px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>-</label>
- <value>-</value>
- </item>
- <item>
- <label>2003</label>
- <value>2003</value>
- </item>
- <item>
- <label>2004</label>
- <value>2004</value>
- </item>
- <item>
- <label>2005</label>
- <value>2005</value>
- </item>
- <item>
- <label>2006</label>
- <value>2006</value>
- </item>
- <item>
- <label>2007</label>
- <value>2007</value>
- </item>
- <item>
- <label>2008</label>
- <value>2008</value>
- </item>
- <item>
- <label>2009</label>
- <value>2009</value>
- </item>
- <item>
- <label>2010</label>
- <value>2010</value>
- </item>
- <item>
- <label>2011</label>
- <value>2011</value>
- </item>
- <item>
- <label>2012</label>
- <value>2012</value>
- </item>
- <item>
- <label>2013</label>
- <value>2013</value>
- </item>
- <item>
- <label>2014</label>
- <value>2014</value>
- </item>
- <item>
- <label>2015</label>
- <value>2015</value>
- </item>
- <item>
- <label>2016</label>
- <value>2016</value>
- </item>
- <item>
- <label>2017</label>
- <value>2017</value>
- </item>
- <item>
- <label>2018</label>
- <value>2018</value>
- </item>
- <item>
- <label>2019</label>
- <value>2019</value>
- </item>
- <item>
- <label>2020</label>
- <value>2020</value>
- </item>
- <item>
- <label>2021</label>
- <value>2021</value>
- </item>
- <item>
- <label>2022</label>
- <value>2022</value>
- </item>
- <item>
- <label>2023</label>
- <value>2023</value>
- </item>
- <item>
- <label>2024</label>
- <value>2024</value>
- </item>
- <item>
- <label>2025</label>
- <value>2025</value>
- </item>
- <item>
- <label>2026</label>
- <value>2026</value>
- </item>
- <item>
- <label>2027</label>
- <value>2027</value>
- </item>
- <item>
- <label>2028</label>
- <value>2028</value>
- </item>
- <item>
- <label>2029</label>
- <value>2029</value>
- </item>
- <item>
- <label>2030</label>
- <value>2030</value>
- </item>
- </choices>
- </select1>
- <select1 id="cmb_month2" ref="/root/hidden/month_c" appearance="minimal" style="left:580px; top:20px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>-</label>
- <value>-</value>
- </item>
- <item>
- <label>01</label>
- <value>01</value>
- </item>
- <item>
- <label>02</label>
- <value>02</value>
- </item>
- <item>
- <label>03</label>
- <value>03</value>
- </item>
- <item>
- <label>04</label>
- <value>04</value>
- </item>
- <item>
- <label>05</label>
- <value>05</value>
- </item>
- <item>
- <label>06</label>
- <value>06</value>
- </item>
- <item>
- <label>07</label>
- <value>07</value>
- </item>
- <item>
- <label>08</label>
- <value>08</value>
- </item>
- <item>
- <label>09</label>
- <value>09</value>
- </item>
- <item>
- <label>10</label>
- <value>10</value>
- </item>
- <item>
- <label>11</label>
- <value>11</value>
- </item>
- <item>
- <label>12</label>
- <value>12</value>
- </item>
- </choices>
- </select1>
- <datagrid id="grd_hsch" nodeset="/root/main/h_hsch/hsch" caption="기준일자^일련번호^기관코드^이력상태^근무구분^공휴일명칭^휴일구분^진료여부^최초등록자^caption1^최초등록일시^최종수정자^caption2^최종수정일시" colsep="^" colwidth="83, 59, 56, 53, 76, 144, 69, 69, 87, 100, 157, 85, 100, 160" mergecellsfixedrows="bycolrec" rowsep="|" style="left:10px; top:41px; width:935px; height:740px; ">
- <col ref="hsch_basedd" format="yyyy-mm-dd"/>
- <col ref="hsch_seqno" visibility="hidden"/>
- <col ref="hsch_instcd" visibility="hidden"/>
- <col ref="hsch_histstat" visibility="hidden"/>
- <col ref="hsch_dutflag" type="combo">
- <choices>
- <item>
- <label>평일</label>
- <value>0</value>
- </item>
- <item>
- <label>토요일</label>
- <value>4</value>
- </item>
- <item>
- <label>휴일</label>
- <value>8</value>
- </item>
- </choices>
- </col>
- <col ref="hsch_holinm" type="input"/>
- <col ref="hsch_holiflag" type="combo">
- <choices>
- <item>
- <label>평일</label>
- <value>0</value>
- </item>
- <item>
- <label>법정공휴일</label>
- <value>1</value>
- </item>
- <item>
- <label>기타</label>
- <value>2</value>
- </item>
- </choices>
- </col>
- <col ref="hsch_ordyn" type="combo">
- <choices>
- <item>
- <label>Yes</label>
- <value>Y</value>
- </item>
- <item>
- <label>No</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col ref="hsch_fstrgstrnm"/>
- <col ref="hsch_fstrgstrid" visibility="hidden"/>
- <col ref="hsch_fstrgstdt" format="yyyy-mm-dd-hh:nn:ss"/>
- <col ref="hsch_lastupdtrnm"/>
- <col ref="hsch_lastupdtrid" visibility="hidden"/>
- <col ref="hsch_lastupdtdt" format="yyyy-mm-dd-hh:nn:ss"/>
- </datagrid>
- <button id="btn_create" class="btn4_letter4" style="left:695px; top:18px; width:80px; height:22px; ">
- <caption>달력생성</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var year_c = model.getValue("/root/hidden/year_c");
- var month_c = model.getValue("/root/hidden/month_c");
-
- if (year_c == null || year_c == "" || year_c == " " || year_c == "-")
- {
- messageBox("생성 년도를 정확히 선택하십시요!","E999","");
- return;
- }
-
- if (month_c == null || month_c == "" || month_c == " " || month_c == "-")
- {
- messageBox("생성 월을 정확히 선택하십시요!","E999","");
- return;
- }
-
- var result = messageBox("달력생성","S001","");
-
- if (result == "6")
- {
- model.setValue("/root/hidden/year_q",year_c);
- model.setValue("/root/hidden/month_q",month_c);
- model.refresh();
-
- fCalendarRef();
-
- fCreate();
- }
- else return;
- ]]>
- </script>
- </button>
- <button id="btn_updt" class="btn4_letter4" style="left:865px; top:18px; width:80px; height:22px; ">
- <caption>달력수정</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fSave();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|