<rt-form id="{{vm.form.name}}" name="{{vm.form.name}}" novalidate>
    <div class="row rt-margin-bottom-before-box">
        <div class="col-sm-1">
            <button class="btn btn-link" type="button" ng-click="vm.actions.hide()"><i class="fa fa-sign-out"></i> 关闭
            </button>
        </div>
        <div class="col-sm-offset-3 col-sm-8">
            <div class="pull-right">
                <rt-button id="btnSave" rt-style="link" rt-title="保存" rt-icon="floppy-o"
                           ng-click="vm.actions.save(false)"
                           ng-show="(vm.form.type === 'Create' && vm.privilege.IsCreate) || (vm.form.type === 'Edit' && vm.form.data.StateCode.Value == 0 && vm.privilege.IsWrite)">
                </rt-button>
                <rt-button id="btnSaveAndNew" rt-style="link" rt-title="保存并新建" rt-icon="floppy-o"
                           ng-click="vm.actions.save(true)"
                           ng-show="(vm.form.type === 'Create' && vm.privilege.IsCreate) || (vm.form.type === 'Edit' && vm.form.data.StateCode.Value == 0 && vm.privilege.IsWrite)">
            </div>
        </div>
    </div>

    <div class="nav-tabs-custom">
        <ul class="nav nav-tabs" ng-if="vm.form.type === 'Edit'">
            <li class="active">
                <a href="#tab1{{vm.form.name}}" onclick="return false;" data-toggle="tab">资料</a>
            </li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane active" id="tab1{{vm.form.name}}">
                <rt-section rt-title="基本信息">
                    <rt-section-row>
                        <rt-input rt-type="text"
                                  rt-title="知识库类别名称"
                                  rt-disabled="vm.form.data.StateCode.Value == 1"
                                  rt-col="4"
                                  rt-required="true"
                                  ng-model="vm.form.data.name"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-lookup2 rt-title="父类别"
                                    rt-disabled="vm.form.data.StateCode.Value == 1"
                                    ng-model="vm.form.data.parenttypeId"
                                    rt-get-data-name="XCRM.GetKnowledgeType"
                                    rt-order-by="name"
                                    rt-col-list="[{Code:'name',Name:'类别名称'}]"
                                    rt-col="4"></rt-lookup2>
                    </rt-section-row>
                </rt-section>
                <rt-section rt-title="状态">
                    <rt-section-row>
                        <rt-picklist ng-model="vm.form.data.StateCode"
                                     rt-title="状态"
                                     rt-col="4"
                                     rt-options="vm.picklist.StateCode"
                                     rt-disabled="true"></rt-picklist>
                    </rt-section-row>
                </rt-section>
            </div>
        </div>
</rt-form>