产品-薪资账套的薪资项目添加翻页的bug以及社保福利台账的线下对比页面的导入下载模板的接口调整
This commit is contained in:
parent
8e36bc89be
commit
0bc5590c04
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import ImportModal from "../../components/importModal";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
|
||||
@inject("calculateStore", "standingBookStore")
|
||||
@observer
|
||||
|
|
@ -35,7 +35,12 @@ export default class CompareDetailImportModal extends React.Component {
|
|||
if (this.props.id) {
|
||||
url = "/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=" + this.props.id;
|
||||
} else {
|
||||
url = `/api/bs/hrmsalary/siaccount/comparisonwelfare/importtemplate/export`;
|
||||
const payload = {
|
||||
billMonth: getQueryString("billMonth"),
|
||||
paymentOrganization: getQueryString("paymentOrganization"),
|
||||
paymentStatus: 0
|
||||
};
|
||||
url = `/api/bs/hrmsalary/siaccount/comparisonwelfare/importtemplate/export?${convertToUrlString(payload)}`;
|
||||
}
|
||||
window.open(url);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
name: "",
|
||||
selectedRowKeys: [],
|
||||
dataSource: [],
|
||||
dataSourceCopy: [],
|
||||
columns: [],
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
|
|
@ -24,7 +25,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visivle && nextProps.visible) {
|
||||
this.setState({ selectedRowKeys: [] }, () => {
|
||||
this.setState({ selectedRowKeys: [], dataSourceCopy: [] }, () => {
|
||||
this.listSalaryItem();
|
||||
});
|
||||
}
|
||||
|
|
@ -32,7 +33,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
|
||||
listSalaryItem = () => {
|
||||
const { itemGroups } = this.props;
|
||||
const { name, pageInfo, loading } = this.state;
|
||||
const { name, pageInfo, loading, dataSourceCopy } = this.state;
|
||||
let excludeIds = [];
|
||||
itemGroups.map(item => {
|
||||
item.items && item.items.map(i => {
|
||||
|
|
@ -50,6 +51,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
if (status) {
|
||||
const { pageNum: current, pageSize, total, columns, list: dataSource } = data;
|
||||
this.setState({
|
||||
dataSourceCopy: [...dataSourceCopy, ...dataSource],
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns
|
||||
|
|
@ -80,11 +82,11 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
};
|
||||
|
||||
handleAdd = () => {
|
||||
const { dataSource, selectedRowKeys } = this.state;
|
||||
const { dataSourceCopy, selectedRowKeys } = this.state;
|
||||
const { onAddSalaryItems, id, onCancel, itemGroups } = this.props;
|
||||
const arrItems = _.find(itemGroups, it => it.uuid === id).items || [];
|
||||
let selectItems = [];
|
||||
dataSource.map((item) => {
|
||||
dataSourceCopy.map((item) => {
|
||||
item = { ...item };
|
||||
selectedRowKeys.map((key, keyIdx) => {
|
||||
if (item.id === key) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue