- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
61 lines
1.7 KiB
JavaScript
61 lines
1.7 KiB
JavaScript
/*******************************************************************
|
|
|
|
PHP Class : /Controller/Table/Gel/GajiController
|
|
Description : Master Standar Gaji
|
|
Created By : Siau Pheng ([email protected]).
|
|
Created Date : September 17th, 2014.
|
|
Last Modified : September 4th, 2026.
|
|
|
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
|
|
|
*******************************************************************/
|
|
|
|
var GajiJS = {
|
|
PHP: '',
|
|
KODE: '',
|
|
|
|
index() {
|
|
$('#butUbah').click(() => this.proses_edit());
|
|
$('#butSimpan').click(() => this.proses_save());
|
|
this.data_query('view');
|
|
},
|
|
|
|
proses_edit() {
|
|
this.data_query('update');
|
|
},
|
|
|
|
proses_save() {
|
|
new Request({
|
|
url: this.PHP + '/form_gaji',
|
|
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
|
|
onSuccess: (ajson) => {
|
|
$('#divMaster').html(ajson.html);
|
|
this.update_event();
|
|
FoniaJS.showInfo('Data Standar Gaji Karyawan sukses disimpan!');
|
|
}
|
|
}).send()
|
|
},
|
|
|
|
data_query(mode) {
|
|
new Request({
|
|
url: this.PHP + '/form_gaji',
|
|
sendParam: ['mode_detail='+mode,'REG_ID'],
|
|
onSuccess: (ajson) => {
|
|
$('#divMaster').html(ajson.html);
|
|
this.update_event();
|
|
}
|
|
}).send()
|
|
},
|
|
|
|
update_event() {
|
|
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
|
|
$("#butUbah").prop('disabled', true);
|
|
$("#butSimpan").prop('disabled', false);
|
|
} else {
|
|
$("#butUbah").prop('disabled', false);
|
|
$("#butSimpan").prop('disabled', true);
|
|
}
|
|
}
|
|
|
|
};
|