parent
8751c14002
commit
f1670a0380
|
|
@ -45,7 +45,7 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSalaryFileList(this.props);
|
||||
this.getSalaryFileList(this.props, true);
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
window.addEventListener("resize", this.handleResize, false);
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ class Index extends Component {
|
|||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getSalaryFileList = (props) => {
|
||||
getSalaryFileList = (props, init = false) => {
|
||||
const { pageInfo } = this.state;
|
||||
const {
|
||||
payrollFilesStore: { salaryFileQueryForm, queryList }, selectedKey, onChangeTopTabCount
|
||||
|
|
@ -166,7 +166,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||
}, () => {
|
||||
onChangeTopTabCount(selectedKey, total);
|
||||
onChangeTopTabCount(selectedKey, total, init);
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
|
|
|
|||
|
|
@ -85,15 +85,21 @@ class SalaryFiles extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
queryInsuranceTabTotal = (active, total) => {
|
||||
API.queryTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
queryInsuranceTabTotal = (active, total, init) => {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
if (init) {
|
||||
API.queryTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, [key]: total }
|
||||
});
|
||||
}
|
||||
};
|
||||
handleReqBtnsCLick = (type, importType) => {
|
||||
const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class Index extends Component {
|
|||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.getWelfareList(this.props);
|
||||
this.getWelfareList(this.props, true);
|
||||
} else if (type === "turn") {
|
||||
const { record: { baseInfo, employeeId, paymentOrganization } = {}, interfaceParams = {} } = params;
|
||||
const { runStatuses, showOperateBtn } = this.props;
|
||||
|
|
@ -154,7 +154,7 @@ class Index extends Component {
|
|||
getPaymentForm = async (props) => {
|
||||
return API.getPaymentForm({ ...props });
|
||||
};
|
||||
getWelfareList = (props) => {
|
||||
getWelfareList = (props, init = false) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;
|
||||
const params = { ...pageInfo, ...welfareForm.getFormParams() };
|
||||
|
|
@ -182,7 +182,7 @@ class Index extends Component {
|
|||
})
|
||||
}, () => {
|
||||
const { pageInfo, selectedRowKeys, columns, dataSource } = this.state;
|
||||
onChangeTopTabCount(runStatuses, total);
|
||||
onChangeTopTabCount(runStatuses, total, init);
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, runStatuses,
|
||||
columns, showOperateBtn
|
||||
|
|
|
|||
|
|
@ -46,15 +46,21 @@ class Index extends Component {
|
|||
this.setState({ showExtEmpsWitch: extEmpsWitch === "1" });
|
||||
}
|
||||
|
||||
queryInsuranceTabTotal = (active, total) => {
|
||||
API.queryInsuranceTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
queryInsuranceTabTotal = (active, total, init) => {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
if (init) {
|
||||
API.queryInsuranceTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, [key]: total }
|
||||
});
|
||||
}
|
||||
};
|
||||
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
|
|
|
|||
Loading…
Reference in New Issue