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

1204 lines
41 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
dim command
command = request("command")
if command <> "excel" then
%>
<!-- #include file = "../include/top_menu.asp" -->
<%
end if
%>
<%
set rsf = server.CreateObject("ADODB.RECORDSET")
dim tmp_depart '연구부서 list배열
dim method() '조사방법
dim Sample_range(6,3) '샘플수
dim field_rank(3,2) '실사 난이도
dim category '카테고리
dim types '업종
Dim tmp_area_part(5)
Dim tmp_survey_part(2)
Dim tmp_survey_times(10)
Dim tmp_field_process(3)
'page config
tmp_colspan = 5
p_depart = request("p_depart")
p_method = request("p_method")
p_sample_real = request("p_sample_real")
p_field_rank = request("p_field_rank")
p_cli_company = request("p_cli_company")
p_cli_code = request("p_cli_code")
p_category = request("p_category")
p_reg_date_st = request("p_reg_date_st")
p_reg_date_ed = request("p_reg_date_ed")
p_subject = request("p_subject")
p_intention = request("p_intention")
p_types1 = request("p_types1")
p_types2 = request("p_types2")
p_types3 = request("p_types3")
p_target_part = request("p_target_part")
p_area_part = request("p_area_part")
p_survey_part = request("p_survey_part")
p_survey_times = request("p_survey_times")
p_field_process = request("p_field_process")
today = request("today")
toyear = request("toyear")
s = request("s") '찾기옵션
' Response.Write "s : " & s & "<br>"
' Response.Write "command : " & command & "<br>"
'///==============================================
''엑셀형식으로 자동으로 저장
if command = "excel" then
' Response.Buffer = false
Response.Expires=0'
Response.AddHeader "Content-Disposition","attachment;filename=프로젝트검색리스트_2009년부터.xls"
Response.ContentType = "application/vnd.ms-excel"
Response.CacheControl = "public"
end if
if request("p_types1") <> "" then
p_types1 = request("p_types1")
else
p_types1 = "0"
end if
if request("p_types2") <> "" then
p_types2 = request("p_types2")
else
p_types2 = "0"
end if
if request("p_types3") <> "" then
p_types3 = request("p_types3")
else
p_types3 = "0"
end if
y = request("y")
if y = "1" then
p_types2 = "0"
p_types3 = "0"
elseif y = "2" then
p_types3 = "0"
end if
'Response.Write today & "<BR>"
'------------------------------------------------------
'연구부서 list목록
q = "SELECT max(d_mcode) as max_code "
q = q & "FROM Depart "
rsc.Open q, adoConn, 1
tmp_max = rsc("max_code")
rsc.Close
query = "SELECT * "
query = query & "FROM Depart "
query = query & "WHERE d_mcode >= '0' "
query = query & "ORDER BY d_mcode ASC "
rsc.open query, adoConn, 1
redim tmp_depart(int(tmp_max),2)
for i = 1 to int(rsc.RecordCount)
tmp_depart(int(rsc("d_mcode")),1) = rsc("d_mcode")
tmp_depart(int(rsc("d_mcode")),2) = rsc("d_mname_shot")
rsc.MoveNext
next
rsc.close
tmp_area_part(1) = "서울"
tmp_area_part(2) = "수도권"
tmp_area_part(3) = "광역시"
tmp_area_part(4) = "전국"
tmp_area_part(5) = "기타"
tmp_survey_part(1) = "리스트"
tmp_survey_part(2) = "비리스트"
tmp_survey_times(1) = "10분"
tmp_survey_times(2) = "20분"
tmp_survey_times(3) = "30분"
tmp_survey_times(4) = "40분"
tmp_survey_times(5) = "50분"
tmp_survey_times(6) = "1시간"
tmp_survey_times(7) = "1시간 30분"
tmp_survey_times(8) = "2시간"
tmp_survey_times(9) = "2시간 30분"
tmp_survey_times(10)= "3시간"
tmp_field_process(1) = "자체"
tmp_field_process(2) = "외주"
tmp_field_process(3) = "자체&외주"
'------------------------------------------------------
'조사방법
query = "select * from p_Method order by code1 "
rsc.Open query, adoConn, 1
i = rsc.RecordCount
redim method(i,2)
i=0
method(0,0) = request("p_method") '선택된 조사방법
method(0,1) = "0"
method(0,2) = "전 체"
do while not rsc.EOF
i = i + 1
method(i,1) = rsc("code1")
method(i,2) = rsc("name1")
rsc.MoveNext
loop
rsc.Close
'------------------------------------------------------
''샘플수의 범위
Sample_range(0,0) = request("p_sample_real")
Sample_range(0,1) = "0"
Sample_range(0,2) = " 전 체 "
Sample_range(1,1) = "1"
Sample_range(1,2) = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;~ &nbsp;500"
Sample_range(1,3) = "500"
Sample_range(2,1) = "2"
Sample_range(2,2) = "&nbsp;&nbsp;&nbsp;501 ~ 1,000"
Sample_range(2,3) = "1,000"
Sample_range(3,1) = "3"
Sample_range(3,2) = "1,001 ~ 1,500"
Sample_range(3,3) = "1,500"
Sample_range(4,1) = "4"
Sample_range(4,2) = "1,501 ~ 2,000"
Sample_range(4,3) = "2,000"
Sample_range(5,1) = "5"
Sample_range(5,2) = "2,001 ~ 2,500"
Sample_range(5,3) = "2,500"
Sample_range(6,1) = "6"
Sample_range(6,2) = "2,501 ~ "
Sample_range(6,3) = "2,501"
'------------------------------------------------------
'실사 난이도별
field_rank(0,0) = request("p_field_rank")
field_rank(0,1) = "0"
field_rank(0,2) = "전 체"
field_rank(1,1) = "하"
field_rank(1,2) = "하"
field_rank(2,1) = "중"
field_rank(2,2) = "중"
field_rank(3,1) = "상"
field_rank(3,2) = "상"
'------------------------------------------------------
'category list
query = "SELECT * "
query = query & "FROM p_category "
query = query & "ORDER BY sort_key "
rsc.Open query, adoConn, 1
redim category(int(rsc.RecordCount), 2)
for i = 1 to rsc.RecordCount
category(i,1) = rsc("code1")
category(i,2) = rsc("name1")
rsc.MoveNext
next
rsc.Close
'------------------------------------------------------
'======================================================
'검색 query 만들기
if s = "1" then '찾기 로직을 탔을 경우
'======================================================
query = "SELECT * "
query = query & "FROM project "
query = query & "WHERE p_sn <> '' "
'부서--------------------------------------------------
if p_depart <> "" then
query = query & " AND p_depart = '" & p_depart & "' "
end if
'조사방법----------------------------------------------
if p_method <> "0" then
query = query & " AND p_method = '" & p_method & "' "
end if
p_sample = p_sample_real
if p_sample_real <> "0" then
if cint(Sample_range(0,0)) = 1 then
query = query & " AND (p_sample <= '" & replace(Sample_range(cint(Sample_range(0,0)),3),",","") & "') "
elseif cint(Sample_range(0,0)) = 6 then '2501이상
query = query & " AND (p_sample >= '" & replace(Sample_range(cint(Sample_range(0,0)),3),",","") & "') "
else
query = query & " AND (p_sample > '" & replace(Sample_range(cint(Sample_range(0,0))-1,3),",","") & "' AND p_sample <= '" & replace(Sample_range(cint(Sample_range(0,0)),3),",","") & "')"
end if
end if
'실사난이도--------------------------------------------
if p_field_rank <> "0" then
query = query & " AND p_field_rank = '" & p_field_rank & "' "
end if
'클라이언트명------------------------------------------
if p_cli_code <> "" then
query = query & " AND p_cli_company = '" & p_cli_code & "' "
end if
'카테고리----------------------------------------------
if p_category <> "" then
query = query & " AND (p_category = '" & p_category & "' "
query = query & " OR p_category2 = '" & p_category & "' "
query = query & " OR p_category3 = '" & p_category & "') "
end if
'등록기간----------------------------------------------
if p_reg_date_st <> "" AND p_reg_date_ed <> "" then
'시작 및 끝나는 날짜 구하기
if cint(right(p_reg_date_ed,2)) > 11 then
edate = cstr(cint(left(p_reg_date_ed,4)) + 1) & "-01-01"
else
if cint(right(p_reg_date_ed,2)) > 8 then
edate = cstr(left(p_reg_date_ed,4)) & "-" & cstr(cint(right(p_reg_date_ed,2)) + 1) & "-01"
else
edate = cstr(left(p_reg_date_ed,4)) & "-0" & cstr(cint(right(p_reg_date_ed,2)) + 1) & "-01"
end if
end if
sdate = p_reg_date_st & "-01"
edate = cdate(edate) - 1
query = query & " AND p_reg_date Between '" & sdate & "' AND '" & edate & "' "
end if
'------------------------------------------------------
if p_subject <> "" then
query = query & " AND p_subject LIKE '%" & p_subject & "%' "
end if
'------------------------------------------------------
if p_intention <> "" then
query = query & " AND p_intention LIKE '%" & p_intention & "%' "
end if
'------------------------------------------------------
if p_types1 <> "0" then
query = query & "AND ("
query = query & " p_types1 = '" & p_types1 & "' "
if p_types2 <> "0" then
query = query & " AND p_types2 = '" & p_types2 & "' "
end if
if p_types3 <> "0" then
query = query & " AND p_types3 = '" & p_types3 & "' "
end if
query = query & ") "
end if
'------------------------------------------------------
if p_target_part <> "0" then
query = query & "AND (p_target_part = '" & p_target_part & "') "
end if
'------------------------------------------------------
if p_area_part <> "0" then
query = query & "AND (p_area_part = '" & p_area_part & "') "
end if
'------------------------------------------------------
if p_survey_part <> "0" then
query = query & "AND (p_survey_part = '" & p_survey_part & "') "
end if
'------------------------------------------------------
if p_survey_times <> "0" then
query = query & "AND (p_survey_times = '" & p_survey_times & "') "
end if
'------------------------------------------------------
if p_field_process <> "0" then
query = query & "AND (p_field_process = '" & p_field_process & "') "
end if
'------------------------------------------------------
query = query & "ORDER BY p_subject, p_reg_date DESC, p_sn DESC "
'------------------------------------------------------
tmp_search_query = query
end if'if s = "1" then
'======================================================
%>
<script language=javascript>
function modit(z,x) {
var url = 'project_list2_dep.asp?p_sn=' + z + '&teamname=' + x;
window.open(url,'','left=0,top=0,width=850,height=800,scrollbars=yes,resizable=yes')
}
function search(theURL,winName,features) {
if (features == 'x') {
var width_size = screen.width - 770;
var height_size= screen.height;
features = "left=" + width_size + " top=5 width=770 height=500 scrollbars=yes statbar=no";
}
window.open(theURL,winName,features);
}
function autoday(txt) {
today = new Date();
if (txt == "day")
{
if (document.pms.today.checked == true) {
document.pms.toyear.checked = false;
month = today.getMonth() + 1;
if (month < 10) {
month = '0' + month;
} else {
month = month;
}
document.pms.p_reg_date_st.value = document.pms.p_reg_date_ed.value = today.getYear() + '-' + month;
}
else {
document.pms.p_reg_date_st.value = '';
document.pms.p_reg_date_ed.value = '';
}
}else{
if (document.pms.toyear.checked == true) {
document.pms.today.checked = false;
document.pms.p_reg_date_st.value = today.getYear() + '-' + '01'
document.pms.p_reg_date_ed.value = today.getYear() + '-' + '12';
}
else {
document.pms.p_reg_date_st.value = '';
document.pms.p_reg_date_ed.value = '';
}
}
}
function clsit(a) {
if (a == 1)
{
document.pms.p_reg_date_st.value = '';
document.pms.p_reg_date_ed.value = '';
document.pms.today.checked = false;
document.pms.toyear.checked = false;
}
else if (a == 2)
{
document.pms.p_cli_code.value = '';
document.pms.p_cli_company.value = '';
}
}
function reloadit(a)
{
if (a == 1 || a == 2)
{
document.pms.action = "project_search.asp?y="+a;
document.pms.submit();
}
else
{
location.href = "project_search.asp";
}
}
function chkit(txt) {
var f = document.pms;
var url = "project_search.asp";
if ((f.p_reg_date_st.value != '') || (f.p_reg_date_ed.value != '')) {
if ((f.p_reg_date_st.value == '') || (f.p_reg_date_ed.value == '')) {
alert('기간을 선택해 주십시오');
return false;
}
if (f.p_reg_date_st.value > f.p_reg_date_ed.value) {
alert('기간이 잘못 선택 되었습니다');
f.p_reg_date_ed.value = '';
return false;
}
}
if (txt == "1")
{
url = url + '?s=1';
}
else
{
url = url + '?s=1&command=excel';
}
f.action = url;
f.submit();
}
function go_view(url)
{
window.open(url,'','left=0,top=0,width=800,height=800,scrollbars=yes,resizable=yes')
}
</script>
<form name="pms" method="post">
<td width="100%" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<%
if command = "excel" then
else
%>
<tr>
<!-- 확인 -->
</tr>
<tr>
<td colspan="2" style="padding:20;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<font class="brown">검색을 원하시는 프로젝트 조건을 설정하시고, 찾기 버튼을 클릭해 주세요.</font>
</td>
</tr>
<tr>
<td style="padding:5 0 0 0;">
<table width="850" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td colspan="4" height="4" ></td>
</tr>
<tr>
<td width="15%" align="center" >부서</td>
<td width="35%" >
<select name="p_depart">
<option value="">전 체</option>
<%
for i = 1 to int(ubound(tmp_depart))
if ((tmp_depart(i,1) > 0 and tmp_depart(i,1) < 10) or (tmp_depart(i,1) >= 20 and tmp_depart(i,1) <= 49)) and tmp_depart(i,1) <> 3 then '연구부서
%>
<option value="<%=tmp_depart(i,1)%>" <% if p_depart = cstr(tmp_depart(i,1)) then %> selected <% end if %>><%=tmp_depart(i,2)%></option>
<%
end if
next
%>
</select>
</td>
<td width="15%" align="center" >조사방법</td>
<td width="35%" >
<select name="p_method">
<%
for i = 0 to int(ubound(method))
%>
<option value="<%=method(i,1)%>" <% if trim(method(0,0)) = trim(method(i,1)) then %> selected <% end if %>><%=method(i,2)%></option>
<%
next
%>
</select>
</td>
</tr>
<tr>
<td align="center" >샘플수별</td>
<td >
<select name="p_sample_real">
<%
for i = 0 to int(ubound(sample_range))
%>
<option value="<%=sample_range(i,1)%>" <% if trim(sample_range(0,0)) = trim(sample_range(i,1)) then %> selected <% end if %>><%=sample_range(i,2)%></option>
<%
next
%>
</select>
</td>
<td align="center" >실사 난이도별</td>
<td >
<select name="p_field_rank" >
<%
for i = 0 to int(ubound(field_rank))
%>
<option value="<%=field_rank(i,1)%>" <% if trim(field_rank(0,0)) = trim(field_rank(i,1)) then %> selected <% end if %>><%=field_rank(i,2)%></option>
<%
next
%>
</select>
</td>
</tr>
<tr>
<td align="center" >클라이언트명</td>
<td >
<input type="text" style="width:120;" name="p_cli_company" readonly value="<%=p_cli_company%>" onClick="search('cli_search.asp?v=2','ClientSearch','width=390,height=381,left=100,top=50,scrollbars=yes')" style="cursor:pointer">
<input type="hidden" name="p_cli_code" value="<%=p_cli_code%>">
<img src="/images/project/btn_delete.jpg" align="absmiddle" onClick="clsit('2')" style="CURSOR:pointer;">
</td>
<td align="center" >카테고리</td>
<td >
<select name="p_category">
<option value="">전 체</option>
<%
for i = 1 to int(ubound(category))
%>
<option value="<%=category(i,1)%>" <% if p_category = cstr(category(i,1)) then %> selected <% end if %>><%=category(i,2)%></option>
<%
next
%>
</select>
</td>
</tr>
<tr>
<td align="center" >등록기간</td>
<td colspan="3">
<input type="text" style="width:120;" name="p_reg_date_st" readonly value="<%=request("p_reg_date_st")%>" onClick="search('/lib/cal2.asp?x=1','DateSearch','left=500,top=100,width=400,height=200,scrollbars=yes')" style="cursor:pointer"> -
<input type="text" style="width:120;" name="p_reg_date_ed" readonly value="<%=request("p_reg_date_ed")%>" onClick="search('/lib/cal2.asp?x=2','DateSearch','left=500,top=100,width=400,height=200,scrollbars=yes')" style="cursor:pointer">
<input type="checkbox" class="none" name="today" onClick="autoday('day')" <% if today = "on" then %> checked <% end if %>>현재달
<input type="checkbox" class="none" name="toyear" onClick="autoday('year')" <% if toyear = "on" then %> checked <% end if %>>현재년도
<img src="/images/project/btn_delete.jpg" align="absmiddle" onClick="clsit('1')" style="CURSOR:pointer;">
</td>
</tr>
<tr>
<td align="center" >프로젝트 이름</td>
<td colspan="3">
<input type="text" style="width:300;" name="p_subject" value="<%=p_subject%>" style="IME-MODE:inactive;">
</td>
</tr>
<tr>
<td align="center" >프로젝트 내용</td>
<td colspan="3">
<input type="text" style="width:300;" name="p_intention" value="<%=p_intention%>" style="IME-MODE:inactive;">
</td>
</tr>
<tr>
<td align="center" >업종</td>
<td colspan="3">
<select name="p_types1" onChange="reloadit('1')">
<option value="">선택</option>
<%
q = "SELECT * "
q = q & "FROM p_types "
q = q & "WHERE t_type = '1' "
q = q & "ORDER BY t_sn "
rsc.Open q, adoConn, 1
if rsc.RecordCount > 0 then
for i = 1 to rsc.RecordCount
%>
<option value="<%=rsc("t_code1")%>" <% if int(rsc("t_code1")) = int(p_types1) then %> selected <% end if %>><%=rsc("t_name")%></option>
<%
rsc.MoveNext
next
end if
rsc.Close
%>
</select>
<%
if p_types1 <> "" then
%>
&nbsp;&nbsp;&nbsp;
<select name="p_types2" onChange="reloadit('2')">
<option value="">선택</option>
<%
q = "SELECT * "
q = q & "FROM p_types "
q = q & "WHERE t_type = '2' "
q = q & " AND t_code1 = '" & p_types1 & "' "
q = q & "ORDER BY t_sn "
rsc.Open q, adoConn, 1
if rsc.RecordCount > 0 then
for i = 1 to rsc.RecordCount
%>
<option value="<%=rsc("t_code2")%>" <% if int(rsc("t_code2")) = int(p_types2) then %> selected <% end if %>><%=rsc("t_name")%></option>
<%
rsc.MoveNext
next
end if
rsc.Close
%>
</select>
<%
if p_types2 <> "" and p_types2 <> "0" then
%>
&nbsp;&nbsp;&nbsp;
<select name="p_types3">
<option value="">선택</option>
<%
q = "SELECT * "
q = q & "FROM p_types "
q = q & "WHERE t_type = '3' "
q = q & " AND t_code1 = '" & p_types1 & "' "
q = q & " AND t_code2 = '" & p_types2 & "' "
q = q & "ORDER BY t_sn "
rsc.Open q, adoConn, 1
if rsc.RecordCount > 0 then
for i = 1 to rsc.RecordCount
%>
<option value="<%=rsc("t_code3")%>" <% if int(rsc("t_code3")) = int(p_types3) then %> selected <% end if %>><%=rsc("t_name")%></option>
<%
rsc.MoveNext
next
end if
rsc.Close
%>
</select>
<%
end if 'if p_types2 <> "" then
%>
<%
end if 'if p_types1 <> "" then
%>
</td>
</tr>
<tr>
<td align="center" >조사대상</td>
<td >
<select name="p_target_part">
<option value="0">전체</option>
<%
query = "SELECT * "
query = query & "FROM p_target "
query = query & "WHERE t_type = 'p' "
rsc.Open query, adoConn, 1
if rsc.RecordCount > 0 then
for i = 1 to rsc.RecordCount
%>
<option value="<%=rsc("t_code")%>" <% if int(p_target_part) = i then %> selected <% end if %>><%=rsc("t_name")%></option>
<%
rsc.MoveNext
next
end if
rsc.Close
%>
</select>
</td>
<td align="center" >조사지역</td>
<td >
<select name="p_area_part">
<option value="0">전체</option>
<%
for i = 1 to ubound(tmp_area_part)
if tmp_area_part(i) <> "" then
%>
<option value="<%=i%>" <% if i = int(p_area_part) then %> selected <% end if %>><%=tmp_area_part(i)%></option>
<%
end if
next
%>
</select>
</td>
</tr>
<tr>
<td align="center" >조사분류</td>
<td >
<select name="p_survey_part">
<option value="0">전체</option>
<%
for i = 1 to ubound(tmp_survey_part)
%>
<option value="<%=i%>" <% if i = int(p_survey_part) then %> selected <% end if %>><%=tmp_survey_part(i)%></option>
<%
next
%>
</select>
</td>
<td align="center" >면접 소요시간</td>
<td >
<select name="p_survey_times">
<option value="0">전체</option>
<%
for i = 1 to ubound(tmp_survey_times)
%>
<option value="<%=i%>" <% if i = int(p_survey_times) then %> selected <% end if %>><%=tmp_survey_times(i)%></option>
<%
next
%>
</select>
</td>
</tr>
<tr>
<!--td align="center" >기준Pay단가</td>
<td >
준비중입니다.
</td-->
<td align="center" >실사수행</td>
<td colspan="3">
<select name="p_field_process">
<option value="0">전체</option>
<%
for i = 1 to ubound(tmp_field_process)
%>
<option value="<%=i%>" <% if i = int(p_field_process) then %> selected <% end if %>><%=tmp_field_process(i)%></option>
<%
next
%>
</select>
</td>
</tr>
<tr>
<td align="center" colspan="4" style="padding:10 0 0 0">
<img src="/images/common/btn_search.jpg" align="absmiddle" style="cursor:pointer" onClick="chkit('1')">
<img src="/images/common/btn_cancel.jpg" align="absmiddle" style="cursor:pointer" onClick="reloadit()">
<img src="/images/common/btn_download.jpg" align="absmiddle" onclick="chkit('2')" style="CURSOR:pointer;" title ="엑셀다운로드">
</td>
</tr>
</table>
<%
end if
%>
<% if request("s") = 1 then %>
<table width="1850" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td style="padding:10 0 0 0;" colspan="2">
<div style="overflow-x:hidden;overflow-y:scroll;height:250px;width:100%;border:none;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="110" align="center" height="24" >본부</td>
<td width="40" align="center" height="24" >년도</td>
<td width="100" align="center" height="24" >프로젝트코드</td>
<td width="285" align="center" height="24" >프로젝트명</td>
<td width="160" align="center" height="24" >조사방법</td>
<td width="60" align="center" height="24" >샘플수</td>
<%if command="excel" then%>
<td width="" align="center" height="24" >세부부서</td>
<td width="" align="center" height="24" >조사목적</td>
<td width="" align="center" height="24" >클라이언트명</td>
<td width="" align="center" height="24" >클라이언트형태</td>
<td width="" align="center" height="24" >카테고리</td>
<td width="" align="center" height="24" >업종(대)</td>
<td width="" align="center" height="24" >업종(중)</td>
<td width="" align="center" height="24" >업종(소)</td>
<td width="" align="center" height="24" >조사대상</td>
<td width="" align="center" height="24" >조사지역</td>
<td width="" align="center" height="24" >계약기간</td>
<td width="" align="center" height="24" >실사시작일</td>
<td width="" align="center" height="24" >실사종료일</td>
<td width="" align="center" height="24" >보고서제출일</td>
<td width="" align="center" height="24" >담당연구원1</td>
<td width="" align="center" height="24" >담당연구원2</td>
<td width="" align="center" height="24" >담당연구원3</td>
<td width="" align="center" height="24" >담당연구원4</td>
<td width="" align="center" height="24" >담당SV</td>
<%end if%>
<td width="40" align="center" height="24" >문항</td>
<td width="125" align="center" height="24" >계약액</td>
<td width="40" align="center" height="24" >매출액</td>
<td width="110" align="center" height="24" >예상직접비</td>
<td width="130" align="center" height="24" >실제직접비</td>
<td width="140" align="center" height="24" >직접비율(%)</td>
<td width="90" align="center" height="24" >샘플당단가</td>
<td width="90" align="center" height="24" >실사난이도</td>
<td width="90" align="center" height="24" >조사일수(일)</td>
<td width="40" align="center" height="24" >연구</td>
<td width="40" align="center" height="24" >실사</td>
<td width="40" align="center" height="24" >전산</td>
<td width="40" align="center" height="24" >경영</td>
</tr>
<%
'Response.Write query & "<BR>"
rsc.Open tmp_search_query, adoConn, 1
if rsc.RecordCount > 0 then
for i = 1 to rsc.RecordCount
if i mod 2 = 0 then
tmp_bgcolor = "#dbe9f2"
else
tmp_bgcolor = "#ffffff"
end if
%>
<tr height="24" bgcolor="<%=tmp_bgcolor%>">
<td width="" align="center">
<%
for j = 1 to ubound(tmp_depart)
if tmp_depart(j,1) = rsc("p_depart") then
Response.Write trim(tmp_depart(j,2))
tmp_teamname = tmp_depart(j,2)
end if
next
%>
</td>
<td width="" align="center" ><%=mid(rsc("p_sn"),1,2)%>년</td>
<td width="" align="center" ><%=rsc("p_sn")%></td>
<td width="" align="center">
<%if command <> "excel" then%>
<a href="javascript:modit('<%=rsc("p_sn")%>','<%=tmp_teamname%>')" class="blue">
<%end if%>
<%=rsc("p_subject")%>
<%if command <> "excel" then%>
</a>
<%end if%>
</td>
<%
p_method = "몰라" '조사방법
for j = 0 to int(ubound(method))
if trim(method(j,1)) = trim(rsc("p_method")) then
p_method = method(j,2)
exit for
end if
next%>
<td width="" align="center">
<%if p_method = "몰라" then%>
<%=p_method%>
<%else%>
<%=p_method%>
<%end if%>
</td>
<%
if isnull(rsc("p_sample")) then '
tmpstr = "0"
else
tmpstr = rsc("p_sample")
end if%>
<td width="" align="center" ><%=formatnumber(tmpstr,0)%></td>
<%
if command = "excel" then
query = "SELECT * FROM Depart WHERE d_code='" & rsc("p_depart_dep") & "' "
'Response.Write "query : " & query & " <br>"
rs.Open query, adoConn, 1
if rs.RecordCount > 0 then
tmp_depart_dep = rs("d_mname_shot")
end if
rs.Close
%>
<td width="" align="center"><%=tmp_depart_dep%></td>
<td width="" align="center"><%=rsc("p_intention")%></td>
<%
tmpstr="&nbsp;"'"클라이언트 명"
query = "SELECT * "
query = query & "FROM [Client] "
query = query & "WHERE c_code='" & rsc("p_cli_company") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("c_name")
end if
rsf.Close
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr="&nbsp;"'"'클라이언트 타입"
if not isnull(rsc("p_cli_type")) then
if trim(rsc("p_cli_type")) <> "" then
query = "select * from client_type where c_type_code = " & cint(rsc("p_cli_type"))
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("c_type_name")
end if
rsf.Close
end if
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr="&nbsp;"'카테고리"
if rsc("p_category") <> "" then
query = "SELECT * FROM p_category "
query = query & "WHERE code1='" & rsc("p_category") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("name1")
end if
rsf.Close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr="&nbsp;"'업종"
if rsc("p_types1") <> "" then
query = "SELECT * FROM p_types "
query = query & "WHERE t_code1='" & rsc("p_types1") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("t_name")
end if
rsf.Close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr="&nbsp;"'업종"
if rsc("p_types2") <> "" then
query = "SELECT * FROM p_types "
query = query & "WHERE t_code2='" & rsc("p_types2") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("t_name")
end if
rsf.Close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr="&nbsp;"'업종"
if rsc("p_types3") <> "" then
query = "SELECT * FROM p_types "
query = query & "WHERE t_code3='" & rsc("p_types3") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("t_name")
end if
rsf.Close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<td width="" align="center"><%=rsc("p_target_text")%></td>
<td width="" align="center"><%=rsc("p_area")%></td>
<td width="" align="center"><%=rsc("p_convdate_st2")&"~"&rsc("p_convdate_end2")%></td>
<td width="" align="center"><%=rsc("p_field_st")%></td>
<td width="" align="center"><%=rsc("p_field_end")%></td>
<td width="" align="center"><%=rsc("p_report_st")&"~"&rsc("p_report_end")%></td>
<%
tmpstr ="&nbsp;"'연구원 1"
if rsc("p_rsch_1") <> "" then
query = "SELECT * "
query = query & "FROM Person "
query = query & "WHERE p_no='" & rsc("p_rsch_1") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("p_name")
end if
rsf.close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr ="&nbsp;"'연구원 2"
if rsc("p_rsch_2") <> "" then
query = "SELECT * "
query = query & "FROM Person "
query = query & "WHERE p_no='" & rsc("p_rsch_2") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("p_name")
end if
rsf.close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr ="&nbsp;"'연구원 3"
if rsc("p_rsch_3") <> "" then
query = "SELECT * "
query = query & "FROM Person "
query = query & "WHERE p_no='" & rsc("p_rsch_3") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("p_name")
end if
rsf.close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr ="&nbsp;"'연구원 4"
if trim(rsc("p_rsch_4")) <> "" then
query = "SELECT * "
query = query & "FROM Person "
query = query & "WHERE p_no='" & rsc("p_rsch_4") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("p_name")
end if
rsf.close
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
tmpstr = "&nbsp;"'담당 SV"
query = "SELECT * "
query = query & "FROM Person "
query = query & "WHERE p_no='" & rsc("p_sv") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
tmpstr = rsf("p_name")
end if
rsf.Close
%>
<td width="" align="center"><%=tmpstr%></td>
<%
end if 'if command <> "excel" then
%>
<%
if isnull(rsc("p_survey_cnt")) then
tmpstr = "0"
else
tmpstr = rsc("p_survey_cnt")
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
if isnull(rsc("p_budget")) then
p_budget = "0"
else
p_budget = rsc("p_budget")
end if
%>
<td width="" align="center" ><%=formatnumber(p_budget,0)%>&nbsp;원</td>
<td width="" align="center" ><%=formatnumber(p_sales,0)%>&nbsp;원</td>
<%
if isnull(rsc("p_esti_cost")) then
tmpstr = "0"
else
if trim(rsc("p_esti_cost")) = "" then
tmpstr = "0"
else
tmpstr = rsc("p_esti_cost")
end if
end if
%>
<td width="" align="center" ><%=formatnumber(tmpstr,0)%>&nbsp;원</td>
<%if isnull(rsc("p_real_cost")) then
pay_actual = "0"
else
if rsc("p_real_cost") = "" then
pay_actual = "0"
else
pay_actual = rsc("p_real_cost")
end if
end if
if p_method <> "몰라" then
tmpstr = default_path_root & "ess/direct_cost_print.asp?p_sn=" & rsc("p_sn")
' tmpstr = tmpstr & "&p_c_methodm1=" & rsc("p_method")
if (cint(rsc("p_method"))>=12 and cint(rsc("p_method"))<=14) or cint(rsc("p_method")) =18 or cint(rsc("p_method")) =20 then
'F/F면
' tmpstr = tmpstr & "&p_type=FF&pay_type=1"
elseif (cint(rsc("p_method"))=15) or (cint(rsc("p_method"))=16) then
'FGI면
' tmpstr = tmpstr & "&p_type=FGI&pay_type=2"
elseif (cint(rsc("p_method"))=11) or (cint(rsc("p_method"))=17) or (cint(rsc("p_method"))=19) or (cint(rsc("p_method"))>=21 and cint(rsc("p_method"))<=23) then
'TEL이면
' tmpstr = tmpstr & "&p_type=TEL&pay_type=3"
elseif cint(rsc("p_method"))=24 then
'gang이면
' tmpstr = tmpstr & "&p_type=Gang&pay_type=4"
else
' tmpstr = "해당프로젝트에 조사방법이 등록되어 있지 않습니다"
' '기타 이면
' tmpstr = tmpstr & "&p_type=Etc&pay_type=5"
end if
end if
if tmpstr = "해당프로젝트에 조사방법이 등록되어 있지 않습니다" then%>
<a href='javascript:alert("해당프로젝트에 조사방법이 등록되어 있지 않습니다.\n\n연구부서에서 프로젝트 관리의 수정 및 조회에서 조사방법을 지정해야합니다.");'>관리</a>
<%else
if cint(Session("p_depart") ) < 100 then '무조건 view only로 하기 위해
' tmpstr = tmpstr & "&printmode=1"
end if%>
<%end if%>
<td width="" align="center">
<% if p_method <> "몰라" and command <> "excel" then%>
<a href="javascript:go_view('<%=tmpstr%>')" class="blue">
<% end if %>
<%=formatnumber(pay_actual,0)%>&nbsp;원
<% if p_method <> "몰라" and command <> "excel" then %>
</a>
<% end if %>
</td>
<%
if p_budget = "0" then
p_budget = 1
end if
pay_actual_proportion = formatnumber((pay_actual / CDbl(p_budget)) * 100, 2)
%>
<%if isnull(pay_actual_proportion) then
tmpstr = "0"
else
tmpstr = pay_actual_proportion
end if%>
<td width="" align="center" ><%=tmpstr%>&nbsp;%</td>
<%
if isnull(rsc("p_sample_value_chk")) then
tmpstr = "0"
else
tmpstr = rsc("p_sample_value_chk")
end if
if isnull(rsc("p_sample_real")) or clng(p_budget) = 0 then
tmpstr = "0"
else
if clng(rsc("p_sample_real")) = 0 then
tmpstr = "0"
else
tmpstr = clng(p_budget) / rsc("p_sample_real")
end if
end if
%>
<td width="" align="center"><%=formatnumber(tmpstr,0)%>&nbsp;원</td>
<td width="" align="center"><%=rsc("p_field_rank")%></td>
<%
if isnull(rsc("p_field_end")) or isnull(rsc("p_field_st")) then
tmpstr = "0"
else
if trim(rsc("p_field_end")) = "" or trim(rsc("p_field_st")) = "" then
tmpstr = "0"
else
tmpstr = cdate(rsc("p_field_end")) - cdate(rsc("p_field_st")) + 1
end if
end if
%>
<td width="" align="center"><%=tmpstr%></td>
<%
query = "SELECT * "
query = query & "FROM file_log "
query = query & "WHERE p_sn='" & rsc("p_sn") & "' "
rsf.Open query, adoConn, 1
if rsf.RecordCount > 0 then
research = rsf("research")
fieldwork = rsf("fieldwork")
computer = rsf("computer")
manager = rsf("manager")
end if
rsf.Close
if research = "1" then
research = "<font color='blue'><b>Y</b></font>"
else
research = "N"
end if
if fieldwork = "1" then
fieldwork = "<font color='blue'><b>Y</b></font>"
else
fieldwork = "N"
end if
if computer = "1" then
computer = "<font color='blue'><b>Y</b></font>"
else
computer = "N"
end if
if manager = "1" then
manager = "<font color='blue'><b>Y</b></font>"
else
manager = "N"
end if
%>
<td width="" align="center"><%=research%></td>
<td width="" align="center"><%=fieldwork%></td>
<td width="" align="center"><%=computer%></td>
<td width="" align="center"><%=manager%></td>
</tr>
<%
rsc.MoveNext
next
end if 'if rsc.RecordCount > 0 then
rsc.Close
%>
</table>
</div>
</td>
</tr>
<%if command <> "excel" then%>
<tr>
<td colspan="2">
<font class="k_darkorange">* 프로젝트 명을 클릭하시면 상세내용을 볼 수 있습니다.</font>
</td>
</tr>
<%end if%>
</table>
<% end if ''if request("s") = 1 then %>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</form>
<%if command <> "excel" then%>
<%END IF%>