#
luxiaotao1123
2021-04-07 746bc3009489b5fe644666cbed138582726f498a
src/main/webapp/static/js/locStatis/locStatis.js
@@ -1,3 +1,4 @@
var pageCurr;
function getCol() {
    var cols = [
@@ -7,9 +8,38 @@
    arrRemove(detlCols, "field", "anfme")
    arrRemove(detlCols, "field", "zpallet")
    cols.push.apply(cols, detlCols);
    // cols.push({field: 'anfme', align: 'center',title: '数量', style: 'font-weight: bold'}
    // )
    cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150});
    return cols;
}
function right(data){
    top.popupRight = top.layui.admin.popupRight({
        id: 'LAY_adminPopupLayer_LOCCHART'
        , area: '550px'
        , success: function(layero, index){
            var result = null;
            $.ajax({
                url: baseUrl + "/locDetl/chart/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {matnr: data.matnr},
                method: 'POST',
                async: false,
                success: function (res) {
                    if (res.code === 200) {
                        result = res;
                    } else if (res.code === 403) {
                        top.location.href = baseUrl + "/";
                    } else {
                        layer.msg(res.msg, {icon: 2})
                    }
                }
            })
            top.layui.view(this.id).render('locChart', {res: result});
        }
        , end: function () {
            $(".layui-laypage-btn")[0].click();
        }
    });
}
layui.use(['table','laydate', 'form'], function(){
@@ -97,22 +127,7 @@
        switch (obj.event) {
            // 详情
            case 'detail':
                layer.open({
                    type: 2,
                    title: '详情',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: false,
                    content: 'locDetl_detail.html',
                    success: function(layero, index){
                        setFormVal(layer.getChildFrame('#detail', index), data, true);
                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                        layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                        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');
                    }
                });
                right(data);
                break;
        }