<ion-view cache-view="false">
  <ion-nav-title>
      <h1 class="title">{{::vm.title}}</h1>
  </ion-nav-title>
  <ion-nav-buttons side="left">
    <button class="button icon-left ion-ios-arrow-back button-clear sino-back-button" sino-nav-direction="back" sino-go-back-button>返回</button>
  </ion-nav-buttons>
  <ion-nav-buttons side="right">
    <sino-notion-edit-button
      daiyue-id="{{::vm.daiyue.sendId}}"
      notion-type="daiyue"
      notion="vm.daiyue.ybTempNotion"
      on-edit="vm.goGroup()"
      class="button button-clear"
      ok-button="阅毕"
      title="阅毕"
      ng-if="vm.daiyue && !vm.hasRead">
    </sino-notion-edit-button>
  </ion-nav-buttons>

  <ion-content class="dy-content" scroll="true" ng-show="vm.daiyue">

    <div class="list toberead-message" ng-if="!vm.hasRead">
      <label class="item item-input item-floating-label">
        <span class="input-label">意见</span>
        <textarea class="text" ng-model="vm.daiyue.ybTempNotion" placeholder="填写阅毕或转发意见"></textarea>
      </label>
      <div class="item" style="border:none;" >
        <sino-user-select-zf
          modal-title="选择用户"
          multiple
          title="转发"
          filter-fn="vm.filter(user, depts, superDepts)"
          close-fn="vm.transimt(userIds, userNames)"
          ng-if="vm.showZfButton">
        </sino-user-select-zf>
        <button class="button button-clear button-positive icon-left ion-eye" style="float:right;" ng-click="vm.yueBi()">阅毕</button>

        <sino-commonnotion-select-button
          on-select="vm.onCommonnotionSelect(notion)"
          class="button button-clear icon-left ion-android-open button-stable"
          style="float:right;"
          title="使用常用意见"></sino-commonnotion-select-button>
      </div>
    </div>

    <div class="card" ng-if="vm.hasRead">
      <div class="item item-divider">阅毕信息</div>
      <div class="item item-text-wrap">
        <span class="notion-item-input">来自：</span>
        <span id-to-name id="vm.daiyue.creUserId" type="user"></span>
        ({{::vm.daiyue.creTime}})
      </div>
      <div class="item item-text-wrap">
        <span class="notion-item-input">待阅内容：</span>
        <span class="notion-item-input" ng-bind-html="vm.daiyue.sendTitle"></span>
      </div>
      <div class="item item-text-wrap">
        <span class="notion-item-input">阅毕时间：</span>
        {{::vm.daiyue.notionDate}}
      </div>
      <div class="item item-text-wrap">
        <span class="notion-item-input">阅毕意见：</span>
        <span ng-bind-html="::vm.daiyue.userNotion"></span>
      </div>
      <div class="item item-text-wrap" ng-if="vm.showZfButton">
        <span class="notion-item-input">转发意见：</span>
        <span ng-bind-html="::vm.daiyue.zfNotion"></span>
      </div>
    </div>

    <div class="card" ng-if="!vm.hasRead">
      <div class="item item-text-wrap">
        <span class="notion-item-input">来自：</span>
        <span id-to-name id="vm.daiyue.creUserId" type="user"></span>
        ({{::vm.daiyue.creTime}})
      </div>
      <div class="item item-text-wrap" ng-if="vm.isZfNotion && vm.showZfButton">
        <span class="notion-item-input">转发意见：</span>
        {{::vm.daiyue.zfNotion}}
      </div>
      <div class="item item-text-wrap">
        <span class="notion-item-input">待阅内容：</span>
        <span class="notion-item-input" ng-bind-html="vm.daiyue.sendTitle"></span>
      </div>
    </div>

    <div class="card card-info" ng-if="!vm.formTplHtml">
      <div class="item item-text-wrap">
        暂未开放此模块的待阅功能，建议您去PC端查阅详情内容。
      </div>
    </div>
    <ng-include src="vm.formTplHtml" ng-if="vm.formTplHtml"></ng-include>

  </ion-content>
</ion-view>
