최초커밋
This commit is contained in:
324
inspection/interviewer_status.asp
Normal file
324
inspection/interviewer_status.asp
Normal file
@@ -0,0 +1,324 @@
|
||||
<!-- #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_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", "<22><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ"
|
||||
.Add "p_child_sn", "FCS<43><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ"
|
||||
.Add "p_subject", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE>"
|
||||
.Add "work_kind", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
.Add "m_name", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
.Add "s_area", "<22><><EFBFBD><EFBFBD>"
|
||||
.Add "s_type", "<22><><EFBFBD><EFBFBD>Type"
|
||||
.Add "inspection_user_name", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
.Add "r_date", "<22>̰<EFBFBD><CCB0><EFBFBD>¥"
|
||||
.Add "sum_esc", "<22>̰<EFBFBD><CCB0>μ<EFBFBD>"
|
||||
.Add "sum_tok", "TOK"
|
||||
.Add "sum_pass", "PASS"
|
||||
.Add "sum_err", "ERR"
|
||||
.Add "sum_notel", "NOTEL"
|
||||
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>FF <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ȳ</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=FF_Status.xls"
|
||||
end if
|
||||
%>
|
||||
<form name="interviewer_status" method="post">
|
||||
<input type="hidden" value="<%=command %>" name="command" />
|
||||
<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%"><3E><> <20><></td>
|
||||
<td align="left" width="38%">
|
||||
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_st %>" name="s_date_st" class='selectDate' readonly />
|
||||
~
|
||||
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_end %>" name="s_date_end" class='selectDate' readonly />
|
||||
</td>
|
||||
<td align="center" width="12%"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></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%"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD></td>
|
||||
<td align="left" width="38%">
|
||||
<input type="text" name="s_p_sn" value="<%=s_p_sn %>" style="width:200px;"/>
|
||||
</td>
|
||||
<td align="center" width="12%"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><></td>
|
||||
<td align="left" width="38%">
|
||||
<input type="text" name="s_p_subject" value="<%=s_p_subject %>" style="width:200px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="12%"><3E><><EFBFBD><EFBFBD> Column <20><><EFBFBD><EFBFBD></td>
|
||||
<td align="left" width="88%" colspan="3">
|
||||
<label class='mx-2' for="r_date"><input type="checkbox" value="r_date" id="r_date" name="s_column"/> <20>̰<EFBFBD><CCB0><EFBFBD>¥</label>
|
||||
<label class='mx-2' for="intranet_project"><input type="checkbox" value="intranet_project" id="intranet_project" name="s_column"/> <20><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</label>
|
||||
<label class='mx-2' for="p_child_sn"><input type="checkbox" value="p_child_sn,p_subject" id="p_child_sn" name="s_column"/> FCS<43><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</label>
|
||||
<label class='mx-2' for="s_area"><input type="checkbox" value="s_area" id="s_area" name="s_column"/> <20><><EFBFBD><EFBFBD></label>
|
||||
<label class='mx-2' for="s_type"><input type="checkbox" value="s_type" id="s_type" name="s_column"/> <20><><EFBFBD><EFBFBD>Type</label>
|
||||
<label class='mx-2' for="m_name"><input type="checkbox" value="m_name" id="m_name" name="s_column"/> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></label>
|
||||
<label class='mx-2' for="inspection_user_name"><input type="checkbox" value="inspection_user_name" id="inspection_user_name" name="s_column"/> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="right"><font color="red"><b><3E>˻<EFBFBD> <20><> 1<>п<EFBFBD><D0BF><EFBFBD> 10<31><30> <20><><EFBFBD><EFBFBD> <20>ҿ<EFBFBD><D2BF><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD></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, m_name, "
|
||||
End if
|
||||
query = query & " SUM(esc_cnt) as sum_esc, SUM(tok_cnt) as sum_tok, SUM(err_cnt) as sum_err, SUM(no_tel) as sum_notel, SUM(pass_cnt) as sum_pass "
|
||||
query = query & " FROM "
|
||||
query = query & " ( "
|
||||
query = query & " SELECT TPF.p_subject, CASE WHEN TPF.intranet_project = '' THEN TPF.p_child_sn ELSE TPF.intranet_project END as intranet_project, "
|
||||
query = query & " TPF.p_child_sn, R.r_date, R.s_area, R.s_type, "
|
||||
query = query & " R.m_name, R.m_no, "
|
||||
query = query & " 1 as esc_cnt, "
|
||||
query = query & " CASE WHEN TIR.r_result = '1' AND TIR.qc_stat = 'OK' THEN 1 ELSE 0 END as tok_cnt, "
|
||||
query = query & " CASE WHEN TIR.r_result <> '1' AND TIR.pass_stat = 'PASS' THEN 1 ELSE 0 END as pass_cnt, "
|
||||
query = query & " CASE WHEN TIR.pass_stat = 'ERROR' THEN 1 ELSE 0 END as err_cnt, "
|
||||
query = query & " CASE WHEN TIR.r_result IN ('5', '6', '7') AND TIR.pass_stat NOT IN ('ERROR', 'PASS') THEN 1 ELSE 0 END as no_tel, "
|
||||
query = query & " ISNULL(M.m_name, ISNULL(P.p_name, '')) as inspection_user_name, ISNULL(TIR.inspection_user, '') as inspection_user, CONVERT(VARCHAR(10), TIR.inspection_date, 120) as inspection_date "
|
||||
query = query & " FROM RES R WITH(NOLOCK) "
|
||||
query = query & " LEFT OUTER JOIN T_INSPECTION_RES TIR WITH(NOLOCK) ON R.r_sn = TIR.r_sn "
|
||||
query = query & " LEFT OUTER JOIN V_PROJECT_FCS TPF WITH(NOLOCK) ON R.p_sn = TPF.p_child_sn "
|
||||
query = query & " LEFT OUTER JOIN Man M WITH(NOLOCK) ON TIR.inspection_user = M.id "
|
||||
query = query & " LEFT OUTER JOIN Person P WITH(NOLOCK) ON TIR.inspection_user = P.p_no "
|
||||
query = query & " WHERE DelGubun = 'N' AND r_error IS NULL AND s_error IS NULL AND m_error IS NULL AND q_error IS NULL "
|
||||
query = query & " ) T "
|
||||
query = query & " WHERE r_date BETWEEN '" & s_date_st & "' AND '" & s_date_end & "' "
|
||||
If s_name <> "" Then
|
||||
query = query & " AND m_name LIKE '%" & s_name & "%' "
|
||||
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 intranet_project, p_subject, m_name "
|
||||
query = query & " ORDER BY intranet_project, p_subject, m_name "
|
||||
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>
|
||||
<%
|
||||
Next
|
||||
%>
|
||||
</tr>
|
||||
<%
|
||||
Else
|
||||
%>
|
||||
<tr height="25px">
|
||||
<td align="center" width="100%"><3E>˻<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
End If
|
||||
|
||||
Do While Not AdoRs.Eof
|
||||
%>
|
||||
<tr class="t_contents">
|
||||
<%
|
||||
For i = 0 To AdoRs.fields.count - 1 ' <20><><EFBFBD><EFBFBD> - 1 <20><> <20>ؾߵǴµ<C7B4>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD> cnt <20><> Detail ȭ<><C8AD> <20><>ũ<EFBFBD><C5A9> <20>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
%>
|
||||
<td align="center" style=""><%= AdoRs.fields(i) %></td>
|
||||
<%
|
||||
Next
|
||||
%>
|
||||
</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_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<><31> asc, 2<><32> desc, 0<><30> <20>ʱ<EFBFBD>
|
||||
});
|
||||
$(".t_table .t_head td").click(function () {
|
||||
// $(".t_table .t_head td").index(this) Ŭ<><C5AC><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> INDEX
|
||||
// $(".t_table .t_head > td").length tr<74><72> column <20><>
|
||||
// $(".t_table .t_contents").length tr<74><72> row <20><>
|
||||
// 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) { // <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʾƾ<CABE> Sort <20><><EFBFBD><EFBFBD>
|
||||
if (num_yn == true) { // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
if (sort_col_check[s_col_index] == 1) {
|
||||
arr_tb.sort(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Asc
|
||||
$(".t_table .t_head td").each(function (e) {
|
||||
if (e == s_col_index) {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
|
||||
} else {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
|
||||
}
|
||||
});
|
||||
} else if (sort_col_check[s_col_index] == 2) {
|
||||
arr_tb.reverse(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Desc
|
||||
$(".t_table .t_head td").each(function (e) {
|
||||
if (e == s_col_index) {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
|
||||
} else {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
|
||||
}
|
||||
});
|
||||
}
|
||||
} else { // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
if (sort_col_check[s_col_index] == 1) {
|
||||
arr_tb.sort(); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Asc
|
||||
$(".t_table .t_head td").each(function (e) {
|
||||
if (e == s_col_index) {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
|
||||
} else {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
|
||||
}
|
||||
});
|
||||
} else if (sort_col_check[s_col_index] == 2) {
|
||||
arr_tb.reverse(); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Desc
|
||||
$(".t_table .t_head td").each(function (e) {
|
||||
if (e == s_col_index) {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
|
||||
} else {
|
||||
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
$(".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 search_go(command) {
|
||||
var frm = document.interviewer_status;
|
||||
if (frm.s_date_st.value == "" || frm.s_date_end.value == "") {
|
||||
alert("<22>Ⱓ<EFBFBD><E2B0A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>");
|
||||
return;
|
||||
}
|
||||
frm.action = "./interviewer_status.asp?command=" + command;
|
||||
frm.submit();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
<% end if %>
|
||||
Reference in New Issue
Block a user