diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index ec1e3e9a..7ed99031 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -429,6 +429,20 @@ export default class CumDeduct extends React.Component { } }).catch(() => this.setState({ addAllLoading: false })); }; + handleButtonClick = () => { + if (!this.handleChangeDebounce) { + this.handleChangeDebounce = _.debounce(this.handleChange, 500); + } + this.handleChangeDebounce(); + }; + + handleChange = e => { + const url = `${window.location + .origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${this.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All" + ? "" + : this.state.taxAgentId}`; + window.open(url, "_self"); + }; render() { const { @@ -506,14 +520,6 @@ export default class CumDeduct extends React.Component { return
; }; - const handleButtonClick = () => { - const url = `${window.location - .origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${this.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All" - ? "" - : this.state.taxAgentId}`; - window.open(url, "_self"); - }; - const handleMenuClick = () => { if (this.state.selectedKey.length == 0) { message.warning("未选择条目"); @@ -545,7 +551,7 @@ export default class CumDeduct extends React.Component { 导入 , 导出选中 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 8d28d030..aba89c9f 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -382,6 +382,23 @@ export default class CumSituation extends React.Component { }); }; + handleButtonClick = () => { + if (!this.handleChangeDebounce) { + this.handleChangeDebounce = _.debounce(this.handleChange, 500); + } + this.handleChangeDebounce(); + }; + + handleChange = e => { + const taxYearMonth = this.state.monthValue + "-" + this.state.taxYearMonth; + const url = `${window.location + .origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${this + .state.monthValue}&taxYearMonth=${taxYearMonth}&taxAgentId=${this.state.taxAgentId == "All" + ? "" + : this.state.taxAgentId}`; + window.open(url, "_self"); + }; + render() { const { cumSituationStore, taxAgentStore } = this.props; const { slideSelectedKey, addVisible, editId, saveLoading } = this.state; @@ -390,7 +407,6 @@ export default class CumSituation extends React.Component { dataSource, columns, pageObj, - hasRight, form, addForm, condition, @@ -448,16 +464,6 @@ export default class CumSituation extends React.Component { ]; - const handleButtonClick = () => { - const taxYearMonth= this.state.monthValue + "-" + this.state.taxYearMonth - const url = `${window.location - .origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${this - .state.monthValue}&taxYearMonth=${taxYearMonth}&taxAgentId=${this.state.taxAgentId == "All" - ? "" - : this.state.taxAgentId}`; - window.open(url, "_self"); - }; - const handleMenuClick = () => { const { selectedKey } = this.state; if (_.isEmpty(selectedKey)) { @@ -493,7 +499,7 @@ export default class CumSituation extends React.Component { 导入 , 导出选中 @@ -668,7 +674,7 @@ export default class CumSituation extends React.Component { columns={newColumns} dataSource={dataSource} pagination={pagination} - loading={loading} + loading={true} scroll={{ x: 1300 }} /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 1125e914..1f5fab50 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -406,7 +406,22 @@ export default class OtherDeduct extends React.Component { } }).catch(() => this.setState({ lastLoading: false })); }; + handleButtonClick = () => { + if (!this.handleChangeDebounce) { + this.handleChangeDebounce = _.debounce(this.handleChange, 500); + } + this.handleChangeDebounce(); + }; + handleChange = e => { + const { selectedKey } = this.state; + const url = `${window.location + .origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${this + .state.monthValue}&taxAgentId=${this.state.taxAgentId == "All" + ? "" + : this.state.taxAgentId}`; + window.open(url, "_self"); + }; render() { const { otherDeductStore, taxAgentStore } = this.props; @@ -487,18 +502,6 @@ export default class OtherDeduct extends React.Component { ]; - const handleButtonClick = () => { - // const { otherDeductStore: { exportOtherDeductList } } = this.props; - // exportOtherDeductList(); - const { selectedKey } = this.state; - const url = `${window.location - .origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${this - .state.monthValue}&taxAgentId=${this.state.taxAgentId == "All" - ? "" - : this.state.taxAgentId}`; - window.open(url, "_self"); - }; - const handleMenuClick = () => { const { selectedKey } = this.state; if (_.isEmpty(selectedKey)) { @@ -535,7 +538,7 @@ export default class OtherDeduct extends React.Component { 导入 , 导出选中 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index 1b58ad6d..eff9c771 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -336,10 +336,6 @@ class SpecialAddDeduction extends Component { const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=${selectedRowKeys.join(",")}&taxAgentId=${this.inlineForm.getFieldsValue().taxAgentId}`; window.open(url, "_self"); }; - handleExportAllSpecialDetail = () => { - const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export`; - window.open(url, "_self"); - }; handleExportSelectSpecialDetail = () => { const { state: { selectedRowKeys } } = this.specialContentRef; if (selectedRowKeys.length === 0) { @@ -357,7 +353,7 @@ class SpecialAddDeduction extends Component { : this.inlineForm = dom} taxAgentOption={taxAgentAdminOption} - onChange={(taxAgentId)=>this.specialAddDeductionList({taxAgentId})} + onChange={(taxAgentId) => this.specialAddDeductionList({ taxAgentId })} />; }; renderImportormComponent = () => { @@ -385,6 +381,18 @@ class SpecialAddDeduction extends Component { ); }; + handleExportAllSpecialDetail = () => { + if (!this.handleChangeDebounce) { + this.handleChangeDebounce = _.debounce(this.handleChange, 500); + } + this.handleChangeDebounce(); + }; + + handleChange = e => { + const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export`; + window.open(url, "_self"); + }; + render() { const { advanceParams,