input perubahan pokir, asmas dan renja; fixed data pelaporan, tambah filter dan generate excel
This commit is contained in:
+48
-41
@@ -5,9 +5,9 @@
|
||||
Desc. : JS - Tampilan Data Pelaporan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : November 26th, 2025.
|
||||
Last Modified : May 4th, 2026.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -17,57 +17,77 @@ var RepoBrowseJS = {
|
||||
|
||||
loading: function(){
|
||||
this.data_query('tabel-keg');
|
||||
$('#Cari_Keg').keydown(function(e){
|
||||
$('#Cari_Keg').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('tabel-keg');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
});
|
||||
$('#butSearch').click((e) => {
|
||||
this.data_query('tabel-keg');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
});
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Keg').val('');
|
||||
this.data_query('tabel-keg');
|
||||
}.bind(this));
|
||||
$('#butFilter').click(function(){this.filter_show();}.bind(this));
|
||||
$('#butExcel').click(function(){this.down_excel();}.bind(this));
|
||||
});
|
||||
$('#butFilter').click(() => this.filter_show());
|
||||
$('#butExcel').click(() => this.excel_show());
|
||||
FoniaJS.setFocus('#Cari_Keg');
|
||||
},
|
||||
|
||||
down_excel: function(){
|
||||
excel_show: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail_excel'],
|
||||
onSuccess: (ajson) => {
|
||||
this.winExcel = FoniaJS.showWindow('XData', 'Pilihan Export Data', ajson.html, 'md', [{},{i:'butTutup'},{i:'butWDown',v:'Download',c:'success'}], () => {
|
||||
$('#winXData').find('#butWDown').click(() => this.excel_download());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
excel_download: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "excel");
|
||||
dload.add_param("Jenis");
|
||||
dload.add_param("Bulan");
|
||||
dload.add_param("Tanda_Pagu");
|
||||
dload.add_param("Nilai_Pagu");
|
||||
dload.add_param("DPRDID");
|
||||
dload.add_param("KecID");
|
||||
dload.add_param("KelID");
|
||||
dload.add_param("OPDID");
|
||||
dload.add_param("ProgID");
|
||||
dload.add_param("SubID");
|
||||
dload.add_param("Ex_Sumber");
|
||||
dload.add_param("Ex_Hidden");
|
||||
dload.add_param("Ex_Pending");
|
||||
dload.download();
|
||||
FoniaJS.closeWindow(this.winExcel);
|
||||
},
|
||||
|
||||
filter_show: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail_filter','Jenis','DPRDID','KecID','KelID','OPDID','ProgID'],
|
||||
onSuccess: function(ajson){
|
||||
this.winFilter = FoniaJS.showWindow('FData', 'Filter Tampilan Data Pelaporan', ajson.html, 600, [{i:'butWReset',v:'Reset Semua',c:'secondary'},{},{i:'butTutup'},{i:'butWSimpan',v:'Terapkan Filter',c:'success'}], function(){
|
||||
sendParam: ['data=detail_filter','Jenis','Bulan','Tanda_Pagu','Nilai_Pagu','DPRDID','KecID','KelID','OPDID','SubID'],
|
||||
onSuccess: (ajson) => {
|
||||
this.winFilter = FoniaJS.showWindow('FData', 'Filter Tampilan Data Pelaporan', ajson.html, 'xl', [{i:'butWReset',v:'Reset Semua',c:'secondary'},{},{i:'butTutup'},{i:'butWSimpan',v:'Terapkan Filter',c:'success'}], () => {
|
||||
$('#winFData')
|
||||
.find('#butWReset').click(function(){this.filter_reset();}.bind(this)).end()
|
||||
.find('#butWSimpan').click(function(){this.filter_simpan();}.bind(this));
|
||||
this.oc_OPD();
|
||||
this.oc_Kec();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
.find('#butWReset').click(() => this.filter_reset()).end()
|
||||
.find('#butWSimpan').click(() => this.filter_simpan());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
filter_reset: function(){
|
||||
$('#Jenis').val(0);
|
||||
$('#Bulan').val(new Date().getMonth() + 1);
|
||||
$('#Tanda_Pagu').val('A');
|
||||
$('#Nilai_Pagu').val(0);
|
||||
$('#DPRDID').val(0);
|
||||
$('#KecID').val(0);
|
||||
$('#KelID').val(0);
|
||||
$('#OPDID').val(0);
|
||||
$('#ProgID').val(0);
|
||||
$('#SubID').val(0);
|
||||
$('#Cari_Keg').val('');
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-keg');
|
||||
@@ -75,11 +95,14 @@ var RepoBrowseJS = {
|
||||
|
||||
filter_simpan: function(){
|
||||
$('#Jenis').val($('#Fi_Jenis').val());
|
||||
$('#Bulan').val($('#Fi_Bulan').val());
|
||||
$('#Tanda_Pagu').val($('#Fi_Tanda_Pagu').val());
|
||||
$('#Nilai_Pagu').val(FoniaJS.StrToFloat($('#Fi_Nilai_Pagu').val()));
|
||||
$('#DPRDID').val($('#Fi_DPRDID').val());
|
||||
$('#KecID').val($('#Fi_KecID').val());
|
||||
$('#KelID').val($('#Fi_KelID').val());
|
||||
$('#OPDID').val($('#Fi_OPDID').val());
|
||||
$('#ProgID').val($('#Fi_ProgID').val());
|
||||
$('#SubID').val($('#Fi_SubID').val());
|
||||
$('#Cari_Keg').val('');
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-keg');
|
||||
@@ -89,7 +112,7 @@ var RepoBrowseJS = {
|
||||
if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','Cari_Keg','Jenis','DPRDID','KecID','KelID','OPDID','ProgID']
|
||||
sendParam: ['data=tabel-keg','Cari_Keg','Jenis','Bulan','Tanda_Pagu','Nilai_Pagu','DPRDID','KecID','KelID','OPDID','SubID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
@@ -98,23 +121,7 @@ var RepoBrowseJS = {
|
||||
if (parseInt($('#Fi_OPDID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-prog','Fi_OPDID','Fi_ProgID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#Fi_ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','Fi_OPDID','Fi_ProgID','Fi_KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#Fi_KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','Fi_OPDID','Fi_ProgID','Fi_KegID','Fi_SubID']
|
||||
sendParam: ['data=option-sub','Fi_OPDID','Fi_SubID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user