216 lines
7.4 KiB
Plaintext
216 lines
7.4 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<%
|
|
If tmp_support_chk = "1" Then
|
|
query = ""
|
|
query = query & " UPDATE T_SEAL_RES "
|
|
query = query & " SET support_check = '1' "
|
|
query = query & " WHERE support_check = '0' "
|
|
|
|
adoConn.Execute query
|
|
End If
|
|
|
|
if request("s_type") = "" then
|
|
s_type = 1
|
|
else
|
|
s_type = request("s_type")
|
|
end if
|
|
|
|
if request("sdate") = "" then
|
|
tmp_sdate = date()
|
|
else
|
|
tmp_sdate = request("sdate")
|
|
|
|
if len(tmp_sdate) <= 9 then
|
|
tmp_sdate = tmp_sdate & "-" & day(date())
|
|
end if
|
|
end if
|
|
|
|
tmp_sdate = cdate(tmp_sdate) - (weekday(cdate(tmp_sdate)) - 1)
|
|
tmp_edate = cdate(tmp_sdate) + (7 - weekday(cdate(tmp_sdate)))
|
|
|
|
dim tmp_s_type(5,3)
|
|
|
|
tmp_s_type(1,1) = "1"
|
|
tmp_s_type(1,2) = "(KRI)1번 사용인감"
|
|
tmp_s_type(1,3) = "1"
|
|
|
|
tmp_s_type(2,1) = "2"
|
|
tmp_s_type(2,2) = "(KRI)2번 사용인감"
|
|
tmp_s_type(2,3) = "1"
|
|
|
|
tmp_s_type(3,1) = "3"
|
|
tmp_s_type(3,2) = "(KRI)3번 사용인감"
|
|
tmp_s_type(3,3) = "1"
|
|
|
|
tmp_s_type(4,1) = "4"
|
|
tmp_s_type(4,2) = "(KRC)1번 사용인감"
|
|
tmp_s_type(4,3) = "1"
|
|
|
|
tmp_s_type(5,1) = "5"
|
|
tmp_s_type(5,2) = "(KRC)2번 사용인감"
|
|
tmp_s_type(5,3) = "1"
|
|
|
|
query = " SELECT s_type FROM T_SEAL_RES "
|
|
query = query & " WHERE use_div = '1' "
|
|
query = query & " AND s_r_date between '" & tmp_sdate & "' and '" & tmp_edate & "' "
|
|
query = query & " AND s_status = '1' "
|
|
query = query & " GROUP BY s_type "
|
|
query = query & " ORDER BY s_type "
|
|
Adors.Open query, adoConn, 1
|
|
If Adors.recordCount > 0 Then
|
|
For i=1 To Adors.recordCount
|
|
tmp_s_type(cint(Adors("s_type")), 3) = "0"
|
|
Adors.MoveNext
|
|
Next
|
|
End If
|
|
Adors.Close
|
|
%>
|
|
<!-- 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%>">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td align="center" class="pb-2">
|
|
<button type="button" class='btn btn-primary w-25 m-0' onClick="subit('<%=tmp_sdate - 7%>')"><i class='fas fa-arrow-left'></i></button><span class='font-weight-bold align-middle d-inline-block w-50 text-center m-0'><%=tmp_sdate%> ~ <%=tmp_edate%></span><button type="button" class='btn btn-primary w-25 m-0' onClick="subit('<%=tmp_sdate + 7%>')"><i class='fas fa-arrow-right'></i></button>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<tr height="25px">
|
|
<td width="15%" align="center" >일시</td>
|
|
<td width="15%" align="center" >구분</td>
|
|
<td width="15%" align="center" >시간</td>
|
|
<td width="55%" align="center" >내용</td>
|
|
</tr>
|
|
<% for i = 0 to 6 %>
|
|
<tr height="38px">
|
|
<td class="text-center align-middle">
|
|
<a href="seal_view.asp?condate=<%=tmp_sdate + i%>&s_type=<%=s_type%>">
|
|
<%=replace(right(tmp_sdate + i, 5), "-", "/")%> (<%=left(WeekDayName(weekday(tmp_sdate + i)),1)%>)
|
|
</a>
|
|
</td>
|
|
<%
|
|
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 = '" & tmp_sdate + i & "' "
|
|
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
|
|
%>
|
|
<td align="center">
|
|
<table class='table-borderless table-sm table-sm2 mb-0'>
|
|
<% Do while Not Adors.Eof %>
|
|
<tr height="30px">
|
|
<td class="text-center align-middle">
|
|
<a href="seal_view.asp?condate=<%=tmp_sdate + i%>&s_type=<%=Adors("s_type")%>" class="blue"><%=tmp_s_type(Adors("s_type"),2)%></a>
|
|
</td>
|
|
</tr>
|
|
<% Adors.MoveNext %>
|
|
<% Loop %>
|
|
</table>
|
|
</td>
|
|
<td align="center">
|
|
<table class='table-borderless table-sm table-sm2 mb-0'>
|
|
<% Adors.MoveFirst %>
|
|
<% Do while Not Adors.Eof %>
|
|
<tr height="30px">
|
|
<td class="text-center align-middle">
|
|
<%=Adors("s_rs_time")%> ~ <%=Adors("s_re_time")%>
|
|
</td>
|
|
</tr>
|
|
<% Adors.MoveNext %>
|
|
<% Loop %>
|
|
</table>
|
|
</td>
|
|
<td>
|
|
<table class='table-borderless table-sm table-sm2 mb-0'>
|
|
<% Adors.MoveFirst %>
|
|
<% Do while Not Adors.Eof %>
|
|
<tr height="30px">
|
|
<%
|
|
tmp_str = ""
|
|
tmp_btn_str = ""
|
|
If Adors("s_status") = "0" Then
|
|
tmp_str = "반출 대기"
|
|
tmp_btn_str = "반출"
|
|
elseif Adors("s_status") = "1" Then
|
|
tmp_str = "반출 중"
|
|
tmp_btn_str = "회수"
|
|
elseif Adors("s_status") = "2" Then
|
|
tmp_str = "회수 완료"
|
|
end if
|
|
%>
|
|
<td class="text-left align-middle">
|
|
<input type="button" style="width:50px;<% if session("depart_code") <> "18" or Adors("s_status") = "2" or (tmp_s_type(Adors("s_type"),3) <> "1" and Adors("s_status") <> "1") then %>visibility:hidden;<% end if %>"
|
|
value="<%=tmp_btn_str %>" onclick="s_status_chg('<%=Adors("id") %>', '<%=Adors("s_status") %>', '<%=tmp_sdate %>');" />
|
|
<b>[<%=tmp_str %>]</b> <%=Adors("s_depart_name")%> <%=Adors("s_p_name")%> - <font color="#FF4000"><%=Adors("s_client") %></font> <%=Adors("s_comment") %>
|
|
</td>
|
|
</tr>
|
|
<% Adors.MoveNext %>
|
|
<% Loop %>
|
|
</table>
|
|
</td>
|
|
<% Else %>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<% End If %>
|
|
</tr>
|
|
<%
|
|
Adors.Close
|
|
next
|
|
%>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
function subit(b){
|
|
location.href = 'seal_week.asp?sdate=' + b;
|
|
}
|
|
|
|
function s_status_chg(id, s_status, s_r_date) {
|
|
var tmp_status = ((s_status * 1) + 1) + ""
|
|
if (tmp_status == "1") {
|
|
if (!confirm("반출 하시겠습니까?")) {
|
|
alert("취소되었습니다.");
|
|
return;
|
|
}
|
|
} else if (tmp_status == "2") {
|
|
if (!confirm("회수 하시겠습니까?")) {
|
|
alert("취소되었습니다.");
|
|
return;
|
|
}
|
|
}
|
|
location.href = 'seal_status.asp?id=' + id + '&s_status=' + tmp_status + "&s_r_date=" + s_r_date;
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |