245 lines
9.0 KiB
Plaintext
245 lines
9.0 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<%
|
|
dim command, txtmonth
|
|
dim cnt
|
|
dim Query
|
|
dim end_date
|
|
dim sort_condi(4), sort_condi2
|
|
sort_condi(1) = "프로젝트명"
|
|
sort_condi(2) = "세부근무"
|
|
sort_condi(3) = "면접원"
|
|
sort_condi(4) = "근무날짜"
|
|
sort_condi2 = request("sort_condi")
|
|
command = request("command")
|
|
end_date = Request("end_date")
|
|
if end_date = "" then
|
|
end_date = mid(cdate(date),1,7)
|
|
end if
|
|
|
|
if command <> "excel" then
|
|
%>
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<style>
|
|
button.ui-datepicker-current {
|
|
display: none;
|
|
}
|
|
</style>
|
|
<!-- 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">
|
|
<%
|
|
End If
|
|
if command = "excel" then
|
|
Response.ContentType = "application/vnd.ms-excel"
|
|
Response.AddHeader "Content-Disposition","attachment;filename=" & replace(txtmonth,"-","년") & "월_내근직_업무현황.xls"
|
|
end if
|
|
if command <> "excel" then
|
|
%>
|
|
<% Dim f_menu : f_menu = "nk" %>
|
|
<!-- #include file = "f_menu.asp" -->
|
|
<%
|
|
End If
|
|
%>
|
|
<form method='post' name='frm_search_work'>
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<%
|
|
if command <> "excel" then
|
|
%>
|
|
<tr>
|
|
<td>업무일지 기록 내역<br>검색은 선택한 해당월에 종료되는 프로젝트에 배정된 내근직을 검색</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
검색 조건 : 실사종료월별
|
|
정렬조건
|
|
<select name=sel_sort>
|
|
<%for i=1 to ubound(sort_condi)%>
|
|
<option value='<%=i%>' <%= iif(cint(sort_condi2) = i, " selected ", "") %>><%=sort_condi(i)%></option>
|
|
<%next%>
|
|
</select>
|
|
|
|
실사종료월
|
|
<input type="text" style="width:120;text-align:center;CURSOR:pointer;" value="<%=end_date%>" name='txt_end_date' readonly class='selectMonth'>
|
|
<img src="/images/common/btn_smallsrch.gif" align="absmiddle" onClick="goView('view');" style='cursor:pointer'>
|
|
<img src="/images/common/btn_smallexcel.gif" align="absmiddle" onclick="goView('excel');" style='CURSOR:pointer;'>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
end if
|
|
|
|
if command <> "" then
|
|
|
|
'#### 프로시져를 사용하다 10월 31일자로 사용안함
|
|
query = " SELECT * "
|
|
query = query & " FROM ( "
|
|
query = query & " SELECT nw.p_sn, nw.p_child_sn, nw.p_sebu, nw.neakeun_name, nw.date, nw.yoil, nw.job_in_time, nw.job_out_time, nw.job_jumal_time, nw.in_time, nw.out_time, p.p_subject "
|
|
query = query & " FROM neakeun_work as nw INNER JOIN project as p ON nw.p_sn = p.p_sn "
|
|
query = query & " WHERE (p.p_field_end LIKE '" & end_date & "%') "
|
|
query = query & " UNION "
|
|
query = query & " SELECT nw.p_sn, nw.p_child_sn, nw.p_sebu, nw.neakeun_name, nw.date, nw.yoil, nw.job_in_time, nw.job_out_time, nw.job_jumal_time, nw.in_time, nw.out_time, TPM.p_subject "
|
|
query = query & " FROM neakeun_work as nw INNER JOIN T_PROJECT_METHOD as TPM ON nw.p_sn = TPM.p_sn AND nw.p_child_sn = TPM.p_child_sn "
|
|
query = query & " WHERE (TPM.p_field_date_end LIKE '" & end_date & "%') "
|
|
query = query & " ) A"
|
|
|
|
if cint(sort_condi2) = 1 then
|
|
query = query & " order by A.p_subject"
|
|
elseif cint(sort_condi2) = 2 then
|
|
query = query & " order by A.p_sebu"
|
|
elseif cint(sort_condi2) = 3 then
|
|
query = query & " order by A.neakeun_name"
|
|
elseif cint(sort_condi2) = 4 then
|
|
query = query & " order by A.[date]"
|
|
end if
|
|
|
|
Rs.open query, adoconn, adopenstatic, adlockreadonly
|
|
'#### 프로시져
|
|
%>
|
|
<tr>
|
|
<td>
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<tr>
|
|
<td width="38%" align="center" >프로젝트명 [프로젝트코드]</td>
|
|
<td width="8%" align="center" >조사코드</td>
|
|
<td width="8%" align="center" >세부근무</td>
|
|
<td width="6%" align="center" >이름</td>
|
|
<td width="7%" align="center" >날짜</td>
|
|
<td width="5%" align="center" >요일</td>
|
|
<td width="5%" align="center" >시간내</td>
|
|
<td width="5%" align="center" >시간외</td>
|
|
<td width="4%" align="center" >주말</td>
|
|
<td width="4%" align="center" >합</td>
|
|
<td width="5%" align="center" >출근</td>
|
|
<td width="5%" align="center" >퇴근</td>
|
|
</tr>
|
|
<!-- loop start -->
|
|
<%
|
|
do until Rs.eof
|
|
%>
|
|
<tr>
|
|
<td align="left">[<%=rs("p_sn")%>] <%=rs("p_subject")%></td>
|
|
<td align="center" ><%=rs("p_child_sn")%></td>
|
|
<td align="center">
|
|
<%
|
|
if isnull(Rs("p_sebu")) = true then
|
|
Response.Write " "
|
|
else
|
|
Response.Write Rs("p_sebu")
|
|
end if
|
|
%>
|
|
</td>
|
|
<td align="center"><%=Rs("neakeun_name")%></td>
|
|
<td align="center" ><%=Rs("date")%></td>
|
|
<td align="center"><%=Rs("yoil")%></td>
|
|
<td align="center" >
|
|
<%
|
|
sum = 0
|
|
if isnull(Rs("job_in_time")) = true or Rs("job_in_time") ="" then
|
|
response.write " "
|
|
else
|
|
Response.write formatnumber(Rs("job_in_time") - Rs("job_out_time"),2)
|
|
sum = cdbl(sum) + cdbl(Rs("job_in_time") - Rs("job_out_time"))
|
|
end if
|
|
%>
|
|
</td>
|
|
<td align="center" >
|
|
<%
|
|
if isnull(Rs("job_out_time")) = true or Rs("job_out_time") ="" then
|
|
response.write " "
|
|
else
|
|
Response.write formatnumber(Rs("job_out_time"),2)
|
|
sum = cdbl(sum) + cdbl(Rs("job_out_time"))
|
|
end if
|
|
%>
|
|
</td>
|
|
<td align="center" >
|
|
<%
|
|
if isnull(Rs("job_jumal_time")) = true or Rs("job_jumal_time") ="" then
|
|
response.write " "
|
|
else
|
|
Response.write formatnumber(Rs("job_jumal_time"),2)
|
|
sum = cdbl(sum) + cdbl(Rs("job_jumal_time"))
|
|
end if
|
|
%>
|
|
</td>
|
|
<td align="center" ><%=formatnumber(sum,2)%></td>
|
|
<td align="center" ><%=Rs("in_time")%></td>
|
|
<td align="center" ><%=Rs("out_time")%></td>
|
|
</tr>
|
|
<%
|
|
Rs.movenext
|
|
loop
|
|
%>
|
|
<!-- loop end -->
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
Rs.close
|
|
end if
|
|
%>
|
|
</table>
|
|
</form>
|
|
<%if command <> "excel" then%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
function goView(command){
|
|
var url="";
|
|
var end_date = document.frm_search_work.txt_end_date.value;
|
|
var sel_sort = document.frm_search_work.sel_sort.value;
|
|
|
|
url ="neakeun_status2_2014.asp?end_date="+end_date+ "&sort_condi=" + sel_sort;
|
|
url = url + "&command=" + command;
|
|
|
|
document.frm_search_work.action = url;
|
|
document.frm_search_work.submit();
|
|
}
|
|
$(function(){
|
|
$(".selectMonth").datepicker({
|
|
dateFormat: 'mm-yy',
|
|
changeMonth: true,
|
|
changeYear: true,
|
|
showButtonPanel: true,
|
|
onClose: function(dateText, inst) {
|
|
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
|
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
|
$(this).val($.datepicker.formatDate('yy-mm', new Date(year, month, 1)));
|
|
}
|
|
});
|
|
|
|
$(".selectMonth").focus(function () {
|
|
$(".ui-datepicker-calendar").hide();
|
|
$("#ui-datepicker-div").position({
|
|
my: "center top",
|
|
at: "center bottom",
|
|
of: $(this)
|
|
});
|
|
});
|
|
|
|
$(".selectMonth").on('click', function () {
|
|
var selDate = new Date($(".selectMonth").val());
|
|
$("#ui-datepicker-div .ui-datepicker-year option[value='" + selDate.getFullYear() + "']").prop("selected", true);
|
|
$("#ui-datepicker-div .ui-datepicker-month option[value='" + selDate.getMonth() + "']").prop("selected", true);
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" -->
|
|
<% end if %> |