custom/钱智
This commit is contained in:
parent
e45b4bbb40
commit
41d3abc2fb
|
|
@ -41,7 +41,7 @@ class Calculate extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
queryParams: {
|
||||
name: "",
|
||||
name: "", lastOperates: [],
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
|
|
@ -75,25 +75,26 @@ class Calculate extends Component {
|
|||
const { queryParams, isRefresh, showAdvance, loading, selectedRowKeys } = this.state;
|
||||
const admin = PageAndOptAuth.opts.includes("admin");
|
||||
let calculateOpts = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
calcDaialog: {
|
||||
visible: true,
|
||||
title: getLabel(538780, "核算")
|
||||
}
|
||||
})}>{getLabel(538780, "核算")}</Button>,
|
||||
<Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>,
|
||||
<Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatCalcTax}>{getLabel(111, "批量在线算税")}</Button>,
|
||||
<Button type="ghost" loading={loading.feedback} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatCalcTaxFeedback}>{getLabel(111, "批量获取算税结果")}</Button>,
|
||||
// <Button type="primary" onClick={() => this.setState({
|
||||
// calcDaialog: {
|
||||
// visible: true,
|
||||
// title: getLabel(538780, "核算")
|
||||
// }
|
||||
// })}>{getLabel(538780, "核算")}</Button>,
|
||||
// <Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
||||
// onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>,
|
||||
// <Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
||||
// onClick={this.handleBatCalcTax}>{getLabel(111, "批量在线算税")}</Button>,
|
||||
// <Button type="ghost" loading={loading.feedback} disabled={_.isEmpty(selectedRowKeys)}
|
||||
// onClick={this.handleBatCalcTaxFeedback}>{getLabel(111, "批量获取算税结果")}</Button>,
|
||||
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||
onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
queryParams: { ...queryParams, ...v }
|
||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||
];
|
||||
return !admin ? calculateOpts.slice(4) : calculateOpts;
|
||||
return calculateOpts;
|
||||
// return !admin ? calculateOpts.slice(4) : calculateOpts;
|
||||
};
|
||||
handleBatCalcTax = () => {
|
||||
const { selectedRowKeys: salaryAcctRecordIds, isRefresh, loading } = this.state;
|
||||
|
|
@ -268,7 +269,7 @@ class Calculate extends Component {
|
|||
render() {
|
||||
const {
|
||||
queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance,
|
||||
selectedRowKeys
|
||||
selectedRowKeys, loading
|
||||
} = this.state;
|
||||
return (
|
||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
|
|
@ -291,6 +292,20 @@ class Calculate extends Component {
|
|||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="calc-opt-btns">
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
calcDaialog: {
|
||||
visible: true,
|
||||
title: getLabel(538780, "核算")
|
||||
}
|
||||
})}>{getLabel(538780, "核算")}</Button>
|
||||
<Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>
|
||||
<Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatCalcTax}>{getLabel(111, "批量在线算税")}</Button>
|
||||
<Button type="ghost" loading={loading.feedback} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatCalcTaxFeedback}>{getLabel(111, "批量获取算税结果")}</Button>
|
||||
</div>
|
||||
<CalculateTablelist form={form} queryParams={queryParams} isRefresh={isRefresh}
|
||||
onCalcOpts={this.handleCalcOpts} selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={v => this.setState({ selectedRowKeys: v })}/>
|
||||
|
|
|
|||
|
|
@ -5,17 +5,40 @@
|
|||
* Date: 2023/10/9
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSelect } from "ecCom";
|
||||
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
||||
import { commonEnumList } from "../../../../apis/ruleconfig";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { salaryaccountingStatus: [] };
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
commonEnumList({ enumClass: "com.engine.salary.enums.salaryaccounting.SalaryAcctOptEnum" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
salaryaccountingStatus: _.map(data, item => ({ key: item.defaultLabel, showname: item.defaultLabel }))
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { queryParams } = this.props;
|
||||
const { dateRange, name } = queryParams;
|
||||
const { queryParams } = this.props, { salaryaccountingStatus } = this.state;
|
||||
const { dateRange, name, lastOperates = [] } = queryParams;
|
||||
return (
|
||||
<div className="salary-btn-flex">
|
||||
<div className="bacthOptStatus">
|
||||
<span className="label">{getLabel(111, "批量操作状态:")}</span>
|
||||
<WeaSelect
|
||||
options={salaryaccountingStatus} style={{ width: 200 }} multiple value={lastOperates.join(",")}
|
||||
onChange={v => this.props.onChange({ lastOperates: v.split(",") })}/>
|
||||
</div>
|
||||
<div className="mounth-range">
|
||||
<span className="label">{getLabel(543549, "薪资所属月:")}</span>
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
|
|
|
|||
|
|
@ -51,11 +51,26 @@
|
|||
.salary-btn-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
.bacthOptStatus {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 0;
|
||||
|
||||
.wea-select-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mounth-range {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
|
||||
.label {
|
||||
color: #999;
|
||||
|
|
@ -88,6 +103,17 @@
|
|||
.calculate-main-layout {
|
||||
.wea-new-top-content {
|
||||
overflow-y: hidden;
|
||||
|
||||
.calc-opt-btns {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
padding: 8px 16px;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.advance-calc {
|
||||
|
|
|
|||
Loading…
Reference in New Issue