zhaowc
2025-04-07 19e95f4acc328bbf62a0427fe658d00268019e66
HTML/views/ASNSetting/LabelBox.html
@@ -75,19 +75,19 @@
                  </div>
               </div>
               <div class="layui-inline" style="margin-right: 0;">
                  <label class="layui-form-label" style="width: 60px;">批次号</label>
                  <label class="layui-form-label" style="width: 60px;">进厂编号</label>
                  <div class="layui-input-inline" style="margin-right: 0;">
                     <div class="layui-input-inline" style="margin-right: 0;">
                        <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off"
                        <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off"
                           class="layui-input">
                     </div>
                  </div>
               </div>
               <div class="layui-inline" style="margin-right: 0;">
                  <label class="layui-form-label" style="width: 60px;">供货批次</label>
                  <label class="layui-form-label" style="width: 60px;">原厂批号</label>
                  <div class="layui-input-inline" style="margin-right: 0;">
                     <div class="layui-input-inline" style="margin-right: 0;">
                        <input type="text" id="SupplierLot" name="SupplierLot" placeholder="供货批次"
                        <input type="text" id="SupplierLot" name="SupplierLot" placeholder="原厂批号"
                           autocomplete="off" class="layui-input">
                     </div>
                  </div>
@@ -128,7 +128,7 @@
                     <i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除标签
                  </button>
               </div>
               <!-- 确认出库口弹窗 -->
               <!-- 删除标签页面弹窗 -->
               <div class="layui-inline" id="divDelLotNo" style="display: none; padding-top: 10px;">
                  <div class="layui-inline">
                     <label class="layui-form-label">入库单据</label>
@@ -138,7 +138,7 @@
                     </div>
                  </div>
                  <div class="layui-inline DivLoadingArea" style="margin-top: 10px;">
                     <label class="layui-form-label">批次号</label>
                     <label class="layui-form-label">进厂编号</label>
                     <div class="layui-input-inline" style="width: 220px;">
                        <select name="LotNoSelect" id="LotNoSelect" lay-search>
                           <option value=""></option> 
@@ -146,6 +146,16 @@
                     </div>
                  </div>                     
                   
               </div>
               <!-- 编辑标签页面弹窗 -->
               <div class="layui-inline" id="divEditQty" style="display: none; padding-top: 10px;">
                  <div class="layui-inline">
                     <label class="layui-form-label">数量</label>
                     <div class="layui-input-inline" style="width: 220px;">
                        <input type="text" id="LabelQty" name="LabelQty" placeholder="数量" autocomplete="off" class="layui-input">
                     </div>
                  </div>
               </div>
            </div>
         </div>
