chengsc
2024-10-17 26356a0e6472be4620651adceddda0e38c78fffa
HTML/views/ASNSetting/ArrivalNotice.html
@@ -62,13 +62,14 @@
                        <option value="1">正在执行</option>
                        <option value="2">执行完成</option>
                        <option value="3">订单关闭</option>
                        <option value="4">上传完毕</option>
                     </select>
                  </div>
               </div>
               <div class="layui-inline">
                  <label class="layui-form-label">批次号</label>
                  <label class="layui-form-label">进厂编号</label>
                  <div class="layui-input-inline">
                     <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>
@@ -91,9 +92,18 @@
                  <div class="layui-input-inline">
                     <select name="Type" id="Type" lay-filter="Type" lay-search>
                        <option value=""></option>
                        <!-- JC24 -->
                        <option value="0">成品入库</option>
                        <option value="1">采购入库</option>
                        <option value="2">中间品入库</option>
                        <option value="3">退货入库</option>
                        <option value="4">车间余料退回入库</option>
                        <option value="5">其它入库</option>
                        <option value="6">代储入库</option>
                        <option value="7">寄存入库</option>
                        <!-- JC09 -->
                        <option value="0">标准产品入库</option>
                        <option value="1">非标产品入库</option>
                        <!-- <option value="0">标准产品入库</option>
                        <option value="1">非标产品入库</option> -->
                        <!-- JC08 -->
                        <!-- <option value="0">成品入库</option>
                        <option value="1">原料入库</option>
