10-02-2025
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
<i class="icon-rocket"></i>
|
||||
<h3 class="m-b-10">{{ $rusak ?? 0 }}</h3>
|
||||
Barang Rusak/Hilang<br />
|
||||
<a href="#" id="topbtnhapus"><span class="badge badge-primary pull-right"> Add</span></a>
|
||||
<!-- <a href="#" id="topbtnhapus"><span class="badge badge-primary pull-right"> Add</span></a> -->
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
@@ -72,6 +72,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<select id="cekbln" class="form-control">
|
||||
<option value="ALL">ALL</option>
|
||||
<option value="01">Jan</option>
|
||||
<option value="02">Feb</option>
|
||||
<option value="03">Mar</option>
|
||||
@@ -84,7 +85,6 @@
|
||||
<option value="10">Oct</option>
|
||||
<option value="11">Nov</option>
|
||||
<option value="12">Dec</option>
|
||||
<option value="ALL">ALL</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
@@ -279,8 +279,8 @@
|
||||
$("#edit_tanggal").datepicker({format: 'dd-mm-yyyy'});
|
||||
});
|
||||
function openedpage( jQuery ){
|
||||
var set01='ALL';
|
||||
var set02='ALL';
|
||||
var set01=document.getElementById('cekbln').value;
|
||||
var set02=document.getElementById('cekthn').value;
|
||||
var token=document.getElementById('token').value;
|
||||
var source = {
|
||||
datatype: "json",
|
||||
@@ -322,18 +322,21 @@
|
||||
{ text: 'MASUK', datafield: 'pemasukan', width: '10%', cellsalign: 'right', align: 'center' },
|
||||
{ text: 'KELUAR', datafield: 'pengeluaran', width: '10%', cellsalign: 'right', align: 'center' },
|
||||
{ text: 'Keterangan', datafield: 'keterangan', width: '20%', cellsalign: 'right', align: 'center' },
|
||||
{ text: 'Edit', columntype: 'button', width: '10%', cellsrenderer: function () {
|
||||
return "Edit";
|
||||
{ text: 'Edit', columntype: 'button', width: '10%', cellsrenderer: function () { return "Edit";
|
||||
}, buttonclick: function (row) {
|
||||
editrow = row;
|
||||
var offset = $("#gridreportblnini").offset();
|
||||
var dataRecord = $("#gridreportblnini").jqxGrid('getrowdata', editrow);
|
||||
$("#edit_deskripsi").val(dataRecord.deskripsi);
|
||||
$("#edit_id").val(dataRecord.id);
|
||||
$("#edit_pos").val(dataRecord.jenis);
|
||||
$("#edit_total").val(dataRecord.total);
|
||||
$("#edit_tanggal").val(dataRecord.tgllengkap);
|
||||
$("#modaleditor").modal('show');
|
||||
editrow = row;
|
||||
var offset = $("#gridreportblnini").offset();
|
||||
var dataRecord = $("#gridreportblnini").jqxGrid('getrowdata', editrow);
|
||||
var tanggal = dataRecord.tanggal;
|
||||
var bulan = dataRecord.bulan;
|
||||
var tahun = dataRecord.tahun;
|
||||
var tulis = tahun+'-'+bulan+'-'+tanggal;
|
||||
$("#edit_deskripsi").val(dataRecord.deskripsi);
|
||||
$("#edit_id").val(dataRecord.id);
|
||||
$("#edit_pos").val(dataRecord.jenis);
|
||||
$("#edit_total").val(dataRecord.total);
|
||||
$("#edit_tanggal").val(tulis);
|
||||
$("#modaleditor").modal('show');
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -349,6 +352,8 @@ $(document).ready(function() {
|
||||
$("#topbtntambahjenis").click(function(){ $("#modaltambahjenisbrg").modal('show'); $("#jenis_idne").val('new'); });
|
||||
$("#topbtnpemasukan").click(function(){ $("#modalpemasukan").modal('show'); });
|
||||
$("#topbtnpengeluaran").click(function(){ $("#modalpengeluaran").modal('show'); });
|
||||
$("#topbtnhapus").click(function(){ $("#modaleditor").modal('show'); $("#edit_id").val('delete'); });
|
||||
|
||||
$("#btnsimpanjenis").click(function(){
|
||||
var val01=document.getElementById('jenis_idne').value;
|
||||
var val02=document.getElementById('jenis_deskripsi').value;
|
||||
@@ -358,12 +363,10 @@ $(document).ready(function() {
|
||||
var val06='';
|
||||
var val07='';
|
||||
var val08='';
|
||||
$("#modaltambahjenisbrg").modal('hide');
|
||||
$.post('simbhp/exaddbarang', { _token: token, set01: val01, set02: val02, set03: val03, set04: val04, set05: val05, set06: val06, set07: val07, set08: val08 },
|
||||
function(data){
|
||||
$("#gridjenis").jqxGrid('updatebounddata');
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
$("#modaltambahjenisbrg").modal('hide');
|
||||
var status = data.status;
|
||||
var status = data.status;
|
||||
var message = data.message;
|
||||
$.toast({
|
||||
heading: status,
|
||||
@@ -374,8 +377,8 @@ $(document).ready(function() {
|
||||
hideAfter: 3000,
|
||||
stack: 1
|
||||
});
|
||||
window.setTimeout('window.location=window.location', 3000);
|
||||
|
||||
var uri = window.location.href.split("#")[0];
|
||||
setTimeout(function () { window.location=uri;}, 2000);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -402,9 +405,11 @@ $(document).ready(function() {
|
||||
hideAfter: 5000,
|
||||
stack: 1
|
||||
});
|
||||
$("#gridreportblnini").jqxGrid('updatebounddata');
|
||||
openedpage();
|
||||
$("#gridjenis").jqxGrid('updatebounddata', 'filter');
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
$("#gridjenis").on('bindingcomplete', function (event) {
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -431,9 +436,11 @@ $(document).ready(function() {
|
||||
hideAfter: 5000,
|
||||
stack: 1
|
||||
});
|
||||
$("#gridreportblnini").jqxGrid('updatebounddata');
|
||||
openedpage();
|
||||
$("#gridjenis").jqxGrid('updatebounddata', 'filter');
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
$("#gridjenis").on('bindingcomplete', function (event) {
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -460,9 +467,11 @@ $(document).ready(function() {
|
||||
hideAfter: 5000,
|
||||
stack: 1
|
||||
});
|
||||
$("#gridreportblnini").jqxGrid('updatebounddata');
|
||||
openedpage();
|
||||
$("#gridjenis").jqxGrid('updatebounddata', 'filter');
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
$("#gridjenis").on('bindingcomplete', function (event) {
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -489,104 +498,16 @@ $(document).ready(function() {
|
||||
hideAfter: 5000,
|
||||
stack: 1
|
||||
});
|
||||
$("#gridreportblnini").jqxGrid('updatebounddata');
|
||||
openedpage();
|
||||
$("#gridjenis").jqxGrid('updatebounddata', 'filter');
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
$("#gridjenis").on('bindingcomplete', function (event) {
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
$("#btnviewdata").click(function(){
|
||||
var val01=document.getElementById('cekbln').value;
|
||||
var val02=document.getElementById('cekthn').value;
|
||||
var token=document.getElementById('token').value;
|
||||
var source = {
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'id',type: 'text'},
|
||||
{ name: 'tanggal',type: 'text'},
|
||||
{ name: 'bulan',type: 'text'},
|
||||
{ name: 'tahun',type: 'text'},
|
||||
{ name: 'deskripsi',type: 'text'},
|
||||
{ name: 'pemasukan',type: 'text'},
|
||||
{ name: 'pengeluaran',type: 'text'},
|
||||
{ name: 'jenis',type: 'text'},
|
||||
{ name: 'keterangan',type: 'text'},
|
||||
{ name: 'tgllengkap',type: 'text'},
|
||||
{ name: 'total',type: 'text'},
|
||||
],
|
||||
type: 'POST',
|
||||
data: {val01: set01, val02: set02, _token: token},
|
||||
url: 'simbhp/reportbhp',
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
$("#gridreportblnini").jqxGrid({
|
||||
width: '100%',
|
||||
showfilterrow: true,
|
||||
filterable: true,
|
||||
columnsresize: true,
|
||||
autoshowfiltericon: true,
|
||||
pageable: true,
|
||||
autoheight: true,
|
||||
theme: "energyblue",
|
||||
source: dataAdapter,
|
||||
selectionmode: 'multiplecellsextended',
|
||||
columns: [
|
||||
{ text: 'dd', columngroup: 'tglinput', filtertype: 'checkedlist', datafield: 'tanggal', width: 30, cellsalign: 'center', align: 'center' },
|
||||
{ text: 'mm', columngroup: 'tglinput', filtertype: 'checkedlist', datafield: 'bulan', width: 30, cellsalign: 'center', align: 'center' },
|
||||
{ text: 'yy', columngroup: 'tglinput', filtertype: 'checkedlist', datafield: 'tahun', width: 50, cellsalign: 'center', align: 'center' },
|
||||
{ text: 'Jenis', datafield: 'jenis', filtertype: 'checkedlist', width: 80, cellsalign: 'center', align: 'center' },
|
||||
{ text: 'Deskripsi', datafield: 'deskripsi', width: 180, cellsalign: 'left', align: 'center' },
|
||||
{ text: 'DEBET', datafield: 'pemasukan', width: 80, cellsalign: 'right', align: 'center' },
|
||||
{ text: 'KREDIT', datafield: 'pengeluaran', width: 80, cellsalign: 'right', align: 'center' },
|
||||
{ text: 'Keterangan', datafield: 'keterangan', width: 70, cellsalign: 'right', align: 'center' },
|
||||
{ text: 'Edit', columntype: 'button', width: 50, cellsrenderer: function () {
|
||||
return "Edit";
|
||||
}, buttonclick: function (row) {
|
||||
editrow = row;
|
||||
var offset = $("#gridreportblnini").offset();
|
||||
var dataRecord = $("#gridreportblnini").jqxGrid('getrowdata', editrow);
|
||||
$("#edit_deskripsi").val(dataRecord.deskripsi);
|
||||
$("#edit_id").val(dataRecord.id);
|
||||
$("#edit_pos").val(dataRecord.jenis);
|
||||
$("#edit_total").val(dataRecord.total);
|
||||
$("#edit_tanggal").val(dataRecord.tgllengkap);
|
||||
$("#modaleditor").modal('show');
|
||||
}
|
||||
},
|
||||
{ text: 'Kwitansi', columntype: 'button', width: 50, align: 'center', cellsrenderer: function () {
|
||||
return "Cetak";
|
||||
}, buttonclick: function (row) {
|
||||
editrow = row;
|
||||
var offset = $("#gridreportblnini").offset();
|
||||
var dataRecord = $("#gridreportblnini").jqxGrid('getrowdata', editrow);
|
||||
var goook = dataRecord.id;
|
||||
var staff = '';
|
||||
var token = document.getElementById('token').value;
|
||||
$.post('simbhp/kwitansi', { valkirim: goook, jeneng: staff, _token: token },
|
||||
function(data){
|
||||
var newWindow = window.open('', '', 'width=760, height=350'),
|
||||
document = newWindow.document.open(),
|
||||
pageContent =
|
||||
'<!DOCTYPE html>\n' +
|
||||
'<html>\n' +
|
||||
'<head>\n' +
|
||||
'<meta charset="utf-8" />\n' +
|
||||
'<title>Kwitansi </title>\n' +
|
||||
'</head>\n' +
|
||||
'<body>' + data + '</body>\n</html>';
|
||||
document.write(pageContent);
|
||||
document.close();
|
||||
newWindow.print();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
},
|
||||
],
|
||||
columngroups:
|
||||
[
|
||||
{ text: 'Tanggal', align: 'center', name: 'tglinput' },
|
||||
]
|
||||
});
|
||||
openedpage();
|
||||
});
|
||||
$("#in_total").autoNumeric( 'init', {aSep: ',', mDec: '0', vMax: '99999999999999999999999999'} );
|
||||
$("#out_total").autoNumeric( 'init', {aSep: ',', mDec: '0', vMax: '99999999999999999999999999'} );
|
||||
@@ -604,22 +525,22 @@ $(document).ready(function() {
|
||||
};
|
||||
var datasaldo = new $.jqx.dataAdapter(sourcerekap);
|
||||
$("#gridjenis").jqxGrid({
|
||||
width: '100%',
|
||||
columnsresize: true,
|
||||
pageable: false,
|
||||
sortable: true,
|
||||
autoheight: true,
|
||||
theme: "energyblue",
|
||||
source: datasaldo,
|
||||
ready: function () {
|
||||
$("#gridsaldotiappos").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
},
|
||||
columns: [
|
||||
width : '100%',
|
||||
columnsresize : true,
|
||||
pageable : false,
|
||||
sortable : true,
|
||||
autoheight : true,
|
||||
theme : "energyblue",
|
||||
source : datasaldo,
|
||||
columns : [
|
||||
{ text: 'Jenis', datafield: 'tlsjenis', width: '45%', cellsalign: 'left', align: 'center' },
|
||||
{ text: 'Satuan', datafield: 'satuan', width: '20%', cellsalign: 'center', align: 'center' },
|
||||
{ text: 'Sisa', datafield: 'saldo', width: '35%', cellsalign: 'right', align: 'center' },
|
||||
],
|
||||
});
|
||||
$("#gridjenis").on('bindingcomplete', function (event) {
|
||||
$("#gridjenis").jqxGrid('sortby', 'tlsjenis', 'asc');
|
||||
});
|
||||
$('#export').click(function(){
|
||||
var gridContent = $("#gridreportblnini").jqxGrid('exportdata', 'json');
|
||||
data = $.parseJSON(gridContent);
|
||||
|
||||
@@ -416,12 +416,12 @@
|
||||
data: { val01:'allany', _token: token },
|
||||
url : '{{ route("getriwayat") }}',
|
||||
};
|
||||
var jsonBakteri = new $.jqx.dataAdapter(sourcebakteri);
|
||||
var jsonParameter = new $.jqx.dataAdapter(sourceallany);
|
||||
$("#gridparameterlain").jqxGrid({
|
||||
width : '100%',
|
||||
showfilterrow : true,
|
||||
filterable : true,
|
||||
source : jsonBakteri,
|
||||
source : jsonParameter,
|
||||
columnsresize : true,
|
||||
theme : "energyblue",
|
||||
autoheight : true,
|
||||
|
||||
Reference in New Issue
Block a user