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 RepoStokMutasiJS = {
|
||||
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 RepoStokMutasiJS = {
|
||||
FoniaJS.setFocus('#Nama_Produk');
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
$('#Nama_Produk').focus();
|
||||
@@ -37,7 +37,7 @@ var RepoStokMutasiJS = {
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
$('#Nama_Produk').focus();
|
||||
@@ -51,7 +51,7 @@ var RepoStokMutasiJS = {
|
||||
dload.download();
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -68,13 +68,13 @@ var RepoStokMutasiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#Nama_Produk').val(acell[5]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-produk"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
@@ -84,7 +84,7 @@ var RepoStokMutasiJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
$('#InvID').val(item.value);
|
||||
$('#Tgl_From').focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user