diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 94719f8d..b429cfb7 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -117,6 +117,7 @@ export default class BaseInformForm extends React.Component { { this.state.inited && { if (index === idx) { return { - ...item, + ...item, adjustTo: "", companyTotal: data[0].totalNum, adjustToOptions: categoryType ? _.map(categoryType.split(","), tmpV => { return _.find(item.categoryTypeOptions, tmpJ => tmpJ.key === tmpV); @@ -330,7 +330,7 @@ class AdjustTable extends Component { }; handleClick = (record) => { - const { status, id, paymentOrganization, billMonth } = record; + const { status, id, paymentOrganization, billMonth, employeeId } = record; const { targetOptions } = this.state; if (status) { Modal.confirm({ @@ -338,7 +338,8 @@ class AdjustTable extends Component { content: "确定撤回吗?撤回后该笔调差将失效!", onOk: () => { const payload = { id, paymentOrganization, billMonth }; - compensationBack(payload).then(({ status, data, errormsg }) => { + compensationBack(payload).then(async ({ status, data, errormsg }) => { + const { data: categoryTypeOptions } = await compensationCategoryType({ id: _.find(targetOptions, child => child.employeeId == employeeId).target }); if (status) { message.success(data || "撤回成功"); this.setState({ @@ -347,7 +348,11 @@ class AdjustTable extends Component { return { ...it, status: false, - uuid: new Date().getTime() + idx + uuid: new Date().getTime() + idx, + categoryTypeOptions: _.map(categoryTypeOptions, child => ({ + key: child.id, + showname: child.content + })) }; } return { ...it, uuid: new Date().getTime() + idx };