This commit is contained in:
黎永顺 2022-12-12 17:14:14 +08:00
parent 783d1532aa
commit 6a885877e6
4 changed files with 63 additions and 40 deletions

View File

@ -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 <div></div>;
};
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 {
导入
</Button>,
<Dropdown.Button
onClick={handleButtonClick}
onClick={this.handleButtonClick}
overlay={
<Menu onClick={handleMenuClick}>
<Menu.Item key="1">导出选中</Menu.Item>

View File

@ -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 {
</Button>
];
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 {
导入
</Button>,
<Dropdown.Button
onClick={handleButtonClick}
onClick={this.handleButtonClick}
overlay={
<Menu onClick={handleMenuClick}>
<Menu.Item key="1">导出选中</Menu.Item>
@ -668,7 +674,7 @@ export default class CumSituation extends React.Component {
columns={newColumns}
dataSource={dataSource}
pagination={pagination}
loading={loading}
loading={true}
scroll={{ x: 1300 }}
/>
</WeaTop>

View File

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

View File

@ -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 {
: <InlineForm
ref={dom => 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,