打印装袋标签

来源:互联网 发布:穿越火线游戏数据异常 编辑:程序博客网 时间:2024/04/29 11:56
<!DOCTYPE html><html>     <head>          <title>TODO supply a title</title>          <meta charset="UTF-8">          <meta name="viewport" content="width=device-width, initial-scale=1.0">          <script>               //列表               function loadData(page, pageSize) {                    loading();                    $.ajax({                         url: "/order/bagging/bagging-list",                         async: false,                         dataType: "json",                         type: "post",                         data: {                              bag_number: $.trim($("[name=bag_number]").val()),                              status: $("[name=status]").val(),                              shipping_method: $("[name=shipping_method]").val(),                              sub_shipping_method: $("[name=sub_shipping_method]").val(),                              dateFrom: $("[name=dateFrom]").val(),                              bagger: $("[name=bagger]").val(),                              dateTo: $("[name=dateTo]").val(),                              orders_code: $("[name=orders_code]").val(),                              warehouse_id: $("[name=warehouseId]").val(),                              page: page,                              pageSize: pageSize                         },                         success: function (json) {                              var html = "";                              if (!json.ask) {                                   paginationTotal = 0;                                   html += '<tr><td colspan="11"><{t}>1101016<{/t}></td></tr>';                              } else {                                   paginationTotal = json.total;                                   var j = page == 1 ? 1 : pageSize * (page - 1) + 1;                                   $.each(json.data, function (k, v) {                                        html += '<tr><td><input type="checkbox" class="baglist" name="bagNum[]" value="' + v.opackage_code + '" /></td>';                                        html += '<td>' + v.bagCount + '</td>';                                        html += '<td>' + v.opackage_code + '</td>';                                        html += '<td>' + v.shipping_method + '</td>';                                        html += '<td>' + v.opackage_weight + '</td>';                                        html += '<td>' + v.opackage_qty + '</td>';                                        html += '<td>' + v.status_text + '</td>';                                        html += '<td>' + v.user_name + '</td>';                                        html += '<td>' + v.opackage_create_time + '</td>';                                        html += '<td>' + v.tracking_number + '</td>';                                        html += '<td>';                                        if (v.opackage_status == 1)                                        {                                             html += '<div style="display:inline-block;"><img src="/images/icon/delete.gif" style="cursor:pointer" onClick="deleteBagging(\'' + v.opackage_code + '\')" title="<{t}>12000012<{/t}>"></div>';                                             if ($.inArray(v.shipping_method, inShipping) != -1) {                                                  html += ' | <div style="background: url(&quot;/images/buttonBg.gif&quot;) no-repeat 1px 1px;text-align:center;width:75px;height:30px;display:inline-block;cursor:pointer;" onClick="confirmBagging(\'' + v.opackage_code + '\',\'' + v.shipping_method + '\',\'' + v.opackage_weight + '\',\'bagginglist\')"><{t}>12000053<{/t}></div>';                                             } else {                                                  html += ' | <div style="background: url(&quot;/images/buttonBg.gif&quot;) no-repeat 1px 1px;text-align:center;width:75px;height:30px;display:inline-block;cursor:pointer;" onClick="confirmBagging(\'' + v.opackage_code + '\')"><{t}>12000053<{/t}></div>';                                             }                                        } else if (v.opackage_status == 0 && v.shipping_method == 'STK') {                                             html += '<div style="background: url(&quot;/images/buttonBg.gif&quot;) no-repeat 1px 1px;text-align:center;width:75px;height:30px;display:inline-block;cursor:pointer;" onClick="weigh(\'' + v.opackage_code + '\', ' + v.total_weight + ')"><{t}>12000053<{/t}></div>';                                        } else if (v.opackage_status == 2 && v.shipping_method == 'MLMA') {                                             html += '<input type="button" style="cursor:pointer" onClick="printBagging(\'' + v.opackage_code + '\')" value="打印装袋标签">';                                        }                                        html += '</td></tr>';                                        html += '<tr class="childs" id="child_' + v.opackage_code + '" style="display:none;background:#E6F3F9">';                                        if (v.child.length > 0)                                        {                                             html += '<td colspan="11">';                                             html += '<table border="0" width="100%">';                                             html += '<tr><th style="background:none;"><{t}>1100008<{/t}></th>';                                             //html += '<th style="background:none;">物流号</th>';                                             html += '<th style="background:none;"><{t}>1000004<{/t}>(KG)</th>';                                             html += '<th style="background:none;"><{t}>1000040<{/t}></th></tr>';                                             $.each(v.child, function (kk, vv) {                                                  html += '<tr><td>' + vv.orders_code + '</td>';                                                  //html += '<td>' + vv.tracking_number + '</td>';                                                  html += '<td>' + vv.order_weight + '</td>';                                                  html += '<td>';                                                  if (v.opackage_status != 2)                                                  {                                                       html += '<img src="/images/icon/delete.gif" style="cursor:pointer" onClick="deleteBaggingOrder(\'' + v.opackage_code + '\', \'' + vv.orders_code + '\')">';                                                  }                                                  html += '</td></tr>';                                             });                                             html += '</table></td>';                                        }                                        html += '</tr>';                                   });                              }                              $("#loadData").html(html);                         }                    });                    closeLoading();               }               //打印装袋标签               function printBagging(opackage_code) {                    var pwin = window.open('/warehouse/case-no/print/caseNoBegin/' + opackage_code + '/caseNoEnd/' + opackage_code + '/printType/6.8x3/printOp/1', "print", 'height=250, width=500, top=-200, left=-200, toolbar=no, menubar=no, scrollbars=yes,resizable=yes');                    pwin.window.onload = function () {                         if (isIE) {                              pwin.document.all.WebBrowser.ExecWB(6, 2);                         } else {                              pwin.print();                         }                         pwin.close();                    };               }          </script>     </head>     <body>          <div>TODO write content</div>     </body></html>
原创粉丝点击