parent
929a5da68a
commit
06f19c74db
|
|
@ -26,6 +26,7 @@ import CalculateDetail from "./pages/calculateDetail";
|
|||
import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
|
||||
import CompareDetail from "./pages/calculateDetail/compareDetail";
|
||||
import DoCalcDetail from "./pages/calculate/doCalc";
|
||||
import OfflineCompare from "./pages/calculate/calcOc";
|
||||
import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail";
|
||||
import TemplatePreview from "./pages/payroll/templatePreview";
|
||||
import MobilePayroll from "./pages/mobilePayroll";
|
||||
|
|
@ -74,7 +75,8 @@ const DataAcquisition = (props) => props.children;
|
|||
// ledger 薪资账套
|
||||
// calculate 薪资核算
|
||||
// calculateDetail 核算详情
|
||||
// DoCalcDetail 新核算详情页面
|
||||
// DoCalcDetail 核算详情页面-新
|
||||
// OfflineCompare 薪资核算线下对比-新
|
||||
// placeOnFileDetail 核算归档详情
|
||||
// compareDetail 线下线上对比
|
||||
// payroll 工资单发放
|
||||
|
|
@ -133,6 +135,7 @@ const Routes = (
|
|||
<Route key="calculate" path="calculate" component={Calculate}/>
|
||||
<Route key="calculateDetail" path="calculateDetail" component={CalculateDetail}/>
|
||||
<Route key="doCalc" path="calculate/:salaryAcctRecordId" component={DoCalcDetail}/>
|
||||
<Route key="calcOc" path="calcOc/:salaryAcctRecordId" component={OfflineCompare}/>
|
||||
<Route key="placeOnFileDetail" path="placeOnFileDetail" component={PlaceOnFileDetail}/>
|
||||
<Route key="compareDetail" path="compareDetail" component={CompareDetail}/>
|
||||
<Route key="payroll" path="payroll" component={Payroll}/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资核算-线下对比列表
|
||||
* Description:
|
||||
* Date: 2023/9/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { comparisonResultList } from "../../../../apis/calculate";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SalaryCalcOcList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
columns: [], dataSource: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.comparisonResultList(this.props);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (
|
||||
(nextProps.form.onlyDiffEmployee !== this.props.form.onlyDiffEmployee) ||
|
||||
(nextProps.form.onlyDiffSalaryItem !== this.props.form.onlyDiffSalaryItem) ||
|
||||
(nextProps.searchBool !== this.props.searchBool)
|
||||
) {
|
||||
this.comparisonResultList(nextProps);
|
||||
}
|
||||
}
|
||||
|
||||
comparisonResultList = (props) => {
|
||||
const { form, routeParams: { salaryAcctRecordId } } = props;
|
||||
const { pageInfo } = this.state;
|
||||
this.setState({ loading: true });
|
||||
const payload = { ...pageInfo, ...form, salaryAcctRecordId };
|
||||
comparisonResultList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, columns,
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, loading, columns, pageInfo } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.comparisonResultList(this.props));
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.comparisonResultList(this.props));
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaTable
|
||||
rowKey="id" pagination={pagination} loading={loading} dataSource={dataSource}
|
||||
scroll={{ x: 840, y: "calc(100vh - 176px)" }}
|
||||
columns={_.map(columns, (o, i) => {
|
||||
if (i > 1) {
|
||||
return { ...o, width: 180 };
|
||||
}
|
||||
return { ...o, width: 150, fixed: "left" };
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryCalcOcList;
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资核算-线下对比
|
||||
* Description:
|
||||
* Date: 2023/9/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button } from "antd";
|
||||
import { WeaCheckbox, WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import SalaryCalcOcList from "./components/salaryCalcOcList";
|
||||
import Layout from "../doCalc/layout";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
form: {
|
||||
onlyDiffEmployee: true, onlyDiffSalaryItem: true,
|
||||
employeeName: ""
|
||||
}, searchBool: false
|
||||
};
|
||||
}
|
||||
|
||||
handleFiledChange = (key, value) => {
|
||||
const { form } = this.state;
|
||||
this.setState({
|
||||
form: { ...form, [key]: value }
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { form, searchBool } = this.state;
|
||||
return (
|
||||
<Layout {...this.props}>
|
||||
<div className="salary-calc-oc">
|
||||
<div className="compare-header header-border-bottom">
|
||||
<div className="left-search">
|
||||
<WeaCheckbox content={getLabel(543283, "只显示有差异的人员")}
|
||||
value={form["onlyDiffEmployee"] ? "1" : "0"}
|
||||
onChange={v => this.handleFiledChange("onlyDiffEmployee", v === "1")}/>
|
||||
<WeaCheckbox content={getLabel(543284, "只显示有差异的薪资项目")}
|
||||
value={form["onlyDiffSalaryItem"] ? "1" : "0"}
|
||||
onChange={v => this.handleFiledChange("onlyDiffSalaryItem", v === "1")}/>
|
||||
</div>
|
||||
<div className="weapp-salary-btn-flex header">
|
||||
<Button type="primary">{getLabel(32935, "导入")}</Button>
|
||||
<Button type="ghost">{getLabel(17416, "导出")}</Button>
|
||||
<WeaInputSearch placeholder={getLabel(26919, "请输入姓名")} value={form["employeeName"]}
|
||||
onChange={v => this.handleFiledChange("employeeName", v)}
|
||||
onSearch={() => this.setState({ searchBool: !searchBool })}/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="salary-calc-oc-body">
|
||||
<SalaryCalcOcList {...this.props} form={form} searchBool={searchBool}/>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
.salary-calc-oc {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f6f6f6;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.compare-header {
|
||||
padding-left: 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.left-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.weapp-salary-btn-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
cursor: auto;
|
||||
|
||||
& > button {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.wea-input-focus {
|
||||
background: #f6f6f6;
|
||||
margin-top: -4px;
|
||||
|
||||
.ant-input {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 48px;
|
||||
padding: 0 16px;
|
||||
font-size: 12px;
|
||||
color: #111;
|
||||
}
|
||||
}
|
||||
|
||||
.header-border-bottom {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.salary-calc-oc-body {
|
||||
flex: 1;
|
||||
padding: 16px;
|
||||
overflow-y: hidden;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
height: 100%;
|
||||
|
||||
.ant-table-tbody {
|
||||
td {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@ class Index extends Component {
|
|||
});
|
||||
break;
|
||||
case "offlineCompare":
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/compareDetail?id=${salaryAcctRecordId}`, "_blank");
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcOc/${salaryAcctRecordId}`, "_blank");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue