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:
@@ -15,7 +15,7 @@ var OpnameBarangJS = {
|
||||
KODE: '',
|
||||
html5QrcodeScanner: null,
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
$('#butBrow').click(() => this.produk_brow());
|
||||
if (FoniaJS.WEB_MOBILE){
|
||||
@@ -28,7 +28,7 @@ var OpnameBarangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Produk!');
|
||||
return;
|
||||
@@ -50,7 +50,7 @@ var OpnameBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
ScanSukses: function(decodedText, decodedResult){
|
||||
ScanSukses(decodedText, decodedResult) {
|
||||
new Request({
|
||||
url: OpnameBarangJS.PHP + '/scan_produk',
|
||||
sendParam: ['Cari_Produk='+decodedText],
|
||||
@@ -70,7 +70,7 @@ var OpnameBarangJS = {
|
||||
this.html5QrcodeScanner.pause();
|
||||
},
|
||||
|
||||
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')
|
||||
@@ -87,7 +87,7 @@ var OpnameBarangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#SatuanID').val(acell[1]);
|
||||
@@ -101,7 +101,7 @@ var OpnameBarangJS = {
|
||||
FoniaJS.setFocus('#Stok_Fisik');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-produk"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
@@ -111,7 +111,7 @@ var OpnameBarangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
// Cari by SKU + Barcode
|
||||
// Satuan : Varian : SKU + Barcode : Harga_Pokok : Satuan : PPN : Stok
|
||||
var adata = item.data.split(':');
|
||||
|
||||
Reference in New Issue
Block a user