From 6ca09c7fae347d42104d15c7e44e1569a47c6d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 12 Dec 2022 17:26:44 +0800 Subject: [PATCH] 1 --- .../pages/dataAcquisition/cumDeduct/index.js | 22 ++++++++++-------- .../dataAcquisition/cumSituation/index.js | 22 ++++++++++-------- .../dataAcquisition/otherDeduct/index.js | 23 ++++++++++--------- .../specialAddDeduction/index.js | 10 ++++++-- 4 files changed, 45 insertions(+), 32 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 7ed99031..ba28884e 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -443,6 +443,17 @@ export default class CumDeduct extends React.Component { : this.state.taxAgentId}`; window.open(url, "_self"); }; + handleExportAllDetailClick = () => { + if (!this.handleChangeDebounce) { + const { + cumDeductStore: { currentRecord } + } = this.props; + const url = `${window.location + .origin}/api/bs/hrmsalary/addUpDeduction/exportDetail?accumulatedSpecialAdditionalDeductionId=${currentRecord.id}&ids=&taxAgentId=${currentRecord.taxAgentId}`; + window.open(url, "_self"); + } + this.handleChangeDebounce(); + }; render() { const { @@ -588,15 +599,6 @@ export default class CumDeduct extends React.Component { ]; - const handleExportAllDetailClick = () => { - const { - cumDeductStore: { currentRecord } - } = this.props; - const url = `${window.location - .origin}/api/bs/hrmsalary/addUpDeduction/exportDetail?accumulatedSpecialAdditionalDeductionId=${currentRecord.id}&ids=&taxAgentId=${currentRecord.taxAgentId}`; - window.open(url, "_self"); - }; - const handleExportSelectedDetailClick = () => { if (this.state.slideSelectedKey.length === 0) { message.warning("未选择条目"); @@ -613,7 +615,7 @@ export default class CumDeduct extends React.Component { const renderBtns = () => { return [ 导出选中 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index aba89c9f..c9d8b112 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -399,6 +399,18 @@ export default class CumSituation extends React.Component { window.open(url, "_self"); }; + handleExportAllDetailClick = () => { + if (!this.handleChangeDebounce) { + const { + cumSituationStore: { currentRecord } + } = this.props; + const url = `${window.location + .origin}/api/bs/hrmsalary/addUpSituation/exportDetail?accumulatedSituationId=${currentRecord.id}&ids=&taxAgentId=${currentRecord.taxAgentId}`; + window.open(url, "_self"); + } + this.handleChangeDebounce(); + }; + render() { const { cumSituationStore, taxAgentStore } = this.props; const { slideSelectedKey, addVisible, editId, saveLoading } = this.state; @@ -529,14 +541,6 @@ export default class CumSituation extends React.Component { ]; - const handleExportAllDetailClick = () => { - const { - cumSituationStore: { currentRecord } - } = this.props; - const url = `${window.location - .origin}/api/bs/hrmsalary/addUpSituation/exportDetail?accumulatedSituationId=${currentRecord.id}&ids=&taxAgentId=${currentRecord.taxAgentId}`; - window.open(url, "_self"); - }; const handleExportSelectedDetailClick = () => { if (this.state.slideSelectedKey.length === 0) { @@ -554,7 +558,7 @@ export default class CumSituation extends React.Component { const renderBtns = () => { return [ 导出选中 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 1f5fab50..38d2de7d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -422,6 +422,17 @@ export default class OtherDeduct extends React.Component { : this.state.taxAgentId}`; window.open(url, "_self"); }; + handleExportAllDetailClick = () => { + if (!this.handleChangeDebounce) { + const { + otherDeductStore: { currentRecord } + } = this.props; + const url = `${window.location + .origin}/api/bs/hrmsalary/otherDeduction/exportDetail?otherTaxExemptDeductionId=${currentRecord.id}&ids=&taxAgentId=${currentRecord.taxAgentId}`; + window.open(url, "_self"); + } + this.handleChangeDebounce(); + }; render() { const { otherDeductStore, taxAgentStore } = this.props; @@ -575,16 +586,6 @@ export default class OtherDeduct extends React.Component { ]; - - const handleExportAllDetailClick = () => { - const { - otherDeductStore: { currentRecord } - } = this.props; - const url = `${window.location - .origin}/api/bs/hrmsalary/otherDeduction/exportDetail?otherTaxExemptDeductionId=${currentRecord.id}&ids=&taxAgentId=${currentRecord.taxAgentId}`; - window.open(url, "_self"); - }; - const handleExportSelectedDetailClick = () => { if (this.state.slideSelectedKey.length === 0) { message.warning("未选择条目"); @@ -601,7 +602,7 @@ export default class OtherDeduct extends React.Component { const renderBtns = () => { return [ 导出选中 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index eff9c771..dfbb56f9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -324,9 +324,15 @@ class SpecialAddDeduction extends Component { }); }; specialAddDeductionExport = () => { - const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${this.inlineForm.getFieldsValue().taxAgentId}`; - window.open(url, "_self"); + if (!this.handleChangeDebounce) { + this.handleChangeDebounce = _.debounce(() => { + const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${this.inlineForm.getFieldsValue().taxAgentId}`; + window.open(url, "_self"); + }, 500); + } + this.handleChangeDebounce(); }; + specialAddDeductionExportSelect = () => { const { selectedRowKeys } = this.state; if (selectedRowKeys.length === 0) {