<% include ../layout/body_header.ejs %>
<div class="panel-content">
    <div class="panel-title">
        <div class="title-main">
            <h2><%= ctx.menu.children[ctx.actionName].name %>
                <a href="javascript:void(0);" id="submit-form" class="btn btn-primary btn-sm pull-right">保存修改</a>
            </h2>
        </div>
    </div>
    <div class="content-wrap">
        <div class="c-body">
            <div class="row">
                <div class="col-7">
                    <form id="save-form" action="" method="post">
                        <input-text value="<%= projectData.code %>" name="code" readonly="readonly" label="项目编号"></input-text>

                        <input-text value="<%= projectData.name %>" name="name" label="项目名称"></input-text>

                        <input-text value="<%= projectData.user_account %>" name="manager" readonly="readonly" label="管理员"></input-text>

                        <div class="form-group">
                            <label>销售负责人</label>
                            <div class="card w-50">
                                <div class="card-body">
                                    <h4 class="card-title"><%= salesmanData.real_name %></h4>
                                    <h6 class="card-subtitle mb-2 text-muted"><%= officeList[salesmanData.office] !== undefined ? officeList[salesmanData.office] : '' %></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>
                        
                        <input-text value="<%= moment(projectData.create_time * 1000).format('YYYY-MM-DD HH:mm:ss') %>"
                            label="创建时间" readonly="readonly" name="create_time"></input-text>
                        <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<%- jsValidator %>
<script type="text/javascript">
    new Vue({
        el: '#save-form',
    });
</script>
<script src="/public/js/form_validate.js"></script>
<script src="/public/js/validate.extend.js"></script>