#
luxiaotao1123
2021-02-08 81c9c5a1b3189396c410aabfe350a4c4873a66c4
#
2个文件已修改
194 ■■■■ 已修改文件
src/main/webapp/static/js/mat/mat.js 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/mat/mat.html 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/mat/mat.js
@@ -20,13 +20,13 @@
        cols: [[
            {type: 'checkbox'}
//            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
            ,{field: 'id', align: 'center',title: 'ID'}
            ,{field: 'uuid', align: 'center',title: '编号'}
            ,{field: 'nodeId$', align: 'center',title: '所属区域',event: 'nodeId', style: 'cursor:pointer'}
            ,{field: 'tagId$', align: 'center',title: '所属归类',event: 'tagId', style: 'cursor:pointer'}
//             ,{field: 'id', align: 'center',title: 'ID'}
//             ,{field: 'uuid', align: 'center',title: '编号'}
//             ,{field: 'nodeId$', align: 'center',title: '所属区域',event: 'nodeId', style: 'cursor:pointer'}
//             ,{field: 'tagId$', align: 'center',title: '所属归类',event: 'tagId', style: 'cursor:pointer'}
            ,{field: 'matnr', align: 'center',title: '商品编号'}
            ,{field: 'maktx', align: 'center',title: '商品名称'}
            ,{field: 'name', align: 'center',title: '名称'}
            // ,{field: 'name', align: 'center',title: '名称'}
            ,{field: 'specs', align: 'center',title: '规格'}
            ,{field: 'model', align: 'center',title: '型号'}
            ,{field: 'batch', align: 'center',title: '批号'}
@@ -38,12 +38,12 @@
            ,{field: 'itemNum', align: 'center',title: '品项数'}
            ,{field: 'count', align: 'center',title: '库存余量'}
            ,{field: 'weight', align: 'center',title: '重量'}
            ,{field: 'status', align: 'center',title: ''}
            ,{field: 'createBy$', align: 'center',title: '添加人员',event: 'createBy', style: 'cursor:pointer'}
            ,{field: 'createTime$', align: 'center',title: '添加时间'}
            ,{field: 'updateBy$', align: 'center',title: '修改人员',event: 'updateBy', style: 'cursor:pointer'}
            ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            ,{field: 'memo', align: 'center',title: '备注'}
            // ,{field: 'status', align: 'center',title: '状态'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            // ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            // ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            ,{field: 'memo', align: 'center',title: '备注', hide: true}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150}
        ]],
@@ -229,151 +229,6 @@
                    }
                });
                break;
            case 'nodeId':
                var param = top.reObject(data).nodeId;
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '所属区域详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: true,
                       content: '../node/node_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "baseUrl+/node/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.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');
                                   } else if (res.code === 403){
                                       top.location.href = baseUrl+"/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                }
                break;
            case 'tagId':
                var param = top.reObject(data).tagId;
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '所属归类详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: true,
                       content: '../tag/tag_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "baseUrl+/tag/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.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');
                                   } else if (res.code === 403){
                                       top.location.href = baseUrl+"/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                }
                break;
            case 'createBy':
                var param = top.reObject(data).createBy;
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '添加人员详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: true,
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "baseUrl+/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.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');
                                   } else if (res.code === 403){
                                       top.location.href = baseUrl+"/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                }
                break;
            case 'updateBy':
                var param = top.reObject(data).updateBy;
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '修改人员详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: true,
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "baseUrl+/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.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');
                                   } else if (res.code === 403){
                                       top.location.href = baseUrl+"/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                }
                break;
        }
    });
src/main/webapp/views/mat/mat.html
@@ -19,14 +19,13 @@
            padding: 15px;
        }
        .layui-form.layui-border-box.layui-table-view {
            margin: 15px 0 35px 0;
            /*margin: 15px 0 35px 0;*/
            width: 100%;
            border-width: 1px;
        }
        .layui-form.layui-border-box.layui-table-view {
            height: calc(100vh - 125px);
            height: calc(100vh - 160px);
        }
        /* */
    </style>
</head>
<body>
@@ -57,6 +56,28 @@
        <div class="layui-col-md9">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 10px;">
                    <!-- 表格工具栏2 -->
                    <form class="layui-form toolbar"  style="padding-top: 5px">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label" style="padding: 8px 15px 8px 15px">字典名称:</label>
                                <div class="layui-input-inline">
                                    <input name="dictDataName" class="layui-input" placeholder="输入字典名称"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label" style="padding: 8px 15px 8px 15px">字典键值:</label>
                                <div class="layui-input-inline">
                                    <input name="dictDataCode" class="layui-input" placeholder="输入字典键值"/>
                                </div>
                            </div>
                            <div class="layui-inline">&emsp;
                                <button class="layui-btn icon-btn" lay-filter="dictDataTbSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>
                        </div>
                    </form>
                    <table class="layui-hide" id="mat" lay-filter="mat"></table>
                </div>
            </div>