최초커밋
This commit is contained in:
453
approval/doc_final.asp
Normal file
453
approval/doc_final.asp
Normal file
@@ -0,0 +1,453 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
#chk_confirm_btn {
|
||||
right: 11px;
|
||||
margin-top: -37px;
|
||||
}
|
||||
.popover{
|
||||
max-width:none;
|
||||
}
|
||||
.popover table{
|
||||
table-layout:fixed;
|
||||
width:auto;
|
||||
}
|
||||
.popover table td{
|
||||
width:500px;
|
||||
}
|
||||
|
||||
@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><C7A5>)</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="#finalList"><3E><>Ȯ<EFBFBD><C8AE></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-2" data-toggle="tab" data-step="2" href="#finalList">Ȯ<>οϷ<CEBF></a>
|
||||
</li>
|
||||
</ul>
|
||||
<% If Session("teamplace") = "6" Then %>
|
||||
<button type="button" class="btn btn-primary position-absolute" id="chk_confirm_btn">Ȯ<><C8AE></button>
|
||||
<% End If %>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade m-3" id="finalList">
|
||||
<div class="col-12 px-0 d-none" id="filterDiv">
|
||||
<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="searchMonth">
|
||||
<% 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>
|
||||
<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>
|
||||
</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="table-layout:fixed;" id="rsTable">
|
||||
<colgroup>
|
||||
<col width="180px"/>
|
||||
<col width="*"/>
|
||||
<col width="220px"/>
|
||||
<col width="140px"/>
|
||||
<col width="200px"/>
|
||||
<col width="120px"/>
|
||||
<col width="60px"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ</td>
|
||||
<td class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td class="text-center"><3E>ŷ<EFBFBD>ó</td>
|
||||
<td class="text-center"><3E>μ<EFBFBD></td>
|
||||
<td class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td class="text-center"><3E><><EFBFBD>ް<EFBFBD><DEB0><EFBFBD></td>
|
||||
<td class="text-center">Ȯ<><C8AE></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="commentDialog" class="" style="display:none;">
|
||||
<div class="form-group row m-1 mt-3 align-items-center">
|
||||
<div class="col-md-12">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="input-group-text" style="height: 100% !important;">Comment</span>
|
||||
</div>
|
||||
<textarea id="commentArea" rows="6" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3 m-0">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-block btn-primary" id="comment_confirm"><3E><>Ȯ<EFBFBD><C8AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
var step = "";
|
||||
var retJson = [];
|
||||
var etcJson = {};
|
||||
var seT = undefined;
|
||||
|
||||
var commentDialog = $("#commentDialog").dialog({
|
||||
title: "<22><>Ȯ<EFBFBD><C8AE> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> Comment",
|
||||
autoOpen: false,
|
||||
resizable: false,
|
||||
height: 290,
|
||||
width: 480,
|
||||
modal: true,
|
||||
close: function( event, ui ) {
|
||||
$("#commentArea").val("");
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
$("a[data-toggle='tab']").on("click", function(){
|
||||
$("#rsTable > tbody").html("");
|
||||
step = $(this).data("step");
|
||||
if(step == "1"){
|
||||
$("#chk_confirm_btn").removeClass("d-none");
|
||||
$("#filterDiv").addClass("d-none");
|
||||
$("#sumTable").addClass("d-none");
|
||||
|
||||
$("#filterBtn").click();
|
||||
}else if(step == "2"){
|
||||
$("#chk_confirm_btn").addClass("d-none");
|
||||
$("#filterDiv").removeClass("d-none");
|
||||
$("#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>');
|
||||
}
|
||||
});
|
||||
|
||||
$("#filterBtn").on("click", function(){
|
||||
var searchMonth = $("#searchMonth").children("option:selected").val();
|
||||
if(step == "2"){
|
||||
$.ajax({
|
||||
url: "/approval/doc_confirm_ajax.asp",
|
||||
type: "POST",
|
||||
async: false,
|
||||
data: {"command":"etc_cost", "smonth":searchMonth},
|
||||
success: function(ret){
|
||||
etcJson = JSON.parse(ret);
|
||||
}
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: "/approval/doc_confirm_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"finalList", "step":step, "smonth":(step == "1" ? "" : searchMonth)},
|
||||
beforeSend: function(){
|
||||
$("#loader").show();
|
||||
},
|
||||
success: function(ret){
|
||||
retJson = JSON.parse(ret);
|
||||
setTableData(retJson);
|
||||
if(step == "2"){
|
||||
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);
|
||||
});
|
||||
|
||||
$("#chk_confirm_btn").on("click", function(){
|
||||
if($(".chk_confirm:not(:checked)").length > 0){
|
||||
commentDialog.dialog("open");
|
||||
}else{
|
||||
$("#comment_confirm").click();
|
||||
}
|
||||
});
|
||||
|
||||
$("#comment_confirm").on("click", function(){
|
||||
var today = new Date().getMonth()+1 + " / " + new Date().getDate();
|
||||
var checkedConfirm = [];
|
||||
var uncheckedConfirm = [];
|
||||
var comment = $("#commentArea").val().trim().replace(/\r?\n/g, '<br />');
|
||||
$(".chk_confirm").each(function(){
|
||||
if($(this).prop("checked") == true){
|
||||
checkedConfirm.push($(this).data("d_no"));
|
||||
}else{
|
||||
uncheckedConfirm.push($(this).data("d_no"));
|
||||
}
|
||||
});
|
||||
if(comment == "" && uncheckedConfirm.length > 0){
|
||||
if(!confirm("Comment <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(checkedConfirm.length > 0 || uncheckedConfirm.length > 0){
|
||||
$.ajax({
|
||||
url: "/approval/doc_confirm_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"checkConfirm", "checkedList":JSON.stringify(checkedConfirm), "uncheckedList":JSON.stringify(uncheckedConfirm), "comment":encodeURIComponent(comment), "today":today },
|
||||
success: function(ret){
|
||||
if(ret == "1"){
|
||||
alert("ó<><C3B3><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD><CFB7>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$(".chk_confirm:checked").parent().parent().remove();
|
||||
commentDialog.dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
alert("Ȯ<><C8AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
});
|
||||
|
||||
$("a[data-toggle='tab']").eq(0).click();
|
||||
});
|
||||
|
||||
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; });
|
||||
}
|
||||
|
||||
var tmpHTML = "";
|
||||
$.each(tmpJsonList, function(idx, obj){
|
||||
tmpHTML += '<tr class="cus_tooltip" id="tr_'+ obj.d_no +'" data-contents="'+ obj.contents +'" data-overcomment="'+ obj.over_comment +'">';
|
||||
tmpHTML += ' <td class="text-center"><a href="javascript:openit(\''+ obj.d_no.substr(9, 1) +'\',\''+ obj.d_no +'\')">'+ obj.d_no +'</a></td>';
|
||||
//tmpHTML += ' <td class="text-left">'+ (obj.p_child_sn == "" ? "Multi" : "["+ 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.depart_name +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.hangmok +'-'+ obj.sebu +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ commify(obj.cost) +'</td>';
|
||||
if(step == "1"){
|
||||
tmpHTML += ' <td class="text-center"><input type="checkbox" class="chk_confirm" checked value="1" data-d_no="'+ obj.d_no +'"/></td>';
|
||||
}else{
|
||||
tmpHTML += ' <td class="text-center"><3E>Ϸ<EFBFBD></td>';
|
||||
}
|
||||
tmpHTML += '</tr>';
|
||||
});
|
||||
$("#rsTable > tbody").html(tmpHTML);
|
||||
$.fn.popover.Constructor.Default.whiteList.table = [];
|
||||
$.fn.popover.Constructor.Default.whiteList.tr = [];
|
||||
$.fn.popover.Constructor.Default.whiteList.td = [];
|
||||
$.fn.popover.Constructor.Default.whiteList.div = [];
|
||||
$.fn.popover.Constructor.Default.whiteList.tbody = [];
|
||||
$.fn.popover.Constructor.Default.whiteList.thead = [];
|
||||
$(".cus_tooltip").popover({
|
||||
html: true,
|
||||
trigger: 'hover',
|
||||
container: '.content',
|
||||
placement: 'bottom',
|
||||
content: function () {
|
||||
if($(this).data("contents") == ""){
|
||||
return "Multi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD><C7BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3> Ŭ<><C5AC><EFBFBD>Ͽ<EFBFBD> Ȯ<><C8AE><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.";
|
||||
}
|
||||
tmpHTML = "<div>";
|
||||
tmpHTML += "<table class='table table-sm table-sm2 table-bordered table-head tr-colors'>";
|
||||
tmpHTML += "<tr>";
|
||||
tmpHTML += "<td><3E><><EFBFBD><EFBFBD></td>";
|
||||
if(unescape($(this).data("overcomment")) != ""){
|
||||
tmpHTML += "<td><3E>߰<EFBFBD><DFB0><EFBFBD><EFBFBD><EFBFBD></td>";
|
||||
}
|
||||
tmpHTML += "</tr>";
|
||||
tmpHTML += "<tr>";
|
||||
tmpHTML += "<td>" + unescape($(this).data("contents")).replace(/</g, '<').replace(/>/g, '>') + "</td>";
|
||||
if(unescape($(this).data("overcomment")) != ""){
|
||||
tmpHTML += "<td>" + unescape($(this).data("overcomment")) + "</td>";
|
||||
}
|
||||
tmpHTML += "</tr>";
|
||||
tmpHTML += "</table>";
|
||||
tmpHTML += "</div>";
|
||||
//console.log(tmpHTML);
|
||||
return $(tmpHTML).html();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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){
|
||||
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=3&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=3&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=3&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