<% include ./sub_menu.ejs %>
<div class="panel-content">
    <div class="panel-title">
        <div class="title-main">
            <h2>项目信息
                <a href="#" class="btn btn-primary btn-sm pull-right" onclick="updateinfo()">保存修改</a>
            </h2>
        </div>
    </div>
    <div class="content-wrap">
        <div class="c-body">
            <div class="row">
                <div class="col-5">
                    <form id="info-form" action="/<%= ctx.controllerName %>/updateinfo/<%= projectData.id === undefined ? 0 : projectData.id %>?_csrf=<%= ctx.csrf %>" method="post">
                        <div class="form-group">
                            <label>项目编号</label>
                            <input class="form-control" value="<%= projectData.code%>" type="text" readonly>
                        </div>
                        <div class="form-group">
                            <label>项目名称</label>
                            <input class="form-control" name="name" id="name" placeholder="请输入项目名称" value="<%= projectData.name%>" type="text">
                        </div>
                        <div class="form-group">
                            <label>管理员</label>
                            <input class="form-control" value="<%= projectData.user_account %>" type="text" readonly>
                        </div>
                        <div class="form-group">
                            <label>销售负责人</label>
                            <div class="card w-50">
                                <div class="card-body">
                                    <h4 class="card-title"><%= salesmanData.username %></h4>
                                    <h6 class="card-subtitle mb-2 text-muted" ><%= officeName%></h6>
                                </div>
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="腾讯QQ"><i class="fa fa-qq"></i> <%=salesmanData.qq%></li>
                                    <li class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="手机号码"><i class="fa fa-tablet"></i> <%=salesmanData.telephone%></li>
                                    <li class="list-group-item" data-toggle="tooltip" data-placement="bottom" title="固定电话"><i class="fa fa-phone"></i> <%=salesmanData.fixedphone%></li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group">
                            <label>创建时间</label>
                            <input class="form-control" value=<%= dateStr%> type="text" readonly>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function updateinfo()
    {
        $("#info-form").submit();
    }
</script>