최초커밋
This commit is contained in:
364
approval/doc_confirm.asp_250923_cns
Normal file
364
approval/doc_confirm.asp_250923_cns
Normal file
@@ -0,0 +1,364 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
Dim yyyy : yyyy = LEFT(date, 4)
|
||||
Dim mm : mm = MID(date, 6,2)
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
@keyframes ldio-suc7j3meaz {
|
||||
0% { opacity: 1 }
|
||||
50% { opacity: .5 }
|
||||
100% { opacity: 1 }
|
||||
}
|
||||
.ldio-suc7j3meaz div {
|
||||
margin: 10px;
|
||||
display: flex;
|
||||
border-radius:30px;
|
||||
flex: auto;
|
||||
animation: ldio-suc7j3meaz 1s cubic-bezier(0.5,0,0.5,1) infinite;
|
||||
}.ldio-suc7j3meaz div:nth-child(1) {
|
||||
background: #172f59;
|
||||
animation-delay: -0.6s;
|
||||
}.ldio-suc7j3meaz div:nth-child(2) {
|
||||
background: #ffc000;
|
||||
animation-delay: -0.4s;
|
||||
}.ldio-suc7j3meaz div:nth-child(3) {
|
||||
background: #172f59;
|
||||
animation-delay: -0.2s;
|
||||
}.ldio-suc7j3meaz div:nth-child(4) {
|
||||
background: #ffc000;
|
||||
animation-delay: -1s;
|
||||
}
|
||||
.loadingio-spinner-bars-10euvebw46w {
|
||||
z-index: 9999;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
background-color:#ffffff80;
|
||||
}
|
||||
.ldio-suc7j3meaz {
|
||||
width: 300px;
|
||||
height: 76px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>/<2F>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭ Ȯ<><C8AE> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)</h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<div id="loader" class="loadingio-spinner-bars-10euvebw46w" style="display:none;">
|
||||
<div class="ldio-suc7j3meaz">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-2" data-toggle="tab" data-step="1" href="#approvalList"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-2" data-toggle="tab" data-step="2" href="#approvalList"><3E><><EFBFBD><EFBFBD></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-2" data-toggle="tab" data-step="3" href="#approvalList"><3E>Ϸ<EFBFBD></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-2" data-toggle="tab" data-step="4" href="#approvalList"><3E><>ǥ<EFBFBD>ԿϷ<D4BF></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade m-3" id="approvalList">
|
||||
<div class="col-12 px-0">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text bg-lightblue justify-content-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></span>
|
||||
</div>
|
||||
<select class="form-control" id="startMonth">
|
||||
|
||||
<% 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>
|
||||
<select class="form-control" id="endMonth">
|
||||
<% 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 <%ELSE%> style="display:none" <%End If %>><%=LEFT(DateAdd("m", i, date), 7) %></option>
|
||||
<% Next %>
|
||||
</select>
|
||||
<div class="input-group-addon ml-1">
|
||||
<button class="btn btn-sm btn-success h-100 px-2" type="button" id="filterBtn"><i class="fas fa-search"></i></button>
|
||||
</div>
|
||||
<div class="input-group-prepend ml-1">
|
||||
<span class="input-group-text bg-olive justify-content-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></span>
|
||||
</div>
|
||||
<select class="form-control" id="f-costtype">
|
||||
<option value=""><3E><>ü</option>
|
||||
<option value="ī<><C4AB>/<2F><><EFBFBD><EFBFBD>">ī<><C4AB>/<2F><><EFBFBD><EFBFBD></option>
|
||||
<option value="<22><><EFBFBD>ݰ<EFBFBD><DDB0>꼭"><3E><><EFBFBD>ݰ<EFBFBD><DDB0>꼭</option>
|
||||
<option value="<22>κ<EFBFBD><CEBA>̽<EFBFBD>"><3E>κ<EFBFBD><CEBA>̽<EFBFBD></option>
|
||||
<option value="<22>ΰǺ<CEB0>"><3E>ΰǺ<CEB0></option>
|
||||
</select>
|
||||
<div class="input-group-prepend ml-1">
|
||||
<span class="input-group-text bg-olive justify-content-center"><3E>μ<EFBFBD></span>
|
||||
</div>
|
||||
<select class="form-control" id="f-depart">
|
||||
<option value=""><3E><>ü</option>
|
||||
</select>
|
||||
<div class="input-group-prepend ml-1">
|
||||
<span class="input-group-text bg-olive justify-content-center">Ű<><C5B0><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE>, <20>ŷ<EFBFBD>ó, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ۼ<EFBFBD><DBBC><EFBFBD>)</span>
|
||||
</div>
|
||||
<input type="text" class="form-control border" id="f-keyword" value="">
|
||||
<div class="input-group-addon ml-1">
|
||||
<button type="button" class="btn btn-sm btn-success h-100 px-2" id="excel_btn">Excel Download</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors d-none" style="font-size:12px;table-layout:fixed;" id="sumTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><3E>Ѱ<EFBFBD></th>
|
||||
<th class="text-center">ī<><C4AB>/<2F><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD></th>
|
||||
<th class="text-center"><3E><><EFBFBD>ݰ<EFBFBD><DDB0>꼭<br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD></th>
|
||||
<th class="text-center"><3E>ΰǺ<CEB0><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD></th>
|
||||
<th class="text-center"><3E>ؿܿ<D8BF><DCBF>ֺ<EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD></th>
|
||||
<th class="text-center"><3E><EFBFBD><D7B7><EFBFBD><EEBFB5></th>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">0</td>
|
||||
<td class="text-center">0</td>
|
||||
<td class="text-center">0</td>
|
||||
<td class="text-center">0</td>
|
||||
<td class="text-center">0</td>
|
||||
<td class="text-center">0</td>
|
||||
<td class="text-center">0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors" style="font-size:12px;table-layout:fixed;" id="rsTable">
|
||||
<colgroup>
|
||||
<col width="130px" />
|
||||
<col width="*" />
|
||||
<col width="180px" />
|
||||
<col width="180px" />
|
||||
<col width="80px" />
|
||||
<col width="60px" />
|
||||
<col width="60px" />
|
||||
<col width="100px" />
|
||||
<col width="100px" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ</th>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></th>
|
||||
<th class="text-center"><3E>ŷ<EFBFBD>ó</th>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
<th class="text-center"><3E><><EFBFBD>ް<EFBFBD><DEB0><EFBFBD></th>
|
||||
<th class="text-center"><3E>μ<EFBFBD></th>
|
||||
<th class="text-center"><3E>ۼ<EFBFBD><DBBC><EFBFBD></th>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
var step = "";
|
||||
var retJson = [];
|
||||
var etcJson = {};
|
||||
var seT = undefined;
|
||||
$(function(){
|
||||
$("a[data-toggle='tab']").on("click", function(){
|
||||
$("#rsTable > tbody").html("");
|
||||
step = $(this).data("step");
|
||||
if(step == "4"){
|
||||
$("#sumTable").removeClass("d-none");
|
||||
$("#sumTable > tbody").html(
|
||||
'<tr>'+
|
||||
'<td class="text-center">0</td>'+
|
||||
'<td class="text-center">0</td>'+
|
||||
'<td class="text-center">0</td>'+
|
||||
'<td class="text-center">0</td>'+
|
||||
'<td class="text-center">0</td>'+
|
||||
'<td class="text-center">0</td>'+
|
||||
'<td class="text-center">0</td>'+
|
||||
'</tr>');
|
||||
}else{
|
||||
$("#sumTable").addClass("d-none");
|
||||
}
|
||||
});
|
||||
$("a[data-toggle='tab']").eq(0).click();
|
||||
|
||||
$("#startMonth").on("change",function(){
|
||||
var startMonth = $("#startMonth").children("option:selected").val();
|
||||
for(var i = 0; i < $("#endMonth").children("option").length; i++){
|
||||
if(i <= $("#startMonth").prop('selectedIndex')){
|
||||
$("#endMonth").children("option:eq("+i+")").show();
|
||||
}
|
||||
else{
|
||||
$("#endMonth").children("option:eq("+i+")").hide();
|
||||
}
|
||||
}
|
||||
$("#endMonth").children("option:eq("+$("#startMonth").prop('selectedIndex')+")").attr("selected",true);
|
||||
});
|
||||
|
||||
$("#filterBtn").on("click", function(){
|
||||
var startMonth = $("#startMonth").children("option:selected").val();
|
||||
var endMonth = $("#endMonth").children("option:selected").val();
|
||||
if(step == "4"){
|
||||
$.ajax({
|
||||
url: "/approval/doc_confirm_ajax.asp",
|
||||
type: "POST",
|
||||
async: false,
|
||||
data: {"command":"etc_cost", "smonth":startMonth, "emonth":endMonth},
|
||||
success: function(ret){
|
||||
etcJson = JSON.parse(ret);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "/approval/doc_confirm_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"approvalList", "step":step, "smonth":startMonth, "emonth":endMonth},
|
||||
beforeSend: function(){
|
||||
$("#loader").show();
|
||||
},
|
||||
success: function(ret){
|
||||
retJson = JSON.parse(ret);
|
||||
setTableData(retJson);
|
||||
if(step == "4"){
|
||||
setSumTable(retJson, etcJson);
|
||||
}
|
||||
$("#f-costtype").val("");
|
||||
$("#f-keyword").val("");
|
||||
$("#f-depart").html("");
|
||||
$("#f-depart").append("<option value=''><3E><>ü</option>");
|
||||
$.each($.unique($.map(retJson, function(obj){ return obj.depart_name.replace("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̳뺣<CCB3>̼<EFBFBD>", "DIN").replace("<22><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD>θ<EFBFBD><CEB8><EFBFBD>", "BP").replace("AI<41><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>", "AI"); }).sort()), function(idx, obj){
|
||||
$("#f-depart").append("<option value='"+ obj +"'>"+ obj +"</option>");
|
||||
});
|
||||
|
||||
$("#loader").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#f-costtype, #f-depart").on("change", function(){
|
||||
setTableData(retJson);
|
||||
});
|
||||
|
||||
$("#f-keyword").on("keyup", function(){
|
||||
if(seT != undefined){
|
||||
clearTimeout(seT);
|
||||
}
|
||||
seT = setTimeout(function(){
|
||||
setTableData(retJson);
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$("#excel_btn").on("click", function(){
|
||||
var dt = new Date().format("yyyyMMdd");
|
||||
$("#rsTable").table2excel({
|
||||
name: "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_" + $(".nav-link[data-toggle=tab].active").text() + "_" + dt,
|
||||
filename: "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_" + $(".nav-link[data-toggle=tab].active").text() + "_" + dt,
|
||||
fileext: ".xls"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function setTableData(jsonList){
|
||||
var costType = $("#f-costtype").children("option:selected").val() || "";
|
||||
var depart = $("#f-depart").children("option:selected").val() || "";
|
||||
var keyword = $("#f-keyword").val() || "";
|
||||
|
||||
var tmpJsonList = [];
|
||||
if(costType == "" && depart == "" && keyword == ""){
|
||||
tmpJsonList = jsonList;
|
||||
}else{
|
||||
if(costType != "") tmpJsonList = $.grep(jsonList, function(obj){ return obj.cost_type == costType; });
|
||||
if(depart != "") tmpJsonList = $.grep(jsonList, function(obj){ return obj.depart_name.replace("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̳뺣<CCB3>̼<EFBFBD>", "DIN").replace("<22><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD>θ<EFBFBD><CEB8><EFBFBD>", "BP").replace("AI<41><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>", "AI") == depart; });
|
||||
if(keyword != "") tmpJsonList = $.grep(jsonList, function(obj){ return obj.p_subject.indexOf(keyword) > -1 || obj.client.indexOf(keyword) > -1 || (obj.hangmok +'-'+ obj.sebu).indexOf(keyword) > -1 || obj.d_write_name.indexOf(keyword) > -1; });
|
||||
}
|
||||
|
||||
var tmpHTML = "";
|
||||
$.each(tmpJsonList, function(idx, obj){
|
||||
tmpHTML += '<tr id="tr_'+ obj.d_no +'">';
|
||||
tmpHTML += ' <td class="text-center"><a href="javascript:openit(\''+ obj.d_no.substr(9, 1) +'\',\''+ obj.d_no +'\', \'' + step + '\')">'+ obj.d_no +'</a></td>';
|
||||
// tmpHTML += ' <td class="text-left">'+ (obj.p_child_sn == "" ? "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>" : "["+ obj.p_child_sn +"] "+ obj.p_subject) +'</td>';
|
||||
tmpHTML += ' <td class="text-left">' + (obj.p_child_sn == "" ? (obj.p_subject == "<22>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭" ? "<22>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭" : "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>") : "[" + obj.p_child_sn + "] " + obj.p_subject) + '</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.client +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.hangmok +'-'+ obj.sebu +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ commify(obj.cost) +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.depart_name.replace("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̳뺣<CCB3>̼<EFBFBD>", "DIN").replace("<22><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD>θ<EFBFBD><CEB8><EFBFBD>", "BP").replace("AI<41><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>", "AI") +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.d_write_name +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.cost_date +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.payment_date +'</td>';
|
||||
tmpHTML += '</tr>';
|
||||
});
|
||||
|
||||
$("#rsTable > tbody").html(tmpHTML);
|
||||
}
|
||||
|
||||
function setSumTable(docJson, etcJson){
|
||||
var gSum = groupBySum(docJson, ["cost_type"], ["cost"]);
|
||||
gSum.push({cost_type:"<22><EFBFBD><D7B7><EFBFBD><EEBFB5>", cost:+etcJson.GROUP_COST});
|
||||
gSum.push({cost_type:"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", cost:+etcJson.BUSI_COST});
|
||||
var idxArr = {
|
||||
"ī<><C4AB>/<2F><><EFBFBD><EFBFBD>":1,
|
||||
"<22><><EFBFBD>ݰ<EFBFBD><DDB0>꼭":2,
|
||||
"<22>ΰǺ<CEB0>":3,
|
||||
"<22>κ<EFBFBD><CEBA>̽<EFBFBD>":4,
|
||||
"<22><EFBFBD><D7B7><EFBFBD><EEBFB5>":5,
|
||||
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>":6
|
||||
}
|
||||
$("#sumTable > tbody > tr > td:eq(0)").html(commify(groupBySum(gSum, [], ["cost"])[0].cost));
|
||||
$.each(gSum, function(idx, obj){
|
||||
$("#sumTable > tbody > tr > td:eq("+ idxArr[obj.cost_type] +")").html(commify(obj.cost));
|
||||
});
|
||||
}
|
||||
|
||||
function openit(z, x, y){
|
||||
var tmp_height = 960;
|
||||
var tmp_width = 850;
|
||||
if (z == 'i'){
|
||||
var title_type = "<22><><EFBFBD><EFBFBD>";
|
||||
var url = '/ess/doc_expense_print_2014.asp?rev_type=' + y + '&d_no=' + x + "&title_type=" + title_type;
|
||||
}else if (z == 'A'){
|
||||
var title_type = "<22><><EFBFBD><EFBFBD>";
|
||||
var url = '/ess/doc_expense2_print_2014.asp?rev_type=' + y + '&d_no=' + x + "&title_type=" + title_type;
|
||||
}else if (z == 'r'){
|
||||
var title_type = "<22>ڱ<EFBFBD>";
|
||||
var url = '/ess/doc_expense2_print.asp?rev_type=' + y + '&d_no=' + x + '&view_chk=1&x=1&title_type=' + title_type;
|
||||
}
|
||||
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" -->
|
||||
Reference in New Issue
Block a user