This commit is contained in:
黎永顺 2022-12-12 17:26:44 +08:00
parent 6a885877e6
commit 6ca09c7fae
4 changed files with 45 additions and 32 deletions

View File

@ -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 {
</Button>
];
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 [
<Dropdown.Button
onClick={handleExportAllDetailClick}
onClick={this.handleExportAllDetailClick}
overlay={
<Menu onClick={handleExportSelectedDetailClick}>
<Menu.Item key="1">导出选中</Menu.Item>

View File

@ -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 {
</Dropdown.Button>
];
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 [
<Dropdown.Button
onClick={handleExportAllDetailClick}
onClick={this.handleExportAllDetailClick}
overlay={
<Menu onClick={handleExportSelectedDetailClick}>
<Menu.Item key="1">导出选中</Menu.Item>

View File

@ -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 {
</Button>
];
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 [
<Dropdown.Button
onClick={handleExportAllDetailClick}
onClick={this.handleExportAllDetailClick}
overlay={
<Menu onClick={handleExportSelectedDetailClick}>
<Menu.Item key="1">导出选中</Menu.Item>

View File

@ -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) {