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,17 +14,17 @@ var GajiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
proses_edit() {
|
||||
this.data_query('update');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_gaji',
|
||||
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
|
||||
@@ -36,7 +36,7 @@ var GajiJS = {
|
||||
}).send()
|
||||
},
|
||||
|
||||
data_query: function(mode){
|
||||
data_query(mode) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_gaji',
|
||||
sendParam: ['mode_detail='+mode,'REG_ID'],
|
||||
@@ -47,7 +47,7 @@ var GajiJS = {
|
||||
}).send()
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
update_event() {
|
||||
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
|
||||
$("#butUbah").prop('disabled', true);
|
||||
$("#butSimpan").prop('disabled', false);
|
||||
|
||||
@@ -14,7 +14,7 @@ var RekGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Rek').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var RekGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Rek');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['mode_detail='+mode,'Grup_RekID='+ID],
|
||||
@@ -40,15 +40,15 @@ var RekGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -60,7 +60,7 @@ var RekGrupJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'],
|
||||
@@ -71,7 +71,7 @@ var RekGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var KaryawanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Karya').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var KaryawanJS = {
|
||||
FoniaJS.setFocus('#Cari_Karya');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_karya',
|
||||
sendParam: ['mode_detail='+mode,'KaryaID='+ID],
|
||||
@@ -38,15 +38,15 @@ var KaryawanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -56,7 +56,7 @@ var KaryawanJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
|
||||
@@ -67,7 +67,7 @@ var KaryawanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var RekJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#Cari_Rek').keydown((e) => {
|
||||
@@ -29,7 +29,7 @@ var RekJS = {
|
||||
FoniaJS.setFocus('#Cari_Rek');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -42,7 +42,7 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_rek: function(prt){
|
||||
print_rek(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print_rek');
|
||||
cetak.add_param("Grup_RekID");
|
||||
cetak.add_param("Level");
|
||||
@@ -51,7 +51,7 @@ var RekJS = {
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
|
||||
@@ -61,15 +61,15 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -79,7 +79,7 @@ var RekJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
|
||||
@@ -90,7 +90,7 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var MemberJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#Cari_Member').keydown((e) => {
|
||||
@@ -29,7 +29,7 @@ var MemberJS = {
|
||||
FoniaJS.setFocus('#Cari_Member');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -42,7 +42,7 @@ var MemberJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_member: function(prt){
|
||||
print_member(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print_member');
|
||||
cetak.add_param("Grup_MemberID");
|
||||
cetak.add_param("Aktif");
|
||||
@@ -51,7 +51,7 @@ var MemberJS = {
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_member',
|
||||
sendParam: ['mode_detail='+mode,'MemberID='+ID],
|
||||
@@ -61,15 +61,15 @@ var MemberJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -79,7 +79,7 @@ var MemberJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar','IM','Aktif','Cari_Member'],
|
||||
@@ -90,7 +90,7 @@ var MemberJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var MemberGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Member').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var MemberGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Member');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
|
||||
@@ -40,15 +40,15 @@ var MemberGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -60,7 +60,7 @@ var MemberGrupJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
|
||||
@@ -71,7 +71,7 @@ var MemberGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var PointBarangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Barang').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PointBarangJS = {
|
||||
FoniaJS.setFocus('#Cari_Barang');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_barang',
|
||||
sendParam: ['mode_detail='+mode,'InvPID='+ID],
|
||||
@@ -40,15 +40,15 @@ var PointBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -60,7 +60,7 @@ var PointBarangJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
|
||||
@@ -71,7 +71,7 @@ var PointBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var PointSkemaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Skema').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PointSkemaJS = {
|
||||
FoniaJS.setFocus('#Cari_Skema');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_skema',
|
||||
sendParam: ['mode_detail='+mode,'PointID='+ID],
|
||||
@@ -43,15 +43,15 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -61,7 +61,7 @@ var PointSkemaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'],
|
||||
@@ -72,7 +72,7 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_form: function(){
|
||||
grup_form() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['Grup_Barang'],
|
||||
@@ -87,15 +87,15 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_semua: function(){
|
||||
grup_semua() {
|
||||
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
|
||||
},
|
||||
|
||||
grup_clear: function(){
|
||||
grup_clear() {
|
||||
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
|
||||
},
|
||||
|
||||
grup_save: function(){
|
||||
grup_save() {
|
||||
var alist = [];
|
||||
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
@@ -104,7 +104,7 @@ var PointSkemaJS = {
|
||||
FoniaJS.closeWindow(this.winGrup);
|
||||
},
|
||||
|
||||
barang_form: function(){
|
||||
barang_form() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_barang',
|
||||
sendParam: ['Kode_Barang'],
|
||||
@@ -117,7 +117,7 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
barang_hapus: function(acell){
|
||||
barang_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_barang',
|
||||
@@ -127,7 +127,7 @@ var PointSkemaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -142,7 +142,7 @@ var PointSkemaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
new Request_JSF({
|
||||
url: PointSkemaJS.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
|
||||
|
||||
@@ -14,7 +14,7 @@ var PointTipeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Tipe').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PointTipeJS = {
|
||||
FoniaJS.setFocus('#Cari_Tipe');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_tipe',
|
||||
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
|
||||
@@ -40,15 +40,15 @@ var PointTipeJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -60,7 +60,7 @@ var PointTipeJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
|
||||
@@ -71,7 +71,7 @@ var PointTipeJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var PPOBKateJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Kate').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PPOBKateJS = {
|
||||
FoniaJS.setFocus('#Cari_Kate');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_kategori',
|
||||
sendParam: ['mode_detail='+mode,'KateID='+ID],
|
||||
@@ -38,11 +38,11 @@ var PPOBKateJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var PPOBOpeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Ope').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PPOBOpeJS = {
|
||||
FoniaJS.setFocus('#Cari_Ope');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_operator',
|
||||
sendParam: ['mode_detail='+mode,'OpeID='+ID],
|
||||
@@ -38,11 +38,11 @@ var PPOBOpeJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var PPOBProdukJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('tabel-produk');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#butUpdate').click(() => this.update_show());
|
||||
@@ -30,7 +30,7 @@ var PPOBProdukJS = {
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -43,7 +43,7 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_produk: function(prt){
|
||||
print_produk(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print_produk');
|
||||
cetak.add_param("KateID");
|
||||
cetak.add_param("OpeID");
|
||||
@@ -52,7 +52,7 @@ var PPOBProdukJS = {
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
update_show: function(){
|
||||
update_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_update',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -63,7 +63,7 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
update_proses: function(){
|
||||
update_proses() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/proses_update',
|
||||
sendParam: ['K_Kate','K_Ope'],
|
||||
@@ -74,7 +74,7 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_show: function(mode, ID){
|
||||
produk_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode_detail='+mode,'ProdukID='+ID],
|
||||
@@ -86,11 +86,11 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_ubah: function(acell){
|
||||
produk_ubah(acell) {
|
||||
this.produk_show('update', acell[0]);
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
produk_simpan() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_produk',
|
||||
sendParam: ['mode_detail','ProdukID','OpeID','KateID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'Kode','Harga_Pokok','Harga_Jual','Status','Cari_Produk'],
|
||||
@@ -103,7 +103,7 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="tabel-produk"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_produk',
|
||||
|
||||
+39
-39
@@ -14,7 +14,7 @@ var ProdukJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('tabel-produk');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#butFilter').click(() => this.filter_show());
|
||||
@@ -30,7 +30,7 @@ var ProdukJS = {
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -43,7 +43,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_produk: function(prt){
|
||||
print_produk(prt) {
|
||||
var cetak = new Printer(this.PHP + '/print_barang');
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
@@ -53,7 +53,7 @@ var ProdukJS = {
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
filter_show: function(){
|
||||
filter_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_filter',
|
||||
sendParam: ['Filter_Produk'],
|
||||
@@ -66,13 +66,13 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
filter_simpan: function(){
|
||||
filter_simpan() {
|
||||
$('#Filter_Produk').val($('#Fi_Produk').val());
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-produk');
|
||||
},
|
||||
|
||||
produk_show: function(mode, ID){
|
||||
produk_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_produk',
|
||||
sendParam: ['mode='+mode,'InvID='+ID],
|
||||
@@ -89,7 +89,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_restore: function(acell){
|
||||
produk_restore(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_restore',
|
||||
sendParam: ['InvID='+acell[0]],
|
||||
@@ -99,7 +99,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_restore_select: function(acell){
|
||||
produk_restore_select(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan restore data Barang ke versi tanggal : <b>"'+acell[0]+'"</b> ?<br><br><span class="text-danger fw-bold">HARAP KONFIRMASI KEMBALI, TERIMA KASIH!</span>', () => {
|
||||
new Request({
|
||||
url: this.PHP + '/proses_restore',
|
||||
@@ -111,7 +111,7 @@ var ProdukJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
produk_restore_form: function(acell, div){
|
||||
produk_restore_form(acell, div) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_restore',
|
||||
sendParam: ['InvID','MD5Key='+acell[1]],
|
||||
@@ -119,15 +119,15 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_tambah: function(){
|
||||
produk_tambah() {
|
||||
this.produk_show('add', 0);
|
||||
},
|
||||
|
||||
produk_ubah: function(acell){
|
||||
produk_ubah(acell) {
|
||||
this.produk_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
produk_hapus: function(acell){
|
||||
produk_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
FoniaJS.showAuth(() => {
|
||||
new Request({
|
||||
@@ -146,7 +146,7 @@ var ProdukJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
produk_simpan() {
|
||||
new Request({
|
||||
url: this.PHP + '/proses_simpan',
|
||||
sendParam: ['mode','InvID','Grup_InvID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'StokID','NormalID','PPN','Harga_Beli','Harga_Tambah','Stok_Min','Stok_Max','Aktif'],
|
||||
@@ -162,7 +162,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_batal: function(){
|
||||
produk_batal() {
|
||||
if ($('#mode').val()=='add'){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Penambahan Barang ?', () => {
|
||||
new Request({
|
||||
@@ -185,7 +185,7 @@ var ProdukJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
brow_produk: function(){
|
||||
brow_produk() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk2" 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').find('#Cari_Produk2').keydown((e) => {
|
||||
@@ -202,7 +202,7 @@ var ProdukJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
new Request({
|
||||
url: this.PHP + '/proses_copy',
|
||||
@@ -220,11 +220,11 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_copy: function(){
|
||||
kemasan_copy() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan salin data dari barang lain ?<br><br><span class="text-danger fw-bold">KEMASAN & HARGA YANG ADA<br>SEKARANG AKAN DIHAPUS!</span>', () => this.brow_produk(), 'warning');
|
||||
},
|
||||
|
||||
kemasan_batal: function(){
|
||||
kemasan_batal() {
|
||||
var dt = $('#divKemasanTabel').DataTable(), tr, l_row;
|
||||
tr = $('#butBatalKemasan').closest('tr');
|
||||
l_row = dt.row(tr.prev('tr'));
|
||||
@@ -232,7 +232,7 @@ var ProdukJS = {
|
||||
if (l_row.data()[0]=='0') l_row.remove().draw(true);
|
||||
},
|
||||
|
||||
kemasan_add: function(){
|
||||
kemasan_add() {
|
||||
var dt = $('#divKemasanTabel').DataTable(), l_row;
|
||||
dt.order([0,'desc']);
|
||||
l_row = dt.row(':last');
|
||||
@@ -243,7 +243,7 @@ var ProdukJS = {
|
||||
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
},
|
||||
|
||||
kemasan_form: function(acell, div){
|
||||
kemasan_form(acell, div) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_kemasan',
|
||||
sendParam: ['InvID','InvKemasanID='+acell[0],'Satuan_Stok='+$('#StokID').find(':selected').text()],
|
||||
@@ -256,7 +256,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_del: function(acell){
|
||||
kemasan_del(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/tabel_kemasan',
|
||||
@@ -270,7 +270,7 @@ var ProdukJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
kemasan_save: function(){
|
||||
kemasan_save() {
|
||||
if ($('#Qty').val()==0){
|
||||
FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !');
|
||||
return false;
|
||||
@@ -288,7 +288,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_check: function(){
|
||||
kemasan_check() {
|
||||
if ($('#SatuanID').val()==$('#SatuanLamaID').val()) {
|
||||
this.kemasan_save();
|
||||
return;
|
||||
@@ -306,7 +306,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
varian_batal: function(){
|
||||
varian_batal() {
|
||||
var dt = $('#divVarianTabel').DataTable(), tr, l_row;
|
||||
tr = $('#butBatalVarian').closest('tr');
|
||||
l_row = dt.row(tr.prev('tr'));
|
||||
@@ -314,7 +314,7 @@ var ProdukJS = {
|
||||
if (l_row.data()[0]=='0') l_row.remove().draw(true);
|
||||
},
|
||||
|
||||
varian_add: function(){
|
||||
varian_add() {
|
||||
var dt = $('#divVarianTabel').DataTable(), l_row;
|
||||
dt.order([0,'desc']);
|
||||
l_row = dt.row(':last');
|
||||
@@ -325,7 +325,7 @@ var ProdukJS = {
|
||||
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
},
|
||||
|
||||
varian_form: function(acell, div){
|
||||
varian_form(acell, div) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_varian',
|
||||
sendParam: ['InvID','InvVarianID='+acell[0]],
|
||||
@@ -338,7 +338,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
varian_del: function(acell){
|
||||
varian_del(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[4]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/tabel_varian',
|
||||
@@ -348,7 +348,7 @@ var ProdukJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
varian_save: function(){
|
||||
varian_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/tabel_varian',
|
||||
sendParam: ['mode','mode_detail=update','InvID','InvVarianID','SatuanID','VarianID','Kode_Barcode'],
|
||||
@@ -356,7 +356,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
varian_check: function(){
|
||||
varian_check() {
|
||||
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#VarianID').val()==$('#VarianLamaID').val()) && ($('#Kode_Barcode').val()==$('#Kode_BarcodeLama').val())) {
|
||||
this.varian_save();
|
||||
return;
|
||||
@@ -374,7 +374,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
harga_batal: function(){
|
||||
harga_batal() {
|
||||
var dt = $('#divHargaTabel').DataTable(), tr, l_row;
|
||||
tr = $('#butBatalHarga').closest('tr');
|
||||
l_row = dt.row(tr.prev('tr'));
|
||||
@@ -382,7 +382,7 @@ var ProdukJS = {
|
||||
if (l_row.data()[0]=='0') l_row.remove().draw(true);
|
||||
},
|
||||
|
||||
harga_add: function(){
|
||||
harga_add() {
|
||||
var dt = $('#divHargaTabel').DataTable(), l_row;
|
||||
dt.order([0,'desc']);
|
||||
l_row = dt.row(':last');
|
||||
@@ -395,7 +395,7 @@ var ProdukJS = {
|
||||
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
},
|
||||
|
||||
harga_form: function(acell, div){
|
||||
harga_form(acell, div) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_harga',
|
||||
sendParam: ['InvID','InvHargaID='+acell[0]],
|
||||
@@ -410,7 +410,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
harga_del: function(acell){
|
||||
harga_del(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+' - '+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/tabel_harga',
|
||||
@@ -420,7 +420,7 @@ var ProdukJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
harga_save: function(){
|
||||
harga_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/tabel_harga',
|
||||
sendParam: ['mode','mode_detail=update','InvID','InvHargaID','SatuanID','Grup_MemberID','Harga_Jual'],
|
||||
@@ -428,7 +428,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
harga_check: function(){
|
||||
harga_check() {
|
||||
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#Grup_MemberID').val()==$('#GrupLamaID').val())) {
|
||||
this.harga_save();
|
||||
return;
|
||||
@@ -446,7 +446,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="tabel-produk"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/tabel_produk',
|
||||
@@ -485,11 +485,11 @@ var ProdukJS = {
|
||||
}
|
||||
},
|
||||
|
||||
hitung_HPP: function(){
|
||||
hitung_HPP() {
|
||||
$('#Harga_Pokok').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Beli').val()) + FoniaJS.StrToFloat($('#Harga_Tambah').val()), 0));
|
||||
},
|
||||
|
||||
calc_Modal: function(){
|
||||
calc_Modal() {
|
||||
new Request({
|
||||
url: this.PHP + '/check_modal',
|
||||
sendParam: ['InvID','SatuanID'],
|
||||
@@ -502,7 +502,7 @@ var ProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
calc_Harga: function(tipe){
|
||||
calc_Harga(tipe) {
|
||||
var harga = FoniaJS.StrToFloat($('#Harga_Jual').val());
|
||||
var pjual = FoniaJS.StrToFloat($('#Persen_Jual').val());
|
||||
var hmodal = FoniaJS.StrToFloat($('#Harga_Modal').val());
|
||||
|
||||
@@ -14,7 +14,7 @@ var ProdukGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Grup').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var ProdukGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['mode_detail='+mode,'Grup_InvID='+ID],
|
||||
@@ -40,15 +40,15 @@ var ProdukGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -58,7 +58,7 @@ var ProdukGrupJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Grup_InvID','Kode_Grup','Nama_Grup','Margin','Aktif','Cari_Grup'],
|
||||
@@ -69,7 +69,7 @@ var ProdukGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var RekPOSJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Rekpos').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var RekPOSJS = {
|
||||
FoniaJS.setFocus('#Cari_Rekpos');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rekpos',
|
||||
sendParam: ['mode_detail='+mode,'KartuID='+ID],
|
||||
@@ -40,15 +40,15 @@ var RekPOSJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -58,7 +58,7 @@ var RekPOSJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','KartuID','Kode_Kartu','Nama_Kartu','Kode_Rek','Aktif','Cari_Rekpos'],
|
||||
@@ -69,7 +69,7 @@ var RekPOSJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var SatuanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Satuan').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var SatuanJS = {
|
||||
FoniaJS.setFocus('#Cari_Satuan');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_satuan',
|
||||
sendParam: ['mode_detail='+mode,'SatuanID='+ID],
|
||||
@@ -40,15 +40,15 @@ var SatuanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -60,7 +60,7 @@ var SatuanJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','SatuanID','Kode_Satuan','Nama_Satuan','Aktif','Cari_Satuan'],
|
||||
@@ -71,7 +71,7 @@ var SatuanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var SupplierJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Sup').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var SupplierJS = {
|
||||
FoniaJS.setFocus('#Cari_Sup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_supplier',
|
||||
sendParam: ['mode_detail='+mode,'SupID='+ID],
|
||||
@@ -38,15 +38,15 @@ var SupplierJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -60,7 +60,7 @@ var SupplierJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','SupID','Kode_Sup','Nama_Sup','Alamat_Sup','Telp_Sup','No_NPWP','No_NITKU','Aktif','Cari_Sup'],
|
||||
@@ -73,7 +73,7 @@ var SupplierJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
@@ -14,7 +14,7 @@ var VarianJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Varian').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var VarianJS = {
|
||||
FoniaJS.setFocus('#Cari_Varian');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_varian',
|
||||
sendParam: ['mode_detail='+mode,'VarianID='+ID],
|
||||
@@ -40,15 +40,15 @@ var VarianJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -58,7 +58,7 @@ var VarianJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','VarianID','Nama_Varian','Aktif','Cari_Varian'],
|
||||
@@ -69,7 +69,7 @@ var VarianJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
|
||||
Reference in New Issue
Block a user