@@ -250,9 +260,9 @@
            <script type="text/html" id="toolbarDemoList">
               {{# function GetBtn2(d){
                     var html = '';
                     if(d.Origin == "WMS生成" || d.Status == "0"){
                        html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
                           <i class="layui-icon layui-icon-delete"></i>删除</a>`;
                     if(d.Origin == "WMS生成" && d.Status == "0"){
                        html = `<a class="layui-btn layui-btn-normal layui-btn-xs editClass" lay-event="edit">
                           <i class="layui-icon layui-icon-delete"></i>编辑</a>`;
                        
                     }
                     return html;
@@ -391,45 +401,56 @@
            });
            });
         //明细表操作栏事件
         table.on('tool(Box-list)', function (obj) {
            var data = obj.data;
            var id = data.Id;
            switch(obj.event)
            {
               case "edit" :
                  layer.open({
                     type: 1,
                     title: '编辑标签',
                     content: $('#divEditQty'),
                     maxmin: false,
                     area: ['350px','180px'],
                     btn: ['确定', '取消'],
                     yes: function(index, layero) {
                        var param = {
                           Id: id,
                           Qty: $('#LabelQty').val(),
                        };
                        sendData(IP + "/BllAsn/EditLabelQty", param, 'post', function(res) {
                           if (res.code == 0) { //成功
                              bindTable();
                              layer.msg(res.msg, {
                                 icon: 1,
                                 time: 1500 //1秒关闭(如果不配置,默认是3秒)
                              }, function() {
                                 $('#LabelQty').val("");
                              });
                           } else { //不成功
                              layer.msg(res.msg, {
                                 icon: 2,
                                 time: 3000 //2秒关闭(如果不配置,默认是3秒)
                              }, function() {
                                 bindTable();
                                 $('#LabelQty').val("");
                              });
                           }
                           layer.close(index);
                        });
                     }
                  });
         // // 删除箱支信息
         // table.on('tool(Box-list)', function (obj) {
         //    var data = obj.data;
         //    switch (obj.event) {
         //       case "del":
         //          layer.confirm('确定删除箱支明细吗?', function (index) {
         //             // 代码区域
         //             var param = {
         //                Id: data.Id,
         //                Status: "0",
         //             };
         //             console.log(param);
         //             sendData(IP + "/BllAsn/DelBllBoxInfo", param, 'post', function (res) {
         //                if (res.code == 0) { //成功
         //                   layer.msg(res.msg, {
         //                      icon: 1,
         //                      time: 2000 //2秒关闭(如果不配置,默认是3秒)
         //                   }, function () {
         //                      bindTable();
         //                      doing = true
         //                   });
         //                } else { //不成功
         //                   layer.msg(res.msg, {
         //                      icon: 2,
         //                      time: 2000 //2秒关闭(如果不配置,默认是3秒)
         //                   }, function () { doing = true });
         //                }
         //             });
         //          });
         //          break;
         //       default: break;
         //    }
         // });
         //#region 事件方法
                  break;
               default:break;
            }
         });
         // 查询录入的箱支关系
         //#region 自定义表头
         var TotalColsArr = [[
            { field: 'ASNNo', title: '入库单号', align: 'center',fixed: 'left', width: 180, "disabled": true },
@@ -439,10 +460,11 @@
            { field: 'SkuNo', title: '物料编码', align: 'center', fixed: 'left', width: 140, "disabled": true },
            { field: 'SkuName', title: '物料名称', align: 'center', width: 240, },
            { field: 'Qty', title: '数量', align: 'center', width: 100, },
            { field: 'UnitName', title: '单位', align: 'center', width: 100, },
            { field: 'FullQty', title: '整箱数量', align: 'center', width: 100, },
            { field: 'LotNo', title: '批次号', align: 'center', width: 155, },
            { field: 'LotNo', title: '进厂编号', align: 'center', width: 155, },
            { field: 'LotText', title: '批次描述', align: 'center', width: 165 },
            { field: 'SupplierLot', title: '供货批次', align: 'center', width: 155 },
            { field: 'SupplierLot', title: '原厂批号', align: 'center', width: 155 },
            { field: 'Status', title: '状态', align: 'center', templet: '#templetStatus', width: 90 },
             
            { field: 'Standard', title: '规格/型号', align: 'center', width: 165 },
@@ -459,7 +481,7 @@
            { field: 'CreateUserName', title: '创建人', align: 'center', width: 100 },
            { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime' },
            //{ field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'center', toolbar: '#toolbarDemoList', "disabled": true }
            { field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'center', toolbar: '#toolbarDemoList', "disabled": true }
         ]];
         //url编码
         var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
@@ -507,6 +529,8 @@
                  limits: pageLimits,
                  cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                  done: function (res) {
                     console.log(res);
                     setRight();
                     //自定义列宽
                     SetTableColW('Box-list', 'BllAsn/GetLabelBoxList', TotalColsSysArr);
@@ -522,6 +546,7 @@
            $(function () {
               $(".buDaLabelClass").hide(); 
               $(".delLabelClass").hide(); 
               $(".editClass").hide();
            });
            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
               if (res.code == 0) { //成功 
@@ -536,6 +561,11 @@
                           $(".delLabelClass").show();
                        });
                     } 
                     if (res.data[k].MenuName == "编辑标签") {
                        $(function () {
                           $(".editClass").show();
                        });
                     }
                  }
               } else { //不成功
                  layer.msg('获取权限信息失败', {