From ab263e01ed12c1972e02fbfef43430b042923df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 2 Jun 2023 15:18:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84=E6=A0=B8?= =?UTF-8?q?=E7=AE=97=E8=AF=A6=E6=83=85=E7=BC=96=E8=BE=91=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/calculateDetail/salaryDetail.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index 6c018985..0ff9d20c 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -16,6 +16,7 @@ export default class SalaryDetail extends React.Component { constructor(props) { super(props); this.state = { + loading: false, progressVisible: false, progress: 0, columnIndex: "", @@ -177,13 +178,12 @@ export default class SalaryDetail extends React.Component { } // 侧边栏保存 - handleEditSlideSave() { + handleEditSlideSave = () => { const { calculateStore } = this.props; const { saveAcctResult } = calculateStore; - this.setState({ - slideVisiable: false - }); + this.setState({ loading: true }); saveAcctResult(this.recordId).then(() => { + this.setState({ loading: false }); const childFrameObj = document.getElementById("atdTable"); const salaryAcctRecordId = getQueryString("id"); const payload = { @@ -198,11 +198,11 @@ export default class SalaryDetail extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); // acctResultList({ salaryAcctRecordId: this.id }); }); - } + }; render() { - const { slideVisiable, columnIndex } = this.state; + const { slideVisiable, columnIndex, loading } = this.state; const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props; const { baseSalarySobCycle, columnDescList } = calculateStore; @@ -271,7 +271,8 @@ export default class SalaryDetail extends React.Component { subtitle="编辑薪资" editable={true} showOperateBtn={showOperateBtn} - onSave={() => this.handleEditSlideSave()} + onSave={this.handleEditSlideSave} + loading={loading} /> } content={}