禅道bug归零
This commit is contained in:
parent
36ca75ed6c
commit
e52c239ad1
|
|
@ -142,13 +142,13 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleViewAttendanceData = ({ id, salaryCycle }) => {
|
||||
handleViewAttendanceData = ({ id, attendCycle }) => {
|
||||
const { attendanceViewPayload } = this.state;
|
||||
this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: true, attendQuoteId: id,
|
||||
salaryYearMonth: salaryCycle
|
||||
salaryYearMonth: attendCycle
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,10 +28,12 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
this.setState({ selectedRowKeys: [], dataSourceCopy: [] }, () => {
|
||||
this.listSalaryItem();
|
||||
});
|
||||
} else {
|
||||
this.setState({ pageInfo: { current: 1, pageSize: 10, total: 0 } });
|
||||
}
|
||||
}
|
||||
|
||||
listSalaryItem = () => {
|
||||
listSalaryItem = (extra = {}) => {
|
||||
const { itemGroups } = this.props;
|
||||
const { name, pageInfo, loading, dataSourceCopy } = this.state;
|
||||
let excludeIds = [];
|
||||
|
|
@ -43,17 +45,19 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
const payload = {
|
||||
excludeIds,
|
||||
name,
|
||||
...pageInfo
|
||||
...pageInfo,
|
||||
...extra
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
listSalaryItem(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { pageNum: current, pageSize, total, columns, list: dataSource } = data;
|
||||
const tmpV = !_.isEmpty(dataSource) ? dataSource : [];
|
||||
this.setState({
|
||||
dataSourceCopy: [...dataSourceCopy, ...dataSource],
|
||||
dataSourceCopy: [...dataSourceCopy, ...tmpV],
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
dataSource: tmpV,
|
||||
columns
|
||||
});
|
||||
}
|
||||
|
|
@ -135,7 +139,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
placeholder="请输入薪资项目名称"
|
||||
value={name}
|
||||
onChange={(name) => this.setState({ name })}
|
||||
onSearch={() => this.listSalaryItem()}
|
||||
onSearch={() => this.listSalaryItem({ current: 1 })}
|
||||
/>
|
||||
</div>
|
||||
<WeaTable
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default class LedgerSalaryItemPreviewModal extends React.Component {
|
|||
_.map(_.filter(itemGroups, it => !_.isEmpty(it.items)), child => {
|
||||
let columnItem = {
|
||||
title: child.name,
|
||||
children: child.items.map(i => {
|
||||
children: _.filter(child.items, t => t.itemHide !== "1").map(i => {
|
||||
return {
|
||||
title: i.name,
|
||||
dataIndex: i.id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue