diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js index 821442b1..3680b10a 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js @@ -42,9 +42,9 @@ class TaxSetDialog extends Component { } getList = (props) => { - const { id, dataType } = props || this.props, { pageInfo, detailSettingsDialog } = this.state; + const { id, dataType, viewParams = {} } = props || this.props, { pageInfo, detailSettingsDialog } = this.state; this.setState({ loading: true }); - postFetch(`/api/bs/hrmsalary/otherDeduction/${dataType}List`, { ...pageInfo, id }) + postFetch(`/api/bs/hrmsalary/otherDeduction/${dataType}List`, { ...pageInfo, ...viewParams, id }) .then(({ status, data }) => { this.setState({ loading: false }); if (status) { @@ -86,6 +86,7 @@ class TaxSetDialog extends Component { render() { const { pageInfo, dataSource, loading, columns, selectedRowKeys, detailSettingsDialog } = this.state; + const { viewParams } = this.props; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -110,21 +111,24 @@ class TaxSetDialog extends Component { }}>
-
- this.setState({ - detailSettingsDialog: { ...detailSettingsDialog, visible: true } - })}/> - { - if (_.isEmpty(selectedRowKeys)) { - message.warning(getLabel(111, "请选择要删除的数据!")); - return; - } - this.handleDelete(selectedRowKeys); - }}/> -
- + this.setState({ + detailSettingsDialog: { ...detailSettingsDialog, visible: true } + })}/> + { + if (_.isEmpty(selectedRowKeys)) { + message.warning(getLabel(111, "请选择要删除的数据!")); + return; + } + this.handleDelete(selectedRowKeys); + }}/> +
+ } + o.dataIndex !== "operate") : columns} + dataSource={dataSource} pagination={pagination} bordered rowSelection={rowSelection} loading={loading} rowKey="id" scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 164 : 600 }}/> this.setState({ diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js index 7a9046ba..fa58142b 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js @@ -169,3 +169,13 @@ export const taxTabConditions = [ title: "" } ]; +// 查看附表对应字段 +export const appendixFields = [ + { dataIndex: "taxFreeIncome", dataType: "freeIncome" }, + { dataIndex: "commercialHealthInsurance", dataType: "healthInsurance" }, + { dataIndex: "taxDeferredEndowmentInsurance", dataType: "endowmentInsurance" }, + { dataIndex: "allowedDonation", dataType: "grantDonation" }, + { dataIndex: "taxDeduction", dataType: "derateDeduction" }, + { dataIndex: "other", dataType: "otherDerateDeduction" }, + { dataIndex: "", dataType: "personalPension" } +]; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js index cfedcd29..692bb99e 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -33,7 +33,9 @@ import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDia import TabEditDialog from "./components/tabEditDialog"; import LeftTab from "./components/leftTab"; import { confirmDialog } from "./confirm"; +import { appendixFields } from "./components/constants"; import "./index.less"; +import TaxSetDialog from "../dataAcquisition/otherDeduct/taxSetDialog"; const { getLabel } = WeaLocaleProvider; @@ -61,7 +63,8 @@ class Index extends Component { }, intelCalcSalaryStatus: false, //智能算薪 总开关是否开启 declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 }, - reportType: "", showLeft: false + reportType: "", showLeft: false, + taxSetDialog: { visible: false, dataType: "", viewParams: {} }//查看附表 }; this.timer = null; this.taxDeclareRef = null; @@ -143,6 +146,15 @@ class Index extends Component { }); } }); + } else if (id === "APPENDIX") { + const { taxAgentId, taxCycle } = this.state.declareInfo; + this.setState({ + taxSetDialog: { + visible: true, viewParams: { employeeId: params.employeeId, taxAgentId, taxCycle: taxCycle + "-01" }, + dataType: _.find(appendixFields, o => o.dataIndex === params.dataIndex).dataType, + label: params.title + } + }); } } }; @@ -151,7 +163,8 @@ class Index extends Component { const i18n = { "总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"), "操作": getLabel(30585, "操作"), "共": getLabel(83698, "共"), - "条": getLabel(18256, "条"), "删除": getLabel(535052, "删除") + "条": getLabel(18256, "条"), "删除": getLabel(535052, "删除"), + "查看附表": getLabel(111, "查看附表") }; const declareStatus = intelCalcSalaryStatus ? declareInfo.declareStatus : ""; const childFrameObj = document.getElementById("atdTable"); @@ -175,7 +188,10 @@ class Index extends Component { if (idx <= 1) { return { ...it, width: 150, fixed: "left", ellipsis: true }; } - return { ...it, width: 150, ellipsis: true }; + return { + ...it, width: 150, ellipsis: true, + isAppendix: _.findIndex(appendixFields, o => o.dataIndex === it.dataIndex) !== -1 + }; }) }, () => { const payload = { @@ -346,7 +362,7 @@ class Index extends Component { render() { const { tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide, - editTabVisible, reportType, showLeft + editTabVisible, reportType, showLeft, taxSetDialog } = this.state; const [__, taxDeclarationId] = selectedKey.split("%%"); let btns = [ @@ -387,7 +403,7 @@ class Index extends Component { onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}, , + onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")} // @@ -453,6 +469,9 @@ class Index extends Component { this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/> + {/*查看附表*/} + this.setState({ taxSetDialog: { ...taxSetDialog, visible: false } })}/>