<div class="wrapper">
  <div class="header">
    <div (click)="goBack()" style="position: absolute;left: 10px;top: 10px;">返回</div>
    <!-- <div class="paginate">
      <div class="pre"><span class="iconfont icon-fanhui"></span>上一期</div>
      <div class="next">下一期<span class="iconfont icon-ar-r"></span></div>
    </div> -->
    <div class="price">
      <div>
        <div class="pre" (click)="querySalaryDetail('pre')"><span class="iconfont icon-fanhui"></span>上一期</div>
        <div class="salay">￥{{after_tax_comis | number: "1.2-2"}}</div> 
        <div class="next" (click)="querySalaryDetail('next')">下一期<span class="iconfont icon-ar-r"></span></div>
      </div>
      <p><span class="cash">{{years}}年{{month}}月佣金</span></p>
    </div>
  </div>
  <div class="content_wrapper">
    <div class="part">
      <div class="item">
        <div class="title">个人销售(A)</div>
        <div class="item_detail" (click)="jumpToFirstYearSales('首年度销售佣金',1,1)" *ngIf="fycSalesInfo">
          <span>首年度销售佣金</span>
          <span class="red">{{fycSalesInfo.commission | number: "1.2-2" }}<i class="iconfont icon-ar-r"></i> </span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('续年度销售佣金',1,2)" *ngIf="rycSalesInfo">
          <span>续年度销售佣金</span>
          <span class="red">{{rycSalesInfo.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
      </div>
      <div class="item">
        <div class="title">销售管理(B)</div>
        <div class="item_detail" (click)="jumpToFirstYearSales('首年度辅导奖金',1,3)" *ngIf="fycTutorInfo">
          <span>首年度辅导奖金</span>
          <span class="red"> {{fycTutorInfo.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('续年度辅导奖金',1,4)" *ngIf="rycTutorInfo">
          <span>续年度辅导奖金</span>
          <span class="red">{{rycTutorInfo.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('首年度绩效奖金',2,5)" *ngIf="fycMeritsInfo">
          <span>首年度绩效奖金</span>
          <span class="red">{{fycMeritsInfo.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('续年度绩效奖金',2,6)" *ngIf="rycMeritsInfo">
          <span>续年度绩效奖金</span>
          <span class="red">{{rycMeritsInfo.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('推介奖金',1,7)" *ngIf="recommendAward">
          <span>推介奖金</span>
          <span class="red">{{recommendAward.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('体系推介奖',2,8)" *ngIf="systemRecommendAward">
          <span>体系推介奖金</span>
          <span class="red">{{systemRecommendAward.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('特别管理奖',1,9)" *ngIf="specialManagementAward">
          <span>特别管理奖金</span>
          <span class="red">{{specialManagementAward.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
      </div>
      <div class="item">
        <div class="title" style="justify-content: inherit;" (click)="otherToastShow = true">
          其他加扣款(C)
          <span class="iconfont icon-wenhao" style="margin-top: 3px;color: #f8002e;margin-left: 3px;"></span></div>
        <div class="item_detail" (click)="jumpToFirstYearSales('其他税前加扣款',3,10)" *ngIf="otherPreTaxDeduction">
          <span>其它税前加扣款</span>
          <span class="red">{{otherPreTaxDeduction.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('公司激励奖',3,11)" *ngIf="IncentiveBonus">
          <span>公司激励奖金</span>
          <span class="red">{{IncentiveBonus.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('加码奖金',3,12)" *ngIf="addWeight">
          <span>加码奖金</span>
          <span class="red">{{addWeight.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('季度奖金',3,13)" *ngIf="quarterlyBonus">
          <span>季度奖金</span>
          <span class="red">{{quarterlyBonus.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r" ></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales('银盾在线佣金',4,14)" *ngIf="onlineAward">
          <span>银盾在线佣金</span>
          <span class="red">{{onlineAward.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
      </div>
      <div class="item" style="margin-right: 19px;">
        <div class="title">
          <span>佣金合计(A+B+C)</span> 
          <span class="red">{{totalCommission | number: "1.2-2"}}</span>
        </div>
      </div>
    </div>
    <div  class="part">
      <div class="item" style="margin-right: 19px;">
        <div class="title">
          <span (click)="otherTaxFlag = true">代扣个人所得税/增值税/附加税(D)<span class="iconfont icon-wenhao" style="margin-top: 3px;color: #f8002e;margin-left: 3px;"></span></span> 
          <span class="red">{{deduction | number: "1.2-2" }}</span>
        </div>
        <!-- <a style="color:#2c67a0;" (click)="lookTak()">点击查看个人所得税明细</a> -->
      </div>
    </div>
    <div  class="part">
      <div class="item" style="margin-right: 19px;">
        <div class="title">
          <span>本期实领(A+B+C-D)</span> 
          <span class="red">{{after_tax_comis | number: "1.2-2"}}</span>
        </div>
      </div>
    </div>
    
  </div>
  <div *ngIf="taxToastShow">
    <ydlife-detail-modal [application]="1"
      (closeDetailModal)="taxToastShow = false"></ydlife-detail-modal>
  </div>
  <div *ngIf="otherToastShow">
    <ydlife-detail-modal [application]="2"
      (closeDetailModal)="otherToastShow = false"></ydlife-detail-modal>
  </div>
  <div *ngIf="otherTaxFlag">
    <ydlife-detail-modal [application]="3"
      (closeDetailModal)="otherTaxFlag = false"></ydlife-detail-modal>
  </div>
</div>
<div class="mask" *ngIf="takFlag == true;"></div>
<div class="tax_mask" *ngIf="takFlag == true;">
  <div class="close" (click)="takFlag = false;"> X </div>
  <div class="mask_title">
    <div>个人所得税预扣明细</div>
    <div (click)="taxToastShow = true"><span class="iconfont icon-zhuyishixiang"></span> 个人所得税政策</div>
  </div>
  <div class="tax_content">
    <div class="tax_item">
      <div>
        <span>本期应税所得</span>
        <span class="red">{{sumcommission | number: "1.2-2"}}</span>
      </div>
      <div>
        <span>年度累计应税所得</span>
        <span class="red">{{total_commission | number: "1.2-2"}}</span>
      </div>
      <div>
        <span>预扣率</span>
        <span class="red"></span>
      </div>
    </div>
    <div class="tax_item">
      <div>
        <span>累计应扣所得税（A）</span>
        <span class="red">{{total_personal_tax | number: "1.2-2"}}</span>
      </div>
      <div>
        <span>累计已扣所得税（B）</span>
        <span class="red">{{total_paid | number: "1.2-2"}}</span>
      </div>
      <div>
        <span>本期应扣所得税（A-B）</span>
        <span class="red">{{personal_tax | number: "1.2-2" }}</span>
      </div>
    </div>
  </div>
</div>
