409 lines
14 KiB
Plaintext
409 lines
14 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<style>
|
|
.txt{
|
|
font-size: 13px;
|
|
letter-spacing: 0px;
|
|
}
|
|
tbody th.t_label{
|
|
vertical-align:middle;
|
|
}
|
|
.ui-datepicker-trigger{
|
|
cursor: pointer;
|
|
}
|
|
.hasDatepicker{
|
|
cursor: pointer;
|
|
}
|
|
#ContactList tbody tr{
|
|
cursor:pointer;
|
|
font-size: 13px;
|
|
letter-spacing: 0px;
|
|
}
|
|
.DTFC_Cloned tbody{
|
|
cursor:pointer
|
|
}
|
|
.buttons-columnVisibility{
|
|
background: #fff !important;
|
|
}
|
|
.buttons-columnVisibility.active{
|
|
box-shadow: none !important;
|
|
background: #313131 !important;
|
|
color: #fff;
|
|
}
|
|
.buttons-columnVisibility.active > span{
|
|
font-weight:400;
|
|
}
|
|
.dataTables_wrapper .dataTables_filter input{
|
|
background:#fff;
|
|
}
|
|
.dataTables_scrollBody > table.dataTable{
|
|
margin-left:0;
|
|
}
|
|
.DTFC_LeftBodyLiner > table.dataTable{
|
|
width: calc(100% - 2px) !important;
|
|
}
|
|
.DTFC_ScrollWrapper{
|
|
overflow-x: auto;
|
|
height:536px !important;
|
|
}
|
|
.ContactList_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" onclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}" ondblclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}">
|
|
<table class='table table-sm table-bordered table-headline nowrap' id="ContactList">
|
|
<thead>
|
|
<tr>
|
|
<th class="t_label select-filter">부서</th>
|
|
<th class="t_label select-filter">진행 상태</th>
|
|
<th class="t_label select-filter">회사</th>
|
|
<th class="t_label select-filter">프로젝트 코드</th>
|
|
<th class="t_label select-filter">프로젝트 명</th>
|
|
<th class="t_label select-filter">클라이언트 명</th>
|
|
<th class="t_label select-filter">조사방법</th>
|
|
<th class="t_label select-filter">표본수</th>
|
|
<th class="t_label select-filter">예상 계약액</th>
|
|
<th class="t_label select-filter">실제 계약액</th>
|
|
<th class="t_label select-filter">단위 계약액</th>
|
|
<th class="t_label select-filter">예상 직접비</th>
|
|
<th class="t_label select-filter">예상 직접비율</th>
|
|
<th class="t_label select-filter">집행 직접비</th>
|
|
<th class="t_label select-filter">집행 직접비율</th>
|
|
<!--
|
|
<th class="t_label select-filter">예상 연구 직접비</th>
|
|
<th class="t_label select-filter">집행 연구 직접비</th>
|
|
<th class="t_label select-filter">예상 실사 직접비</th>
|
|
<th class="t_label select-filter">집행 실사 직접비</th>
|
|
-->
|
|
<th class="t_label select-filter">결정 예정일</th>
|
|
<th class="t_label select-filter">계약 시작일</th>
|
|
<th class="t_label select-filter">계약 종료일</th>
|
|
<th class="t_label select-filter">예상 직접비 정보</th>
|
|
<th class="t_label select-filter">연구 담당자</th>
|
|
<th class="t_label select-filter">실사 담당자</th>
|
|
<th class="t_label select-filter">등록자</th>
|
|
<th class="t_label select-filter">등록일</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
<input type="hidden" name="DepartAll" id="DepartAll" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
function numberPad(n, width) {
|
|
n = n + '';
|
|
return n.length >= width ? n : new Array(width - n.length + 1).join('0') + n;
|
|
}
|
|
var ColArr=[];
|
|
$(document).ready(function(){
|
|
|
|
if ($.cookie("p_column") != undefined){
|
|
var p_column = $.cookie("p_column").split(',');
|
|
for(var i=0; i<p_column.length; i++){
|
|
ColArr.push(parseInt(p_column[i]));
|
|
}
|
|
}else{
|
|
//ColArr = [14, 15, 16, 17];
|
|
}
|
|
|
|
var hh="";
|
|
//hh += "<div style='display: inline-block;'>";
|
|
//hh += " <button type='button' class='ui-button ui-widget ui-corner-all' id='depart'>모든 부서 보기</button> ";
|
|
//hh += "</div>";
|
|
hh += "<div style='display: inline-block;float: right;'>";
|
|
hh += " <label>일자: </label>";
|
|
hh += " <input type='text' class='date text-center' name='p_sdate' id='p_sdate' readonly='readonly' />";
|
|
hh += " ~";
|
|
hh += " <input type='text' class='date text-center' name='p_edate' id='p_edate' readonly='readonly' />";
|
|
hh += "</div>";
|
|
|
|
var lang_kor = {
|
|
"decimal" : "",
|
|
"emptyTable" : "등록된 프로젝트가 없습니다.",
|
|
"info" : "_START_ - _END_ (총 _TOTAL_ 건)",
|
|
"infoEmpty" : "0건",
|
|
"infoFiltered" : "(전체 _MAX_ 건 중 검색결과)",
|
|
"infoPostFix" : "",
|
|
"thousands" : ",",
|
|
"lengthMenu" : "_MENU_ 개씩 보기",
|
|
"loadingRecords" : "로딩중...",
|
|
"processing" : "처리중...",
|
|
"search" : "검색 : ",
|
|
"zeroRecords" : "검색된 프로젝트가 없습니다.",
|
|
"paginate" : {
|
|
"first" : "첫 페이지",
|
|
"last" : "마지막 페이지",
|
|
"next" : "다음",
|
|
"previous" : "이전"
|
|
},
|
|
"aria" : {
|
|
"sortAscending" : " : 오름차순 정렬",
|
|
"sortDescending" : " : 내림차순 정렬"
|
|
},
|
|
"buttons":{
|
|
"colvisRestore": "초기화",
|
|
"copyTitle": "클립보드에 복사되었습니다.",
|
|
"copySuccess": "%d 개의 프로젝트 목록 복사"
|
|
}
|
|
};
|
|
|
|
var now = new Date();
|
|
var month = now.getMonth()+1;
|
|
month = numberPad(month,2);
|
|
var colNum = function(data, type, row, meta){
|
|
return commify(data);
|
|
};
|
|
var colNumCost = function(data, type, row, meta){
|
|
return data;
|
|
};
|
|
var colNumRate = function(data, type, row, meta){
|
|
return commify(data, true) + (data != "" ? " %": "");
|
|
};
|
|
|
|
var table = $('#ContactList').DataTable({
|
|
ajax:{
|
|
"type": "POST",
|
|
"url": "project_AjaxSelect.asp",
|
|
|
|
"dataType": "JSON",
|
|
"data":{
|
|
"Flag":"ContactList",
|
|
sdate: function(){ if($("#p_sdate").val() !=undefined){return $("#p_sdate").val()}else{ return now.getFullYear()+"-"+month+"-01" }},
|
|
edate: function(){ if($("#p_edate").val() !=undefined){return $("#p_edate").val()}else{ return ( new Date( now.getFullYear(), now.getMonth()+1, 0) ).getDate() }},
|
|
Depart: function(){return $("#DepartAll").val() }
|
|
},
|
|
},
|
|
columns:[
|
|
{"data": "Team", "class":"txt dt-body-center details-control"},
|
|
{"data": "p_state", "class":"txt dt-body-center"},
|
|
{"data": "p_project_type_cd", "class":"txt dt-body-center"},
|
|
{"data": "p_sn", "class":"txt dt-body-center"},
|
|
{"data": "p_subject", "class":"txt dt-body-left"},
|
|
{"data": "p_cli_company_nm", "class":"txt dt-body-center"},
|
|
{"data": "p_method", "class":"txt dt-body-center"},
|
|
{"data": "p_sample", "class":"txt dt-body-center", "type":"num-fmt", "render":colNum},
|
|
{"data": "p_cont_cost", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
{"data": "p_total_cost", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
{"data": "pc_con_cost", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
{"data": "sum_est", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
{"data": "rate_est", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumRate},
|
|
{"data": "sum_act", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
{"data": "rate_act", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumRate},
|
|
//{"data": "r_est", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
//{"data": "r_act", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
//{"data": "f_est", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
//{"data": "f_act", "class":"txt dt-body-center", "type":"num-fmt", "render":colNumCost},
|
|
{"data": "p_decide_date", "class":"txt dt-body-center"},
|
|
{"data": "p_con_date_st", "class":"txt dt-body-center"},
|
|
{"data": "p_con_date_end", "class":"txt dt-body-center"},
|
|
{"data": "p_input_progress", "class":"txt dt-body-center"},
|
|
{"data": "r_user", "class":"txt dt-body-center"},
|
|
{"data": "f_user", "class":"txt dt-body-center"},
|
|
{"data": "p_input_user", "class":"txt dt-body-center"},
|
|
{"data": "p_input_dt", "class":"txt dt-body-center"},
|
|
],
|
|
columnDefs: [
|
|
{"className": "dt-head-center dt-body-center psn", "targets": "_all"},
|
|
{"visible": false, "targets": ColArr}
|
|
|
|
],
|
|
createRow: function(row, data, index){
|
|
$(row).addClass('hov');
|
|
},
|
|
fixedColumns: {
|
|
leftColumns: 4
|
|
},
|
|
dom:'lBfrtip',
|
|
scrollX: true,
|
|
scrollY: 480,
|
|
fixedHeader: true,
|
|
language:lang_kor,
|
|
paging:false,
|
|
pageLength: 50,
|
|
order: [[ 3, "asc" ]],
|
|
cache: false,
|
|
buttons: [
|
|
{
|
|
extend: 'copy',
|
|
text: 'List Copy',
|
|
},
|
|
{
|
|
extend: 'excel',
|
|
text: 'Excel Down',
|
|
title: '프로젝트 현황'
|
|
},
|
|
{
|
|
extend: 'colvis',
|
|
text: 'Column',
|
|
postfixButtons: [ 'colvisRestore' ]
|
|
},
|
|
],
|
|
filterDropDown: {
|
|
columns: [
|
|
{
|
|
idx: 0
|
|
},
|
|
{
|
|
idx: 1
|
|
},
|
|
{
|
|
idx: 6
|
|
}
|
|
],
|
|
},
|
|
initComplete: function () {
|
|
|
|
}
|
|
});
|
|
|
|
$("#ContactList_filterWrapper").append(hh);
|
|
|
|
|
|
$(document).off("click", ".buttons-columnVisibility").on("click", ".buttons-columnVisibility", function(e){
|
|
if($(this).hasClass("active")){
|
|
var idx = ColArr.indexOf($(this).index());
|
|
if(idx != -1){
|
|
ColArr.splice(idx,1);
|
|
}
|
|
}else{
|
|
ColArr.push($(this).index());
|
|
}
|
|
$.cookie("p_column",ColArr);
|
|
});
|
|
|
|
$(document).off("click", ".buttons-colvisRestore").on("click", ".buttons-colvisRestore", function(){
|
|
if(confirm("설정된 컬럼 세팅이 초기화 됩니다.")){
|
|
$.removeCookie("p_column");
|
|
|
|
for(var i=0; i<$(".buttons-columnVisibility").length; i++){
|
|
if(!$(".buttons-columnVisibility").eq(i).hasClass("ui-state-active")){
|
|
$(".buttons-columnVisibility").eq(i).trigger("click");
|
|
}
|
|
}
|
|
}else{
|
|
return false;
|
|
}
|
|
});
|
|
|
|
$("#p_sdate").val($.datepicker.formatDate('yy-mm-dd', new Date(now.getFullYear(), now.getMonth(), 1)));
|
|
$("#p_edate").val($.datepicker.formatDate('yy-mm-dd', new Date(now.getFullYear(), now.getMonth()+1, 0)));
|
|
$.datepicker.regional['ko']={
|
|
closeText: '닫기',
|
|
changeYear: true,
|
|
changeMonth: true,
|
|
prevText: '이전 달',
|
|
nextText: '다음 달',
|
|
yearRange: '1990:+10',
|
|
dateFormat: "yy-mm-dd",
|
|
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
|
monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
|
dayNames: ['일','월','화','수','목','금','토'],
|
|
dayNamesShort: ['일','월','화','수','목','금','토'],
|
|
dayNamesMin: ['일','월','화','수','목','금','토'],
|
|
showMonthAfterYear: true,
|
|
yearSuffix: '년'
|
|
};
|
|
|
|
$.datepicker.setDefaults($.datepicker.regional['ko']);
|
|
|
|
table.on('draw', function () {
|
|
table.columns('.dt-filter').every( function ( ) {
|
|
var thisColumn = this;
|
|
} );
|
|
});
|
|
|
|
table.on('preXhr.dt', function(e, settings, data){
|
|
$(this).dataTable().api().clear();
|
|
settings.iDraw = 0; //set to 0, which means "initial draw" which with a clear table will show "loading..." again.
|
|
$(this).dataTable().api().draw();
|
|
});
|
|
|
|
table.on('xhr', function (e) {
|
|
setTimeout(function(){
|
|
TableFilter();
|
|
}, 0);
|
|
});
|
|
|
|
$(document).off("mouseover", "tbody > tr[role=row]").on("mouseover", "tbody > tr[role=row]", function(e){
|
|
$(".DTFC_Cloned tbody > tr[role=row]").eq($(this).index()).css("background-color","#e9e9e9");
|
|
$("tbody > tr[role=row]").eq($(this).index()).css("background-color","#e9e9e9");
|
|
});
|
|
|
|
$(document).off("mouseout", "tbody > tr[role=row]").on("mouseout", "tbody > tr[role=row]", function(){
|
|
$(".DTFC_Cloned tbody > tr[role=row]").eq($(this).index()).css("background-color","#ffffff");
|
|
$("tbody > tr[role=row]").eq($(this).index()).css("background-color","#ffffff");
|
|
});
|
|
|
|
$("#p_sdate").datepicker();
|
|
$("#p_sdate").datepicker("option", "maxDate", $("#p_edate").val());
|
|
$("#p_sdate").datepicker("option", "onClose", function(selectedDate){
|
|
$("#p_edate").datepicker("option", "minDate", selectedDate);
|
|
});
|
|
$("#p_sdate").datepicker("option", "onSelect", function(selectedDate){
|
|
table.ajax.reload();
|
|
});
|
|
|
|
$("#p_edate").datepicker();
|
|
$("#p_edate").datepicker("option", "minDate", $("#p_sdate").val());
|
|
$("#p_edate").datepicker("option", "onClose", function(selectedDate){
|
|
$("#p_edate").datepicker("option", "maxDate", selectedDate);
|
|
});
|
|
$("#p_edate").datepicker("option", "onSelect", function(selectedDate){
|
|
table.ajax.reload();
|
|
});
|
|
|
|
function TableFilter(){
|
|
$("#ContactList_filterSelect0").empty();
|
|
$("#ContactList_filterSelect1").empty();
|
|
$("#ContactList_filterSelect6").empty();
|
|
|
|
$("#ContactList_filterSelect0").append("<option value=''>부서</option>");
|
|
$.each(unique($.map(table.ajax.json().data, function(o){ return o.Team; })).sort(), function(i, o){
|
|
$("#ContactList_filterSelect0").append("<option value='"+o+"'>"+o+"</option>");
|
|
});
|
|
|
|
$("#ContactList_filterSelect1").append("<option value=''>진행 상태</option>");
|
|
$.each(unique($.map(table.ajax.json().data, function(o){ return o.p_state; })).sort(), function(i, o){
|
|
$("#ContactList_filterSelect1").append("<option value='"+o+"'>"+o+"</option>");
|
|
});
|
|
|
|
$("#ContactList_filterSelect6").append("<option value=''>조사 방법</option>");
|
|
$.each(unique($.map(table.ajax.json().data, function(o){ return o.p_method; })).sort(), function(i, o){
|
|
$("#ContactList_filterSelect6").append("<option value='"+o+"'>"+o+"</option>");
|
|
});
|
|
}
|
|
|
|
$('#ContactList tbody').on('click', 'tr', function () {
|
|
var data = table.row(this).data();
|
|
var p_sn = data.p_sn;
|
|
|
|
if(p_sn.indexOf("_") != -1){
|
|
var sn = p_sn.split('_');
|
|
winObj = window.open("project_list2_dep_2014.asp?p_sn="+sn[0]+"&p_sub_type=C&p_child_sn="+p_sn,"_blank","left=0,top=0,width=1400,height=800,scrollbars=yes,resizeable=yes",true);
|
|
}else{
|
|
winObj = window.open("project_ContactInfo.asp?p_sn="+p_sn,"_blank","left=0,top=0,width=1050,height=940,scrollbars=yes,resizeable=yes",true);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |