luxiaotao1123
2021-06-18 e4ea838c20e94dff4fdbb4f82b542a8b5790fa9d
src/main/webapp/static/js/safeSto/safeSto.js
@@ -103,56 +103,20 @@
    table.on('tool(safeSto)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            // 详情
            case 'detail':
            // 补仓
            case 'allot':
                layer.open({
                    type: 2,
                    title: '详情',
                    maxmin: true,
                    area: ['30%', top.detailHeight],
                    title: '补仓',
                    offset: '100px',
                    area: ['90%', '80%'],
                    shadeClose: true,
                    content: 'prior_detail.html',
                    content: 'locAllot.html?matnr=' + data.matnr + '&node_id=' + data.node_id + '&safe_qua=' + data.safe_qua,
                    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');
                    }
                });
                })
                break;
            // 编辑
            case 'edit':
                layer.open({
                    type: 2,
                    title: '修改',
                    maxmin: true,
                    area: ['30%', top.detailHeight],
                    content: 'prior_detail.html',
                    success: function(layero, index){
                        layer.getChildFrame('#data-detail-submit-save', index).hide();
                        setFormVal(layer.getChildFrame('#detail', index), data, false);
                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
                        top.convertDisabled(layer.getChildFrame('#id', index), true);
                        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');
                    }
                });
                break;
        }
    });
    // 复选框事件
    form.on('checkbox(detailCheckbox)', function (data) {
        var el = data.elem;
        if (el.checked) {
            $(el).val('Y');
        } else {
            $(el).val('N');
        }
    });