최초커밋
This commit is contained in:
282
inspection/end_project_neakun_expence.asp
Normal file
282
inspection/end_project_neakun_expence.asp
Normal file
@@ -0,0 +1,282 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<%
|
||||
dim command
|
||||
command = Request("command")
|
||||
|
||||
p_sn = request("p_sn")
|
||||
p_subject = request("p_subject")
|
||||
work_type = request("work_type")
|
||||
p_depart = request("p_depart")
|
||||
year_from = request("year_from")
|
||||
year_to = request("year_to")
|
||||
month_from = request("month_from")
|
||||
month_to = request("month_to")
|
||||
|
||||
dim tmp_p_sn
|
||||
dim subTotal
|
||||
dim subTime
|
||||
dim allTotal
|
||||
dim allTime
|
||||
|
||||
if month_from = "" or month_from = "00" then
|
||||
month_from = "01"
|
||||
elseif cint(month_from) < 10 and len(month_from) < 2 then
|
||||
month_from = "0" & month_from
|
||||
end if
|
||||
if month_to = "" or month_to = "00" then
|
||||
month_to = "12"
|
||||
elseif cint(month_to) < 10 and len(month_to) < 2 then
|
||||
month_to = "0" & month_to
|
||||
end if
|
||||
|
||||
if tmp_month = "" then
|
||||
tmp_month = cstr(month(date()))
|
||||
end if
|
||||
|
||||
if command <> "excel" then
|
||||
%>
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<!-- 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>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ҿ<EFBFBD><D2BF><EFBFBD><EFBFBD><EFBFBD></h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<%
|
||||
End If
|
||||
|
||||
if command = "excel" then
|
||||
Response.ContentType = "application/vnd.ms-excel"
|
||||
Response.AddHeader "Content-Disposition","attachment;filename=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD>ҿ<EFBFBD><D2BF><EFBFBD><EFBFBD><EFBFBD>.xls"
|
||||
end if
|
||||
%>
|
||||
<%if command <> "excel" then%>
|
||||
<% Dim f_menu : f_menu = "np" %>
|
||||
<!-- #include file = "f_menu.asp" -->
|
||||
<%End If%>
|
||||
<form name="pms" method="post">
|
||||
<table width="1200px" class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<%if command <> "excel" then%>
|
||||
<tr>
|
||||
<td width="15%" height="30px" align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><>ȣ</td>
|
||||
<td width="35%" height="30px" ><input name="p_sn" type="text" value="<%=p_sn %>" style="width:200px" ></td>
|
||||
<td width="15%" height="30px" align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td width="35%" height="30px" ><input name="p_subject" type="text" value="<%=p_subject %>" style="width:200px" ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<%
|
||||
query = " select *"
|
||||
query = query & " from direct_costcode "
|
||||
query = query & " where d_cost_kind = 'field' "
|
||||
query = query & " and d_cost_useyn = 'y' "
|
||||
query = query & " and d_cost_parents = '2' "
|
||||
Adors.Open query, adoConn, 1
|
||||
%>
|
||||
<td width="15%" height="30px" align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="35%" height="30px" >
|
||||
<select name="work_type">
|
||||
<option value=""><3E><>ü</option>
|
||||
<% for i=1 to Adors.recordcount %>
|
||||
<option value="<%=Adors("d_cost_code")%>" <% if CStr(Adors("d_cost_code")) = work_type then %>selected <%end if %>><%=Adors("d_cost_name") %></option>
|
||||
<% Adors.movenext
|
||||
next
|
||||
Adors.close
|
||||
%>
|
||||
</select>
|
||||
</td>
|
||||
<%
|
||||
query = ""
|
||||
query = query & " SELECT DISTINCT before_t_cd1 as d_code, LEFT(T_Name, 8) as d_name "
|
||||
query = query & " FROM project2.dbo.v_Department "
|
||||
query = query & " WHERE before_t_cd1 between 20 and 99 "
|
||||
query = query & " order by LEFT(T_Name, 8) "
|
||||
Adors.Open query, adoConn, 1
|
||||
%>
|
||||
<td width="15%" height="30px" align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD></td>
|
||||
<td width="35%" height="30px" >
|
||||
<select name="p_depart">
|
||||
<option value=""><3E><>ü</option>
|
||||
<% for i=1 to Adors.recordcount %>
|
||||
<option value="<%=Adors("d_code")%>" <% if CStr(Adors("d_code")) = p_depart then %>selected <%end if %>><%=Adors("d_name") %></option>
|
||||
<% Adors.movenext
|
||||
next
|
||||
Adors.close
|
||||
%>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" height="30px" align="center" ><3E>˻<EFBFBD><CBBB>Ⱓ <20><><EFBFBD><EFBFBD></td>
|
||||
<td width="75%" height="30px" colspan="3" >
|
||||
<input type="text" name="year_from" <% if year_from = "" then %> value="<%=year(date) %>" <% else %> value="<%=year_from %>" <% end if %> style="width:46px;text-align:right" /><3E><>
|
||||
<input type="text" name="month_from" value="<%=month_from %>" style="width:40px;text-align:right" /><3E><>
|
||||
  ~  
