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:
@@ -14,7 +14,7 @@ var RepoGelHBesarJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -23,7 +23,7 @@ var RepoGelHBesarJS = {
|
||||
FoniaJS.setFocus('#Nama_Rek');
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Rekening !');
|
||||
return;
|
||||
@@ -36,7 +36,7 @@ var RepoGelHBesarJS = {
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Rekening !');
|
||||
return;
|
||||
@@ -49,7 +49,7 @@ var RepoGelHBesarJS = {
|
||||
dload.download();
|
||||
},
|
||||
|
||||
rek_brow: function(){
|
||||
rek_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek"> </div>');
|
||||
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
|
||||
$('#winBRek')
|
||||
@@ -66,14 +66,14 @@ var RepoGelHBesarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
rek_select: function(acell){
|
||||
rek_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBRek);
|
||||
$('#Kode_Rek').val(acell[0]);
|
||||
$('#Nama_Rek').val(acell[1]);
|
||||
$('#Tgl_From').focus();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="brow-rek"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_rek',
|
||||
@@ -83,7 +83,7 @@ var RepoGelHBesarJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Rek_Comp: function(item){
|
||||
Rek_Comp(item) {
|
||||
$('#Kode_Rek').val(item.value);
|
||||
$('#Tgl_From').focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user