自动化立体仓库 - WMS系统
skyouc
19 小时以前 78df6cc0014e1b9ef290a8ae86c39b63c8fc36e1
no message
7个文件已修改
323 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocDetlMapper.xml 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OrderDetlPakinMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OrderDetlPakoutMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locDetl/locDetl.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/wrkMast/wrkMast.js 266 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -468,7 +468,7 @@
            }
//            OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch());
            OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.FALSE, locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch(), locDto.getBrand()
                    , locDto.getStandby1(), locDto.getStandby2(), locDto.getStandby3(), locDto.getBoxType1(), locDto.getBoxType2(), locDto.getBoxType3());
                    , locDto.getStandby1(), locDto.getStandby2(), locDto.getStandby3(), "1", locDto.getBoxType2(), locDto.getBoxType3());
//            if (orderDetl == null) {
////                orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null);
//                orderDetl = OrderInAndOutUtil.selectItem(Boolean.FALSE, locDto.getOrderNo(), locDto.getMatnr(), null);
@@ -1525,7 +1525,6 @@
        if (!locMastService.updateById(locMast)) {
            throw new CoolException("修改库位状态失败");
        }
        // .修改并托入库明细托码
        List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>()
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -392,7 +392,7 @@
                        // 更新订单完成数量
                        OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(wrkDetl.getOrderNo(),
                                wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(),
                                wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(),
                                wrkDetl.getStandby2(), wrkDetl.getStandby3(), "1",
                                wrkDetl.getBoxType2(), wrkDetl.getBoxType3());
                        try {
                            if (!Cools.isEmpty(orderDetlPakin)) {
@@ -400,7 +400,7 @@
                                        wrkDetl.getMatnr(),
                                        orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(),
                                        wrkDetl.getStandby2(), wrkDetl.getStandby3(),
                                        wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(),
                                        "1", wrkDetl.getBoxType2(), wrkDetl.getBoxType3(),
                                        wrkDetl.getAnfme())) {
                                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                                    return FAIL.setMsg("并板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo()
src/main/resources/mapper/LocDetlMapper.xml
@@ -94,14 +94,14 @@
                and (d.standby3 IS NULL OR d.standby3 = '')
            </otherwise>
        </choose>
        <choose>
            <when test="boxType1 != null and boxType1 != ''">
                and d.box_type1 = #{boxType1}
            </when>
            <otherwise>
                and (d.box_type1 IS NULL OR d.box_type1 = '')
            </otherwise>
        </choose>
<!--        <choose>-->
<!--            <when test="boxType1 != null and boxType1 != ''">-->
<!--                and d.box_type1 = #{boxType1}-->
<!--            </when>-->
<!--            <otherwise>-->
<!--                and (d.box_type1 IS NULL OR d.box_type1 = '')-->
<!--            </otherwise>-->
<!--        </choose>-->
        <choose>
            <when test="boxType2 != null and boxType2 != ''">
                and d.box_type2 = #{boxType2}
@@ -226,14 +226,14 @@
                and (standby3 IS NULL OR standby3 = '')
            </otherwise>
        </choose>
        <choose>
            <when test="boxType1 != null and boxType1 != ''">
                and box_type1 = #{boxType1}
            </when>
            <otherwise>
                and (box_type1 IS NULL OR box_type1 = '')
            </otherwise>
        </choose>
<!--        <choose>-->
<!--            <when test="boxType1 != null and boxType1 != ''">-->
<!--                and box_type1 = #{boxType1}-->
<!--            </when>-->
<!--            <otherwise>-->
<!--                and (box_type1 IS NULL OR box_type1 = '')-->
<!--            </otherwise>-->
<!--        </choose>-->
        <choose>
            <when test="boxType2 != null and boxType2 != ''">
                and box_type2 = #{boxType2}
src/main/resources/mapper/OrderDetlPakinMapper.xml
@@ -97,14 +97,14 @@
                and (standby3 IS NULL OR standby3 = '')
            </otherwise>
        </choose>
        <choose>
            <when test="boxType1 != null and boxType1 != ''">
                and box_type1 = #{boxType1}
            </when>
            <otherwise>
                and (box_type1 IS NULL OR box_type1 = '')
            </otherwise>
        </choose>
<!--        <choose>-->
<!--            <when test="boxType1 != null and boxType1 != ''">-->
<!--                and box_type1 = #{boxType1}-->
<!--            </when>-->
<!--            <otherwise>-->
<!--                and (box_type1 IS NULL OR box_type1 = '')-->
<!--            </otherwise>-->
<!--        </choose>-->
        <choose>
            <when test="boxType2 != null and boxType2 != ''">
                and box_type2 = #{boxType2}
src/main/resources/mapper/OrderDetlPakoutMapper.xml
@@ -61,7 +61,6 @@
        and standby1 = #{standby1}
        and standby2 = #{standby2}
        and standby3 = #{standby3}
        and box_type1 = #{boxType1}
        and box_type2 = #{boxType2}
        and box_type3 = #{boxType3}
    </sql>
src/main/webapp/static/js/locDetl/locDetl.js
@@ -23,6 +23,7 @@
            }}
        ,{field: 'bookQty', align: 'center',title: '原数量'}
        ,{field: 'zpallet', align: 'center',title: '托盘条码'}
        ,{field: 'boxType1', align: 'center',title: '格层编码', width : 130}
        ,{field: 'specs', align: 'center',title: '规格'}
        ,{field: 'model', align: 'center',title: '代码', hide: true}
        ,{field: 'color', align: 'center',title: '颜色', hide: true}
