diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js index f5627a0c..e85383ca 100644 --- a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js +++ b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js @@ -17,7 +17,7 @@ class Index extends Component { return (
- {getLabel(543549, "薪资所属月:")} + {getLabel(111, "税款所属期:")} this.props.onChange({ dateRange: v })}/>
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js index 02fa85cc..831c33cb 100644 --- a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js +++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js @@ -8,7 +8,7 @@ import React, { Component } from "react"; import { WeaLocaleProvider, WeaTable } from "ecCom"; import { Dropdown, Menu, message, Modal } from "antd"; import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare"; -import { sysConfCodeRule } from "../../../../apis/ruleconfig"; +import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig"; const getLabel = WeaLocaleProvider.getLabel; @@ -35,18 +35,19 @@ class Index extends Component { if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" }); }); }; - getDeclareList = (props) => { - const { pageInfo } = this.state; - const { queryParams } = props; + getDeclareList = async (props) => { + const { data: sysData } = await sysinfo(); + const { pageInfo } = this.state, { queryParams } = props; const { dateRange, ...extra } = queryParams; - const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || []; - const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra }; + const [fromSalaryMonth, endSalaryMonth] = dateRange || []; + const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra }; const payload = { ...pageInfo, ...params }; this.setState({ loading: true }); getDeclareList(payload).then(({ status, data }) => { this.setState({ loading: false }); if (status) { - const { columns, list: dataSource, pageNum, pageSize, total } = data; + let { columns, list: dataSource, pageNum, pageSize, total } = data; + sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth")); this.setState({ dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total }, columns: _.map(columns, o => {