feature/2.9.42309.01-薪资核算详情页面列表改造(页面编辑)
This commit is contained in:
parent
8a90d58196
commit
ef16acd638
|
|
@ -1,141 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
|
||||
//薪资核算-薪资核算列表
|
||||
export const getCalcList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/list", "POST", params);
|
||||
};
|
||||
|
||||
|
||||
//薪资核算-删除薪资核算记录
|
||||
export const deleteCalc = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/delete", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-归档薪资核算记录
|
||||
export const fileCalc = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/file", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-薪资核算详情
|
||||
export const getCalcForm = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/getForm", "get", params);
|
||||
};
|
||||
|
||||
//薪资核算-保存薪资核算的基本信息
|
||||
export const saveCalc = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/basic/save", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-获取薪资核算提示信息
|
||||
export const getCalcInfo = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/getSalarySobCycle", "get", params);
|
||||
};
|
||||
|
||||
//薪资核算-薪资核算人员确认列表
|
||||
export const getCalcPersonList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/list", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-薪资核算人员高级搜索
|
||||
export const getCalcPersonSa = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/getSearchCondition", "get", params);
|
||||
};
|
||||
|
||||
//薪资核算-删除薪资核算人员
|
||||
export const deleteCalcPerson = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/delete", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-添加薪资核算人员
|
||||
export const saveCalcPerson = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/save", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-导出人员范围
|
||||
export const exportCalcPerson = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctEmployee/export", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-薪资核算环比上期减少人员列表
|
||||
export const getCalcPersonSubList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/reducedEmployee/list", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-导出环比减少人员
|
||||
export const exportCalcPersonSub = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/reducedEmployee/export", "POST", params);
|
||||
};
|
||||
|
||||
|
||||
//薪资核算-执行薪资核算
|
||||
export const doScCalc = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/accounting", "POST", params);
|
||||
};
|
||||
|
||||
|
||||
//薪资核算-获取薪资核算结果高级搜索
|
||||
export const getScSa = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/getSearchCondition", "get", params);
|
||||
};
|
||||
|
||||
//薪资核算-薪资核算结果列表
|
||||
export const getScList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/list", "post", params);
|
||||
};
|
||||
|
||||
|
||||
//薪资核算-导出薪资核算
|
||||
export const exportSc = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/export", "post", params);
|
||||
};
|
||||
|
||||
//薪资核算-导出线下对比结果
|
||||
export const exportOc = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/comparisonResult/export", "post", params);
|
||||
};
|
||||
|
||||
|
||||
//薪资核算-薪资核算结果详情
|
||||
export const getScDetail = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/detail", "get", params);
|
||||
};
|
||||
|
||||
//薪资核算-薪资核算合并计税详情
|
||||
export const getScMergeTaxDetail = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/getConsolidatedTaxDetail", "get", params);
|
||||
};
|
||||
|
||||
//薪资核算-编辑薪资核算结果
|
||||
export const editScResult = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/save", "post", params);
|
||||
};
|
||||
|
||||
//薪资核算-薪资核算结果校验
|
||||
export const checkScResult = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/acctResult/check", "post", params);
|
||||
};
|
||||
|
||||
|
||||
//薪资核算-获取校验结果(异常)总数
|
||||
export const getScResultExceptionCount = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResult/getCount", "get", params);
|
||||
};
|
||||
|
||||
//薪资核算-校验结果列表
|
||||
export const getCheckResultList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResult/list", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-校验结果明细列表
|
||||
export const getCheckResultDetailList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResultRecord/list", "POST", params);
|
||||
};
|
||||
|
||||
//薪资核算-获取导入组件前置参数
|
||||
export const getImportParams = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryAcct/checkResultRecord/list", "POST", params);
|
||||
};
|
||||
|
||||
// 薪资记录--薪资核算列表
|
||||
export const getSalaryAcctList = params => {
|
||||
return fetch("/api/bs/hrmsalary/salaryacct/list", {
|
||||
|
|
@ -176,6 +40,17 @@ export const reducedemployeeList = params => {
|
|||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 核算人员--薪资核算环比上月增加人员
|
||||
export const addedemployeeList = params => {
|
||||
return fetch("/api/bs/hrmsalary/salaryacct/addedemployee/list", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
// 核算人员--薪资核算人员确认列表
|
||||
export const acctemployeeList = params => {
|
||||
|
|
@ -206,7 +81,6 @@ export const getSalarySobCycle = params => {
|
|||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/getSalarySobCycle", "GET", params);
|
||||
};
|
||||
|
||||
|
||||
// 核算人员--添加薪资核算人员
|
||||
export const saveAcctemployee = params => {
|
||||
return fetch("/api/bs/hrmsalary/salaryacct/acctemployee/save", {
|
||||
|
|
@ -232,7 +106,6 @@ export const exportReducedEmployee = (id) => {
|
|||
}));
|
||||
};
|
||||
|
||||
|
||||
// 核算人员--导出人员范围
|
||||
export const exportAcctEmployee = (id) => {
|
||||
fetch("/api/bs/hrmsalary/salaryacct/acctemployee/export?salaryAcctRecordId=" + id).then(res => res.blob().then(blob => {
|
||||
|
|
@ -374,7 +247,6 @@ export const getImportField = (params) => {
|
|||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/importField", "GET", params);
|
||||
};
|
||||
|
||||
|
||||
// 核算结果-导入模板
|
||||
export const getImportTemplate = (salaryItemIds, salaryAcctRecordId) => {
|
||||
fetch("/api/bs/hrmsalary/salaryacct/acctresult/importtemplate/export?salaryItemIds=" + salaryItemIds + "&salaryAcctRecordId=" + salaryAcctRecordId).then(res => res.blob().then(blob => {
|
||||
|
|
@ -412,7 +284,6 @@ export const importAcctResult = (params) => {
|
|||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
|
||||
// 核算结果-导出全部
|
||||
export const exportAcctResult = (salaryAcctRecordId, ids) => {
|
||||
fetch("/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=" + salaryAcctRecordId + "&ids=" + ids).then(res => res.blob().then(blob => {
|
||||
|
|
@ -509,50 +380,6 @@ export const updateLockStatus = (params) => {
|
|||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 社保福利台账合计接口
|
||||
export const siaccountDetailCommonListSum = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/detail/common/list/sum", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 社保福利台账补缴合计接口
|
||||
export const siaccountDetailSupplementaryListSum = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 社保福利台账退差合计接口
|
||||
export const siaccountDetailRecessionListSum = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 社保福利台账补差合计接口
|
||||
export const siaccountDetailBalanceListSum = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 导入薪资核算添加表头字段缓存
|
||||
export const cacheImportField = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", {
|
||||
|
|
|
|||
|
|
@ -5,16 +5,21 @@
|
|||
* Date: 2023/9/13
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaHelpfulTip, WeaLocaleProvider, WeaTab, WeaTools } from "ecCom";
|
||||
import { WeaButtonIcon, WeaHelpfulTip, WeaLocaleProvider, WeaTab, WeaTable, WeaTools } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button } from "antd";
|
||||
import BaseInfo from "./baseInfo";
|
||||
import { acctemployeeList } from "../../../../../apis/calculate";
|
||||
import { acctemployeeList, addedemployeeList, reducedemployeeList } from "../../../../../apis/calculate";
|
||||
import { personConfirmSearchConditions } from "./condition";
|
||||
import { getSearchs } from "../../../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const api = {
|
||||
range: acctemployeeList,
|
||||
sub: reducedemployeeList,
|
||||
add: addedemployeeList
|
||||
};
|
||||
|
||||
@inject("calculateStore")
|
||||
@observer
|
||||
|
|
@ -25,7 +30,7 @@ class Index extends Component {
|
|||
selectedKey: "range", showSearchAd: false,
|
||||
searchConditions: [], loading: false,
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [], dataSource: [], columns: []
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +65,7 @@ class Index extends Component {
|
|||
}, () => {
|
||||
const { calculateStore: { PCSearchForm } } = this.props;
|
||||
PCSearchForm.initFormFields(this.state.searchConditions);
|
||||
this.acctemployeeList();
|
||||
this.queryPCList();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -86,8 +91,8 @@ class Index extends Component {
|
|||
}
|
||||
return tabBtns;
|
||||
};
|
||||
acctemployeeList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
queryPCList = () => {
|
||||
const { pageInfo, selectedKey } = this.state;
|
||||
const { calculateStore: { PCSearchForm }, routeParams: { salaryAcctRecordId } } = this.props;
|
||||
const { departmentIds, positionIds, statuses, ...extra } = PCSearchForm.getFormParams();
|
||||
const payload = {
|
||||
|
|
@ -96,16 +101,22 @@ class Index extends Component {
|
|||
positionIds: !_.isEmpty(positionIds) ? positionIds.split(",") : [],
|
||||
statuses: !_.isEmpty(statuses) ? statuses.split(",") : []
|
||||
};
|
||||
acctemployeeList(payload).then(({ status, data }) => {
|
||||
api[selectedKey](payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
console.log(data);
|
||||
const { columns, list: dataSource = [], pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
columns, dataSource, pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { calculateStore: { PCSearchForm } } = this.props;
|
||||
const { selectedKey, showSearchAd, searchConditions, pageInfo, loading, selectedRowKeys } = this.state;
|
||||
const {
|
||||
selectedKey, showSearchAd, searchConditions, pageInfo, loading, selectedRowKeys,
|
||||
columns, dataSource
|
||||
} = this.state;
|
||||
const tabDatas = [
|
||||
{
|
||||
title: <React.Fragment>
|
||||
|
|
@ -145,13 +156,14 @@ class Index extends Component {
|
|||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.queryList());
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.queryPCList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.queryList());
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.queryPCList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
columnWidth: 80,
|
||||
selectedRowKeys,
|
||||
onChange: selectedRowKeys => this.setState({ selectedRowKeys })
|
||||
};
|
||||
|
|
@ -160,15 +172,42 @@ class Index extends Component {
|
|||
<BaseInfo {...this.props}/>
|
||||
<WeaTab
|
||||
datas={tabDatas} keyParam="viewcondition" selectedKey={selectedKey}
|
||||
onChange={v => this.setState({ selectedKey: v })} advanceHeight={220}
|
||||
buttons={this.renderTabBtns()} searchType={["base", "advanced"]}
|
||||
onChange={v => this.setState({ selectedKey: v }, () => this.queryPCList())}
|
||||
buttons={this.renderTabBtns()} searchType={["base", "advanced"]} advanceHeight={220}
|
||||
showSearchAd={showSearchAd} setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
|
||||
searchsAd={getSearchs(PCSearchForm, searchConditions, 2, false)}
|
||||
onSearchChange={(v) => PCSearchForm.updateFields({ employeeName: v })}
|
||||
searchsBaseValue={PCSearchForm.getFormParams().employeeName}
|
||||
onSearch={this.acctemployeeList} onAdSearch={this.acctemployeeList}
|
||||
onSearch={this.queryPCList} onAdSearch={this.queryPCList}
|
||||
onAdReset={() => PCSearchForm.resetForm()}
|
||||
/>
|
||||
<WeaTable
|
||||
dataSource={dataSource} loading={loading} rowSelection={rowSelection} pagination={pagination}
|
||||
scroll={{ y: `calc(100vh - 365px)` }}
|
||||
columns={[..._.map(columns, item => {
|
||||
let width = "";
|
||||
const { dataIndex } = item;
|
||||
switch (dataIndex) {
|
||||
case "taxAgentName":
|
||||
case "departmentName":
|
||||
width = "15%";
|
||||
break;
|
||||
default:
|
||||
width = "10%";
|
||||
break;
|
||||
}
|
||||
return { ...item, width };
|
||||
}),
|
||||
{
|
||||
dataIndex: "operate",
|
||||
title: getLabel(30585, "操作"),
|
||||
width: 120,
|
||||
render: (_, record) => (
|
||||
<a href="javascript:void(0);">{getLabel(535052, "删除")}</a>
|
||||
)
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
.wea-tab .wea-tab-right, .wea-input-focus {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.docalc-baseinfo-layout {
|
||||
|
|
|
|||
Loading…
Reference in New Issue