317 lines
11 KiB
Plaintext
317 lines
11 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<%
|
|
if request("s_type") = "" then
|
|
s_type = 1
|
|
else
|
|
s_type = request("s_type")
|
|
end if
|
|
s_r_date = request("condate")
|
|
x = request("x")
|
|
|
|
dim tmp_s_type(5,2)
|
|
|
|
tmp_s_type(1,1) = "1"
|
|
tmp_s_type(1,2) = "(KRI)1번 사용인감"
|
|
|
|
tmp_s_type(2,1) = "2"
|
|
tmp_s_type(2,2) = "(KRI)2번 사용인감"
|
|
|
|
tmp_s_type(3,1) = "3"
|
|
tmp_s_type(3,2) = "(KRI)3번 사용인감"
|
|
|
|
tmp_s_type(4,1) = "4"
|
|
tmp_s_type(4,2) = "(KRC)1번 사용인감"
|
|
|
|
tmp_s_type(5,1) = "5"
|
|
tmp_s_type(5,2) = "(KRC)2번 사용인감"
|
|
%>
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1>사용인감 반출 예약</h1>
|
|
</div>
|
|
<!-- /.content-header -->
|
|
<!-- Main content -->
|
|
<div class="content-body">
|
|
<div class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<form name="seal" method="post">
|
|
<input type="hidden" name="s_type" value="<%=s_type%>">
|
|
<input type="hidden" name="s_r_date" value="<%=s_r_date%>">
|
|
<input type="hidden" name="tmp_scode" value="<%=tmp_scode%>">
|
|
<input type="hidden" name="st_posi">
|
|
<input type="hidden" name="ed_posi">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class='font-weight-bold' style='font-size:16px;'>날짜 : <%=s_r_date%></td>
|
|
</tr>
|
|
<tr>
|
|
<td class='font-weight-bold' style='font-size:16px;'>대상 : <%=tmp_s_type(s_type,2)%> 예약현황입니다.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>* 하단 탭을 이용하시면, 각 대상에 대한 예약 현황을 보실 수 있습니다. 주간현황으로 돌아가시려면, 주간현황 탭을 클릭해주세요.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<ul class="nav nav-tabs mb-0">
|
|
<li class="nav-item"><button onclick="subit('2')" class="nav-link p-2" type="button">주간현황</button></li>
|
|
<% for i = 1 to ubound(tmp_s_type) %>
|
|
<li class="nav-item"><button onclick="subit('3', '<%=tmp_s_type(i, 1)%>')" class="nav-link p-2 <%= iif(cint(tmp_s_type(i, 1)) = cint(s_type), "active", "")%>" type="button"><%=tmp_s_type(i, 2)%></button></li>
|
|
<% next %>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<tr>
|
|
<td width="15%" align="center" >시간</td>
|
|
<td width="5%" align="center" >시작</td>
|
|
<td width="5%" align="center" >종료</td>
|
|
<td width="75%" align="center" >내용</td>
|
|
</tr>
|
|
<%
|
|
Dim tmp_min(2)
|
|
tmp_scode = 1
|
|
tmp_code = 0
|
|
tmp_min(0) = "00"
|
|
tmp_min(1) = "30"
|
|
for i = 9 to 22
|
|
for j = 1 to 2
|
|
if i <> 22 or j <> 2 then
|
|
if tmp_code = 0 then
|
|
query = " SELECT TSR.id, s_type, s_depart, team_name as s_depart_name, s_p_no, p_name as s_p_name, s_r_date, s_rs_time, s_re_time, s_rs_time_cd, s_re_time_cd, s_cd_gap, s_client, s_comment, s_status "
|
|
query = query & " FROM T_SEAL_RES TSR LEFT OUTER JOIN TEAM_GROUP TG ON TSR.s_depart = TG.team_cd and TG.div_use = '1' "
|
|
query = query & " LEFT OUTER JOIN PERSON P ON TSR.s_p_no = P.p_no "
|
|
query = query & " WHERE s_r_date='" & s_r_date & "' "
|
|
query = query & " AND s_type='" & s_type & "' "
|
|
query = query & " AND use_div = '1' "
|
|
query = query & " ORDER BY CAST(s_rs_time_cd AS int) "
|
|
|
|
Adors.Open query, adoConn, 1
|
|
if Adors.RecordCount > 0 then
|
|
tmp_code = 0
|
|
for Adors_cnt = 1 to Adors.RecordCount
|
|
if tmp_scode >= int(Adors("s_rs_time_cd")) AND tmp_scode <= int(Adors("s_re_time_cd")) then
|
|
s_re_time_cd = int(Adors("s_re_time_cd"))
|
|
tmp_code = int(Adors("s_cd_gap"))
|
|
tmp_client = Adors("s_client")
|
|
tmp_comment = Adors("s_comment")
|
|
tmp_depart = Adors("s_depart_name")
|
|
tmp_name = Adors("s_p_name")
|
|
tmp_namecode = Adors("s_p_no")
|
|
tmp_sn = Adors("id")
|
|
tmp_chk = 1
|
|
tmp_status = Adors("s_status")
|
|
exit for
|
|
end if
|
|
|
|
Adors.MoveNext
|
|
next
|
|
end if
|
|
Adors.Close
|
|
end if
|
|
%>
|
|
<tr>
|
|
<td align="center">
|
|
<%=right("0" & i, 2)%>:<%=tmp_min(j - 1)%> ~ <%=right("0" & i + int(1 - (j mod 2)), 2)%>:<%=tmp_min(j mod 2)%>
|
|
</td>
|
|
<td align="center">
|
|
<input type="radio" class="none" name="s_rs_time_cd" value="<%=tmp_scode%>" onClick="autofnc('1','<%=tmp_scode%>')" <% if tmp_code > 0 then %> disabled <% end if %>>
|
|
</td>
|
|
<td align="center">
|
|
<input type="radio" class="none" name="s_re_time_cd" value="<%=tmp_scode%>" onClick="autofnc('2','<%=tmp_scode%>')" disabled>
|
|
</td>
|
|
<%
|
|
if tmp_code = 0 then
|
|
%>
|
|
<td id="tmp_<%=tmp_scode%>" align="left">
|
|
<input type="hidden" name="s_div_<%=tmp_scode%>" id="s_div_<%=tmp_scode%>" value="" />
|
|
<input type="hidden" name="s_cli_prj_<%=tmp_scode%>" id="s_cli_prj_<%=tmp_scode%>" value="" />
|
|
<input type="text" name="s_client_<%=tmp_scode%>" style="display:none;width:150px;cursor:pointer;" onclick="c_prj_sel('s_div_<%=tmp_scode%>', 's_cli_prj_<%=tmp_scode%>', 's_client_<%=tmp_scode%>');" readonly />
|
|
<img src="/images/common/btn_smallsrch2.gif" style="display:none;vertical-align:top;cursor:pointer;" width="18px" name="s_btn_<%=tmp_scode%>" onclick="c_prj_sel('s_div_<%=tmp_scode%>', 's_cli_prj_<%=tmp_scode%>', 's_client_<%=tmp_scode%>');" />
|
|
<input type="text" name="s_comment_<%=tmp_scode%>" style="display:none;width:400px;" onKeyPress="subit('4',this)" onKeyUp="chrchk('<%=tmp_scode%>')" />
|
|
</td>
|
|
<%
|
|
else
|
|
if tmp_chk = 1 then
|
|
%>
|
|
<td id="tmp_<%=tmp_scode%>" align="left" rowspan="<%=tmp_code%>" class='align-middle'>
|
|
<p style="line-height:150%;margin-left:5.0pt;">
|
|
<font color="blue"><%=tmp_depart%></font> - <font color="black"><b><%=tmp_name%></b></font> :
|
|
<% if tmp_namecode = cstr(session("User_Number")) and tmp_status = "0" then %>
|
|
[<a href="javascript:delit('<%=tmp_sn%>')"><font color="red"><b>예약취소</b></font></a>]
|
|
<% end if %>
|
|
<font color="#FF4000"><b><%=tmp_client %></b></font>
|
|
<%=tmp_comment%>
|
|
</p>
|
|
</td>
|
|
<%
|
|
tmp_chk = 0
|
|
end if
|
|
tmp_code = tmp_code - 1
|
|
end if
|
|
%>
|
|
</tr>
|
|
<%
|
|
tmp_scode = tmp_scode + 1
|
|
end if
|
|
next
|
|
next
|
|
%>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" style="padding:10 0 0 0">
|
|
<img src="/images/common/btn_input.jpg" align="absmiddle" onClick="subit('1')" style="CURSOR:pointer;">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
$(function(){
|
|
currentMenu("/other/seal_week.asp", "");
|
|
});
|
|
|
|
function chrchk(z){
|
|
var m_Sp = /[$\\@\\\#%\^\&\{\}\`\-\=\|\/\;\"\']/;
|
|
var m_val = document.all['s_comment_' + z].value;
|
|
var strLen = m_val.length;
|
|
var m_char = m_val.charAt((strLen) - 1);
|
|
if(m_char.search(m_Sp) != -1){
|
|
alert("특수문자가 입력되었습니다.");
|
|
document.all['s_comment_' + z].value = m_val.substring(0, eval(strLen)-1);
|
|
document.all['s_comment_' + z].focus();
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function autofnc(a, b){
|
|
var tmp_radio_cnt;
|
|
tmp_radio_cnt = document.seal.s_re_time_cd.length;
|
|
tmp_a = document.seal.st_posi.value;
|
|
tmp_b = document.seal.ed_posi.value;
|
|
|
|
if (a == 1){
|
|
document.seal.st_posi.value = b;
|
|
|
|
if (tmp_b != ''){
|
|
document.seal.s_re_time_cd[parseInt(tmp_b) - 1].checked = false;
|
|
}
|
|
|
|
for (i = 0; i < parseInt(tmp_radio_cnt) - 1; i++){
|
|
document.seal.s_re_time_cd[i].disabled = true;
|
|
}
|
|
|
|
for (i = parseInt(b) - 1; i < tmp_radio_cnt; i++){
|
|
if (document.seal.s_rs_time_cd[i].disabled == true){
|
|
break;
|
|
}else{
|
|
document.seal.s_re_time_cd[i].disabled = false;
|
|
document.seal.s_re_time_cd[i].checked = false;
|
|
}
|
|
}
|
|
|
|
if (document.seal.ed_posi.value != ''){
|
|
document.all['s_comment_' + document.seal.ed_posi.value].value = '';
|
|
document.all['s_comment_' + document.seal.ed_posi.value].style.display = 'none';
|
|
|
|
document.all['s_client_' + document.seal.ed_posi.value].value = '';
|
|
document.all['s_client_' + document.seal.ed_posi.value].style.display = 'none';
|
|
|
|
document.all['s_btn_' + document.seal.ed_posi.value].style.display = 'none';
|
|
}
|
|
}else if (a == 2){
|
|
var tmp_b;
|
|
|
|
tmp_b = document.seal.ed_posi.value;
|
|
document.seal.ed_posi.value = b;
|
|
|
|
if (tmp_b != ''){
|
|
document.all['s_comment_' + tmp_b].value = '';
|
|
document.all['s_comment_' + tmp_b].style.display = 'none';
|
|
|
|
document.all['s_client_' + tmp_b].value = '';
|
|
document.all['s_client_' + tmp_b].style.display = 'none';
|
|
|
|
document.all['s_btn_' + tmp_b].style.display = 'none';
|
|
}
|
|
|
|
document.all['s_comment_' + b].style.display = '';
|
|
document.all['s_client_' + b].style.display = '';
|
|
|
|
document.all['s_btn_' + b].style.display = '';
|
|
}
|
|
}
|
|
|
|
function subit(a,b){
|
|
if (a == 1){
|
|
var tmp_check = 0;
|
|
var tmp_radio_cnt;
|
|
tmp_radio_cnt = document.seal.s_re_time_cd.length;
|
|
|
|
for (i = 0; i < tmp_radio_cnt; i++){
|
|
if (document.seal.s_rs_time_cd[i].checked == true){
|
|
tmp_check = 1;
|
|
}
|
|
}
|
|
|
|
if (tmp_check != 1){
|
|
alert('시작시간을 선택해 주세요');
|
|
return false;
|
|
}
|
|
|
|
tmp_check = 0;
|
|
for (i = 0; i < tmp_radio_cnt; i++){
|
|
if (document.seal.s_re_time_cd[i].checked == true){
|
|
tmp_check = 1;
|
|
}
|
|
}
|
|
|
|
if (tmp_check != 1){
|
|
alert('종료시간을 선택해 주세요');
|
|
return false;
|
|
}
|
|
|
|
document.seal.action = 'seal_writeok.asp';
|
|
document.seal.submit();
|
|
}else if (a == 2){
|
|
document.seal.action = 'seal_week.asp?sdate=<%=s_r_date%>';
|
|
document.seal.submit();
|
|
}else if (a == 3){
|
|
location.href = 'seal_view.asp?condate=<%=s_r_date%>&s_type=' + b;
|
|
}else if (a == 4){
|
|
if(event.keyCode==13) subit(1);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function delit(a){
|
|
tmp_ok = confirm('삭제하시겠습니까?');
|
|
|
|
if (tmp_ok == true){
|
|
document.seal.action = 'seal_delok.asp?id=' + a;
|
|
document.seal.submit();
|
|
}
|
|
}
|
|
|
|
function c_prj_sel(obj_type, obj_prj, obj_cli) {
|
|
var url = "/project_list/project_other_list.asp?obj_type=" + obj_type + "&obj_prj=" + obj_prj + "&obj_cli=" + obj_cli;
|
|
window.open(url, "wins", "left=50, top=50, menubar=no, location=no, status=no, toolbar=no, width=850, height=600, scrollbars=yes ,resizable=no");
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |