@using GBLab.Entities
@using GBLab.Common.Expand

@model GBLab.Entities.T_SystemPoints
@{
    // 模板视图
    Layout = "~/Areas/Manage/Views/DefaultSkin/Shared_Back/_Layout_ContentBase.cshtml";

    // 权限列表
    var actions = ViewData["actions"] as Dictionary<string, string>;

    // 树形链接
    string dataTreeUrl = ViewData["dataTreeUrl"].ToString();

    string ExtendFunctionName = ViewData["ExtendFunctionName"].DefaultIsNullOrEmpty("");
    string ExtendFunctionNameReplaceName = ExtendFunctionName == "" ? "$NullName" : ExtendFunctionName;
}

@section Head{
}

@section JavaScript{
    @Html.Partial("~/Areas/Manage/Views/DefaultSkin/Shared_Back/_Layout_Head_Edit.cshtml")
    <script>
        $(function () {
            // 文字输入数量上的控制
            GetLengthBind('F_Name', 100);

            GetLengthBind('F_SeoTitle', 160);
            GetLengthBind('F_SeoKeyWord', 160);
            GetLengthBind('F_SeoDescription', 160);
        });
    </script>
}

<div data-options="region:'center',border:true">
    @using (Html.BeginForm("Action_Edit_Add", "SystemPoints", new { action = "Post" }, FormMethod.Post, new { ID = "EditForm", name = "EditForm", fit = "true", style = "width:100%;height:100%;" }))
    {
        @*系统机制*@
        @Html.ValidationSummary()
        @Html.AntiForgeryToken()

        @*系统参数*@
        @Html.Hidden("IsNew", false)
        @Html.Hidden("ActionGUID", "")
        @Html.Hidden("Template", ViewData["Template"])
        @Html.Hidden("MvcMarkName", ViewData["MvcMarkName"])
        @Html.Hidden("MvcClassID", ViewData["MvcClassID"])

        @*字段隐藏*@
        @Html.HiddenFor(m => m.F_Id)
        @Html.HiddenFor(m => m.F_Guid)
        @Html.HiddenFor(m => m.F_MarkName)
        @Html.HiddenFor(m => m.F_ModuleMarkName)
        @Html.HiddenFor(m => m.F_ModuleInfoId)
        @Html.HiddenFor(m => m.F_ModuleInfoGuid)
        @Html.HiddenFor(m => m.F_TypeId)
        @Html.HiddenFor(m => m.F_TypeIds)
        @Html.HiddenFor(m => m.F_Ip)

        @*视图展示*@
        <div id="tabid" class="easyui-tabs" data-options="border:false,fit:true,plain:true">

            <div title="基本信息" style="padding:6px;">
                <table class="table">
                    <tr>
                        <th class="tdright" style="width: 100px;">
                            模块扩展分类标识：<em></em>
                        </th>
                        <td colspan="5">
                            @(Model.F_ModuleMarkName)
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            模块信息Id：<em></em>
                        </th>
                        <td colspan="5">
                            @(Model.F_ModuleInfoId)
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            模块信息Guid：<em></em>
                        </th>
                        <td colspan="5">
                            @(Model.F_ModuleInfoGuid)
                        </td>
                    </tr>
                </table>

                <table class="table">

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            ID GUID：<em></em>
                        </th>
                        <td colspan="5">
                            【@(Model.F_Id)】-【@(Model.F_Guid.ToString().ToUpper())】
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright">
                            名称：<em>*</em>
                        </th>
                        <td colspan="5">
                            @(Html.TextBoxFor(t => t.F_Name, new { @Class = "easyui-validatebox textbox w500 Title ", required = "true" }))
                            <p>
                                <span>剩余输入<b id="num_F_Name" style="color:#ff0000">100</b> 个字符</span>
                            </p>
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            评分：<em></em>
                        </th>
                        <td colspan="5">
                            @(Html.TextBoxFor(t => t.F_Points, new { Class = "easyui-textbox w500", required = "true" }))
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            IP：<em></em>
                        </th>
                        <td colspan="5">
                            @(Model.F_Ip)
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            添加人：<em></em>
                        </th>
                        <td colspan="5">
                            @(Html.TextBoxFor(t => t.F_AddUserName, new { Class = "easyui-textbox w500", required = "true" }))
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright">
                            信息状态：
                        </th>
                        <td>
                            @Html.DropDownListFor(t => t.F_MarkStatus, GBLab.Common.Helper.SelectItem.GetSelectListItem(GBLab.Common.Utils.Dictionarys.IsStatus), new { @class = "easyui-combobox", @style = "width:120px;", @editable = "false" })
                        </td>
                    </tr>

                </table>
            </div>

            <div title="辅助信息" style="padding:6px;">
                <table class="table">

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            添加人：<em></em>
                        </th>
                        <td colspan="5">
                            @(Html.TextBox("F_AddUserId", Model.T_AddUser == null ? "" : Model.T_AddUser.F_Name, new { Class = "easyui-textbox w500", @readonly = "true" }))
                        </td>
                    </tr>

                    <tr>
                        <th class="tdright" style="width: 100px;">
                            添加日期：<em></em>
                        </th>
                        <td colspan="5">
                            @Html.TextBox("F_AddDate", Convert.ToDateTime(Model.F_AddDate).ToString("yyyy-MM-dd HH:mm:ss"), new { @class = "easyui-datetimebox textbox w160", @required = "true", @readonly = "true" })
                        </td>
                    </tr>

                </table>
            </div>

        </div>
    }
</div>

@*底部操作*@
<div class="dialog-button TextCenter" data-options="region:'south',border:false">
    @if (Model.F_Id != 0)
    {
        @Html.Raw(T_FunctionAction.Get_Action_Buttons(actions[ExtendFunctionName + "Edit"]).Replace(ExtendFunctionNameReplaceName, ""))
    }
    else
    {
        @Html.Raw(T_FunctionAction.Get_Action_Buttons(actions[ExtendFunctionName + "Add"]).Replace(ExtendFunctionNameReplaceName, ""))
    }
    <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-no'" onclick="return window.parent.cancel();">取消</a>
</div>

