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

1 week ago
  1. <#import "../master.ftl" as master>
  2. <@master.layout>
  3. <style>
  4. #fm label {
  5. width: 150px;
  6. }
  7. </style>
  8. <div class="page-header">
  9. <h2>Comparison of IFS Receipt Quantity</h2>
  10. </div>
  11. <table id="dg" class="easyui-datagrid" style="width:100%;height:460px;display: none;"
  12. data-options="pagination: true, showFooter: true, singleSelect:true, fitColumns:true , url:'/aoi/getReceiveQty',method:'get',pageSize:20,toolbar:'#tb'">
  13. <thead>
  14. <tr>
  15. <th data-options="field:'orderNo',width:100">SO No</th>
  16. <th data-options="field:'partNo',width:100">Part No</th>
  17. <th data-options="field:'qty',width:100">Lot Size</th>
  18. <th data-options="field:'packageQty',width:100">Standard Package Qty</th>
  19. <th data-options="field:'qtyCompleteIfs',width:100">IFS Qty Received</th>
  20. <th data-options="field:'qtyComplete',width:100">Qty Received</th>
  21. <th data-options="field:'confirmBy',width:100">Confirmed By</th>
  22. <th data-options="field:'confirmDate',width:100">Confirmed Time</th>
  23. <th data-options="field:'id',width:100,editor:'textbox', formatter:formatAction">Actions</th>
  24. </tr>
  25. </thead>
  26. </table>
  27. <div id="tb" style="padding:10px 5px;display: none;">
  28. <div>
  29. SO No: <input class="easyui-textbox" id="orderNo" style="width:110px">
  30. Part No: <input class="easyui-textbox" id="partNo" style="width:110px">
  31. Serials Date: <input class="easyui-datebox" id="startTime" style="width:100px">
  32. To: <input class="easyui-datebox" id="endTime" style="width:100px">
  33. <a href="#nowhere" id="queryLink" class="easyui-linkbutton" iconCls="icon-search">Search</a>
  34. </div>
  35. </div>
  36. <script>
  37. $(window).resize(function () {
  38. $("#dg").datagrid({"height": $(window).height() - $(".datagrid").offset().top - 20});
  39. });
  40. $(function () {
  41. $(window).resize();
  42. });
  43. $("#queryLink").click(function(){
  44. var dg = $('#dg').datagrid({
  45. queryParams: {
  46. orderNo: $("#orderNo").val(),
  47. partNo: $("#partNo").val()
  48. }
  49. });
  50. });
  51. function formatAction(value, row){
  52. var action='';
  53. if(row.confirmBy !=null&&row.confirmBy !=''){
  54. return ''
  55. }
  56. if (Math.abs(Number(row.qtyComplete)-Number(row.qtyCompleteIfs))>=row.packageQty){
  57. action = "<a onclick='confirmOrder(\""+row.orderNo+ "\")'>ComFirm</a>";
  58. }
  59. return action;
  60. }
  61. //获取结单状态
  62. function getStatement(value, row){
  63. if(value==""||value==null||value=="N"){
  64. return "Open";
  65. }else if(value=="Y"){
  66. return "Closed";
  67. }
  68. }
  69. //结单
  70. function confirmOrder(orderNo){
  71. $.messager.confirm('Confirm','Are you sure to close the order ?',function(r){
  72. if (r){
  73. $.post('/aoi/confirmOrder',{orderNo: orderNo},function(result){
  74. if (result.success){
  75. $('#dg').datagrid('reload');
  76. } else {
  77. $.messager.alert('Error',result.errorMsg, 'error');
  78. }
  79. },'json');
  80. }
  81. });
  82. }
  83. //TT扫描入库和IFS入库数量如果不相等,异常提醒
  84. $('#dg').datagrid({
  85. rowStyler:function(index,row){
  86. if(row.confirmBy !=null&&row.confirmBy !=''){
  87. return ''
  88. }
  89. if (Math.abs(Number(row.qtyComplete)-Number(row.qtyCompleteIfs))>=row.packageQty){
  90. return 'background-color:#ff534d;font-weight:bold;';
  91. }
  92. }
  93. });
  94. </script>
  95. </@master.layout>