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

3 days 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:'/prepress/getReceiveQty',method:'get',pageSize:20,toolbar:'#tb'">
  13. <thead>
  14. <tr>
  15. <th data-options="field:'orderNo',width:100">Order No</th>
  16. <th data-options="field:'qtyCompleteIfs',width:100">IFS Qty Received</th>
  17. <th data-options="field:'qtyComplete',width:100">Received Qty</th>
  18. <th data-options="field:'statement',width:80,align:'left', formatter:getStatement">Close status</th>
  19. <th data-options="field:'id', width:100, editor:'textbox', formatter: formatAction">Actions</th>
  20. </tr>
  21. </thead>
  22. </table>
  23. <div id="tb" style="padding:10px 5px;display: none;">
  24. <div>
  25. 订单号: <input class="easyui-textbox" id="orderNo" style="width:110px">
  26. Serials Date: <input class="easyui-datebox" id="startTime" style="width:100px">
  27. To: <input class="easyui-datebox" id="endTime" style="width:100px">
  28. <a href="#nowhere" id="queryLink" class="easyui-linkbutton" iconCls="icon-search">Search</a>
  29. </div>
  30. </div>
  31. <div id="dlgDtls" class="easyui-dialog" style="width:600px;display: none;"
  32. closed="true" data-options="modal:true" >
  33. <table id="dgDtls" class="easyui-datagrid" style="width:100%;height:300px;display: none;"
  34. data-options="pagination: false, showFooter: true, singleSelect:true, fitColumns:true , method:'get', pageSize:50">
  35. <thead>
  36. <tr>
  37. <th data-options="field:'serialNo',width:100">Serials Number</th>
  38. </tr>
  39. </thead>
  40. </table>
  41. </div>
  42. <script>
  43. $(window).resize(function () {
  44. $("#dg").datagrid({"height": $(window).height() - $(".datagrid").offset().top - 20});
  45. });
  46. $(function () {
  47. $(window).resize();
  48. });
  49. $("#queryLink").click(function(){
  50. var dg = $('#dg').datagrid({
  51. queryParams: {
  52. orderNo: $("#orderNo").val(),
  53. startTime: $("#startTime").val(),
  54. endTime: $("#endTime").val(),
  55. }
  56. });
  57. });
  58. /* function formatAction(value, row){
  59. var action;
  60. if(row.statement=="Y"){
  61. action = "Closed";
  62. }else{
  63. action = "<a onclick='closedRoll(\""+row.orderNo+ "\",\""+row.serialRowStart+"\",\""+row.serialRowEnd+"\",\""+row.rollNo+"\")'>Close</a>";
  64. }
  65. return action;
  66. } */
  67. //菜单
  68. function formatAction(value, row){
  69. var labelTags = '';
  70. if(row.confirmBy != null && row.confirmBy != ''){
  71. return ''
  72. }
  73. //判断数量
  74. if (Math.abs(Number(row.qtyComplete) - Number(row.qtyCompleteIfs)) >= row.packageQty){
  75. labelTags = "<a onclick='confirmOrder(\""+row.orderNo+ "\")'>Confirm</a>";
  76. }
  77. return labelTags;
  78. }
  79. //结单
  80. function confirmOrder(orderNo){
  81. $.messager.confirm('Confirm','Confirm this SO ?',function(r){
  82. if (r){
  83. $.post('/aoi/confirmOrder',{'orderNo': orderNo, 'username': username},function(result){
  84. if (result.success){
  85. $('#dg').datagrid('reload');
  86. $.messager.alert('info',result.msg, 'info');
  87. } else {
  88. $.messager.alert('Error',result.msg, 'error');
  89. }
  90. },'json');
  91. }
  92. });
  93. }
  94. //获取结单状态
  95. function getStatement(value, row){
  96. if(value==""||value==null||value=="N"){
  97. return "Open";
  98. }else if(value=="Y"){
  99. return "Closed";
  100. }
  101. }
  102. //结单
  103. function closedRoll(orderNo,serialRowStart,serialRowEnd,rollNo){
  104. $.messager.confirm('Confirm','Close confirm ?',function(r){
  105. if (r){
  106. $.post('/scanning/closedSoInfo',{orderNo: orderNo,serialRowStart: serialRowStart,serialRowEnd: serialRowEnd,rollNo: rollNo},function(result){
  107. console.log(result);
  108. if (result.success){
  109. $('#dg').datagrid('reload');
  110. } else {
  111. $.messager.alert('Error',result.errorMsg, 'error');
  112. }
  113. },'json');
  114. }
  115. });
  116. }
  117. //TT扫描入库和IFS入库数量如果不相等,异常提醒
  118. $('#dg').datagrid({
  119. rowStyler:function(index,row){
  120. if ((row.confirmedBy == null || row.confirmedBy == '') && Number(row.qtyComplete)!=Number(row.qtyCompleteIfs)){
  121. return 'background-color:#ff534d;font-weight:bold;';
  122. }
  123. }
  124. });
  125. </script>
  126. </@master.layout>