核算列表
This commit is contained in:
parent
e37f3acd1b
commit
4310a8c307
|
|
@ -422,4 +422,54 @@ export const comparisonResultList = (params) => {
|
|||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
// 线下对比--结果导入模板
|
||||
export const exportImportTemplate = (salaryAcctRecordId) => {
|
||||
fetch('/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=' + salaryAcctRecordId).then(res => res.blob().then(blob => {
|
||||
var filename=`线下对比导入模板.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}))
|
||||
}
|
||||
|
||||
// 线下对比--导入预览
|
||||
export const previewComparisonResult = (params) => {
|
||||
return fetch('/api/bs/hrmsalary/salaryacct/comparisonresult/preview', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
// 线下对比--导入
|
||||
export const importComparisonExcelAcctResult = (params) => {
|
||||
return fetch('/api/bs/hrmsalary/salaryacct/comparisonresult/importExcelAcctResult', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
// 线下对比-导出
|
||||
export const exportComparisonResult = (salaryAcctRecordId) => {
|
||||
fetch('/api/bs/hrmsalary/salaryacct/comparisonresult/export?salaryAcctRecordId=' + salaryAcctRecordId).then(res => res.blob().then(blob => {
|
||||
var filename=`线下对比结果.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export default class ImportModal extends React.Component {
|
|||
this.props.step == 0 && (<ModalStep1
|
||||
templateLink={this.props.templateLink}
|
||||
headerSetCompoent={this.props.headerSetCompoent}
|
||||
formComponent={this.props.renderFormComponent()}
|
||||
formComponent={this.props.renderFormComponent && this.props.renderFormComponent()}
|
||||
onFileIdChange={(fileId) => {this.setState({fileId})}}
|
||||
onStep1Next={() => {
|
||||
this.handleStep1Next();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import React from 'react'
|
||||
import { Table, Button } from 'antd'
|
||||
import { WeaTable } from "ecCom"
|
||||
|
||||
export default class ModalStep2 extends React.Component {
|
||||
|
||||
|
|
@ -11,7 +12,7 @@ export default class ModalStep2 extends React.Component {
|
|||
return (
|
||||
<div style={{height: "550px", display: "flex", flexFlow: "column"}}>
|
||||
<div style={{flex: "1"}}>
|
||||
<Table dataSource={dataSource} columns={columns}/>
|
||||
<WeaTable dataSource={dataSource} columns={columns} />
|
||||
</div>
|
||||
<div className="footerBtnWrapper" style={{marginTop: "10px", overflow: "hidden", height: "30px"}}>
|
||||
<Button type="primary" style={{float: "right", marginLeft: "10px"}} onClick={this.props.onStep2Next}>下一步</Button>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import { mergeDetailColumns, dataSource } from './columns'
|
|||
import { getQueryString } from '../../util/url'
|
||||
import CustomTab from '../../components/customTab'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import CompareDetailImportModal from './compareDetailImportModal'
|
||||
import CustomTable from '../../components/customTable'
|
||||
|
||||
@inject('calculateStore')
|
||||
@observer
|
||||
|
|
@ -15,6 +17,8 @@ export default class CompareDetail extends React.Component {
|
|||
this.state = {
|
||||
onlyDiffEmployee: true,
|
||||
onlyDiffSalaryItem: true,
|
||||
importModalVisible: false,
|
||||
searchValue: ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -24,16 +28,134 @@ export default class CompareDetail extends React.Component {
|
|||
|
||||
const { calculateStore: {fetchComparisonResultList}} = this.props;
|
||||
const { onlyDiffEmployee, onlyDiffSalaryItem} = this.state;
|
||||
fetchComparisonResultList(onlyDiffEmployee, onlyDiffSalaryItem, this.id)
|
||||
let params = {
|
||||
onlyDiffEmployee,
|
||||
onlyDiffSalaryItem,
|
||||
salaryAcctRecordId: this.id,
|
||||
current: 1
|
||||
}
|
||||
fetchComparisonResultList(params)
|
||||
}
|
||||
|
||||
// 计算差值
|
||||
calculateCompares(systemValue, excelValue) {
|
||||
if(systemValue == null || excelValue == null) {
|
||||
return ""
|
||||
}
|
||||
let systemNum = Number(systemValue)
|
||||
let excelNum = Number(excelValue)
|
||||
if (!isNaN(systemNum) || !isNaN(excelNum)) { // 数字
|
||||
return systemNum - excelNum
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
getColumns(columns) {
|
||||
let newColumns = [...columns]
|
||||
newColumns = newColumns.filter(item => item.hide == "false")
|
||||
newColumns.map(item => {
|
||||
let n = Number(item.dataIndex)
|
||||
if (!isNaN(n)) { // 数字
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<div>
|
||||
<div>系统值:{record[item.dataIndex].acctResultValue}</div>
|
||||
<div>线下值:{record[item.dataIndex].excelResultValue}</div>
|
||||
<div style={{color: 'red'}}>差值:{this.calculateCompares(record[item.dataIndex].acctResultValue, record[item.dataIndex].excelResultValue)}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
return newColumns
|
||||
}
|
||||
|
||||
// 导入
|
||||
handleImportClick() {
|
||||
this.setState({
|
||||
importModalVisible: true
|
||||
})
|
||||
}
|
||||
|
||||
// 分页变化
|
||||
handleDataPageChange(value) {
|
||||
const { calculateStore: {fetchComparisonResultList}} = this.props;
|
||||
const { onlyDiffEmployee, onlyDiffSalaryItem} = this.state;
|
||||
let params = {
|
||||
onlyDiffEmployee,
|
||||
onlyDiffSalaryItem,
|
||||
salaryAcctRecordId: this.id,
|
||||
current: value
|
||||
}
|
||||
fetchComparisonResultList(params)
|
||||
}
|
||||
|
||||
// 只显示有差异的人员 变化
|
||||
onlyDiffEmployeeChange(value) {
|
||||
let onlyDiffEmployee = value == 1 ? true : false
|
||||
this.setState({onlyDiffEmployee})
|
||||
|
||||
const { calculateStore: {fetchComparisonResultList}} = this.props;
|
||||
const { onlyDiffSalaryItem} = this.state;
|
||||
|
||||
let params = {
|
||||
onlyDiffEmployee,
|
||||
onlyDiffSalaryItem,
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.searchValue,
|
||||
current: 1
|
||||
}
|
||||
|
||||
fetchComparisonResultList(params)
|
||||
}
|
||||
|
||||
// 只显示有差异的薪资项目 变化
|
||||
onlyDiffSalaryItemChange(value) {
|
||||
let onlyDiffSalaryItem = value == 1 ? true : false
|
||||
this.setState({onlyDiffSalaryItem})
|
||||
const { calculateStore: {fetchComparisonResultList}} = this.props;
|
||||
const { onlyDiffEmployee} = this.state;
|
||||
let params = {
|
||||
onlyDiffEmployee,
|
||||
onlyDiffSalaryItem,
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.searchValue,
|
||||
current: 1
|
||||
}
|
||||
fetchComparisonResultList(params)
|
||||
}
|
||||
|
||||
// 搜索
|
||||
handleSearch(value) {
|
||||
const { calculateStore: {fetchComparisonResultList}} = this.props;
|
||||
const { onlyDiffEmployee, onlyDiffSalaryItem } = this.state
|
||||
let params = {
|
||||
onlyDiffEmployee,
|
||||
onlyDiffSalaryItem,
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: value,
|
||||
current: 1
|
||||
}
|
||||
fetchComparisonResultList(params)
|
||||
}
|
||||
|
||||
// 导出
|
||||
handleExportClick() {
|
||||
const { calculateStore: {exportComparisonResult}} = this.props;
|
||||
exportComparisonResult(this.id)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { calculateStore: {comparisonResultPageInfo, comparisonResultTableStore, loading}} = this.props;
|
||||
const { importModalVisible, searchValue } = this.state;
|
||||
const renderRightOperation = () => {
|
||||
return (
|
||||
<div style={{display: "inline-block"}}>
|
||||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => this.setState({stepSlideVisible: true})}>导入</Button>
|
||||
<Button type="default" style={{marginRight: "10px"}} onClick={() => this.setState({stepSlideVisible: true})}>导出</Button>
|
||||
<WeaInputSearch />
|
||||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => this.handleImportClick()} >导入</Button>
|
||||
<Button type="default" style={{marginRight: "10px"}} onClick={() => this.handleExportClick()}>导出</Button>
|
||||
<WeaInputSearch value={searchValue} onChange={(value) => {this.setState({
|
||||
searchValue: value
|
||||
})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -43,16 +165,14 @@ export default class CompareDetail extends React.Component {
|
|||
<div>
|
||||
<WeaCheckbox content="只显示有差异的人员" value={this.state.onlyDiffEmployee ? 1 : 0}
|
||||
onChange={(value) => {
|
||||
this.setState({
|
||||
onlyDiffEmployee: value == 1
|
||||
})
|
||||
this.onlyDiffEmployeeChange(value)
|
||||
}}
|
||||
/>
|
||||
<WeaCheckbox content="只显示有差异的薪资项目" value={this.state.onlyDiffSalaryItem ? 1 : 0}
|
||||
onChange={(value) => {
|
||||
this.onlyDiffSalaryItemChange(value)
|
||||
}}
|
||||
/>
|
||||
<WeaCheckbox content="只显示有差异的薪资项目" value={this.state.onlyDiffSalaryItem ? 1 : 0} onChange={(value) => {
|
||||
this.setState({
|
||||
onlyDiffSalaryItem: value == 1
|
||||
})
|
||||
}}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -74,9 +194,31 @@ export default class CompareDetail extends React.Component {
|
|||
</div>
|
||||
|
||||
<div className="tableWrapper">
|
||||
<WeaTable dataSource={dataSource} columns={mergeDetailColumns}/>
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
dataSource={comparisonResultPageInfo.list ? comparisonResultPageInfo.list : []}
|
||||
columns={this.getColumns(comparisonResultTableStore.columns ? comparisonResultTableStore.columns : [])}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: comparisonResultPageInfo.total,
|
||||
current: comparisonResultPageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{
|
||||
importModalVisible && <CompareDetailImportModal
|
||||
visiable={importModalVisible}
|
||||
id={this.id}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
importModalVisible: false
|
||||
})
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
import React from 'react'
|
||||
import ImportModal from '../../components/importModal'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
|
||||
@inject('calculateStore')
|
||||
@observer
|
||||
export default class CompareDetailImportModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
step: 0,
|
||||
modalParam: {
|
||||
salaryAcctRecordId: ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { id } = this.props;
|
||||
let modalParam = { ...this.state.modalParam }
|
||||
modalParam.salaryAcctRecordId = id
|
||||
this.setState({
|
||||
modalParam
|
||||
})
|
||||
}
|
||||
|
||||
// 设置步骤
|
||||
setStep(step) {
|
||||
this.setState({step})
|
||||
}
|
||||
|
||||
handleTemplateLink() {
|
||||
const { calculateStore: { exportImportTemplate }} = this.props;
|
||||
exportImportTemplate(this.props.id)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { visiable } = this.props;
|
||||
const { step, modalParam } = this.state;
|
||||
const { calculateStore } = this.props
|
||||
const { previewComparisonResult, comparisonPreviewColumns, comparisonPreviewDataSource, importComparisonExcelAcctResult, comparisonImportAcctResult } = calculateStore
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
visiable && <ImportModal
|
||||
params={modalParam}
|
||||
columns={comparisonPreviewColumns}
|
||||
step={step}
|
||||
setStep={this.setStep.bind(this)}
|
||||
slideDataSource={comparisonPreviewDataSource}
|
||||
importResult={comparisonImportAcctResult}
|
||||
onFinish={() => {
|
||||
this.handleFinish()
|
||||
}}
|
||||
previewImport={(params) => {previewComparisonResult(params)}}
|
||||
importFile={(params) => {importComparisonExcelAcctResult(params)}}
|
||||
templateLink={ () => { this.handleTemplateLink()}}
|
||||
visiable={visiable}
|
||||
onCancel={() => { this.props.onCancel() }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -68,6 +68,12 @@ export default class CalculateDetail extends React.Component {
|
|||
})
|
||||
}
|
||||
|
||||
// 核算结果搜索
|
||||
handleSearch(value) {
|
||||
const { calculateStore: { acctResultList }} = this.props;
|
||||
acctResultList(this.id, value)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { selectedKey, modalParam, acctResultImportVisiable } = this.state;
|
||||
|
||||
|
|
@ -86,7 +92,11 @@ export default class CalculateDetail extends React.Component {
|
|||
<Button type="primary" style={{marginRight: "10px"}} onClick={() => this.handleAccount()}>核算</Button>
|
||||
{/* <Button type="default" style={{marginRight: "10px"}} onClick={() => this.setState({stepSlideVisible: true})}>校验</Button> */}
|
||||
<Dropdown.Button style={{marginRight: "10px"}} overlay={menu}>更多</Dropdown.Button>
|
||||
<WeaInputSearch />
|
||||
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {
|
||||
this.setState({searchValue: value})
|
||||
}}
|
||||
onSearch={(value) => {this.handleSearch(value)}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -116,7 +126,7 @@ export default class CalculateDetail extends React.Component {
|
|||
selectedKey == 0 && <UserSure />
|
||||
}
|
||||
{
|
||||
selectedKey == 1 && <SalaryDetail />
|
||||
selectedKey == 1 && <SalaryDetail employeeName={this.state.searchValue}/>
|
||||
}
|
||||
{
|
||||
acctResultImportVisiable && <AcctResultImportModal
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import ImportModal from '../../components/importModal'
|
|||
import { columns } from '../salaryItem/columns'
|
||||
import { getQueryString } from '../../util/url'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import CustomTable from '../../components/customTable'
|
||||
|
||||
@inject('calculateStore')
|
||||
@observer
|
||||
|
|
@ -90,10 +91,16 @@ export default class SalaryDetail extends React.Component {
|
|||
})
|
||||
}
|
||||
|
||||
// 分页
|
||||
handleDataPageChange(value) {
|
||||
const { calculateStore: {acctResultList}} = this.props;
|
||||
acctResultList(this.id, this.props.employeeName, value)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { slideVisiable } = this.state;
|
||||
const { calculateStore } = this.props;
|
||||
const { acctResultListDateSource, acctResultListColumns, baseSalarySobCycle } = calculateStore
|
||||
const { acctResultListDateSource, acctResultListColumns, baseSalarySobCycle, acctResultListPageInfo, loading } = calculateStore
|
||||
return (
|
||||
<div className="salaryDetail">
|
||||
<div className="salaryBarWrapper">
|
||||
|
|
@ -114,7 +121,15 @@ export default class SalaryDetail extends React.Component {
|
|||
{/* <span className="warningspan" onClick={() => {this.setState({visible: true})}}>校验异常:0</span> */}
|
||||
</div>
|
||||
<div className="tableWrapper">
|
||||
<WeaTable dataSource={acctResultListDateSource} columns={this.getColumns()} />
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
dataSource={acctResultListDateSource} columns={this.getColumns()}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: acctResultListPageInfo.total,
|
||||
current: acctResultListPageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<WarningModal visible={this.state.visible} onCancel={() => {this.setState({visible: false})}}/>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { inject, observer } from 'mobx-react';
|
|||
import { dataSource , monthOnMonthColumns, userSureColumns} from './columns'
|
||||
import "./index.less"
|
||||
import { getQueryString } from '../../util/url'
|
||||
import CustomTable from '../../components/customTable'
|
||||
|
||||
@inject('calculateStore')
|
||||
@observer
|
||||
|
|
@ -14,6 +15,7 @@ export default class UserSure extends React.Component {
|
|||
this.state = {
|
||||
selectedKey: "0",
|
||||
selectedRowKeys: [], // table 选中项
|
||||
userListSearchValue: '',
|
||||
}
|
||||
this.id = ""
|
||||
}
|
||||
|
|
@ -24,8 +26,8 @@ export default class UserSure extends React.Component {
|
|||
const { calculateStore } = this.props;
|
||||
const { salaryacctGetForm, acctemployeeList, reducedemployeeList, getSalarySobCycle } = calculateStore
|
||||
salaryacctGetForm(id)
|
||||
acctemployeeList(id)
|
||||
reducedemployeeList(id)
|
||||
acctemployeeList({salaryAcctRecordId: id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
reducedemployeeList({salaryAcctRecordId: id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
getSalarySobCycle(id)
|
||||
}
|
||||
|
||||
|
|
@ -35,8 +37,8 @@ export default class UserSure extends React.Component {
|
|||
let idList = ids.split(",");
|
||||
const { calculateStore: { saveAcctemployee, reducedemployeeList, acctemployeeList, checkTaxAgent }} = this.props;
|
||||
saveAcctemployee(this.id, idList).then(() => {
|
||||
reducedemployeeList(this.id)
|
||||
acctemployeeList(this.id)
|
||||
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
checkTaxAgent(this.id)
|
||||
})
|
||||
}
|
||||
|
|
@ -64,8 +66,8 @@ export default class UserSure extends React.Component {
|
|||
content: '确认删除',
|
||||
onOk:() => {
|
||||
deleteAcctemployee(this.id, selectedRowKeys).then(() => {
|
||||
reducedemployeeList(this.id)
|
||||
acctemployeeList(this.id)
|
||||
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
})
|
||||
},
|
||||
onCancel: () => {
|
||||
|
|
@ -105,8 +107,8 @@ export default class UserSure extends React.Component {
|
|||
content: '确认删除',
|
||||
onOk:() => {
|
||||
deleteAcctemployee(this.id, [record.id]).then(() => {
|
||||
reducedemployeeList(this.id)
|
||||
acctemployeeList(this.id)
|
||||
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue,current: 1})
|
||||
})
|
||||
},
|
||||
onCancel: () => {
|
||||
|
|
@ -119,13 +121,35 @@ export default class UserSure extends React.Component {
|
|||
handleRefresh = () => {
|
||||
const { calculateStore: {refreshTaxAgent, reducedemployeeList, acctemployeeList } } = this.props;
|
||||
refreshTaxAgent(this.id).then(() => {
|
||||
reducedemployeeList(this.id)
|
||||
acctemployeeList(this.id)
|
||||
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
|
||||
acctemployeeList({salaryAcctRecordId: this.id , employeeName: this.state.userListSearchValue, current: 1})
|
||||
})
|
||||
}
|
||||
|
||||
onSelectChange = selectedRowKeys => {
|
||||
this.setState({ selectedRowKeys });
|
||||
this.setState({ selectedRowKeys, userListSearchValue: "" });
|
||||
}
|
||||
|
||||
// 核算人员范围分页
|
||||
handleUserListPageChange(value) {
|
||||
const { calculateStore: {acctemployeeList}} = this.props;
|
||||
acctemployeeList({acctemployeeList: this.id, employeeName: this.state.userListSearchValue, current: value})
|
||||
}
|
||||
|
||||
// 环比减少人员分页
|
||||
handleReducedemployeeListPageChange(value) {
|
||||
const { calculateStore: { reducedemployeeList }} = this.props;
|
||||
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: value})
|
||||
}
|
||||
|
||||
// 搜索
|
||||
handleUserListSearch(value) {
|
||||
const { calculateStore: {acctemployeeList, reducedemployeeList}} = this.props;
|
||||
if(this.state.selectedKey == 0) {
|
||||
acctemployeeList({acctemployeeList: this.id, employeeName: value, current: 1})
|
||||
} else {
|
||||
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
@ -136,7 +160,10 @@ export default class UserSure extends React.Component {
|
|||
acctemployeeListColumns,
|
||||
reducedemployeeListDataSource,
|
||||
reducedemployeeListColumns,
|
||||
baseSalarySobCycle
|
||||
baseSalarySobCycle,
|
||||
acctemployeeListPageInfo,
|
||||
loading,
|
||||
reducedemployeeListPageInfo
|
||||
} = calculateStore
|
||||
|
||||
|
||||
|
|
@ -219,7 +246,9 @@ export default class UserSure extends React.Component {
|
|||
<i className="icon-coms-Synchro iconItem" onClick={() => {this.handleRefresh()}}/>
|
||||
</div>
|
||||
}
|
||||
<WeaInputSearch className="searchInput"/>
|
||||
<WeaInputSearch className="searchInput" value={this.state.userListSearchValue} onChange={(value) => {
|
||||
this.setState({userListSearchValue: value})
|
||||
}} onSearch={(value) => {this.handleUserListSearch(value)}}/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -227,10 +256,28 @@ export default class UserSure extends React.Component {
|
|||
</div>
|
||||
<div className="tableWrapper">
|
||||
{
|
||||
this.state.selectedKey == 0 && <WeaTable rowSelection={rowSelection} dataSource={this.getUserListDataSource()} columns={this.getUserListColumns()} />
|
||||
this.state.selectedKey == 0 && <CustomTable
|
||||
loading={loading}
|
||||
rowSelection={rowSelection}
|
||||
dataSource={this.getUserListDataSource()}
|
||||
columns={this.getUserListColumns()}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleUserListPageChange(value)},
|
||||
total: acctemployeeListPageInfo.total,
|
||||
current: acctemployeeListPageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
}
|
||||
{
|
||||
this.state.selectedKey == 1 && <WeaTable dataSource={reducedemployeeListDataSource} columns={reducedemployeeListColumns} />
|
||||
this.state.selectedKey == 1 && <CustomTable
|
||||
dataSource={reducedemployeeListDataSource}
|
||||
columns={reducedemployeeListColumns}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleReducedemployeeListPageChange(value)},
|
||||
total: reducedemployeeListPageInfo.total,
|
||||
current: reducedemployeeListPageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@ export class calculateStore {
|
|||
// 核算人员
|
||||
@observable acctemployeeListDataSource = []; // dataSource
|
||||
@observable acctemployeeListColumns = []; // 列
|
||||
@observable acctemployeeListPageInfo = {}; // 分页信息
|
||||
// 环比上期减少人员
|
||||
@observable reducedemployeeListDataSource = []; // dataSource
|
||||
@observable reducedemployeeListColumns = []; // 列
|
||||
@observable reducedemployeeListPageInfo = {}; // 分页信息
|
||||
// 薪资周期、考勤周期
|
||||
@observable baseSalarySobCycle = {}
|
||||
|
||||
|
|
@ -36,6 +38,7 @@ export class calculateStore {
|
|||
@observable acctResultListColumns = []; // 列
|
||||
@observable acctresultDetailForm = {}; // 编辑薪资表单数据
|
||||
@observable acctResultListTableStore = new TableStore()
|
||||
@observable acctResultListPageInfo = {}; // 分页信息
|
||||
// 导入
|
||||
@observable importFieldData = {}; // 表头选择列表
|
||||
@observable acctResultImportPreview = {}; // 核算结果预览
|
||||
|
|
@ -45,8 +48,11 @@ export class calculateStore {
|
|||
@observable importAcctResult = {}; // 导入结果
|
||||
|
||||
//*** 线下比对 ***
|
||||
@observable comparisonresultListDataSource = [];// dataSource
|
||||
@observable comparisonresultListColumns = [];//列
|
||||
@observable comparisonResultPageInfo = [];// 线下对比列表pageInfo
|
||||
@observable comparisonResultTableStore = new TableStore(); // tableStore
|
||||
@observable comparisonPreviewColumns = []; // 线下对比预览列表
|
||||
@observable comparisonPreviewDataSource = []; // 线下对比列表数据
|
||||
@observable comparisonImportAcctResult = {}; // 导入结果
|
||||
|
||||
|
||||
// 编辑薪资表单数据
|
||||
|
|
@ -148,11 +154,12 @@ export class calculateStore {
|
|||
|
||||
// 核算人员--薪资核算人员确认列表
|
||||
@action
|
||||
acctemployeeList = (id = "") => {
|
||||
API.acctemployeeList({salaryAcctRecordId: id}).then((res) => {
|
||||
acctemployeeList = (params) => {
|
||||
API.acctemployeeList(params).then((res) => {
|
||||
if(res.status) {
|
||||
this.acctemployeeListDataSource = res.data.list ? res.data.list : []
|
||||
this.acctemployeeListColumns = res.data.columns;
|
||||
this.acctemployeeListPageInfo = res.data
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
|
|
@ -173,14 +180,17 @@ export class calculateStore {
|
|||
|
||||
// 核算人员--薪资核算环比上期减少人员列表
|
||||
@action
|
||||
reducedemployeeList = (id = "") => {
|
||||
API.reducedemployeeList({salaryAcctRecordId: id}).then(res => {
|
||||
reducedemployeeList = (params) => {
|
||||
this.loading = true
|
||||
API.reducedemployeeList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.reducedemployeeListDataSource = res.data.list ? res.data.list: [];
|
||||
this.reducedemployeeListColumns = res.data.columns;
|
||||
this.reducedemployeeListPageInfo = res.data
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -243,11 +253,12 @@ export class calculateStore {
|
|||
|
||||
// 核算结果--列表
|
||||
@action
|
||||
acctResultList = (salaryAcctRecordId, employeeName = "") => {
|
||||
API.acctResultList({salaryAcctRecordId, employeeName}).then(res => {
|
||||
acctResultList = (salaryAcctRecordId, employeeName = "", current = 1) => {
|
||||
API.acctResultList({salaryAcctRecordId, employeeName, current}).then(res => {
|
||||
if(res.status) {
|
||||
this.acctResultListTableStore.getDatas(res.data.dataKey.datas)
|
||||
this.acctResultListDateSource = res.data.pageInfo.list ? res.data.pageInfo.list: [];
|
||||
this.acctResultListPageInfo = res.data.pageInfo
|
||||
this.acctResultListColumns = res.data.columns;
|
||||
} else {
|
||||
message.error(res.errormsg || "")
|
||||
|
|
@ -468,18 +479,66 @@ export class calculateStore {
|
|||
|
||||
// 线下对比-列表
|
||||
@action
|
||||
fetchComparisonResultList = (onlyDiffEmployee, onlyDiffSalaryItem, salaryAcctRecordId) => {
|
||||
let params = {
|
||||
onlyDiffEmployee,
|
||||
onlyDiffSalaryItem,
|
||||
salaryAcctRecordId
|
||||
}
|
||||
fetchComparisonResultList = (params) => {
|
||||
this.loading = true
|
||||
API.comparisonResultList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.comparisonResultList = res.data
|
||||
this.comparisonResultPageInfo = res.data.pageInfo
|
||||
this.comparisonResultTableStore.getDatas(res.data.dataKey.datas)
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
// 线下对比-导入模板
|
||||
@action
|
||||
exportImportTemplate = (salaryAcctRecordId) => {
|
||||
API.exportImportTemplate(salaryAcctRecordId)
|
||||
}
|
||||
|
||||
// 线下对比--导入预览
|
||||
@action
|
||||
previewComparisonResult = (params) => {
|
||||
API.previewComparisonResult(params).then(res => {
|
||||
if(res.status) {
|
||||
this.comparisonPreviewColumns = res.data.headers.map((item, index) => {
|
||||
let column = {}
|
||||
column.title = item;
|
||||
column.dataIndex = "" + index;
|
||||
column.key = index + ""
|
||||
return column
|
||||
})
|
||||
|
||||
this.comparisonPreviewDataSource = res.data.list.map((item) => {
|
||||
let data = {}
|
||||
item.map((i, index) => {
|
||||
data[index + ''] = i
|
||||
})
|
||||
return data
|
||||
})
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 线下对比-导入
|
||||
@action
|
||||
importComparisonExcelAcctResult = (params) => {
|
||||
API.importComparisonExcelAcctResult(params).then(res => {
|
||||
if(res.status) {
|
||||
this.comparisonImportAcctResult = res.data
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 线下对比-导出
|
||||
@action
|
||||
exportComparisonResult = (salaryAcctRecordId) => {
|
||||
API.exportComparisonResult(salaryAcctRecordId)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue