최초커밋
This commit is contained in:
345
business/cost_list.asp
Normal file
345
business/cost_list.asp
Normal file
@@ -0,0 +1,345 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
dim Query
|
||||
yyyy = request("yyyy")
|
||||
mm = request("mm")
|
||||
if yyyy = "" then
|
||||
yyyy = year(cdate(now))
|
||||
end if
|
||||
if mm = "" then
|
||||
mm = Right("0" & TransFormat(month(cdate(now))), 2)
|
||||
end if
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><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">
|
||||
<table width="800" id='mainTb'>
|
||||
<tr>
|
||||
<td valign="top"><div class="menuTitle"><%=yyyy & "<22><> " & mm &"<22><>"%> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:0 0 5 0;">
|
||||
<span class='discript'><%=session("loginuser")%><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڷḦ <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ȭ<><C8AD> <20>Դϴ<D4B4>.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="settingForm">
|
||||
<select name='biz_date' id="biz_date" onchange="biz_date_change(this.value);">
|
||||
<% For i = 0 To -7 Step -1 %>
|
||||
<option value="<%=LEFT(DateAdd("m", i, date), 7) %>" <%If yyyy & "-" & mm = LEFT(DateAdd("m", i, date), 7) Then %> selected <%End If %>><%=LEFT(DateAdd("m", i, date), 7) %></option>
|
||||
<% Next %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='contents_body'>
|
||||
<%
|
||||
query = ""
|
||||
query = query & " SELECT rnum, min(job_date) AS min_date, max(job_date) AS max_date, sum(cost_money) AS cost_money, count(*) AS cnt "
|
||||
query = query & " FROM "
|
||||
query = query & " ( "
|
||||
query = query & " SELECT CEILING(ROW_NUMBER() OVER(ORDER BY job_date, p_sn, job_code, cost_code, cost_money) / 12.0) AS rnum, "
|
||||
query = query & " job_date, ISNULL(cost_money, 0) AS cost_money "
|
||||
query = query & " FROM V_BUSI_COST "
|
||||
query = query & " WHERE p_no = '" & session("User_Number") & "' AND job_date LIKE '" & yyyy & "-" & mm & "%' "
|
||||
query = query & " "
|
||||
query = query & " ) T "
|
||||
query = query & " GROUP BY rnum "
|
||||
adoRs.open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
|
||||
if adoRs.RecordCount > 0 Then
|
||||
%>
|
||||
<div class='listTitle'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></div>
|
||||
<table id='costList_tb'>
|
||||
<tr>
|
||||
<td width="30%" ><3E>Ⱓ</td>
|
||||
<td width="25%" ><3E>ݾ<EFBFBD></td>
|
||||
<td width="25%" ><3E>Ǽ<EFBFBD></td>
|
||||
<td width="20%" ><3E><><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
Dim sum_money, sum_count
|
||||
sum_money = 0
|
||||
sum_count = 0
|
||||
|
||||
Do while Not adoRs.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td><%=adoRs("min_date")%> ~ <%=adoRs("max_date")%></td>
|
||||
<td><%=formatnumber(adoRs("cost_money"), 0)%><3E><></td>
|
||||
<td><%=adoRs("cnt")%></td>
|
||||
<td><input type="button" class="detail_btn" value='<27><EFBFBD><F3BCBCBA><EFBFBD>' data-daterange="<%=adoRs("min_date")%>,<%=adoRs("max_date")%>" data-rnum="<%=adoRs("rnum")%>" /></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_money = sum_money + adoRs("cost_money")
|
||||
sum_count = sum_count + adoRs("cnt")
|
||||
|
||||
adors.moveNext
|
||||
Loop
|
||||
%>
|
||||
|
||||
<%if sum_count > 0 then%>
|
||||
<tr>
|
||||
<td><3E>հ<EFBFBD></td>
|
||||
<td><%=formatnumber(sum_money, 0)%><3E><></td>
|
||||
<td><%=sum_count%></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<%end if%>
|
||||
</table>
|
||||
<%
|
||||
End if
|
||||
adoRs.close
|
||||
|
||||
query = ""
|
||||
query = query & " SELECT gubun, sum(cost) as sum_cost, count(*) as cnt, "
|
||||
query = query & " min(cost_date) as min_date, max(cost_date) as max_date, min(d_order_cnt) as min_order_cnt "
|
||||
query = query & " FROM V_GROUP_COST GC LEFT JOIN Document D ON GC.d_no = D.d_no "
|
||||
query = query & " WHERE cost_date LIKE '" & yyyy & "-" & mm & "%' "
|
||||
query = query & " AND p_no = '" & session("user_number") & "' "
|
||||
query = query & " GROUP BY gubun "
|
||||
|
||||
'response.Write query
|
||||
adoRs.open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
Dim tmp_cost_sum
|
||||
tmp_cost_sum = 0
|
||||
if adoRs.recordCount > 0 Then
|
||||
%>
|
||||
<div class='listTitle'><3E><EFBFBD><D7B7><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD></div>
|
||||
<table id="groupList_tb">
|
||||
<tr>
|
||||
<td width="30%" ><3E>Ⱓ</td>
|
||||
<td width="25%" ><3E>ݾ<EFBFBD></td>
|
||||
<td width="25%" ><3E>Ǽ<EFBFBD></td>
|
||||
<td width="20%" ><3E><><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
Do while Not adoRs.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td><%= adors("min_date")%> ~ <%= adors("max_date")%></td>
|
||||
<td><%= formatNumber(adors("sum_cost"), 0)%><3E><></td>
|
||||
<td><%= adors("cnt")%></td>
|
||||
<td>
|
||||
<input type='button' onclick="detail_cost_all('<%=iif(adors("gubun") = "<22><EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD><EFBFBD>", "1", "2")%>');" value="<22><EFBFBD><D7B7><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD>" />
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
adoRs.MoveNext
|
||||
Loop
|
||||
%>
|
||||
</table>
|
||||
<%
|
||||
end if
|
||||
adoRs.Close
|
||||
|
||||
query = ""
|
||||
query = query & " SELECT convert(varchar(10), target3) as doc_date, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '<27><><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD>' as d_name, "
|
||||
query = query & " convert(money, convert(varchar(30), target4)) as cost_money, login_p_no FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
||||
query = query & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F1BAB8B0><EFBFBD>' AND del_yes_no='no' "
|
||||
query = query & " AND convert(varchar(10), target3) like '" & yyyy & "-" & mm & "%' "
|
||||
query = query & " AND login_p_no = '" & session("user_number") & "' "
|
||||
'response.Write query
|
||||
adoRs.open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
tmp_cost_sum = 0
|
||||
if adoRs.recordCount > 0 Then
|
||||
%>
|
||||
<div class='listTitle'><3E><><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD> <20><><EFBFBD><EFBFBD></div>
|
||||
<table id='marketingList_tb'>
|
||||
<tr>
|
||||
<td width="30%" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="25%" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ</td>
|
||||
<td width="25%" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" ><3E><><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><input type='button' onclick="opnMarketing_all();" value="<%=yyyy %><3E><> <%=mid(adoRs("doc_date"), 6,2) %><3E><> <%=adoRs("d_name") %> <20>ϰ<EFBFBD><CFB0><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD>¿<EFBFBD>)" /></td>
|
||||
</tr>
|
||||
<%
|
||||
Do while Not adoRs.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td><%=adoRs("d_name") %></td>
|
||||
<td><input type='button' onclick="opnMarketing('<%=adoRs("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ") %>');" value="<%=adoRs("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ") %>" /></td>
|
||||
<td><%=adoRs("doc_date") %></td>
|
||||
<td><%=formatnumber(cDbl(adoRs("cost_money")),0) %><3E><></td>
|
||||
</tr>
|
||||
<%
|
||||
tmp_cost_sum = tmp_cost_sum + cDbl(adoRs("cost_money"))
|
||||
adoRs.MoveNext
|
||||
Loop
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="3"><3E><> <20><></td>
|
||||
<td><%=formatnumber(tmp_cost_sum, 0) %><3E><></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
end if
|
||||
adoRs.close
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<style>
|
||||
#mainTb * {
|
||||
font-family: 'Noto Sans CJK KR', sans-serif;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0px;
|
||||
}
|
||||
#mainTb{
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.discript{
|
||||
color: #a70000;
|
||||
font-weight: bold;
|
||||
font-size: 12px !important;
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Safari */
|
||||
-khtml-user-select: none; /* Konqueror HTML */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Non-prefixed version, currently
|
||||
supported by Chrome and Opera */
|
||||
}
|
||||
.listTitle{
|
||||
margin-top: 20px;
|
||||
margin-bottom: 15px;
|
||||
font-size: 17px !important;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
#costList_tb{
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
#costList_tb > tbody > tr > td{
|
||||
border: 1px solid #cccccc;
|
||||
padding: 3px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
#costList_tb > tbody > tr > td > input[type=button]{
|
||||
padding: 1px 25px;
|
||||
cursor:pointer;
|
||||
}
|
||||
#costList_tb > tbody > tr:first-child > td{
|
||||
font-weight:bold;
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
#costList_tb > tbody > tr:last-child > td{
|
||||
font-weight:bold;
|
||||
}
|
||||
#groupList_tb{
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
#groupList_tb > tbody > tr > td{
|
||||
border: 1px solid #cccccc;
|
||||
padding: 3px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
#groupList_tb > tbody > tr > td > input[type=button]{
|
||||
padding: 1px 25px;
|
||||
cursor:pointer;
|
||||
}
|
||||
#groupList_tb > tbody > tr:first-child > td{
|
||||
font-weight:bold;
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
#marketingList_tb{
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
#marketingList_tb > tbody > tr > td{
|
||||
border: 1px solid #cccccc;
|
||||
padding: 3px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
#marketingList_tb > tbody > tr > td > input[type=button]{
|
||||
padding: 1px 25px;
|
||||
cursor:pointer;
|
||||
}
|
||||
#marketingList_tb > tbody > tr:first-child > td{
|
||||
font-weight:bold;
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
#marketingList_tb > tbody > tr:last-child > td{
|
||||
font-weight:bold;
|
||||
}
|
||||
.settingForm{
|
||||
background-color: #eaeaea;
|
||||
padding: 10px 10px;
|
||||
}
|
||||
.menuTitle{
|
||||
font-weight: bold;
|
||||
font-size: 20px !important;
|
||||
height: 35px;
|
||||
}
|
||||
#biz_date{
|
||||
margin-right: 10px;
|
||||
padding: 2px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var y_m = "<%=yyyy & "-" & mm%>";
|
||||
function detail_cost(d_no) {
|
||||
var url;
|
||||
url = "/ess/doc_entertainment_print.asp?d_no=" + d_no + "&view_chk=1&x=1";
|
||||
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function biz_date_change(sel_date) {
|
||||
var arr_date = sel_date.split("-"); // arr_date[0] <- <20><> , arr_date[1] <- <20><>
|
||||
location.href = "./cost_list.asp?yyyy="+arr_date[0]+"&mm="+arr_date[1];
|
||||
}
|
||||
|
||||
function detail_cost_all(div) {
|
||||
var url = "/business/approval_depart_all_print.asp?print_type=1&depart_div=" + div + "&y_m=" + y_m ;
|
||||
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
|
||||
function opnMarketing(d_no){
|
||||
url = "/ess/doc_entertainment_print.asp?d_no=" + d_no + "&view_chk=1&x=2";
|
||||
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function opnMarketing_all(){
|
||||
var url = "/business/approval_entertainment_all_print.asp?print_type=1&y_m=" + y_m ;
|
||||
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
$(function(){
|
||||
if($(".listTitle").length == 0){
|
||||
$("#biz_date").after("<span class='discript' style='margin-left:15px;'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</span>");
|
||||
}
|
||||
|
||||
$(".detail_btn").on("click", function(){
|
||||
var url;
|
||||
url = "cost_print.asp?print_type=1";
|
||||
//url = url + "&sel_kikan=" + $(this).data("daterange");
|
||||
url = url + "&rnum=" + $(this).data("rnum");
|
||||
url = url + "&ym=" + y_m;
|
||||
window.open(url,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=850, height=800 ,scrollbars=yes ,resizable=yes");
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user