From 499fe647a2756eada8716bdb3b33e15164cb90ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 6 Dec 2022 15:18:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6-?= =?UTF-8?q?=E8=B0=83=E5=B7=AE=E9=A1=B5=E9=9D=A2=E7=82=B9=E5=87=BB=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=97=B6=E6=A0=A1=E9=AA=8C=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/adjustTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js index a15527d0..76bf1491 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js @@ -353,7 +353,7 @@ class AdjustTable extends Component { const { adjustToOptions, categoryTypeOptions, key, target, ...extraParams } = record; const month = getQueryString("billMonth"); const paymentOrg = getQueryString("paymentOrganization"); - const bool = _.every(Object.keys(record), child => !!record[child]); + const bool = _.every(Object.keys({ ...extraParams, target }), child => !!{ ...extraParams, target }[child]); if (!bool) { Modal.warning({ title: "信息确认", From 2d78222cf5d3ec1a259fe79c1631727b8ed0545e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 6 Dec 2022 15:44:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6-?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=A0=B8=E7=AE=97=E5=90=8E=E8=B0=83=E5=B7=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=9C=80=E8=A6=81=E5=88=B7=E6=96=B0=E6=89=8D?= =?UTF-8?q?=E8=83=BD=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/adjustTable.js | 9 ++++----- .../standingBookDetail/components/adjustmentSlide.js | 7 +------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js index 76bf1491..8f344401 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js @@ -32,12 +32,11 @@ class AdjustTable extends Component { }; } - componentDidMount() { - this.getCompensationList().then(r => { - }); - } - componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible) { + nextProps.visible && this.getCompensationList().then(r => { + }); + } } getCompensationList = async () => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js index a7fdc244..53d961da 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js @@ -28,11 +28,6 @@ class AdjustmentSlide extends Component { this.adjustTableRef = null; } - componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.visible !== this.props.visible) { - } - } - handleSave = () => { let { dataSource, targetOptions } = this.adjustTableRef.state; dataSource = _.filter(dataSource, it => !it.id); @@ -106,7 +101,7 @@ class AdjustmentSlide extends Component { customOperate={this.renderCustomOperate()} /> } - content={ this.adjustTableRef = dom}/>} + content={ this.adjustTableRef = dom} visible={visible}/>} onClose={onCancel} /> ); From e8a8b0a75c50c67eaa7e95553aac77846ef14d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 6 Dec 2022 16:11:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E9=80=80=E5=B7=AE?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/adjustTable.js | 5 +++-- .../standingBookDetail/components/adjustmentSlide.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js index 8f344401..4ef1c14e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js @@ -369,8 +369,9 @@ class AdjustTable extends Component { }; compensationSave([payload]).then(({ status, data, errormsg }) => { if (status) { - const { data: dataMsg } = data; - message.success(dataMsg || "保存成功"); + const { data: dataMsg, errorMessage = [] } = data; + const msg = dataMsg + errorMessage.join(","); + message.success(msg || "保存成功"); this.getCompensationList().then(r => { }); } else { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js index 53d961da..d3bb5e43 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js @@ -64,8 +64,9 @@ class AdjustmentSlide extends Component { compensationSave(payload).then(({ status, data, errormsg }) => { this.setState({ loading: false }); if (status) { - const { data: dataMsg } = data; - message.success(dataMsg || "保存成功"); + const { data: dataMsg, errorMessage = [] } = data; + const msg = dataMsg + errorMessage.join(","); + message.success(msg || "保存成功"); this.adjustTableRef.getCompensationList().then(r => { }); } else {