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.
114 lines
3.6 KiB
114 lines
3.6 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:'/aoi/getReceiveQty',method:'get',pageSize:20,toolbar:'#tb'">
|
|
<thead>
|
|
<tr>
|
|
<th data-options="field:'orderNo',width:100">SO No</th>
|
|
<th data-options="field:'partNo',width:100">Part No</th>
|
|
<th data-options="field:'qty',width:100">Lot Size</th>
|
|
<th data-options="field:'packageQty',width:100">Standard Package Qty</th>
|
|
<th data-options="field:'qtyCompleteIfs',width:100">IFS Qty Received</th>
|
|
<th data-options="field:'qtyComplete',width:100">Qty Received</th>
|
|
<th data-options="field:'confirmBy',width:100">Confirmed By</th>
|
|
<th data-options="field:'confirmDate',width:100">Confirmed Time</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>
|
|
SO No: <input class="easyui-textbox" id="orderNo" style="width:110px">
|
|
Part No: <input class="easyui-textbox" id="partNo" 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>
|
|
|
|
|
|
|
|
|
|
<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(),
|
|
partNo: $("#partNo").val()
|
|
}
|
|
});
|
|
});
|
|
|
|
function formatAction(value, row){
|
|
var action='';
|
|
if(row.confirmBy !=null&&row.confirmBy !=''){
|
|
return ''
|
|
}
|
|
if (Math.abs(Number(row.qtyComplete)-Number(row.qtyCompleteIfs))>=row.packageQty){
|
|
action = "<a onclick='confirmOrder(\""+row.orderNo+ "\")'>ComFirm</a>";
|
|
}
|
|
return action;
|
|
}
|
|
//获取结单状态
|
|
function getStatement(value, row){
|
|
if(value==""||value==null||value=="N"){
|
|
return "Open";
|
|
}else if(value=="Y"){
|
|
return "Closed";
|
|
}
|
|
}
|
|
//结单
|
|
function confirmOrder(orderNo){
|
|
$.messager.confirm('Confirm','Are you sure to close the order ?',function(r){
|
|
if (r){
|
|
$.post('/aoi/confirmOrder',{orderNo: orderNo},function(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.confirmBy !=null&&row.confirmBy !=''){
|
|
return ''
|
|
}
|
|
|
|
if (Math.abs(Number(row.qtyComplete)-Number(row.qtyCompleteIfs))>=row.packageQty){
|
|
return 'background-color:#ff534d;font-weight:bold;';
|
|
}
|
|
}
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
</@master.layout>
|
|
|