Files
2026-06-13 16:02:07 +10:00

569 lines
24 KiB
PHP

<!doctype html>
<html class="fixed sidebar-left-collapsed">
<head>
<!-- Basic -->
<meta charset="UTF-8">
<title>MENU PROYEK</title>
<meta name="keywords" content="HTML5 Admin Template" />
<meta name="description" content="Porto Admin - Responsive HTML5 Template">
<meta name="author" content="okler.net">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Vendor CSS -->
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/magnific-popup/magnific-popup.css" />
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
<!-- Specific Page Vendor CSS -->
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/select2/select2.css" />
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/jquery-datatables-bs3/assets/css/datatables.css" />
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/pnotify/pnotify.custom.css" />
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/bootstrap-multiselect/bootstrap-multiselect.css" />
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/base/jquery-ui.css" />
<!-- Theme CSS -->
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/stylesheets/theme.css" />
<!-- Skin CSS -->
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/stylesheets/skins/default.css" />
<!-- Theme Custom CSS -->
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/stylesheets/theme-custom.css">
<!-- Head Libs -->
<script src="<?php echo base_url('') ?>assets/vendor/modernizr/modernizr.js"></script>
</head>
<script src="<?= base_url() ?>assets/bower_components/jquery/jquery-3.3.1.min.js"></script>
<script src="<?= base_url() ?>assets/bower_components/sweetalert2/sweetalert2.all.min.js"></script>
<style>
.ui-front {
z-index: 9999;
}
.solid {
border-bottom-style: solid;
border-width: 5px;
border-color: darkcyan;
}
</style>
<script type="text/javascript">
let base_url = '<?= base_url() ?>';
</script>
<body>
<section class="body">
<!-- start: header -->
<?php $this->load->view('template/header'); ?>
<!-- end: header -->
<div class="inner-wrapper">
<!-- start: sidebar -->
<?php $this->load->view('template/sidebar'); ?>
<!-- end: sidebar -->
<section role="main" class="content-body">
<?php
$jabatan = $this->session->userdata('jabatan');
$level = $this->session->userdata('level');
$nama_panggilan = $this->session->userdata('nama_panggilan');
$id_karyawan = $this->session->userdata('id_karyawan');
$tgl_now = date('d/m/Y');
if ($jabatan=="ADMINISTRATOR" OR $id_karyawan==4) {
} else {
$jabatan = "DILARANG";
$proyekBerjalan = null;
$proyekBatal = null;
$proyekTerproses = null;
$proyekLaporan = null;
$proyekSelesai = null;
$countBerjalan = 0;
$countBatal = 0;
$countTerproses = 0;
$countLaporan = 0;
$countSelesai = 0;
}
?>
<header class="page-header">
<h2><strong>Data Proyek | <b style="color:Yellow">[MANAJEMEN]</b></strong></h2>
<div class="right-wrapper pull-right">
<ol class="breadcrumbs">
<li><span><strong style="color:Gold">Master Data </span></strong></li>
</ol>
<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
</div>
</header>
<!-- start: page -->
<section class="panel panel-featured panel-featured-warning">
<header class="panel-heading">
<div class="panel-actions">
<a href="<?php echo base_url('') ?>index.php" class="text-dark"><strong>Kembali</strong><i class="fa fa-backward"></i></a>
</div>
<h2 class="panel-title"><b style="color:Chocolate">PROYEK</b></h2>
</header>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<div class="toggle" data-plugin-toggle>
<?php if ($statNode1==0) { ?>
<section class="toggle">
<?php } else if ($statNode1==1) { ?>
<section class="toggle active">
<?php } ?>
<label class="center" onclick="toggle1();"><b>PROYEK BATAL BULAN INI | <?=$countBatal?> PROYEK</b> </label>
<div class="toggle-content">
<div class="panel-body">
<div class="row">
<table class="table table-bordered table-striped mb-none" id="table1">
<thead>
<th class="center default">No</th>
<th width="145px" class="default">Proyek Lama</th>
<th width="145px" class="default">Proyek Baru</th>
<th class="center default">ACC<br><b style="color:DarkRed">ICT</b></th>
<th class="center default">PILIHAN</th>
</thead>
<tbody>
<?php
if (is_array($proyekBatal) || is_object($proyekBatal)) {
$no = 1;
foreach ($proyekBatal as $key) { ?>
<tr>
<?php if ($key['TGL_BATAL']==NULL) { ?>
<td class="center"><?= $no; ?></td>
<?php } else { ?>
<td class="center"><?= $no; ?><br><i style="color:Red">Sudah Batal<br><?=$key['TGLBTL']?>*</i></td>
<?php } ?>
<td><b style="color:DarkGreen">[1] <?= $key['KODE_PROYEK']; ?> (<?= $key['TANGGAL']; ?>)</b><br><b style="color:Navy">[2] <?=$key['NILAI']?></b><br><b style="color:Chocolate">[3] <?=$key['NAMA_PELANGGAN']?></b><br><b style="color:FireBrick">[4] <?=$key['NAMA_PANGGILAN_KARYAWAN']?></b><br><b style="color:SlateBlue">[5] <?=$key['PO_PROYEK']?></b></td>
<td><b style="color:DarkGreen">[1] <?= $key['PENGGANTIKODE']; ?> (<?= $key['PENGGANTITANGGAL']; ?>)</b><br><b style="color:Navy">[2] <?=$key['PENGGANTINILAI']?></b><br><b style="color:Chocolate">[3] <?=$key['PENGGANTIPELANGGAN']?></b><br><b style="color:FireBrick">[4] <?=$key['PENGGANTISALES']?></b><br><b style="color:SlateBlue">[5] <?=$key['PENGGANTIPO']?></b></td>
<?php if ($key['ACC_ICT']!=NULL) { ?>
<td class="center"><i class="fa fa-check text-success"></i><br>(<?= $key['ACC_ICT']; ?>)<br><b style="color:DarkRed">Bp. Ridwan</b></td>
<?php } else { ?>
<td class="center"><i class="fa fa-times text-danger"></i></td>
<?php } ?>
<td class="actions center">
<?php if ($key['ACC_ICT']==NULL) { ?>
<span data-toggle="modal" data-target="#modalAccForm"><button type="button" onclick="accData('<?= $key['ID_PROYEK']; ?>')" class="btn btn-xs btn-primary" title="" data-toggle="tooltip" data-trigger="hover" data-original-title="Tombol untuk ACC Data"><i class="fa fa-check"></i></button></span>
<?php } else { ?>
<button type="button" class="btn btn-xs btn-default"><b style="color:DarkMagenta">Sudah ACC <i class="fa fa-times"></i></b></button>
<?php } ?>
</td>
</tr>
<?php $no++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
<div class="col-md-12">
<div class="toggle" data-plugin-toggle>
<?php if ($statNode2==0) { ?>
<section class="toggle">
<?php } else if ($statNode2==1) { ?>
<section class="toggle active">
<?php } ?>
<label class="center" onclick="toggle2();"><b>PROYEK BERJALAN | <?=$countBerjalan?> PROYEK</b> </label>
<div class="toggle-content">
<div class="panel-body">
<div class="row">
<table class="table table-bordered table-striped mb-none" id="table2">
<thead>
<th class="center default">No</th>
<th class="default">Kode</th>
<th class="default">Pelanggan</th>
<th class="default">Nama Proyek</th>
<th class="center default">Detail Proyek</th>
</thead>
<tbody>
<?php
if (is_array($proyekBerjalan) || is_object($proyekBerjalan)) {
$no = 1;
foreach ($proyekBerjalan as $key) { ?>
<tr>
<?php
$diffawal = new DateTime($key['TGL_PROYEK']);
$diffakhir = new DateTime($tgl);
$diff = date_diff($diffawal, $diffakhir);
$diff = $diff->format("%a");
?>
<td class="center"><?= $no; ?></td>
<td><b style="color:DarkViolet"><?= $key['KODE_PROYEK']; ?></b><br><i>(<?= $key['TANGGAL']; ?>)</i><br><b style="color:Navy">Nilai : <?=$key['NILAI']?></b></td>
<?php if ($key['TYPE_PELANGGAN']=="0") { ?>
<td><strong class="text-primary">Corporate</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
<?php } else if ($key['TYPE_PELANGGAN']=="1") { ?>
<td><strong class="text-success">Dealer</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
<?php } else if ($key['TYPE_PELANGGAN']=="2") { ?>
<td><strong style="color:DarkOrange">User</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
<?php } ?>
<?php if (strtotime($tgl)>strtotime($key['TEMPO_PROYEK'])) { ?>
<td><b style="color:SlateBlue"><?= $key['PO_PROYEK']; ?></b><br><b style="color:DarkGreen">Tempo : [<?= $key['TEMPO']; ?>]<br><b style="color:Red">*Sudah Jatuh Tempo*</b></b><br><b style="color:Chocolate">Berjalan : <?=$diff?> Hari</b></td>
<?php } else { ?>
<td><b style="color:SlateBlue"><?= $key['PO_PROYEK']; ?></b><br><b style="color:DarkGreen">Tempo : [<?= $key['TEMPO']; ?>]</b><br><b style="color:Chocolate">Berjalan : <?=$diff?> Hari</b></td>
<?php } ?>
<td class="actions center">
<button type="button" class="btn btn-xs btn-info" onclick="window.location.href='<?= base_url('index.php/Menu/PR_Sub1_Manajemen_2/');
echo $key['ID_PROYEK'];?>'"><i class="fa fa-search"></i></button>
</td>
</tr>
<?php $no++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
<div class="col-md-12">
<div class="toggle" data-plugin-toggle>
<?php if ($statNode3==0) { ?>
<section class="toggle">
<?php } else if ($statNode3==1) { ?>
<section class="toggle active">
<?php } ?>
<label class="center" onclick="toggle3();"><b>PROYEK TERPROSES | <?=$countTerproses?> PROYEK</b> </label>
<div class="toggle-content">
<div class="panel-body">
<div class="row">
<table class="table table-bordered table-striped mb-none" id="table3">
<thead>
<th class="center default">No</th>
<th class="default">Kode</th>
<th class="default">Pelanggan</th>
<th class="default">Nama Proyek</th>
<th class="center default">Detail Proyek</th>
</thead>
<tbody>
<?php
if (is_array($proyekTerproses) || is_object($proyekTerproses)) {
$no = 1;
foreach ($proyekTerproses as $key) { ?>
<tr>
<?php
$limit = date('Y-m-01');
?>
<td class="center"><?= $no; ?></td>
<td><b style="color:DarkViolet"><?= $key['KODE_PROYEK']; ?></b><br><i>(<?= $key['TANGGAL']; ?>)</i><br><b style="color:Navy">Nilai : <?=$key['NILAI']?></b></td>
<?php if ($key['TYPE_PELANGGAN']=="0") { ?>
<td><strong class="text-primary">Corporate</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
<?php } else if ($key['TYPE_PELANGGAN']=="1") { ?>
<td><strong class="text-success">Dealer</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
<?php } else if ($key['TYPE_PELANGGAN']=="2") { ?>
<td><strong style="color:DarkOrange">User</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
<?php } ?>
<td><b style="color:DarkSlateGray"><?= $key['PO_PROYEK']; ?></b><br><b style="color:SlateBlue">Terkunci : [<?= $key['TGLKUNCI']; ?>]</b></td>
<td class="actions center">
<button type="button" class="btn btn-xs btn-info" onclick="window.location.href='<?= base_url('index.php/Menu/PR_Sub1_Manajemen_2/');
echo $key['ID_PROYEK'];?>'"><i class="fa fa-search"></i></button>
</td>
</tr>
<?php $no++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
<div class="col-md-12">
<div class="toggle" data-plugin-toggle>
<?php if ($statNode4==0) { ?>
<section class="toggle">
<?php } else if ($statNode4==1) { ?>
<section class="toggle active">
<?php } ?>
<label class="center" onclick="toggle4();"><b>PROYEK DILAPORKAN | <?=$countLaporan?> LAPORAN</b> </label>
<div class="toggle-content">
<div class="panel-body">
<div class="row">
<table class="table table-bordered table-striped mb-none" id="table4">
<thead>
<th class="center default">No</th>
<th width="150px" class="default">Periode</th>
<th class="default">Sales</th>
<th class="text-right default">Total Proyek<br><i style="color:Red">(Exclude Fee)</i></th>
<th class="text-right default">Total HPP</th>
<th class="text-right default">Total GP</th>
<th class="center">PILIHAN</th>
</thead>
<tbody>
<?php
if (is_array($proyekLaporan) || is_object($proyekLaporan)) {
$no = 1;
foreach ($proyekLaporan as $key) { ?>
<tr>
<td class="center"><?= $no; ?></td>
<td><b style="color:DarkViolet"><?= $key['NAMA_PKU']; ?></b><br><i>(<?= $key['AWAL']; ?> s.d <?= $key['AKHIR']; ?>)</i></td>
<td><b style="color:Green"><?= $key['NAMA_PANGGILAN_KARYAWAN']; ?></b></td>
<td class="text-right"><b style="color:FireBrick"><?= $key['NOTA']; ?></b></td>
<td class="text-right"><b style="color:Navy"><?= $key['BIAYA']; ?></b></td>
<td class="text-right"><b style="color:Chocolate"><?= $key['GP']; ?></b></td>
<td class="actions center">
<span data-toggle="modal" data-target="#modalCetak"><button type="button" onclick="cetakData('<?=$key['ID_RQ']?>')" class="btn btn-xs btn-primary" title="" data-toggle="tooltip" data-trigger="hover" data-original-title="Tombol untuk Cetak Data"><i class="fa fa-file-excel-o"></i></button></span>
</td>
</tr>
<?php $no++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
<div class="col-md-12">
<div class="toggle" data-plugin-toggle>
<?php if ($statNode5==0) { ?>
<section class="toggle">
<?php } else if ($statNode5==1) { ?>
<section class="toggle active">
<?php } ?>
<label class="center" onclick="toggle5();"><b>PROYEK SELESAI PERHITUNGAN BULAN INI | <?=$countSelesai?> LAPORAN</b> </label>
<div class="toggle-content">
<div class="panel-body">
<div class="row">
<table class="table table-bordered table-striped mb-none" id="table5">
<thead>
<th class="center default">No</th>
<th width="170px" class="default">Kode</th>
<th class="default">Sales</th>
<th class="text-right default">Total Proyek<br><i style="color:Red">(Exclude Fee)</i></th>
<th class="text-right default">Total HPP</th>
<th class="text-right default">Total GP</th>
<th class="center">PILIHAN</th>
</thead>
<tbody>
<?php
if (is_array($proyekSelesai) || is_object($proyekSelesai)) {
$no = 1;
foreach ($proyekSelesai as $key) { ?>
<tr>
<td class="center"><?= $no; ?></td>
<?php if ($key['STATUS_RQ']==1) { ?>
<td><b style="color:DarkViolet">Periode <?= $key['NAMA_PKU']; ?> </b><b style="color:Red">[Belum ACC<i class="fa fa-times"></i>]</b><br><i>(<?= $key['AWAL']; ?> s.d <?= $key['AKHIR']; ?>)</i></td>
<?php } else if ($key['STATUS_RQ']==2) { ?>
<td><b style="color:DarkViolet">Periode <?= $key['NAMA_PKU']; ?> </b><b style="color:Blue">[Sudah ACC<i class="fa fa-check"></i>]</b><br><i>(<?= $key['AWAL']; ?> s.d <?= $key['AKHIR']; ?>)</i></td>
<?php } ?>
<td><b style="color:Green"><?= $key['NAMA_PANGGILAN_KARYAWAN']; ?></b></td>
<td class="text-right"><b style="color:FireBrick"><?= $key['NOTA']; ?></b></td>
<td class="text-right"><b style="color:Navy"><?= $key['BIAYA']; ?></b></td>
<td class="text-right"><b style="color:Chocolate"><?= $key['GP']; ?></b></td>
<td class="actions center">
<span data-toggle="modal" data-target="#modalCetak"><button type="button" onclick="cetakData('<?=$key['ID_RQ']?>')" class="btn btn-xs btn-primary" title="" data-toggle="tooltip" data-trigger="hover" data-original-title="Tombol untuk Cetak Data"><i class="fa fa-file-excel-o"></i></button></span>
</td>
</tr>
<?php $no++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</section>
<!-- end: page -->
</section>
<div id="modalAccForm" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<?= form_open('Menu/PR_Proses_Sub1_DataAccForm', array('id' => 'formproyek'), array('method' => 'PR_Proses_Sub1_DataAccForm')); ?>
<div class="modal-content">
<header class="panel-heading">
<h2 class="panel-title"><strong>ACC Form</strong></h2>
</header>
<div class="panel-body">
<div class="modal-wrapper">
<div class="modal-text">
<input type="hidden" id="id_proyekaccform" name="id_proyekaccform" class="form-control">
<input type="hidden" id="jenis_proyekaccform" name="jenis_proyekaccform" value="3" class="form-control">
<h4><i style="color:Teal">Pastikan Data sudah benar sebelum Form di ACC.</i><br><i style="color:Tomato">Proses tidak dapat dibatalkan.</i><br>Apakah ingin ACC Form?</h4>
</div>
</div>
</div>
<footer class="panel-footer">
<div class="row">
<div class="col-md-12 text-right">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
<button type="submit" name="SubmitButton" id="SubmitButton" class="btn btn-primary"><strong>ACC</strong> <i class="fa fa-check"></i></button>
</div>
</div>
</footer>
</div>
<?= form_close(); ?>
</div>
</div>
<div id="modalCetak" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<?= form_open('Menu/PR_Excel_Sub1_ACD1_RekapKuartal', array('id' => 'formproyek'), array('method' => 'PR_Excel_Sub1_ACD1_RekapKuartal')); ?>
<div class="modal-content">
<header class="panel-heading">
<h2 class="panel-title"><strong>Cetak Data</strong></h2>
</header>
<div class="panel-body">
<div class="modal-wrapper">
<div class="modal-text">
<input type="hidden" name="id_rqprint" id="id_rqprint" class="form-control">
<h4>Apakah ingin Cetak Data?</h4>
</div>
</div>
</div>
<footer class="panel-footer">
<div class="row">
<div class="col-md-12 text-right">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
<button type="submit" name="SubmitCetak" id="SubmitCetak" formtarget="_blank" class="btn btn-primary"><strong>Cetak</strong> <i class="fa fa-file-excel-o"></i></button>
</div>
</div>
</footer>
</div>
<?= form_close(); ?>
</div>
</div>
<?php
$this->load->view('template/sidebar_right');
$this->load->view('template/script_vendor');
$this->load->view('template/script_flashdata');
$this->load->view('template/notification');
?>
<script>
$('#table1').dataTable( {
"paging": false
} );
$('#table2').dataTable( {
"paging": false
} );
$('#table3').dataTable( {
"paging": false
} );
$('#table4').dataTable( {
"paging": false
} );
$('#table5').dataTable( {
"paging": false
} );
$('#SubmitCetak').click(function() {
var st = $('#id_rqprint').val();
if (st != '') {
$('#modalCetak').modal('toggle');
}
});
function toggle1() {
$.ajax({
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_D1",
type: "POST",
dataType: "json",
data: {
node : '1',
},
success: function(response) {
}
});
}
function toggle2() {
$.ajax({
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_D1",
type: "POST",
dataType: "json",
data: {
node : '2',
},
success: function(response) {
}
});
}
function toggle3() {
$.ajax({
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_D1",
type: "POST",
dataType: "json",
data: {
node : '3',
},
success: function(response) {
}
});
}
function toggle4() {
$.ajax({
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_D1",
type: "POST",
dataType: "json",
data: {
node : '4',
},
success: function(response) {
}
});
}
function toggle5() {
$.ajax({
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_D1",
type: "POST",
dataType: "json",
data: {
node : '5',
},
success: function(response) {
}
});
}
function accData(id_proyek) {
document.getElementById("id_proyekaccform").value = id_proyek;
}
function cetakData(id_rq) {
document.getElementById("id_rqprint").value = id_rq;
}
</script>
</body>
</html>