641 lines
25 KiB
PHP
641 lines
25 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-left-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==17 OR $id_karyawan==23 OR $id_karyawan==12 OR $id_karyawan==60) {
|
|
|
|
} else {
|
|
$jabatan = "DILARANG";
|
|
$proyekBerjalan = null;
|
|
$proyekTerproses = null;
|
|
$proyekLaporan = null;
|
|
$proyekSelesai = null;
|
|
$countBerjalan = 0;
|
|
$countTerproses = 0;
|
|
$countLaporan = 0;
|
|
$countSelesai = 0;
|
|
}
|
|
?>
|
|
|
|
<header class="page-header">
|
|
<h2><strong>Data Proyek | <b style="color:Yellow">[ADMIN PROYEK]</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 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="table1">
|
|
<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-success" onclick="window.location.href='<?= base_url('index.php/Menu/PR_Sub1_AdminProyek_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 ($statNode2==0) { ?>
|
|
<section class="toggle">
|
|
<?php } else if ($statNode2==1) { ?>
|
|
<section class="toggle active">
|
|
<?php } ?>
|
|
<label class="center" onclick="toggle2();"><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="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($proyekTerproses) || is_object($proyekTerproses)) {
|
|
$no = 1;
|
|
foreach ($proyekTerproses 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_Sales_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 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="table3">
|
|
<thead>
|
|
<th class="center default">No</th>
|
|
<th width="150px" 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($proyekLaporan) || is_object($proyekLaporan)) {
|
|
$no = 1;
|
|
foreach ($proyekLaporan as $key) { ?>
|
|
<tr>
|
|
<td class="center"><?= $no; ?></td>
|
|
<td><b style="color:DarkViolet">Periode <?= $key['NAMA_KUARTAL']; ?></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 ($statNode4==0) { ?>
|
|
<section class="toggle">
|
|
<?php } else if ($statNode4==1) { ?>
|
|
<section class="toggle active">
|
|
<?php } ?>
|
|
<label class="center" onclick="toggle4();"><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="table4">
|
|
<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_KUARTAL']; ?> </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_KUARTAL']; ?> </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="modalTambah" class="modal fade" tabindex="-1" role="dialog">
|
|
<?= form_open('Menu/PR_Tambah_Sub1_A1_DataProyek', array('id' => 'formproyek'), array('method' => 'PR_Tambah_Sub1_A1_DataProyek')); ?>
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<header class="panel-heading">
|
|
<h4 class="panel-title"><strong>Tambah Data </strong><b class="text-danger">[Warna Merah harus diisi]</b></h4>
|
|
</header>
|
|
<div class="modal-body ">
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-2">
|
|
<label><strong class="text-danger">Mulai Proyek</strong></label>
|
|
</div>
|
|
<div class="col-md-10">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
<input type="date" name="tgl_proyeknew" id="tgl_proyeknew" class="form-control" value="<?=$tgl?>" disabled>
|
|
</div>
|
|
<small class="help-block"></small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-2">
|
|
<label><strong class="text-danger">Nama</strong></label>
|
|
</div>
|
|
<div class="col-md-10">
|
|
<input type="text" name="po_proyeknew" id="po_proyeknew" style="text-transform:uppercase" class="form-control" data-plugin-maxlength maxlength="70" autocomplete="off" placeholder="Nama Proyek" onchange="cekProyek(1);" required>
|
|
<small class="help-block"></small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-2">
|
|
<label><strong class="text-danger">Nilai</strong></label>
|
|
</div>
|
|
<div class="col-md-10">
|
|
<div class="input-group">
|
|
<span class="input-group-addon">Rp</span>
|
|
<input type="decimal" name="nilai_proyeknew" onchange="cekNilai(1)" id="nilai_proyeknew" class="form-control" autocomplete="off" placeholder="Nilai Proyek (Exclude)" required>
|
|
</div>
|
|
<small class="help-block"></small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-2">
|
|
<label><strong class="text-danger">Sales</strong></label>
|
|
</div>
|
|
<div class="col-md-10">
|
|
<select data-plugin-selectTwo name="id_salesnew" id="id_salesnew" class="form-control populate" required>
|
|
<option value="" selected>Pilih Sales</option>
|
|
<?php if (is_array($sales) || is_object($sales)) {
|
|
foreach ($sales as $key) { ?>
|
|
<option value="<?= $key['ID_KARYAWAN'] ?>"><?= $key['NAMA_PANGGILAN_KARYAWAN'] ?></option>
|
|
<?php }
|
|
} ?>
|
|
</select>
|
|
<small class="help-block"></small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-2">
|
|
<label><strong class="text-danger">Pelanggan</strong></label>
|
|
</div>
|
|
<div class="col-md-10">
|
|
<select data-plugin-selectTwo name="id_pelanggannew" id="id_pelanggannew" class="form-control populate" required>
|
|
<option value="" selected>Pilih Pelanggan</option>
|
|
<?php if (is_array($pelanggan) || is_object($pelanggan)) {
|
|
foreach ($pelanggan as $key) { ?>
|
|
<option value="<?= $key['ID_PELANGGAN'] ?>"><?= $key['NAMA_PELANGGAN'] ?> (<?= $key['NAMA_KOTA'] ?>)</option>
|
|
<?php }
|
|
} ?>
|
|
</select>
|
|
<small class="help-block"></small>
|
|
</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-success"><strong>Tambah</strong> <i class="fa fa-plus-circle"></i></button>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
<?= form_close(); ?>
|
|
<!-- /.modal-content -->
|
|
</div>
|
|
</div>
|
|
|
|
<div id="modalCetak" class="modal fade" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<?= form_open('Menu/PR_Excel_Sub1_ABC1_RekapKuartal', array('id' => 'formproyek'), array('method' => 'PR_Excel_Sub1_ABC1_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
|
|
} );
|
|
|
|
$('#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_B1",
|
|
type: "POST",
|
|
dataType: "json",
|
|
data: {
|
|
node : '1',
|
|
},
|
|
success: function(response) {
|
|
}
|
|
});
|
|
}
|
|
|
|
function toggle2() {
|
|
$.ajax({
|
|
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_B1",
|
|
type: "POST",
|
|
dataType: "json",
|
|
data: {
|
|
node : '2',
|
|
},
|
|
success: function(response) {
|
|
}
|
|
});
|
|
}
|
|
|
|
function toggle3() {
|
|
$.ajax({
|
|
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_B1",
|
|
type: "POST",
|
|
dataType: "json",
|
|
data: {
|
|
node : '3',
|
|
},
|
|
success: function(response) {
|
|
}
|
|
});
|
|
}
|
|
|
|
function toggle4() {
|
|
$.ajax({
|
|
url: "<?= base_url() ?>index.php/Menu/PR_Status_Sub1_B1",
|
|
type: "POST",
|
|
dataType: "json",
|
|
data: {
|
|
node : '4',
|
|
},
|
|
success: function(response) {
|
|
}
|
|
});
|
|
}
|
|
|
|
function cekProyek(id) {
|
|
if (id==1) {
|
|
var po_proyek = document.getElementById("po_proyeknew").value;
|
|
var id_proyek = 0;
|
|
} else if (id==2) {
|
|
var po_proyek = document.getElementById("po_proyeked").value;
|
|
var id_proyek = document.getElementById("id_proyeked").value;
|
|
}
|
|
|
|
PNotify.removeAll();
|
|
|
|
$.ajax({
|
|
url: "<?= base_url() ?>index.php/Menu/PR_Ambil_Sub1_A1_KorektorProyek",
|
|
type: "POST",
|
|
dataType: "json",
|
|
data: {
|
|
id : id,
|
|
id_proyek : id_proyek,
|
|
po_proyek : po_proyek,
|
|
},
|
|
success: function(response) {
|
|
if (response.value==1) {
|
|
notify("proyek_same");
|
|
if (id==1) {
|
|
document.getElementById("po_proyeknew").value = null;
|
|
} else {
|
|
document.getElementById("po_proyeked").value = document.getElementById("po_proyekold").value;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function cekNilai(id) {
|
|
if (id==1) {
|
|
var nilaiNew = document.getElementById("nilai_proyeknew").value;
|
|
} else if (id==2) {
|
|
var nilaiNew = document.getElementById("nilai_proyeked").value;
|
|
}
|
|
PNotify.removeAll();
|
|
|
|
var nilaiNew = nilaiNew.replace(/,/g,'.');
|
|
|
|
var cekNumber = isNaN(nilaiNew);
|
|
if (cekNumber==true) {
|
|
notify("not_number");
|
|
if (id==1) {
|
|
document.getElementById("nilai_proyeknew").value = null;
|
|
} else if (id==2) {
|
|
document.getElementById("nilai_proyeked").value = document.getElementById("nilai_proyekold").value;
|
|
}
|
|
}
|
|
|
|
if (nilaiNew<0 || nilaiNew=="") {
|
|
notify("less_zero");
|
|
if (id==1) {
|
|
document.getElementById("nilai_proyeknew").value = null;
|
|
} else if (id==2) {
|
|
document.getElementById("nilai_proyeked").value = document.getElementById("nilai_proyekold").value;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function cetakData(id_rq) {
|
|
document.getElementById("id_rqprint").value = id_rq;
|
|
}
|
|
|
|
setInterval(function() {
|
|
var jabatan = "<?=$jabatan?>";
|
|
$.ajax({
|
|
url: "<?= base_url() ?>index.php/Menu/PR_Hitung_Sub1_A1_DataProyek",
|
|
type: "POST",
|
|
dataType: "json",
|
|
data: 'countBerjalan=' + <?= $countBerjalan ?> + '&countTerproses=' + <?= $countTerproses ?> + '&countLaporan=' + <?= $countLaporan ?> + '&countSelesai=' + <?= $countSelesai ?>,
|
|
success: function(response) {
|
|
if (response.value == 1 && jabatan!="DILARANG") {
|
|
notify("autorefresh_changeitem");
|
|
delayReload(2000,"<?= base_url() ?>index.php/Menu/PR_Sub1_Sales_1");
|
|
}
|
|
}
|
|
});
|
|
}, 5000);
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|