Files
shopee-apps/application/views/proses/PR_Sub2_Proyek_2.php
T
2026-06-13 16:02:07 +10:00

345 lines
13 KiB
PHP

<!doctype html>
<html class="fixed sidebar-left-collapsed">
<head>
<!-- Basic -->
<meta charset="UTF-8">
<title>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;
}
.f18 {
font-size: 18px;
}
</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">
<header class="page-header">
<h2><b>Data Pembukuan Proyek | <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-warning">
<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>&nbsp&nbsp
<a href="<?php echo base_url('') ?>index.php/Menu/PR_Sub2_Laporan_1" class="text-dark"><b>Kembali </b><i class="fa fa-backward"></i></a>
</div>
<h2 class="panel-title"><b style="color:Coral">PROYEK</b></h2>
</header>
<div class="panel-body">
<?php if ($hak>0) { ?>
<?= form_open('Menu/PR_Excel_Sub2_DataPembukuanProyek', array('method' => 'post'), array('id' => 'formproyek')); ?>
<div class="form-group">
<h4><div class="col-md-2"><b style="color:SlateBlue">Pelanggan</b></div></h4>
<div class="col-md-6">
<div class="form-group">
<select data-plugin-selectTwo multiple="multiple" id="id_pelanggan" onfocus="this.selectedIndex = -1;" data-plugin-options='{ "minimumInputLength": 3 }' class="form-control populate" placeholder="Pilih Pelanggan/Beberapa" required>
<?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>
</div>
</div>
<div class="col-md-4">
<input type="checkbox" id="cbPelanggan" onclick="pilihSemuaPelanggan()"> <b style="color:Red">Semua Pelanggan</b>
</div>
</div>
<div class="form-group">
<h4><div class="col-md-2"><b style="color:SlateBlue">Sales</b></div></h4>
<div class="col-md-6">
<div class="form-group">
<select data-plugin-selectTwo multiple="multiple" id="id_sales" onfocus="this.selectedIndex = -1;" class="form-control populate" placeholder="Pilih Sales/Beberapa" required>
<?php if (is_array($sales) || is_object($sales)) {
foreach ($sales as $key) { ?>
<option value="<?= $key['ID_KARYAWAN'] ?>" ><?= $key['NAMA_PANGGILAN_KARYAWAN'] ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-md-4">
<input type="checkbox" id="cbSales" onclick="pilihSemuaSales()"> <b style="color:Red">Semua Sales</b>
</div>
</div>
<div class="form-group">
<h4><div class="col-md-2"><b style="color:SlateBlue">Jenis</b></div></h4>
<div class="col-md-6">
<div class="form-group">
<select data-plugin-selectTwo id="jenis" class="form-control populate" required>
<option value="1" selected>Campur</option>
<option id="selectPel12" value="2">Pisah Pelanggan</option>
<option value="3">Pisah Sales</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<h4><div class="col-md-2"><b style="color:SlateBlue">Kondisi</b></div></h4>
<div class="col-md-6">
<div class="form-group">
<select data-plugin-selectTwo id="kondisi" class="form-control populate">
<option value="" selected>Semua Kondisi</option>
<option value="0">Berjalan</option>
<option value="1">Selesai</option>
<option value="9">Batal</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<h4><div class="col-md-2"><b style="color:SlateBlue">Periode</b></div></h4>
<div class="col-md-4">
<div class="input-daterange input-group">
<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>
<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_pelangganfill" name="id_pelangganfill">
<input type="hidden" class="form-control" id="id_salesfill" name="id_salesfill">
<input type="hidden" class="form-control" id="jenis_fill" name="jenis_fill">
<input type="hidden" class="form-control" id="kondisi_fill" name="kondisi_fill">
<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>
<element id="progressRotate" hidden="hidden"><h4><div class="col-md-3"><b style="color:Red"><i class="fa fa-refresh fa-spin"></i> <i>Memuat Data<span id="wait">.</span></i></b></div><h4></element>
<?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/OPERATOR</b><br><b> Bisa melihat semua Data terkait</b><br>
<br><b style="color:DarkGreen">TERBATAS</b><br><b> Hanya bisa melihat Data milik Sendiri</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>
var dots = window.setInterval( function() {
var wait = document.getElementById("wait");
if (wait.innerHTML.length > 3)
wait.innerHTML = "";
else
wait.innerHTML += ".";
}, 500);
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 pilihSemuaPelanggan() {
PNotify.removeAll();
var cb = document.getElementById("cbPelanggan").checked;
if (cb==true) {
document.getElementById("selectPel12").disabled = true;
document.getElementById("id_pelanggan").disabled = true;
document.getElementById("id_pelanggan").value = "";
document.getElementById("jenis").value = 1;
$('#id_pelanggan').select2().select2('val', "");
$('#jenis').select2().select2('val', 1);
document.getElementById("cbPelanggan").checked = true;
} else {
document.getElementById("selectPel12").disabled = false;
document.getElementById("id_pelanggan").disabled = false;
document.getElementById("cbPelanggan").checked = false;
}
}
function pilihSemuaSales() {
PNotify.removeAll();
var cb = document.getElementById("cbSales").checked;
if (cb==true) {
document.getElementById("id_sales").disabled = true;
document.getElementById("id_sales").value = "";
$('#id_sales').select2().select2('val', "");
document.getElementById("cbSales").checked = true;
} else {
document.getElementById("id_sales").disabled = false;
document.getElementById("cbSales").checked = false;
}
}
function reloadData() {
location.reload();
}
function isiData() {
var id_pelanggan = document.getElementById('id_pelanggan');
var id_sales = document.getElementById('id_sales');
var selPelanggan = [];
var selSales = [];
for (const option of id_pelanggan.options) {
if (option.selected) {
selPelanggan.push(option.value);
}
}
for (const option of id_sales.options) {
if (option.selected) {
selSales.push(option.value);
}
}
document.getElementById('id_pelangganfill').value = selPelanggan;
document.getElementById('id_salesfill').value = selSales;
document.getElementById('jenis_fill').value = document.getElementById('jenis').value;
document.getElementById('kondisi_fill').value = document.getElementById('kondisi').value;
document.getElementById('tgl_awalfill').value = document.getElementById('tgl_awal').value;
document.getElementById('tgl_akhirfill').value = document.getElementById('tgl_akhir').value;
}
</script>
</body>
</html>