354 lines
13 KiB
PHP
354 lines
13 KiB
PHP
<!doctype html>
|
|
<html class="fixed sidebar-left-collapsed">
|
|
|
|
<head>
|
|
|
|
<!-- Basic -->
|
|
<meta charset="UTF-8">
|
|
|
|
<title>PENJUALAN</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;
|
|
}
|
|
|
|
.f18 {
|
|
font-size: 18px;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Create a two-column layout */
|
|
.column {
|
|
float: left;
|
|
width: 33%;
|
|
padding: 4px;
|
|
}
|
|
|
|
/* Clearfix (clear floats) */
|
|
.row::after {
|
|
content: "";
|
|
clear: both;
|
|
display: table;
|
|
}
|
|
|
|
</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
|
|
$id_karyawan = $this->session->userdata('id_karyawan');
|
|
$nama_panggilan = $this->session->userdata('nama_panggilan');
|
|
$username = $this->session->userdata('username');
|
|
$tgl_now = date('d/m/Y');
|
|
?>
|
|
|
|
<header class="page-header">
|
|
<h2><b>Data Analisa Komisi GP | <b style="color:LightGreen">[<?=$tampil?>]</b></b></h2>
|
|
<div class="right-wrapper pull-right">
|
|
<ol class="breadcrumbs">
|
|
<li><span><b style="color:Gold">Master Data </span></b></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-quartenary">
|
|
<header class="panel-heading">
|
|
<div class="panel-actions">
|
|
<a data-toggle="modal" data-target="#modalFitur" style="color:Coral"><b>Fitur </b><i class="fa fa-question-circle"></i></a>  
|
|
<a href="<?php echo base_url('') ?>index.php/Menu/PJ_Sub2_Laporan_1" class="text-dark"><b>Kembali </b><i class="fa fa-backward"></i></a>
|
|
</div>
|
|
<h2 class="panel-title"><b style="color:DarkViolet">KOMISI GP</b></h2>
|
|
</header>
|
|
<div class="panel-body">
|
|
<?php if ($hak>0) { ?>
|
|
<?= form_open('Menu/PJ_Excel_Sub2_DataAnalisaKomisiGp', array('method' => 'post'), array('id' => 'formpenjualan')); ?>
|
|
<div class="form-group">
|
|
<h4><div class="col-md-2"><b style="color:SlateBlue">Jenis Periode</b></div></h4>
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<select data-plugin-selectTwo id="periode" onchange="bukaRp(value)" class="form-control populate" required>
|
|
<option value="" selected>Pilih Periode</option>
|
|
<option value="2">BULANAN</option>
|
|
<option value="1">KUARTAL</option>
|
|
<option value="3">TAHUNAN</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<element id="periodeHid1" hidden="hidden">
|
|
<div class="form-group">
|
|
<h4><div class="col-md-2"><b style="color:SlateBlue">Rekap Proyek</b></div></h4>
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<select data-plugin-selectTwo id="id_rp" class="form-control populate" required></select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<h4><div class="col-md-2"><b style="color:SlateBlue">Rumus GP</b></div></h4>
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<select data-plugin-selectTwo id="id_rgp" class="form-control populate" required></select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</element>
|
|
<element id="periodeHid2" hidden="hidden">
|
|
<div class="form-group">
|
|
<h4><div class="col-md-2"><b style="color:SlateBlue">Transaksi</b></div></h4>
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<select data-plugin-selectTwo id="transaksi" class="form-control populate" required>
|
|
<option value="" selected>Pilih Transaksi</option>
|
|
<option value="1">CAMPUR</option>
|
|
<option value="2">SUDAH LUNAS</option>
|
|
<option value="3">BELUM LUNAS</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<h4><div class="col-md-2"><b style="color:SlateBlue">Periode Lunas</b></div></h4>
|
|
<div class="col-md-6">
|
|
<div class="input-daterange input-group">
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar"></i>
|
|
</span>
|
|
<input type="date" class="form-control" id="tgl_awal" onfocusout="cekTanggal(value, 1)" value="<?=$tgl?>" required>
|
|
<span class="input-group-addon">to</span>
|
|
<input type="date" class="form-control" id="tgl_akhir" onfocusout="cekTanggal(value, 2)" value="<?=$tgl?>" required>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</element>
|
|
<div class="form-group">
|
|
<h4><div class="col-md-2"><b style="color:SlateBlue">Menu</b></div></h4>
|
|
<div class="col-md-10 btn-group">
|
|
<input type="hidden" class="form-control" id="id_rpfill" name="id_rpfill">
|
|
<input type="hidden" class="form-control" id="id_rgpfill" name="id_rgpfill">
|
|
<input type="hidden" class="form-control" id="transaksifill" name="transaksifill">
|
|
<input type="hidden" class="form-control" id="tgl_awalfill" name="tgl_awalfill">
|
|
<input type="hidden" class="form-control" id="tgl_akhirfill" name="tgl_akhirfill">
|
|
<?php if ($hak>0) { ?>
|
|
<button type="submit" class="btn btn-default" onclick="isiData()" target="_blank"><b style="color:DarkGreen">Excel <i class="fa fa-file-excel-o"></i></b></button>
|
|
<button type="button" class="btn btn-default" onclick="reloadData()"><b style="color:FireBrick">Reset <i class="fa fa-rotate-left"></i></b></button>
|
|
<?php } else { ?>
|
|
<button type="button" class="btn btn-default"><b style="color:Red">Tidak Berhak <i class="fa fa-times"></i></b></button>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<?= form_close(); ?>
|
|
<?php } ?>
|
|
</div>
|
|
</section>
|
|
<!-- end: page -->
|
|
</section>
|
|
</div>
|
|
</section>
|
|
|
|
<div id="modalFitur" class="modal fade" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog modal-lg" style="width:50%">
|
|
<div class="modal-content">
|
|
<header class="panel-heading">
|
|
<h4 class="panel-title"><b>Fitur Teknis</b></h4>
|
|
</header>
|
|
<div class="panel-body">
|
|
<div class="modal-wrapper">
|
|
<div class="modal-text">
|
|
<div class="form-group">
|
|
<h5>
|
|
<b style="color:DarkRed">Berikut ini adalah Daftar Menu yang dapat diakses sesuai dengan Hak Akses Anda.</b><br>
|
|
<br><b style="color:DarkGreen">AKSES PENUH</b><br><b> Bisa melihat semua Data terkait</b><br>
|
|
</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer class="panel-footer">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<button type="button" class="btn btn-default pull-right" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</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>
|
|
function cekTanggal(value, id) {
|
|
PNotify.removeAll();
|
|
var now = "<?=$tgl?>";
|
|
|
|
if (value=="") {
|
|
notify("date_empty");
|
|
if (id==1) {
|
|
document.getElementById("tgl_awal").value = now;
|
|
} else if (id==2) {
|
|
document.getElementById("tgl_akhir").value = now;
|
|
}
|
|
}
|
|
|
|
$.ajax({
|
|
url: "<?= base_url() ?>index.php/Menu/GE_AmbilData_CekTanggal",
|
|
type: "POST",
|
|
dataType: "json",
|
|
data: {
|
|
tgl_input : value,
|
|
},
|
|
success: function(response) {
|
|
if (response.value==1) {
|
|
notify("day_lock");
|
|
if (id==1) {
|
|
document.getElementById("tgl_awal").value = now;
|
|
} else if (id==2) {
|
|
document.getElementById("tgl_akhir").value = now;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function reloadData() {
|
|
location.reload();
|
|
}
|
|
|
|
function isiData() {
|
|
document.getElementById('id_rpfill').value = document.getElementById('id_rp').value;
|
|
document.getElementById('id_rgpfill').value = document.getElementById('id_rgp').value;
|
|
document.getElementById('transaksifill').value = document.getElementById('transaksi').value;
|
|
document.getElementById('tgl_awalfill').value = document.getElementById('tgl_awal').value;
|
|
document.getElementById('tgl_akhirfill').value = document.getElementById('tgl_akhir').value;
|
|
}
|
|
|
|
function bukaRp(id) {
|
|
document.getElementById("id_rp").value = null;
|
|
$('#id_rp').select2().select2('val', null);
|
|
document.getElementById("id_rp").innerHTML = "";
|
|
|
|
document.getElementById("id_rgp").value = null;
|
|
$('#id_rgp').select2().select2('val', null);
|
|
document.getElementById("id_rgp").innerHTML = "";
|
|
|
|
document.getElementById("transaksi").value = null;
|
|
$('#transaksi').select2().select2('val', null);
|
|
|
|
if (id!="") {
|
|
$.ajax({
|
|
type: 'POST',
|
|
data: {
|
|
jenis : id,
|
|
},
|
|
url: '<?= base_url('') ?>index.php/Menu/PJ_Ambil_Sub2_DataRumusGp',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
var listData1 = response.rp;
|
|
var isiMaster1 = document.getElementById('id_rp');
|
|
isiMaster1.innerHTML = isiMaster1.innerHTML + '<option value="" selected>Pilih Rekap Proyek</option>';
|
|
for (var i = 0; i < listData1.length; i++) {
|
|
if (listData1[i]['JENIS_PP']<=2) {
|
|
isiMaster1.innerHTML = isiMaster1.innerHTML + '<option value="' + listData1[i]['ID_RP'] + '">(' + listData1[i]['TANGGAL'] + ') | ' + listData1[i]['NAMA_PANGGILAN_KARYAWAN'] + ' [' + listData1[i]['NAMA_PP'] + ']</option>';
|
|
} else {
|
|
isiMaster1.innerHTML = isiMaster1.innerHTML + '<option value="' + listData1[i]['ID_RP'] + '">(' + listData1[i]['TANGGAL'] + ') | ' + listData1[i]['NAMA_PANGGILAN_KARYAWAN'] + ' [' + listData1[i]['NAMA_PP'] + ' - Grup ' + listData1[i]['GRUP_ID'] + ']</option>';
|
|
}
|
|
}
|
|
|
|
var listData2 = response.rgp;
|
|
var isiMaster2 = document.getElementById('id_rgp');
|
|
isiMaster2.innerHTML = isiMaster2.innerHTML + '<option value="" selected>Pilih Rumus Gp</option>';
|
|
for (var i = 0; i < listData2.length; i++) {
|
|
isiMaster2.innerHTML = isiMaster2.innerHTML + '<option value="' + listData2[i]['ID_RGP'] + '">' + listData2[i]['NAMA_RGP'] + '</option>';
|
|
}
|
|
$('#id_rp').val(null).trigger('change');
|
|
$('#id_rgp').val(null).trigger('change');
|
|
}
|
|
});
|
|
document.getElementById("periodeHid1").style.display = 'block';
|
|
if (id==1) {
|
|
document.getElementById("periodeHid2").style.display = 'none';
|
|
document.getElementById("transaksi").disabled = true;
|
|
} else if (id==2) {
|
|
document.getElementById("periodeHid2").style.display = 'block';
|
|
document.getElementById("transaksi").disabled = false;
|
|
}
|
|
} else {
|
|
document.getElementById("periodeHid1").style.display = 'none';
|
|
document.getElementById("periodeHid2").style.display = 'none';
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|