305 lines
12 KiB
Plaintext
305 lines
12 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<style>
|
|
button.ui-datepicker-current {
|
|
display: none;
|
|
}
|
|
.txt{
|
|
font-size: 11px;
|
|
letter-spacing: 0px;
|
|
}
|
|
th.t_label{
|
|
vertical-align:middle;
|
|
text-align:center;
|
|
}
|
|
.ui-datepicker-trigger{
|
|
cursor: pointer;
|
|
}
|
|
.DTFC_Cloned tbody{
|
|
cursor:pointer
|
|
}
|
|
.dataTables_wrapper .dataTables_filter input{
|
|
background:#fff;
|
|
}
|
|
table.dataTable tbody th, table.dataTable tbody td{
|
|
padding:2px;
|
|
}
|
|
.dataTables_scrollBody > table.dataTable{
|
|
margin-left:0;
|
|
}
|
|
.DTFC_LeftBodyLiner > table.dataTable{
|
|
width: calc(100% - 2px) !important;
|
|
}
|
|
.DTFC_ScrollWrapper{
|
|
overflow-x: auto;
|
|
height:536px !important;
|
|
}
|
|
.MoneyList_filterSelect{
|
|
width:220px !important;
|
|
display:inline-block;
|
|
}
|
|
</style>
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1>수당 관리</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 class='table table-sm table-sm2 table-bordered table-head tr-colors' id="MoneyList" style="font-size:11px;">
|
|
<thead class="ui-widget-header">
|
|
<tr>
|
|
<th class="t_label select-filter">회<br>사</th>
|
|
<th class="t_label select-filter">프로젝트<br>코드</th>
|
|
<th class="t_label select-filter">프로젝트<br>명</th>
|
|
<th class="t_label select-filter">이<br>름</th>
|
|
<th class="t_label select-filter">주민<br>번호</th>
|
|
<th class="t_label select-filter">업<br>무</th>
|
|
<th class="t_label select-filter">단<br>가</th>
|
|
<th class="t_label select-filter">수<br>량</th>
|
|
<th class="t_label select-filter">총<br>금액</th>
|
|
<th class="t_label select-filter">근무<br>날짜</th>
|
|
<th class="t_label select-filter">지출<br>결의일</th>
|
|
<th class="t_label select-filter">전화<br>번호</th>
|
|
<th class="t_label select-filter">은행명</th>
|
|
<th class="t_label select-filter">계좌<br>번호</th>
|
|
<th class="t_label select-filter">사원No</th>
|
|
<th class="t_label select-filter">담당<br>S/V</th>
|
|
<th class="t_label select-filter">입력<br>날짜</th>
|
|
<th class="t_label select-filter">결재<br>문서번호</th>
|
|
<th class="t_label select-filter">구<br>분</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
var lang_kor = {
|
|
"decimal" : "",
|
|
"emptyTable" : "검색된 리스트가 없습니다.(근무 월을 선택하여 주십시오.)",
|
|
"info" : "_START_ - _END_ (총 _TOTAL_ 건)",
|
|
"infoEmpty" : "0건",
|
|
"infoFiltered" : "(전체 _MAX_ 건 중 검색결과)",
|
|
"infoPostFix" : "",
|
|
"thousands" : ",",
|
|
"lengthMenu" : "_MENU_ 개씩 보기",
|
|
"loadingRecords" : " ",
|
|
"processing" : "Loading...",
|
|
"search" : "검색 : ",
|
|
"zeroRecords" : "검색된 리스트가 없습니다.(근무 월을 선택하여 주십시오.)",
|
|
"paginate" : {
|
|
"first" : "첫 페이지",
|
|
"last" : "마지막 페이지",
|
|
"next" : "다음",
|
|
"previous" : "이전"
|
|
},
|
|
"aria" : {
|
|
"sortAscending" : " : 오름차순 정렬",
|
|
"sortDescending" : " : 내림차순 정렬"
|
|
},
|
|
"buttons":{
|
|
"colvisRestore": "초기화"
|
|
}
|
|
};
|
|
|
|
var table = $('#MoneyList').DataTable({
|
|
"ajax":{
|
|
"type": "POST",
|
|
"url": "Ajax_Money.asp",
|
|
"dataType": "JSON",
|
|
"async": "true",
|
|
"data":{
|
|
MoneyDate: function(){ if($("#MoneyDate").val() !=undefined){return $("#MoneyDate").val()}else{ return (new Date()).format("yyyy-MM") }}
|
|
}
|
|
},
|
|
"columns":[
|
|
{"data": "Company", "class":"txt dt-body-center details-control",},//0
|
|
{"data": "P_Sn", "class":"txt dt-body-center",},//1
|
|
{"data": "P_Subject", "class":"txt dt-body-center",},//2
|
|
{"data": "P_Name", "class":"txt dt-body-center",},//3
|
|
{"data": "M_Jumin", "class":"txt dt-body-center",},//4
|
|
{"data": "M_Work", "class":"txt dt-body-center",},//5
|
|
{"data": "Danga", "class":"txt dt-body-center",},//6
|
|
{"data": "Cnt", "class":"txt dt-body-center",},//7
|
|
{"data": "Allowance", "class":"txt dt-body-center",},//8
|
|
{"data": "WorkDate", "class":"txt dt-body-center",},//9
|
|
{"data": "Doc_Date", "class":"txt dt-body-center",},//10
|
|
{"data": "M_Phone", "class":"txt dt-body-center",},//11
|
|
{"data": "M_Bank", "class":"txt dt-body-center",},//12
|
|
{"data": "M_Acount", "class":"txt dt-body-center",},//13
|
|
{"data": "P_No", "class":"txt dt-body-center",},//14
|
|
{"data": "P_SV", "class":"txt dt-body-center",},//15
|
|
{"data": "ConfirmDate", "class":"txt dt-body-center",},//16
|
|
{"data": "D_No", "class":"txt dt-body-center",},//17
|
|
{"data": "M_Gubun", "class":"txt dt-body-center",},//18
|
|
],
|
|
"columnDefs":[
|
|
{"width":"12%", "targets":2},
|
|
{"searchable":false, "visible":false, "targets":14},
|
|
],
|
|
"dom":'lBfrtip',
|
|
"scrollY":"450px",
|
|
'processing': true,
|
|
"fixedHeader": true,
|
|
"language":lang_kor,
|
|
"paging":false,
|
|
"order": [[ 1, "asc" ]],
|
|
"cache":true,
|
|
"autoWidth":false,
|
|
"buttons": [
|
|
{
|
|
extend: 'copy',
|
|
text: 'List Copy',
|
|
},
|
|
{
|
|
extend: 'excel',
|
|
text: 'Excel Down',
|
|
title: '내근직 수당(Excel)'
|
|
},
|
|
{
|
|
extend: 'csv',
|
|
text: 'CSV',
|
|
title: '내근직 수당(정산용)',
|
|
exportOptions: {
|
|
modifier: {
|
|
search: 'none'
|
|
}
|
|
}
|
|
},
|
|
],
|
|
"filterDropDown": {
|
|
columns: [
|
|
{ idx: 9 },
|
|
{ idx: 3 },
|
|
{ idx: 1 },
|
|
{ idx: 2 },
|
|
{ idx: 15}
|
|
],
|
|
}
|
|
});
|
|
|
|
function TableFilter(json){
|
|
$("#MoneyList_filterSelect9").empty();
|
|
$("#MoneyList_filterSelect3").empty();
|
|
$("#MoneyList_filterSelect1").empty();
|
|
$("#MoneyList_filterSelect2").empty();
|
|
$("#MoneyList_filterSelect15").empty();
|
|
|
|
var arr=[];
|
|
var arr2=[];
|
|
for(var i=0; i<json.data.length; i++){
|
|
if(arr.indexOf(json.data[i].WorkDate) == -1){
|
|
arr.push(json.data[i].WorkDate);
|
|
}
|
|
}
|
|
arr.sort();
|
|
$("#MoneyList_filterSelect9").append("<option value=''>근무날짜</option>");
|
|
for(var i=0; i<arr.length; i++){
|
|
$("#MoneyList_filterSelect9").append("<option value='"+arr[i]+"'>"+arr[i]+"</option>");
|
|
}
|
|
arr.length=0;
|
|
|
|
for(var i=0; i<json.data.length; i++){
|
|
if(arr.indexOf(json.data[i].P_Name) == -1){
|
|
arr.push(json.data[i].P_Name);
|
|
}
|
|
}
|
|
arr.sort();
|
|
$("#MoneyList_filterSelect3").append("<option value=''>면접원</option>");
|
|
for(var i=0; i<arr.length; i++){
|
|
$("#MoneyList_filterSelect3").append("<option value='"+arr[i]+"'>"+arr[i]+"</option>");
|
|
}
|
|
arr.length=0;
|
|
|
|
for(var i=0; i<json.data.length; i++){
|
|
if(arr.indexOf(json.data[i].P_Sn) == -1){
|
|
arr.push(json.data[i].P_Sn);
|
|
}
|
|
}
|
|
arr.sort();
|
|
$("#MoneyList_filterSelect1").append("<option value=''>프로젝트코드</option>");
|
|
for(var i=0; i<arr.length; i++){
|
|
$("#MoneyList_filterSelect1").append("<option value='"+arr[i]+"'>"+arr[i]+"</option>");
|
|
}
|
|
arr.length=0;
|
|
|
|
|
|
for(var i=0; i<json.data.length; i++){
|
|
if(arr.indexOf(json.data[i].P_Subject) == -1){
|
|
arr.push(json.data[i].P_Subject);
|
|
}
|
|
}
|
|
arr.sort();
|
|
$("#MoneyList_filterSelect2").append("<option value=''>프로젝트명</option>");
|
|
for(var i=0; i<arr.length; i++){
|
|
$("#MoneyList_filterSelect2").append("<option value='"+arr[i]+"'>"+arr[i]+"</option>");
|
|
}
|
|
arr.length=0;
|
|
for(var i=0; i<json.data.length; i++){
|
|
if(arr.indexOf(json.data[i].P_SV) == -1){
|
|
arr.push(json.data[i].P_SV);
|
|
}
|
|
}
|
|
arr.sort();
|
|
$("#MoneyList_filterSelect15").append("<option value=''>담당S/V</option>");
|
|
for(var i=0; i<arr.length; i++){
|
|
$("#MoneyList_filterSelect15").append("<option value='"+arr[i]+"'>"+arr[i]+"</option>");
|
|
}
|
|
arr.length=0;
|
|
}
|
|
|
|
$(function() {
|
|
var hh="";
|
|
hh += "<div style='display: inline-block;float: right;'>";
|
|
hh += " <label>근무월: </label>";
|
|
hh += " <input type='text' style='cursor:pointer;' class='date' name='MoneyDate' id='MoneyDate' value='"+(new Date()).format("yyyy-MM")+"' readonly='readonly' />";
|
|
hh += "</div>";
|
|
|
|
$("#MoneyList_filterWrapper").append(hh);
|
|
|
|
$('#MoneyDate').datepicker({
|
|
dateFormat: 'mm-yy',
|
|
changeMonth: true,
|
|
changeYear: true,
|
|
showButtonPanel: true,
|
|
onClose: function(dateText, inst) {
|
|
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
|
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
|
$(this).val($.datepicker.formatDate('yy-mm', new Date(year, month, 1)));
|
|
|
|
table.ajax.reload( function ( json ){
|
|
TableFilter(json);
|
|
});
|
|
}
|
|
});
|
|
|
|
$("#MoneyDate").focus(function () {
|
|
$(".ui-datepicker-calendar").hide();
|
|
$("#ui-datepicker-div").position({
|
|
my: "center top",
|
|
at: "center bottom",
|
|
of: $(this)
|
|
});
|
|
});
|
|
|
|
$("#MoneyDate").on('click', function () {
|
|
var selDate = new Date($("#MoneyDate").val());
|
|
$("#ui-datepicker-div .ui-datepicker-year option[value='" + selDate.getFullYear() + "']").prop("selected", true);
|
|
$("#ui-datepicker-div .ui-datepicker-month option[value='" + selDate.getMonth() + "']").prop("selected", true);
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |