From 9030e2244997e4c426783b01ea80f60d5aff5763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 21 Sep 2023 12:04:55 +0800 Subject: [PATCH] hotfix/2.9.42309.01 --- .../pages/payroll/stepForm/baseInformForm.js | 1 + .../standingBookDetail/components/adjustTable.js | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) 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 };