diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js index fab22731..ceafe065 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js @@ -276,7 +276,14 @@ class AdjustTable extends Component { ); }; handleChangeCom = (dataSource) => { - this.setState({ dataSource }); + this.setState({ + dataSource: _.map(dataSource, (item, index) => { + return { + ...item, + uuid: new Date().getTime() + index + }; + }) + }); }; handleChangeTableItem = (filedItemkey, value, index) => { const { dataSource, targetOptions } = this.state; @@ -335,11 +342,15 @@ class AdjustTable extends Component { if (status) { message.success(data || "撤回成功"); this.setState({ - dataSource: _.map(this.state.dataSource, it => { + dataSource: _.map(this.state.dataSource, (it, idx) => { if (id === it.id) { - return { ...it, status: false }; + return { + ...it, + status: false, + uuid: new Date().getTime() + idx + }; } - return { ...it }; + return { ...it, uuid: new Date().getTime() + idx }; }) }); } else { @@ -393,7 +404,7 @@ class AdjustTable extends Component { if (_.isEmpty(errorMessage)) { this.setState({ dataSource: _.map(this.state.dataSource, it => { - if (record.target === it.target) { + if (record.target === it.target && record.uuid === it.uuid) { return { ...it, status: true, id: successIds[0] }; } return { ...it };