Refactor member and product scripts to use concise method definitions

- 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.
This commit is contained in:
2026-11-01 14:57:54 +07:00
parent be2091eddd
commit aaaf0a9215
92 changed files with 749 additions and 749 deletions
+21 -21
View File
@@ -14,7 +14,7 @@ var GELGajiJS = {
PHP: '',
KODE: '',
index: function(q){
index(q) {
$('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var GELGajiJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
},
tx_brow: function(){
tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -42,17 +42,17 @@ var GELGajiJS = {
});
},
tx_select: function(acell){
tx_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#No_Gaji').val(acell[0]);
this.data_query('master', 'view');
},
tx_tambah: function(){
tx_tambah() {
this.data_query('master', 'add');
},
tx_ubah: function(){
tx_ubah() {
if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -60,7 +60,7 @@ var GELGajiJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Gaji').val());
},
tx_hapus: function(){
tx_hapus() {
if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -84,18 +84,18 @@ var GELGajiJS = {
}, 'danger');
},
tx_simpan: function(){
tx_simpan() {
this.data_query('master', 'save');
},
tx_batal: function(){
tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#No_Gaji').val('');
}, 'danger');
},
tx_print: function(){
tx_print() {
if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -106,14 +106,14 @@ var GELGajiJS = {
});
},
tx_print_exec: function(){
tx_print_exec() {
var cetak = new PrinterPos('report/nota/gaji');
cetak.add_param("Nomor_Cetak", $('#No_Gaji').val());
cetak.exec();
FoniaJS.closeWindow(this.winBCetak);
},
karya_brow: function(){
karya_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Karya" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowKarya">&nbsp;</div>');
this.winBKarya = FoniaJS.showWindow('BKarya', 'Daftar Karyawan', _isi, 'lg', '', () => {
$('#winBKarya')
@@ -131,12 +131,12 @@ var GELGajiJS = {
});
},
karya_select: function(acell){
karya_select(acell) {
FoniaJS.closeWindow(this.winBKarya);
this.detail_gaji('insert', 0, acell[0]);
},
detail_gaji: function(mode, ID, KaryaID){
detail_gaji(mode, ID, KaryaID) {
new Request({
url: this.PHP + '/form_gaji',
sendParam: ['mode','mode_detail='+mode,'No_Gaji','ID='+ID,'KaryaID='+KaryaID],
@@ -177,15 +177,15 @@ var GELGajiJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_gaji('insert', 0, 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_gaji('update', acell[0], acell[1]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -194,7 +194,7 @@ var GELGajiJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
if (parseInt($('#KaryaID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Karyawan !');
return;
@@ -212,7 +212,7 @@ var GELGajiJS = {
}).send();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
var sparam = ['mode='+mode,'No_Gaji'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode=save','No_Gaji','Tgl_Gaji','CabID','Tahun','Bulan','Minggu','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -272,7 +272,7 @@ var GELGajiJS = {
}
},
Karya_Comp: function(item){
Karya_Comp(item) {
var adata = item.data.split(':');
$('#KaryaID').val(item.value);
$('#Gaji_Harian').val(FoniaJS.FloatToStr(adata[0]));
@@ -280,7 +280,7 @@ var GELGajiJS = {
FoniaJS.setFocus('#Qty_Harian');
},
oc_Minggu: function(){
oc_Minggu() {
new Request({
url: this.PHP + '/option_minggu',
sendParam: ['Tahun','Bulan'],
@@ -295,7 +295,7 @@ var GELGajiJS = {
}).send();
},
Hitung_Detail: function(){
Hitung_Detail() {
var dgaji = FoniaJS.StrToFloat($('#Qty_Harian').val()) * FoniaJS.StrToFloat($('#Gaji_Harian').val());
var dlemb = FoniaJS.StrToFloat($('#Qty_Lembur').val()) * FoniaJS.StrToFloat($('#Lembur_Harian').val());
var dbon1 = FoniaJS.StrToFloat($('#Qty_BonusM').val()) * FoniaJS.StrToFloat($('#Bonus_Minggu').val());