최초커밋
This commit is contained in:
203
project/project_contactlist_rate_chk.asp
Normal file
203
project/project_contactlist_rate_chk.asp
Normal file
@@ -0,0 +1,203 @@
|
||||
<!-- #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 = 'Ȯ<><C8AE>' "
|
||||
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 "Ȯ<><C8AE> ó<><C3B3> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
end if
|
||||
end if
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE></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">
|
||||
<09>˻<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<09><><EFBFBD><EFBFBD> <20><>/<2F><> :
|
||||
<select name="tmp_year">
|
||||
<option value="" <% if tmp_year = "" then %> selected <% end if %>><3E><>ü</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><3E><> /
|
||||
<select name="tmp_month">
|
||||
<option value="" <% if tmp_month = "" then %> selected <% end if %>><3E><>ü</option>
|
||||
<%
|
||||
for i = 1 to 12
|
||||
%>
|
||||
<option value="<%=i%>" <% if tmp_month = cstr(i) then %> selected <% end if %>><%=i%></option>
|
||||
<%
|
||||
next
|
||||
%>
|
||||
</select> <20><>
|
||||
</td>
|
||||
<td align="right">
|
||||
<button type="button" class='btn btn-sm btn-primary mr-1' onclick='subit();'><3E><> <20><></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 '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' " & vbCrLf
|
||||
query = query & " when p_contactor = '002' then '<27><><EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD>' " & vbCrLf
|
||||
query = query & " when p_contactor = '003' then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' " & vbCrLf
|
||||
query = query & " when p_contactor = '004' then '<27><><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>' " & 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, '<27><>Ȯ<EFBFBD><C8AE>') 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
|
||||
'------------------------------------------------------
|
||||
'<27><> <20>ɼ<EFBFBD>
|
||||
if tmp_year <> "0" and tmp_year <> "" then
|
||||
query = query & " AND YEAR(PB.p_input_dt) = '" & tmp_year & "' " & vbCrLf
|
||||
end if
|
||||
'------------------------------------------------------
|
||||
'<27><> <20>ɼ<EFBFBD>
|
||||
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 '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
|
||||
query = query & " when p_contactor = '002' then '<27><><EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD>' "
|
||||
query = query & " when p_contactor = '003' then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
|
||||
query = query & " when p_contactor = '004' then '<27><><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>' "
|
||||
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, '<27><>Ȯ<EFBFBD><C8AE>'), 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" ><3E><><EFBFBD>ȹ<EFBFBD>ȣ</td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td align="center" >Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td align="center" ><3E><EFBFBD><DFBB><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>)</td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD>(%)</td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td align="center" >Ȯ<><C8AE></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="Ȯ<><C8AE>" style="cursor:pointer;" onclick="chkCost('<%=Rs("p_sn")%>');"/></td>
|
||||
</tr>
|
||||
<%
|
||||
Rs.MoveNext
|
||||
next
|
||||
else
|
||||
%>
|
||||
<tr>
|
||||
<td align="center" colspan="10">
|
||||
- <20><><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> -
|
||||
</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("[<5B><>] <20><><EFBFBD>ýÿ<C3BD><C3BF><EFBFBD> [<5B>]<5D><> <20><><EFBFBD><EFBFBD> <20>Ͽ<EFBFBD><CFBF><EFBFBD> <20>մϴ<D5B4>. ");
|
||||
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" -->
|
||||
Reference in New Issue
Block a user