/*
 * Author: 黎永顺
 * name: 薪资所属月提示语
 * Description:
 * Date: 2023/9/13
 */
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import "./index.less";

const getLabel = WeaLocaleProvider.getLabel;

class Index extends Component {
  render() {
    const { attendCycle, salaryCycle, taxCycle, salaryMonth, socialSecurityCycle } = this.props;
    const { fromDate: attendFromDate, endDate: attendEndDate } = attendCycle,
      { fromDate: salaryFromDate, endDate: salaryEndDate } = salaryCycle;
    return (
      <div className="salary-month-tip">
        <div className="line">
          <div className="lable">{getLabel(543375, "薪资周期")}</div>
          <div className="value">{`${salaryFromDate}${getLabel(15322, "至")}${salaryEndDate}`}</div>
        </div>
        <div className="line">
          <div className="lable">{getLabel(542240, "税款所属期")}</div>
          <div className="value">{taxCycle || salaryMonth}</div>
        </div>
        <div className="line">
          <div className="lable">{getLabel(543475, "考勤取值周期")}</div>
          <div className="value">{`${attendFromDate}${getLabel(15322, "至")}${attendEndDate}`}</div>
        </div>
        <div className="line">
          <div className="lable">{getLabel(543466, "福利台账月份")}</div>
          <div
            className="value">{`${getLabel(19422, "引用")}${socialSecurityCycle}${getLabel(543476, "的福利台账数据")}`}</div>
        </div>
      </div>
    );
  }
}

export default Index;