@@ -163,22 +173,25 @@
               <script type="text/html" id="toolbarDemo1">
                  {{# function GetBtn1(d){
                     var html = ''; 
                     if (d.Status == '0' && d.Origin == '录入') {
                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs editClass" lay-event="edit">
                           <i class="layui-icon layui-icon-edit"></i>编辑</a>`;
                     }
                     switch (d.Status) {
                        case "0" :
                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs editClass" lay-event="edit">
                              <i class="layui-icon layui-icon-edit"></i>编辑</a>
                              <a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
                              <i class="layui-icon layui-icon-delete"></i>删除</a>
                              <a class="layui-btn layui-btn-normal layui-btn-xs clossClass" lay-event="closs">
                              <i class="layui-icon layui-icon-ok"></i>订单关闭</a>`;
                           html += `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
                                 <i class="layui-icon layui-icon-delete"></i>删除</a>`;
                           break; 
                        case "1" : 
                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs clossClass" lay-event="closs">  <i class="layui-icon layui-icon-ok"></i>订单关闭</a>
                              <a class="layui-btn layui-btn-danger layui-btn-xs cheXiaoClass" lay-event="chexiao"> <i class="layui-icon layui-icon-delete"></i>撤销</a>`;
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs clossClass" lay-event="closs">  <i class="layui-icon layui-icon-ok"></i>关单</a>
                                 <a class="layui-btn layui-btn-danger layui-btn-xs cheXiaoClass" lay-event="chexiao"> <i class="layui-icon layui-icon-delete"></i>撤销</a>`;
                           break;
                        case "2" : 
                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs clossClass" lay-event="closs">  <i class="layui-icon layui-icon-ok"></i>订单关闭</a>
                              <a class="layui-btn layui-btn-danger layui-btn-xs cheXiaoClass" lay-event="chexiao"> <i class="layui-icon layui-icon-delete"></i>撤销</a>`;
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs clossClass" lay-event="closs">  <i class="layui-icon layui-icon-ok"></i>关单</a>
                                 <a class="layui-btn layui-btn-danger layui-btn-xs cheXiaoClass" lay-event="chexiao"> <i class="layui-icon layui-icon-delete"></i>撤销</a>`;
                           break;
                        case "3" :
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs checkClass" lay-event="check">  <i class="layui-icon layui-icon-ok"></i>复核</a>`;
                           break;
                        default : 
                        break; 
@@ -203,6 +216,8 @@
                           html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">执行完毕</button>`; 
                        } else if(d.Status=='3') { 
                           html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">订单关闭</button>`; 
                        } else if(d.Status=='4') {
                           html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">上传完毕</button>`;
                        } else {
                           
                        }
@@ -216,10 +231,22 @@
                  {{# function GetBtn4(d){
                        var html = ``;
                        if(d.Type=='0'){ 
                           html = `标准产品入库`;
                           html = `成品入库`;
                        } else if(d.Type=='1') { 
                           html = `非标产品入库`;
                        } else {
                           html = `采购入库`;
                        } else if(d.Type=='2') {
                           html = `中间品入库`;
                        }else if(d.Type=='3') {
                           html = `退货入库`;
                        }else if(d.Type=='4') {
                           html = `车间余料退回入库`;
                        }else if(d.Type=='5') {
                           html = `其它入库`;
                        }else if(d.Type=='6') {
                           html = `代储入库`;
                        }else if(d.Type=='7') {
                           html = `寄存入库`;
                        }else {
                           
                        }
                        return html;
@@ -251,6 +278,14 @@
                  }}
                  {{ GetBtn7(d) }}
               </script>
               <script type="text/html" id="templetCheckTime">
                  {{# function GetBtn11(d){
                        return formatDate(d.CheckTime);
                     }
                  }}
                  {{ GetBtn11(d) }}
               </script>
               <!-- #endregion -->
            </div>
            <div class="position-relative"><!-- class="position-relative" --><!-- 自定义表头加上 -->
@@ -270,11 +305,24 @@
               </script>
 
               <script type="text/html" id="toolbarDemoList">
                  {{# function GetBtn2(d){
                  {{# function GetBtn2(d){
                     console.log(d);
                        var html = ``;
                        if(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.AsnType =="1" && (d.Status == "0" || d.Status == "1")){
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel">
                              <i class="layui-icon layui-icon-edit"></i>生成标签</a>`;
                        }
                        if(d.AsnType == "4"&& (d.Status == "0" || d.Status == "1")){
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel2">
                              <i class="layui-icon layui-icon-edit"></i>生成标签</a>`;
                        }
                        if(d.AsnType == "5"&& (d.Status == "0" || d.Status == "1") && (d.PackagNo != ""|| d.PackagNo!=null)){
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel">
                              <i class="layui-icon layui-icon-edit"></i>生成标签</a>`;
                        }
                        return html;
                     } 
@@ -359,7 +407,7 @@
            elem: '#EndTime'
            , format: 'yyyy-MM-dd' //可任意组合
         });
         var h1 = GetTableTopHeight();
         var h2 = GetTableBottomHeight();
@@ -371,163 +419,26 @@
         var TotalColsArr = [[
                  {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
                  {field: 'ASNNo',title: '入库单号',align: 'center',fixed: 'left',sort: true,width: 180, "disabled": true},
                  {field: 'Status',title: '执行状态',align: 'center',templet: '#buttonTpl'},
                  {field: 'Status',title: '执行状态',align: 'center',width: 100,templet: '#buttonTpl'},
                  {field: 'Origin',title: '来源',align: 'center',width: 80},
                  {field: 'OrderCode',title: '上游单号',align: 'center',width: 180},
                  {field: 'CustomerName',title: '客户名称',align: 'center'},
                  {field: 'Type',title: '单据类型',align: 'center',templet: '#templetType'},
                  {field: 'CompleteTime',title: '完成时间',align: 'center',templet: '#templetCompleteTime'},
                  {field: 'Type',title: '单据类型',align: 'center',width: 100,templet: '#templetType'},
                  {field: 'CompleteTime',title: '完成时间',align: 'center',width: 165,templet: '#templetCompleteTime'},
                  {field: 'Demo',title: '备注',align: 'center',width: 180},
                  {field: 'CreateUserName',title: '创建人',align: 'center',width: 110},
                  {field: 'CreateTime',title: '创建时间',align: 'center',templet: '#templetCreateTime'},
                  {field: 'CreateTime',title: '创建时间',align: 'center',width: 165,templet: '#templetCreateTime'},
                  {field: 'UpdateUserName',title: '修改人',align: 'center',width: 110},
                  {field: 'UpdateTime',title: '修改时间',align: 'center',templet: '#templetUpdateTime'},
                  {field: 'UpdateTime',title: '修改时间',align: 'center',width: 165,templet: '#templetUpdateTime'},
                  {field: 'CheckUserName',title: '复核人',align: 'center',width: 110},
                  {field: 'CheckTime',title: '复核时间',align: 'center',width: 165,templet: '#templetCheckTime'},
                  {field: 'caozuo',title: '操作',fixed: 'right',width: 280,align: 'center',toolbar: '#toolbarDemo1', "disabled": true}
               ]];
         var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
         //#endregion
         function refreshTable() {
            //#region 原始非自定义列
            // var param = {
            //       ASNNo: $("#ASNNo").val(),
            //       Type: $("#Type").val(),
            //       Status: $("#Status").val(),
            //       CustomerName: $("#CustomerName").val(),
            //       LotNo: $("#LotNo").val(),
            //       SkuNo: $("#SkuNo").val(),
            //       SkuName: $("#SkuName").val(),
            //       StartTime:$("#StartTime").val(),
            //       EndTime: $("#EndTime").val()
            // };
            // table.render({
            //    elem: '#LAY-app-content-list',
            //    url: IP + "/BllAsn/GetArrivalNoticeList",
            //    method: 'POST',
            //    height: h1,
            //    id: 'LAY-app-content-list',
            //    where: param,
            //    contentType: 'application/json',
            //    headers:{ToKen:$.cookie('token')},
            //    page: true,
            //    even: true,
            //    limit: pageCnt,
            //    limits: pageLimits,
            //    cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
            //    done: function(res) {
            //       setRight();
            //       //aaa = $('#LAY-app-content-list').next().find('.layui-table-main').find('tr[data-index="0"]').find('td[data-field="ASNNo"]');
            //       // refreshTablemx(res.data[0].ASNNo);
            //    },
            //    cols: [
            //       [{
            //          title: '序号',
            //          type: 'numbers',
            //          width: 50,
            //          align: 'center',
            //          fixed: 'left'
            //       },
            //        {
            //          field: 'ASNNo',
            //          title: '入库单号',
            //          align: 'center',
            //          fixed: 'left',
            //          sort: true,
            //          width: 180
            //       },
            //       {
            //          field: 'Status',
            //          title: '执行状态',
            //          align: 'center',
            //          templet: function (d) {
            //                switch (d.Status) {
            //                   case "0" : return '<button class="layui-btn layui-btn-radius layui-btn-xs">等待执行</button>';
            //                   case "1" : return '<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">正在执行</button>';
            //                   case "2" : return '<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">执行完毕</button>';
            //                   case "3" : return '<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">订单关闭</button>';
            //                   default : return "";
            //                }
            //             }
            //       },
            //       {
            //          field: 'Origin',
            //          title: '来源',
            //          align: 'center',
            //          width: 80
            //       },
            //       {
            //          field: 'CustomerName',
            //          title: '客户名称',
            //          align: 'center'
            //       },
            //       {
            //          field: 'Type',
            //          title: '单据类型',
            //          align: 'center',
            //          templet: function (d) {
            //                switch (d.Type) {
            //                   case "0" : return "标准产品入库";
            //                   case "1" : return "非标产品入库";
            //                   default : return "";
            //                }
            //                // JC08
            //                // switch (d.Status) {
            //                //    case "0" : return "成品入库";
            //                //    case "1" : return "原料入库";
            //                //    case "2" : return "退货入库";
            //                //    default : return "";
            //                // }
            //             }
            //       },
            //       {
            //          field: 'CompleteTime',
            //          title: '完成时间',
            //          align: 'center',
            //          hide:true,
            //          templet: function (d) {
            //             return formatDate2(d.CompleteTime);
            //          }
            //       },
            //       {
            //          field: 'CreateUserName',
            //          title: '创建人',
            //          align: 'center',
            //          width: 110
            //       },
            //       {
            //          field: 'CreateTime',
            //          title: '创建时间',
            //          align: 'center',
            //          templet: function (d) {
            //             return formatDate(d.CreateTime);
            //          }
            //       },
            //       {
            //          field: 'UpdateUserName',
            //          title: '修改人',
            //          align: 'center',
            //          hide:false,
            //          width: 110
            //       },
            //       {
            //          field: 'UpdateTime',
            //          title: '修改时间',
            //          align: 'center',
            //          hide:false,
            //          templet: function (d) {
            //             return formatDate(d.UpdateTime);
            //          }
            //       }, {
            //          title: '操作',
            //          fixed: 'right',
            //          width: 240,
            //          align: 'center',
            //          toolbar: '#toolbarDemo1'
            //       }]
            //    ]
            // });
            //#endregion
            //#region 自定义表头
            var colsJson
            var param1={
@@ -590,8 +501,8 @@
                  {field: 'SkuNo',title: '物料编码',align: 'center',width: 100}, 
                  {field: 'SkuName',title: '物料名称',align: 'center',width: 200}, 
                  {field: 'Standard',title: '物料规格',align: 'center',width: 130}, 
                  {field: 'LotNo',title: '批次号',align: 'center',width: 100},
                  {field: 'SupplierLot',title: '供货批次',align: 'center',width: 100},
                  {field: 'LotNo',title: '进厂编号',align: 'center',width: 100},
                  {field: 'SupplierLot',title: '原厂批号',align: 'center',width: 100},
                  {field: 'Qty',title: '数量',align: 'center',width: 70}, 
                  {field: 'FactQty',title: '已组数量',align: 'center',width: 90}, 
                  {field: 'CompleteQty',title: '完成数量',align: 'center',width: 90}, 
@@ -603,6 +514,7 @@
                  {field: 'PackagName',title: '包装名称',align: 'center',width: 110,}, 
                  {field: 'IsBale',title: '是否裹包',align: 'center',width: 150}, 
                  {field: 'IsBelt',title: '是否打带',align: 'center',width: 150},
                  {field: 'OrderDetailCode',title: '上游单号',align: 'center',width: 180},
                  {field: 'UDF1',title: '自定义列1',align: 'center',width: 140}, 
                  {field: 'UDF2',title: '自定义列2',align: 'center',width: 140}, 
                  {field: 'UDF3',title: '自定义列3',align: 'center',width: 140}, 
@@ -612,191 +524,12 @@
                  {field: 'CreateTime',title: '创建时间',align: 'center',width: 160,templet: '#templetCreateTime2'},
                  {field: 'UpdateUserName',title: '修改人',align: 'center',width: 150,},
                  {field: 'UpdateTime',title: '修改时间',align: 'center',width: 150,templet: '#templetUpdateTime3'},  
                  {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'left',toolbar: '#toolbarDemoList', "disabled": true}
                  {field: 'caozuo',title: '操作',fixed: 'right',width: 150,align: 'left',toolbar: '#toolbarDemoList', "disabled": true}
               ]];
         var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码
         //#endregion
         function refreshTablemx(asnNo) {
            //#region 原始非自定义列
            // var param = {
            //    ASNNo:asnNo
            // };
            // table.render({
            //    elem: '#LAY-app-content-list2',
            //    url: IP + "/BllAsn/GetArrivalNoticeDetailList",
            //    method: 'POST',
            //    height: h2,
            //    id: 'LAY-app-content-list2',
            //    where: param,
            //    contentType: 'application/json',
            //    toolbar:'#toolbarDemo',
            //    defaultToolbar:  ['filter'], //'print', 'exports'
            //    headers:{ToKen:$.cookie('token')},
            //    page: true,
            //    limit: pageCnt,
            //    limits: pageLimits,
            //    cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
            //    done: function() {
            //       setRight()
            //    },
            //    cols: [
            //       [{
            //          title: '序号',
            //          type: 'numbers',
            //          width: 50,
            //          align: 'center',
            //          fixed: 'left'
            //       },
            //       {
            //          field: 'ASNNo',
            //          title: '入库单号',
            //          align: 'center',
            //          fixed: 'left',
            //          sort: true,
            //          width: 180
            //       },
            //       {
            //          field: 'SkuNo',
            //          title: '物料编码',
            //          align: 'center',
            //          width: 100
            //       }, {
            //          field: 'SkuName',
            //          title: '物料名称',
            //          align: 'center',
            //          width: 200
            //       }, {
            //          field: 'Standard',
            //          title: '物料规格',
            //          align: 'center',
            //          width: 130
            //       }, {
            //          field: 'LotNo',
            //          title: '批次号',
            //          align: 'center',
            //          width: 100
            //       },{
            //          field: 'SupplierLot',
            //          title: '供货批次',
            //          align: 'center',
            //          fixed: 'right',
            //          width: 100,
            //          hide:true
            //       }, {
            //          field: 'Qty',
            //          title: '数量',
            //          align: 'center',
            //          width: 70
            //       }, {
            //          field: 'FactQty',
            //          title: '已组数量',
            //          align: 'center',
            //          width: 90
            //       }, {
            //          field: 'CompleteQty',
            //          title: '完成数量',
            //          align: 'center',
            //          width: 90
            //       },
            //       {
            //          field: 'CompleteTime',
            //          title: '完成时间',
            //          align: 'center',
            //          width: 160,
            //          templet: function (d) {
            //             return formatDate(d.CompleteTime);
            //          }
            //       },
            //       {
            //          field: 'UnitName',
            //          title: '计量单位',
            //          align: 'center',
            //          width: 90
            //       },
            //       {
            //          field: 'Price',
            //          title: '单价',
            //          align: 'center',
            //          width: 65,
            //          hide:true
            //       }, {
            //          field: 'Money',
            //          title: '金额',
            //          align: 'center',
            //          width: 65,
            //          hide:true
            //       },
            //       {
            //          field: 'LotText',
            //          title: '批次描述',
            //          align: 'center',
            //          width: 120
            //       },{
            //          field: 'PackagName',
            //          title: '包装名称',
            //          align: 'center',
            //          width: 110,
            //       }, {
            //          field: 'IsBale',
            //          title: '是否裹包',
            //          align: 'center',
            //          width: 150,
            //          hide:true
            //       }, {
            //          field: 'IsBelt',
            //          title: '是否打带',
            //          align: 'center',
            //          width: 150,
            //          hide:true
            //       },{
            //          field: 'CreateUserName',
            //          title: '创建人',
            //          align: 'center',
            //          width: 100
            //       },
            //       {
            //          field: 'CreateTime',
            //          title: '创建时间',
            //          align: 'center',
            //          width: 160,
            //          templet: function (d) {
            //             return formatDate(d.CreateTime);
            //          }
            //       },
            //       // {
            //       //    field: 'Id',
            //       //    title: '入库明细Id',
            //       //    align: 'center',
            //       //    hide: true,
            //       //    width: 150,
            //       // },
            //       {
            //          field: 'UpdateUserName',
            //          title: '修改人',
            //          align: 'center',
            //          hide:true,
            //          width: 150,
            //       },
            //       {
            //          field: 'UpdateTime',
            //          title: '修改时间',
            //          align: 'center',
            //          hide:true,
            //          width: 150,
            //          templet: function (d) {
            //             return formatDate(d.UpdateTime);
            //          }
            //       },  {
            //          title: '操作',
            //          fixed: 'right',
            //          width: 100,
            //          align: 'left',
            //          toolbar: '#toolbarDemoList'
            //       }]
            //    ]
            // });
            //#endregion
            //#region 自定义表头
            var colsJson2
@@ -851,6 +584,9 @@
               $(".cheXiaoClass").hide(); 
               $(".clossClass").hide(); 
               $(".editDemoClass").hide();//备注
               $(".checkClass").hide(); //复核
               $(".addLabelClass").hide(); //复核
            });
            sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
               if (res.code == 0) { //成功 
@@ -883,6 +619,16 @@
                     if (res.data[k].MenuName == "维护入库单备注") {
                        $(function() {
                           $(".editDemoClass").show(); 
                        });
                     }
                     if (res.data[k].MenuName == "复核入库单") {
                        $(function() {
                           $(".checkClass").show();
                        });
                     }
                     if (res.data[k].MenuName == "生成标签") {
                        $(function() {
                           $(".addLabelClass").show();
                        });
                     }
                  }
@@ -962,6 +708,32 @@
                     var param = {
                        Id:data.Id,
                     };
                     sendData(IP + "/UpApi/CloseAsn", param, 'post', function (res) {
                        if (res.code == 0) { //成功
                           layer.msg(res.msg, {
                              icon: 1,
                              time: 2000 //2秒关闭(如果不配置,默认是3秒)
                           }, function () {
                              refreshTable();
                              doing = true
                           });
                        } else { //不成功
                           layer.msg(res.msg, {
                              icon: 2,
                              time: 2000 //2秒关闭(如果不配置,默认是3秒)
                           }, function () { doing = true });
                        }
                     });
                  });
                  break;
               case "check" :
                  // 代码区域
                  layer.confirm('确定复核此单据吗?', function(index) {
                     // 代码区域
                     var param = {
                        Id:data.Id,
                     };
                     sendData(IP + "/UpApi/FinishAsn", param, 'post', function (res) {
                        if (res.code == 0) { //成功
                           layer.msg(res.msg, {
@@ -978,7 +750,7 @@
                           }, function () { doing = true });
                        }
                     });
                  });
                  });
                  
                  break;
               case "chexiao" :
@@ -1074,6 +846,7 @@
         //明细表操作栏事件
         table.on('tool(LAY-app-content-list2)', function (obj) {
            var data = obj.data;
            var id = data.Id;
            switch(obj.event)
            {
               case "del" :
@@ -1103,6 +876,84 @@
                  });   
                  break;
               case "Addlabel" :
                  layer.open({
                     type: 2,
                     title: '生成标签',
                     content: 'LabelPrintSelect.html?Id='+id+'&SupplierLot='+data.SupplierLot,
                     maxmin: true,
                     area: ['480px', '615px'],
                     btn: ['确定','取消'],
                     yes: function(index, layero){
                        var iframeWindow = window['layui-layer-iframe'+ index]
                        ,submitID = 'layuiadmin-app-form-edit'
                        ,submit = layero.find('iframe').contents().find('#'+ submitID);
                        //监听提交
                        iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
                           var field = data.field; //获取提交的字段
                           console.log(field);
                           //提交 Ajax 成功后,静态更新表格中的数据
                           //"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+
                           var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty
                           +"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime
                           +"&StoreTime="+field.storeTime+"&SupplierLot="+field.SupplierLot;
                           layer.open({
                              type: 2,
                              title: '生成标签',
                              content: 'LabelPrint.html?'+str,
                              maxmin: true,
                              area: ['660px', '660px'],
                              btn: ['取消'],
                           });
                        });
                        submit.trigger('click');
                     }
                  });
                  break;
               case "Addlabel2" :
                  layer.open({
                     type: 2,
                     title: '生成标签',
                     content: 'LabelPrintSelect.html?Id='+id+'&Type=4'+'&SupplierLot='+data.SupplierLot,
                     maxmin: true,
                     area: ['480px', '615px'],
                     btn: ['确定','取消'],
                     yes: function(index, layero){
                        var iframeWindow = window['layui-layer-iframe'+ index]
                        ,submitID = 'layuiadmin-app-form-edit'
                        ,submit = layero.find('iframe').contents().find('#'+ submitID);
                        //监听提交
                        iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
                           var field = data.field; //获取提交的字段
                           console.log(field);
                           //提交 Ajax 成功后,静态更新表格中的数据
                           //"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+
                           var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty
                           +"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime
                           +"&StoreTime="+field.storeTime+'&SupplierLot='+field.SupplierLot;
                           layer.open({
                              type: 2,
                              title: '生成标签',
                              content: 'LabelPrint.html?'+str,
                              maxmin: true,
                              area: ['660px', '660px'],
                              btn: ['取消'],
                           });
                        });
                        submit.trigger('click');
                     }
                  });
                  break;
               default:break;
            }
         });