From aa7ec552943c87ec84cebf8f047afb2cfb3fc593 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 26 Oct 2022 18:40:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/declare/generateModal.js | 4 +++- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 18 ++++++++-------- pc4mobx/hrmSalary/stores/declare.js | 10 +++++---- pc4mobx/hrmSalary/stores/salaryItem.js | 21 +++++++++++-------- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declare/generateModal.js b/pc4mobx/hrmSalary/pages/declare/generateModal.js index 5ae0e1e1..8bc9e95e 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateModal.js +++ b/pc4mobx/hrmSalary/pages/declare/generateModal.js @@ -43,7 +43,8 @@ export default class GenerateModal extends React.Component { render() { const { - taxAgentStore: { taxAgentAdminOption } + taxAgentStore: { taxAgentAdminOption }, + declareStore: { loading } } = this.props; return ( { this.handleGenerate(); }}> diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index e654c674..e7fd1f95 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -350,14 +350,14 @@ class Index extends Component { verticalAlign: "middle" }}/> , - , + // , , @@ -446,7 +446,7 @@ class Index extends Component { placement="bottomRight" content={ this.handleMenuClick(e, record.id)}> 停薪 - 删除待办 + {/*删除待办*/} } title=""> diff --git a/pc4mobx/hrmSalary/stores/declare.js b/pc4mobx/hrmSalary/stores/declare.js index 2a6fd40a..c4e006d8 100644 --- a/pc4mobx/hrmSalary/stores/declare.js +++ b/pc4mobx/hrmSalary/stores/declare.js @@ -92,7 +92,9 @@ export class DeclareStore { @action saveDeclare = (params) => { return new Promise((resolve, reject) => { + this.loading= true; API.saveDeclare(params).then(res => { + this.loading= false; if(res.status) { message.success("生成成功") resolve(); @@ -102,8 +104,8 @@ export class DeclareStore { } }) }) - - } + + } //个税申报表-个税申报表相关信息 @action @@ -139,6 +141,6 @@ export class DeclareStore { } - -} \ No newline at end of file + +} diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js index e1c329d3..96d60416 100644 --- a/pc4mobx/hrmSalary/stores/salaryItem.js +++ b/pc4mobx/hrmSalary/stores/salaryItem.js @@ -79,18 +79,21 @@ export class SalaryItemStore { setDeleteItemVisible = deleteItemVisible => this.deleteItemVisible = deleteItemVisible; @action - setSystemItemVisible = systemItemVisible => this.systemItemVisible = systemItemVisible; + setSystemItemVisible = systemItemVisible => { + this.systemItemVisible = systemItemVisible; + this.sysListTableStore = new TableStore(); + }; // 存储分页以及关键字信息 @action - setPageInfo = (pageInfo) => this.pageInfo = {...this.pageInfo,...pageInfo}; + setPageInfo = (pageInfo) => this.pageInfo = { ...this.pageInfo, ...pageInfo }; // 渲染table数据 @action getTableDatas = (params) => { this.loading = true; - return new Promise((resolve, reject)=>{ - API.getItemList({...params, ...this.pageInfo}).then(action(res => { + return new Promise((resolve, reject) => { + API.getItemList({ ...params, ...this.pageInfo }).then(action(res => { this.loading = false; if (res.status) { // 接口请求成功/失败处理 this.tableDataSource = res.data.list; @@ -101,7 +104,7 @@ export class SalaryItemStore { reject(); } })); - }) + }); }; @action @@ -202,7 +205,7 @@ export class SalaryItemStore { @action deleteItemRequest = (ids) => { - return new Promise((resolve, reject)=>{ + return new Promise((resolve, reject) => { API.deleteItem(ids).then(res => { if (res.status) { this.deleteItemVisible = false; @@ -213,7 +216,7 @@ export class SalaryItemStore { reject(); } }); - }) + }); }; validateForm(params) { @@ -252,7 +255,7 @@ export class SalaryItemStore { //薪资项目-新增薪资项目 @action saveItem = (params, continueFlag) => { - return new Promise((resolve, reject)=>{ + return new Promise((resolve, reject) => { if (!this.validateForm(params)) { return; } @@ -269,7 +272,7 @@ export class SalaryItemStore { reject(); } }); - }) + }); }; // 获取公式变量类型