You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.9 KiB
57 lines
1.9 KiB
<#import "../master.ftl" as master>
|
|
<@master.layout>
|
|
|
|
<div class="page-header">
|
|
<h3>Scanning - Confirm quantity</h3>
|
|
</div>
|
|
|
|
<div class="row" id="app">
|
|
<div class="col-md-4">
|
|
<p><input id="slittingRollNo" name="slittingRollNo" type="text" class="form-control" placeholder="Slitting Roll No" /></p>
|
|
<table id="tblInfo" class="table">
|
|
</table>
|
|
<p>
|
|
<button class="btn btn-primary" id="btnOK" style="display:none">OK</button>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
$("#slittingRollNo").on("keydown", function(){
|
|
var slittingRollNo = $(this).val();
|
|
if(event.keyCode == 13){
|
|
var $tblInfo = $("#tblInfo");
|
|
$tblInfo.html("");
|
|
$.post("/scanning/getSlittingRoll", {slittingRollNo: slittingRollNo}, function(data){
|
|
console.log(data);
|
|
$("#btnOK").hide();
|
|
if (data.success && data.slittingRoll){
|
|
$tblInfo.append("<tr><td>SO No:</td><td>"+data.slittingRoll.orderNo+"</td></tr>");
|
|
$tblInfo.append("<tr><td>Roll No:</td><td>"+data.slittingRoll.rollNo+"</td></tr>");
|
|
$tblInfo.append("<tr><td>Roll status</td><td>"+(data.slittingRoll.status || "-")+"</td></tr>");
|
|
if (data.slittingRoll.status == "Confirmed"){
|
|
$("#btnOK").show();
|
|
}
|
|
}else{
|
|
$tblInfo.append("<tr><td>"+(data.errorMsg || "")+"</td></tr>");
|
|
}
|
|
})
|
|
}
|
|
});
|
|
|
|
$("#btnOK").on("click", function() {
|
|
postForm("app", "/scanning/confirm/do", function(){
|
|
$("#tblInfo").html($("#slittingRollNo").val() + " SuccessFull");
|
|
$("#slittingRollNo").val("").focus();
|
|
});
|
|
});
|
|
|
|
$(function () {
|
|
$("#slittingRollNo").focus();
|
|
})
|
|
|
|
</script>
|
|
|
|
</@master.layout>
|
|
|