src/main/webapp/static/js/wrkMast/wrkMast.js
@@ -1,6 +1,6 @@
var pageCurr;
var wrkNo;
layui.use(['table','laydate', 'form'], function(){
layui.use(['table', 'laydate', 'form'], function () {
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
@@ -11,7 +11,7 @@
    tableIns = table.render({
        elem: '#wrkMast',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/wrkMast/list/auth',
        url: baseUrl + '/wrkMast/list/auth',
        page: true,
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
@@ -20,23 +20,23 @@
        cellMinWidth: 50,
        cols: [[
            {type: 'checkbox'}
            ,{field: 'wrkNo', align: 'center',title: '工作号',sort: true, width: 95}
            ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, width: 170}
            ,{field: 'wrkSts$', align: 'center',title: '工作状态', width: 120}
            ,{field: 'ioType$', align: 'center',title: '入出库类型', width: 140}
            ,{field: 'ioPri', align: 'center',title: '优先级'}
            ,{field: 'taskType$', align: 'center',title: '任务类型'}
            ,{field: 'barcode', align: 'center',title: '条码', width: 120}
            ,{field: 'crnNo$', align: 'center',title: '堆垛机'}
            ,{field: 'sourceStaNo$', align: 'center',title: '源站'}
            ,{field: 'staNo$', align: 'center',title: '目标站'}
            ,{field: 'sourceLocNo', align: 'center',title: '源库位', width: 120}
            ,{field: 'locNo', align: 'center',title: '目标库位', width: 120}
            ,{field: 'preHave', align: 'center',title: '先入品', hide: true}
            ,{field: 'takeNone', align: 'center',title: '空操作', hide: true}
            ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true}
            ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true, width: 160}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:300}
            , {field: 'wrkNo', align: 'center', title: '工作号', sort: true, width: 95}
            , {field: 'ioTime$', align: 'center', title: '工作时间', sort: true, width: 170}
            , {field: 'wrkSts$', align: 'center', title: '工作状态', width: 120}
            , {field: 'ioType$', align: 'center', title: '入出库类型', width: 140}
            , {field: 'ioPri', align: 'center', title: '优先级'}
            , {field: 'taskType$', align: 'center', title: '任务类型', hide: true}
            , {field: 'barcode', align: 'center', title: '条码', width: 120}
            , {field: 'crnNo$', align: 'center', title: '堆垛机'}
            , {field: 'sourceStaNo$', align: 'center', title: '源站'}
            , {field: 'staNo$', align: 'center', title: '目标站'}
            , {field: 'sourceLocNo', align: 'center', title: '源库位', width: 120}
            , {field: 'locNo', align: 'center', title: '目标库位', width: 120}
            , {field: 'preHave', align: 'center', title: '先入品', hide: true}
            , {field: 'takeNone', align: 'center', title: '空操作', hide: true}
            , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true}
            , {field: 'modiTime$', align: 'center', title: '修改时间', hide: true, width: 160}
            , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 300}
        ]],
        request: {
            pageName: 'curr',
@@ -53,17 +53,17 @@
        response: {
            statusCode: 200
        },
        done: function(res, curr, count) {
        done: function (res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
                top.location.href = baseUrl + "/";
            }
            pageCurr=curr;
            pageCurr = curr;
            limit();
            form.on('checkbox(tableCheckbox)', function (data) {
                var _index = $(data.elem).attr('table-index')||0;
                if(data.elem.checked){
                var _index = $(data.elem).attr('table-index') || 0;
                if (data.elem.checked) {
                    res.data[_index][data.value] = 'Y';
                }else{
                } else {
                    res.data[_index][data.value] = 'N';
                }
            });
@@ -73,7 +73,7 @@
    // 监听排序事件
    table.on('sort(wrkMast)', function (obj) {
        var searchData = {};
        $.each($('#search-box [name]').serializeArray(), function() {
        $.each($('#search-box [name]').serializeArray(), function () {
            searchData[this.name] = this.value;
        });
        searchData['orderByField'] = obj.field;
@@ -85,9 +85,9 @@
            },
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                    top.location.href = baseUrl + "/";
                }
                pageCurr=curr;
                pageCurr = curr;
                limit();
            }
        });
@@ -96,10 +96,10 @@
    // 监听头工具栏事件
    table.on('toolbar(wrkMast)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id);
        switch(obj.event) {
        switch (obj.event) {
            // 增加优先级
            case 'priAdd':
                var list=[];
                var list = [];
                checkStatus.data.map(function (track) {
                    list.push({
                        wrkNo: track.wrkNo,
@@ -108,19 +108,19 @@
                    });
                });
                $.ajax({
                    url: baseUrl+"/wrkMast/add/pri/auth",
                    url: baseUrl + "/wrkMast/add/pri/auth",
                    headers: {'token': localStorage.getItem('token')},
                    contentType:'application/json;charset=UTF-8',
                    contentType: 'application/json;charset=UTF-8',
                    data: JSON.stringify(list),
                    method: 'POST',
                    traditional:true,
                    traditional: true,
                    success: function (res) {
                        layer.closeAll();
                        if (res.code === 200){
                        if (res.code === 200) {
                            $(".layui-laypage-btn")[0].click();
                            layer.msg(res.msg);
                        } else if (res.code === 403){
                            top.location.href = baseUrl+"/";
                        } else if (res.code === 403) {
                            top.location.href = baseUrl + "/";
                        } else {
                            layer.msg(res.msg)
                        }
@@ -129,7 +129,7 @@
                break;
            // 降低优先级
            case 'priRed':
                var list=[];
                var list = [];
                checkStatus.data.map(function (track) {
                    list.push({
                        wrkNo: track.wrkNo,
@@ -138,19 +138,19 @@
                    });
                });
                $.ajax({
                    url: baseUrl+"/wrkMast/red/pri/auth",
                    url: baseUrl + "/wrkMast/red/pri/auth",
                    headers: {'token': localStorage.getItem('token')},
                    contentType:'application/json;charset=UTF-8',
                    contentType: 'application/json;charset=UTF-8',
                    data: JSON.stringify(list),
                    method: 'POST',
                    traditional:true,
                    traditional: true,
                    success: function (res) {
                        layer.closeAll();
                        if (res.code === 200){
                        if (res.code === 200) {
                            $(".layui-laypage-btn")[0].click();
                            layer.msg(res.msg);
                        } else if (res.code === 403){
                            top.location.href = baseUrl+"/";
                        } else if (res.code === 403) {
                            top.location.href = baseUrl + "/";
                        } else {
                            layer.msg(res.msg)
                        }
@@ -165,31 +165,33 @@
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: false,
                    content: 'wrkMast_detail.html',
                    success: function(layero, index){
                    success: function (layero, index) {
                        layer.getChildFrame('#data-detail-submit-edit', index).hide();
                        clearFormVal(layer.getChildFrame('#detail', index));
                        layer.getChildFrame('##dealDownLine', index).hide();layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                        clearFormVal(layer.getChildFrame('#detail', index));
                        layer.getChildFrame('##dealDownLine', index).hide();
                        layer.iframeAuto(index);
                        layer.style(index, {top: (($(window).height() - layer.getChildFrame('#data-detail', index).height()) / 3) + "px"});
                    }
                });
                break;
            case 'deleteData':
                var data = checkStatus.data;
                if (data.length === 0){
                if (data.length === 0) {
                    layer.msg('请选择数据');
                } else {
                    layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){
                    layer.confirm('确定删除' + (data.length === 1 ? '此' : data.length) + '条数据吗', function () {
                        $.ajax({
                            url: baseUrl+"/wrkMast/delete/auth",
                            url: baseUrl + "/wrkMast/delete/auth",
                            headers: {'token': localStorage.getItem('token')},
                            data: {param: JSON.stringify(data)},
                            method: 'POST',
                            traditional:true,
                            traditional: true,
                            success: function (res) {
                                if (res.code === 200){
                                if (res.code === 200) {
                                    layer.closeAll();
                                    tableReload(false);
                                } else if (res.code === 403){
                                    top.location.href = baseUrl+"/";
                                } else if (res.code === 403) {
                                    top.location.href = baseUrl + "/";
                                } else {
                                    layer.msg(res.msg)
                                }
@@ -199,9 +201,9 @@
                }
                break;
            case 'exportData':
                layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                layer.confirm('确定导出Excel吗', {shadeClose: true}, function () {
                    var titles = [];
                    var fields = [];
                    obj.config.cols[0].map(function (col) {
                        if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
                            titles.push(col.title);
@@ -209,7 +211,7 @@
                        }
                    });
                    var exportData = {};
                    $.each($('#search-box [name]').serializeArray(), function() {
                    $.each($('#search-box [name]').serializeArray(), function () {
                        exportData[this.name] = this.value;
                    });
                    var param = {
@@ -217,18 +219,18 @@
                        'fields': fields
                    };
                    $.ajax({
                        url: baseUrl+"/wrkMast/export/auth",
                        url: baseUrl + "/wrkMast/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
                        contentType:'application/json;charset=UTF-8',
                        dataType: 'json',
                        contentType: 'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                                table.exportFile(titles, res.data, 'xls');
                            } else if (res.code === 403) {
                                top.location.href = baseUrl+"/";
                                top.location.href = baseUrl + "/";
                            } else {
                                layer.msg(res.msg)
                            }
@@ -240,7 +242,7 @@
    });
    // 监听行工具事件
    table.on('tool(wrkMast)', function(obj){
    table.on('tool(wrkMast)', function (obj) {
        let data = obj.data;
        switch (obj.event) {
            // 明细展示
@@ -256,14 +258,14 @@
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
                    content: 'wrkDetl.html',
                    success: function(layero, index){
                    success: function (layero, index) {
                    }
                });
                break;
            // 完成
            case 'complete':
                layer.confirm('确认完成该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
                    http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:1}, function (res) {
                layer.confirm('确认完成该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () {
                    http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 1}, function (res) {
                        $(".layui-laypage-btn")[0].click();
                        layer.msg(data.wrkNo + res.msg);
                    })
@@ -274,16 +276,22 @@
            // 取消
            case 'cancel':
                if (data.pdcType === "Y") {
                    layer.confirm('当前任务关联ERP销售单,取消将重新生成出库作业,是否继续?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
                        http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:2}, function (res) {
                    layer.confirm('当前任务关联ERP销售单,取消将重新生成出库作业,是否继续?', {
                        title: '工作号:' + data.wrkNo,
                        shadeClose: true
                    }, function () {
                        http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) {
                            $(".layui-laypage-btn")[0].click();
                            layer.msg(data.wrkNo + res.msg);
                        })
                        layer.closeAll();
                    });
                } else {
                    layer.confirm('确认取消该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
                        http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:2}, function (res) {
                    layer.confirm('确认取消该笔工作档?', {
                        title: '工作号:' + data.wrkNo,
                        shadeClose: true
                    }, function () {
                        http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) {
                            $(".layui-laypage-btn")[0].click();
                            layer.msg(data.wrkNo + res.msg);
                        })
@@ -293,8 +301,8 @@
                break;
            //  拣料入库
            case 'pick':
                layer.confirm('拣料入库该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
                    http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:3}, function (res) {
                layer.confirm('拣料入库该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () {
                    http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 3}, function (res) {
                        $(".layui-laypage-btn")[0].click();
                        layer.msg(data.wrkNo + res.msg);
                    })
@@ -303,8 +311,11 @@
                break;
            //  先入品
            case 'preHave':
                layer.confirm('任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
                    http.post(baseUrl+"/deal/preHave/start", {wrkNo: data.wrkNo}, function (res) {
                layer.confirm('任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!', {
                    title: '工作号:' + data.wrkNo,
                    shadeClose: true
                }, function () {
                    http.post(baseUrl + "/deal/preHave/start", {wrkNo: data.wrkNo}, function (res) {
                        $(".layui-laypage-btn")[0].click();
                        layer.msg(data.wrkNo + res.msg, {icon: 1});
                    })
@@ -313,7 +324,10 @@
                break;
            //  空操作
            case 'takeNone':
                layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
                layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {
                    title: '工作号:' + data.wrkNo,
                    shadeClose: true
                }, function () {
                });
                break;
            case 'priWrkMast':
@@ -324,11 +338,12 @@
                    area: ['500px', top.detailHeight],
                    shadeClose: false,
                    content: 'wrkMast_detail2.html',
                    success: function(layero, index){
                    success: function (layero, index) {
                        layer.getChildFrame('#data-detail-submit-save', index).hide();
                        setFormVal(layer.getChildFrame('#detail', index), data, false);
                        top.convertDisabled(layer.getChildFrame('#locNo', index), true);
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                        layer.iframeAuto(index);
                        layer.style(index, {top: (($(window).height() - layer.getChildFrame('#data-detail', index).height()) / 3) + "px"});
                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                    }
@@ -339,7 +354,7 @@
    // 数据保存动作
    form.on('submit(save)', function () {
        if (banMsg != null){
        if (banMsg != null) {
            layer.msg(banMsg);
            return;
        }
@@ -351,9 +366,9 @@
        method("update")
    });
    function method(name){
    function method(name) {
        var index = layer.load(1, {
            shade: [0.5,'#000'] //0.1透明度的背景
            shade: [0.5, '#000'] //0.1透明度的背景
        });
        var data = {
            wrkNo: $('#wrkNo').val(),
@@ -414,20 +429,20 @@
        };
        $.ajax({
            url: baseUrl+"/wrkMast/"+name+"/auth",
            url: baseUrl + "/wrkMast/" + name + "/auth",
            headers: {'token': localStorage.getItem('token')},
            data: top.reObject(data),
            method: 'POST',
            success: function (res) {
                if (res.code === 200){
                if (res.code === 200) {
                    parent.layer.closeAll();
                    parent.$(".layui-laypage-btn")[0].click();
                    $("#data-detail :input").each(function () {
                        $(this).val("");
                    });
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                }else {
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/";
                } else {
                    layer.msg(res.msg)
                }
                layer.close(index);
@@ -511,12 +526,13 @@
    });
    layDate.render({
        elem: '.layui-laydate-range'
        ,type: 'datetime'
        ,range: true
        , type: 'datetime'
        , range: true
    });
    var pageCur;
    function locDetl(param){
    function locDetl(param) {
        $('#detlTable').css("display", 'block');
        // 数据渲染
        $('#wrkNo').val(param);
@@ -524,7 +540,7 @@
        tableIns1 = table.render({
            elem: '#wrkDetlByMap',
            headers: {token: localStorage.getItem('token')},
            url: baseUrl+'/wrkDetl/list/auth',
            url: baseUrl + '/wrkDetl/list/auth',
            where: {wrk_no: param},
            page: true,
            limit: 16,
@@ -534,22 +550,22 @@
            cellMinWidth: 50,
            cols: [[
                {type: 'checkbox'}
                ,{field: 'wrkNo', align: 'center',title: '工作号'}
                ,{field: 'ioTime$', align: 'center',title: '工作时间'}
                ,{field: 'matnr', align: 'center',title: '物料'}
                ,{field: 'lgnum', align: 'center',title: '仓库号'}
                ,{field: 'tbnum', align: 'center',title: '转储请求编号'}
                ,{field: 'tbpos', align: 'center',title: '行项目'}
                ,{field: 'zmatid', align: 'center',title: '物料标签ID'}
                ,{field: 'maktx', align: 'center',title: '物料描述'}
                ,{field: 'werks', align: 'center',title: '工厂'}
                ,{field: 'anfme', align: 'center',title: '数量'}
                ,{field: 'altme', align: 'center',title: '单位'}
                ,{field: 'zpallet', align: 'center',title: '托盘条码'}
                ,{field: 'bname', align: 'center',title: '用户ID'}
                ,{field: 'memo', align: 'center',title: '备注'}
                , {field: 'wrkNo', align: 'center', title: '工作号'}
                , {field: 'ioTime$', align: 'center', title: '工作时间'}
                , {field: 'matnr', align: 'center', title: '物料'}
                , {field: 'lgnum', align: 'center', title: '仓库号'}
                , {field: 'tbnum', align: 'center', title: '转储请求编号'}
                , {field: 'tbpos', align: 'center', title: '行项目'}
                , {field: 'zmatid', align: 'center', title: '物料标签ID'}
                , {field: 'maktx', align: 'center', title: '物料描述'}
                , {field: 'werks', align: 'center', title: '工厂'}
                , {field: 'anfme', align: 'center', title: '数量'}
                , {field: 'altme', align: 'center', title: '单位'}
                , {field: 'zpallet', align: 'center', title: '托盘条码'}
                , {field: 'bname', align: 'center', title: '用户ID'}
                , {field: 'memo', align: 'center', title: '备注'}
                ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:50}
                , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 50}
            ]],
            request: {
                pageName: 'curr',
@@ -566,16 +582,16 @@
            response: {
                statusCode: 200
            },
            done: function(res, curr, count) {
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                    top.location.href = baseUrl + "/";
                }
                pageCur=curr;
                pageCur = curr;
                form.on('checkbox(tableCheckbox)', function (data) {
                    var _index = $(data.elem).attr('table-index')||0;
                    if(data.elem.checked){
                    var _index = $(data.elem).attr('table-index') || 0;
                    if (data.elem.checked) {
                        res.data[_index][data.value] = 'Y';
                    }else{
                    } else {
                        res.data[_index][data.value] = 'N';
                    }
                });
@@ -586,13 +602,13 @@
});
// 关闭动作
$(document).on('click','#data-detail-close', function () {
$(document).on('click', '#data-detail-close', function () {
    parent.layer.closeAll();
});
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
    $.each($('#search-box [name]').serializeArray(), function () {
        searchData[this.name] = this.value;
    });
    (child ? parent.tableIns : tableIns).reload({
@@ -602,14 +618,14 @@
        },
        done: function (res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
                top.location.href = baseUrl + "/";
            }
            pageCurr=curr;
            pageCurr = curr;
            if (res.data.length === 0 && count !== 0) {
                tableIns.reload({
                    where: searchData,
                    page: {
                        curr: pageCurr-1
                        curr: pageCurr - 1
                    }
                });
                pageCurr -= 1;
@@ -622,10 +638,10 @@
function setFormVal(el, data, showImg) {
    for (var val in data) {
        var find = el.find(":input[id='" + val + "']");
        if (find[0]!=null){
            if (find[0].type === 'checkbox'){
                if (data[val]==='Y'){
                    find.attr("checked","checked");
        if (find[0] != null) {
            if (find[0].type === 'checkbox') {
                if (data[val] === 'Y') {
                    find.attr("checked", "checked");
                    find.val('Y');
                } else {
                    find.remove("checked");
@@ -635,9 +651,9 @@
            }
        }
        find.val(data[val]);
        if (showImg){
        if (showImg) {
            var next = find.next();
            if (next.get(0)){
            if (next.get(0)) {
                if (next.get(0).localName === "img") {
                    find.hide();
                    next.attr("src", data[val]);
@@ -657,13 +673,13 @@
function detailScreen(index) {
    var detail = layer.getChildFrame('#data-detail', index);
    var height = detail.height()+60;
    if (height > ($(window).height()*0.9)) {
        height = ($(window).height()*0.8);
    var height = detail.height() + 60;
    if (height > ($(window).height() * 0.9)) {
        height = ($(window).height() * 0.8);
    }
    layer.style(index, {
//        top: (($(window).height()-height)/3)+"px",
        height: height+'px'
        height: height + 'px'
    });
}