upgrade mengikuti dalev
This commit is contained in:
@@ -0,0 +1,261 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI MONITORING DAN EVALUASI
|
||||
Module : /apps/js/mon/kinerja.js
|
||||
Desc. : JS - Kelola Realisasi Kinerja OPD
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2011.
|
||||
Last Modified : May 24th, 2026.
|
||||
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var KinerjaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butOPD').click(() => {
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
});
|
||||
$('#butPROG').click(() => {
|
||||
if ($('#ProgID').val()>0) this.show_hide(2);
|
||||
});
|
||||
$('#butKEG').click(() => {
|
||||
if ($('#KegID').val()>0) this.show_hide(3);
|
||||
});
|
||||
$('#butSUB').click(() => {
|
||||
if ($('#SubID').val()>0) this.show_hide(4);
|
||||
});
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').addClass('d-none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divPROG').addClass('d-none'); $('#butPROG').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none'); $('#butKEG').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divSUB').addClass('d-none'); $('#butSUB').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divAKUN').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#ORGID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
$('#Hak_Real').val(1);
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#ProgID').val(0);
|
||||
$('#Nama_PROG').val('');
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 2) {
|
||||
$('#KegID').val(0);
|
||||
$('#Nama_KEG').val('');
|
||||
$('#butPROG').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 3) {
|
||||
$('#SubID').val(0);
|
||||
$('#Nama_SUB').val('');
|
||||
$('#butKEG').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 4) {
|
||||
$('#butSUB').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divOPD').removeClass('d-none'); this.data_query('tabel-opd'); }
|
||||
if (no == 2) { $('#divPROG').removeClass('d-none'); this.data_query('tabel-prog'); }
|
||||
if (no == 3) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
if (no == 4) { $('#divSUB').removeClass('d-none'); this.data_query('tabel-sub'); }
|
||||
if (no == 5) { $('#divAKUN').removeClass('d-none'); this.data_query('tabel-akun'); }
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#ORGID').val(acell[1]);
|
||||
$('#Nama_OPD').val(acell[2]);
|
||||
$('#Hak_Real').val(acell[3]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
prog_select: function(acell){
|
||||
$('#ProgID').val(acell[1]);
|
||||
$('#Nama_PROG').val(acell[2]);
|
||||
this.show_hide(3);
|
||||
},
|
||||
|
||||
prog_real: function(acell){
|
||||
$('#ProgID').val(acell[1]);
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-prog','Hak_Real','ORGID','OPDID','ProgID','DPAProgID='+acell[0]],
|
||||
onSuccess: (txt) => {
|
||||
var tombol = [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}];
|
||||
if ($('#Hak_Real').val()==0) tombol.pop();
|
||||
this.winProg = FoniaJS.showWindow('Prog', 'Detail Capaian Program', txt, 'xl', tombol, () => {
|
||||
$('#winProg').find('#butWSimpan').click(() => this.prog_save());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
prog_save: function(){
|
||||
var _param = ['data=tabel-prog','mode_detail=update','Hak_Real','ORGID','OPDID','ProgID','DPAProgID'];
|
||||
$(':input[id^="Prog_TW_"]').each((i,e) => { _param.push(e.id); });
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: _param,
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winProg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Capaian Program.');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_select: function(acell){
|
||||
$('#KegID').val(acell[1]);
|
||||
$('#Nama_KEG').val(acell[2]);
|
||||
this.show_hide(4);
|
||||
},
|
||||
|
||||
sub_select: function(acell){
|
||||
$('#SubID').val(acell[1]);
|
||||
$('#Nama_SUB').val(acell[2]);
|
||||
this.show_hide(5);
|
||||
},
|
||||
|
||||
sub_ubah: function(acell){
|
||||
$('#SubID').val(acell[1]);
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sub','Hak_Real','ORGID','OPDID','ProgID','KegID','SubID='+acell[1],'DPASubID='+acell[0]],
|
||||
onSuccess: (txt) => {
|
||||
var tombol = [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}];
|
||||
if ($('#Hak_Real').val()==0) tombol.pop();
|
||||
this.winDSub = FoniaJS.showWindow('DSub', 'Kinerja dan Informasi Sub Kegiatan', txt, 'xl', tombol, () => {
|
||||
$('#winDSub').find('#butWSimpan').click(() => this.sub_save());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
sub_save: function(){
|
||||
var _param = ['data=tabel-sub','Hak_Real','ORGID','OPDID','ProgID','KegID','SubID','DPASubID','Real_Catatan','Real_No_Kontrak','Real_Pelaksana','mode_detail=update'];
|
||||
$(':input[id^="Output_TW_"]').each((i,e) => { _param.push(e.id); });
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: _param,
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winDSub);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kinerja Sub Kegiatan.');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
akun_ubah: function(acell){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-akun','Hak_Real','ORGID','OPDID','ProgID','KegID','SubID','DPAAkunID='+acell[0]],
|
||||
onSuccess: (txt) => {
|
||||
var tombol = [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}];
|
||||
if ($('#Hak_Real').val()==0) tombol.pop();
|
||||
this.winDAkun = FoniaJS.showWindow('DAkun', 'Detail Akun', txt, 'xl', tombol, () => {
|
||||
$('#winDAkun')
|
||||
.find('#butWSimpan').click(() => this.akun_save()).end()
|
||||
.find('#RealK_Tot').keyup((e) => {
|
||||
this.oc_RealK();
|
||||
if ((e.keyCode || e.which || 0)==13) FoniaJS.setFocus('#RealF_Tot');
|
||||
}).attr('title', 'Total Realisasi Keuangan S/D Bulan ini !').end()
|
||||
.find('#RealF_Tot').keyup((e) => {
|
||||
this.oc_RealF();
|
||||
if ((e.keyCode || e.which || 0)==13) FoniaJS.setFocus('#RealN_Tot');
|
||||
}).attr('title', 'Total Realisasi Fisik S/D Bulan ini !').end()
|
||||
.find('#RealN_Tot').keyup((e) => {
|
||||
this.oc_RealN();
|
||||
if ((e.keyCode || e.which || 0)==13) $('#winDAkun').find('#butWSimpan').focus();
|
||||
}).attr('title', 'Total Realisasi Non-Fisik S/D Bulan ini !').end()
|
||||
if (parseInt($('#Hak_Real').val())==1) FoniaJS.setFocus('#RealK_Tot');
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
akun_save: function(){
|
||||
var treal = FoniaJS.StrToFloat($('#RealK_Tot').val());
|
||||
var tpagu = parseFloat($('#PAGURP').val());
|
||||
if (treal > tpagu) {
|
||||
FoniaJS.showError('Total Realisasi tidak boleh melebihi Total Pagu !');
|
||||
FoniaJS.setFocus('#RealK_Tot');
|
||||
return;
|
||||
}
|
||||
/*var real_lalu = FoniaJS.StrToFloat($('#RealF_Las').val());
|
||||
var real_psn = FoniaJS.StrToFloat($('#RealF_Tot').val());
|
||||
if (real_psn < real_lalu){
|
||||
FoniaJS.showError('Realisasi Fisik lebih rendah dari Bulan lalu !');
|
||||
FoniaJS.setFocus('#RealF_Tot');
|
||||
return;
|
||||
}*/
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-akun','mode_detail=update','Hak_Real','ORGID','OPDID','ProgID','KegID','SubID','DPAAkunID','AkunID','RealK_Bln','RealF_Bln','RealN_Bln'],
|
||||
onSuccess: (adata) => {
|
||||
FoniaJS.closeWindow(this.winDAkun);
|
||||
FoniaJS.showInfo('Sukses menyimpan Realisasi Akun.');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-opd']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-prog"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-prog','Hak_Real','ORGID','OPDID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','Hak_Real','ORGID','OPDID','ProgID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-sub"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-sub','Hak_Real','ORGID','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-akun"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-akun','Hak_Real','ORGID','OPDID','ProgID','KegID','SubID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_RealK: function(){
|
||||
$('#RealK_Bln').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#RealK_Tot').val()) - FoniaJS.StrToFloat($('#REALRP').val())));
|
||||
},
|
||||
|
||||
oc_RealF: function(){
|
||||
var real_lalu = FoniaJS.StrToFloat($('#RealF_Las').val());
|
||||
var real_psn = FoniaJS.StrToFloat($('#RealF_Tot').val());
|
||||
$('#RealF_Bln').val(FoniaJS.FloatToStr(real_psn, 2));
|
||||
if (real_psn>100 || real_psn<real_lalu){
|
||||
$('#RealF_Bln').css({'color':'#F00','text-decoration':'blink'});
|
||||
} else {
|
||||
$('#RealF_Bln').css({'color':'#666','text-decoration':'blink'});
|
||||
}
|
||||
},
|
||||
|
||||
oc_RealN: function(){
|
||||
var real_lalu = FoniaJS.StrToFloat($('#RealN_Las').val());
|
||||
var real_psn = FoniaJS.StrToFloat($('#RealN_Tot').val());
|
||||
$('#RealN_Bln').val(FoniaJS.FloatToStr(real_psn, 2));
|
||||
if (real_psn>100 || real_psn<real_lalu){
|
||||
$('#RealN_Bln').css({'color':'#F00','text-decoration':'blink'});
|
||||
} else {
|
||||
$('#RealN_Bln').css({'color':'#666','text-decoration':'blink'});
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user