Files
KIN/project_list/project_other_list.ASP
2025-09-29 17:55:08 +09:00

194 lines
11 KiB
Plaintext

<!-- #include virtual = "include/header.asp" -->
<!-- #include virtual = "include/left.asp" -->
<%
Dim p_cont_month
p_cont_month = request("p_cont_month")
If p_cont_month = "" Then
p_cont_month = "3"
End If
obj_type = request("obj_type")
obj_prj = request("obj_prj")
obj_cli = request("obj_cli")
%>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<h1>Menu Name</h1>
</div>
<!-- /.content-header -->
<!-- Main content -->
<div class="content-body">
<div class="content">
<div class="container-fluid">
<div class="row row-0">
<div class="col-12">
<form name="ofrm" method="post">
<input type="hidden" name="obj_type" value="<%=obj_type %>" />
<input type="hidden" name="obj_prj" value="<%=obj_prj %>" />
<input type="hidden" name="obj_cli" value="<%=obj_cli %>" />
<ul class="nav nav-tabs nav-fill">
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#p_cont">프로젝트</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#p_proj">수행계획서</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#p_etc">기타 입력</a>
</li>
</ul>
<div class="tab-content">
<div id="p_cont" class="tab-pane fade show active">
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
<tr>
<td align="right" colspan="3">
최근
<select name="p_cont_month" onchange="month_change();" style="width:40px;">
<option value="3" <%if p_cont_month = "3" then %> selected <%end if %>>3</option>
<option value="6" <%if p_cont_month = "6" then %> selected <%end if %>>6</option>
<option value="9" <%if p_cont_month = "9" then %> selected <%end if %>>9</option>
<option value="12" <%if p_cont_month = "12" then %> selected <%end if %>>12</option>
<option value="24" <%if p_cont_month = "24" then %> selected <%end if %>>24</option>
</select>
개월 이내 등록된 목록
</td>
</tr>
<tr>
<td align="center" style="width:15%">제안 번호</td>
<td align="center" style="width:60%">프로젝트 명</td>
<td align="center" style="width:25%">클라이언트</td>
</tr>
<%
query = ""
query = query & " SELECT TPB.p_sn, TPB.p_subject, "
query = query & " ISNULL(VCC.p_cli_company_nm, '') as company_nm "
query = query & " FROM T_PROJECT_BASE TPB "
query = query & " LEFT OUTER JOIN V_CLIENT_COMP VCC ON TPB.p_cli_company_cd = VCC.p_cli_company_cd "
query = query & " WHERE (p_state = 'P' OR p_state = 'K') "
query = query & " AND TPB.p_depart_dep = '" & session("Depart_Code") & "' "
query = query & " AND TPB.p_input_dt > DATEADD(M, -" & p_cont_month & ", GETDATE()) "
query = query & " ORDER BY TPB.p_input_dt DESC "
Rs.Open query, adoConn, 1
if Rs.RecordCount > 0 Then
for i = 1 to Rs.RecordCount
%>
<tr>
<td align="center"><a href="javascript:sel_prj('1', '<%=Rs("p_sn") %>', '<%=Rs("company_nm") %>');" class="blue"><%=Rs("p_sn") %></a></td>
<td align="left"><a href="javascript:sel_prj('1', '<%=Rs("p_sn") %>', '<%=Rs("company_nm") %>');" class="blue"><%=Rs("p_subject") %></a></td>
<td align="center"><%=Rs("company_nm") %></td>
</tr>
<%
Rs.MoveNext
next
end if
Rs.Close
%>
</table>
</div>
<div id="p_proj" class="tab-pane fade">
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
<tr>
<td align="center" style="width:15%">프로젝트 번호</td>
<td align="center" style="width:60%">프로젝트 명</td>
<td align="center" style="width:25%">클라이언트</td>
</tr>
<%
query = ""
query = query & " SELECT TPM.p_child_sn, TPM.p_subject, "
query = query & " ISNULL(VCC.p_cli_company_nm, '') as company_nm "
query = query & " FROM "
query = query & " ( "
query = query & " SELECT p_user, p_child_sn FROM Job_ProjectList GROUP BY p_user, p_child_sn "
query = query & " ) JP "
query = query & " LEFT OUTER JOIN T_PROJECT_METHOD TPM ON JP.p_child_sn = TPM.p_child_sn "
query = query & " LEFT OUTER JOIN V_CLIENT_COMP VCC ON TPM.p_cli_company_cd = VCC.p_cli_company_cd "
query = query & " WHERE JP.p_user = '" & session("User_Number") & "' "
query = query & " ORDER BY TPM.p_sn DESC, TPM.p_child_sn "
Rs.Open query, adoConn, 1
if Rs.RecordCount > 0 Then
for i = 1 to Rs.RecordCount
%>
<tr>
<td align="center"><a href="javascript:sel_prj('2', '<%=Rs("p_child_sn") %>', '<%=Rs("company_nm") %>');" class="blue"><%=Rs("p_child_sn") %></a></td>
<td align="left"><a href="javascript:sel_prj('2', '<%=Rs("p_child_sn") %>', '<%=Rs("company_nm") %>');" class="blue"><%=Rs("p_subject") %></a></td>
<td align="center"><%=Rs("company_nm") %></td>
</tr>
<%
Rs.MoveNext
next
end if
Rs.Close
%>
</table>
</div>
<div id="p_etc" class="tab-pane fade">
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
<tr>
<td align="center">기타 클라이언트 입력</td>
</tr>
<tr>
<td align="center">
<input type="text" class='form-control text-center' name="p_etc_text" id="p_etc_text" value="" />
<input type="button" class="btn btn-secondary btn-block" value="입력 완료" onclick="sel_prj('3', '', '');" />
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
$(function () {
cutmenu();
$("a[href='#p_cont']").click();
});
function sel_prj(div, code, cli) {
var frm = document.ofrm;
var obj_type = frm.obj_type.value;
var obj_prj = frm.obj_prj.value;
var obj_cli = frm.obj_cli.value;
var cli_str = cli;
if (div == "3") {
var spec_str = /[$\\@\\\#%\^\&\{\}\`\-\=\|\/\;\"\']/;
if (frm.p_etc_text.value == "") {
alert("기타 클라이언트 명을 입력해주세요.");
return;
} else if (frm.p_etc_text.value.search(spec_str) != -1) {
alert("특수문자를 제거 후 다시 생성하기 버튼을 눌러주세요.");
return;
}
cli_str = frm.p_etc_text.value;
}
opener.document.forms[0].elements[obj_type].value = div;
opener.document.forms[0].elements[obj_prj].value = code;
if (code != "") {
opener.document.forms[0].elements[obj_cli].value = "[" + code + "] " + cli_str;
} else {
opener.document.forms[0].elements[obj_cli].value = cli_str;
}
self.close();
}
function month_change() {
var frm = document.ofrm;
frm.action = "./project_other_list.ASP";
frm.submit();
}
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->