#
luxiaotao1123
2021-03-12 166070c6d723a84036b78e653f4ccb6afa7e79c8
src/main/webapp/static/js/mat/mat.js
@@ -20,30 +20,30 @@
        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: 'matnr', align: 'center',title: '商品编号'}
            ,{field: 'maktx', align: 'center',title: '商品名称'}
            ,{field: 'name', align: 'center',title: '名称'}
            ,{field: 'maktx', align: 'center',title: '商品名称', minWidth: 300}
            ,{field: 'tagId$', align: 'center',title: '所属归类'}
            // ,{field: 'name', align: 'center',title: '名称'}
            ,{field: 'specs', align: 'center',title: '规格'}
            ,{field: 'model', align: 'center',title: '型号'}
            ,{field: 'batch', align: 'center',title: '批号'}
            ,{field: 'model', align: 'center',title: '型号', hide: true}
            ,{field: 'batch', align: 'center',title: '批号', hide: true}
            ,{field: 'unit', align: 'center',title: '单位'}
            ,{field: 'barcode', align: 'center',title: '条码'}
            ,{field: 'docId', align: 'center',title: '单据类型'}
            ,{field: 'docNum', align: 'center',title: '单据编号'}
            ,{field: 'custName', align: 'center',title: '客户名称'}
            ,{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: 'barcode', align: 'center',title: '条码', hide: true}
            // ,{field: 'docId', align: 'center',title: '单据类型'}
            // ,{field: 'docNum', align: 'center',title: '单据编号'}
            // ,{field: 'custName', align: 'center',title: '客户名称'}
            ,{field: 'itemNum', align: 'center',title: '品项数', hide: true}
            ,{field: 'count', align: 'center',title: '库存余量', hide: true}
            ,{field: 'weight', align: 'center',title: '重量', hide: true}
            // ,{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;
        }
    });