Update input data induk utk pokir, asmas dan renja
This commit is contained in:
+40
-28
@@ -5,9 +5,9 @@
|
||||
Desc. : JS - Kegiatan Aspirasi Masyarakat
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : November 24th, 2025.
|
||||
Last Modified : May 3rd, 2026.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -16,19 +16,19 @@ var IndukAsmasJS = {
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butKEC').click(function(){
|
||||
$('#butKEC').click(() => {
|
||||
if ($('#KecID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butKEL').click(function(){
|
||||
});
|
||||
$('#butKEL').click(() => {
|
||||
if ($('#KelID').val()>0) this.show_hide(2);
|
||||
}.bind(this));
|
||||
});
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divKEC').css('display', 'none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').css('display', 'none'); $('#butKEL').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').css('display', 'none');
|
||||
$('#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('');
|
||||
@@ -41,9 +41,9 @@ var IndukAsmasJS = {
|
||||
if (no <= 2) {
|
||||
$('#butKEL').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divKEC').css('display', ''); this.data_query('tabel-kec'); }
|
||||
if (no == 2) { $('#divKEL').css('display', ''); this.data_query('tabel-kel'); }
|
||||
if (no == 3) { $('#divKEG').css('display', ''); this.data_query('tabel-keg'); }
|
||||
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){
|
||||
@@ -59,13 +59,13 @@ var IndukAsmasJS = {
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID){
|
||||
new Request({
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'KecID','KelID','SapiID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Aspirasi Masyarakat', txt, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDKeg').find('#butWSimpan').click(function(){this.keg_simpan();}.bind(this));
|
||||
$('#formUsulAsmas').validate({
|
||||
onSuccess: (ajson) => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Aspirasi Masyarakat', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formAsmas').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
OPDID: {required:true, min:1},
|
||||
@@ -74,31 +74,36 @@ var IndukAsmasJS = {
|
||||
SubID: {required:true, min:1},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Volume: {required:true, double_id:true},
|
||||
Satuan: {required:true},
|
||||
Rupiah: {required:true, double_id:true}
|
||||
Rupiah: {required:true, double_id:true},
|
||||
Hidden: {required:true},
|
||||
}
|
||||
});
|
||||
this.oc_OPD();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_tambah: function(){
|
||||
this.keg_detail('insert', 0);
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formUsulAsmas').submit();
|
||||
if (true !== $('#formUsulAsmas').validate().checkForm()) return false;
|
||||
$('#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: ['data=tabel-keg','mode_detail','KecID','KelID','SapiID','OPDID','ProgID','KegID','SubID','Lokasi','Masalah','Volume','Satuan','Rupiah'],
|
||||
onSuccess: function(adata){
|
||||
sendParam: _param,
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Aspirasi Masyarakat.');
|
||||
}.bind(this)
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
@@ -143,6 +148,13 @@ var IndukAsmasJS = {
|
||||
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');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+41
-30
@@ -2,12 +2,12 @@
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/induk/pokir.js
|
||||
Desc. : JS - Kegiatan Pokir Dewan
|
||||
Desc. : JS - Kegiatan Pokir
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : November 24th, 2025.
|
||||
Last Modified : May 3rd, 2026.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -16,43 +16,43 @@ var IndukPokirJS = {
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butDPRD').click(function(){
|
||||
$('#butDPRD').click(() => {
|
||||
if ($('#DPRDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#Nama_DPRD').keydown(function(e){
|
||||
});
|
||||
$('#Nama_DPRD').keydown((e) => {
|
||||
if (13==e.which && false==$(e.target).prop('readonly')) this.data_query('tabel-dprd');
|
||||
}.bind(this));
|
||||
});
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divDPRD').css('display', 'none'); $('#butDPRD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').css('display', 'none');
|
||||
$('#divDPRD').addClass('d-none'); $('#butDPRD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#DPRDID').val(0);
|
||||
$('#Nama_DPRD').val('').prop('readonly', false);
|
||||
$('#DapilID').val(0);
|
||||
$('#Nama_DPRD').val('').prop('readonly', false);
|
||||
$('#butDPRD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divDPRD').css('display', ''); this.data_query('tabel-dprd'); }
|
||||
if (no == 2) { $('#divKEG').css('display', ''); this.data_query('tabel-keg'); }
|
||||
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]);
|
||||
$('#Nama_DPRD').val(acell[2]).prop('readonly', true);
|
||||
$('#DapilID').val(acell[1]);
|
||||
$('#Nama_DPRD').val(acell[2]).prop('readonly', true);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID){
|
||||
new Request({
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'DPRDID','DapilID','SapiID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Pokir', txt, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDKeg').find('#butWSimpan').click(function(){this.keg_simpan();}.bind(this));
|
||||
$('#formUsulDewan').validate({
|
||||
onSuccess: (ajson) => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Pokir', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formPokir').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
OPDID: {required:true, min:1},
|
||||
@@ -63,32 +63,36 @@ var IndukPokirJS = {
|
||||
KelID: {required:false},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Volume: {required:true, double_id:true},
|
||||
Satuan: {required:true},
|
||||
Rupiah: {required:true, double_id:true}
|
||||
Rupiah: {required:true, double_id:true},
|
||||
Hidden: {required:true},
|
||||
}
|
||||
});
|
||||
this.oc_OPD();
|
||||
this.oc_Kec();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_tambah: function(){
|
||||
this.keg_detail('insert', 0);
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formUsulDewan').submit();
|
||||
if (true !== $('#formUsulDewan').validate().checkForm()) return false;
|
||||
$('#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: ['data=tabel-keg','mode_detail','DPRDID','SapiID','OPDID','ProgID','KegID','SubID','KecID','KelID','Lokasi','Masalah','Volume','Satuan','Rupiah'],
|
||||
onSuccess: function(adata){
|
||||
sendParam: _param,
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Pokir.');
|
||||
}.bind(this)
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
@@ -136,6 +140,13 @@ var IndukPokirJS = {
|
||||
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');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -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 Pokir', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Renja', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formRenja').validate({
|
||||
rules: {
|
||||
@@ -88,7 +88,7 @@ var IndukRenjaJS = {
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: _param,
|
||||
onSuccess: (adata) => {
|
||||
onSuccess: () => {
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Renja.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user