admin
2 天以前 338d57a800a86220fcf43d33c681e67b9d601ba6
HTML/views/StatisticalReport/BoxInfor.html
@@ -16,6 +16,14 @@
         margin-bottom: 1px;
         margin-right: 1px;
      }
      .hideCls {
         display: none;
      }
      .showCls {
         display: block;
      }
   </style>
   <script>
      // 这里是需要在页面渲染之前执行的代码
@@ -335,16 +343,70 @@
                        <button class="layui-btn layui-btn-normal layui-btn-xs approvalBtnupt" id="approvalBtnupt" lay-event="edit">
                            <i class="layui-icon layui-icon-edit"></i>详情
                        </button>
                  <button class="layui-btn layui-btn-normal layui-btn-xs printBtnupt" id="printBtnupt" lay-event="print">
                            <i class="layui-icon layui-icon-print"></i>补打
                        </button>
                    </script>
         </div>
      </div>
      <div class="layui-form hideCls" lay-filter="layuiadmin-app-form-list" id="print"
         style="width: 100%;height:100%;">
         <div style="display: flex;align-items: center;justify-content: center; height: 260px;">
            <table border="0" id="table"
               style="width: 90%; height:240px;border-collapse: collapse;table-layout: fixed;border:none">
               <tr>
                  <td class="font-size12">
                     物料编号:
                     <table id="SkuNoP" class="font-size12"></table>
                  </td>
               </tr>
               <tr>
                  <td class="font-size12">
                     物料名称:
                     <table id="SkuNameP" class="font-size12"></table>
                  </td>
               </tr>
               <tr>
                  <td class="font-size12">
                     批次号:
                     <table id="LotNoP" class="font-size12"></table>
                  </td>
               </tr>
               <tr>
                  <td class="font-size12">
                     生产日期:
                     <table id="ProductionTimeP" class="font-size12"></table>
                  </td>
               </tr>
               <tr>
                  <td class="font-size12">
                     有效期:
                     <table id="ExpirationTimeP" class="font-size12"></table>
                  </td>
               </tr>
               <tr>
                  <td style="padding: 5px 0px;">
                     <img id="imgBar" style=" height: 60px;" />
                  </td>
               </tr>
            </table>
         </div>
         <div style="page-break-after: always;"></div>
      </div>
      <div class="layui-form hideCls" lay-filter="layuiadmin-app-form-list" id="print2"
         style="width: 100%;height:100%;"></div>
   </div>
   <script src="../../layuiadmin/layui/layui.js"></script>
   <script src="../../js/public.js"></script>
   <script src="../../js/jquery-3.5.1.min.js"></script>
   <script src="../../js/jquery.cookie.js"></script>
   <script src="../../js/jquery.print.js"></script>
   <script>
      var uid = $.cookie('userId');
      layui.config({
@@ -396,7 +458,7 @@
         function addZero(s) {
            return s < 10 ? ('0' + s) : s;
         };
         var $ = layui.$;
         var yemianid = 0;
         refreshTable("", "", "", "", "", "", "", "", "", "", "", "", "", "");
@@ -410,8 +472,8 @@
            { field: 'RoadwayName', title: '所属巷道', align: 'center', width: 120, },
            { field: 'AreaName', title: '所属区域', align: 'center', width: 120, },
            { field: 'LocatNo', title: '储位地址', align: 'center', width: 100, },
            { field: 'PalletNo', title: '托盘号', align: 'center', width: 100, },
            { field: 'SkuNo', title: '物料编码', align: 'center', width: 120, },
            { field: 'PalletNo', title: '托盘号', align: 'center', width: 100, sort: true, },
            { field: 'SkuNo', title: '物料编码', align: 'center', width: 120, sort: true, },
            { field: 'SkuName', title: '物料名称', align: 'center', width: 120, },
            { field: 'LotNo', title: '批次号', align: 'center', width: 100, },
            //{ field: 'LotText', title: '批次描述', align: 'center' },
@@ -464,6 +526,7 @@
                  limits: pageLimits,
                  even: true,
                  cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                  autoSort: false, // 添加这个配置
                  done: function () {
                     setRight();
                     //自定义列宽
@@ -790,6 +853,111 @@
                  }
               });
            }
            //补打
            if (obj.event === 'print') {
               var param1 = {
                  BoxNo: data.BoxNo,
               };
               synData(IP + "/Statistical/GetBuDaLabelList", param1, 'post', function (res) {
                  if (res.code == 0) { //成功
                     var labels = "";
                     for (var z = 0; z < res.data.length; z++) {
                        var idd = "";
                        if (z - 1 >= 0) {
                           idd = (z - 1).toString();
                        }
                        $("#SkuNoP").attr("id", "SkuNoP" + z.toString());
                        $("#SkuNoP" + z.toString()).html(res.data[z].SkuNo);
                        $("#SkuNameP").attr("id", "SkuNameP" + z.toString());
                        $("#SkuNameP" + z.toString()).html(res.data[z].SkuName);
                        $("#PackageStandardP").attr("id", "PackageStandardP" + z.toString());
                        $("#PackageStandardP" + z.toString()).html(res.data[z].PackageStandard);
                        $("#StandardP").attr("id", "StandardP" + z.toString());
                        $("#StandardP" + z.toString()).html(res.data[z].Standard);
                        $("#QtyP").attr("id", "QtyP" + z.toString());
                        $("#QtyP" + z.toString()).html(res.data[z].Qty);
                        $("#SupplierLotP").attr("id", "SupplierLotP" + z.toString());
                        $("#SupplierLotP" + z.toString()).html(res.data[z].SupplierLot);
                        $("#LotNoP").attr("id", "LotNoP" + z.toString());
                        $("#LotNoP" + z.toString()).html(res.data[z].LotNo);
                        $("#SupplierLotP").attr("id", "SupplierLotP" + z.toString());
                        $("#SupplierLotP" + z.toString()).html(res.data[z].SupplierLot);
                        $("#ExpirationTimeP").attr("id", "ExpirationTimeP" + z.toString());
                        $("#ExpirationTimeP" + z.toString()).html(formatDate2(res.data[z].ExpirationTime));
                        $("#ProductionTimeP").attr("id", "ProductionTimeP" + z.toString());
                        $("#ProductionTimeP" + z.toString()).html(formatDate2(res.data[z].ProductionTime));
                        $("#imgBar").attr("id", "imgBar" + z.toString());
                        $("#imgBar" + z.toString()).attr("src", res.data[z].ImgStr);
                        // console.log("#SkuNo"+z.toString());
                        labels += $("#print").html();
                        //console.log(labels);
                        $("#SkuNoP" + z.toString()).attr("id", "SkuNoP");
                        $("#SkuNoP").html("");
                        $("#SkuNameP" + z.toString()).attr("id", "SkuNameP");
                        $("#SkuNameP").html("");
                        $("#PackageStandardP" + z.toString()).attr("id", "PackageStandardP");
                        $("#PackageStandardP").html("");
                        $("#QtyP" + z.toString()).attr("id", "QtyP");
                        $("#QtyP").html("");
                        $("#StandardP" + z.toString()).attr("id", "StandardP");
                        $("#StandardP").html("");
                        $("#LotNoP" + z.toString()).attr("id", "LotNoP");
                        $("#LotNoP").html("");
                        $("#SupplierLotP" + z.toString()).attr("id", "SupplierLotP");
                        $("#SupplierLotP").html("");
                        $("#StoreTimeP" + z.toString()).attr("id", "StoreTimeP");
                        $("#StoreTimeP").html("");
                        $("#ExpirationTimeP" + z.toString()).attr("id", "ExpirationTimeP");
                        $("#ExpirationTimeP").html("");
                        $("#imgBar" + z.toString()).attr("id", "imgBar");
                        $("#imgBar").attr("src", "");
                     }
                     // console.log(labels);
                     document.getElementById('print2').innerHTML = "";
                     document.getElementById('print2').innerHTML = labels;
                     $("#print2").removeClass("hideCls");
                     //$("#button").hide();
                     $("#print2").print();
                     //$("#button").show();
                     $("#print2").addClass("hideCls");
                     // $("#LabelStream").val("");
                     // $("#EndBoxCode").val("");
                     // $("#LabelStream2").val("");
                     // $("#EndBoxCode2").val("");
                  } else { //不成功
                     layer.msg(res.msg, {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                     }, function () { });
                  }
               });
            }
         });
         form.on('submit(daochu)', function () {