release/2.19.1.2503.01-业务线个税

This commit is contained in:
lys 2025-03-27 13:19:59 +08:00
parent 6a81dd9c76
commit 154b16ad6e
2 changed files with 10 additions and 7 deletions

View File

@ -6,13 +6,13 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
import { Button, message } from "antd";
import { getSearchs } from "../../../../util";
import { cumTaxPeriodCondition } from "../columns";
import { onlineRequest } from "../../../../apis/cumDeduct";
import { onlineActualAddUpAdvanceTax } from "../../../../apis/cumSituation";
import { postFetch } from "../../../../util/request";
const getLabel = WeaLocaleProvider.getLabel;
const getKey = WeaTools.getKey;
@ -31,14 +31,18 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
};
}
componentWillReceiveProps(nextProps, nextContext) {
async componentWillReceiveProps(nextProps, nextContext) {
const { cumDeductStore: { cumTaxPeriodForm, changeCumTaxPeriodForm } } = nextProps;
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
this.setState({
conditions: _.map(cumTaxPeriodCondition, item => ({
...item, items: _.map(item.items, o => {
if (getKey(o) === "taxAgentIds") {
return { ...o, lable: getLabel(o.lanId, o.label), options: toJS(nextProps.taxAgentOption) };
return {
...o, lable: getLabel(o.lanId, o.label),
options: _.map(data, g => ({ key: String(g.id), showname: g.name }))
};
}
return { ...o, lable: getLabel(o.lanId, o.label) };
})

View File

@ -39,7 +39,7 @@ import SalaryCumDeductChooseTaxPeriodDialog from "./components/salaryCumDeductCh
const getLabel = WeaLocaleProvider.getLabel;
const getKey = WeaTools.getKey;
@inject("taxAgentStore", "cumDeductStore")
@inject("cumDeductStore")
@observer
class Index extends Component {
constructor(props) {
@ -73,7 +73,7 @@ class Index extends Component {
targetid: "",
taxAgentOption: [],
cumTaxPeriodDialog: {
visible: false, title: "", type: "", taxAgentOption: []
visible: false, title: "", type: ""
},
feedbackLoading: false,
incomeTaxStatus: false
@ -410,7 +410,6 @@ class Index extends Component {
*/
getTopBtns = () => {
const { addAllLoading, cumTaxPeriodDialog, feedbackLoading, incomeTaxStatus } = this.state;
const { taxAgentStore: { taxAgentOption } } = this.props;
const commonBtns = [
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
@ -431,7 +430,7 @@ class Index extends Component {
const incomeTaxBtns = [
<Button type="primary" onClick={() => this.setState({
cumTaxPeriodDialog: {
...cumTaxPeriodDialog, taxAgentOption,
...cumTaxPeriodDialog,
visible: true, type: "online",
title: getLabel(542240, "税款所属期")
}