<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>

<form:form id="subForm" modelAttribute="workContentProjectprice" action="#" method="post" class="form-horizontal">
    <form:hidden path="id"/>
    <div class="form-group layui-row lw12">
        <div class="layui-item layui-col-sm12">
            <label class="layui-form-label"><span class="require-item">*</span>支付类型：</label>
            <div class="layui-input-block">
                <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(workContentProjectprice.ptype,'content_pay_type','')}"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm12 with-textarea">
            <label class="layui-form-label">支付摘要：</label>
            <div class="layui-input-block">
                <form:textarea path="abstracts" htmlEscape="false" readonly="true" rows="3" class="form-control "/>
            </div>
        </div>
    </div>
    <div class="form-group layui-row lw12">
        <div class="form-group-label"><h2>施工单位申请额</h2></div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>本期申请：</label>
            <div class="layui-input-block">
                <input name="currentAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.currentAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>至上期累计：</label>
            <div class="layui-input-block">
                <input name="beforeAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.beforeAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm12">
            <label class="layui-form-label"><span class="require-item">*</span>至本期累计：</label>
            <div class="layui-input-block">
                <input name="afterAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.afterAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
    </div>
    <div class="form-group layui-row lw12">
        <div class="form-group-label"><h2>资讯单位确认额</h2></div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>本期审核：</label>
            <div class="layui-input-block">
                <input name="reviewAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.reviewAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label double-line"><span class="require-item">*</span>至本期累计审核支付：</label>
            <div class="layui-input-block">
                <input name="beforeReviewAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.beforeReviewAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label double-line"><span class="require-item">*</span>至本期累计实际支付：</label>
            <div class="layui-input-block">
                <input name="afterReviewAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.afterReviewAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>止付金额：</label>
            <div class="layui-input-block">
                <input name="stopAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.stopAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>应付未付：</label>
            <div class="layui-input-block">
                <input name="unpayAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentProjectprice.unpayAmt}" pattern="#,##0.00#"/>" readonly="true"  class="form-control layui-input required number"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>计入台账：</label>
            <div class="layui-input-block">
                <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getDictLabel(workContentProjectprice.inAccount,'yes_no' ,'' )}"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>申请支付时间：</label>
            <div class="layui-input-block">
                <input htmlEscape="false" type="text" maxlength="20" class="form-control layui-input" readonly="true"
                       value="<fmt:formatDate value="${workContentProjectprice.applyDate}" pattern="yyyy-MM-dd"/>"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>审定支付时间：</label>
            <div class="layui-input-block">
                <input htmlEscape="false" type="text" maxlength="20" class="form-control layui-input" readonly="true"
                       value="<fmt:formatDate value="${workContentProjectprice.setDate}" pattern="yyyy-MM-dd"/>"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>创建人：</label>
            <div class="layui-input-block">
                <form:input path="createBy.name" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
                <form:hidden path="createBy.id" htmlEscape="false"  readonly="true"  class="form-control  required"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm6">
            <label class="layui-form-label"><span class="require-item">*</span>创建时间：</label>
            <div class="layui-input-block">
                <input htmlEscape="false" type="text" readonly="true" maxlength="20" class="form-control layui-input required"
                       value="<fmt:formatDate value="${workContentProjectprice.createDate}" pattern="yyyy-MM-dd"/>"/>
            </div>
        </div>
        <div class="layui-item layui-col-sm12 with-textarea">
            <label class="layui-form-label">备注：</label>
            <div class="layui-input-block">
                <form:textarea path="remarks" htmlEscape="false" rows="3" readonly="true" class="form-control "/>
            </div>
        </div>
    </div>
</form:form>
<script type="text/javascript">
    var validateForm;
    $(document).ready(function() {
        validateForm = $("#subForm").validate({
            errorContainer: "#messageBox",
            errorPlacement: function(error, element) {
                $("#messageBox").text("输入有误，请先更正。");
                if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                    error.appendTo(element.parent().parent());
                } else {
                    error.insertAfter(element);
                }
            }
        });

        laydate.render({
            elem: '#applyDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
        });
        laydate.render({
            elem: '#setDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
        });
    });

    function genDetailStr(){
        var stringify = JSON.stringify($("#subForm").serializeJson());
        return stringify;
    }
</script>