bklLiudl
2024-03-09 b0253945570d45c0d44c2613397debc98848c5b6
功能测试修改bug
5个文件已修改
1368 ■■■■ 已修改文件
HTML/views/ASNSetting/ArrivalNoticeDetail.html 277 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/BoxInfo.html 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/PalletBind.html 309 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/BaseSetting/MaterialsForm.html 678 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -21,17 +21,18 @@
            margin-left: -15px;
            margin-right: -15px;
        }
        .layui-table-mend{
        .layui-table-mend {
            position: relative;
        }
    </style>
    <script>
        // 这里是需要在页面渲染之前执行的代码
        document.addEventListener("DOMContentLoaded", function() {
        document.addEventListener("DOMContentLoaded", function () {
            //判断是否开启table列表列宽调整功能。
            GetIsSetColW();
        });
      </script>
    </script>
</head>
<body>
@@ -49,7 +50,7 @@
                    <!-- <option value=""></option> -->
                    <!-- JC24 -->
                    <option value="0" selected>成品入库</option>
                    <option value="1">采购入库</option>
                    <option value="1">采购入库</option>
                    <option value="2">中间品入库</option>
                    <option value="3">退货入库</option>
                    <option value="4">车间余料退回入库</option>
@@ -63,7 +64,9 @@
                </select>
            </div>
            <label class="layui-form-label" style="width: 70px;"><p id="CustomerNamep">客户</p></label>
            <label class="layui-form-label" style="width: 70px;">
                <p id="CustomerNamep">客户</p>
            </label>
            <div class="layui-input-inline">
                <select name="CustomerName" id="CustomerName" lay-verify="" lay-search>
                    <option value=""></option>
@@ -80,8 +83,10 @@
        <div class="layui-form-item" style="margin-bottom: 0;">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="position-relative" style="width: 100%;right: 0;"><!-- class="position-relative" --><!-- 自定义表头加上 -->
                        <table id="LAY-app-content-list" name="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
                    <div class="position-relative" style="width: 100%;right: 0;">
                        <!-- class="position-relative" --><!-- 自定义表头加上 -->
                        <table id="LAY-app-content-list" name="LAY-app-content-list" lay-filter="LAY-app-content-list">
                        </table>
                        <!-- #region 自定义表头 -->
                        <div class="headerSetIcon">
                            <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols">
@@ -91,7 +96,7 @@
                        <!-- #endregion -->
                        <!-- #region 自定义表头-->
                        <script type="text/html" id="templetUDF5">
                        <script type="text/html" id="templetUDF5">
                            {{# function GetBtn(d){
                                    var html = ''; 
                                    html+= '<select name="UDF5" lay-filter="SelctUDF5" data-value="'+d.UDF5+'">'+
@@ -107,7 +112,7 @@
                        </script>
                        <!-- #endregion -->
                    </div>
                    </div>
                    <script type="text/html" id="switchTpl">
                        <input type="checkbox" name="IsBale" value="{{d.SkuNo}}" lay-skin="switch" lay-text="是|否" lay-filter="IsBaleDemo" {{ d.IsBale == "1" ? 'checked' : '' }}>
                    </script>
@@ -151,35 +156,35 @@
                , format: 'yyyy-MM-dd' //可任意组合
            });
            var arr = [];
            var TypeValue=$("#Type").val();
            var TypeValue = $("#Type").val();
            // 加载下拉信息
            getCustomerList();
            // table 基本设置
            //#region 自定义表头
            var TotalColsArr = [[
                        {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
                        {field: 'Id',title: '入库单明细ID',width: 120,align: 'center',fixed: 'left',hide: true, "disabled": true},
                        {field: 'SkuNo',title: '物料编码',minWidth: 100,align: 'center',fixed: 'left', "disabled": true},
                        {field: 'SkuName',title: '物料名称',minWidth: 180,align: 'center',fixed: 'left', "disabled": true},
                        {field: 'LotNo',title: '批次号',align: 'center',edit: 'text',minWidth: 130,fixed: 'left', "disabled": true},
                        {field: 'SupplierLot',title: '供货批次',width: 130,edit: 'text',event: 'setSign',fixed: 'left', "disabled": true},
                        {field: 'Qty',title: '数量',align: 'center',width: 80,edit: 'number',event: 'dataNumber',fixed: 'left', "disabled": true},
                        {field: 'UnitName',title: '计量单位',align: 'center',width: 70},
                        {field: 'Standard',title: '规格',width: 160,align: 'center'},
                        {field: 'LotText',title: '批次描述',align: 'center',edit: 'text',width: 160},
                        {field: 'PackagNo',title: '包装名称',width: 160, templet: "#table-content-Packlist"},
                        {field: 'Price',title: '单价',align: 'center',width: 80},
                        {field: 'Money',title: '金额',align: 'center',width: 100},
                        {field: 'UDF1',title: '自定义列1',align: 'center',edit: 'text',width: 140},
                        {field: 'UDF2',title: '自定义列2',align: 'center',edit: 'text',width: 140},
                        {field: 'UDF3',title: '自定义列3',align: 'center',edit: 'text',width: 140},
                        {field: 'UDF4',title: '自定义列4',align: 'center',edit: 'text',width: 140},
                        {field: 'UDF5',title: '自定义列5',align: 'center',width: 140,templet:'#templetUDF5'},
                        {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'center',templet: '#table-content-list', "disabled": true}
                    ]];
            var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
            var TotalColsArr = [[
                { field: '', title: '序号', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true },
                { field: 'Id', title: '入库单明细ID', width: 120, align: 'center', fixed: 'left', hide: true, "disabled": true },
                { field: 'SkuNo', title: '物料编码', minWidth: 100, align: 'center', fixed: 'left', "disabled": true },
                { field: 'SkuName', title: '物料名称', minWidth: 180, align: 'center', fixed: 'left', "disabled": true },
                { field: 'LotNo', title: '批次号', align: 'center', edit: 'text', minWidth: 130, fixed: 'left', "disabled": true },
                { field: 'SupplierLot', title: '供货批次', width: 130, edit: 'text', event: 'setSign', fixed: 'left', "disabled": true },
                { field: 'Qty', title: '数量', align: 'center', width: 80, edit: 'number', event: 'dataNumber', fixed: 'left', "disabled": true },
                { field: 'UnitName', title: '计量单位', align: 'center', width: 70 },
                { field: 'Standard', title: '规格', width: 160, align: 'center' },
                { field: 'LotText', title: '批次描述', align: 'center', edit: 'text', width: 160 },
                { field: 'PackagNo', title: '包装名称', width: 160, templet: "#table-content-Packlist" },
                { field: 'Price', title: '单价', align: 'center', width: 80 },
                { field: 'Money', title: '金额', align: 'center', width: 100 },
                { field: 'UDF1', title: '自定义列1', align: 'center', edit: 'text', width: 140 },
                { field: 'UDF2', title: '自定义列2', align: 'center', edit: 'text', width: 140 },
                { field: 'UDF3', title: '自定义列3', align: 'center', edit: 'text', width: 140 },
                { field: 'UDF4', title: '自定义列4', align: 'center', edit: 'text', width: 140 },
                { field: 'UDF5', title: '自定义列5', align: 'center', width: 140, templet: '#templetUDF5' },
                { field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'center', templet: '#table-content-list', "disabled": true }
            ]];
            var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
            //#endregion
            //#region 原始非自定义列
@@ -337,20 +342,20 @@
            //#region 自定义表头
            var infoOptions;
            var colsJson;
            var param1={
                Href:'BllAsn/GetArrivalNoticeDetailList2'
            var param1 = {
                Href: 'BllAsn/GetArrivalNoticeDetailList2'
            };
            sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
                if (res.code == 0){
                    if(res.data=='' || res.data==undefined || res.data==null){
                        colsJson=TotalColsArr
                    }else{
                        colsJson= eval(res.data);
            sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
                if (res.code == 0) {
                    if (res.data == '' || res.data == undefined || res.data == null) {
                        colsJson = TotalColsArr
                    } else {
                        colsJson = eval(res.data);
                    }
                }else{
                    colsJson=TotalColsArr
                } else {
                    colsJson = TotalColsArr
                }
                infoOptions={
                infoOptions = {
                    elem: '#LAY-app-content-list',
                    height: 'full-110',
                    id: 'LAY-app-content-list',
@@ -358,26 +363,26 @@
                    limit: pageCnt,
                    limits: pageLimits,
                    cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                    done: function(){
                    done: function () {
                        //选中下拉框的值        
                        layui.each($('select'), function (index, item) {
                            var elem = $(item);
                            if(elem.data('value')!='' && elem.data('value')!=undefined){
                            if (elem.data('value') != '' && elem.data('value') != undefined) {
                                elem.val(elem.data('value')).parents('table.layui-table-cell').css('overflow', 'visible');
                            }
                            }
                        });
                        form.render();
                        form.render();
                        //自定义列宽
                        SetTableColW('LAY-app-content-list','BllAsn/GetArrivalNoticeDetailList2',TotalColsSysArr);
                    },
                    cols:colsJson
                        SetTableColW('LAY-app-content-list', 'BllAsn/GetArrivalNoticeDetailList2', TotalColsSysArr);
                    },
                    cols: colsJson
                };
                // 渲染Table
                refreshTable(null);
            });
            //#endregion
            // 添加编辑明细 
            var id = getQueryString('id');
@@ -392,8 +397,8 @@
                        console.log(res)
                        $("input[name='ASNNo']").val(res.data[0].ASNNo);
                        $("#Type option[value = '" + res.data[0].Type + "']").prop("selected", true);
                        $("#CustomerName option[value = '" + res.data[0].CustomerNo + "']").prop("selected", true);
                        $("#Type").attr("disabled", "disabled");
                        getCustomerList(res.data[0].CustomerNo);            // 根据单据类型加载客户信息
                        var paramDetail = {
                            ASNNo: id,
@@ -413,7 +418,9 @@
                                    curr: 1
                                }
                                table.render(infoOptions);
                                form.render('select');
                            } else { //不成功
                                layer.msg(res.msg, {
                                    icon: 2,
@@ -449,11 +456,11 @@
                            fixed: false,
                        });
                    },
                    customCols: function(){
                    customCols: function () {
                        layer.open({
                            type: 2,
                            title: '自定义列',
                            content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeDetailList2&ColsSysArr='+TotalColsSysArr,
                            content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeDetailList2&ColsSysArr=' + TotalColsSysArr,
                            maxmin: false,
                            resize: false,
                            area: ['970px', '650px']
@@ -469,16 +476,16 @@
            };
            //单据类型变更时清空table列表信息
            form.on('select(Type)',function(data){
            form.on('select(Type)', function (data) {
                var value = data.value;
                if(value!=TypeValue){
                if (value != TypeValue) {
                    console.log(value);
                    getCustomerList();
                    arr = [];
                    // 渲染Table
                    refreshTable(null);
                    TypeValue=value;
                }
                    TypeValue = value;
                }
            });
            //监听修改UDF5下拉框update到表格中
@@ -491,21 +498,21 @@
            });
            //监听数量值变化自动计算金额
            table.on('edit(LAY-app-content-list)', function(obj){
                if(obj.field=='Qty'){
                    var data=obj.data;
                    if(data.Qty!=undefined && data.Qty !=''){
                        data.Money=data.Qty*data.Price
            table.on('edit(LAY-app-content-list)', function (obj) {
                if (obj.field == 'Qty') {
                    var data = obj.data;
                    if (data.Qty != undefined && data.Qty != '') {
                        data.Money = data.Qty * data.Price
                        var menu = layui.table.cache["LAY-app-content-list"];
                        for(var i =0;i<menu.length;i++){
                            if(menu[i].Id==data.Id){
                                menu[i].Money=data.Money
                        for (var i = 0; i < menu.length; i++) {
                            if (menu[i].Id == data.Id) {
                                menu[i].Money = data.Money
                                break;
                            }
                        }
                        $.extend(infoOptions, {
                                data: menu,
                            data: menu,
                        });
                        table.render(infoOptions);
                    }
@@ -567,10 +574,10 @@
                    });
                    return;
                }
                var type= $("#Type").val();
                if(type=='6'){
                    var customerName=$("#CustomerName").val();
                    if(customerName==''){
                var type = $("#Type").val();
                if (type == '6') {
                    var customerName = $("#CustomerName").val();
                    if (customerName == '') {
                        layer.msg("代储单据请选择货主!", {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
@@ -607,7 +614,7 @@
            }
            // 绑定下拉信息
            function getCustomerList() {
            function getCustomerList(CustomerNo) {
                /*
                0:客户
                    退货入库
@@ -623,58 +630,56 @@
                    if (res.code == 0) { //成功
                        $("#CustomerName").empty();
                        $("#CustomerName").append('<option value =""></option>');
                        // 根据单据类型确认加载是客户or供应商or货主下拉信息
                        var TypeNum = 0;
                        switch ($("#Type").val()) {
                            case "3": //退货入库
                                TypeNum = 0;
                                console.log(TypeNum)
                                break;
                            case "1": //采购入库
                            case "5": //其它入库
                                TypeNum = 1;
                                console.log(TypeNum)
                                break;
                            case "0": //成品入库
                            case "2": //中间品入库
                            case "4": //车间余料入库
                            case "6": //代储入库
                            case "7": //寄存入库
                                TypeNum = 2;
                                console.log(TypeNum)
                                break;
                        }
                        for (var i = 0; i < res.data.length; i++) {
                            var TypeNum = 0;
                            switch($("#Type").val())
                            {
                                case "3": //退货入库
                                    TypeNum = 0;
                                    console.log(TypeNum)
                                    break;
                                case "1": //采购入库
                                case "5": //其它入库
                                    TypeNum = 1;
                                    console.log(TypeNum)
                                    break;
                                case "0": //成品入库
                                case "2": //中间品入库
                                case "4": //车间余料入库
                                case "6": //代储入库
                                case "7": //寄存入库
                                    TypeNum = 2;
                                    console.log(TypeNum)
                                    break;
                            }
                            //判断单据类型
                            if (TypeNum == 0)
                            {
                                if (res.data[i].Type == 0)
                                {
                            if (TypeNum == 0) {
                                if (res.data[i].Type == 0) {
                                    $("#CustomerNamep").html("客户");
                                    $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
                                    res.data[i].CustomerName + '</option>');
                                        res.data[i].CustomerName + '</option>');
                                }
                            }
                            else if (TypeNum == 1)
                            {
                                if (res.data[i].Type == 1)
                                {
                            else if (TypeNum == 1) {
                                if (res.data[i].Type == 1) {
                                    $("#CustomerNamep").html("供应商");
                                    $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
                                    res.data[i].CustomerName + '</option>');
                                        res.data[i].CustomerName + '</option>');
                                }
                            }
                            else if (TypeNum == 2)
                            {
                                if (res.data[i].Type == 2)
                                {
                            else if (TypeNum == 2) {
                                if (res.data[i].Type == 2) {
                                    $("#CustomerNamep").html("货主");
                                    $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
                                    res.data[i].CustomerName + '</option>');
                                        res.data[i].CustomerName + '</option>');
                                }
                            }
                        }
                        // 根据客户名称加载选中值
                        $("#CustomerName option[value = '" + CustomerNo + "']").prop("selected", true);
                        form.render('select');
                    } else { //不成功
                        layer.msg(res.msg, {
@@ -703,7 +708,7 @@
                    }
                    arr.push(data[i]); //属性
                }
                $.extend(infoOptions, {
                    data: arr
                });
@@ -713,13 +718,13 @@
                console.log(infoOptions)
                table.render(infoOptions);
            }
            // 添加入库单
            function SetArrivalNotice(data) {
                var item2 = getAsnOrderInfo();
                if (item2 !=-1) {
                if (item2 != -1) {
                    if (doing) {
                        doing = false;
                        if (id == null) {
@@ -771,7 +776,7 @@
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { doing = true });
                    }
                }
                }
            }
            // 提交获取入库单信息
@@ -782,42 +787,40 @@
                for (var i in arr) {
                    console.log(arr[i].LotNo);
                    console.log(arr[i].Qty);
                    if (arr[i].Qty == "" || arr[i].Qty ==undefined) {
                    if (arr[i].Qty == "" || arr[i].Qty == undefined) {
                        layer.msg("请输入入库数量!", {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        });
                        return -1;
                    }
                    if (arr[i].LotNo == "" || arr[i].LotNo ==undefined) {
                    if (arr[i].LotNo == "" || arr[i].LotNo == undefined) {
                        //判断是否为对应不需要批次的单据
                        var TypeNum = 0;
                        switch($("#Type").val())
                        {
                        switch ($("#Type").val()) {
                            //1:采购入库 2:中间品入库 5:其它入库 6:代储入库 7:寄存入库
                            case "1" :
                            case "2" :
                            case "5" :
                            case "6" :
                            case "7" :
                            case "1":
                            case "2":
                            case "5":
                            case "6":
                            case "7":
                                console.log($("#Type").val())
                                TypeNum = 1;
                                break;
                        }
                        console.log(TypeNum)
                        if (TypeNum == 0)
                        {
                        if (TypeNum == 0) {
                            layer.msg("请输入批次!1", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            });
                            return -1;
                        }
                    }
                    if (!reg.test(arr[i].Qty)) {
                        layer.msg("入库数量必须是大于0的整数", {
                            icon: 2,
@@ -839,16 +842,16 @@
                        IsBale: arr[i].IsBale,
                        IsBelt: arr[i].IsBelt,
                        SupplierLot: arr[i].SupplierLot,
                        UDF1:arr[i].UDF1,
                        UDF2:arr[i].UDF2,
                        UDF3:arr[i].UDF3,
                        UDF4:arr[i].UDF4,
                        UDF5:arr[i].UDF5,
                        UDF1: arr[i].UDF1,
                        UDF2: arr[i].UDF2,
                        UDF3: arr[i].UDF3,
                        UDF4: arr[i].UDF4,
                        UDF5: arr[i].UDF5,
                    };
                    DataList.push(item); //属性
                }
                console.log($("#CustomerName").find('option:selected').text());
                var item2 = {
                    ASNNo: $("#ASNNo").val(),
                    Type: $("#Type").val(),
HTML/views/ASNSetting/BoxInfo.html
@@ -36,14 +36,14 @@
    </style>
    <script>
        // 这里是需要在页面渲染之前执行的代码
        document.addEventListener("DOMContentLoaded", function() {
        document.addEventListener("DOMContentLoaded", function () {
            //获取table默认显示数
            pageCntFirst();
            //判断是否开启table列表列宽调整功能。
            GetIsSetColW();
        });
      </script>
    </script>
</head>
@@ -213,7 +213,7 @@
                        {{ GetBtn7(d) }}
                    </script>
                    <!-- #endregion -->
                </div>
                </div>
                <script type="text/html" id="toolbarDemo">
                    <button style="margin-right: 5px;" class="layui-btn layui-btn-sm layuiadmin-btn-list addClass" lay-event="add" >
@@ -271,14 +271,14 @@
            // 搜索方法
            form.on('submit(LAY-app-contlist-search)', function (data) {
                bindTable();
            });
                bindTable();
            });
            // 页面加载绑定Table
            bindTable();
            // 添加导入按钮单机事件
            table.on('toolbar(Box-list)', function (obj) {
                switch (obj.event) {
@@ -300,11 +300,11 @@
                                        icon: 2,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () { doing = true });
                                }
                                }
                            });
                        }
                        break;
                    default: break;
                }
            });
@@ -349,25 +349,25 @@
            // 查询录入的箱支关系
            //#region 自定义表头
            var TotalColsArr = [[
                        {field: 'BoxNo',title: '箱号',align: 'center',fixed: 'left',width: 220, "disabled": true},
                        {field: 'BoxNo2',title: '盒号',align: 'center',fixed: 'left'},
                        {field: 'BoxNo3',title: '支号',align: 'center',fixed: 'left',width: 220, "disabled": true},
                        {field: 'SkuNo',title: '物料编码',align: 'center',fixed: 'left',width: 140, "disabled": true},
                        {field: 'SkuName',title: '物料名称',align: 'center',fixed: 'left',width: 240, "disabled": true},
                        {field: 'LotNo',title: '批次号',align: 'center',width: 155,},
                        {field: 'Qty',title: '数量',align: 'center',width: 100,},
                        {field: 'LotText',title: '批次描述',align: 'center',width: 165},
                        {field: 'ProductionTime',title: '生产日期',align: 'center',width: 160,templet: '#templetProductionTime'},
                        {field: 'ExpirationTime',title: '过期日期',align: 'center',width: 160,templet: '#templetExpirationTime'},
                        {field: 'SupplierLot',title: '供货批次',align: 'center',width: 155},
                        {field: 'InspectMark',title: '抽检标记',align: 'center',templet: '#templetInspectMark',width: 90},
                        {field: 'BitBoxMark',title: '零箱标记',align: 'center',templet: '#templetBitBoxMark',width: 90},
                        {field: 'Origin',title: '来源',align: 'center',},
                        {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}
                    ]];
            var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
                { field: 'BoxNo', title: '箱号', align: 'center', fixed: 'left', width: 220, "disabled": true },
                { field: 'BoxNo2', title: '盒号', align: 'center', fixed: 'left' },
                { field: 'BoxNo3', title: '支号', align: 'center', fixed: 'left', width: 220, "disabled": true },
                { field: 'SkuNo', title: '物料编码', align: 'center', fixed: 'left', width: 140, "disabled": true },
                { field: 'SkuName', title: '物料名称', align: 'center', fixed: 'left', width: 240, "disabled": true },
                { field: 'LotNo', title: '批次号', align: 'center', width: 155, },
                { field: 'Qty', title: '数量', align: 'center', width: 100, },
                { field: 'LotText', title: '批次描述', align: 'center', width: 165 },
                { field: 'ProductionTime', title: '生产日期', align: 'center', width: 160, templet: '#templetProductionTime' },
                { field: 'ExpirationTime', title: '过期日期', align: 'center', width: 160, templet: '#templetExpirationTime' },
                { field: 'SupplierLot', title: '供货批次', align: 'center', width: 155 },
                { field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#templetInspectMark', width: 90 },
                { field: 'BitBoxMark', title: '零箱标记', align: 'center', templet: '#templetBitBoxMark', width: 90 },
                { field: 'Origin', title: '来源', align: 'center', },
                { 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 }
            ]];
            var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
            //#endregion
            function bindTable() {
                //#region 原始非自定义列
@@ -526,18 +526,18 @@
                //#region 自定义表头
                var colsJson
                var param1={
                    Href:'BllAsn/GetBllBoxInfoList'
                var param1 = {
                    Href: 'BllAsn/GetBllBoxInfoList'
                };
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
                    if (res.code == 0){
                        if(res.data=='' || res.data==undefined || res.data==null){
                            colsJson=TotalColsArr
                        }else{
                            colsJson= eval(res.data);
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
                    if (res.code == 0) {
                        if (res.data == '' || res.data == undefined || res.data == null) {
                            colsJson = TotalColsArr
                        } else {
                            colsJson = eval(res.data);
                        }
                    }else{
                        colsJson=TotalColsArr
                    } else {
                        colsJson = TotalColsArr
                    }
                    var param = {
                        BoxNo: $("#BoxNo").val(),
@@ -549,7 +549,7 @@
                        ProductionTime: $("#ProductionTime").val(),
                        InspectMark: $("#InspectMark").val(),
                        BitBoxMark: $("#BitBoxMark").val(),
                        // Origin: "录入",
                        Origin: "录入;导入;赋码",
                    };
                    table.render({
                        elem: '#Box-list',
@@ -570,7 +570,7 @@
                        done: function (res) {
                            setRight();
                            //自定义列宽
                            SetTableColW('Box-list','BllAsn/GetBllBoxInfoList',TotalColsSysArr);
                            SetTableColW('Box-list', 'BllAsn/GetBllBoxInfoList', TotalColsSysArr);
                        },
                        cols: colsJson
                    });
@@ -616,7 +616,7 @@
                $(function () {
                    $(".addClass").hide();
                    $(".DaoRuClass").hide();
                    $(".delClass").hide();
                    $(".delClass").hide();
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功 
@@ -633,7 +633,7 @@
                            }
                            if (res.data[k].MenuName == "删除箱支录入") {
                                $(function () {
                                    $(".delClass").show();
                                    $(".delClass").show();
                                });
                            }
                        }
@@ -782,17 +782,17 @@
                                        doing = true
                                    });
                                } else { //不成功
                                    if(res.msg==undefined){
                                    if (res.msg == undefined) {
                                        layer.msg("后台正在导入中,请稍后查看结果", {
                                            icon: 2,
                                            time: 3000 //2秒关闭(如果不配置,默认是3秒)
                                        }, function () { bindTable();doing = true });
                                    }else{
                                        }, function () { bindTable(); doing = true });
                                    } else {
                                        layer.msg(res.msg, {
                                            icon: 2,
                                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                        }, function () { bindTable();doing = true });
                                    }
                                        }, function () { bindTable(); doing = true });
                                    }
                                }
                            });
                        });
@@ -806,18 +806,18 @@
            //#region 自定义表头
            //自定义表头            
            active = {
                customCols: function(){
                customCols: function () {
                    layer.open({
                        type: 2,
                        title: '自定义列',
                        content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBllBoxInfoList&ColsSysArr='+TotalColsSysArr,
                        content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBllBoxInfoList&ColsSysArr=' + TotalColsSysArr,
                        maxmin: false,
                        resize: false,
                        area: ['970px', '650px']
                    });
                },
            };
            $('.layui-btn').on('click', function() {
            $('.layui-btn').on('click', function () {
                var type = $(this).data('type');
                active[type] ? active[type].call(this) : '';
            });
HTML/views/ASNSetting/PalletBind.html
@@ -25,13 +25,13 @@
    </style>
    <script>
        // 这里是需要在页面渲染之前执行的代码
        document.addEventListener("DOMContentLoaded", function() {
        document.addEventListener("DOMContentLoaded", function () {
            //获取table默认显示数
            pageCntFirst();
            //判断是否开启table列表列宽调整功能。
            GetIsSetColW();
        });
      </script>
    </script>
</head>
<body id="body">
@@ -64,7 +64,7 @@
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 60px;">所属仓库</label>
                        <div class="layui-input-inline">
                            <select name="WareHouseNo" id="WareHouseNo"  lay-filter="getWareHouseNo" lay-search>
                            <select name="WareHouseNo" id="WareHouseNo" lay-filter="getWareHouseNo" lay-search>
                                <option value=""></option>
                            </select>
                        </div>
@@ -130,7 +130,7 @@
                        <label class="layui-form-label">撤销原因</label>
                        <div class="layui-input-inline">
                            <textarea id="Reason" name="Reason" placeholder="请输入内容" class="layui-textarea"></textarea>
                        </div>
                    </div>
                    <div class="layui-inline">
@@ -142,13 +142,13 @@
                    </div>
                </div>
            </div>
            <div class="layui-card-body">
                <div style="position: relative;">
                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title" id="tab">
                            <li  class="layui-this">托盘信息</li>
                            <li >箱码信息</li>
                            <li class="layui-this">托盘信息</li>
                            <li>箱码信息</li>
                        </ul>
                        <div id="center"></div>
@@ -164,28 +164,30 @@
                                        </button>
                                    </div>
                                    <!-- #endregion -->
                                </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="position-relative"><!-- class="position-relative" --><!-- 自定义表头加上 -->
                                    <table id="BoxInfo" lay-filter="BoxInfo"></table>
                                    <!-- #region 自定义表头 -->
                                    <div class="headerSetIcon">
                                        <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols2">
                                        <button class="layui-btn layui-btn-primary layui-btn-sm"
                                            data-type="customCols2">
                                            <i class="layui-icon">&#xe610;</i>
                                        </button>
                                    </div>
                                    <!-- #endregion -->
                                </div>
                            </div>
                        </div>
                    </div>
                    <button style="margin-right: 5px;position: absolute; top: 5px; right: 10px;" class="layui-btn  layuiadmin-btn-list layui-btn-sm addClass" data-type="add">
                    <button style="margin-right: 5px;position: absolute; top: 5px; right: 10px;"
                        class="layui-btn  layuiadmin-btn-list layui-btn-sm addClass" data-type="add">
                        <i class="layui-icon">&#xe654;</i>添加
                    </button>
                </div>
                <script type="text/html" id="PalletBindDemoList">
                    {{# function GetPalletBindBtn(d){
                            var html = ''; 
@@ -227,8 +229,8 @@
                    {{ GetBoxInfoBtn(d) }}
                </script>
                 <!-- #region 自定义表头 -->
                 <script type="text/html" id="templetStatus">
                <!-- #region 自定义表头 -->
                <script type="text/html" id="templetStatus">
                    {{# function GetBtn3(d){
                        switch (d.Status) {
                            case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">等待入库</button>';
@@ -370,11 +372,11 @@
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'table', 'laypage','element', 'layer', 'laydate'], function () {
        }).use(['index', 'table', 'laypage', 'element', 'layer', 'laydate'], function () {
            var table = layui.table,
                form = layui.form,
                element = layui.element;
                laypage = layui.laypage,
            laypage = layui.laypage,
                layer = layui.layer;
            laydate = layui.laydate;
            var h1 = GetTableTabHeight();
@@ -387,7 +389,7 @@
                , format: 'yyyy-MM-dd' //可任意组合
            });
            //tab切换判断值
            var yemianid =0;
            var yemianid = 0;
            //接受全局变量
            let quanSkuNo = 0;
            // 获取table高度
@@ -420,8 +422,7 @@
            // 查询事件
            form.on('select(getWareHouseNo)', function (data) {
                if($("#WareHouseNo").val() == "W01")
                {
                if ($("#WareHouseNo").val() == "W01") {
                    //获取巷道下拉框信息
                    synData(IP + "/Sys/GetRoadwayList", {}, 'get', function (res) {
                        if (res.code == 0) { //成功
@@ -440,38 +441,37 @@
                        }
                    });
                }
                else
                {
                else {
                    $("#RoadwayNo").html('');
                    $("#RoadwayNo").append('<option value=""></option>');
                    form.render('select');
                }
            });
            // 渲染总表
            //#region 自定义表头
            var TotalColsArr = [[
                        {field:'',title: '序号',type: 'numbers',width: 60,align: 'center',fixed: 'left', "disabled": true},
                        {field: 'ASNNo',title: '入库单号',align: 'center',width: 180, "disabled": true},
                        {field: 'ASNDetailNo',title: '入库明细号',align: 'center'},
                        {field: 'PalletNo',title: '托盘号',align: 'center',width: 100},
                        {field: 'PalletNo2',title: '托盘号LV2',align: 'center'},
                        {field: 'PalletNo3',title: '托盘号LV3',align: 'center'},
                        {field: 'LocatNo',title: '储位地址',align: 'center',width: 90},
                        {field: 'RoadwayNo',title: '所属巷道',align: 'center',width: 90,templet: '#RoadwayButton'},
                        {field: 'WareHouseNo',title: '所属仓库',align: 'center',width: 90,templet: '#WareHouseButton'},
                        {field: 'SkuNo',title: '物料编码',align: 'center',width: 110},
                        {field: 'SkuName',title: '物料名称',align: 'center'},
                        {field: 'Qty',title: '数量',align: 'center',width: 90},
                        {field: 'FullQty',title: '整托数量',align: 'center',width: 90},
                        {field: 'Status',title: '执行状态',align: 'center',width: 90,templet: '#templetStatus'},
                        {field: 'BitPalletMark',title: '零托标记',align: 'center',width: 90,templet: '#templetBitPalletMark'},
                        {field: 'CompleteTime',title: '完成时间',align: 'center',width: 165,templet: '#templetCompleteTime'},
                        {field: 'CreateTime',title: '创建时间',align: 'center',width: 165,templet: '#templetCreateTime'},
                        {field:'caozuo',title: '操作',fixed: 'right',width: 180,align: 'center',toolbar: '#PalletBindDemoList', "disabled": true}
                    ]];
            var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
                { field: '', title: '序号', type: 'numbers', width: 60, align: 'center', fixed: 'left', "disabled": true },
                { field: 'ASNNo', title: '入库单号', align: 'center', width: 180, "disabled": true },
                { field: 'ASNDetailNo', title: '入库明细号', align: 'center' },
                { field: 'PalletNo', title: '托盘号', align: 'center', width: 100 },
                { field: 'PalletNo2', title: '托盘号LV2', align: 'center' },
                { field: 'PalletNo3', title: '托盘号LV3', align: 'center' },
                { field: 'LocatNo', title: '储位地址', align: 'center', width: 90 },
                { field: 'RoadwayNo', title: '所属巷道', align: 'center', width: 90, templet: '#RoadwayButton' },
                { field: 'WareHouseNo', title: '所属仓库', align: 'center', width: 90, templet: '#WareHouseButton' },
                { field: 'SkuNo', title: '物料编码', align: 'center', width: 110 },
                { field: 'SkuName', title: '物料名称', align: 'center' },
                { field: 'Qty', title: '数量', align: 'center', width: 90 },
                { field: 'FullQty', title: '整托数量', align: 'center', width: 90 },
                { field: 'Status', title: '执行状态', align: 'center', width: 90, templet: '#templetStatus' },
                { field: 'BitPalletMark', title: '零托标记', align: 'center', width: 90, templet: '#templetBitPalletMark' },
                { field: 'CompleteTime', title: '完成时间', align: 'center', width: 165, templet: '#templetCompleteTime' },
                { field: 'CreateTime', title: '创建时间', align: 'center', width: 165, templet: '#templetCreateTime' },
                { field: 'caozuo', title: '操作', fixed: 'right', width: 180, align: 'center', toolbar: '#PalletBindDemoList', "disabled": true }
            ]];
            var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
            //#endregion
            function bindPalletBind() {
                //#region 原始非自定义列
@@ -659,18 +659,18 @@
                //#region 自定义表头
                var colsJson
                var param1={
                    Href:'BllAsn/GetPalletBindList'
                var param1 = {
                    Href: 'BllAsn/GetPalletBindList'
                };
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
                    if (res.code == 0){
                        if(res.data=='' || res.data==undefined || res.data==null){
                            colsJson=TotalColsArr
                        }else{
                            colsJson= eval(res.data);
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
                    if (res.code == 0) {
                        if (res.data == '' || res.data == undefined || res.data == null) {
                            colsJson = TotalColsArr
                        } else {
                            colsJson = eval(res.data);
                        }
                    }else{
                        colsJson=TotalColsArr
                    } else {
                        colsJson = TotalColsArr
                    }
                    var param = {
                        ASNNo: $("#ASNNo").val(),
@@ -703,7 +703,7 @@
                            setRight()
                            //bindBoxInfo(res.data[0].BindNo);    
                            //自定义列宽
                            SetTableColW('PalletBind','BllAsn/GetPalletBindList',TotalColsSysArr);
                            SetTableColW('PalletBind', 'BllAsn/GetPalletBindList', TotalColsSysArr);
                        },
                        cols: colsJson
                    });
@@ -717,28 +717,28 @@
            // 渲染明细表
            //#region 自定义表头
            var DetailColsArr = [[
                        {field: '',title: '序号',type: 'numbers',width: 60,align: 'center',fixed: 'left', "disabled": true},
                        {field: 'PalletNo',title: '托盘号',align: 'center',width: 95},
                        {field: 'PalletNo2',title: '托盘编号LV2',align: 'center',width: 120},
                        {field: 'PalletNo3',title: '托盘编号LV3',align: 'center',width: 120},
                        {field: 'BoxNo',title: '箱号',align: 'center',width: 220},
                        {field: 'BoxNo2',title: '盒号',align: 'center',width: 220},
                        {field: 'BoxNo3',title: '支号',align: 'center',width: 220},
                        {field: 'SkuNo',title: '物料编码',align: 'center',width: 150},
                        {field: 'SkuName',title: '物料名称',align: 'center',align: 'center',width: 226},
                        {field: 'LotNo',title: '批次号',align: 'center',width: 150,},
                        {field: 'Qty',title: '数量',align: 'center',width: 105,},
                        {field: 'FullQty',title: '整箱数量',align: 'center',width: 105,},
                        {field: 'ProductionTime',title: '生产日期',align: 'center',width: 160,templet: '#templetProductionTime'},
                        {field: 'ExpirationTime',title: '过期日期',align: 'center',width: 180,templet: '#templetExpirationTime'},
                        {field: 'LotText',title: '批次描述',align: 'center',width: 150,},
                        {field: 'SupplierLot',title: '供货批次',align: 'center',width: 150,},
                        {field: 'InspectMark',title: '抽检标记',align: 'center',width:95,templet: '#templetInspectMark'},
                        {field: 'BitBoxMark',title: '零箱标记',align: 'center',width:95,templet: '#templetBitBoxMark'},
                        {field: 'InspectStatus',title: '质量状态',align: 'center',width:95,templet: '#templetInspectStatus'},
                        {field: 'caozuo',title: '操作',fixed: 'right',width: 155,align: 'center',toolbar: '#BoxInfoDemoList', "disabled": true}
                    ]];
            var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码
                { field: '', title: '序号', type: 'numbers', width: 60, align: 'center', fixed: 'left', "disabled": true },
                { field: 'PalletNo', title: '托盘号', align: 'center', width: 95 },
                { field: 'PalletNo2', title: '托盘编号LV2', align: 'center', width: 120 },
                { field: 'PalletNo3', title: '托盘编号LV3', align: 'center', width: 120 },
                { field: 'BoxNo', title: '箱号', align: 'center', width: 220 },
                { field: 'BoxNo2', title: '盒号', align: 'center', width: 220 },
                { field: 'BoxNo3', title: '支号', align: 'center', width: 220 },
                { field: 'SkuNo', title: '物料编码', align: 'center', width: 150 },
                { field: 'SkuName', title: '物料名称', align: 'center', align: 'center', width: 226 },
                { field: 'LotNo', title: '批次号', align: 'center', width: 150, },
                { field: 'Qty', title: '数量', align: 'center', width: 105, },
                { field: 'FullQty', title: '整箱数量', align: 'center', width: 105, },
                { field: 'ProductionTime', title: '生产日期', align: 'center', width: 160, templet: '#templetProductionTime' },
                { field: 'ExpirationTime', title: '过期日期', align: 'center', width: 180, templet: '#templetExpirationTime' },
                { field: 'LotText', title: '批次描述', align: 'center', width: 150, },
                { field: 'SupplierLot', title: '供货批次', align: 'center', width: 150, },
                { field: 'InspectMark', title: '抽检标记', align: 'center', width: 95, templet: '#templetInspectMark' },
                { field: 'BitBoxMark', title: '零箱标记', align: 'center', width: 95, templet: '#templetBitBoxMark' },
                { field: 'InspectStatus', title: '质量状态', align: 'center', width: 95, templet: '#templetInspectStatus' },
                { field: 'caozuo', title: '操作', fixed: 'right', width: 155, align: 'center', toolbar: '#BoxInfoDemoList', "disabled": true }
            ]];
            var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码
            //#endregion
            function bindBoxInfo(BindNo) {
                //#region 原始非自定义列
@@ -915,44 +915,44 @@
                //#region 自定义表头
                var colsJson2
                var param1={
                    Href:'BllAsn/GetBoxInfoList'
                var param1 = {
                    Href: 'BllAsn/GetBoxInfoList'
                };
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
                if (res.code == 0){
                    if(res.data=='' || res.data==undefined || res.data==null){
                        colsJson2=DetailColsArr
                    }else{
                        colsJson2= eval(res.data);
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
                    if (res.code == 0) {
                        if (res.data == '' || res.data == undefined || res.data == null) {
                            colsJson2 = DetailColsArr
                        } else {
                            colsJson2 = eval(res.data);
                        }
                    } else {
                        colsJson2 = DetailColsArr
                    }
                }else{
                        colsJson2=DetailColsArr
                }
                var param = {
                    BindNo: parseInt(BindNo)
                };
                table.render({
                    id: 'BoxInfo',
                    elem: '#BoxInfo',
                    height: h1,
                    url: IP + "/BllAsn/GetBoxInfoList",
                    method: 'post',
                    contentType: 'application/json',
                    headers: { ToKen: $.cookie('token') },
                    where: param,
                    // toolbar: '#BoxInfoDemo',
                    // defaultToolbar: ['filter'], //'print', 'exports'
                    page: true,
                    limit: pageCnt,                  // 默认多少页
                    limits: pageLimits,                // 默认数组[10,20,30,40,50]
                    cellMinWidth: 60,                 // 全局定义常规单元格的最小宽度,layui 2.2.1 新增
                    even: true,
                    done: function () {
                        setRight()
                        //自定义列宽
                        SetTableColW('BoxInfo','BllAsn/GetBoxInfoList',DetailColsSysArr);
                    },
                    cols: colsJson2
                    var param = {
                        BindNo: parseInt(BindNo)
                    };
                    table.render({
                        id: 'BoxInfo',
                        elem: '#BoxInfo',
                        height: h1,
                        url: IP + "/BllAsn/GetBoxInfoList",
                        method: 'post',
                        contentType: 'application/json',
                        headers: { ToKen: $.cookie('token') },
                        where: param,
                        // toolbar: '#BoxInfoDemo',
                        // defaultToolbar: ['filter'], //'print', 'exports'
                        page: true,
                        limit: pageCnt,                  // 默认多少页
                        limits: pageLimits,                // 默认数组[10,20,30,40,50]
                        cellMinWidth: 60,                 // 全局定义常规单元格的最小宽度,layui 2.2.1 新增
                        even: true,
                        done: function () {
                            setRight()
                            //自定义列宽
                            SetTableColW('BoxInfo', 'BllAsn/GetBoxInfoList', DetailColsSysArr);
                        },
                        cols: colsJson2
                    });
                });
                //#endregion
@@ -960,10 +960,10 @@
            // 页面监控,点击查询加载入库总单
            form.on('submit(LAY-app-contlist-search)', function (data) {
                if(yemianid == 0){
                if (yemianid == 0) {
                    bindPalletBind();
                }else if(yemianid == 1){
                } else if (yemianid == 1) {
                    bindBoxInfo(quanSkuNo);
                }
            });
@@ -973,20 +973,20 @@
            //     bindBoxInfo(parseInt(obj.data.Id));
            // });
            //触发行双击事件
            table.on('rowDouble(PalletBind)', function(obj) {
            table.on('rowDouble(PalletBind)', function (obj) {
                $(".layui-tab-title>li").attr("class", "");
                $('.layui-tab-title>li').eq(1).attr('class', 'layui-this');
                $('.layui-tab-content .layui-tab-item').attr('class', 'layui-tab-item')
                $('.layui-tab-content .layui-tab-item').eq(1).attr('class', 'layui-tab-item layui-show')
                quanSkuNo = parseInt(obj.data.Id);
                bindBoxInfo(parseInt(obj.data.Id));
                yemianid=1;
                yemianid = 1;
            });
            // 添加托盘绑定信息 
            var doing = true;
                //添加
            //添加
            var active = {
                add: function () {
                    layer.open({
@@ -998,21 +998,21 @@
                    });
                },
                //#region 自定义表头
                customCols: function(){
                customCols: function () {
                    layer.open({
                        type: 2,
                        title: '自定义列',
                        content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetPalletBindList&ColsSysArr='+TotalColsSysArr,
                        content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetPalletBindList&ColsSysArr=' + TotalColsSysArr,
                        maxmin: false,
                        resize: false,
                        area: ['970px', '650px']
                    });
                },
                customCols2: function(){
                customCols2: function () {
                    layer.open({
                        type: 2,
                        title: '自定义列',
                        content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBoxInfoList&ColsSysArr='+DetailColsSysArr,
                        content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBoxInfoList&ColsSysArr=' + DetailColsSysArr,
                        maxmin: false,
                        resize: false,
                        area: ['970px', '650px']
@@ -1042,7 +1042,7 @@
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () {
                                        bindPalletBind();
                                        bindBoxInfo("0");
                                        bindBoxInfo(quanSkuNo);
                                    });
                                } else { //不成功
                                    layer.msg(res.msg, {
@@ -1064,57 +1064,57 @@
                        });
                        break;
                    case "chexiao" :
                    case "chexiao":
                        layer.open({
                            type: 1,
                            title: '撤销申请',
                            content: $('#divReason'),
                            maxmin: true,
                            area: ['300px','265px'],
                            area: ['300px', '265px'],
                            btn: ['确定', '取消'],
                            yes: function(index, layero) {
                            yes: function (index, layero) {
                                var pa = $('#Reason').val();
                                if (doing== true) {
                                    doing= false;
                                if (doing == true) {
                                    doing = false;
                                    var param = {
                                        Id: data.Id,
                                        Id: data.Id,
                                        Reason: pa,
                                    };
                                    console.log(param);
                                    sendData(IP + "/BllAsn/CancelPalletBind", param, 'get', function(res) {
                                    sendData(IP + "/BllAsn/CancelPalletBind", param, 'get', function (res) {
                                        console.log(res);
                                        if (res.code == 0) { //成功
                                            layer.msg(res.msg, {
                                                icon: 1,
                                                time: 3000 //1秒关闭(如果不配置,默认是3秒)
                                            }, function() {
                                            }, function () {
                                                bindPalletBind();
                                                bindBoxInfo("0");
                                                doing= true;
                                                bindBoxInfo("0");
                                                doing = true;
                                            });
                                        } else { //不成功
                                            layer.msg(res.msg, {
                                                icon: 2,
                                                time: 3000 //2秒关闭(如果不配置,默认是3秒)
                                            }, function() {
                                            }, function () {
                                                bindPalletBind();
                                                bindBoxInfo("0");
                                                doing= true;
                                                bindBoxInfo("0");
                                                doing = true;
                                            });
                                        }
                                        layer.close(index);
                                    });
                                }else{
                                } else {
                                    layer.msg("请勿重复点击", {
                                        icon: 2,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    });
                                }
                            }
                        });
                        });
                        break;
                    default: break;
                }
@@ -1144,7 +1144,7 @@
                                    layer.msg(res.msg, {
                                        icon: 2,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () {});
                                    }, function () { });
                                }
                            });
                        });
@@ -1159,19 +1159,18 @@
                            maxmin: true,
                            area: ['80%', '85%'],
                            btn: ['关闭'],
                            yes: function(index, layero) {
                            yes: function (index, layero) {
                                var iframeWindow = window['layui-layer-iframe' + index],
                                submitID = 'layuiadmin-app-form-edit',
                                submit = layero.find('iframe').contents().find('#' + submitID);
                                if(doing)
                                {
                                    submitID = 'layuiadmin-app-form-edit',
                                    submit = layero.find('iframe').contents().find('#' + submitID);
                                if (doing) {
                                    doing = false;
                                    layer.close(index); //关闭弹层
                                    // refreshTable();
                                    doing = true;
                                }
                            }
                        });
@@ -1224,14 +1223,14 @@
            }
            //监听Tab切换,以改变地址hash值
            element.on('tab(docDemoTabBrief)', function(data){
            element.on('tab(docDemoTabBrief)', function (data) {
                yemianid = data.index
                if(yemianid == 0){
                    bindPalletBind( );
                }else if(yemianid == 1){
                if (yemianid == 0) {
                    bindPalletBind();
                } else if (yemianid == 1) {
                    bindBoxInfo(quanSkuNo);
                }
            });
            });
        });
    </script>
HTML/views/BaseSetting/MaterialsForm.html
@@ -1,32 +1,37 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>物料编码维护</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    </head>
    <body>
        <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 0px 0 0;">
            <div class="layui-form-item" id="uptshow">
                <div class="layui-inline">
                    <label class="layui-form-label">物料号</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="text" name="SkuNo" placeholder="请输入物料编号" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
<head>
    <meta charset="utf-8">
    <title>物料编码维护</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
</head>
<body>
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list"
        style="padding: 20px 0px 0 0;">
        <div class="layui-form-item" id="uptshow">
            <div class="layui-inline">
                <label class="layui-form-label">物料号</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="text" name="SkuNo" placeholder="请输入物料编号" lay-verify="required" autocomplete="off"
                        class="layui-input">
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">物料类别</label>
                    <div class="layui-input-block" style="width:182px">
                        <select name="CategoryNo" id="CategoryNo" lay-verify="required" lay-search>
                            <option value=""></option>
                        </select>
                    </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">物料类别</label>
                <div class="layui-input-block" style="width:182px">
                    <select name="CategoryNo" id="CategoryNo" lay-verify="required" lay-search>
                        <option value=""></option>
                    </select>
                </div>
            </div>
            <!-- <div class="layui-form-item" id="uptshow">
            </div>
        </div>
        <!-- <div class="layui-form-item" id="uptshow">
                <div class="layui-inline">
                    <label class="layui-form-label">物料名称</label>
                    <div class="layui-input-block">
@@ -34,321 +39,324 @@
                    </div>
                </div>
            </div> -->
            <div class="layui-form-item" id="uptshow">
                <div class="layui-inline">
                    <label class="layui-form-label">物料名称</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="upttext" name="SkuName" placeholder="请输入物料名称" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!-- 添加不显示 -->
                <div class="layui-inline" id="Auditishow">
                    <label class="layui-form-label">审核状态</label>
                    <div class="layui-input-block" style="width:182px">
                        <select name="AuditStatusNo" id="AuditStatusNo" lay-verify="" lay-search>
                            <option value=""></option>
                            <option value="0" selected>待审核</option>
                            <option value="9">已通过</option>
                            <option value="1">自定义</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">类型</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search>
                            <option value=""></option>
                            <option value="0">原料</option>
                            <option value="1">包材</option>
                            <option value="2">成品</option>
                            <option value="3">耗材</option>
                            <option value="4">中间品</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline" id="IsControlledshow">
                    <label class="layui-form-label">是否受控</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <select name="IsControlled" id="IsControlled" lay-verify="" lay-verify="" lay-search>
                            <!-- <option value=""></option> -->
                            <option value="0">受控</option>
                            <option value="1">非受控</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline" id="IsInspectshow">
                    <label class="layui-form-label">是否免检</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <select name="IsInspect" id="IsInspect" lay-verify="" lay-verify="" lay-search>
                            <!-- <option value=""></option> -->
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">规格/型号</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="text" name="Standard" placeholder="请输入规格/型号" lay-verify="" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <!-- 单位 -->
                <div class="layui-inline">
                    <label class="layui-form-label">单位</label>
                    <div class="layui-input-block"  style="width: 182px;">
                        <select name="UnitNo" id="UnitNo" lay-verify="" lay-search>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <!-- 包装 -->
                <div class="layui-inline">
                    <label class="layui-form-label">包装</label>
                    <div class="layui-input-block"  style="width: 182px;">
                        <select name="PackagNo" id="PackagNo" lay-verify="" lay-search>
                            <option value=""></option>
                        </select>
                    </div>
        <div class="layui-form-item" id="uptshow">
            <div class="layui-inline">
                <label class="layui-form-label">物料名称</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="upttext" name="SkuName" placeholder="请输入物料名称" lay-verify="required" autocomplete="off"
                        class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">存储环境</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <select name="Environment" id="Environment" lay-verify="" lay-verify="" lay-search>
                            <option value=""></option>
                            <option value="0">常温</option>
                            <option value="1">低温</option>
                            <!-- <option value="3">干燥通风</option> -->
                        </select>
                    </div>
            <!-- 添加不显示 -->
            <div class="layui-inline" id="Auditishow">
                <label class="layui-form-label">审核状态</label>
                <div class="layui-input-block" style="width:182px">
                    <select name="AuditStatusNo" id="AuditStatusNo" lay-verify="" lay-search>
                        <option value=""></option>
                        <option value="0" selected>待审核</option>
                        <option value="9">已通过</option>
                        <option value="1">自定义</option>
                    </select>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">理论重量</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" name="Weight" placeholder="请输入理论重量" lay-verify="" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 70px;">保质期(天)</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" name="Warranty" placeholder="请输入保质期" lay-verify="" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">理论单价</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="text" onkeyup="value=value.replace(/[^\d.?]/g,'')" name="Price" placeholder="请输入理论单价" lay-verify="" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 70px;">临期(天)</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" name="AdventTime" placeholder="请输入临期" lay-verify="" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">低库存</label>
                    <div class="layui-input-block" style="width: 182px;">
                        <input type="text" onkeyup="value=value.replace(/[^\d.?]/g,'')" name="LowInventory" placeholder="请输入低库存" lay-verify="" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block" style="width: 487px;">
                        <textarea placeholder="请输入备注内容" name="Demo" class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="确认添加">
                <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="确认编辑">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">类型</label>
                <div class="layui-input-block" style="width: 182px;">
                    <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search>
                        <option value=""></option>
                        <option value="0">原料</option>
                        <option value="1">包材</option>
                        <option value="2">成品</option>
                        <option value="3">耗材</option>
                        <option value="4">中间品</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline" id="IsControlledshow">
                <label class="layui-form-label">是否受控</label>
                <div class="layui-input-block" style="width: 182px;">
                    <select name="IsControlled" id="IsControlled" lay-verify="" lay-verify="" lay-search>
                        <!-- <option value=""></option> -->
                        <option value="0">受控</option>
                        <option value="1">非受控</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline" id="IsInspectshow">
                <label class="layui-form-label">是否免检</label>
                <div class="layui-input-block" style="width: 182px;">
                    <select name="IsInspect" id="IsInspect" lay-verify="" lay-verify="" lay-search>
                        <!-- <option value=""></option> -->
                        <option value="0">否</option>
                        <option value="1">是</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">规格/型号</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="text" name="Standard" placeholder="请输入规格/型号" lay-verify="" autocomplete="off"
                        class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <!-- 单位 -->
            <div class="layui-inline">
                <label class="layui-form-label">单位</label>
                <div class="layui-input-block" style="width: 182px;">
                    <select name="UnitNo" id="UnitNo" lay-verify="" lay-search>
                        <option value=""></option>
                    </select>
                </div>
            </div>
            <!-- 包装 -->
            <div class="layui-inline">
                <label class="layui-form-label">包装</label>
                <div class="layui-input-block" style="width: 182px;">
                    <select name="PackagNo" id="PackagNo" lay-verify="" lay-search>
                        <option value=""></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">存储环境</label>
                <div class="layui-input-block" style="width: 182px;">
                    <select name="Environment" id="Environment" lay-verify="" lay-verify="" lay-search>
                        <option value=""></option>
                        <option value="0">常温</option>
                        <option value="1">低温</option>
                        <!-- <option value="3">干燥通风</option> -->
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">理论重量</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" name="Weight" placeholder="请输入理论重量"
                        lay-verify="" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 70px;">保质期(天)</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" name="Warranty" placeholder="请输入保质期"
                        lay-verify="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">理论单价</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="text" onkeyup="value=value.replace(/[^\d.?]/g,'')" name="Price" placeholder="请输入理论单价"
                        lay-verify="" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 70px;">临期(天)</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" name="AdventTime" placeholder="请输入临期"
                        lay-verify="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">低库存</label>
                <div class="layui-input-block" style="width: 182px;">
                    <input type="text" onkeyup="value=value.replace(/[^\d.?]/g,'')" name="LowInventory"
                        placeholder="请输入低库存" lay-verify="" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block" style="width: 487px;">
                    <textarea placeholder="请输入备注内容" name="Demo" class="layui-textarea"></textarea>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit"
                value="确认添加">
            <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit"
                value="确认编辑">
        </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>
            layui.config({
                base: '../../layuiadmin/' //静态资源所在路径
            }).extend({
                index: 'lib/index' //主入口模块
            }).use(['index', 'form', 'layer'], function() {
                var $ = layui.$,
                    form = layui.form,
                    layer = layui.layer;
    <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>
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'layer'], function () {
            var $ = layui.$,
                form = layui.form,
                layer = layui.layer;
                    // var sel3 = false;
                    // //获取类别信息 CategoryNo
                    // sendData(IP + "/sys/GetMaterialCategories1",{},'get',function(res){
                    //     console.log(res)
                    //     if (res.code == 1) //成功
                    //     {
                    //         Categoryhtml = '<option value =""></option>';
                    //         for (var i = 0; i < res.data.length; i++) {
                    //             $("#CategoryNo").append('<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>');
                    //         }
                    //         form.render('select');
                    //         sel3 = true;
                    //     }
                    //     else
                    //     {
                    //         layer.msg(res.msg, {
                    //             icon: 2,
                    //             time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    //         }, function() {sel3 = true;});
                    //     }
                    // })
                    var sel3 = false;
                    //获取类别信息 CategoryNo
                    synData(IP + "/sys/GetMaterialCategories1",{},'get',function(res){
                        console.log(res)
                        if(res.code == 1) //成功
                        {
                            for (var i = 0; i < res.data.length; i++)
                            {
                                $("#CategoryNo").append('<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>');
                            }
                            form.render('select');
                            sel3 = true;
                        }
                        else //不成功
                        {
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {sel3 = true;});
                        }
                    });
                    var sel1 = false;
                    //获取单位下拉菜单 UnitNo
                    synData(IP + "/Basis/GetUnitList",{},'get',function(res){
                        if(res.code == 0) //成功
                        {
                            for (var i = 0; i < res.data.length; i++)
                            {
                                $("#UnitNo").append('<option value =' + res.data[i].UnitNo + '>' + res.data[i].UnitName + '</option>');
                            }
                            form.render('select');
                            sel1 = true;
                        }
                        else //不成功
                        {
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {sel1 = true;});
                        }
                    });
                    var sel2 = false;
                    //获取包装下拉菜单 PackagNo
                    synData(IP + "/Basis/GetPackagList",{},'get',function(res){
                        if(res.code == 0) //成功
                        {
                            for (var i = 0; i < res.data.length; i++)
                            {
                                $("#PackagNo").append('<option value =' + res.data[i].PackagNo + '>' + res.data[i].PackagName + '</option>');
                            }
                            form.render('select');
                            sel2 = true;
                        }
                        else //不成功
                        {
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {sel2 = true;});
                        }
                    });
                    var id = getQueryString('id');
                    if (!id)
                    {
                        id = 0;
                        $("#AuditStatusNo").attr("disabled","true")
                    }
                    else
                    {
                        if (sel1 && sel2 && sel3) {
                            var param = {
                                UserId: id,
                            };
                            synData(IP + "/Basis/GetMateById?Id= " +getQueryString('id')+ "", {}, 'get', function(res) {
                                if (res.code == 0) //成功
                                {
                                    // console.log(res.data.CategoryNo)
                                    //审批状态编辑显示
                                    if(res.data.AuditStatusNo != "")
                                    {
                                        $('#Auditishow').show();
                                        // $('#IsControlledshow').show();
                                        // $('#IsInspectshow').show();
                                    }
                                    //物料号
                                    if(res.data.SkuNo != "")
                                    {
                                        $("input[name='SkuNo']").attr("disabled","disabled")
                                    }
                                    //页面赋值
                                    $("input[name='SkuNo']").val(res.data.SkuNo); // 物料号
                                    $("input[name='SkuName']").val(res.data.SkuName); // 物料名称
                                    $("input[name='Standard']").val(res.data.Standard); // 规格
                                    $("#AuditStatusNo option[value='" + res.data.AuditStatusNo + "']").attr("selected","selected"); // 审核状态
                                    $("#Type option[value='" + res.data.Type + "']").attr("selected","selected"); // 类型
                                    $("#CategoryNo option[value='" + res.data.CategoryNo + "']").attr("selected","selected"); // 类别
                                    // $("#CategoryNo option[value='" + res.data.CategoryNo + "']").attr("selected","selected"); // 类别
                                    $("#IsControlled option[value='" + res.data.IsControlled + "']").attr("selected","selected"); // 是否受控
                                    $("#IsInspect option[value='" + res.data.IsInspect + "']").attr("selected","selected"); // 是否免检
                                    $("#UnitNo option[value='" + res.data.UnitNo + "']").attr("selected","selected");// 单位
                                    $("#PackagNo option[value='" + res.data.PackagNo + "']").attr("selected","selected"); // 包装
                                    $("#Environment option[value='" + res.data.Environment + "']").attr("selected","selected"); // 存储环境
                                    $("input[name='Weight']").val(res.data.Weight); // 理论重量
                                    $("input[name='Warranty']").val(res.data.Warranty); // 保质期
                                    $("input[name='Price']").val(res.data.Price); // 理论单价
                                    $("input[name='AdventTime']").val(res.data.AdventTime); // 临期
                                    $("input[name='LowInventory']").val(res.data.LowInventory); // 低库存
                                    $("textarea[name='Demo']").val(res.data.Demo); //备注
                                    form.render();
                                    form.render('select');
                                }
                                else //不成功
                                {
                                    layer.msg(res.msg, {
                                        icon: 2,
                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function() {});
                                }
                            });
                        }
                    }
                    form.render('select');
                });
                //获取浏览器参数
                function getQueryString(name) {
                    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                    var r = window.location.search.substr(1).match(reg);
                    if (r != null) return unescape(r[2]);
                    return null;
            // var sel3 = false;
            // //获取类别信息 CategoryNo
            // sendData(IP + "/sys/GetMaterialCategories1",{},'get',function(res){
            //     console.log(res)
            //     if (res.code == 1) //成功
            //     {
            //         Categoryhtml = '<option value =""></option>';
            //         for (var i = 0; i < res.data.length; i++) {
            //             $("#CategoryNo").append('<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>');
            //         }
            //         form.render('select');
            //         sel3 = true;
            //     }
            //     else
            //     {
            //         layer.msg(res.msg, {
            //             icon: 2,
            //             time: 2000 //2秒关闭(如果不配置,默认是3秒)
            //         }, function() {sel3 = true;});
            //     }
            // })
            var sel3 = false;
            //获取类别信息 CategoryNo
            synData(IP + "/sys/GetMaterialCategories1", {}, 'get', function (res) {
                console.log(res)
                if (res.code == 1) //成功
                {
                    for (var i = 0; i < res.data.length; i++) {
                        $("#CategoryNo").append('<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>');
                    }
                    form.render('select');
                    sel3 = true;
                }
        </script>
    </body>
</html>
                else //不成功
                {
                    layer.msg(res.msg, {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { sel3 = true; });
                }
            });
            var sel1 = false;
            //获取单位下拉菜单 UnitNo
            synData(IP + "/Basis/GetUnitList", {}, 'get', function (res) {
                if (res.code == 0) //成功
                {
                    for (var i = 0; i < res.data.length; i++) {
                        $("#UnitNo").append('<option value =' + res.data[i].UnitNo + '>' + res.data[i].UnitName + '</option>');
                    }
                    form.render('select');
                    sel1 = true;
                }
                else //不成功
                {
                    layer.msg(res.msg, {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { sel1 = true; });
                }
            });
            var sel2 = false;
            //获取包装下拉菜单 PackagNo
            synData(IP + "/Basis/GetPackagList", {}, 'get', function (res) {
                if (res.code == 0) //成功
                {
                    for (var i = 0; i < res.data.length; i++) {
                        $("#PackagNo").append('<option value =' + res.data[i].PackagNo + '>' + res.data[i].PackagName + '</option>');
                    }
                    form.render('select');
                    sel2 = true;
                }
                else //不成功
                {
                    layer.msg(res.msg, {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { sel2 = true; });
                }
            });
            var id = getQueryString('id');
            if (!id) {
                id = 0;
                $("#AuditStatusNo").attr("disabled", "true")
            }
            else {
                if (sel1 && sel2 && sel3) {
                    var param = {
                        UserId: id,
                    };
                    synData(IP + "/Basis/GetMateById?Id= " + getQueryString('id') + "", {}, 'get', function (res) {
                        if (res.code == 0) //成功
                        {
                            // console.log(res.data.CategoryNo)
                            //审批状态编辑显示
                            if (res.data.AuditStatusNo != "") {
                                $('#Auditishow').show();
                                // $('#IsControlledshow').show();
                                // $('#IsInspectshow').show();
                            }
                            //物料号
                            if (res.data.SkuNo != "") {
                                $("input[name='SkuNo']").attr("disabled", "disabled")
                            }
                            //页面赋值
                            $("input[name='SkuNo']").val(res.data.SkuNo); // 物料号
                            $("input[name='SkuName']").val(res.data.SkuName); // 物料名称
                            $("input[name='Standard']").val(res.data.Standard); // 规格
                            $("#AuditStatusNo option[value='" + res.data.AuditStatusNo + "']").attr("selected", "selected"); // 审核状态
                            $("#Type option[value='" + res.data.Type + "']").attr("selected", "selected"); // 类型
                            $("#CategoryNo option[value='" + res.data.CategoryNo + "']").attr("selected", "selected"); // 类别
                            // $("#CategoryNo option[value='" + res.data.CategoryNo + "']").attr("selected","selected"); // 类别
                            $("#IsControlled option[value='" + res.data.IsControlled + "']").attr("selected", "selected"); // 是否受控
                            $("#IsInspect option[value='" + res.data.IsInspect + "']").attr("selected", "selected"); // 是否免检
                            $("#UnitNo option[value='" + res.data.UnitNo + "']").attr("selected", "selected");// 单位
                            $("#PackagNo option[value='" + res.data.PackagNo + "']").attr("selected", "selected"); // 包装
                            $("#Environment option[value='" + res.data.Environment + "']").attr("selected", "selected"); // 存储环境
                            $("input[name='Weight']").val(res.data.Weight); // 理论重量
                            $("input[name='Warranty']").val(res.data.Warranty); // 保质期
                            $("input[name='Price']").val(res.data.Price); // 理论单价
                            $("input[name='AdventTime']").val(res.data.AdventTime); // 临期
                            $("input[name='LowInventory']").val(res.data.LowInventory); // 低库存
                            $("textarea[name='Demo']").val(res.data.Demo); //备注
                            form.render();
                            form.render('select');
                        }
                        else //不成功
                        {
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function () { });
                        }
                    });
                }
            }
            form.render('select');
        });
        //获取浏览器参数
        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
    </script>
</body>
</html>
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -264,7 +264,7 @@
                  .AndIF(!string.IsNullOrWhiteSpace(model.ProductionTime), it => it.ProductionTime >= Convert.ToDateTime(model.ProductionTime))
                  .AndIF(!string.IsNullOrWhiteSpace(model.InspectMark), it => it.InspectMark == model.InspectMark.Trim())
                  .AndIF(!string.IsNullOrWhiteSpace(model.BitBoxMark), it => it.BitBoxMark == model.BitBoxMark.Trim())
                  .AndIF(!string.IsNullOrWhiteSpace(model.Origin), it => it.Origin == model.Origin.Trim())
                  .AndIF(!string.IsNullOrWhiteSpace(model.Origin), it => model.Origin.Trim().Contains(it.Origin))
                  .And(m => m.SkuNo != "100099" && m.IsDel == "0" && m.Status == "0")
                  .ToExpression();//注意 这一句 不能少
                var total = 0;