first commit
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/repo/browse.js
|
||||
Desc. : JS - Tampilan Data Pelaporan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : November 26th, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoBrowseJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('tabel-keg');
|
||||
$('#Cari_Keg').keydown(function(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){
|
||||
this.data_query('tabel-keg');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#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));
|
||||
FoniaJS.setFocus('#Cari_Keg');
|
||||
},
|
||||
|
||||
down_excel: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "excel");
|
||||
dload.add_param("Jenis");
|
||||
dload.add_param("DPRDID");
|
||||
dload.add_param("KecID");
|
||||
dload.add_param("KelID");
|
||||
dload.add_param("OPDID");
|
||||
dload.add_param("ProgID");
|
||||
dload.download();
|
||||
},
|
||||
|
||||
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(){
|
||||
$('#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)
|
||||
}).send();
|
||||
},
|
||||
|
||||
filter_reset: function(){
|
||||
$('#Jenis').val(0);
|
||||
$('#DPRDID').val(0);
|
||||
$('#KecID').val(0);
|
||||
$('#KelID').val(0);
|
||||
$('#OPDID').val(0);
|
||||
$('#ProgID').val(0);
|
||||
$('#Cari_Keg').val('');
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-keg');
|
||||
},
|
||||
|
||||
filter_simpan: function(){
|
||||
$('#Jenis').val($('#Fi_Jenis').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());
|
||||
$('#Cari_Keg').val('');
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-keg');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','Cari_Keg','Jenis','DPRDID','KecID','KelID','OPDID','ProgID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_OPD: function(){
|
||||
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']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Kec: function(){
|
||||
if (parseInt($('#Fi_KecID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-kel','Fi_KecID','Fi_KelID']
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user