<%@ page import="com.lightinit.hsdataplatform.dictionary.DicResourceCatelogType" %>
<%@ page import="com.lightinit.hsdataplatform.dictionary.DicResourceState" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp"><jsp:param name="modal_title" value="开票登记"/></jsp:include>
<form id="formAdd" action="<%=basePath%>/admin/Invoice/doAdd.action" method="post" enctype="multipart/form-data" class="form-horizontal">
    <input type="hidden" name="id" value="${id}"/>
    <input type="hidden" name="userId" value="${userId}"/>
    <input type="hidden" name="orderId" value="${orderId}"/>
    <div class="form-group">
        <label for="orgName" class="col-md-3 col-sm-3 control-label"><span style="color: red">*</span>开票机构：</label>
        <div class="col-md-7 col-sm-7">
            <input type="text" id="orgName" name="orgName" class="form-control" /><span class="field-validation-valid help-block"></span>
        </div>

    </div>
    <div class="form-group">
        <label for="invoiceAmount" class="col-md-3 col-sm-3 control-label"><span style="color: red">*</span>开票金额：</label>
        <div class="col-md-7 col-sm-7">
            <input type="text" id="invoiceAmount" name="invoiceAmount" class="form-control" />
            <span class="help-block"></span>
        </div>

    </div>

    <div class="form-group">
        <label for="invoicedAt" class="col-md-3 col-sm-3 control-label">开票日期：</label>
        <div class="col-md-7 col-sm-7">
                <div class="input-group date">
                <input type="text" id="invoicedAt" name="invoicedAt" class="form-control" />
                <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
            </div>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>


    <div class="form-group">
        <label for="invoiceNumber" class="col-md-3 col-sm-3 control-label"><span style="color: red">*</span>发票编号：</label>
        <div class="col-md-7 col-sm-7">
            <input type="text" id="invoiceNumber" name="invoiceNumber" class="form-control" />
            <span class="help-block"></span>
        </div>

    </div>

    <div class="form-group">
        <label for="invoiceType" class="col-md-3 col-sm-3 control-label">发票类型：</label>
        <div class="col-md-7 col-sm-7">
            <select id="invoiceType" name="invoiceType" class="form-control">
                <option></option>
                <c:forEach items="${invoiceType}" var="item" >
                    <option value="${item.key}">${item.value}</option>
                </c:forEach>
            </select>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
</form>
<jsp:include page="../../../common/admin/modal_content_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_pre.jsp"></jsp:include>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"></i>取消</button>
<button type="button" id="btnSave" class="btn btn-primary"><i class="fa fa-check"></i>保存</button>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>
<script type="text/javascript">
    $("#btnSave").click(function() {

        $("#formAdd").ajaxSubmitCloseRefresh();
    });

    $(".input-group.date").datetimepicker({
        format: "YYYY-MM-DD",
        locale: "zh-cn"
    });

    </script>