<div class="wrapper">
  <div class="header">
    <div (click)="goBack()" style="position: absolute;left: 10px;top: 10px;" *ngIf="!isPreSalary">返回</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 *ngIf="!isPreSalary">
        <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>
      <div *ngIf="isPreSalary" style="justify-content: center;">
        <div class="salay">￥{{after_tax_comis | number: "1.2-2"}}</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(fycSalesInfo,'首年度直接销售佣金',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(rycSalesInfo,'续年度直接销售佣金',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 class="item_detail" (click)="jumpToFirstYearSales(monthlySalesAddWeight,'月度销售加码奖金',1,16)" *ngIf="monthlySalesAddWeight">
          <span>月度销售加码奖金</span>
          <span class="red">{{monthlySalesAddWeight.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales(continuedAnnualSalesBonus,'续年度销售加码奖金',1,17)" *ngIf="continuedAnnualSalesBonus">
          <span>续年度销售加码奖金</span>
          <span class="red">{{continuedAnnualSalesBonus.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales(independentBrokerAllowance,'独立经纪人展业津贴',1,18)" *ngIf="independentBrokerAllowance">
          <span>独立经纪人展业津贴</span>
          <span class="red">{{independentBrokerAllowance.commission | number: "1.2-2"}} <i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales(direcSalesAddWeightList,'直接销售加码佣金',1,23)" *ngIf="direcSalesAddWeightList">
          <span>直接销售加码佣金</span>
          <span class="red">{{direcSalesAddWeightList.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(fycTutorInfo,'首年度辅导佣金',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(rycTutorInfo,'续年度辅导佣金',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(specialManagementAward,'特别管理奖',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 class="item_detail" (click)="jumpToFirstYearSales(recommendAward,'推荐奖金',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(systemRecommendAward,'体系推荐奖',1,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(fycMeritsInfo,'团队管理绩效达标奖金',1,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(rycMeritsInfo,'续年度绩效奖金',1,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(directCounseling,'直接辅导岗位津贴',1,19)" *ngIf="directCounseling">
          <span>直接辅导岗位津贴</span>
          <span class="red">{{directCounseling.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales(indirectCounseling,'隔代辅导岗位津贴',1,20)" *ngIf="indirectCounseling">
          <span>隔代辅导岗位津贴</span>
          <span class="red">{{indirectCounseling.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales(TLCoachingAllowance,'团队长辅导津贴',1,21)" *ngIf="TLCoachingAllowance">
          <span>团队长辅导津贴</span>
          <span class="red">{{TLCoachingAllowance.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales(breedingBonus,'育成奖金',1,22)" *ngIf="breedingBonus">
          <span>育成奖金</span>
          <span class="red">{{breedingBonus.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(IncentiveBonus,'公司激励奖',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(otherPreTaxDeduction,'其他税前加扣款',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(other,'其他',3,15)" *ngIf="other">
          <span>其它</span>
          <span class="red">{{other.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
        </div>
        <div class="item_detail" (click)="jumpToFirstYearSales(addWeight,'加码奖金',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(quarterlyBonus,'季度奖金',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(onlineAward,'银盾在线佣金',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>
