Files
KIN/project/project_ing_info.asp
2025-09-29 17:55:08 +09:00

307 lines
13 KiB
Plaintext

<!-- #include virtual = "include/header.asp" -->
<!-- #include virtual = "include/left.asp" -->
<%
'-- ~부터
dim s_date_st
if request.form("s_date_st")="" then
s_date_st=left(date(),7)&"-01"
else
s_date_st=request.form("s_date_st")
end if
'-- ~까지
dim s_date_end
if request.form("s_date_end")="" then
s_date_end=left(date(),7)&"-31"
else
s_date_end=request.form("s_date_end")
end if
dim ttgubn
if request.form("ttgubn")="" then
ttgubn="실사종료일"
else
ttgubn=request.form("ttgubn")
end if
%>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- 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" onclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}" ondblclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}">
<form method='post' id='xform' name='xform'>
<table class='w-100'>
<tr>
<td></td>
<td align="right">
<select name="ttgubn" >
<option value="실사종료일" <%if ttgubn="실사종료일" then %> selected <%end if %> >실사 종료일</option>
<option value="DP종료일" <%if ttgubn="DP종료일" then %> selected <%end if %> >DP 종료일</option>
<option value="OT일" <%if ttgubn="OT일" then %> selected <%end if %> >OT 일</option>
</select>&nbsp;
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_st%>" name="s_date_st" readonly OnClick="winopn_two('../include/calendar.html?actval=s_date_st')">
<img src="/images/common/btn_calendar.jpg" align="absmiddle" OnClick="winopn_two('../include/calendar.html?actval=s_date_st')" style="cursor:pointer;" >
~
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_end%>" name="s_date_end" readonly OnClick="winopn_two('../include/calendar.html?actval=s_date_end')">
<img src="/images/common/btn_calendar.jpg" align="absmiddle" OnClick="winopn_two('../include/calendar.html?actval=s_date_end')" style="cursor:pointer;">
&nbsp;&nbsp;&nbsp;<a href="javascript:search_go(xform);"><img src="/images/common/btn_smallsrch.gif" /></a>
&nbsp;&nbsp;<a href="javascript:excel_go(xform);"><img src="/images/common/btn_smallexcel.gif" /></a>
</td>
</tr>
</table>
<table class="table table-sm table-bordered" style='font-size:13px;'>
<thead>
<tr>
<td onclick="gwanshic(tbody01,0);" class="text-center" style="cursor:pointer">No</td>
<td onclick="gwanshic(tbody01,1);" class="text-center" style="cursor:pointer">인트라넷<br>프로젝트</td>
<td onclick="gwanshic(tbody01,3);" class="text-center" style="cursor:pointer">프로젝트명</td>
<td onclick="gwanshic(tbody01,4);" class="text-center" style="cursor:pointer">진행상황</td>
<td onclick="gwanshic(tbody01,5);" class="text-center" style="cursor:pointer">조사방법</td>
<td onclick="gwanshic(tbody01,6);" class="text-center" style="cursor:pointer">연구<br>담당</td>
<td onclick="gwanshic(tbody01,7);" class="text-center" style="cursor:pointer">실사<br>담당</td>
<td onclick="gwanshic(tbody01,8);" class="text-center" style="cursor:pointer">코딩<br>담당</td>
<td onclick="gwanshic(tbody01,9);" class="text-center" style="cursor:pointer">펀치<br>담당</td>
<td onclick="gwanshic(tbody01,10);" class="text-center" style="cursor:pointer">DP<br>담당</td>
<td onclick="gwanshic(tbody01,11);" class="text-center" style="cursor:pointer">표본수</td>
<td onclick="gwanshic(tbody01,12);" class="text-center" style="cursor:pointer">OT일</td>
<td onclick="gwanshic(tbody01,13);" class="text-center" style="cursor:pointer">실사<br>종료일</td>
<td onclick="gwanshic(tbody01,14);" class="text-center" style="cursor:pointer">DP<br>종료일</td>
</tr>
</thead>
<tbody id="tbody01">
<%
sql=""&VbCrlf
sql=sql&" select AAA.* from "&VbCrlf
sql=sql&" ( "&VbCrlf
sql=sql&" select "&VbCrlf
sql=sql&" C5.team_name, "&VbCrlf
sql=sql&" C0.p_rsch_name, "&VbCrlf
sql=sql&" C1.p_sv_name, "&VbCrlf
sql=sql&" C2.p_code_name, "&VbCrlf
sql=sql&" C3.p_punch_name, "&VbCrlf
sql=sql&" C4.p_dp_name, "&VbCrlf
sql=sql&" AA.* "&VbCrlf
sql=sql&" from "&VbCrlf
sql=sql&" ( "&VbCrlf
sql=sql&" select "&VbCrlf
sql=sql&" A.p_child_sn as 프로젝트코드, "&VbCrlf
sql=sql&" A.p_subject as 프로젝트명, "&VbCrlf
sql=sql&" A.p_method_cd, "&VbCrlf
sql=sql&" B.조사방법, "&VbCrlf
sql=sql&" case when A.p_rsch_1_a<>'' then A.p_rsch_1_a "&VbCrlf
sql=sql&" when A.p_rsch_2_a<>'' then A.p_rsch_2_a "&VbCrlf
sql=sql&" when A.p_rsch_3_a<>'' then A.p_rsch_3_a "&VbCrlf
sql=sql&" when A.p_rsch_4_a<>'' then A.p_rsch_4_a else '' end as p_rsch, "&VbCrlf
sql=sql&" case when A.p_sv_1<>'' then A.p_sv_1 "&VbCrlf
sql=sql&" when A.p_sv_2<>'' then A.p_sv_2 "&VbCrlf
sql=sql&" when A.p_sv_3<>'' then A.p_sv_3 "&VbCrlf
sql=sql&" when A.p_sv_4<>'' then A.p_sv_4 else '' end as p_sv, "&VbCrlf
sql=sql&" case when A.p_code_1<>'' then A.p_code_1 "&VbCrlf
sql=sql&" when A.p_code_2<>'' then A.p_code_2 "&VbCrlf
sql=sql&" when A.p_code_3<>'' then A.p_code_3 "&VbCrlf
sql=sql&" when A.p_code_4<>'' then A.p_code_4 else '' end as p_code, "&VbCrlf
sql=sql&" case when A.p_punch_1<>'' then A.p_punch_1 "&VbCrlf
sql=sql&" when A.p_punch_2<>'' then A.p_punch_2 "&VbCrlf
sql=sql&" when A.p_punch_3<>'' then A.p_punch_3 "&VbCrlf
sql=sql&" when A.p_punch_4<>'' then A.p_punch_4 else '' end as p_punch, "&VbCrlf
sql=sql&" case when A.p_dp_1<>'' then A.p_dp_1 "&VbCrlf
sql=sql&" when A.p_dp_2<>'' then A.p_dp_2 "&VbCrlf
sql=sql&" when A.p_dp_3<>'' then A.p_dp_3 "&VbCrlf
sql=sql&" when A.p_dp_4<>'' then A.p_dp_4 else '' end as p_dp, "&VbCrlf
sql=sql&" A.p_sample as 표본수, "&VbCrlf
sql=sql&" A.p_ot_date as OT일, "&VbCrlf
sql=sql&" A.p_field_date_end as 실사종료일, "&VbCrlf
sql=sql&" A.p_dp_date_end as DP종료일, "&VbCrlf
sql=sql&" A.p_rsch_dept as 진행부서, "&VbCrlf
sql=sql&" A.p_progress_status as 진행상황 "&VbCrlf
' sql=sql&" -- ,A.* "
sql=sql&" from "&VbCrlf
sql=sql&" ( "&VbCrlf
sql=sql&" select * from [dbo].[T_PROJECT_METHOD] "&VbCrlf
sql=sql&" where p_complete_date is null "&VbCrlf
sql=sql&" ) A "&VbCrlf
sql=sql&" left join "&VbCrlf
sql=sql&" (select p_method_cd, p_method_nm as 조사방법 from [dbo].[T_PROJECT_METHOD_CD]) B "&VbCrlf
sql=sql&" on A.p_method_cd=B.p_method_cd "&VbCrlf
sql=sql&" ) AA "&VbCrlf
sql=sql&" left join " &VbCrlf
sql=sql&" (select p_no, p_name as p_rsch_name from person) C0 "&VbCrlf'##### 연구
sql=sql&" on AA.p_rsch=C0.p_no "&VbCrlf
sql=sql&" left join "&VbCrlf
sql=sql&" (select p_no, p_name as p_sv_name from person) C1 "&VbCrlf'##### 실사
sql=sql&" on AA.p_sv=C1.p_no "&VbCrlf
sql=sql&" left join "&VbCrlf
sql=sql&" (select p_no, p_name as p_code_name from person) C2 "&VbCrlf '##### 코딩
sql=sql&" on AA.p_code=C2.p_no "&VbCrlf
sql=sql&" left join "&VbCrlf
sql=sql&" (select p_no, p_name as p_punch_name from person) C3 "&VbCrlf '##### 펀치
sql=sql&" on AA.p_code=C3.p_no "&VbCrlf
sql=sql&" left join "&VbCrlf
sql=sql&" (select p_no, p_name as p_dp_name from person) C4 "&VbCrlf '##### dp
sql=sql&" on AA.p_dp=C4.p_no "&VbCrlf
sql=sql&" left join "&VbCrlf
sql=sql&" (select team_cd,team_name from TEAM_GROUP) C5 "&VbCrlf
sql=sql&" on AA.진행부서=C5.team_cd "&VbCrlf
sql=sql&" ) AAA "&VbCrlf
'-- sql=sql&" where AAA.프로젝트코드<>'' "
sql=sql&" where len(isnull(AAA.OT일,''))+len(isnull(AAA.실사종료일,''))+len(isnull(AAA.DP종료일,''))>0 "&VbCrlf
sql=sql&" and left(AAA."&ttgubn&",10) between '"&s_date_st&"' and '"&s_date_end&"' "&VbCrlf
select case ttgubn
case "실사종료일" : sql=sql&" order by AAA.실사종료일 asc "&VbCrlf
case "DP종료일" : sql=sql&" order by AAA.DP종료일 asc "&VbCrlf
case "OT일" : sql=sql&" order by AAA.OT일 asc "&VbCrlf
end select
Rs.Open sql, adoConn, 1
dim acnt : acnt=1
dim pro
dim pro_style
while not Rs.Eof
Select case Rs("진행상황")
case "006"
pro="부서정보/예산 입력중"
pro_style=""
case "007"
pro="결재 진행중"
pro_style=""
case "008"
pro="결재 완료"
pro_style="color:red;"
End Select
%>
<tr>
<td style="text-align:center;" ><%=acnt%></td>
<td style="text-align:center;" ><%=Rs("프로젝트코드")%></td>
<td style="text-align:left;" ><% if Rs("진행부서") = session("depart_code") OR Cint(session("depart_code")) < 20 then %>&nbsp;
<a href="javascript:openit('','<%=left(Rs("프로젝트코드"),7)%>','<%=mid(Rs("프로젝트코드"),9,1)%>','<%=Rs("p_method_cd")%>','<%=Rs("프로젝트코드")%>');" ><%=Rs("프로젝트명")%></a><%else
%><%=Rs("프로젝트명")%><%End IF%>
</td>
<td style="text-align:center;<%=pro_style %>" ><%=pro%></td>
<td style="text-align:center;" ><%=Rs("조사방법")%></td>
<td style="text-align:center;" ><%=Rs("p_rsch_name")%></td>
<td style="text-align:center;" ><%=Rs("p_sv_name")%></td>
<td style="text-align:center;" ><%=Rs("p_code_name")%></td>
<td style="text-align:center;" ><%=Rs("p_punch_name")%></td>
<td style="text-align:center;" ><%=Rs("p_dp_name")%></td>
<% If isnull(Rs("표본수")) Then %>
<td style="text-align:right;" >--&nbsp;&nbsp;</td>
<% Else %>
<td style="text-align:right;" ><%=formatnumber(Rs("표본수"),0)%>&nbsp;&nbsp;</td>
<% End If %>
<td style="text-align:center;" ><%=left(Rs("OT일"),10)%></td>
<td style="text-align:center;" ><%=left(Rs("실사종료일"),10)%></td>
<td style="text-align:center;" ><%=left(Rs("DP종료일"),10)%></td>
</tr>
<%
acnt=acnt+1
Rs.movenext
Wend
Rs.Close
%>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
function openit(a, z, x, y, v) {
var url = 'project_list2_dep_2014.asp?p_sn=' + z;
var tmp_width = 1400;
var tmp_height = 800;
if (v != "") {
url = url + "&p_sub_type=" + x + "&p_method_cd=" + y + "&p_child_sn=" + v;
} else {
url = url + "&p_sub_type=" + x + "&p_method_cd=" + y;
}
winObj=window.open(url, '', 'left=0,top=0,width=' + tmp_width + ',height=' + tmp_height + ',scrollbars=yes,resizable=yes');
}
function winopn_two(urlstr) {
var pwidth=250;
var pheight=300;
var tleft=(screen.width-pwidth)/2;
var ttop=(screen.height-pheight)/2;
winObj=window.open(urlstr, "wins2", "left="+tleft+", top="+ttop+", menubar=no, location=no, status=no, toolbar=no, width="+pwidth+", height="+pheight+", scrollbars=yes ,resizable=no");
winObj.focus();
}
function search_go(x){
x.target="";
x.action="project_ing_info.asp";
x.submit();
}
function excel_go(x){
x.target="";
x.action="project_ing_info_excel.asp";
x.submit();
}
var index;
var toggleBool;
function gwanshic(tbody, index){
this.index = index;
if(toggleBool){toggleBool = false;}
else{toggleBool = true;}
var datas= new Array();
var tbodyLength = tbody.rows.length;
for(var i=0; i<tbodyLength; i++){datas[i] = tbody.rows[i];}
datas.sort(compareCells);
for(var i=0; i<tbody.rows.length; i++){tbody.appendChild(datas[i]);}
}
function compareCells(a,b) {
var aVal = a.cells[index].innerText;
var bVal = b.cells[index].innerText;
aVal = aVal.replace(/\,/g, '');
bVal = bVal.replace(/\,/g, '');
if(toggleBool){
var temp = aVal;
aVal = bVal;
bVal = temp;
}
if(aVal.match(/^[0-9]+$/) && bVal.match(/^[0-9]+$/)){
return parseFloat(aVal) - parseFloat(bVal);
}else{
if (aVal < bVal){ return -1;}
else if (aVal > bVal){ return 1;}
else{return 0;}
}
}
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->