569 lines
17 KiB
Plaintext
569 lines
17 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<!-- #include file = "../include/top_menu.asp" -->
|
|
<%
|
|
set rsf = server.CreateObject("ADODB.RECORDSET")
|
|
|
|
y = request("y")
|
|
|
|
p_depart_dep = request("p_depart_dep")
|
|
p_cli_company = request("p_cli_company")
|
|
p_cli_code = request("p_cli_code")
|
|
p_category = request("p_category")
|
|
p_prop_date_st = request("p_prop_date_st")
|
|
p_prop_date_ed = request("p_prop_date_ed")
|
|
p_subject_tmp = request("p_subject_tmp")
|
|
p_types1 = request("p_types1")
|
|
p_types2 = request("p_types2")
|
|
p_types3 = request("p_types3")
|
|
|
|
today = request("today")
|
|
toyear = request("toyear")
|
|
|
|
s = request("s") '찾기옵션
|
|
|
|
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
|
|
|
|
if y = "1" then
|
|
p_types2 = "0"
|
|
p_types3 = "0"
|
|
elseif y = "2" then
|
|
p_types3 = "0"
|
|
end if
|
|
|
|
'------------------------------------------------------
|
|
'연구부서 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 & " AND d_yes_no='Y' "
|
|
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_code")),1) = rsc("d_code")
|
|
tmp_depart(int(rsc("d_code")),2) = rsc("d_name")
|
|
rsc.MoveNext
|
|
next
|
|
rsc.close
|
|
'------------------------------------------------------
|
|
'조사방법
|
|
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
|
|
'------------------------------------------------------
|
|
'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 project2_pre "
|
|
'query = query & "WHERE p_sn <> '' "
|
|
query = query & "WHERE p_delok = 'Y' "
|
|
'부서--------------------------------------------------
|
|
if p_depart_dep <> "" then
|
|
query = query & " AND p_depart_dep = '" & p_depart_dep & "' "
|
|
end if
|
|
'클라이언트명------------------------------------------
|
|
if p_cli_code <> "" then
|
|
query = query & " AND p_cli_company = '" & p_cli_code & "' "
|
|
end if
|
|
'제안기간----------------------------------------------
|
|
if p_prop_date_st <> "" AND p_prop_date_ed <> "" then
|
|
'시작 및 끝나는 날짜 구하기
|
|
if cint(right(p_prop_date_ed,2)) > 11 then
|
|
edate = cstr(cint(left(p_prop_date_ed,4)) + 1) & "-01-01"
|
|
else
|
|
if cint(right(p_prop_date_ed,2)) > 8 then
|
|
edate = cstr(left(p_prop_date_ed,4)) & "-" & cstr(cint(right(p_prop_date_ed,2)) + 1) & "-01"
|
|
else
|
|
edate = cstr(left(p_prop_date_ed,4)) & "-0" & cstr(cint(right(p_prop_date_ed,2)) + 1) & "-01"
|
|
end if
|
|
end if
|
|
sdate = p_prop_date_st & "-01"
|
|
edate = cdate(edate) - 1
|
|
|
|
query = query & " AND p_prop_date Between '" & sdate & "' AND '" & edate & "' "
|
|
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
|
|
'------------------------------------------------------
|
|
query = query & "ORDER BY p_prop_date DESC, p_sn_tmp DESC "
|
|
'------------------------------------------------------
|
|
|
|
tmp_search_query = query
|
|
end if'if s = "1" then
|
|
'======================================================
|
|
%>
|
|
|
|
<script language=javascript>
|
|
|
|
|
|
function modit(z,x) {
|
|
var url = 'project_search_fail_dep.asp?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_prop_date_st.value = document.pms.p_prop_date_ed.value = today.getYear() + '-' + month;
|
|
}
|
|
else {
|
|
document.pms.p_prop_date_st.value = '';
|
|
document.pms.p_prop_date_ed.value = '';
|
|
}
|
|
}else{
|
|
if (document.pms.toyear.checked == true) {
|
|
document.pms.today.checked = false;
|
|
document.pms.p_prop_date_st.value = today.getYear() + '-' + '01'
|
|
document.pms.p_prop_date_ed.value = today.getYear() + '-' + '12';
|
|
}
|
|
else {
|
|
document.pms.p_prop_date_st.value = '';
|
|
document.pms.p_prop_date_ed.value = '';
|
|
}
|
|
}
|
|
}
|
|
|
|
function clsit(a) {
|
|
if (a == 1)
|
|
{
|
|
document.pms.p_prop_date_st.value = '';
|
|
document.pms.p_prop_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_fail.asp?y="+a;
|
|
document.pms.submit();
|
|
}
|
|
|
|
else
|
|
{
|
|
location.href = "project_search_fail.asp";
|
|
}
|
|
}
|
|
|
|
function chkit(txt) {
|
|
var f = document.pms;
|
|
|
|
if ((f.p_prop_date_st.value != '') || (f.p_prop_date_ed.value != '')) {
|
|
if ((f.p_prop_date_st.value == '') || (f.p_prop_date_ed.value == '')) {
|
|
alert('기간을 선택해 주십시오');
|
|
return false;
|
|
}
|
|
|
|
if (f.p_prop_date_st.value > f.p_prop_date_ed.value) {
|
|
alert('기간이 잘못 선택 되었습니다');
|
|
f.p_prop_date_ed.value = '';
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (txt == "1")
|
|
{
|
|
f.action = 'project_search_fail.asp?s=1';
|
|
}
|
|
else
|
|
{
|
|
f.action = 'search.asp?w=1&command=excel';
|
|
}
|
|
|
|
if (confirm('조건을 채택하지 않으면 검색시간이 오래걸릴 수 있습니다')) {
|
|
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">
|
|
<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="2" height="4" ></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="center" >부서</td>
|
|
<td width="85%" >
|
|
<select name="p_depart_dep">
|
|
<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_dep = cstr(tmp_depart(i,1)) then %> selected <% end if %>><%=tmp_depart(i,2)%></option>
|
|
<%
|
|
end if
|
|
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')">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" >제안일자 기간</td>
|
|
<td >
|
|
<input type="text" style="width:120;" name="p_prop_date_st" readonly value="<%=request("p_prop_date_st")%>" onClick="search('/lib/cal2.asp?x=4','DateSearch','left=500,top=100,width=400,height=200,scrollbars=yes')" style="cursor:pointer"> -
|
|
<input type="text" style="width:120;" name="p_prop_date_ed" readonly value="<%=request("p_prop_date_ed")%>" onClick="search('/lib/cal2.asp?x=5','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 >
|
|
<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
|
|
%>
|
|
|
|
<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
|
|
%>
|
|
|
|
<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" colspan="2" 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()">
|
|
</td>
|
|
</tr>
|
|
<% if request("s") = 1 then %>
|
|
<tr>
|
|
<td style="padding:10 0 0 0;" colspan="2">
|
|
<div style="overflow-x:hidden;overflow-y:scroll;height:24px;width:100%;border:none;">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td width="20%" align="center" height="24" >본부</td>
|
|
<td width="5%" align="center" height="24" >년도</td>
|
|
<td width="25%" align="center" height="24" >프로젝트명</td>
|
|
<td width="30%" align="center" height="24" colspan="3">조사방법</td>
|
|
<td width="20%" align="center" height="24" >클라이언트명</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:0 0 0 0;" colspan="2">
|
|
<div style="overflow-x:hidden;overflow-y:scroll;height:450px;width:100%;border:none;">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<!-- loop start -->
|
|
<%
|
|
'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=""
|
|
end if
|
|
%>
|
|
<tr height="24" bgcolor="<%=tmp_bgcolor%>" title="<%=rsc("p_subject_tmp")%> - <%=rsc("p_intention")%>">
|
|
<td width="20%" align="center">
|
|
<%
|
|
for j = 1 to ubound(tmp_depart)
|
|
if tmp_depart(j,1) = rsc("p_depart_dep") then
|
|
Response.Write trim(tmp_depart(j,2))
|
|
tmp_teamname = tmp_depart(j,2)
|
|
end if
|
|
next
|
|
%>
|
|
</td>
|
|
<td width="5%" align="center" ><%=mid(rsc("p_contact_date"),3,2)%>년</td>
|
|
<td width="25%" align="center" style="CURSOR:pointer;" onclick="modit('<%=rsc("sn")%>','<%=tmp_teamname%>')"><%=rsc("p_subject_tmp")%></td>
|
|
<%
|
|
p_method = "몰라" '조사방법
|
|
for j = 0 to int(ubound(method))
|
|
if trim(method(j,1)) = trim(rsc("p_method1")) then
|
|
p_method = method(j,2)
|
|
exit for
|
|
end if
|
|
next
|
|
%>
|
|
<td width="10%" align="center">
|
|
<%if p_method = "몰라" then%>
|
|
<font color=red><b><%=p_method%></b></font>
|
|
<%else%>
|
|
<%=p_method%>
|
|
<%end if%>
|
|
</td>
|
|
|
|
<%
|
|
p_method = "몰라" '조사방법
|
|
for j = 0 to int(ubound(method))
|
|
if trim(method(j,1)) = trim(rsc("p_method2")) then
|
|
p_method = method(j,2)
|
|
exit for
|
|
end if
|
|
next
|
|
%>
|
|
<td width="10%" align="center">
|
|
<%if p_method = "몰라" then%>
|
|
<font color=red><b><%=p_method%></b></font>
|
|
<%else%>
|
|
<%=p_method%>
|
|
<%end if%>
|
|
</td>
|
|
|
|
<%
|
|
p_method = "몰라" '조사방법
|
|
for j = 0 to int(ubound(method))
|
|
if trim(method(j,1)) = trim(rsc("p_method3")) then
|
|
p_method = method(j,2)
|
|
exit for
|
|
end if
|
|
next
|
|
%>
|
|
<td width="10%" align="center">
|
|
<%if p_method = "몰라" then%>
|
|
<font color=red><b><%=p_method%></b></font>
|
|
<%else%>
|
|
<%=p_method%>
|
|
<%end if%>
|
|
</td>
|
|
|
|
<%
|
|
tmpstr=" "'"클라이언트 명"
|
|
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="20%" align="center"><%=tmpstr%></td>
|
|
</tr>
|
|
<%
|
|
rsc.MoveNext
|
|
next
|
|
else
|
|
%>
|
|
<%
|
|
end if 'if rsc.RecordCount > 0 then
|
|
rsc.Close
|
|
%>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" bgcolor="#d5d5d5" height="1"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<font class="k_darkorange">* 프로젝트 명을 클릭하시면 상세내용을 볼 수 있습니다.</font>
|
|
</td>
|
|
</tr>
|
|
<% end if ''if request("s") = 1 then %>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
|
|
</form>
|