<!--弹出添加标段-->
<div class="modal fade" id="add-bd" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <form method="post" action="/tender/add">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">添加新标段</h5>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label>标段名称<b class="text-danger">*</b></label>
                        <input class="form-control"  placeholder="输入标段名称" type="text" name="name" />
                    </div>
                    <div class="form-group">
                        <label>标段类型</label>
                        <select class="form-control" name="type">
                            <% for(const index in tenderConst.typeString) { %>
                            <option value="<%= index %>"<% if(tenderType == index) { %> selected<% } %>><%= tenderConst.typeString[index] %></option>
                            <% } %>
                        </select>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="_csrf" value="<%= ctx.csrf %>"/>
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">确定添加</button>
                </div>
            </div>
        </form>
    </div>
</div>

<!--弹出编辑标段-->
<div class="modal fade" id="save-bd" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <form method="post" action="/tender/save">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">编辑标段</h5>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label>标段名称<b class="text-danger">*</b></label>
                        <input class="form-control" value="" id="savename" name="name" placeholder="输入标段名称" type="text">
                    </div>
                    <div class="form-group">
                        <label>标段类型</label>
                        <select class="form-control" name="type" id="savetype">
                            <% for(const index in tenderConst.typeString) { %>
                            <option value="<%= index %>"<% if(tenderType == index) { %> selected<% } %>><%= tenderConst.typeString[index] %></option>
                            <% } %>
                        </select>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="_csrf" value="<%= ctx.csrf %>"/>
                    <input type="hidden" name="tenderId" value="" id="saveid">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">确定修改</button>
                </div>
            </div>
        </form>
    </div>
</div>

<!--删除标段-->
<div class="modal fade" id="del-bd" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <form method="post" action="/tender/delete">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">确认删除标段</h5>
                </div>
                <div class="modal-body">
                    <h5>删除后，数据无法恢复，请谨慎操作。</h5>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="_csrf" value="<%= ctx.csrf %>"/>
                    <input type="hidden" name="tenderId" value="" id="delid">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-danger">确定删除</button>
                </div>
            </div>
        </form>
    </div>
</div>