From a2c6b2145dac5f2229aad43dd66d4749222b8fe3 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 7 Jan 2025 16:12:02 +0800 Subject: [PATCH] =?UTF-8?q?custom-=E9=93=B6=E7=9B=9B=E7=A7=91=E6=8A=80?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=9B=86=E5=9B=A2=E6=9C=89=E9=99=90=E5=85=AC?= =?UTF-8?q?=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/calculateDialog/index.js | 25 +++++++++---------- pc4mobx/hrmSalary/style/index.less | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js index 6f638077..4efb90e9 100644 --- a/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js @@ -57,17 +57,18 @@ class Index extends Component { const { calculateStore: { calculateForm } } = this.props; calculateForm.validateForm().then(f => { if (f.isValid) { - const payload = calculateForm.getFormParams(); + const { salarySobIds, ...payload } = calculateForm.getFormParams(); this.setState({ loading: true }); - saveBasic({ ...payload }).then(({ status, data, errormsg }) => { - this.setState({ loading: false }); - if (status) { - message.success(getLabel(30700, "操作成功")); - this.props.onCancel("refresh", data); - } else { - message.error(errormsg); - } - }).catch(() => this.setState({ loading: false })); + saveBasic({ ...payload, salarySobIds: salarySobIds.split(",") }) + .then(({ status, data, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(30700, "操作成功")); + this.props.onCancel("refresh", data); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: false })); } else { f.showErrors(); } @@ -80,9 +81,7 @@ class Index extends Component { const itemRender = { salarySobIds: (field, textAreaProps, form, formParams) => { return ( v && form.updateFields({ freeAmount: { value: toDecimal_n(v, 2) } })} - />); + form={form} formParams={formParams}/>); } }; return ( diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less index c10d1873..eedbf38d 100644 --- a/pc4mobx/hrmSalary/style/index.less +++ b/pc4mobx/hrmSalary/style/index.less @@ -40,7 +40,7 @@ background: #f6f6f6; .wea-form-item-wrapper { - display: block; + display: block !important; } .wea-form-item .wea-form-item-wrapper .wea-field-readonly {