|
||||
<input type="text" name="year_to" <% if year_to = "" then %> value="<%=year(date) %>" <% else %> value="<%=year_to %>" <% end if %> style="width:46px;text-align:right" /><3E><>
|
||||
<input type="text" name="month_to" value="<%=month_to %>" style="width:40px;text-align:right" /><3E><>   (* <20>ش<EFBFBD> <20>Ⱓ<EFBFBD><E2B0A3> <20><><EFBFBD><EFBFBD> <20><>ȹ<EFBFBD><C8B9> <20><><EFBFBD><EFBFBD> <20>ǻ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="4" class="pt-2">
|
||||
<img src="/images/common/btn_search.jpg" align="absmiddle" style="cursor:pointer" onclick="search('search')">
|
||||
<img src="/images/common/btn_excel.jpg" align="absmiddle" onclick="search('excel')" style='CURSOR:pointer;' title ='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'></p>
|
||||
</td>
|
||||
</tr>
|
||||
<%end if %>
|
||||
<% if command <> "" then %>
|
||||
<tr>
|
||||
<td align="center" colspan="4">
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><>ȣ</td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>۳<EFBFBD>¥</td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ᳯ¥</td>
|
||||
<td align="center" ><3E><> <20><><EFBFBD>Խð<D4BD></td>
|
||||
<td align="center" ><3E><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
'--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ҿ<EFBFBD><D2BF><EFBFBD><EFBFBD><EFBFBD> <20>˻<EFBFBD>-<2D><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
query = " select isnull(d2.d_name,d1.d_name) as d_name, tmp.p_sn, tmp.p_child_sn as p_child_sn, isnull(tpm.p_subject,p.p_subject) as p_subject, tmp.p_sebu_code, tmp.s_gubun as p_sebu, "
|
||||
query = query & " st_date, ed_date, job_total_time, s_sum, isnull(tpm.p_method_cd,'') as p_method_cd, isnull(tpm.p_sub_type,'') as p_sub_type "
|
||||
query = query & " from ( "
|
||||
query = query & " select nw.p_sn, tmp.p_sn as p_child_sn, s_gubun, ROUND(SUM(tmp.s_wan),2) as job_total_time, SUM(tmp.s_sum) as s_sum, MIN(work_dt) as st_date, MAX(work_dt) as ed_date, nw.p_sebu_code "
|
||||
query = query & " from t_neakeun_pay tmp left outer join neakeun_work nw on tmp.attribute01 = convert(varchar(15),nw.id) "
|
||||
query = query & " where s_gubun not like '<27>߰<EFBFBD>%' "
|
||||
query = query & " group by tmp.p_sn, tmp.s_gubun, nw.p_sn, nw.p_sebu_code "
|
||||
query = query & " union "
|
||||
query = query & " select nw.p_sn, tmp.p_sn as p_child_sn, s_gubun, '' as job_total_time, SUM(tmp.s_sum) as s_sum, MIN(work_dt) as st_date, MAX(work_dt) as ed_date, '0' as p_sebu_code "
|
||||
query = query & " from t_neakeun_pay tmp left outer join neakeun_work nw on tmp.attribute01 = convert(varchar(15),nw.id) "
|
||||
query = query & " where tmp.s_gubun like '<27>߰<EFBFBD>%' "
|
||||
query = query & " group by tmp.p_sn, tmp.s_gubun, nw.p_sn "
|
||||
query = query & " ) tmp "
|
||||
query = query & " left outer join T_PROJECT_METHOD tpm on tmp.p_child_sn = tpm.p_child_sn "
|
||||
query = query & " left outer join project p on tmp.p_sn = p.p_sn "
|
||||
query = query & " left outer join Depart d1 on tpm.p_rsch_dept = d1.d_code "
|
||||
query = query & " left outer join Depart d2 on p.p_depart = d2.d_code "
|
||||
query = query & " where tmp.p_child_sn != '' AND (p.p_field_complete = 1 or tpm.p_field_complete = 1) "
|
||||
if p_sn <> "" then
|
||||
query = query & " AND tmp.p_sn LIKE '%"& p_sn &"%' "
|
||||
end if
|
||||
if p_subject <> "" then
|
||||
query = query & " AND (p.p_subject LIKE '%"&p_subject&"%' OR tpm.p_subject like '%"&p_subject&"%') "
|
||||
end if
|
||||
if work_type <> "" then
|
||||
query = query & " AND tmp.p_sebu_code = '"&work_type&"' "
|
||||
end if
|
||||
if p_depart <> "" then
|
||||
query = query & " AND (p.p_depart = '"&p_depart&"' OR tpm.p_rsch_dept = '"&p_depart&"') "
|
||||
end if
|
||||
if month_from <> "" then
|
||||
query = query & " AND (tpm.p_field_date_st >= '"&year_from&"-"&month_from&"-00' OR P.p_field_st >= '"&year_from&"-"&month_from&"-00') "
|
||||
end if
|
||||
if month_to <> "" then
|
||||
query = query & " AND (tpm.p_field_date_st <= '"&year_to&"-"&month_to&"-32' OR P.p_field_st <= '"&year_to&"-"&month_to&"-32') "
|
||||
end if
|
||||
query = query & " order by p_child_sn, p_sebu_code desc "
|
||||
|
||||
Adors.open query,adoconn,1
|
||||
|
||||
if Adors.recordcount > 0 then
|
||||
tmp_p_sn = Adors("p_child_sn")
|
||||
end if
|
||||
|
||||
subTime = 0
|
||||
subTotal = 0
|
||||
allTime = 0
|
||||
allTotal = 0
|
||||
|
||||
for i=1 to Adors.recordcount
|
||||
if not isnull(Adors("job_total_time")) then
|
||||
subTime = subTime + Adors("job_total_time")
|
||||
allTime = allTime + Adors("job_total_time")
|
||||
end if
|
||||
if not isnull(Adors("s_sum")) then
|
||||
subTotal = subTotal + Adors("s_sum")
|
||||
allTotal = allTotal + Adors("s_sum")
|
||||
end if
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%= Adors("d_name")%></td>
|
||||
<td align="center"><%= Adors("p_child_sn")%></td>
|
||||
<td align="left"><a href="javascript:openit('1','<%=Adors("p_sn")%>','<%=Adors("p_sub_type")%>','<%=Adors("p_method_cd")%>','<%=Adors("p_child_sn")%>')" class="blue"><%= Adors("p_subject")%></a></td>
|
||||
<td align="center"><%= Adors("p_sebu")%></td>
|
||||
<td align="center"><%= Adors("st_date")%></td>
|
||||
<td align="center"><%= Adors("ed_date")%></td>
|
||||
<td align="center"><%= Adors("job_total_time")%></td>
|
||||
<td align="center"><%= formatnumber(Adors("s_sum") ,0)%></td>
|
||||
</tr>
|
||||
<% Adors.movenext
|
||||
if i < Adors.recordcount then
|
||||
if tmp_p_sn <> Adors("p_child_sn") then
|
||||
%>
|
||||
<tr>
|
||||
<td align="right" colspan="6"><b>[<%= tmp_p_sn%>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>Ұ<EFBFBD></b></td>
|
||||
<td align="center"><b><%= subTime%></b></td>
|
||||
<td align="center"><b><%= formatnumber(subTotal,0)%></b></td>
|
||||
</tr>
|
||||
<%
|
||||
tmp_p_sn = Adors("p_child_sn")
|
||||
subTime = 0
|
||||
subTotal = 0
|
||||
end if
|
||||
else
|
||||
%>
|
||||
<tr>
|
||||
<td align="right" colspan="6"><b>[<%= tmp_p_sn%>]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>Ұ<EFBFBD></b></td>
|
||||
<td align="center"><b><%= subTime%></b></td>
|
||||
<td align="center"><b><%= formatnumber(subTotal,0)%></b></td>
|
||||
</tr>
|
||||
<%
|
||||
end if
|
||||
next
|
||||
Adors.close
|
||||
%>
|
||||
<tr>
|
||||
<td align="right" colspan="6"><b><3E><> <20>հ<EFBFBD></b></td>
|
||||
<td align="center"><b><%= allTime%></b></td>
|
||||
<td align="center"><b><%= formatnumber(allTotal,0)%></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<% end if %>
|
||||
</table>
|
||||
</form>
|
||||
<%if command <> "excel" then%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
function search(a) {
|
||||
document.pms.action = "end_project_neakun_expence.asp?command=" + a;
|
||||
document.pms.submit();
|
||||
}
|
||||
|
||||
function openit(a, z, x, y, v) {
|
||||
if (a == 1) {
|
||||
var url = '/project/project_list2_dep.asp?p_sn=' + z;
|
||||
var tmp_width = 1050;
|
||||
var tmp_height = 800;
|
||||
url = url + "&p_sub_type=" + x + "&p_method_cd=" + y + "&p_child_sn=" + v;
|
||||
}
|
||||
window.open(url, '', 'left=0,top=0,width=' + tmp_width + ',height=' + tmp_height + ',scrollbars=yes,resizable=yes')
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
<% end if %>
|
||||
Reference in New Issue
Block a user