nfc add customer fixed

This commit is contained in:
yarzar_code
2020-09-02 17:16:01 +06:30
parent f8b56cf48a
commit fa630fd527
6 changed files with 241 additions and 256 deletions

View File

@@ -262,10 +262,7 @@
$("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
},100);
}
});
@@ -283,6 +280,7 @@
// get CardNo from Java
function setCardNo(cardNo){
$("#sxModal").hide();
check_member = localStorage.getItem("member_card");
if(cardNo.length == 16){
if(check_member == "true"){

View File

@@ -173,11 +173,7 @@
localStorage.setItem("member_card",true);
var cardNo = "";
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
$("#filter_form").submit();
},100);
});

View File

@@ -396,10 +396,7 @@
$("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
},100);
}
});
@@ -416,9 +413,7 @@
var sale_id = $("#sale_id").val() || 0;
var customer_mamber_card_no = 0;
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#search").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
@@ -446,7 +441,6 @@
}
});
}
},100);
});
/*new customer UI func:*/
@@ -495,12 +489,14 @@
// get CardNo from Java
function setCardNo(cardNo){
$("#sxModal").hide();
check_member = localStorage.getItem("member_card");
if(cardNo.length == 16){
if(check_member == "true"){
$("#paypar_account_no").val(cardNo);
$("#search").val(cardNo);
$("#type").val("card");
$("#filter_form").submit();
}else{
if($.inArray(cardNo, paypar_account_no) !== -1){
swal({

View File

@@ -263,9 +263,7 @@
$("#is_paymemberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#paypar_account_no").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
@@ -320,7 +318,6 @@
}
});
}
},100);
});
// Read NFC card no from java
@@ -330,6 +327,7 @@
// get CardNo from Java
function setCardNo(cardNo){
$("#sxModal").hide();
if(cardNo.length == 16){
$("#paypar_account_no").val(cardNo);
}

View File

@@ -257,7 +257,6 @@
$("#is_paymemberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#paypar_account_no").val();
@@ -316,7 +315,7 @@
}else{
swal("Opp","Please Check Member","warning")
}
},100);
});
// Read NFC card no from java
@@ -326,6 +325,7 @@
// get CardNo from Java
function setCardNo(cardNo){
$("#sxModal").hide();
if(cardNo.length == 16){
$("#paypar_account_no").val(cardNo);
}

View File

@@ -1119,7 +1119,6 @@ $(document).ready(function(){
$("#is_memberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#paypar_account_no").val();
@@ -1144,7 +1143,6 @@ $(document).ready(function(){
}
});
}
},100);
});
// Read NFC card no from java
@@ -1156,6 +1154,7 @@ $(document).ready(function(){
// get CardNo from Java
function setCardNo(cardNo){
$("#sxModal").hide();
if(cardNo.length == 16){
$("#paypar_account_no").val(cardNo);
}
@@ -1530,7 +1529,6 @@ $(document).ready(function(){
$("#is_paymemberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#paypar_account_no").val();
@@ -1608,7 +1606,6 @@ $(document).ready(function(){
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
});
}
},100);
});
// QR Code Reader