203 lines
8.9 KiB
Plaintext
203 lines
8.9 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<%
|
|
p_depart = request("p_depart")
|
|
tmp_month = request("tmp_month")
|
|
tmp_year = request("tmp_year")
|
|
if tmp_year="" then tmp_year=year(date())
|
|
|
|
if request("chkPsn") <> "" then
|
|
set dbin = server.CreateObject("ADODB.CONNECTION")
|
|
query = " UPDATE T_PROJECT_BASE "
|
|
query = query & " SET p_cost_rate_chk = '확인' "
|
|
query = query & " WHERE p_sn = '" & request("chkPsn") & "' and p_cost_rate_chk is null "
|
|
dbin.Open adoConn
|
|
dbin.Execute query, i
|
|
dbin.Close
|
|
|
|
if i>0 then
|
|
Alert "확인 처리 되었습니다."
|
|
end if
|
|
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">
|
|
<form name="pms" method="post">
|
|
<input type="hidden" name="chkPsn" value="" />
|
|
<table class="table table-sm table-sm2">
|
|
<tr>
|
|
<td colspan="2">
|
|
검색 조건을 선택하세요.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
등록 년/월 :
|
|
<select name="tmp_year">
|
|
<option value="" <% if tmp_year = "" then %> selected <% end if %>>전체</option>
|
|
<%
|
|
for i = year(date()) to 2017 step -1
|
|
%>
|
|
<option value="<%=i%>" <% if trim(tmp_year) = trim(cstr(i)) then %> selected <% end if %>><%=i%></option>
|
|
<%
|
|
next
|
|
%>
|
|
</select>년 /
|
|
<select name="tmp_month">
|
|
<option value="" <% if tmp_month = "" then %> selected <% end if %>>전체</option>
|
|
<%
|
|
for i = 1 to 12
|
|
%>
|
|
<option value="<%=i%>" <% if tmp_month = cstr(i) then %> selected <% end if %>><%=i%></option>
|
|
<%
|
|
next
|
|
%>
|
|
</select> 월
|
|
</td>
|
|
<td align="right">
|
|
<button type="button" class='btn btn-sm btn-primary mr-1' onclick='subit();'>검 색</button>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<!-- loop start -->
|
|
<%
|
|
query = ""
|
|
query = query & " SELECT PB.p_sn, PB.p_subject, E.p_cli_company_nm, " & vbCrLf
|
|
query = query & " CP.p_cli_depart, CP.p_cli_per_nm, " & vbCrLf
|
|
query = query & " case when p_contactor = '001' then '공개입찰' " & vbCrLf
|
|
query = query & " when p_contactor = '002' then '제안경쟁' " & vbCrLf
|
|
query = query & " when p_contactor = '003' then '가격입찰' " & vbCrLf
|
|
query = query & " when p_contactor = '004' then '수의계약' " & vbCrLf
|
|
query = query & " else '' end as p_contactor_label, " & vbCrLf
|
|
query = query & " CT.p_client_type_nm, " & vbCrLf
|
|
query = query & " ISNULL(STUFF(( SELECT ',' + p_method_nm FROM T_PROJECT_METHOD TPM LEFT OUTER JOIN " & vbCrLf
|
|
query = query & " T_PROJECT_METHOD_CD TPMC ON TPM.p_method_cd = TPMC.p_method_cd AND TPMC.p_method_yn='y' " & vbCrLf
|
|
query = query & " WHERE p_sn = PB.p_sn " & vbCrLf
|
|
query = query & " ORDER BY TPMC.p_method_cd " & vbCrLf
|
|
query = query & " FOR XML PATH ('')),1,1,''), '') AS p_method_str, " & vbCrLf
|
|
query = query & " PB.p_cont_cost, ISNULL(PB.p_cost_rate, 0) AS p_cost_rate, isnull(p_cost_rate_chk, '미확인') AS p_cost_rate_chk, PB.p_decide_date, " & vbCrLf
|
|
query = query & " PB.p_input_dt, p_state, PB.p_input_user, p_depart_dep, d.T_Name AS p_depart_nm, " & vbCrLf
|
|
query = query & " p.p_name as p_name " & vbCrLf
|
|
query = query & " FROM T_PROJECT_BASE PB LEFT JOIN T_PROJECT_METHOD TPM ON PB.p_sn = TPM.p_sn " & vbCrLf
|
|
query = query & " INNER JOIN V_person P ON PB.p_input_user = P.P_NO " & vbCrLf
|
|
query = query & " INNER JOIN V_Department D ON PB.p_depart_dep = d.before_t_cd1 " & vbCrLf
|
|
query = query & " left outer join V_CLIENT_COMP as E on PB.p_cli_company_cd = E.p_cli_company_cd " & vbCrLf
|
|
query = query & " left outer join V_CLIENT_PERSON as CP on PB.p_cli_company_cd = CP.p_cli_company_cd AND PB.p_cli_per_cd = CP.p_cli_per_cd " & vbCrLf
|
|
query = query & " left outer join T_CLIENT_TYPE_CD as CT on PB.p_client_type_cd = CT.p_client_type_cd " & vbCrLf
|
|
query = query & " WHERE PB.p_sn IS NOT NULL AND TPM.p_progress_status IS NULL AND p_state NOT IN ('X', 'D') " & vbCrLf
|
|
query = query & " AND ISNULL(PB.p_cost_rate, 0) >= 55 and PB.p_cost_rate_chk is null " & vbCrLf
|
|
'------------------------------------------------------
|
|
'년 옵션
|
|
if tmp_year <> "0" and tmp_year <> "" then
|
|
query = query & " AND YEAR(PB.p_input_dt) = '" & tmp_year & "' " & vbCrLf
|
|
end if
|
|
'------------------------------------------------------
|
|
'월 옵션
|
|
if tmp_month <> "0" and tmp_month <> "" then
|
|
query = query & " AND MONTH(PB.p_input_dt) = '" & right("0" & tmp_month, 2) & "' " & vbCrLf
|
|
end if
|
|
'------------------------------------------------------
|
|
query = query & " GROUP BY PB.p_sn, PB.p_subject, E.p_cli_company_nm, CP.p_cli_depart, CP.p_cli_per_nm, "
|
|
query = query & " case when p_contactor = '001' then '공개입찰' "
|
|
query = query & " when p_contactor = '002' then '제안경쟁' "
|
|
query = query & " when p_contactor = '003' then '가격입찰' "
|
|
query = query & " when p_contactor = '004' then '수의계약' "
|
|
query = query & " else '' end, "
|
|
query = query & " CT.p_client_type_nm, PB.p_cont_cost, ISNULL(PB.p_cost_rate, 0), ISNULL(p_cost_rate_chk, '미확인'), PB.p_decide_date, "
|
|
query = query & " PB.p_input_dt, p_state, PB.p_input_user, p_depart_dep, d.T_Name, p.p_name"
|
|
'Response.Write query & "<BR>"
|
|
Rs.Open query, adoConn, 1
|
|
%>
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<tr>
|
|
<td align="center" >제안번호</td>
|
|
<td align="center" >프로젝트명</td>
|
|
<td align="center" >클라이언트명</td>
|
|
<td align="center" >발생경로</td>
|
|
<td align="center" >조사방법</td>
|
|
<td align="center" >예상계약액(원)</td>
|
|
<td align="center" >예상직접<br>비율(%)</td>
|
|
<td align="center" >담당</td>
|
|
<td align="center" >최초등록일</td>
|
|
<td align="center" >확인</td>
|
|
</tr>
|
|
<%
|
|
if Rs.RecordCount > 0 then
|
|
for i = 1 to Rs.RecordCount
|
|
%>
|
|
<tr>
|
|
<td align="center"><%=Rs("p_sn")%></td>
|
|
<td align="left"><a href="javascript:openit('<%=Rs("p_sn")%>')" class="blue"><%=Rs("p_subject")%></td>
|
|
<td align="center"><%=Rs("p_cli_company_nm")%> (<%=Rs("p_cli_per_nm")%>)</td>
|
|
<td align="center"><%=Rs("p_contactor_label") %></td>
|
|
<td align="center"><%=Rs("p_method_str")%></td>
|
|
<td align="center"><%=FormatNumber(Rs("p_cont_cost"), 0)%></td>
|
|
<td align="center"><%=Rs("p_cost_rate")%></td>
|
|
<td align="center"><%=Rs("p_depart_nm")%> (<%=Rs("p_name")%>)</td>
|
|
<td align="center" ><%=Left(Rs("p_input_dt"), 10)%></td>
|
|
<td align="center"><input type="button" value="확인" style="cursor:pointer;" onclick="chkCost('<%=Rs("p_sn")%>');"/></td>
|
|
</tr>
|
|
<%
|
|
Rs.MoveNext
|
|
next
|
|
else
|
|
%>
|
|
<tr>
|
|
<td align="center" colspan="10">
|
|
- 등록된 내용이 없습니다 -
|
|
</td>
|
|
</tr>
|
|
<%
|
|
end if
|
|
Rs.Close
|
|
%>
|
|
<!-- loop end -->
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
function openit(a) {
|
|
var url = "project_contactinfo.asp?cutmenu=1&p_sn=" + a;
|
|
var tmp_width = 1050;
|
|
var tmp_height = 880;
|
|
window.open(url, '', 'left=0,top=0,width=' + tmp_width + ',height=' + tmp_height + ',scrollbars=yes,resizable=yes');
|
|
}
|
|
|
|
function subit() {
|
|
if((pms.tmp_month.value!="0")&&(pms.tmp_year.value=="0")){
|
|
alert("[월] 선택시에는 [년도]를 선택 하여야 합니다. ");
|
|
return false;
|
|
}
|
|
document.pms.action = "project_contactlist_rate_chk.asp";
|
|
document.pms.submit();
|
|
}
|
|
function chkCost(psn){
|
|
document.pms.chkPsn.value = psn;
|
|
document.pms.action = "project_contactlist_rate_chk.asp";
|
|
document.pms.submit();
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |