custom/钱智
This commit is contained in:
parent
e45b4bbb40
commit
41d3abc2fb
|
|
@ -41,7 +41,7 @@ class Calculate extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
name: "",
|
name: "", lastOperates: [],
|
||||||
dateRange: [
|
dateRange: [
|
||||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||||
moment(new Date()).endOf("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 { queryParams, isRefresh, showAdvance, loading, selectedRowKeys } = this.state;
|
||||||
const admin = PageAndOptAuth.opts.includes("admin");
|
const admin = PageAndOptAuth.opts.includes("admin");
|
||||||
let calculateOpts = [
|
let calculateOpts = [
|
||||||
<Button type="primary" onClick={() => this.setState({
|
// <Button type="primary" onClick={() => this.setState({
|
||||||
calcDaialog: {
|
// calcDaialog: {
|
||||||
visible: true,
|
// visible: true,
|
||||||
title: getLabel(538780, "核算")
|
// title: getLabel(538780, "核算")
|
||||||
}
|
// }
|
||||||
})}>{getLabel(538780, "核算")}</Button>,
|
// })}>{getLabel(538780, "核算")}</Button>,
|
||||||
<Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
// <Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
||||||
onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>,
|
// onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>,
|
||||||
<Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
// <Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
||||||
onClick={this.handleBatCalcTax}>{getLabel(111, "批量在线算税")}</Button>,
|
// onClick={this.handleBatCalcTax}>{getLabel(111, "批量在线算税")}</Button>,
|
||||||
<Button type="ghost" loading={loading.feedback} disabled={_.isEmpty(selectedRowKeys)}
|
// <Button type="ghost" loading={loading.feedback} disabled={_.isEmpty(selectedRowKeys)}
|
||||||
onClick={this.handleBatCalcTaxFeedback}>{getLabel(111, "批量获取算税结果")}</Button>,
|
// onClick={this.handleBatCalcTaxFeedback}>{getLabel(111, "批量获取算税结果")}</Button>,
|
||||||
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||||
onChange={v => this.setState({
|
onChange={v => this.setState({
|
||||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||||
queryParams: { ...queryParams, ...v }
|
queryParams: { ...queryParams, ...v }
|
||||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||||
];
|
];
|
||||||
return !admin ? calculateOpts.slice(4) : calculateOpts;
|
return calculateOpts;
|
||||||
|
// return !admin ? calculateOpts.slice(4) : calculateOpts;
|
||||||
};
|
};
|
||||||
handleBatCalcTax = () => {
|
handleBatCalcTax = () => {
|
||||||
const { selectedRowKeys: salaryAcctRecordIds, isRefresh, loading } = this.state;
|
const { selectedRowKeys: salaryAcctRecordIds, isRefresh, loading } = this.state;
|
||||||
|
|
@ -268,7 +269,7 @@ class Calculate extends Component {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance,
|
queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance,
|
||||||
selectedRowKeys
|
selectedRowKeys, loading
|
||||||
} = this.state;
|
} = this.state;
|
||||||
return (
|
return (
|
||||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
<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>
|
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||||
</div>
|
</div>
|
||||||
</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}
|
<CalculateTablelist form={form} queryParams={queryParams} isRefresh={isRefresh}
|
||||||
onCalcOpts={this.handleCalcOpts} selectedRowKeys={selectedRowKeys}
|
onCalcOpts={this.handleCalcOpts} selectedRowKeys={selectedRowKeys}
|
||||||
onSelectChange={v => this.setState({ selectedRowKeys: v })}/>
|
onSelectChange={v => this.setState({ selectedRowKeys: v })}/>
|
||||||
|
|
|
||||||
|
|
@ -5,17 +5,40 @@
|
||||||
* Date: 2023/10/9
|
* Date: 2023/10/9
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
import { WeaInputSearch, WeaLocaleProvider, WeaSelect } from "ecCom";
|
||||||
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
||||||
|
import { commonEnumList } from "../../../../apis/ruleconfig";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class Index extends Component {
|
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() {
|
render() {
|
||||||
const { queryParams } = this.props;
|
const { queryParams } = this.props, { salaryaccountingStatus } = this.state;
|
||||||
const { dateRange, name } = queryParams;
|
const { dateRange, name, lastOperates = [] } = queryParams;
|
||||||
return (
|
return (
|
||||||
<div className="salary-btn-flex">
|
<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">
|
<div className="mounth-range">
|
||||||
<span className="label">{getLabel(543549, "薪资所属月:")}</span>
|
<span className="label">{getLabel(543549, "薪资所属月:")}</span>
|
||||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,26 @@
|
||||||
.salary-btn-flex {
|
.salary-btn-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
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 {
|
.mounth-range {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 10px;
|
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|
@ -88,6 +103,17 @@
|
||||||
.calculate-main-layout {
|
.calculate-main-layout {
|
||||||
.wea-new-top-content {
|
.wea-new-top-content {
|
||||||
overflow-y: hidden;
|
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 {
|
.advance-calc {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue