<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
    <meta name="decorator" content="base" />
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/static/css/reset.css">
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.css" media="all">
</head>

<body>
<div class="aaa">
    <div class="layui-card">
        <form class="layui-form layui-card-body over pt-20 pb-40 h-350" action="" id="detailSet">

            <div class="layui-col-xs12 mb-10 pr-30">
                <div class="layui-inline layui-col-xs6">
                    <label class="layui-form-label w-130"><i class="red">*</i>物料代码：</label>
                    <div class="layui-input-block ">
                        <input type="text"  name="code" readonly class="layui-input " value="${material.code}">
                    </div>
                </div>
                <div class="layui-inline layui-col-xs6">
                    <label class="layui-form-label w-130"><i class="red">*</i>物料类型：</label>
                    <div class="layui-input-block w-200" >
                        <select name="materialTypeId" id="materialTypeId" lay-verify="required" readonly="true">
                            <option value="">请选择</option>
                            <c:forEach items="${types}" var="ty">
                                <option value="${ty.columns.id}" <c:if test="${material.materialTypeId eq ty.columns.id}"> selected</c:if>>${ty.columns.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs12 mb-10 pr-30">
                <div class="layui-inline layui-col-xs6">
                    <label class="layui-form-label w-130"><i class="red">*</i>物料组：</label>
                    <div class="layui-input-block ">
                        <select name="materialGroupId" id="materialGroupId"  disabled>
                            <option value="">请选择</option>
                            <c:forEach items="${groups}" var="gro">
                                <option value="${gro.columns.id}" <c:if test="${material.materialGroupId eq gro.columns.id}"> selected</c:if>>${gro.columns.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="layui-inline layui-col-xs6">
                    <label class="layui-form-label w-130"><i class="red">*</i>单位：</label>
                    <div class="layui-input-block w-200" >
                        <select name="unitId" id="unitId" lay-verify="required" disabled>
                            <option value="">请选择</option>
                            <c:forEach items="${units}" var="unit">
                                <option value="${unit.columns.id}" <c:if test="${material.unitId eq unit.columns.id}"> selected</c:if>>${unit.columns.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs12 mb-10 pr-30">
                <div class="layui-inline layui-col-xs6">
                    <label class="layui-form-label w-130"><i class="red">*</i>支持申请：</label>
                    <div class="layui-input-block w-200" >
                        <select name="supportApply" id="supportApply" lay-verify="required" disabled>
                            <option value="">请选择</option>
                            <option value="0" <c:if test="${material.supportApply eq '0'}"> selected</c:if>>是</option>
                            <option value="1" <c:if test="${material.supportApply eq '1'}"> selected</c:if>>否</option>
                        </select>

                    </div>
                </div>
            </div>


            <div class="layui-col-xs12 layui-form-item">
                <label class="layui-form-label"><i class="red">*</i>物料描述：</label>
                <div class="layui-input-block">
                    <textarea name="remarks" id="remarks"  class="layui-textarea" lay-verify="required">${material.remarks}</textarea>
                </div>
            </div>

        </form>
    </div>
</div>

<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
    //初始数据
    var $form;
    var form;
    var $;
    var imgs='';
    var myreg=/^[1][3,4,5,6,7,8,9][0-9]{9}$/;
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['form', 'layedit', 'laydate','jquery','layer'], function () {
        $ = layui.jquery;
        form = layui.form;
        $form = $('form');


    })

    function  closeDiv() {
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index);
    }

    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }



</script>
</body>
</html>
