481 lines
35 KiB
Plaintext
481 lines
35 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<%
|
|
dim command
|
|
command = Request("command")
|
|
|
|
s_date_st = request("s_date_st")
|
|
s_date_end = request("s_date_end")
|
|
s_name = request("s_name")
|
|
s_work = "'" & replace(replace(request("s_work"), " ", ""), ",", "','") & "'"
|
|
s_p_sn = request("s_p_sn")
|
|
s_p_subject = request("s_p_subject")
|
|
s_column = replace(request("s_column"), " ", "")
|
|
|
|
Dim column_dic
|
|
Set column_dic = Server.CreateObject("Scripting.Dictionary")
|
|
With column_dic
|
|
.Add "intranet_project", "프로젝트코드"
|
|
.Add "p_subject", "프로젝트명"
|
|
.Add "work_kind", "업무구분"
|
|
.Add "log_user", "내근직/면접원 ID"
|
|
.Add "log_user_name", "내근직/면접원 성명"
|
|
.Add "log_date", "업무날짜"
|
|
.Add "in_time", "출근시간"
|
|
.Add "out_time", "퇴근시간"
|
|
.Add "log_s_time", "첫Call"
|
|
.Add "log_e_time", "마지막Call"
|
|
.Add "cnt", "업무Count"
|
|
End With
|
|
|
|
if command <> "excel" then
|
|
%>
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<style>
|
|
.t_table .t_head{
|
|
cursor:pointer;
|
|
}
|
|
</style>
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1>CATI/컨택/검증 업무 현황</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=Work_Status.xls"
|
|
end if
|
|
%>
|
|
<form name="work_status" method="post">
|
|
<input type="hidden" value="<%=command %>" name="command" />
|
|
<input type="hidden" value="<%=s_work %>" name="s_work_arr" />
|
|
<input type="hidden" value="<%=s_column %>" name="s_column_arr" />
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<% If command <> "excel" Then %>
|
|
<tr>
|
|
<td align="center" width="12%">기 간</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" style="width:100px;text-align:center;CURSOR: pointer;" value="<%=s_date_st %>" name="s_date_st" class='selectDate' readonly />
|
|
~
|
|
<input type="text" style="width:100px;text-align:center;CURSOR: pointer;" value="<%=s_date_end %>" name="s_date_end" class='selectDate' readonly />
|
|
</td>
|
|
<td align="center" width="12%">내근직/면접원 성명</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" name="s_name" value="<%=s_name %>" style="width:200px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" width="12%">업 무</td>
|
|
<td align="left" width="38%">
|
|
<label class='mx-2' for="CATI"><input type="checkbox" value="CATI" id="CATI" name="s_work"/> CATI</label>
|
|
<label class='mx-2' for="컨택"><input type="checkbox" value="컨택" id="컨택" name="s_work" /> 컨택</label>
|
|
<label class='mx-2' for="검증(FF)"><input type="checkbox" value="검증(FF)" id="검증(FF)" name="s_work" /> 검증(FF)</label>
|
|
<label class='mx-2' for="검증(CATI)"><input type="checkbox" value="검증(CATI)" id="검증(CATI)" name="s_work" /> 검증(CATI)</label>
|
|
<label class='mx-2' for="펀치"><input type="checkbox" value="펀치" id="펀치" name="s_work" /> 펀치</label>
|
|
</td>
|
|
<td align="center" width="12%">프로젝트 코드</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" name="s_p_sn" value="<%=s_p_sn %>" style="width:200px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" width="12%">집계 Column 선택</td>
|
|
<td align="left" width="38%">
|
|
<label class='mx-2' for="work_kind"><input type="checkbox" value="work_kind" id="work_kind" name="s_column"/> 업무구분</label>
|
|
<label class='mx-2' for="log_date"><input type="checkbox" value="log_date" id="log_date" name="s_column"/> 업무날짜</label>
|
|
<label class='mx-2' for="intranet_project"><input type="checkbox" value="intranet_project,p_subject" id="intranet_project" name="s_column"/> 프로젝트</label>
|
|
<label class='mx-2' for="log_user_name"><input type="checkbox" value="log_user_name" id="log_user_name" name="s_column"/> 내근직/면접원 성명</label>
|
|
</td>
|
|
<td align="center" width="12%">프로젝트 명</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" name="s_p_subject" value="<%=s_p_subject %>" style="width:200px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" align="right"><font color="red"><b>검색 시 1분에서 10분 가량 소요될 수 있습니다</b></font></td>
|
|
<td colspan="1" align="right">
|
|
<a href="javascript:search_go('view');"><img src="/images/common/btn_smallsrch.gif" /></a>
|
|
<a href="javascript:search_go('excel');"><img src="/images/common/btn_smallexcel.gif" /></a>
|
|
</td>
|
|
</tr>
|
|
<% End if %>
|
|
<% if command <> "" Then %>
|
|
<tr>
|
|
<td colspan="4" align="center">
|
|
<div style="width:100%;overflow-y:scroll;max-height:545px;height:545px;">
|
|
<table class="t_table table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<%
|
|
query = " SELECT "
|
|
if s_column <> "" Then
|
|
query = query & " " & s_column & ", "
|
|
else
|
|
query = query & " intranet_project, p_subject, work_kind, log_user, log_user_name, log_date, in_time, out_time, log_s_time, log_e_time, "
|
|
End if
|
|
query = query & " sum(cnt) AS cnt "
|
|
query = query & " FROM ( "
|
|
query = query & " SELECT intranet_project, p_subject, work_kind, "
|
|
query = query & " (SELECT TOP 1 new_id FROM project2.dbo.man WITH(nolock) WHERE id = BSU.log_user) AS log_user, BSU.log_user AS m_id, log_user_name, log_date, cnt "
|
|
query = query & " FROM "
|
|
query = query & " ( "
|
|
query = query & " SELECT P.intranet_project, TPM.p_subject, 'CATI' AS work_kind, L.log_user, L.log_user_name, L.log_date, L.prj_code, P.prj_name, sum(cnt) AS cnt "
|
|
query = query & " FROM ( "
|
|
query = query & " SELECT log_user, log_user_name, log_date, prj_code, sum(cnt) AS cnt "
|
|
query = query & " FROM ( "
|
|
query = query & " SELECT s_client AS 'log_user', s_client_name AS 'log_user_name', s_date AS 'log_date', prj_code, count(*) AS cnt "
|
|
query = query & " FROM new_cati.dbo.sheet1 WITH(NOLOCK) "
|
|
query = query & " WHERE s_client NOT IN ('0', '15254', '15632') "
|
|
query = query & " GROUP BY s_client, s_client_name, s_date, prj_code "
|
|
query = query & " UNION ALL "
|
|
query = query & " SELECT s_client AS 'log_user', s_client_name AS 'log_user_name', s_date AS 'log_date', prj_code, 0 AS cnt "
|
|
query = query & " FROM new_cati.dbo.sheet1_Send WITH(NOLOCK) "
|
|
query = query & " WHERE s_client NOT IN ('0', '15254', '15632') "
|
|
query = query & " GROUP BY s_client, s_client_name, s_date, prj_code "
|
|
query = query & " ) CS "
|
|
query = query & " GROUP BY log_user, log_user_name, log_date, prj_code "
|
|
query = query & " ) L LEFT OUTER JOIN ( "
|
|
query = query & " SELECT prj_code, prj_name, intranet_project "
|
|
query = query & " FROM new_cati.dbo.project WITH(NOLOCK) "
|
|
query = query & " WHERE intranet_project IS NOT NULL "
|
|
query = query & " ) P ON L.prj_code = P.prj_code LEFT OUTER JOIN ( "
|
|
query = query & " SELECT p_child_sn, p_subject "
|
|
query = query & " FROM project2.dbo.T_PROJECT_METHOD WITH(NOLOCK) "
|
|
query = query & " WHERE p_child_sn IS NOT NULL "
|
|
query = query & " ) TPM ON P.intranet_project = TPM.p_child_sn "
|
|
query = query & " GROUP BY P.intranet_project, TPM.p_subject, L.log_user, L.log_user_name, L.log_date, L.prj_code, P.prj_name "
|
|
query = query & " UNION ALL "
|
|
query = query & " SELECT KL.intranet_project, TPM.p_subject, '컨택' AS work_kind, m.id AS log_user, U.login_name, L.log_date, CONVERT(VARCHAR(20), KL.id) AS kikoan_id, KL.kikoan_name, sum(L.cnt) AS cnt "
|
|
query = query & " FROM "
|
|
query = query & " ( "
|
|
query = query & " SELECT user_id, kikoan_name, log_date, count(*) AS cnt "
|
|
query = query & " FROM contact.dbo.log WITH(NOLOCK) "
|
|
query = query & " WHERE log_stat = '컨택결과 저장' "
|
|
query = query & " GROUP BY user_id, kikoan_name, log_date "
|
|
query = query & " ) L LEFT OUTER JOIN ( "
|
|
query = query & " SELECT id, login_name "
|
|
query = query & " FROM contact.dbo.login_user WITH(NOLOCK) "
|
|
query = query & " WHERE login_name IS NOT NULL "
|
|
query = query & " ) U ON L.user_id = U.id LEFT OUTER JOIN ( "
|
|
query = query & " SELECT id, m_name, m_jumin "
|
|
query = query & " FROM project2.dbo.man "
|
|
query = query & " WHERE m_activity = '활동' "
|
|
query = query & " AND grade_3 <> '' "
|
|
query = query & " ) M ON U.login_name = M.m_name LEFT OUTER JOIN ( "
|
|
query = query & " SELECT id, intranet_project, kikoan_name "
|
|
query = query & " FROM contact.dbo.kikoan_list WITH(NOLOCK) "
|
|
query = query & " WHERE intranet_project IS NOT NULL "
|
|
query = query & " ) KL ON (L.kikoan_name = KL.kikoan_name OR L.kikoan_name = CONVERT(VARCHAR(20), KL.id)) LEFT OUTER JOIN ( "
|
|
query = query & " SELECT p_child_sn, p_subject "
|
|
query = query & " FROM project2.dbo.T_PROJECT_METHOD WITH(NOLOCK) "
|
|
query = query & " ) TPM ON KL.intranet_project = TPM.p_child_sn "
|
|
query = query & " GROUP BY KL.intranet_project, TPM.p_subject, m.id, U.login_name, L.log_date, CONVERT(VARCHAR(20), KL.id), KL.kikoan_name "
|
|
query = query & " UNION ALL "
|
|
query = query & " SELECT ISNULL(TPF.intranet_project, IRL.p_sn) AS intranet_project, TPM.p_subject, '검증(FF)' AS work_kind, M.id AS log_user, M.m_name, "
|
|
query = query & " inspection_date AS log_date, IRL.p_sn, ISNULL(Ltrim(TPF.p_subject), Ltrim(TPM.p_subject)) AS p_subject, sum(cnt) AS cnt "
|
|
query = query & " FROM ( "
|
|
query = query & " SELECT p_sn, s_id, CONVERT(VARCHAR(10), inspection_date, 120) AS inspection_date, inspection_user, count(*) AS cnt "
|
|
query = query & " FROM project2.dbo.T_INSPECTION_RES WITH(NOLOCK) "
|
|
query = query & " WHERE r_result NOT IN ('5', '6', '7') AND LEN(inspection_user) < 8 "
|
|
query = query & " GROUP BY p_sn, s_id, CONVERT(VARCHAR(10), inspection_date, 120), inspection_user "
|
|
query = query & " UNION ALL "
|
|
query = query & " SELECT p_sn, s_id, CONVERT(VARCHAR(10), inspection_date, 120) AS inspection_date, inspection_user, count(*) AS cnt "
|
|
query = query & " FROM project2.dbo.T_INSPECTION_RES_LOG WITH(NOLOCK) "
|
|
query = query & " WHERE r_result NOT IN ('5', '6', '7') AND LEN(inspection_user) < 8 "
|
|
query = query & " GROUP BY p_sn, s_id, CONVERT(VARCHAR(10), inspection_date, 120), inspection_user "
|
|
query = query & " ) IRL LEFT OUTER JOIN ( "
|
|
query = query & " SELECT id, m_name "
|
|
query = query & " FROM project2.dbo.man WITH(NOLOCK) "
|
|
query = query & " ) M ON IRL.inspection_user = M.id LEFT OUTER JOIN ( "
|
|
query = query & " SELECT p_child_sn, intranet_project, p_subject "
|
|
query = query & " FROM project2.dbo.T_PROJECT_FCS WITH(NOLOCK) "
|
|
query = query & " ) TPF ON IRL.p_sn = TPF.p_child_sn LEFT OUTER JOIN ( "
|
|
query = query & " SELECT p_child_sn, p_subject "
|
|
query = query & " FROM project2.dbo.T_PROJECT_METHOD WITH(NOLOCK) "
|
|
query = query & " ) TPM ON ISNULL(TPF.intranet_project, IRL.p_sn) = TPM.p_child_sn "
|
|
query = query & " GROUP BY ISNULL(TPF.intranet_project, IRL.p_sn), TPM.p_subject, M.id, M.m_name, inspection_date, IRL.p_sn, ISNULL(Ltrim(TPF.p_subject), Ltrim(TPM.p_subject)) "
|
|
query = query & " UNION ALL "
|
|
query = query & " SELECT P.intranet_project, TPM.p_subject, '검증(CATI)' AS work_kind, tel_inspection_uid AS log_user, tel_inspection_user, "
|
|
query = query & " tel_inspection_date AS log_date, TIC.prj_code, P.prj_name, sum(cnt) AS cnt "
|
|
query = query & " FROM ( "
|
|
query = query & " SELECT prj_code, tel_inspection_uid, tel_inspection_user, CONVERT(VARCHAR(10), tel_inspection_date, 120) AS tel_inspection_date, count(*) AS cnt "
|
|
query = query & " FROM new_cati.dbo.T_INSPECTION_CATI WITH(NOLOCK) "
|
|
query = query & " WHERE tel_inspection_user <> '' AND tel_inspection_uid IS NOT NULL AND LEN(tel_inspection_uid) < 8 "
|
|
query = query & " GROUP BY prj_code, tel_inspection_uid, tel_inspection_user, CONVERT(VARCHAR(10), tel_inspection_date, 120) "
|
|
query = query & " ) TIC LEFT OUTER JOIN ( "
|
|
query = query & " SELECT prj_code, prj_name, intranet_project "
|
|
query = query & " FROM new_cati.dbo.project WITH(NOLOCK) "
|
|
query = query & " ) P ON TIC.prj_code = P.prj_code LEFT OUTER JOIN ( "
|
|
query = query & " SELECT p_child_sn, p_subject "
|
|
query = query & " FROM project2.dbo.T_PROJECT_METHOD WITH(NOLOCK) "
|
|
query = query & " ) TPM ON P.intranet_project = TPM.p_child_sn "
|
|
query = query & " GROUP BY P.intranet_project, TPM.p_subject, tel_inspection_uid, tel_inspection_user, tel_inspection_date, TIC.prj_code, P.prj_name "
|
|
query = query & " ) BSU "
|
|
query = query & " WHERE log_date BETWEEN '"&s_date_st&"' AND '"&s_date_end&"' "
|
|
query = query & " ) T LEFT OUTER JOIN ( "
|
|
query = query & " SELECT nek.neakeun_name, nek.m_id, nek.date, nek.in_time, nek.out_time, "
|
|
query = query & " REPLACE(LEFT(RIGHT(CONVERT(varchar(20), LT.log_s_time, 120), 8), 5), ':', '') AS log_s_time, REPLACE(LEFT(RIGHT(CONVERT(varchar(20), LT.log_e_time, 120), 8), 5), ':', '') AS log_e_time "
|
|
query = query & " FROM ( "
|
|
query = query & " SELECT neakeun_name, m_id, date, in_time, out_time "
|
|
query = query & " FROM project2.dbo.neakeun_in_out_time WITH(NOLOCK) "
|
|
query = query & " ) nek LEFT OUTER JOIN ( "
|
|
query = query & " SELECT log_user, log_date, min(log_s_time) AS log_s_time, max(log_e_time) AS log_e_time "
|
|
query = query & " FROM new_cati.dbo.log_cati_prj_in_out WITH(NOLOCK) "
|
|
query = query & " GROUP BY log_user, log_date "
|
|
query = query & " ) LT ON nek.m_id = LT.log_user AND nek.date = LT.log_date "
|
|
query = query & " ) YY ON T.m_id = YY.m_id AND T.log_date = YY.date "
|
|
query = query & " WHERE LEFT(log_user_name, 3) <> '13.' "
|
|
If s_name <> "" Then
|
|
query = query & " AND log_user_name LIKE '%" & s_name & "%' "
|
|
End If
|
|
If s_work <> "" Then
|
|
query = query & " AND work_kind IN (" & s_work & ") "
|
|
End If
|
|
If s_p_sn <> "" Then
|
|
query = query & " AND intranet_project LIKE '" & s_p_sn & "%' "
|
|
End If
|
|
If s_p_subject <> "" Then
|
|
query = query & " AND p_subject LIKE '%" & s_p_subject & "%' "
|
|
End If
|
|
if s_column <> "" Then
|
|
query = query & " GROUP BY " & s_column & " "
|
|
query = query & " ORDER BY " & s_column & " "
|
|
Else
|
|
query = query & " GROUP BY work_kind, log_date, intranet_project, p_subject, T.log_user, log_user_name, YY.in_time, YY.out_time, YY.log_s_time, YY.log_e_time "
|
|
query = query & " ORDER BY work_kind, log_date, intranet_project, p_subject, T.log_user, log_user_name, YY.in_time, YY.out_time, YY.log_s_time, YY.log_e_time "
|
|
End if
|
|
'Response.Write query
|
|
AdoRs.open query, adoconn, adopenstatic, adlockreadonly
|
|
|
|
If AdoRs.RecordCount > 0 Then
|
|
%>
|
|
<tr height="25px" class="t_head">
|
|
<%
|
|
For i = 0 To AdoRs.fields.count - 1
|
|
%>
|
|
<td align="center"><%= column_dic.Item(AdoRs.fields(i).Name)%> </td>
|
|
<%If s_work="'CATI'" and column_dic.Item(AdoRs.fields(i).Name)="내근직/면접원 성명" Then%><!--##### 콜 카운트 -->
|
|
<td align="center">콜 Count </td>
|
|
<%End If %>
|
|
<%
|
|
Next
|
|
%>
|
|
</tr>
|
|
<%
|
|
Else
|
|
%>
|
|
<tr height="25px">
|
|
<td align="center" width="100%">검색 결과가 없습니다</td>
|
|
</tr>
|
|
<%
|
|
End If
|
|
|
|
|
|
|
|
Do While Not AdoRs.Eof
|
|
%>
|
|
<tr class="t_contents">
|
|
<%
|
|
For i = 0 To AdoRs.fields.count - 1 ' 원래 - 1 만 해야되는데, 마지막 컬럼 cnt 에 Detail 화면 링크를 걸기위해 조정
|
|
%>
|
|
<td align="center" style=""><%= AdoRs.fields(i) %></td>
|
|
<%If s_work="'CATI'" and column_dic.Item(AdoRs.fields(i).Name)="내근직/면접원 성명" Then%><!--##### 콜 카운트 -->
|
|
<td align="center" style="">
|
|
<%
|
|
query2=""
|
|
query2=query2&" SELECT count(*) AS tcnt "
|
|
query2=query2&" FROM new_cati.dbo.logfile WITH(NOLOCK) "
|
|
query2=query2&" WHERE prj_code = (SELECT TOP 1 prj_code FROM new_cati.dbo.project WHERE intranet_project = '"&AdoRs("intranet_project")&"') "
|
|
query2=query2&" AND log_user_name = '"&AdoRs("log_user_name")&"' "
|
|
rsc.Open query2, adoConn, 1
|
|
%>
|
|
<%=rsc("tcnt") %>
|
|
<%
|
|
rsc.Close
|
|
%>
|
|
</td>
|
|
<%End If %>
|
|
<%
|
|
Next
|
|
'세부 링크 활성화 시 아래 주석 해제 및 상단 For문 AdoRs.fields.count - 2 로 수정
|
|
%>
|
|
</tr>
|
|
<%
|
|
AdoRs.MoveNext
|
|
Loop
|
|
%>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<% End if %>
|
|
</table>
|
|
</form>
|
|
<%if command <> "excel" then%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
$(function () {
|
|
$(".selectDate").datepicker();
|
|
if ($("input[name=s_work_arr]").val() != "") {
|
|
$("input[name=s_work]").each(function (i) {
|
|
if ($("input[name=s_work_arr]").val().indexOf("'" + $(this).val() + "'") > -1) {
|
|
$(this).prop("checked", true);
|
|
}
|
|
});
|
|
}
|
|
if ($("input[name=s_column_arr]").val() != "") {
|
|
$("input[name=s_column]").each(function (i) {
|
|
if ($("input[name=s_column_arr]").val().indexOf($(this).val()) > -1) {
|
|
$(this).prop("checked", true);
|
|
}
|
|
});
|
|
}
|
|
var sort_col_check = [];
|
|
$(".t_table .t_head td").each(function (index) {
|
|
sort_col_check[index] = 0; // 1은 asc, 2는 desc, 0은 초기
|
|
});
|
|
$(".t_table .t_head td").click(function () {
|
|
// $(".t_table .t_head td").index(this) 클릭한 컬럼의 INDEX
|
|
// $(".t_table .t_head > td").length tr의 column 수
|
|
// $(".t_table .t_contents").length tr의 row 수
|
|
// var arr_tb = new array($(".t_table .t_contents").length, $(".t_table .t_head > td").length);
|
|
var num_yn = true;
|
|
var equal_value = true;
|
|
var prev_value = "";
|
|
var s_col_index = $(".t_table .t_head td").index(this);
|
|
var arr_tb = [];
|
|
if (sort_col_check[s_col_index] == 1) {
|
|
sort_col_check[s_col_index] = 2;
|
|
} else {
|
|
sort_col_check[s_col_index] = 1;
|
|
}
|
|
$(".t_table .t_contents").each(function (tr_i) {
|
|
arr_tb[tr_i] = $(this).find("td").eq(s_col_index).text();
|
|
if (prev_value == "") {
|
|
prev_value = arr_tb[tr_i];
|
|
}
|
|
if (prev_value != arr_tb[tr_i]) {
|
|
equal_value = false;
|
|
}
|
|
if (isNaN(arr_tb[tr_i]) == true) {
|
|
num_yn = false;
|
|
}
|
|
$(this).find("td").each(function (td_i) {
|
|
if (td_i != s_col_index) {
|
|
arr_tb[tr_i] = arr_tb[tr_i] + "^||^" + $(this).text();
|
|
}
|
|
});
|
|
});
|
|
if (equal_value != true) { // 컬럼의 모든 값이 같지 않아야 Sort 진행
|
|
if (num_yn == true) { // 숫자일 때 정렬
|
|
if (sort_col_check[s_col_index] == 1) {
|
|
arr_tb.sort(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // 숫자 정렬 Asc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▼");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
} else if (sort_col_check[s_col_index] == 2) {
|
|
arr_tb.reverse(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // 숫자 정렬 Desc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▲");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
}
|
|
} else { // 문자일 때 정렬
|
|
if (sort_col_check[s_col_index] == 1) {
|
|
arr_tb.sort(); // 문자 정렬 Asc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▼");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
} else if (sort_col_check[s_col_index] == 2) {
|
|
arr_tb.reverse(); // 문자 정렬 Desc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▲");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
$(".t_table .t_contents").each(function (tr_i) {
|
|
var tmp_arr = arr_tb[tr_i].split("^||^");
|
|
var chk_ind = 0;
|
|
$(this).find("td").eq(s_col_index).text(tmp_arr[0]);
|
|
for (var i = 0; i < tmp_arr.length; i++) {
|
|
if (i != s_col_index) {
|
|
chk_ind = chk_ind + 1;
|
|
$(this).find("td").eq(i).text(tmp_arr[chk_ind]);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
function dateDiff(_date1, _date2) {
|
|
var diffDate_1 = _date1 instanceof Date ? _date1 : new Date(_date1);
|
|
var diffDate_2 = _date2 instanceof Date ? _date2 : new Date(_date2);
|
|
|
|
diffDate_1 = new Date(diffDate_1.getFullYear(), diffDate_1.getMonth() + 1, diffDate_1.getDate());
|
|
diffDate_2 = new Date(diffDate_2.getFullYear(), diffDate_2.getMonth() + 1, diffDate_2.getDate());
|
|
|
|
var diff = Math.abs(diffDate_2.getTime() - diffDate_1.getTime());
|
|
diff = Math.ceil(diff / (1000 * 3600 * 24));
|
|
|
|
return diff;
|
|
}
|
|
|
|
function search_go(command) {
|
|
var month_limit = 90;
|
|
var frm = document.work_status;
|
|
var chk_yn = false;
|
|
if (frm.s_date_st.value == "" || frm.s_date_end.value == "") {
|
|
alert("기간을 선택해주세요");
|
|
return;
|
|
}
|
|
if (dateDiff(frm.s_date_st.value, frm.s_date_end.value) > 90) {
|
|
alert("90일 이하의 기간만 검색이 가능합니다");
|
|
return;
|
|
}
|
|
$("input[name=s_work]").each(function (i) {
|
|
if ($(this).prop("checked") == true) {
|
|
chk_yn = true;
|
|
}
|
|
});
|
|
if (chk_yn == false) {
|
|
alert("업무를 1개 이상 선택해주세요");
|
|
return;
|
|
}
|
|
frm.action = "./work_status.asp?command=" + command;
|
|
frm.submit();
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" -->
|
|
<% end if %>
|