956 lines
39 KiB
Plaintext
956 lines
39 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<%
|
|
set rsp = server.CreateObject("ADODB.RECORDSET")
|
|
set rsa = server.CreateObject("ADODB.RECORDSET")
|
|
set rsm = server.CreateObject("ADODB.RECORDSET")
|
|
|
|
p_sn = request("p_sn")
|
|
p_sub_type = request("p_sub_type")
|
|
tmp_teamname = ""
|
|
x = "1"
|
|
'============================================================================
|
|
'2010/11/16 기존에 결재중이거나 결재완료된 것이 있다면 올릴 수 없도록 함
|
|
query = "SELECT * "
|
|
query = query & "FROM 문서내용 AS a "
|
|
query = query & " INNER JOIN Document AS b on a.문서번호 = b.d_no "
|
|
query = query & "WHERE a.문서제목 = '프로젝트수행계획서' "
|
|
query = query & " AND a.del_yes_no = 'no' "
|
|
If p_sub_type = "M" then
|
|
query = query & " AND a.p_sn = '" & p_sn & "' and p_child_sn like '" & p_sn & "_M%' "
|
|
else
|
|
query = query & " AND a.p_child_sn = '" & p_child_sn & "' "
|
|
end if
|
|
rsp.Open query, adoConn, 1
|
|
|
|
if rsp.RecordCount > 0 then
|
|
if rsp("d_order_cnt") = "77" then
|
|
alert4 "[결재자 : " & rsp("d_write_name") & "] 이미 결재 완료되었습니다."
|
|
else
|
|
alert4 "[결재자 : " & rsp("d_write_name") & "] 이미 결재 진행중입니다."
|
|
end if
|
|
end if
|
|
rsp.Close
|
|
'============================================================================
|
|
|
|
Dim research_count
|
|
research_count = 0
|
|
|
|
''' Response.Write p_sub_type & "<BR>"
|
|
|
|
'프로젝트 기본 정보 가져오기
|
|
If p_sub_type = "M" then
|
|
query = " SELECT p_sn, p_sn+'_M' as p_child_sn, PB.p_cli_company_cd as p_cli_company_cd, PB.p_cli_per_cd as p_cli_per_cd, "
|
|
query = query & " p_state, p_subject, p_cli_company_nm, CP.p_cli_depart as p_cli_depart, "
|
|
query = query & " p_cli_per_nm, p_cli_per_com_tel, p_cli_per_tel, p_cli_per_email, "
|
|
query = query & " PB.p_client_type_cd as p_client_type_cd, p_cont_cost, p_decide_date, "
|
|
query = query & " p_con_date_st, p_con_date_end, p_export_range, p_category, "
|
|
query = query & " p_memo, pb.p_depart_dep as p_depart_dep, PB.p_input_user "
|
|
query = query & " FROM "
|
|
query = query & " T_PROJECT_BASE PB INNER JOIN V_CLIENT_COMP CC ON PB.p_cli_company_cd = CC.p_cli_company_cd "
|
|
query = query & " INNER JOIN V_CLIENT_PERSON CP ON PB.p_cli_company_cd = CP.p_cli_company_cd AND PB.P_CLI_PER_CD = CP.P_CLI_PER_CD "
|
|
query = query & " INNER JOIN T_CLIENT_TYPE_CD CTC ON PB.p_client_type_cd = CTC.p_client_type_cd "
|
|
query = query & " WHERE p_sn = '"&p_sn& "' "
|
|
else
|
|
query = " SELECT PB.p_sn, PM.p_child_sn "
|
|
query = query & " , PB.p_cli_company_cd as p_cli_company_cd "
|
|
query = query & " , PB.p_cli_per_cd as p_cli_per_cd "
|
|
query = query & " , p_state "
|
|
query = query & " , PM.p_subject "
|
|
query = query & " , PM.p_rsch_dept "
|
|
query = query & " , p_cli_company_nm "
|
|
query = query & " , CP.p_cli_depart as p_cli_depart "
|
|
query = query & " , p_cli_per_nm "
|
|
query = query & " , p_cli_per_com_tel "
|
|
query = query & " , p_cli_per_tel "
|
|
query = query & " , p_cli_per_email "
|
|
query = query & " , PB.p_client_type_cd as p_client_type_cd "
|
|
query = query & " , PM.p_cont_cost "
|
|
query = query & " , PM.p_decide_date "
|
|
query = query & " , PM.p_con_date_st "
|
|
query = query & " , PM.p_con_date_end "
|
|
query = query & " , PM.p_export_range "
|
|
query = query & " , PM.p_category "
|
|
query = query & " , PB.p_memo "
|
|
query = query & " , pb.p_depart_dep as p_depart_dep "
|
|
query = query & " , PB.p_input_user "
|
|
query = query & " FROM T_PROJECT_BASE PB "
|
|
query = query & " left outer JOIN T_PROJECT_METHOD PM "
|
|
query = query & " ON PB.p_sn = PM.p_sn "
|
|
query = query & " AND PM.p_method_cd = " & Request("p_method_cd") & " "
|
|
query = query & " left outer JOIN V_CLIENT_COMP CC "
|
|
query = query & " ON PB.p_cli_company_cd = CC.p_cli_company_cd "
|
|
query = query & " left outer JOIN V_CLIENT_PERSON CP "
|
|
query = query & " ON PB.p_cli_company_cd = CP.p_cli_company_cd "
|
|
query = query & " AND PB.P_CLI_PER_CD = CP.P_CLI_PER_CD "
|
|
query = query & " left outer JOIN T_CLIENT_TYPE_CD CTC "
|
|
query = query & " ON PB.p_client_type_cd = CTC.p_client_type_cd "
|
|
query = query & " WHERE PB.p_sn = '" & p_sn & "' "
|
|
query = query & " AND PM.p_sub_type = 'C' "
|
|
query = query & " AND PM.p_child_sn = '"& Request("p_child_sn") &"' "
|
|
End if
|
|
|
|
rsc.Open query, adoConn, 1
|
|
|
|
if rsc.RecordCount > 0 Then
|
|
p_sn = rsc("p_sn")
|
|
p_child_sn_tmp = rsc("p_child_sn")
|
|
p_cli_company_cd = rsc("p_cli_company_cd")
|
|
p_cli_per_cd = rsc("p_cli_per_cd")
|
|
|
|
p_state = rsc("p_state")
|
|
p_subject = rsc("p_subject")
|
|
p_cli_company_nm = rsc("p_cli_company_nm")
|
|
p_cli_depart = rsc("p_cli_depart")
|
|
p_cli_per_nm = rsc("p_cli_per_nm")
|
|
p_cli_per_com_tel = rsc("p_cli_per_com_tel")
|
|
p_cli_per_tel = rsc("p_cli_per_tel")
|
|
p_cli_per_email = rsc("p_cli_per_email")
|
|
p_client_type_cd = rsc("p_client_type_cd")
|
|
p_depart_dep = rsc("p_depart_dep")
|
|
p_decide_date = rsc("p_decide_date")
|
|
p_con_date_st = rsc("p_con_date_st")
|
|
p_con_date_end = rsc("p_con_date_end")
|
|
p_export_range = rsc("p_export_range")
|
|
p_category = rsc("p_category")
|
|
p_memo = rsc("p_memo")
|
|
|
|
rschname = rsc("p_rsch_dept")
|
|
|
|
'예상 계약액 ,수정
|
|
if rsc("p_cont_cost") <> "" Then
|
|
budget = rsc("p_cont_cost")
|
|
tmp_len = len(rsc("p_cont_cost"))
|
|
for i = 1 to int(tmp_len)
|
|
if i mod 3 = 1 and i <> 1 then
|
|
p_cont_cost = "," & p_cont_cost
|
|
end if
|
|
p_cont_cost = left(right(rsc("p_cont_cost"),i), 1) & p_cont_cost
|
|
next
|
|
Else
|
|
p_cont_cost = 0
|
|
budget = 0
|
|
end If
|
|
|
|
Dim p_category_arr(19)
|
|
If p_category <> "" Then
|
|
temp_category_arr = Split(p_category, ",")
|
|
|
|
If UBound(temp_category_arr)-1 > 0 Then
|
|
For i = 0 To UBound(temp_category_arr)-1 Step 1
|
|
p_category_arr(temp_category_arr(i)-1) = temp_category_arr(i)
|
|
Next
|
|
Else
|
|
If UBound(temp_category_arr) = 1 Then
|
|
If Trim(temp_category_arr(0)) <> "" Then
|
|
p_category_arr(temp_category_arr(0)-1) = temp_category_arr(0)
|
|
End if
|
|
End if
|
|
End if
|
|
End If
|
|
|
|
end If
|
|
rsc.close
|
|
%>
|
|
|
|
<html>
|
|
<head>
|
|
<title><%=GNB_TITLE%></title>
|
|
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
|
|
<link rel="stylesheet" type="text/css" href="/css/basic.css">
|
|
|
|
<script src="/js/jquery.min.js"></script>
|
|
<script src="/js/jquery-ajax-call.js"></script>
|
|
<script src="/js/jquery.form.min.js"></script>
|
|
|
|
</head>
|
|
|
|
<script>
|
|
function viewit(a)
|
|
{
|
|
$("table .tab").each(function (index){
|
|
var tableObj = $(this);
|
|
var tableId = $(this).attr("id");
|
|
|
|
if(tableId == ("table"+a)){
|
|
//alert("a : "+a+"//index : "+index+"//tableId : "+tableId);
|
|
$(this).css("display", "");
|
|
$('#Image'+(index+1)+'on').css("display", "");
|
|
$('#Image'+(index+1)+'off').css("display", "none");
|
|
}else{
|
|
$(this).css("display", "none");
|
|
$('#Image'+(index+1)+'on').css("display", "none");
|
|
$('#Image'+(index+1)+'off').css("display", "");
|
|
}
|
|
});
|
|
}
|
|
|
|
function clsit() {
|
|
self.close();
|
|
}
|
|
|
|
function subit()
|
|
{
|
|
document.pms.action = "project_report_ok_2014.asp";
|
|
document.pms.submit();
|
|
}
|
|
|
|
function openit(z)
|
|
{
|
|
var url = '/ess/direct_cost_print.asp?p_sn=' + z;
|
|
var tmp_height = 800;
|
|
var tmp_width = 950;
|
|
window.open(url,'','left=0,top=0,width='+tmp_width+',height='+tmp_height+',scrollbars=yes,resizable=yes')
|
|
}
|
|
</script>
|
|
|
|
<body topmargin="10" leftmargin="10">
|
|
|
|
<form name="pms" method="post">
|
|
|
|
<input type="hidden" name="p_sn" value="<%=p_sn%>">
|
|
<input type="hidden" name="teamname" value="<%=tmp_teamname%>">
|
|
<input type="hidden" name="rschname" value="<%=rschname%>">
|
|
<input type="hidden" name="budget" value="<%=budget%>">
|
|
<input type="hidden" name="x" value="<%=x%>">
|
|
<input type="hidden" name="l" value="<%=l%>">
|
|
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td >
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<%if x = "1" then %>
|
|
<tr class="ProjectActionPlanBtn">
|
|
<td style="padding:0 0 5 0;">
|
|
<img src="/images/common/btn_approve.jpg" onClick="subit()" style="CURSOR:pointer;" title = "결재">
|
|
<img src="/images/common/btn_cancel.jpg" onClick="clsit();" style="CURSOR:pointer;" title = "취소">
|
|
</td>
|
|
</tr>
|
|
<%end if%>
|
|
<tr>
|
|
<td><img src="/images/approval/docbg_top.jpg"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="710" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
|
|
<table width="95%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td colspan="5" style="padding:0 0 10 0">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
|
|
<tr>
|
|
<td width="255"><img src="/images/approval/doc_stit17.jpg"></td>
|
|
<td>
|
|
<%if cdate(formatdatetime(date,2)) > "2014-01-07" then
|
|
tmp_title = "대표이사"
|
|
else
|
|
tmp_title = "부회장"
|
|
end if
|
|
|
|
'### 완료보고서(x=2)일 땐 결재를 하지 않음
|
|
if x = "1" then
|
|
%>
|
|
<table width="100%" cellpadding="0" cellspacing="1" border="0" style="border-collapse:collapse;" bgcolor="#d8d8d8">
|
|
<tr>
|
|
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1">기안/승인(소속부서)</td>
|
|
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1">검토/승인(관리부서)</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">본인</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">팀장</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">부서장</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">임원</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">담당</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">부서장</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">임원</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
|
</tr>
|
|
<%
|
|
'my_pos = "3"
|
|
'Response.Write "my_pos : " & my_pos & "<BR>"
|
|
'tmp_txt = "<p style='line-height:11pt;font-size:9pt;'>" & Session("loginuser") & "<BR>" & replace(date(), "-","") & "<BR>" & FormatDateTime(time,4)
|
|
tmp_txt = Session("loginuser") & "<BR>" & replace(date(), "-","") & "<BR>" & Session("User_Number")
|
|
'tmp_txt = "<img src='/images/sign/" & Session("loginuser") & "_" & Session("User_Number") & ".jpg' border=0 width=80 height=80>"
|
|
if my_pos = 5 then '임원
|
|
tmp_txt1 = "전결"
|
|
tmp_txt2 = "전결"
|
|
tmp_txt3 = "전결"
|
|
tmp_txt4 = tmp_txt
|
|
tmp_txt5 = " "
|
|
tmp_txt6 = "/"
|
|
tmp_txt7 = "/"
|
|
tmp_txt8 = "/"
|
|
tmp_txt9 = month(now()) & " / " & day(now())
|
|
tmp_txt10 = "/"
|
|
elseif my_pos = 3 or my_pos = 4 then '부서장
|
|
tmp_txt1 = "전결"
|
|
tmp_txt2 = "전결"
|
|
tmp_txt3 = tmp_txt
|
|
tmp_txt4 = " "
|
|
tmp_txt5 = " "
|
|
tmp_txt6 = "/"
|
|
tmp_txt7 = "/"
|
|
tmp_txt8 = month(now()) & " / " & day(now())
|
|
tmp_txt9 = "/"
|
|
tmp_txt10 = "/"
|
|
elseif my_pos = 2 then '팀장
|
|
tmp_txt1 = tmp_txt
|
|
tmp_txt2 = " "
|
|
tmp_txt3 = " "
|
|
tmp_txt4 = " "
|
|
tmp_txt5 = " "
|
|
tmp_txt6 = month(now()) & " / " & day(now())
|
|
tmp_txt7 = "/"
|
|
tmp_txt8 = "/"
|
|
tmp_txt9 = "/"
|
|
tmp_txt10 = "/"
|
|
elseif my_pos = 1 then '팀 팀원
|
|
tmp_txt1 = tmp_txt
|
|
tmp_txt2 = " "
|
|
tmp_txt3 = " "
|
|
tmp_txt4 = " "
|
|
tmp_txt5 = " "
|
|
tmp_txt6 = month(now()) & " / " & day(now())
|
|
tmp_txt7 = "/"
|
|
tmp_txt8 = "/"
|
|
tmp_txt9 = "/"
|
|
tmp_txt10 = "/"
|
|
else '노팀 팀원
|
|
tmp_txt1 = tmp_txt
|
|
tmp_txt2 = "전결"
|
|
tmp_txt3 = " "
|
|
tmp_txt4 = " "
|
|
tmp_txt5 = " "
|
|
tmp_txt6 = month(now()) & " / " & day(now())
|
|
tmp_txt7 = "/"
|
|
tmp_txt8 = "/"
|
|
tmp_txt9 = "/"
|
|
tmp_txt10 = "/"
|
|
end if
|
|
%>
|
|
<input type="hidden" name="tmp_txt1" value="<%=tmp_txt1%>">
|
|
<input type="hidden" name="tmp_txt2" value="<%=tmp_txt2%>">
|
|
<input type="hidden" name="tmp_txt3" value="<%=tmp_txt3%>">
|
|
<input type="hidden" name="tmp_txt4" value="<%=tmp_txt4%>">
|
|
<input type="hidden" name="tmp_txt5" value="<%=tmp_txt5%>">
|
|
<input type="hidden" name="tmp_txt6" value="<%=tmp_txt6%>">
|
|
<input type="hidden" name="tmp_txt7" value="<%=tmp_txt7%>">
|
|
<input type="hidden" name="tmp_txt8" value="<%=tmp_txt8%>">
|
|
<input type="hidden" name="tmp_txt9" value="<%=tmp_txt9%>">
|
|
<input type="hidden" name="tmp_txt10" value="<%=tmp_txt10%>">
|
|
<tr height="35">
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt1%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt2%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt3%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt4%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt5%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
|
</tr>
|
|
<tr height="18">
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt6%></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt7%></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt8%></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt9%></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt10%></td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
|
</tr>
|
|
</table>
|
|
<%
|
|
end if
|
|
%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="5" bgcolor="#d8d8d8" height="1"></td>
|
|
</tr>
|
|
<%
|
|
query = "SELECT T_Name as d_name "
|
|
query = query & "FROM v_Department "
|
|
query = query & "WHERE before_t_cd1 = '" & p_depart_dep & "' "
|
|
|
|
rsp.Open query, adoConn, 1
|
|
if rsp.RecordCount > 0 then
|
|
tmp_teamname = rsp("d_name")
|
|
end if
|
|
rsp.Close
|
|
%>
|
|
<input type="hidden" name="depart" value="<%=tmp_teamname%>">
|
|
<input type="hidden" name="writedate" value="<%=year(now()) & "년 " & month(now()) & "월 " & day(now()) & "일"%>">
|
|
<tr>
|
|
<td colspan="2" width="50%" style="padding:7 0 7 20"><b>부서명 : <%=tmp_teamname%></b></td>
|
|
<td></td>
|
|
<td colspan="2" width="50%" class="tahoma" align="right">작성일자 : <%=year(now()) & "년 " & month(now()) & "월 " & day(now()) & "일 "%></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="5" bgcolor="#d8d8d8" height="1"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="5" height="10"></td>
|
|
</tr>
|
|
|
|
<tr height="26">
|
|
<td width="28%" align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">프로젝트 번호</td>
|
|
<td width="72%" colspan="4" class='tit7' style="padding-left: 10px; border-bottom: 0px;">
|
|
<b class="tahoma_blue"><%=p_child_sn_tmp%></b>
|
|
<!-- <img src="/images/approval/btn_directcost_view.jpg" align="absmiddle" onClick="openit('<%=p_sn%>')" style="CURSOR:pointer;"> -->
|
|
<input type="hidden" name="p_sub_type" style="width:150;" value="<%=p_sub_type %>">
|
|
<input type="hidden" name="p_state" style="width:150;" value="<%=p_state %>">
|
|
<input type="hidden" name="p_depart_dep" style="width:150;" value="<%=p_depart_dep %>">
|
|
<input type="hidden" name="p_memo" style="width:150;" value="<%=p_memo %>">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">프로젝트 명</td>
|
|
<td colspan="4" class='tit7' style="padding-left: 10px; border-bottom: 0px;">
|
|
<%=p_subject%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">클라이언트 회사</td>
|
|
<td colspan="4" class='tit7' style="padding-left: 10px; border-bottom: 0px;">
|
|
<%=p_cli_company_nm%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">계약 기간</td>
|
|
<td colspan="4" class='tit7' style="padding-left: 10px; border-bottom: 0px;">
|
|
<%=p_con_date_st%> ~ <%=p_con_date_end%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">계약 일자</td>
|
|
<td colspan="4" class='tit7' style="padding-left: 10px; border-bottom: 0px;">
|
|
<%=p_decide_date%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">계약액</td>
|
|
<td colspan="4" class='tit7' style="padding-left: 10px; border-bottom: 0px;">
|
|
<b class="tahoma"><%=p_cont_cost%>원</b> (<font class="tahoma_red">VAT 별도</font>)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">전체직접비(연구+실사) 예산(비율)</td>
|
|
<td colspan="4" class='tit7' style="padding-left: 10px; border-bottom: 0px;">
|
|
<%
|
|
q = " select sum(T.total_money) as total_money "
|
|
q = q + " from( "
|
|
q = q + " select sum(convert(money, est_money)) as total_money from direct_cost "
|
|
q = q + " where p_sn like '" & p_sn & "' and cost_type = 'research' and del_yes_no = 'no' "
|
|
If p_sub_type = "C" Then
|
|
q = q + " and p_child_sn = '" & Request("p_child_sn") & "' "
|
|
Else
|
|
q = q + " and p_child_sn like '" & p_sn & "_M%' "
|
|
End if
|
|
q = q + " union all "
|
|
q = q + " select sum(convert(money, est_money)) as total_money from direct_cost "
|
|
q = q + " where p_sn like '" & p_sn & "' and cost_type = 'field' and del_yes_no = 'no' "
|
|
If p_sub_type = "C" Then
|
|
q = q + " and p_child_sn = '" & Request("p_child_sn") & "' "
|
|
Else
|
|
q = q + " and p_child_sn like '" & p_sn & "_M%' "
|
|
End if
|
|
q = q + " ) as T "
|
|
|
|
rsp.Open q, adoConn, 1
|
|
|
|
tmp_total_money = ""
|
|
tmp_total_rate = ""
|
|
|
|
if rsp.RecordCount = 1 Then
|
|
if rsp("total_money") <> "" then
|
|
tmp_len = len(rsp("total_money"))
|
|
for i = 1 to int(tmp_len)
|
|
if i mod 3 = 1 and i <> 1 then
|
|
tmp_total_money = "," & tmp_total_money
|
|
end if
|
|
tmp_total_money = left(right(rsp("total_money"),i), 1) & tmp_total_money
|
|
Next
|
|
|
|
tmp_total_rate = formatnumber((tmp_total_money / p_cont_cost) * 100, 2)
|
|
Else
|
|
tmp_total_money = "0"
|
|
tmp_total_rate = "0"
|
|
end If
|
|
%>
|
|
<b class="tahoma"><%=tmp_total_money%>원</b> (<font class="tahoma_red">VAT 별도</font>), 비율 : <b class="tahoma_blue"> <%=tmp_total_rate%>%</b>
|
|
<input type="hidden" name="esticostprop" value="<%=tmp_total_rate%>">
|
|
<%
|
|
end if
|
|
rsp.Close
|
|
%>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td align="center" class='tit2' style="line-height: 26px; border-bottom: 0px;">용역범위</td>
|
|
<td colspan="4" class='tit7' style="padding-left: 10px;">
|
|
<% q = "SELECT c_kind_code, c_common_code, c_code_name FROM T_COMMON_CODE_DETAIL WHERE c_kind_code = '011' "
|
|
rsp.Open q, adoConn, 1
|
|
if rsp.RecordCount > 0 then
|
|
for i = 1 to rsp.RecordCount
|
|
if p_export_range = rsp("c_common_code") then
|
|
%>
|
|
<%=rsp("c_code_name")%>
|
|
<input type="hidden" name="p_export_range" value="<%=rsp("c_common_code")%>">
|
|
<%
|
|
end if
|
|
rsp.MoveNext
|
|
next
|
|
end if
|
|
rsp.Close %>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="5" height="20"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td style="padding:0px;" colspan="5">
|
|
<table width="100%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
|
|
<tr height="30px;">
|
|
<td align="center" class='tit2' width=100>조사방법</td>
|
|
<!-- <td align="center" >실사 직접비 예산</td>-->
|
|
<td align="center" class='tit2'>조사지역</td>
|
|
<td align="center" class='tit2'>조사대상</td>
|
|
<td align="center" class='tit2'>표본수</td>
|
|
<td align="center" class='tit2'>조사기간</td>
|
|
<td align="center" class='tit2'>조사분류</td>
|
|
<td align="center" class='tit2'>실사수행</td>
|
|
</tr>
|
|
<!-- loop start -->
|
|
<%
|
|
'조사방법 가져오기
|
|
query = " SELECT PMC.p_method_cd, p_method_nm, p_sur_area, p_sur_target, p_sample, p_research_date_st, p_research_date_end, p_sur_part, p_field_process, p_child_sn "
|
|
query = query & " ,p_rsch_dept, p_field_dept, p_is_dept, p_supp_dept "
|
|
query = query & " ,p_rsch_1_a, p_rsch_2_a, p_rsch_3_a, p_rsch_4_a "
|
|
query = query & " ,p_rsch_1_b, p_rsch_2_b, p_rsch_3_b, p_rsch_4_b "
|
|
query = query & " ,p_rsch_1_c, p_rsch_2_c, p_rsch_3_c, p_rsch_4_c "
|
|
query = query & " ,p_sv_1, p_sv_2, p_sv_3, p_sv_4 "
|
|
query = query & " ,p_code_1, p_code_2, p_code_3, p_code_4 "
|
|
query = query & " ,p_verify_1, p_verify_2, p_verify_3, p_verify_4 "
|
|
query = query & " ,p_dp_1, p_dp_2, p_dp_3, p_dp_4 "
|
|
query = query & " ,p_it_1, p_it_2, p_it_3, p_it_4 "
|
|
query = query & " ,p_supp_1, p_supp_2, p_supp_3, p_supp_4 "
|
|
query = query & " ,p_rsch_date_st, p_rsch_date_end, p_field_date_st, p_field_date_end, p_code_date_st, p_code_date_end "
|
|
query = query & " ,p_verify_date_st, p_verify_date_end, p_dp_date_st, p_dp_date_end, p_it_date_st, p_it_date_end "
|
|
query = query & " ,p_premeet_date, p_premeet_time, p_premeet_place "
|
|
query = query & " ,p_ot_date, p_ot_time, p_ot_place, p_sur_memo, p_memo, p_progress_status "
|
|
query = query & " FROM T_PROJECT_METHOD PM INNER JOIN T_PROJECT_METHOD_CD PMC ON PM.p_method_cd = PMC.p_method_cd "
|
|
query = query & " WHERE p_method_yn = 'y' "
|
|
query = query & " AND p_sn = '" & p_sn & "'"
|
|
|
|
If p_sub_type = "C" Then
|
|
query = query & " AND PM.p_sub_type = 'C' "
|
|
query = query & " AND PM.p_method_cd = '" & Request("p_method_cd") & "' "
|
|
query = query & " AND PM.p_child_sn = '" & Request("p_child_sn") & "' "
|
|
Else
|
|
query = query & " AND PM.p_sub_type = 'M' "
|
|
End If
|
|
|
|
rsa.Open query, adoConn, 1
|
|
|
|
research_count = rsa.RecordCount
|
|
%>
|
|
<input type="hidden" name="research_count" style="width:150;" value="<%=research_count %>">
|
|
<%
|
|
Dim p_method_cd()
|
|
Dim p_child_sn()
|
|
|
|
p_index = ""
|
|
Dim p_sur_area()
|
|
Dim p_sur_target()
|
|
Dim p_sample()
|
|
Dim p_research_date_st()
|
|
Dim p_research_date_end()
|
|
Dim p_sur_part()
|
|
Dim p_field_process()
|
|
Dim p_rsch_dept()
|
|
Dim p_field_dept()
|
|
Dim p_is_dept()
|
|
Dim p_supp_dept()
|
|
Dim p_rsch_1_a()
|
|
Dim p_rsch_2_a()
|
|
Dim p_rsch_3_a()
|
|
Dim p_rsch_4_a()
|
|
Dim p_rsch_1_b()
|
|
Dim p_rsch_2_b()
|
|
Dim p_rsch_3_b()
|
|
Dim p_rsch_4_b()
|
|
Dim p_rsch_1_c()
|
|
Dim p_rsch_2_c()
|
|
Dim p_rsch_3_c()
|
|
Dim p_rsch_4_c()
|
|
Dim p_sv_1()
|
|
Dim p_sv_2()
|
|
Dim p_sv_3()
|
|
Dim p_sv_4()
|
|
Dim p_code_1()
|
|
Dim p_code_2()
|
|
Dim p_code_3()
|
|
Dim p_code_4()
|
|
Dim p_verify_1()
|
|
Dim p_verify_2()
|
|
Dim p_verify_3()
|
|
Dim p_verify_4()
|
|
Dim p_dp_1()
|
|
Dim p_dp_2()
|
|
Dim p_dp_3()
|
|
Dim p_dp_4()
|
|
Dim p_it_1()
|
|
Dim p_it_2()
|
|
Dim p_it_3()
|
|
Dim p_it_4()
|
|
Dim p_supp_1()
|
|
Dim p_supp_2()
|
|
Dim p_supp_3()
|
|
Dim p_supp_4()
|
|
Dim p_rsch_date_st()
|
|
Dim p_rsch_date_end()
|
|
Dim p_field_date_st()
|
|
Dim p_field_date_end()
|
|
Dim p_code_date_st()
|
|
Dim p_code_date_end()
|
|
Dim p_verify_date_st()
|
|
Dim p_verify_date_end()
|
|
Dim p_dp_date_st()
|
|
Dim p_dp_date_end()
|
|
Dim p_it_date_st()
|
|
Dim p_it_date_end()
|
|
Dim p_premeet_date()
|
|
Dim p_premeet_time()
|
|
Dim p_premeet_place()
|
|
Dim p_ot_date()
|
|
Dim p_ot_time()
|
|
Dim p_ot_place()
|
|
Dim p_progress_status()
|
|
Dim p_sur_memo()
|
|
|
|
ReDim p_method_cd(research_count, 2)
|
|
ReDim p_child_sn(research_count)
|
|
|
|
ReDim p_sur_area(research_count)
|
|
ReDim p_sur_target(research_count)
|
|
ReDim p_sample(research_count)
|
|
ReDim p_research_date_st(research_count)
|
|
ReDim p_research_date_end(research_count)
|
|
ReDim p_sur_part(research_count)
|
|
ReDim p_field_process(research_count)
|
|
ReDim p_rsch_dept(research_count)
|
|
ReDim p_field_dept(research_count)
|
|
ReDim p_is_dept(research_count)
|
|
ReDim p_supp_dept(research_count)
|
|
ReDim p_rsch_1_a(research_count)
|
|
ReDim p_rsch_2_a(research_count)
|
|
ReDim p_rsch_3_a(research_count)
|
|
ReDim p_rsch_4_a(research_count)
|
|
ReDim p_rsch_1_b(research_count)
|
|
ReDim p_rsch_2_b(research_count)
|
|
ReDim p_rsch_3_b(research_count)
|
|
ReDim p_rsch_4_b(research_count)
|
|
ReDim p_rsch_1_c(research_count)
|
|
ReDim p_rsch_2_c(research_count)
|
|
ReDim p_rsch_3_c(research_count)
|
|
ReDim p_rsch_4_c(research_count)
|
|
ReDim p_sv_1(research_count)
|
|
ReDim p_sv_2(research_count)
|
|
ReDim p_sv_3(research_count)
|
|
ReDim p_sv_4(research_count)
|
|
ReDim p_code_1(research_count)
|
|
ReDim p_code_2(research_count)
|
|
ReDim p_code_3(research_count)
|
|
ReDim p_code_4(research_count)
|
|
ReDim p_verify_1(research_count)
|
|
ReDim p_verify_2(research_count)
|
|
ReDim p_verify_3(research_count)
|
|
ReDim p_verify_4(research_count)
|
|
ReDim p_dp_1(research_count)
|
|
ReDim p_dp_2(research_count)
|
|
ReDim p_dp_3(research_count)
|
|
ReDim p_dp_4(research_count)
|
|
ReDim p_it_1(research_count)
|
|
ReDim p_it_2(research_count)
|
|
ReDim p_it_3(research_count)
|
|
ReDim p_it_4(research_count)
|
|
ReDim p_supp_1(research_count)
|
|
ReDim p_supp_2(research_count)
|
|
ReDim p_supp_3(research_count)
|
|
ReDim p_supp_4(research_count)
|
|
ReDim p_rsch_date_st(research_count)
|
|
ReDim p_rsch_date_end(research_count)
|
|
ReDim p_field_date_st(research_count)
|
|
ReDim p_field_date_end(research_count)
|
|
ReDim p_code_date_st(research_count)
|
|
ReDim p_code_date_end(research_count)
|
|
ReDim p_verify_date_st(research_count)
|
|
ReDim p_verify_date_end(research_count)
|
|
ReDim p_dp_date_st(research_count)
|
|
ReDim p_dp_date_end(research_count)
|
|
ReDim p_it_date_st(research_count)
|
|
ReDim p_it_date_end(research_count)
|
|
ReDim p_premeet_date(research_count)
|
|
ReDim p_premeet_time(research_count)
|
|
ReDim p_premeet_place(research_count)
|
|
ReDim p_ot_date(research_count)
|
|
ReDim p_ot_time(research_count)
|
|
ReDim p_ot_place(research_count)
|
|
ReDim p_progress_status(research_count)
|
|
ReDim p_sur_memo(research_count)
|
|
|
|
if research_count > 0 then
|
|
for i = 1 to research_count
|
|
'p_sub_type
|
|
'p_child_sn
|
|
|
|
p_method_cd(i, 1) = rsa("p_method_cd")
|
|
p_method_cd(i, 2) = rsa("p_method_nm")
|
|
|
|
p_child_sn(i) = rsa("p_child_sn")
|
|
|
|
p_sur_area(i) = rsa("p_sur_area")
|
|
p_sur_target(i) = rsa("p_sur_target")
|
|
p_sample(i) = rsa("p_sample")
|
|
p_research_date_st(i) = rsa("p_research_date_st")
|
|
p_research_date_end(i) = rsa("p_research_date_end")
|
|
p_sur_part(i) = rsa("p_sur_part")
|
|
p_field_process(i) = rsa("p_field_process")
|
|
p_rsch_dept(i) = rsa("p_rsch_dept")
|
|
p_field_dept(i) = rsa("p_field_dept")
|
|
p_is_dept(i) = rsa("p_is_dept")
|
|
p_supp_dept(i) = rsa("p_supp_dept")
|
|
p_rsch_1_a(i) = rsa("p_rsch_1_a")
|
|
p_rsch_2_a(i) = rsa("p_rsch_2_a")
|
|
p_rsch_3_a(i) = rsa("p_rsch_3_a")
|
|
p_rsch_4_a(i) = rsa("p_rsch_4_a")
|
|
p_rsch_1_b(i) = rsa("p_rsch_1_b")
|
|
p_rsch_2_b(i) = rsa("p_rsch_2_b")
|
|
p_rsch_3_b(i) = rsa("p_rsch_3_b")
|
|
p_rsch_4_b(i) = rsa("p_rsch_4_b")
|
|
p_rsch_1_c(i) = rsa("p_rsch_1_c")
|
|
p_rsch_2_c(i) = rsa("p_rsch_2_c")
|
|
p_rsch_3_c(i) = rsa("p_rsch_3_c")
|
|
p_rsch_4_c(i) = rsa("p_rsch_4_c")
|
|
p_sv_1(i) = rsa("p_sv_1")
|
|
p_sv_2(i) = rsa("p_sv_2")
|
|
p_sv_3(i) = rsa("p_sv_3")
|
|
p_sv_4(i) = rsa("p_sv_4")
|
|
p_code_1(i) = rsa("p_code_1")
|
|
p_code_2(i) = rsa("p_code_2")
|
|
p_code_3(i) = rsa("p_code_3")
|
|
p_code_4(i) = rsa("p_code_4")
|
|
p_verify_1(i) = rsa("p_verify_1")
|
|
p_verify_2(i) = rsa("p_verify_2")
|
|
p_verify_3(i) = rsa("p_verify_3")
|
|
p_verify_4(i) = rsa("p_verify_4")
|
|
p_dp_1(i) = rsa("p_dp_1")
|
|
p_dp_2(i) = rsa("p_dp_2")
|
|
p_dp_3(i) = rsa("p_dp_3")
|
|
p_dp_4(i) = rsa("p_dp_4")
|
|
p_it_1(i) = rsa("p_it_1")
|
|
p_it_2(i) = rsa("p_it_2")
|
|
p_it_3(i) = rsa("p_it_3")
|
|
p_it_4(i) = rsa("p_it_4")
|
|
p_supp_1(i) = rsa("p_supp_1")
|
|
p_supp_2(i) = rsa("p_supp_2")
|
|
p_supp_3(i) = rsa("p_supp_3")
|
|
p_supp_4(i) = rsa("p_supp_4")
|
|
p_rsch_date_st(i) = rsa("p_rsch_date_st")
|
|
p_rsch_date_end(i) = rsa("p_rsch_date_end")
|
|
p_field_date_st(i) = rsa("p_field_date_st")
|
|
p_field_date_end(i) = rsa("p_field_date_end")
|
|
p_code_date_st(i) = rsa("p_code_date_st")
|
|
p_code_date_end(i) = rsa("p_code_date_end")
|
|
p_verify_date_st(i) = rsa("p_verify_date_st")
|
|
p_verify_date_end(i) = rsa("p_verify_date_end")
|
|
p_dp_date_st(i) = rsa("p_dp_date_st")
|
|
p_dp_date_end(i) = rsa("p_dp_date_end")
|
|
p_it_date_st(i) = rsa("p_it_date_st")
|
|
p_it_date_end(i) = rsa("p_it_date_end")
|
|
p_premeet_date(i) = rsa("p_premeet_date")
|
|
p_premeet_time(i) = rsa("p_premeet_time")
|
|
p_premeet_place(i) = rsa("p_premeet_place")
|
|
p_ot_date(i) = rsa("p_ot_date")
|
|
p_ot_time(i) = rsa("p_ot_time")
|
|
p_ot_place(i) = rsa("p_ot_place")
|
|
p_sur_memo(i) = rsa("p_sur_memo")
|
|
|
|
If rsa("p_progress_status") <> "" Then
|
|
p_progress_status(i) = rsa("p_progress_status")
|
|
Else
|
|
p_progress_status(i) = "001"
|
|
End if
|
|
|
|
%>
|
|
<tr bgcolor="<%=tmp_bgcolor%>">
|
|
<td align="left" style="padding-left: 10px;" class='tit7'> <!-- 조사방법 -->
|
|
<%=rsa("p_method_nm")%>
|
|
<input type="hidden" name="p_method_cd<%=i %>" style="width:80;" value="<%=p_method_cd(i, 1)%>" readonly>
|
|
<input type="hidden" name="p_child_sn<%=i %>" style="width:80;" value="<%=p_child_sn(i)%>" readonly>
|
|
<input type="hidden" name="p_progress_status<%=i %>" style="width:150;" value="<%=p_progress_status(i)%>">
|
|
</td>
|
|
<td align="center" style="display:none;"> <!-- 직접비 예산 -->
|
|
<%
|
|
q = " select sum(convert(money, est_money)) as total_money from direct_cost "
|
|
q = q + " where p_sn like '" & p_sn & "' and cost_type = 'field' and del_yes_no = 'no' and p_child_sn = '" & p_child_sn(i) & "' "
|
|
|
|
rsp.Open q, adoConn, 1
|
|
|
|
tmp_total_money = ""
|
|
|
|
if rsp.RecordCount = 1 Then
|
|
if rsp("total_money") <> "" then
|
|
tmp_len = len(rsp("total_money"))
|
|
for j = 1 to int(tmp_len)
|
|
if j mod 3 = 1 and j <> 1 then
|
|
tmp_total_money = "," & tmp_total_money
|
|
end if
|
|
tmp_total_money = left(right(rsp("total_money"),j), 1) & tmp_total_money
|
|
Next
|
|
Else
|
|
tmp_total_money = "0"
|
|
end If
|
|
%>
|
|
<b class="tahoma"><%=tmp_total_money%>원</b>
|
|
<%
|
|
end if
|
|
rsp.Close
|
|
%>
|
|
</td>
|
|
<td align="center" class='tit7'> <!-- 조사지역 -->
|
|
<% q = "SELECT c_kind_code, c_common_code, c_code_name FROM T_COMMON_CODE_DETAIL WHERE c_kind_code = '012' "
|
|
rsp.Open q, adoConn, 1
|
|
if rsp.RecordCount > 0 then
|
|
for j = 1 to rsp.RecordCount
|
|
if p_sur_area(i) = rsp("c_common_code") then
|
|
%>
|
|
<%=rsp("c_code_name")%>
|
|
<%
|
|
end if
|
|
rsp.MoveNext
|
|
next
|
|
end if
|
|
rsp.Close %>
|
|
</td>
|
|
<td align="center" class='tit7'> <!-- 조사대상 -->
|
|
<% q = "SELECT c_kind_code, c_common_code, c_code_name FROM T_COMMON_CODE_DETAIL WHERE c_kind_code = '013' "
|
|
rsp.Open q, adoConn, 1
|
|
if rsp.RecordCount > 0 then
|
|
for j = 1 to rsp.RecordCount
|
|
if p_sur_target(i) = rsp("c_common_code") then
|
|
%>
|
|
<%=rsp("c_code_name")%>
|
|
<%
|
|
end If
|
|
rsp.MoveNext
|
|
next
|
|
end if
|
|
rsp.Close %>
|
|
</td>
|
|
<td align="center" class='tit7'> <!-- 표본수 -->
|
|
<%
|
|
tmp_sample_cnt = ""
|
|
if p_sample(i) <> "" then
|
|
tmp_len = len(p_sample(i))
|
|
for j = 1 to int(tmp_len)
|
|
if j mod 3 = 1 and j <> 1 then
|
|
tmp_sample_cnt = "," & tmp_sample_cnt
|
|
end if
|
|
tmp_sample_cnt = left(right(p_sample(i),j), 1) & tmp_sample_cnt
|
|
Next
|
|
Else
|
|
tmp_sample_cnt = "0"
|
|
end If
|
|
%>
|
|
<%=tmp_sample_cnt%>
|
|
</td>
|
|
<td align="center" class='tit7'> <!-- 조사기간 -->
|
|
<%=p_research_date_st(i)%> ~ <%=p_research_date_end(i)%>
|
|
</td>
|
|
<td align="center" class='tit7'> <!-- 조사분류 -->
|
|
<% q = "SELECT c_kind_code, c_common_code, c_code_name FROM T_COMMON_CODE_DETAIL WHERE c_kind_code = '014' "
|
|
rsp.Open q, adoConn, 1
|
|
if rsp.RecordCount > 0 then
|
|
for j = 1 to rsp.RecordCount
|
|
if p_sur_part(i) = rsp("c_common_code") then
|
|
%>
|
|
<%=rsp("c_code_name")%>
|
|
<%
|
|
end If
|
|
rsp.MoveNext
|
|
next
|
|
end if
|
|
rsp.Close %>
|
|
</td>
|
|
<td align="center" class='tit7'> <!-- 실사수행 -->
|
|
<% q = "SELECT c_kind_code, c_common_code, c_code_name FROM T_COMMON_CODE_DETAIL WHERE c_kind_code = '015' "
|
|
rsp.Open q, adoConn, 1
|
|
if rsp.RecordCount > 0 then
|
|
for j = 1 to rsp.RecordCount
|
|
if p_field_process(i) = rsp("c_common_code") then
|
|
%>
|
|
<%=rsp("c_code_name")%>
|
|
<%
|
|
end if
|
|
rsp.MoveNext
|
|
next
|
|
end if
|
|
rsp.Close %>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
rsa.MoveNext
|
|
next
|
|
end if
|
|
rsa.Close
|
|
%>
|
|
<!-- loop end -->
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="5" height="20"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" class='tit2'>비고</td>
|
|
<td colspan="4" class='tit7' >
|
|
<textarea style="width:99%;height:60;" name="p_memo_etc"></textarea>
|
|
</td>
|
|
</tr>
|
|
|
|
<!--tr>
|
|
<td colspan="2" style="padding:20 0 0 0" align="center">
|
|
주) 계약액은 부가세별도 금액임
|
|
</td>
|
|
</tr-->
|
|
<tr>
|
|
<td colspan="5" align="center" style="padding:15 0 5 0"><!-- #include virtual= "approval/inc_logo.asp" --></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><img src="/images/approval/docbg_btm.jpg"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|