copy dari repo om Irfan

This commit is contained in:
2026-06-13 16:02:07 +10:00
commit db327c0305
5376 changed files with 2770667 additions and 0 deletions
@@ -0,0 +1,402 @@
<!doctype html>
<html class="fixed sidebar-left-collapsed">
<head>
<!-- Basic -->
<meta charset="UTF-8">
<title>PROSES | PERSEDIAAN</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" />
<!-- 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>
<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><strong>(Step 3)</strong> | Output SN</h2>
<div class="right-wrapper pull-right">
<ol class="breadcrumbs">
<li>
<a href="<?php echo base_url() ?>index.php/MenuPersediaan">
<i class="fa fa-exchange"></i>
</a>
</li>
<li><span>Serial Number</span></li>
</ol>
<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
</div>
</header>
<!-- start: page -->
<div class="row">
<?php if (is_array($persediaan) || is_object($persediaan)) {
foreach ($persediaan as $key) { ?>
<div class="col-md-8">
<section class="panel panel-featured panel-featured-secondary">
<header class="panel-heading">
<div class="panel-actions">
<a href="javascript:window.history.go(-1);"><strong>Kembali</strong><i class="fa fa-backward"></i></a>
</div>
<h2 class="panel-title"><strong>DATA [<?= $key['KODE_BARANG'] ?> : (<?= $key['NAMA_BARANG'] ?>)]</strong></h2>
</header>
<div class="panel-body">
<div class="form-group">
<div class="col-md-12 table-responsive">
<table class="table table-bordered table-striped mb-none dataTable" id="tsn" role="grid" aria-describedby="datatable-editable_info">
<thead>
<tr>
<th class="dark center">No</th>
<th class="dark center">Serial Number</th>
</tr>
</thead>
<tbody id="isitabel">
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
<?php }
} ?>
<div class="col-md-4">
<section class="panel panel-featured panel-featured-primary">
<header class="panel-heading">
<div class="panel-actions">
</div>
<h2 class="panel-title"><strong>READY STOCK</strong></h2>
</header>
<div class="panel-body">
<div class="form-group">
<div class="col-md-12 table-responsive">
<table class="table table-bordered table-striped mb-none">
<thead>
<tr>
<th class="primary center">No</th>
<th class="primary center">Serial Number</th>
</tr>
</thead>
<tbody>
<?php
if (is_array($snstock) || is_object($snstock)) {
$no = 1;
foreach ($snstock as $key) { ?>
<tr>
<td class="center"><?= $no; ?></td>
<td><?= $key['NAMA_SNSTOCK']; ?></td>
</tr>
<?php $no++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
<!-- end: page -->
</section>
</div>
</section>
<!-- Vendor -->
<script src="<?php echo base_url('') ?>assets/vendor/jquery/jquery.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/bootstrap/js/bootstrap.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/nanoscroller/nanoscroller.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/magnific-popup/magnific-popup.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
<!-- Specific Page Vendor -->
<script src="<?php echo base_url('') ?>assets/vendor/select2/select2.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/jquery-datatables/media/js/jquery.dataTables.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/jquery-datatables-bs3/assets/js/datatables.js"></script>
<!-- Specific Page Vendor -->
<script src="<?php echo base_url('') ?>assets/vendor/pnotify/pnotify.custom.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/jquery-autosize/jquery.autosize.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="<?php echo base_url('') ?>assets/javascripts/theme.js"></script>
<!-- Theme Custom -->
<script src="<?php echo base_url('') ?>assets/javascripts/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="<?php echo base_url('') ?>assets/javascripts/theme.init.js"></script>
<!-- Examples -->
<!-- Examples -->
<script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.default.js"></script>
<script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
<script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.tabletools.js"></script>
<script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.editable.js"></script>
<script src="<?php echo base_url('') ?>assets/javascripts/ui-elements/examples.notifications.js"></script>
<script src="<?php echo base_url('') ?>assets/vendor/jquery-validation/jquery.validate.js"></script>
<script src="<?php echo base_url('') ?>assets/javascripts/forms/examples.validation.js"></script>
<script src="<?php echo base_url('') ?>assets/javascripts/ui-elements/examples.modals.js"></script>
<!-- notif -->
<script>
$(document).ready(function() {
var NOBARIS = '';
var IDDETAIL = '<?= $id_barang ?>';
var JUMLAH = '';
LoadData();
$(document).on('click', '#hapusbaris', function(e) {
e.preventDefault();
var d = namabarang.value;
alert(d);
var no = 1;
$(this).parent().parent().remove();
$('#tsn tbody tr').each(function() {
$(this).find('td:nth-child(1)').html(no);
no++;
});
})
otm();
});
function resetbaris(id) {
document.getElementById("idsn" + id).value = document.getElementById("idsn" + id).defaultValue;
document.getElementById("sn" + id).value = document.getElementById("sn" + id).defaultValue;
}
function LoadData() {
$.ajax({
type: 'POST',
data: 'id=' + <?= $id_barang ?>,
url: '<?= base_url('') ?>index.php/ManagePersediaan/viewSn_Sewa_Input_Aktif',
dataType: 'json',
success: function(response) {
var baris = '';
var total = <?= $qty ?>;
JUMLAH = response.total;
for (var i = 1; i <= total; i++) {
if (i <= response.data.length) {
var sn = response.data[i - 1]['NAMA_SNSW'];
var id = response.data[i - 1]['ID_SNSW'];
baris += '<tr>';
baris += '<td class="center " style="vertical-align: middle;" ><b>' + i + '</b></td>';
baris += '<td class="center" style="vertical-align: middle;">';
baris += '<input class="form-control input-sm " name="idsn' + i + '" id="idsn' + i + '" type="hidden" value="' + id + '" placeholder="-" >';
baris += '<input class="form-control input-sm " name="namasn' + i + '" id="sn' + i + '" type="text" value="' + sn + '" placeholder="-" >';
baris += '</td>';
baris += '</tr>';
} else {
baris += '<tr>';
baris += '<td class="center " style="vertical-align: middle;" ><b>' + i + '</b></td>';
baris += '<td class="center" style="vertical-align: middle;">';
baris += '<input class="form-control input-sm " name="idsn' + i + '" id="idsn' + i + '" type="hidden" placeholder="-" >';
baris += '<input class="form-control input-sm " name="namasn' + i + '" id="sn' + i + '" type="text" placeholder="-" >';
baris += '</td>';
baris += '</tr>';
}
}
$('#isitabel').html(baris);
// console.log(response);
// alert(response.data.length)
}
});
}
function otm() {
setInterval(function() {
$.ajax({
url: "<?= base_url() ?>index.php/ManagePersediaan/viewSn_Sewa_Input_Limit",
type: "POST",
dataType: "json",
data: 'id=' + <?= $id_barang ?>,
success: function(response) {
if (response.jumlah_data != JUMLAH) {
LoadData();
}
}
});
}, 1000);
}
nama_sn_e.addEventListener("keyup", function(event) {
var dat = nama_sn_e.value;
if (event.keyCode === 13) {
var pnj = nama_sn_e.value.length;
if (dat == "") {
new PNotify({
title: 'Pemberitahuan',
text: 'Tidak boleh Kosong',
type: 'error',
shadow: true
});
$('[name="nama_sn_e"]').closest('.form-group').addClass('has-error');
} else if (pnj > 50) {
new PNotify({
title: 'Pemberitahuan',
text: 'Karakter melebihi batas',
type: 'error',
shadow: true
});
$('[name="nama_sn_e"]').closest('.form-group').addClass('has-error');
} else {
var is = '';
$.ajax({
type: "POST",
data: 'id_snsw=' + is + '&nama_snsw=' + dat + '&id_barang=<?= $id_barang ?>',
url: '<?= base_url() ?>index.php/ManagePersediaan/simpansewa_GA3_Input',
dataType: 'json',
success: function(response) {
if (response.value == 1) {
LoadData();
new PNotify({
title: 'Pemberitahuan',
text: 'SN berhasil menyimpan.',
type: 'success',
shadow: true
});
} else if (response.value == 2){
location.reload();
} else if (response.value == 3){
new PNotify({
title: 'Pemberitahuan',
text: 'SN Sama, silahkan check kembali.',
type: 'error',
shadow: true
});
} else {
new PNotify({
title: 'Pemberitahuan',
text: 'SN gagal menyimpan.',
type: 'error',
shadow: true
});
}
$("#nama_sn_e").val("");
}
});
}
}
});
nama_sn_e.oninput = function() {
$('[name="nama_sn_e"]').closest('.form-group').removeClass('has-error').addClass('');
}
$(document).ready(function() {
<?php if ($this->session->flashdata('success')) { ?>
new PNotify({
title: 'Notifikasi',
text: 'Data berhasil <?= $this->session->flashdata('success'); ?>.',
type: 'success',
shadow: true
});
<?php } ?>
<?php if ($this->session->flashdata('failed')) { ?>
new PNotify({
title: 'Notifikasi',
text: 'Data gagal <?= $this->session->flashdata('failed'); ?>, hubungi Administrator',
type: 'error',
shadow: true
});
<?php } ?>
<?php if ($this->session->flashdata('over_qty')) { ?>
new PNotify({
title: 'Notifikasi',
text: 'Data melebihi jumlah stock, hubungi Team Gudang.',
type: 'error',
shadow: true
});
<?php } ?>
<?php if ($this->session->flashdata('quota_full')) { ?>
new PNotify({
title: 'Notifikasi',
text: 'Kuantiti terpenuhi, Masuk Mode Kunci.',
type: 'warning',
shadow: true
});
<?php } ?>
<?php if ($this->session->flashdata('quota_free')) { ?>
new PNotify({
title: 'Notifikasi',
text: 'Data bisa Input kembali.',
type: 'warning',
shadow: true
});
<?php } ?>
});
</script>
</body>
</html>