@model GBLab.Entities.T_CmsNode
@using GBLab.Common.Expand
@{
    Layout = null;
}
<form method="post" action="/Manage/CmsNode/Action_Edit_Add" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
    <span id="CmsNode_TypeId" style="display: none;">@Request.QueryString["F_TypeId"].ToString()</span>
    <div class="tabs" currentindex="0" eventtype="click">
        <div class="tabsHeader">
            <div class="tabsHeaderContent">
                <ul>
                    <li><a href="javascript:;"><span>基本信息</span></a></li>
                    <li><a href="javascript:;"><span>树形信息</span></a></li>
                    <li><a href="javascript:;"><span>SEO信息</span></a></li>
                    <li><a href="javascript:;"><span>辅助信息</span></a></li>
                </ul>
            </div>
        </div>

        <div class="tabsContent" layoutH="78">
            <div>
                <div class="pageFormContent" style="padding: 5px; background-color: #eef4f5;border-style:none;" layoutH="88">
                    <dl style="display: none;">
                        <dt>执行参数：</dt>
                        <dd>
                            <input type="text" name="Action" maxlength="20" alt="请输入执行参数" value='@Request.QueryString["Action"].ToString()' />
                        </dd>
                    </dl>

                    <dl style='display:none;' class='nowrap'>
                        <dt>分类：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_TypeId", "分类", Model.F_TypeId == null ? "" : Model.F_TypeId.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl>
                        <dt>唯一标识：</dt>
                        <dd style="color:green;font-weight:bold;">
                            @("【ID:" + Model.F_Id.ToString() + "】-【Guid:" + Model.F_Guid.ToString() + "】")
                        </dd>
                    </dl>

                    @if (Request.QueryString["F_Id"].DefaultIsNullOrEmpty("0") == "0")
                    {
                        <dl class='nowrap'>
                            <dt>信息模型：</dt>
                            <dd>
                                @Html.DropDownListFor(model => model.F_CmsModelId, ViewData["DroupInfo_CmsModel"] as List<SelectListItem>, new { @class = "combox", @onchange = "" })
                            </dd>
                        </dl>
                        <dl class='nowrap'>
                            <dt>父节点：</dt>
                            <dd>
                                @Html.DropDownListFor(model => model.F_FatherId, ViewData["DroupInfo_FatherId"] as List<SelectListItem>, new { @class = "combox", })
                            </dd>
                        </dl>
                    }
                    else
                    {
                        <dl class='nowrap' style="display:none;">
                            <dt>信息模型：</dt>
                            <dd>
                                @Html.DropDownListFor(model => model.F_CmsModelId, ViewData["DroupInfo_CmsModel"] as List<SelectListItem>, new { @class = "combox", @onchange = "" })
                            </dd>
                        </dl>
                        <dl class='nowrap'>
                            <dt>信息模型：</dt>
                            <dd>
                                @Model.T_CmsModel.F_Name
                            </dd>
                        </dl>
                        <dl class='nowrap' style="display:none;">
                            <dt>父节点：</dt>
                            <dd>
                                @Html.DropDownListFor(model => model.F_FatherId, ViewData["DroupInfo_FatherId"] as List<SelectListItem>, new { @class = "combox", })
                            </dd>
                        </dl>
                        <dl class='nowrap'>
                            <dt>父节点：</dt>
                            <dd>
                                @GBLab.Entities.T_CmsNode.FindByF_Id(Model.F_FatherId).F_Name
                            </dd>
                        </dl>
                    }
                    <dl class='nowrap'>
                        <dt>名称：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_Name", "名称", Model.F_Name == null ? "" : Model.F_Name.ToString(), "true", "", "1", "80", "", ""))
                        </dd>
                    </dl>
                    <dl class='nowrap' id="Item_Contain_F_Url">
                        <dt>链接：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_Url", "链接", Model.F_Url == null ? "" : Model.F_Url.ToString(), "false", "", "1", "80", "", ""))
                            <br />
                            <span style="color:gray;line-height:25px;font-size:8pt;">
                                首页：Default.html
                                @*<br />
                                留言：GuestBook.html*@
                            </span>
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>排序：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_SortOrder", "排序", Model.F_SortOrder == null ? "" : Model.F_SortOrder.ToString(), "false", "", "1", "80", "", ""))
                        </dd>
                    </dl>
                    <dl style='display:none;' class='nowrap'>
                        <dt>节点类别序号（根节点分类ID）：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_Type", "节点类别序号（根节点分类ID）", Model.F_Type == null ? "" : Model.F_Type.ToString(), "false", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>状态：</dt>
                        <dd>
                            @Html.DropDownListFor(model => model.F_MarkStatus, ViewData["MarkStatus"] as List<SelectListItem>, new { @class = "combox", })
                        </dd>
                    </dl>
                    <dl class='nowrap' id="Item_Contain_F_Info">
                        <dt>单页信息：</dt>
                        <dd>
                            @Html.Raw(Html.WebEditor("F_Info", Model.F_Info == null ? "" : Model.F_Info.ToString(), "18", "120"))
                        </dd>
                    </dl>
                </div>
            </div>
            <div>
                <div class="pageFormContent" style="padding: 5px; background-color: #eef4f5;border-style:none;" layoutH="88">
                    <dl class='nowrap'>
                        <dt>子项数量：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_ItemCount", "子项数量", Model.F_ItemCount == null ? "" : Model.F_ItemCount.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>全部子项数量：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_ItemAllCount", "全部子项数量", Model.F_ItemAllCount == null ? "" : Model.F_ItemAllCount.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>节点路径：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_Path", "节点路径", Model.F_Path == null ? "" : Model.F_Path.ToString(), "false", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                </div>
            </div>
            <div>
                <div class="pageFormContent" style="padding: 5px; background-color: #eef4f5;border-style:none;" layoutH="88">
                    <dl class='nowrap'>
                        <dt>标题：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_MutiRow("F_SeoTitle", Model.F_SeoTitle == null ? "" : Model.F_SeoTitle.ToString(), "5", "100"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>关键字：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_MutiRow("F_SeoKeyword", Model.F_SeoKeyword == null ? "" : Model.F_SeoKeyword.ToString(), "5", "100"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>描述：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_MutiRow("F_SeoDescription", Model.F_SeoDescription == null ? "" : Model.F_SeoDescription.ToString(), "5", "100"))
                        </dd>
                    </dl>
                </div>
            </div>
            <div>
                <div class="pageFormContent" style="padding: 5px; background-color: #eef4f5;border-style:none;" layoutH="88">
                    <dl class='nowrap' style="display:none">
                        <dt>Id：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_Id", "Id", Model.F_Id == null ? "" : Model.F_Id.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap' style="display:none">
                        <dt>Guid：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_Guid", "Guid", Model.F_Guid == null ? "" : Model.F_Guid.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap' style="display:none">
                        <dt>扩展分类标识：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_MarkName", "扩展分类标识", Model.F_MarkName == null ? "" : Model.F_MarkName.ToString(), "false", "", "1", "80", "", ""))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>浏览次数：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_ViewNum", "浏览次数", Model.F_ViewNum == null ? "" : Model.F_ViewNum.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>留言次数：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_GuestBookNum", "留言次数", Model.F_GuestBookNum == null ? "" : Model.F_GuestBookNum.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>点赞数量：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_GoodNum", "点赞数量", Model.F_GoodNum == null ? "" : Model.F_GoodNum.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>差评数量：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_BadNum", "差评数量", Model.F_BadNum == null ? "" : Model.F_BadNum.ToString(), "true", "", "1", "80", "", "", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>添加人：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_AddUserId", "添加人", Model.T_AddUser == null ? "" : Model.T_AddUser.F_Name, "true", "", "1", "80", "", "", "true", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>添加日期：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Date("F_AddDate", Model.F_AddDate.ToString("yyyy-MM-dd HH:mm:ss"), "yyyy-MM-dd HH:mm:ss", "-30", "20", "true", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>更新人：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Common("F_UpdateUserId", "更新人", Model.T_UpdateUser == null ? "" : Model.T_UpdateUser.F_Name, "true", "", "1", "80", "", "", "true", "true"))
                        </dd>
                    </dl>
                    <dl class='nowrap'>
                        <dt>更新日期：</dt>
                        <dd>
                            @Html.Raw(Html.WebInput_Date("F_UpdateDate", Model.F_UpdateDate.ToString("yyyy-MM-dd HH:mm:ss"), "yyyy-MM-dd HH:mm:ss", "-30", "20", "true", "true"))
                        </dd>
                    </dl>
                </div>
            </div>
        </div>
        <div class="tabsFooter">
            <div class="tabsFooterContent">
            </div>
        </div>
    </div>
    <div class="tabsFooter">
        <div class="tabsFooterContent">
            <div class="formBar" style="padding: 0;border-width: 1px;margin-top:3px;">
                <ul style="margin-top: 3px; margin-right: 3px;">
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">
                                    提交
                                </button>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="button" onclick="$.pdialog.reload('/Manage/CmsNode/Edit?Action=Add&F_TypeId=' + @Request.QueryString["F_TypeId"].ToString(), '' , 'TagEditPage' )">
                                    创建
                                </button>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="button">
                            <div class="buttonContent">
                                <button type="button" class="close">
                                    取消
                                </button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</form>
<script language="javarcript" type="text/javascript">
    $(function () {
        Item_ActionView($("#F_CmsModelId").val());
        $('#F_CmsModelId').change(function () {
            var p1 = $(this).children('option:selected').val();//这就是selected的值
            console.log(p1);
            Item_ActionView(p1);
        })
        Item_ActionView(@(Model.F_CmsModelId.DefaultIsNullOrEmpty("0")));
    });
    function Item_ActionView(cmsModelId) {
        console.log(cmsModelId);
        switch (cmsModelId) {
            case '1':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '2':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '3':
                $("#Item_Contain_F_Url").show();
                $("#Item_Contain_F_Info").hide();
                break;
            case '4':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '5':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '6':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '7':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '8':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '9':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").show();
                break;
            case '10':
                $("#Item_Contain_F_Url").show();
                $("#Item_Contain_F_Info").hide();
                break;
            case '11':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '12':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
            case '13':
                $("#Item_Contain_F_Url").hide();
                $("#Item_Contain_F_Info").hide();
                break;
                //            default:
                //                n 与 case 1 和 case 2 不同时执行的代码
        }
    }

</script>