This commit is contained in:
Yan
2017-09-15 14:20:53 +06:30
parent f5c32229b7
commit 3e0371a9fb
2 changed files with 5 additions and 4 deletions

View File

@@ -119,19 +119,19 @@ $(function() {
$("#qr_code").on('click', function(e){ $("#qr_code").on('click', function(e){
var code = ""; var code = "";
setTimeout(function(){ setTimeout(function(){
console.log("hi") var hi=getQRCode();
getQRCode(); alert(hi);
},100); },100);
}); });
// Read qrcode from java // Read qrcode from java
function getQRCode(){ function getQRCode(){
code2lab.readQRCode(); return code2lab.readQRCode();
} }
// get QRCode from Java // get QRCode from Java
function setQRCode(code){ function setQRCode(code){
alert(code); $("#qr_code").text(code);
$("#search").val(code); $("#search").val(code);
} }

View File

@@ -147,6 +147,7 @@ $(document).on('click', '.cashier_number', function(event){
return false; return false;
} }
}); });
$("#redeem").click(function(){ $("#redeem").click(function(){
valid_amount = $("#valid_amount").val(); valid_amount = $("#valid_amount").val();
sale_id = $("#valid_amount").attr('data-value'); sale_id = $("#valid_amount").attr('data-value');