<div class="content-heading  justify-content-between">
  <div>大类管理</div>
  <div class="float-right">
    <div class="row">
      <div class="wd-xl wd-sm mr-1">
        <ngx-select [items]="schoolArray" [(ngModel)]="query.school_id" (ngModelChange)="requestData()" placeholder="学校"
            [autoClearSearch]="true" optionValueField="school_id" optionTextField="code_name">
        </ngx-select>
      </div>
      <div class="btn-group mb-1 mr-1" dropdown>
        <button class="btn dropdown-toggle btn-secondary btn-lg" type="button" dropdownToggle>大类管理
          <span class="caret"></span>
        </button>
        <div *dropdownMenu class="dropdown-menu modal-lg" role="menu">
          <a class="dropdown-item" href="#" (click)="showModal()">新增大类</a>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="table-responsive bg-white table-full">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th>学校代码</th>
      <th>学校名称</th>
      <th>大类名称</th>
      <th>大类描述</th>
      <th>排序</th>
      <th class="th-b-3"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.school_code}}</td>
      <td>{{v.school_name}}</td>
      <td>{{v.category_name}}</td>
      <td title="{{v.category_desc}}">{{v.category_desc | subStr: 15}}</td>
      <td>{{v.ord}}</td>
      <td>
          <span class="table-button" (click)="showModal({ResponseEntity:v})"><em class="fa-lg fas fa-edit"></em></span>
          <span class="table-button ml-3 text-danger" (click)="pager.optrRecord('cf/material/category/delete.htm', v, {successMsg:'大类已删除！', confirmMsg: '谨慎操作，确定要删除该大类吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./cf/material/category/page.htm'" [pagerParams]="{school_id: query.school_id}" #pager></frame-pager>
</div>

