first commit
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/gudang.js
|
||||
Desc. : JS - Tabel Master Lokasi Gudang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : March 19th, 2023.
|
||||
|
||||
(c) 2010 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var GudangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Gudang').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Gudang').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Gudang');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=gudang-detail','mode='+mode,'GudangID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Lokasi Gudang', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','GudangID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','GudangID','Kode_Gudang','Nama_Gudang','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Gudang']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/mobil.js
|
||||
Desc. : JS - Tabel Master Kendaraan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : March 4th, 2011.
|
||||
Last Modified : March 20th, 2023.
|
||||
|
||||
(c) 2011 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var MobilJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Mobil').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Mobil').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Mobil');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=mobil-detail','mode='+mode,'MobilID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Kendaraan', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','MobilID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','MobilID','Kode_Mobil','Nama_Mobil','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Mobil']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/outlet.js
|
||||
Desc. : JS - Tabel Master Outlet
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : January 5th, 2025.
|
||||
|
||||
(c) 2010 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var OutletJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Outlet').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Outlet').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Outlet');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=outlet-detail','mode='+mode,'OutletID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Outlet', txt, 800, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','OutletID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','OutletID','Grup_OutletID','Tipe_OutletID','Nama_Outlet','Alamat_Outlet','Kota_Outlet','Telp_Outlet','Prov_LokasiID','Email_Outlet','No_NPWP','No_NITKU','No_NIK','Nama_NPWP','Alamat_NPWP','Tgl_Daftar','GG','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Outlet']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/outlet_grup.js
|
||||
Desc. : JS - Tabel Master Grup Outlet
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : March 19th, 2023.
|
||||
|
||||
(c) 2010 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var OutletGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Grup').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Grup').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=grup-detail','mode='+mode,'Grup_OutletID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Grup Outlet', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','Grup_OutletID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','Grup_OutletID','Kode_Grup','Nama_Grup','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Grup']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/outlet_tipe.js
|
||||
Desc. : JS - Tabel Master Tipe Outlet
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : January 21th, 2011.
|
||||
Last Modified : March 19th, 2023.
|
||||
|
||||
(c) 2011 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var OutletTipeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Tipe').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Tipe').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Tipe');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tipe-detail','mode='+mode,'Tipe_OutletID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Tipe Outlet', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','Tipe_OutletID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','Tipe_OutletID','Kode_Tipe','Nama_Tipe','Keterangan','Opsi','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Tipe']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/pegawai.js
|
||||
Desc. : JS - Tabel Master Pegawai
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : March 20th, 2023.
|
||||
|
||||
(c) 2010 - 2013, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PegawaiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Peg').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Peg').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Peg');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=pegawai-detail','mode='+mode,'PegID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Pegawai', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','PegID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','PegID','Jenis_PegID','Kode_Pegawai','Nama_Pegawai','Alamat_Pegawai','Telp_Pegawai','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Peg']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/pegawai_jenis.js
|
||||
Desc. : JS - Tabel Master Jenis Pegawai
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : February 8th, 2011.
|
||||
Last Modified : March 20th, 2023.
|
||||
|
||||
(c) 2011 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PegawaiJenisJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Jenis').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Jenis').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Jenis');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=jenis-detail','mode='+mode,'Jenis_PegID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Jenis Pegawai', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','Jenis_PegID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','Jenis_PegID','Kode_Jenis','Nama_Jenis','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Jenis']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,426 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/produk.js
|
||||
Desc. : JS - Tabel Master Produk
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : January 10th, 2026.
|
||||
|
||||
(c) 2010 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var ProdukJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butFilter').click(function(){this.filter_show();}.bind(this));
|
||||
this.data_query('tabel-produk');
|
||||
$('#Cari_Produk').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('tabel-produk');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('tabel-produk');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Produk').val('');
|
||||
this.data_query('tabel-produk');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
},
|
||||
|
||||
filter_show: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-filter','Filter_Produk'],
|
||||
onSuccess: function(txt){
|
||||
this.winFilter = FoniaJS.showWindow('Filter', 'Filter Produk Sesuai Grup', txt, 400, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winFilter').find('#butWSimpan').click(function(){this.filter_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
$('#Fi_Produk').focus();
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
filter_simpan: function(){
|
||||
$('#Filter_Produk').val($('#Fi_Produk').val());
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-produk');
|
||||
},
|
||||
|
||||
produk_show: function(mode, ID){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-produk','mode='+mode,'InvID='+ID],
|
||||
onSuccess: function(ajson){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Produk', ajson.html, 'xl', [{},{i:'butWBtl',v:'Batal',c:'danger'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail')
|
||||
.find('#butWSimpan').click(function(){this.produk_simpan();}.bind(this)).end()
|
||||
.find('#butWBtl').click(function(){this.produk_batal();}.bind(this));
|
||||
this.data_query('tabel-varian');
|
||||
this.data_query('tabel-kemasan');
|
||||
this.data_query('tabel-harga');
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_restore: function(acell){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-detail','InvID='+acell[0]],
|
||||
onSuccess: function(ajson){
|
||||
this.winBRest = FoniaJS.showWindow('BRest', 'Informasi Backup Produk', ajson.html, 'xl', [], function(){
|
||||
this.data_query('restore-tabel');
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_restore_select: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan restore data Produk ke versi tanggal : <b>"'+acell[0]+'"</b> ?<br><br><span class="text-danger fw-bold">HARAP KONFIRMASI KEMBALI, TERIMA KASIH!</span>', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-proses','InvID','MD5Key='+acell[1]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
FoniaJS.showInfo('Sukses restore Data Produk ini!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses restore!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
produk_restore_form: function(acell, div){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-form','InvID','MD5Key='+acell[1]],
|
||||
onSuccess: function(adata){
|
||||
$(div).html(adata.html);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_tambah: function(){
|
||||
this.produk_show('add', 0);
|
||||
},
|
||||
|
||||
produk_ubah: function(acell){
|
||||
this.produk_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
produk_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','InvID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('tabel-produk');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','InvID','Grup_InvID','Kode_Produk','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'Kode_FP','StokID','NormalID','Harga_Pokok','Stok_Min','Pajak','Hadiah','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('tabel-produk');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_batal: function(){
|
||||
if ($('#mode').val()=='add'){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Penambahan Produk ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=cancel','InvID','mode_before=add'],
|
||||
onSuccess: function(){
|
||||
this.data_query('tabel-produk');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
return false;
|
||||
}
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Perubahan Detail Produk ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=cancel','InvID'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
varian_batal: function(){
|
||||
var dt = $('#divVarianTabel').DataTable(), tr, l_row;
|
||||
tr = $('#butBatalVarian').closest('tr');
|
||||
l_row = dt.row(tr.prev('tr'));
|
||||
if (l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
if (l_row.data()[0]=='0') l_row.remove().draw(true);
|
||||
},
|
||||
|
||||
varian_add: function(){
|
||||
var dt = $('#divVarianTabel').DataTable(), l_row;
|
||||
dt.order([0,'desc']);
|
||||
l_row = dt.row(':last');
|
||||
if (!dt.data().count() || l_row.data()[0]!=='0'){
|
||||
dt.row.add(['0','','','<a class="table-icon fon-tabel-dt" tabindex="-1" title="Detail"><i class="bi-pencil"></i></a>']).draw(true);
|
||||
l_row = dt.row(':last');
|
||||
}
|
||||
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
},
|
||||
|
||||
varian_form: function(acell, div){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-varian','InvID','InvVarianID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
$(div).html(adata.html);
|
||||
$(div)
|
||||
.find('#butBatalVarian').click(function(e){
|
||||
this.varian_batal();
|
||||
}.bind(this)).end()
|
||||
.find('#butSimpanVarian').click(function(e){
|
||||
this.varian_save();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
varian_del: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-varian','mode','mode_detail=delete','InvID','InvVarianID='+acell[0]],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
varian_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-varian','mode','mode_detail=update','InvID','InvVarianID','RasaID'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Sukses menyimpan varian / rasa produk.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_batal: function(){
|
||||
var dt = $('#divKemasanTabel').DataTable(), tr, l_row;
|
||||
tr = $('#butBatalKemasan').closest('tr');
|
||||
l_row = dt.row(tr.prev('tr'));
|
||||
if (l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
if (l_row.data()[0]=='0') l_row.remove().draw(true);
|
||||
},
|
||||
|
||||
kemasan_add: function(){
|
||||
var dt = $('#divKemasanTabel').DataTable(), l_row;
|
||||
dt.order([0,'desc']);
|
||||
l_row = dt.row(':last');
|
||||
if (!dt.data().count() || l_row.data()[0]!=='0'){
|
||||
dt.row.add(['0','',0,'<a class="table-icon fon-tabel-dt" tabindex="-1" title="Detail"><i class="bi-pencil"></i></a>']).draw(true);
|
||||
l_row = dt.row(':last');
|
||||
}
|
||||
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
},
|
||||
|
||||
kemasan_form: function(acell, div){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-kemasan','InvID','InvKemasanID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
$(div).html(adata.html);
|
||||
$(div)
|
||||
.find('#butBatalKemasan').click(function(e){
|
||||
this.kemasan_batal();
|
||||
}.bind(this)).end()
|
||||
.find('#butSimpanKemasan').click(function(e){
|
||||
this.kemasan_check();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_del: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kemasan','mode','mode_detail=delete','InvID','InvKemasanID='+acell[0]],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
kemasan_save: function(){
|
||||
if ($('#Qty').val()==0){
|
||||
FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !');
|
||||
return false;
|
||||
}
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kemasan','mode','mode_detail=update','InvID','InvKemasanID','SatuanID','SatuanLamaID','Qty'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Sukses menyimpan kemasan produk.');
|
||||
this.data_query('tabel-harga');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_check: function(){
|
||||
if ($('#SatuanID').val()==$('#SatuanLamaID').val()) {
|
||||
this.kemasan_save();
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=check-kemasan','InvID','SatuanID'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.ada==true) {
|
||||
FoniaJS.showInfo("Nama kemasan telah ada dalam sistem!");
|
||||
} else {
|
||||
this.kemasan_save();
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
harga_batal: function(){
|
||||
var dt = $('#divHargaTabel').DataTable(), tr, l_row;
|
||||
tr = $('#butBatalHarga').closest('tr');
|
||||
l_row = dt.row(tr.prev('tr'));
|
||||
if (l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
if (l_row.data()[0]=='0') l_row.remove().draw(true);
|
||||
},
|
||||
|
||||
harga_add: function(){
|
||||
var dt = $('#divHargaTabel').DataTable(), l_row;
|
||||
dt.order([0,'desc']);
|
||||
l_row = dt.row(':last');
|
||||
if (!dt.data().count() || l_row.data()[0]!=='0'){
|
||||
dt.row.add(['0','','','00-00-0000',0,'<a class="table-icon fon-tabel-dt" tabindex="-1" title="Detail"><i class="bi-pencil"></i></a>']).draw(true);
|
||||
l_row = dt.row(':last');
|
||||
}
|
||||
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
},
|
||||
|
||||
harga_form: function(acell, div){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-harga','InvID','InvHargaID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
$(div).html(adata.html);
|
||||
$(div)
|
||||
.find('#butBatalHarga').click(function(e){
|
||||
this.harga_batal();
|
||||
}.bind(this)).end()
|
||||
.find('#butSimpanHarga').click(function(e){
|
||||
this.harga_check();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
harga_del: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-harga','mode','mode_detail=delete','InvID','InvHargaID='+acell[0]],
|
||||
onSuccess: function(){
|
||||
var dt = $('#divHargaTabel').DataTable();
|
||||
dt.order([1,'asc'],[2,'asc'],[3,'asc']);
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
harga_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-harga','mode','mode_detail=update','InvID','InvHargaID','SatuanID','Grup_OutletID','Tanggal','Harga_Jual'],
|
||||
onSuccess: function(){
|
||||
var dt = $('#divHargaTabel').DataTable();
|
||||
dt.order([1,'asc'],[2,'asc'],[3,'asc']);
|
||||
FoniaJS.showInfo('Sukses menyimpan harga jual produk.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
harga_check: function(){
|
||||
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#Grup_OutletID').val()==$('#GrupLamaID').val()) && ($('#Tanggal').val()==$('#TanggalLama').val())) {
|
||||
this.harga_save();
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=check-harga','InvID','SatuanID','Grup_OutletID','Tanggal'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.ada==true) {
|
||||
FoniaJS.showInfo("Harga Satuan per Group Outlet telah ada dalam sistem!");
|
||||
} else {
|
||||
this.harga_save();
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-produk','Cari_Produk','Filter_Produk']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-varian"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-varian','mode','InvID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kemasan"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kemasan','mode','InvID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-harga"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-harga','mode','InvID'],
|
||||
onSuccess: function(){
|
||||
var dt = $('#divHargaTabel').DataTable();
|
||||
dt.order([1,'asc'],[2,'asc'],[3,'asc']);
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="restore-tabel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-tabel','InvID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/produk_grup.js
|
||||
Desc. : JS - Tabel Master Grup Produk
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : February 8th, 2011.
|
||||
Last Modified : March 19th, 2023.
|
||||
|
||||
(c) 2011 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var ProdukGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Grup').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Grup').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=grup-detail','mode='+mode,'Grup_InvID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Grup Produk', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','Grup_InvID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','Grup_InvID','Kode_Grup','Nama_Grup','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Grup']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/rasa.js
|
||||
Desc. : JS - Tabel Master Rasa Produk
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : March 19th, 2023.
|
||||
|
||||
(c) 2010 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RasaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Rasa').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Rasa').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Rasa');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=rasa-detail','mode='+mode,'RasaID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Rasa Produk', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','RasaID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','RasaID','Kode_Rasa','Nama_Rasa','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Rasa']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/satuan.js
|
||||
Desc. : JS - Tabel Master Satuan Produk
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : March 19th, 2023.
|
||||
|
||||
(c) 2010 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var SatuanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Satuan').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Satuan').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Satuan');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=satuan-detail','mode='+mode,'SatuanID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Satuan', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','SatuanID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','SatuanID','Kode_Satuan','Nama_Satuan','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Satuan']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : Inventory Advanced Systems
|
||||
Module : /apps/js/tab/supplier.js
|
||||
Desc. : JS - Tabel Master Supplier
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : March 19th, 2023.
|
||||
|
||||
(c) 2010 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var SupplierJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Sup').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Sup').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Sup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=sup-detail','mode='+mode,'SupID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Supplier', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','SupID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','SupID','Kode_Sup','Nama_Sup','Alamat_Sup','Kota_Sup','Telp_Sup','No_NPWP','No_NITKU','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Sup']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user