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.
 
 
 
 
 

145 lines
4.8 KiB

<#import "../master.ftl" as master>
<@master.layout>
<style>
#fm label {
width: 150px;
}
</style>
<div class="page-header">
<h2>Comparison of IFS Receipt Quantity</h2>
</div>
<table id="dg" class="easyui-datagrid" style="width:100%;height:460px;display: none;"
data-options="pagination: true, showFooter: true, singleSelect:true, fitColumns:true , url:'/prepress/getReceiveQty',method:'get',pageSize:20,toolbar:'#tb'">
<thead>
<tr>
<th data-options="field:'orderNo',width:100">Order No</th>
<th data-options="field:'qtyCompleteIfs',width:100">IFS Qty Received</th>
<th data-options="field:'qtyComplete',width:100">Received Qty</th>
<th data-options="field:'statement',width:80,align:'left', formatter:getStatement">Close status</th>
<th data-options="field:'id', width:100, editor:'textbox', formatter: formatAction">Actions</th>
</tr>
</thead>
</table>
<div id="tb" style="padding:10px 5px;display: none;">
<div>
订单号: <input class="easyui-textbox" id="orderNo" style="width:110px">
Serials Date: <input class="easyui-datebox" id="startTime" style="width:100px">
To: <input class="easyui-datebox" id="endTime" style="width:100px">
<a href="#nowhere" id="queryLink" class="easyui-linkbutton" iconCls="icon-search">Search</a>
</div>
</div>
<div id="dlgDtls" class="easyui-dialog" style="width:600px;display: none;"
closed="true" data-options="modal:true" >
<table id="dgDtls" class="easyui-datagrid" style="width:100%;height:300px;display: none;"
data-options="pagination: false, showFooter: true, singleSelect:true, fitColumns:true , method:'get', pageSize:50">
<thead>
<tr>
<th data-options="field:'serialNo',width:100">Serials Number</th>
</tr>
</thead>
</table>
</div>
<script>
$(window).resize(function () {
$("#dg").datagrid({"height": $(window).height() - $(".datagrid").offset().top - 20});
});
$(function () {
$(window).resize();
});
$("#queryLink").click(function(){
var dg = $('#dg').datagrid({
queryParams: {
orderNo: $("#orderNo").val(),
startTime: $("#startTime").val(),
endTime: $("#endTime").val(),
}
});
});
/* function formatAction(value, row){
var action;
if(row.statement=="Y"){
action = "Closed";
}else{
action = "<a onclick='closedRoll(\""+row.orderNo+ "\",\""+row.serialRowStart+"\",\""+row.serialRowEnd+"\",\""+row.rollNo+"\")'>Close</a>";
}
return action;
} */
//菜单
function formatAction(value, row){
var labelTags = '';
if(row.confirmBy != null && row.confirmBy != ''){
return ''
}
//判断数量
if (Math.abs(Number(row.qtyComplete) - Number(row.qtyCompleteIfs)) >= row.packageQty){
labelTags = "<a onclick='confirmOrder(\""+row.orderNo+ "\")'>Confirm</a>";
}
return labelTags;
}
//结单
function confirmOrder(orderNo){
$.messager.confirm('Confirm','Confirm this SO ?',function(r){
if (r){
$.post('/aoi/confirmOrder',{'orderNo': orderNo, 'username': username},function(result){
if (result.success){
$('#dg').datagrid('reload');
$.messager.alert('info',result.msg, 'info');
} else {
$.messager.alert('Error',result.msg, 'error');
}
},'json');
}
});
}
//获取结单状态
function getStatement(value, row){
if(value==""||value==null||value=="N"){
return "Open";
}else if(value=="Y"){
return "Closed";
}
}
//结单
function closedRoll(orderNo,serialRowStart,serialRowEnd,rollNo){
$.messager.confirm('Confirm','Close confirm ?',function(r){
if (r){
$.post('/scanning/closedSoInfo',{orderNo: orderNo,serialRowStart: serialRowStart,serialRowEnd: serialRowEnd,rollNo: rollNo},function(result){
console.log(result);
if (result.success){
$('#dg').datagrid('reload');
} else {
$.messager.alert('Error',result.errorMsg, 'error');
}
},'json');
}
});
}
//TT扫描入库和IFS入库数量如果不相等,异常提醒
$('#dg').datagrid({
rowStyler:function(index,row){
if ((row.confirmedBy == null || row.confirmedBy == '') && Number(row.qtyComplete)!=Number(row.qtyCompleteIfs)){
return 'background-color:#ff534d;font-weight:bold;';
}
}
});
</script>
</@master.layout>