<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>项目信息设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="decorator" content="base"/>
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/lib/font/iconfont.css" />
    <style>
        html{
            background-color: #fff;
        }
        .layui-form-radio {
            padding-right: 0px !important;
            margin: 0px !important;
        }
        @font-face {
            font-family: 'iconfont';
            src: url('${ctxPlugin}/lib/font/iconfont.eot');
            src: url('${ctxPlugin}/lib/font/iconfont.eot?#iefix') format('embedded-opentype'),
            url('${ctxPlugin}/lib/font/iconfont.woff2') format('woff2'),
            url('${ctxPlugin}/lib/font/iconfont.woff') format('woff'),
            url('${ctxPlugin}/lib/font/iconfont.ttf') format('truetype'),
            url('${ctxPlugin}/lib/font/iconfont.svg#iconfont') format('svg');
        }
        .iconfont {
            font-family: "iconfont" !important;
            font-size: 16px;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        .zjDetail{
            margin-top: 10px;
            margin-bottom: 50px;
        }
        .zjDetail .yearInput{
            width: 60px;
        }

    </style>
</head>
<body>
<div class="layui-form mb-0 pr-30" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin">
    <div id="textDiv" class="layui-card-body ">
        <div class="zj">
         <%--   <blockquote class="layui-elem-quote">租金信息</blockquote>--%>
            <div class="zjDetail">
                <c:if test="${not empty variables}">
                    <c:forEach var="variable" items="${variables}" varStatus="vs">
                        <div class="layui-form-item">
                            <div class="layui-col-xs5 mb-10" style="width: 270px">
                                <label class="layui-form-label"><i class="mark">*</i>第${vs.count}阶段：</label>
                                <div class="layui-inline">
                                    <input type="text" name="startYear" value="${variable.startYear}" class="layui-input yearInput"
                                    <c:if test="${vs.count == 1}"> style="border: black;"</c:if>   oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" >

                                </div>
                                <div class="layui-inline">~</div>
                                <div class="layui-inline">
                                    <input type="text" name="endYear" value="${variable.endYear}" class="layui-input yearInput"  oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">
                                    <span class="pos-a h-32 lh-32 layui-span-unit">年</span>
                                </div>
                            </div>

                            <div class="layui-col-xs5 mb-10">
                                <label class="layui-form-label"><i class="mark">*</i>第${vs.count}阶段单价：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="unitPrice" value="${variable.unitPrice}" class="layui-input"  oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">
                                    <span class="pos-a h-32 lh-32 layui-span-unit">元/块/年</span>
                                </div>
                            </div>
                        </div>
                    </c:forEach>
                </c:if>

            </div>
        </div>

    </div>

    <div class="layui-form-item text-c operate-footer" >
        <button class="layui-btn layui-btn-primary" onclick="cancel()">取消</button>
    </div>
</div>

<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script src="${ctxPlugin}/lib/font/iconfont.js"></script>
<script>


    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['form','jquery'], function () {
        $ = layui.$,
            form = layui.form;

    });

    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }
    function cancel(){
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }

    function getAttribute(attribute){
        var att='';
        if(attribute == '1'){
            att= '纯租25年业务';
        }else if(attribute == '2'){
            att= '经营性租赁';
        }else if(attribute == '3'){
            att= '融资租赁';
        }else if(attribute == '4'){
            att= '光伏贷';
        }else if(attribute == '5'){
            att= '全款';
        }else if(attribute == '6'){
            att= '其它';
        }
        return att;
    }

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