核算操作刷新页面
This commit is contained in:
parent
08ce3de564
commit
f8beaa83bd
|
|
@ -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() {}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
<span className="warningspan" onClick={() => {this.setState({visible: true})}}>校验异常:0</span>
|
||||
</div>
|
||||
<div className="tableWrapper">
|
||||
<Table dataSource={acctResultListDateSource} columns={this.getColumns()} />
|
||||
<WeaTable dataSource={acctResultListDateSource} columns={this.getColumns()} />
|
||||
</div>
|
||||
<WarningModal visible={this.state.visible} onCancel={() => {this.setState({visible: false})}}/>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}}
|
||||
/>
|
||||
|
||||
</WeaTop>
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 || '接口调用失败!')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue