From f8beaa83bd5438d3a1cced8cda306fb60d89e66f Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Sun, 24 Apr 2022 14:50:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B8=E7=AE=97=E6=93=8D=E4=BD=9C=E5=88=B7?=
=?UTF-8?q?=E6=96=B0=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hrmSalary/pages/calculateDetail/index.js | 6 ++--
.../pages/calculateDetail/salaryDetail.js | 9 +++--
.../socialSecurityBenefits/archives/index.js | 13 ++++++-
.../socialSecurityBenefits/programme/index.js | 7 +++-
pc4mobx/hrmSalary/stores/archives.js | 3 +-
pc4mobx/hrmSalary/stores/calculate.js | 36 +++++++++++--------
pc4mobx/hrmSalary/stores/programme.js | 7 ++--
7 files changed, 55 insertions(+), 26 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
index 4b0fe071..7b02b40a 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
@@ -29,12 +29,14 @@ export default class CalculateDetail extends React.Component {
// 核算点击事件
handleAccount() {
const { calculateStore } = this.props;
- const { acctresultAccounting } = calculateStore;
+ const { acctresultAccounting, acctResultList } = calculateStore;
Modal.confirm({
title: "信息确认",
content: "点击核算,公式项将按照公式逻辑核算,核算结果将覆盖原数据",
onOk: () => {
- acctresultAccounting(this.id)
+ acctresultAccounting(this.id).then(() => {
+ acctResultList(this.id)
+ })
},
onCancel() {}
});
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
index 60172857..5e151f88 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
@@ -1,6 +1,6 @@
import React from 'react'
import { salaryDetailColumns, dataSource } from './columns'
-import { WeaHelpfulTip, WeaSlideModal } from 'ecCom'
+import { WeaHelpfulTip, WeaSlideModal, WeaTable } from 'ecCom'
import { Table } from 'antd'
import WarningModal from './warningModal'
import "./index.less"
@@ -81,7 +81,10 @@ export default class SalaryDetail extends React.Component {
// 侧边栏保存
handleEditSlideSave() {
const {calculateStore } = this.props;
- const { saveAcctResult, acctResultList } = calculateStore;
+ const { saveAcctResult, acctResultList, acctresultDetail } = calculateStore;
+ this.setState({
+ slideVisiable: false
+ })
saveAcctResult(this.recordId).then(() => {
acctResultList(this.id)
})
@@ -111,7 +114,7 @@ export default class SalaryDetail extends React.Component {
{this.setState({visible: true})}}>校验异常:0
{this.setState({visible: false})}}/>
{
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
index c8090414..d501d6ae 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
@@ -79,11 +79,17 @@ export default class Archives extends React.Component {
}
}
+ handlePageChnage(value) {
+ const { archivesStore: {form, getTableDatas}} = this.props;
+ form.updateFields({ current: value })
+ getTableDatas()
+ }
+
render() {
const { archivesStore } = this.props;
const { selectedTab } = this.state;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = archivesStore;
- const { dataSource } = archivesStore
+ const { dataSource, pageInfo } = archivesStore
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
}
@@ -174,6 +180,11 @@ export default class Archives extends React.Component {
columns={this.getColumns()}
dataSource={dataSource}
scroll={{ x: 2300 }}
+ pagination={{
+ onChange: (value) => {this.handlePageChnage(value)},
+ total: pageInfo.total,
+ current: pageInfo.pageNum
+ }}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
index 6b3645ea..d33b8afd 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
@@ -187,7 +187,7 @@ export default class Programme extends React.Component {
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = programmeStore;
const { selectedKey, setSelectedKey, getCustomCategoryList, customTableStore,
customSelectkey, setCustomSelectkey, requestParams, setRequestParams, formCondition,
- setCustomNewVisible, customNewVisible, tableDataSource, tableColumns } = programmeStore;
+ setCustomNewVisible, customNewVisible, tableDataSource, tableColumns, tablePageInfo } = programmeStore;
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
}
@@ -395,6 +395,11 @@ export default class Programme extends React.Component {
// needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
columns={this.getColumns(tableColumns)}
dataSource={tableDataSource}
+ pagination={{
+ onChange: (value) => {this.hangePageChange(value)},
+ total: tablePageInfo.total,
+ current: tablePageInfo.pageNum
+ }}
// onOperatesClick={this.onOperatesClick.bind(this)}
/>
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index e9597043..d4258378 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -30,6 +30,7 @@ export class ArchivesStore {
@observable socialSecurityPaymentForm = {}; // 社保表单
@observable accumulationFundPaymentForm = {}; // 公积金表单
@observable otherPaymentForm = {}; // 其他福利表单
+ @observable pageInfo = {};
// 社保表单
@@ -86,7 +87,7 @@ export class ArchivesStore {
this.dataSource = res.data.datas;
// this.columns = res.data.columns;
this.tableStore.getDatas(res.data.dataKey.datas)
-
+ this.pageInfo = res.data.pageInfo
} else {
message.error(res.msg || '接口调用失败!')
}
diff --git a/pc4mobx/hrmSalary/stores/calculate.js b/pc4mobx/hrmSalary/stores/calculate.js
index a5b5b373..3a559e7f 100644
--- a/pc4mobx/hrmSalary/stores/calculate.js
+++ b/pc4mobx/hrmSalary/stores/calculate.js
@@ -249,13 +249,18 @@ export class calculateStore {
// 核算结果--薪资核算
@action
acctresultAccounting = (salaryAcctRecordId) => {
- API.acctresultAccounting({salaryAcctRecordId}).then(res => {
- if(res.status) {
- message.success("核算成功")
- } else {
- message.error(res.errormsg || "核算失败")
- }
+ return new Promise((resolve, reject) => {
+ API.acctresultAccounting({salaryAcctRecordId}).then(res => {
+ if(res.status) {
+ message.success("核算成功")
+ resolve();
+ } else {
+ message.error(res.errormsg || "核算失败")
+ reject();
+ }
+ })
})
+
}
// 线下比对-列表
@@ -370,15 +375,18 @@ export class calculateStore {
salaryAcctEmpId: recordId,
items
}
- API.saveAcctResult(params).then(res => {
- if(res.status) {
- message.success("保存成功")
- resolve();
- } else {
- message.error(res.errormsg || "保存失败")
- reject();
- }
+ return new Promise((resolve,reject) => {
+ API.saveAcctResult(params).then(res => {
+ if(res.status) {
+ message.success("保存成功")
+ resolve();
+ } else {
+ message.error(res.errormsg || "保存失败")
+ reject();
+ }
+ })
})
+
}
}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js
index a6e48ba9..58db42a5 100644
--- a/pc4mobx/hrmSalary/stores/programme.js
+++ b/pc4mobx/hrmSalary/stores/programme.js
@@ -25,12 +25,13 @@ export class ProgrammeStore {
}
@observable form = new WeaForm();
@observable formCondition = []; // 存储后台得到的form数据
-@observable customNewVisible = false;
+ @observable customNewVisible = false;
@observable customRequest = {}
// 福利方案列表
@observable tableDataSource = [];
@observable tableColumns = [];
+ @observable tablePageInfo = {};
@action
setCustomRequest = customRequest => this.customRequest = customRequest
@@ -96,8 +97,7 @@ export class ProgrammeStore {
// this.tableStore.getDatas(res.data.datas); // table 请求数据
this.tableDataSource = res.data.list ? res.data.list : [];
this.tableColumns = res.data.columns;
- console.log("this.tableColumns", this.tableColumns);
- console.log("this.tableDataSource", this.tableDataSource);
+ this.tablePageInfo = res.data;
} else {
message.error(res.errormsg || '接口调用失败!')
}
@@ -144,7 +144,6 @@ export class ProgrammeStore {
remarks: "",
paymentArea: "1"
}
-
this.requestParams = {...defaultRequest, ...res.data.form.schemeBatch}
}
})