Files
KIN/project_list/project_list_2014.ASP

282 lines
13 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<link rel="stylesheet" type="text/css" href="/css/basic.css">
<%
set rsp = server.CreateObject("ADODB.RECORDSET")
p_depart = Session("Depart_Code")
tmp_month = request("tmp_month")
tmp_year = request("tmp_year")
tmp_state = request("tmp_state")
d_cost_type = request("d_cost_type")
cost_type = request("type")
gubun = request("cost_type")
index = request("index")
if p_depart = "" then
if instr(1, view_depart, ",") then
p_depart = cstr(trim(tmp_txt(0)))
else
p_depart = view_depart
end if
end if
if tmp_month = "" then
tmp_month = cstr(month(date()))
end if
'프로젝트 리스트 가져오기
if p_depart <= 10 or (p_depart >= 20 and p_depart <= 95) then
else
p_depart = ""
end If
If IsNull(gubun) = False and Trim(CStr(gubun)) <> "" Then
If CStr(gubun) = "1" Then
cost_type = "support"
End if
End if
if( Request.ServerVariables("REMOTE_ADDR") = "10.10.13.81" or Request.ServerVariables("REMOTE_ADDR") = "10.10.13.115" )then
response.write "<br> p_depart = "&p_depart
response.write "<br> tmp_month = "&tmp_month
response.write "<br> tmp_year = "&tmp_year
response.write "<br> tmp_state = "&tmp_state
response.write "<br> d_cost_type = "&d_cost_type
response.write "<br> cost_type = "&cost_type
response.write "<br> gubun = "&gubun
response.write "<br> index = "&index
end if
%>
<script src="/js/jquery.min.js"></script>
<script language=javascript>
function openit(p_sn, p_subject, p_sub_type, p_method_nm, p_child_sn) {
var p_sn_index = document.pms.p_sn_index.value;
var cost_type = '<%=cost_type%>'
if (p_sn_index != "") {
if (cost_type == "support") {
$(opener.document).find("input[id=p_sn" + p_sn_index + "]").val(p_child_sn);
} else {
$(opener.document).find("input[id=p_sn" + p_sn_index + "]").val(p_sn);
}
$(opener.document).find("input[id=p_subject" + p_sn_index + "]").val(p_subject);
} else {
opener.document.frm_money.p_sn.value = p_sn;
opener.document.frm_money.p_subject.value = p_subject;
}
//alert("cost_type : "+cost_type);
if (cost_type != "common" && cost_type != "support") {
window.opener.hangmokchange(p_sn, p_method_nm, p_child_sn);
}
self.close();
}
function subit() {
document.pms.action = "project_list_2014.asp";
document.pms.submit();
}
</script>
<form name="pms" method="post">
<input type="hidden" name="p_sn_index" value="<%=index%>"/>
<table width="100%" cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse;margin:5px 0px;" >
<tr>
<td align="center" class="tit2" style="width: 10%">프로젝트 번호</td>
<td align="center" class="tit2" style="width: 25%">프로젝트 명</td>
<td align="center" class="tit2" style="width: 20%">조사 방법</td>
<td align="center" class="tit2" style="width: 10%">조사 코드</td>
<td align="center" class="tit2" style="width: 25%">조사내용</td>
<td align="center" class="tit2" style="width: 10%">담당연구팀</td>
</tr>
<% If cost_type = "common" Then %>
<tr>
<td colspan = "6">
<table width="100%" height="37" cellpadding="0" cellspacing="1" border="0">
<% If (Session("N_depart") = "M" And Session("N_team") = "101") Or (Session("N_depart") = "S" And Session("N_team") = "601") Or (Session("User_Number") = "20250301") Then %>
<tr>
<td class="tit7" align="center" colspan="<%=Max_Col%>" style="cursor:pointer" onclick="openit('99999','일반업무','','','')">일반업무</td>
</tr>
<% End If %>
<% If (Session("N_depart") = "E" And Session("N_team") = "101") or Session("User_Number") = "20150302" or Session("User_Number") = "20031102" or Session("User_Number") = "20210405" Then '지정 사용자별 공통 프로젝트 노출
Select Case Session("User_Number")
Case "20160205" '박지훈
p_sn_list = "'9999010','9999061','9999062','9999063','9999064'"
Case "20210107" '신상욱
p_sn_list = "'9999002','9999066','9999091'"
Case "20190601" '이혜진
p_sn_list = "'9999007','9999071','9999072','9999073'"
Case "20210801" '서강신
p_sn_list = "'9999093'"
Case "20150302" '최환
p_sn_list = "'9999065'"
Case "20031102" '채주희
p_sn_list = "'9999017','9999019','9999020','9999013','9999016'"
Case "20210405" '김희정
p_sn_list = "'9999012'"
Case Else
p_sn_list = ""
End Select
If p_sn_list <> "" Then
query = "select * from v_project where p_sn like '9999%' and p_sn != '99999' and p_content is not null and p_sn IN (" & p_sn_list & ")"
rsc.Open query, adoConn, 1
for i = 1 to rsc.RecordCount
%>
<tr>
<td class="tit7" align="center" colspan="<%=Max_Col%>" style="cursor:pointer"
onclick="openit('<%=rsc("p_sn")%>','<%=rsc("p_subject")%>')"><%=rsc("p_subject")%>
</td>
</tr>
<%
rsc.MoveNext
Next
rsc.close
End If
Else
%>
<tr>
<td class="tit7" align="center" colspan="<%=Max_Col%>" style="cursor:pointer"
<%if (cint(Session("Depart_Code")) > 0 and cint(Session("Depart_Code")) <= 40) or cint(Session("Depart_Code")) >= 50 or Session("N_depart") = "S" AND Session("N_team") = "401" then
query = "select * from v_project where p_sn = '9999" & ZeroFormat(Session("Depart_Code"), 3) & "'"
'response.write query & "<br>"
adors.Open Query,adoconn,adOpenStatic,adLockReadOnly
%> onclick="openit('<%=adors("p_sn")%>','<%=adors("p_subject")%>')"><%=adors("p_subject")%>
<% adors.close
end if%>
</td>
</tr>
<% End If %>
<%if cint(Session("Depart_Code")) = 18 then '경영전략실의 경우
query = "select * from v_project where p_sn like '9999%' and p_sn != '99999' and p_content is not null and p_content != 'M999'"
'response.write query & "<br>"
'adors.Open Query,adoconn,adOpenStatic,adLockReadOnly
rsc.Open query, adoConn, 1
for i = 1 to rsc.RecordCount
%>
<tr>
<td class="tit7" align="center" colspan="<%=Max_Col%>" style="cursor:pointer"
onclick="openit('<%=rsc("p_sn")%>','<%=rsc("p_subject")%>')"><%=rsc("p_subject")%>
</td>
</tr>
<%
rsc.MoveNext
Next
rsc.close
end if%>
</table>
</td>
</tr>
<%
end if
if cost_type <> "common" then
%>
<!-- 신규 지출결의서 프로젝트 비용일 경우에 사용 -->
<!-- loop start -->
<%
'---------------------------------------------------------------
query = " SELECT T.p_sn, T.p_subject, T.p_sub_type "&VbCrlf
If d_cost_type = "research" Then
query = query & " , CASE T.p_sub_type WHEN 'M' THEN isnull(p_method_nm, 'Multi' ) ELSE p_method_nm END as p_method_nm "&VbCrlf
Else
query = query & " , CASE T.p_sub_type WHEN 'M' THEN 'Multi ['+p_method_nm+']' ELSE p_method_nm END as p_method_nm "&VbCrlf
End if
query = query & " , T.p_intention, T.p_depart_dep, D.d_name, p_child_sn "&VbCrlf
query = query & " FROM( "&VbCrlf
query = query & " SELECT TPB.p_sn, TPM.p_subject, TPM.p_sub_type, TPM.p_method_cd, TPM.p_intention ,TPB.p_depart_dep, TPM.p_child_sn "&VbCrlf
query = query & " FROM T_PROJECT_BASE as TPB INNER JOIN T_PROJECT_METHOD as TPM ON TPB.p_sn = TPM.p_sn "&VbCrlf
query = query & " AND TPM.p_progress_status >= (CASE WHEN TPM.p_rsch_dept = '90' THEN '006' ELSE '008' END) AND TPM.p_sub_type = 'C' "&VbCrlf
'조회 옵션
if p_depart <> "0" AND p_depart <> "" then
' 260126 박준성 수정
' 김현정 그룹장님의 요청으로 마케팅 본부원은 마케팅 본부의 모든 프로젝트를 대상으로 조회 될 수 있도록 수정
' https://koworks.kric.com/app/works/applet/98/doc/19759
query = query & " WHERE (("&VbCrlf
if d_cost_type = "research" AND p_depart >= 70 AND p_depart <= 79 then
query = query & " p_depart_dep / 10 = 7 "&VbCrlf
query = query & " or p_rsch_dept / 10 = 7 "&VbCrlf
else
query = query & " p_depart_dep = " & p_depart & " "&VbCrlf
query = query & " or p_rsch_dept = " & p_depart & " "&VbCrlf
' query = query & " or p_rsch_dept = 90 "&VbCrlf
query = query & " or p_field_dept = " & p_depart & " "&VbCrlf
query = query & " or p_is_dept = " & p_depart & " "&VbCrlf
query = query & " or p_it_dept = " & p_depart & " "&VbCrlf
query = query & " or p_supp_dept = " & p_depart & " " &VbCrlf
end if
' 260126 박준성 수정
query = query & " ) OR ( "
query = query & " p_rsch_1_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_2_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_3_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_4_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_1_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_2_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_3_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_4_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_1_c = '" & session("User_Number") & "' OR "
query = query & " p_rsch_2_c = '" & session("User_Number") & "' OR "
query = query & " p_rsch_3_c = '" & session("User_Number") & "' OR "
query = query & " p_rsch_4_c = '" & session("User_Number") & "' "
query = query & " )) "
else
'query = query & " WHERE (p_depart_dep <= 10 or (p_depart_dep >= 20 and p_depart_dep <=80) or p_rsch_dept = 90) "&VbCrlf
query = query & " WHERE 1=1 "&VbCrlf
end If
If d_cost_type = "field" Then
query = query & " and tpm.p_field_complete is null "&VbCrlf
if Session("teamplace") <>"3" then
query = query & " and (tpm.p_sv_1 = '"& Session("User_Number") &"' or tpm.p_sv_2 = '"& Session("User_Number") &"' or tpm.p_sv_3 = '"& Session("User_Number") &"' or tpm.p_sv_4 = '"& Session("User_Number") &"' or tpm.p_code_1 = '"& Session("User_Number") &"' or tpm.p_verify_1 = '"& Session("User_Number") &"' or tpm.p_punch_1 = '"& Session("User_Number") &"') "&VbCrlf
end if
elseif d_cost_type = "research" Then
query = query & " and tpm.p_research_complete is null "&VbCrlf
elseif d_cost_type = "dp" Then
query = query & " and tpm.p_dp_complete is null "&VbCrlf
else
query = query & " and (tpm.p_research_complete + tpm.p_field_complete + tpm.p_dp_complete IS NULL) "&VbCrlf
End if
query = query & " and TPB.p_sn > '19' "
query = query & " ) as T "&VbCrlf
query = query & " LEFT OUTER JOIN Depart D ON T.p_depart_dep = D.d_code AND D.d_yes_no = 'Y' "&VbCrlf
query = query & " LEFT OUTER JOIN T_PROJECT_METHOD_CD TPMC ON T.p_method_cd = TPMC.p_method_cd "&VbCrlf
query = query & " GROUP BY p_sn, p_subject, p_sub_type, T.p_method_cd, p_method_nm, p_intention, p_depart_dep, d_name, p_child_sn "&VbCrlf
query = query & " ORDER BY p_sn, p_child_sn, p_subject"&VbCrlf
'---------------------------------------------------------------
' Response.Write query & "<BR>"
rsc.Open query, adoConn, 1
if rsc.RecordCount > 0 Then
%>
<!-- <tr><td align="center"><%=rsc.RecordCount%></td></tr> -->
<%
for i = 1 to rsc.RecordCount
tmp_content = rsc("p_subject")
%>
<tr>
<td class="tit7" align="center"><%=rsc("p_sn")%></td> <!-- 프로젝트 번호 -->
<td class="tit7" align="left">&nbsp;<a href="javascript:openit('<%=rsc("p_sn")%>','<%=rsc("p_subject")%>','<%=rsc("p_sub_type")%>','<%=rsc("p_method_nm")%>','<%=rsc("p_child_sn")%>')" class="blue"><%=rsc("p_subject")%></td>
<td class="tit7" align="center"><%=rsc("p_method_nm")%></td> <!-- 조사 방법 -->
<td class="tit7" align="center"><%=rsc("p_child_sn")%></td> <!-- 조사 코드 -->
<td class="tit7" align="center"><%=rsc("p_intention")%></td> <!-- 조사내용 -->
<td class="tit7" align="center"><%=rsc("d_name")%></td> <!-- 담당연구팀 -->
</tr>
<%
rsc.MoveNext
next
end if
rsc.Close
%>
<!-- loop end -->
<% End If %>
</table>
</form>