/*
 * Author: 黎永顺
 * name: 薪资核算-查询
 * Description:
 * Date: 2023/10/9
 */
import React, { Component } from "react";
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";

const getLabel = WeaLocaleProvider.getLabel;

class Index extends Component {
  render() {
    const { queryParams } = this.props;
    const { dateRange, name } = queryParams;
    return (
      <div className="salary-btn-flex">
        <div className="mounth-range">
          <span className="label">{getLabel(543549, "薪资所属月：")}</span>
          <MonthRangePicker dateRange={dateRange} viewAttr={2}
                            onChange={v => this.props.onChange({ dateRange: v })}/>
        </div>
        <div className="advance-custom">
          <WeaInputSearch value={name}
                          placeholder={getLabel(543431, "请输入薪资账套名称")}
                          onChange={v => this.props.onChange({ name: v })}
                          onSearch={this.props.onSearch}
          />
          <a href="javascript:void(0);" onClick={this.props.onAdvance}>{getLabel(111, "高级搜索")}</a>
        </div>
      </div>
    );
  }
}

export default Index;
