input perubahan pokir, asmas dan renja; fixed data pelaporan, tambah filter dan generate excel
This commit is contained in:
@@ -63,7 +63,7 @@ var IndukAsmasJS = {
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'KecID','KelID','SapiID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Aspirasi Masyarakat', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Aspirasi Masyarakat :: Induk', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formAsmas').validate({
|
||||
rules: {
|
||||
|
||||
@@ -50,7 +50,7 @@ var IndukPokirJS = {
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'DPRDID','DapilID','SapiID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Pokir', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Pokir :: Induk', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formPokir').validate({
|
||||
rules: {
|
||||
|
||||
@@ -50,7 +50,7 @@ var IndukRenjaJS = {
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'OPDID','AK_Bidu','SapiID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Renja', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Renja :: Induk', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formRenja').validate({
|
||||
rules: {
|
||||
|
||||
+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();
|
||||
},
|
||||
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/ubah/asmas.js
|
||||
Desc. : JS - Perubahan Kegiatan Aspirasi Masyarakat
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : May 3rd, 2026.
|
||||
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var UbahAsmasJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butKEC').click(() => {
|
||||
if ($('#KecID').val()>0) this.show_hide(1);
|
||||
});
|
||||
$('#butKEL').click(() => {
|
||||
if ($('#KelID').val()>0) this.show_hide(2);
|
||||
});
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divKEC').addClass('d-none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').addClass('d-none'); $('#butKEL').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#KecID').val(0);
|
||||
$('#Nama_KEC').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#KelID').val(0);
|
||||
$('#Nama_KEL').val('');
|
||||
$('#butKEC').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 2) {
|
||||
$('#butKEL').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divKEC').removeClass('d-none'); this.data_query('tabel-kec'); }
|
||||
if (no == 2) { $('#divKEL').removeClass('d-none'); this.data_query('tabel-kel'); }
|
||||
if (no == 3) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
kec_select: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#Nama_KEC').val(acell[2]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kel_select: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
$('#Nama_KEL').val(acell[2]);
|
||||
this.show_hide(3);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID, Tahap){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'KecID','KelID','SapiID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
const _btn = [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}];
|
||||
if (Tahap == 1) _btn.pop();
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Aspirasi Masyarakat :: '+(Tahap==1?'Induk':'Perubahan'), ajson.html, 'xl', _btn, () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formAsmas').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
OPDID: {required:true, min:1},
|
||||
ProgID: {required:true, min:1},
|
||||
KegID: {required:true, min:1},
|
||||
SubID: {required:true, min:1},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Rupiah: {required:true, double_id:true},
|
||||
Hidden: {required:true},
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_tambah: function(){
|
||||
this.keg_detail('insert', 0, 2);
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0], acell[1]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formAsmas').submit();
|
||||
if (true !== $('#formAsmas').validate().checkForm()) return false;
|
||||
const _param = ['data=tabel-keg','mode_detail','SapiID','OPDID','ProgID','KegID','SubID','KecID','KelID','Lokasi','Masalah','Hidden','Rupiah'];
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => { _param.push(e.id); });
|
||||
$(':input[id^="Pending_"]').each((i,e) => { _param.push(e.id); });
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: _param,
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Aspirasi Masyarakat.');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-kec"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kec']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kel','KecID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','KecID','KelID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_OPD: function(){
|
||||
if (parseInt($('#OPDID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-prog','OPDID','ProgID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','OPDID','ProgID','KegID','SubID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
copy_Pagu: function(){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan salin Pagu Awal / Default<br>ke Semua Pagu Bulanan ?', () => {
|
||||
const _pagu = $('#Rupiah').val();
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => $(e).val(_pagu));
|
||||
}, 'warning');
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,154 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/ubah/pokir.js
|
||||
Desc. : JS - Perubahan Kegiatan Pokir
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : May 3rd, 2026.
|
||||
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var UbahPokirJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butDPRD').click(() => {
|
||||
if ($('#DPRDID').val()>0) this.show_hide(1);
|
||||
});
|
||||
$('#Nama_DPRD').keydown((e) => {
|
||||
if (13==e.which && false==$(e.target).prop('readonly')) this.data_query('tabel-dprd');
|
||||
});
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divDPRD').addClass('d-none'); $('#butDPRD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#DPRDID').val(0);
|
||||
$('#DapilID').val(0);
|
||||
$('#Nama_DPRD').val('').prop('readonly', false);
|
||||
$('#butDPRD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divDPRD').removeClass('d-none'); this.data_query('tabel-dprd'); }
|
||||
if (no == 2) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
dprd_select: function(acell){
|
||||
$('#DPRDID').val(acell[0]);
|
||||
$('#DapilID').val(acell[1]);
|
||||
$('#Nama_DPRD').val(acell[2]).prop('readonly', true);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID, Tahap){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'DPRDID','DapilID','SapiID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
const _btn = [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}];
|
||||
if (Tahap == 1) _btn.pop();
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Pokir :: '+(Tahap==1?'Induk':'Perubahan'), ajson.html, 'xl', _btn, () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formPokir').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
OPDID: {required:true, min:1},
|
||||
ProgID: {required:true, min:1},
|
||||
KegID: {required:true, min:1},
|
||||
SubID: {required:true, min:1},
|
||||
KecID: {required:true, min:1},
|
||||
KelID: {required:false},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Rupiah: {required:true, double_id:true},
|
||||
Hidden: {required:true},
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_tambah: function(){
|
||||
this.keg_detail('insert', 0, 2);
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0], acell[1]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formPokir').submit();
|
||||
if (true !== $('#formPokir').validate().checkForm()) return false;
|
||||
const _param = ['data=tabel-keg','mode_detail','DPRDID','SapiID','OPDID','ProgID','KegID','SubID','KecID','KelID','Lokasi','Masalah','Hidden','Rupiah'];
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => { _param.push(e.id); });
|
||||
$(':input[id^="Pending_"]').each((i,e) => { _param.push(e.id); });
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: _param,
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Pokir.');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-dprd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-dprd','Nama_DPRD']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','DPRDID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_OPD: function(){
|
||||
if (parseInt($('#OPDID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-prog','OPDID','ProgID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','OPDID','ProgID','KegID','SubID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Kec: function(){
|
||||
if (parseInt($('#KecID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-kel','KecID','KelID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
copy_Pagu: function(){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan salin Pagu Awal / Default<br>ke Semua Pagu Bulanan ?', () => {
|
||||
const _pagu = $('#Rupiah').val();
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => $(e).val(_pagu));
|
||||
}, 'warning');
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,145 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/ubah/renja.js
|
||||
Desc. : JS - Perubahan Kegiatan Renja
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : May 3rd, 2026.
|
||||
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var UbahRenjaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butOPD').click(() => {
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
});
|
||||
$('#Nama_OPD').keydown((e) => {
|
||||
if (13==e.which && false==$(e.target).prop('readonly')) this.data_query('tabel-opd');
|
||||
});
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').addClass('d-none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#AK_Bidu').val('');
|
||||
$('#Nama_OPD').val('').prop('readonly', false);
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divOPD').removeClass('d-none'); this.data_query('tabel-opd'); }
|
||||
if (no == 2) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#AK_Bidu').val(acell[1]);
|
||||
$('#Nama_OPD').val(acell[2]).prop('readonly', true);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID, Tahap){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'OPDID','AK_Bidu','SapiID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
const _btn = [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}];
|
||||
if (Tahap == 1) _btn.pop();
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Renja :: '+(Tahap==1?'Induk':'Perubahan'), ajson.html, 'xl', _btn, () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formRenja').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
ProgID: {required:true, min:1},
|
||||
KegID: {required:true, min:1},
|
||||
SubID: {required:true, min:1},
|
||||
KecID: {required:true, min:1},
|
||||
KelID: {required:false},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Rupiah: {required:true, double_id:true},
|
||||
Hidden: {required:true},
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_tambah: function(){
|
||||
this.keg_detail('insert', 0, 2);
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0], acell[1]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formRenja').submit();
|
||||
if (true !== $('#formRenja').validate().checkForm()) return false;
|
||||
const _param = ['data=tabel-keg','mode_detail','SapiID','OPDID','ProgID','KegID','SubID','KecID','KelID','Lokasi','Masalah','Hidden','Rupiah'];
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => { _param.push(e.id); });
|
||||
$(':input[id^="Pending_"]').each((i,e) => { _param.push(e.id); });
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: _param,
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Renja.');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-opd','Nama_OPD']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','OPDID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','OPDID','ProgID','KegID','SubID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Kec: function(){
|
||||
if (parseInt($('#KecID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-kel','KecID','KelID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
copy_Pagu: function(){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan salin Pagu Awal / Default<br>ke Semua Pagu Bulanan ?', () => {
|
||||
const _pagu = $('#Rupiah').val();
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => $(e).val(_pagu));
|
||||
}, 'warning');
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user