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,14 +14,14 @@ var RepoStokAkhirJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butPOS').click(() => this.proses_pos());
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_pos: function(){
|
||||
proses_pos() {
|
||||
var cetak = new PrinterPos(this.PHP + '/pos');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
@@ -34,7 +34,7 @@ var RepoStokAkhirJS = {
|
||||
cetak.exec();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
@@ -47,7 +47,7 @@ var RepoStokAkhirJS = {
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
@@ -60,7 +60,7 @@ var RepoStokAkhirJS = {
|
||||
dload.download();
|
||||
},
|
||||
|
||||
oc_MinStok: function(){
|
||||
oc_MinStok() {
|
||||
if ($('#Min_Stok').val()=='Y') {
|
||||
$('#Min_Qty').prop({disabled:false, readonly:false});
|
||||
FoniaJS.setFocus('#Min_Qty')
|
||||
|
||||
@@ -14,13 +14,13 @@ var RepoStokCabangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Cab1ID");
|
||||
cetak.add_param("Cab2ID");
|
||||
@@ -29,7 +29,7 @@ var RepoStokCabangJS = {
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Cab1ID");
|
||||
dload.add_param("Cab2ID");
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ var RepoStokOpnameJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
@@ -29,7 +29,7 @@ var RepoStokOpnameJS = {
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Grup_InvID");
|
||||
|
||||
Reference in New Issue
Block a user