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

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

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

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

    // 类别树形
    string dataTypeTreeUrl = ViewData["dataTypeTreeUrl"].ToString();
}

@section Head{
}

@section JavaScript{
    @Html.Partial("~/Areas/Manage/Views/DefaultSkin/Shared_Back/_Layout_Head_Edit.cshtml")
}

    <div data-options="region:'center',border:true">
        @using (Html.BeginForm("Action_Edit_Add", "Type", 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_SmallPic)
            @Html.HiddenFor(m => m.F_BigPic)
            @Html.HiddenFor(m => m.F_Path)
            @Html.HiddenFor(m => m.F_ItemAllCount)
            @Html.HiddenFor(m => m.F_ItemNum)
            @Html.HiddenFor(m => m.F_Level)
            @Html.HiddenFor(m => m.F_TopNum)
            @Html.HiddenFor(m => m.F_Tags)
            @Html.HiddenFor(m => m.F_RelaItemNum)
            @Html.HiddenFor(m => m.F_ViewNum)
            @Html.HiddenFor(m => m.F_GuestBookNum)
            @Html.HiddenFor(m => m.F_GoodNum)
            @Html.HiddenFor(m => m.F_BadNum)

            @*视图展示*@
            <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;">
                                ID GUID：<em></em>
                            </th>
                            <td colspan="5">
                                @(Model.F_Id) 【@(Model.F_Guid.ToString().ToUpper())】
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <th class="tdright">
                                所属栏目：<em>*</em>
                            </th>
                            <td colspan="5">
                                @(Html.TextBoxFor(t => t.F_TypeId, "", new { @class = "easyui-combotree textbox", @style = "width:300px;", @required = "false", @url = dataTreeUrl }))
                            </td>
                        </tr>
                        <tr>
                            <th class="tdright">
                                父节点：<em>*</em>
                            </th>
                            <td colspan="5">
                                @(Html.TextBoxFor(t => t.F_FatherId, "", new { @class = "easyui-combotree textbox", @style = "width:300px;", @required = "false", @url = dataTypeTreeUrl }))
                                <span class="ico-Tree"></span>&nbsp;&nbsp;&nbsp;&nbsp;排序：@(Html.TextBoxFor(t => t.F_SortOrder, new { Class = "easyui-numberspinner w60 ", required = "true" }))（由高 -> 低）@(Model.F_TypeId)
                            </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" }))
                            </td>
                        </tr>
                        <tr>
                            <th class="tdright" style="width:200px;">
                                归属系统：
                            </th>
                            <td>
                                @Html.DropDownListFor(model => model.F_MarkName, ViewData["DroupInfo_SystemType"] as List<SelectListItem>, new { @class = "easyui-combobox", @style = "width:300px;", @editable = "false" })
                            </td>
                        </tr>
                        <tr>
                            <th class="tdright" style="width:200px;">
                                首页显示：
                            </th>
                            <td>
                                @Html.DropDownListFor(t => t.F_CmsIndexSupport, GBLab.Common.Helper.SelectItem.GetSelectListItem(GBLab.Common.Utils.Dictionarys.TrueOrFalse), new { @class = "easyui-combobox", @style = "width:120px;", @editable = "false" })
                            </td>
                        </tr>
                        <tr>
                            <th class="tdright">
                                首页排序：<em>*</em>
                            </th>
                            <td colspan="5">
                                @(Html.TextBoxFor(t => t.F_CmsIndexSortOrder, new { @Class = "easyui-textbox w500" }))
                            </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="SEO信息" style="padding:6px;">
                    <table class="table">
                        <tr>
                            <th class="tdright" width="100">
                                SEO标题：
                            </th>
                            <td>
                                @Html.TextBoxFor(m => m.F_SeoTitle, new { @class = "easyui-textbox w500" })
                            </td>
                        </tr>
                        <tr>
                            <th class="tdright">
                                SEO关键字：
                            </th>
                            <td>
                                @Html.TextBoxFor(m => m.F_SeoKeyWord, new { @class = "easyui-textbox w500" })
                                <p>
                                    <span>剩余输入<b id="num_F_SeoKeyWord" style="color:#ff0000">160</b> 个字符</span>
                                </p>
                            </td>
                        </tr>
                        <tr>
                            <th class="tdright">
                                SEO描述：
                            </th>
                            <td>
                                @Html.TextBoxFor(m => m.F_SeoDescription, new { @class = "easyui-textbox", @data_options = "multiline:true,width:600,height:300" })
                                <p>
                                    <span>剩余输入<b id="num_F_SeoDescription" style="color:#ff0000">160</b> 个字符</span>
                                </p>
                            </td>
                        </tr>
                    </table>
                </div>

                <div title="参数信息" style="padding:6px;display:none;">
                    <table class="table">
                        <tr>
                            <th class="tdright" style="width:200px;">
                                是否显示：
                            </th>
                            <td>
                                @Html.DropDownListFor(t => t.F_IsView, GBLab.Common.Helper.SelectItem.GetSelectListItem(GBLab.Common.Utils.Dictionarys.TrueOrFalse), new { @class = "easyui-combobox", @style = "width:120px;", @editable = "false" })
                            </td>
                        </tr>
                        <tr>
                            <th class="tdright" style="width:200px;">
                                是否系统节点：
                            </th>
                            <td>
                                @Html.DropDownListFor(t => t.F_IsSystemPoint, GBLab.Common.Helper.SelectItem.GetSelectListItem(GBLab.Common.Utils.Dictionarys.TrueOrFalse), new { @class = "easyui-combobox", @style = "width:120px;", @editable = "false" })
                            </td>
                        </tr>
                    </table>

                    <table class="table">
                        <tr>
                            <th class="tdright">
                                内容：<em></em>
                            </th>
                            <td>
                                @RenderPage("~/Areas/Manage/Views/DefaultSkin/Modules/00Common/Partial/_UEditor.cshtml", new { ImgPath = "", ContentID = "F_Info", Contents = Model.F_Info, IsSelect = true, IsDouble = true })
                            </td>
                        </tr>
                    </table>
                </div>

                <div title="辅助信息" style="padding:6px;display:none;">
                    <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>
                        <tr>
                            <th class="tdright" style="width: 100px;">
                                更新人：<em></em>
                            </th>
                            <td colspan="5">
                                @(Html.TextBox("F_UpdateUserId", Model.T_UpdateUser == null ? "" : Model.T_UpdateUser.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_UpdateDate", Convert.ToDateTime(Model.F_UpdateDate).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["Edit"]))
    } else {
        @Html.Raw(T_FunctionAction.Get_Action_Buttons(actions["Add"]))
    }
    <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-no'" onclick="return window.parent.cancel();">取消</a>
</div>