数据采集模块四个页面的导出全部功能添加参数的筛选功能以及薪资核算页面的带条件导出全部的功能
This commit is contained in:
parent
cbf784a2e9
commit
cefe6ee46d
|
|
@ -4,7 +4,7 @@ import { inject, observer } from "mobx-react";
|
|||
import SalaryDetail from "./salaryDetail";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ export default class CalculateDetail extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
selectedRowKeys: [],
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
salaryAcctRecordId
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -209,7 +209,7 @@ export default class CalculateDetail extends React.Component {
|
|||
);
|
||||
} else if (e.key == "3") {
|
||||
window.open(
|
||||
"/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=" + this.id + "&ids="
|
||||
`/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${this.id}&ids=&${convertToUrlString(this.state.searchItemsValue)}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import ImportFormCom from "./components/importFormCom";
|
|||
import TableRecord from "../components/tableRecord";
|
||||
import { dataCollectCondition, modalColumns } from "./columns";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import Layout from "../layout";
|
||||
import moment from "moment";
|
||||
|
||||
|
|
@ -160,9 +161,10 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { cumDeductStore: { form } } = this.props;
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import { dataCollectCondition, taxOptions } from "./columns";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { situationModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
@inject("taxAgentStore", "cumSituationStore")
|
||||
@observer
|
||||
|
|
@ -277,9 +278,10 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { cumSituationStore: { form } } = this.props;
|
||||
const { declareMonth, taxAgentId, year } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { otherModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
@inject("taxAgentStore", "otherDeductStore")
|
||||
@observer
|
||||
|
|
@ -250,9 +251,10 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { otherDeductStore: { form } } = this.props;
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import { condition } from "./components/condition";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { specialModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
@inject("taxAgentStore", "specialAddStore")
|
||||
@observer
|
||||
|
|
@ -207,9 +208,10 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { specialAddStore: { advanceForm } } = this.props;
|
||||
const { taxAgentId } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}`
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}&${convertToUrlString(advanceForm.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -22,3 +22,18 @@ export const getQueryString = (variable) => {
|
|||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
export const convertToUrlString = (data) => {
|
||||
const _result = [];
|
||||
for (const key in data) {
|
||||
const value = data[key];
|
||||
if (value.constructor === Array) {
|
||||
value.forEach(function (_value) {
|
||||
_result.push(key + "=" + _value);
|
||||
});
|
||||
} else {
|
||||
_result.push(key + "=" + value);
|
||||
}
|
||||
}
|
||||
return _result.join("&");
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue