custom/万德隆

This commit is contained in:
lys 2025-07-01 10:55:10 +08:00
parent 693c436d4a
commit d5fdab4699
6 changed files with 182 additions and 0 deletions

View File

@ -56,6 +56,8 @@ import SupplementaryCalc from "./pages/supplementaryCalc";
import VariableSalary from "./pages/variableSalary";
import Datapush from "./pages/datapush";
import Layout from "./layout";
import CustomRoutes from "./pages/custom-pages";
import stores from "./stores";
import "./style/index";
// 读取系统多语言配置
@ -123,6 +125,7 @@ const Routes = (
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
<Route key="variableSalary" path="variableSalary" component={VariableSalary}/>
{CustomRoutes}
</Route>
);

View File

@ -0,0 +1,10 @@
import React from "react";
import Route from "react-router/lib/Route";
import SalaryDynamicTable from "./wandelong/salaryDynamicTable";
const CustomRoutes = [
<Route key="customPage_salaryDynamicTable_wandelong" path="customPage_salaryDynamicTable_wandelong"
component={SalaryDynamicTable}/>
];
export default CustomRoutes;

View File

@ -0,0 +1,10 @@
import { postFetch } from "../../../../util/request";
// 万德隆薪资动态表
export const getDynamicSalaryReport = params => {
return postFetch("/api/bs/hrmsalary/salaryacct/wdl/dynamicSalaryReport", params);
};
// 万德隆薪资动态表-导入
export const importWdlDynamicSalaryReport = params => {
return postFetch("/api/bs/hrmsalary/salaryacct/wdl/importWdlDynamicSalaryReport", params);
};

View File

@ -0,0 +1,60 @@
/*
* 万德隆薪酬二开
* 导入
* @Author: 黎永顺
* @Date: 2025/6/30
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import ImportDialog from "../../../../../components/importDialog";
import * as API from "../../api";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
nextloading: false, importResult: {}, imageId: "",
previewUrl: "/api/bs/hrmsalary/salaryacct/wdl/previewWdlDynamicSalaryReport",
link: "/api/bs/hrmsalary/salaryacct/wdl/exportDynamicSalaryReport"
}
};
}
handleImport = (payload) => {
const { importDialog } = this.state;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.importWdlDynamicSalaryReport({ ...payload }).then(({ data, status }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
}, ()=> this.props.onSuccess());
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...this.props} {...importDialog}
onResetImportResult={() => this.setState({
importDialog: {
...importDialog, importResult: {}, imageId: "", link: ""
}
})}
exportDataDom={null}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default Index;

View File

@ -0,0 +1,83 @@
/*
* 万德隆薪酬二开
* 薪资动态表
* @Author: 黎永顺
* @Date: 2025/6/30
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import WdlImportDialog from "../components/wdlImportDialog";
import { Button } from "antd";
import * as API from "../api";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
columns: [], dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, visible: false
};
}
componentDidMount() {
this.getDynamicSalaryReport();
}
getDynamicSalaryReport = () => {
const { pageInfo } = this.state;
this.setState({ loading: true });
API.getDynamicSalaryReport({ ...pageInfo }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, pageInfo: result } = data, { pageNum: current, pageSize, total, list: dataSource } = result;
this.setState({
pageInfo: { current, pageSize, total }, dataSource, columns: _.map(columns, o => ({
dataIndex: o.column, title: o.text, width: o.width
}))
});
}
}).catch(() => this.setState({ loading: false }));
};
render() {
const { loading, columns, dataSource, pageInfo, visible } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
this.setState({
pageInfo: { ...pageInfo, current, pageSize }
}, () => this.getDynamicSalaryReport());
},
onChange: current => {
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getDynamicSalaryReport());
}
};
return (<WeaTop
title={getLabel(111, "薪资动态表")} buttonSpace={10} className="wdl-salary-dynamic-table"
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D" showDropIcon
buttons={[<Button type="primary"
onClick={() => this.setState({ visible: true })}>{getLabel(111, "导入")}</Button>,
<Button type="ghost"
onClick={() => window.open("/api/bs/hrmsalary/salaryacct/wdl/exportDynamicSalaryReport", "_blank")}>{getLabel(17416, "导出")}</Button>]}
>
<div className="wdl-salary-dynamic-table-container">
<WeaTable loading={loading} columns={columns} dataSource={dataSource} pagination={pagination}
scroll={{ x: 1200, y: `calc(100vh - 170px)` }}/>
<WdlImportDialog title={getLabel(111, "数据导入")} visible={visible}
onCancel={() => this.setState({ visible: false })}
onSuccess={this.getDynamicSalaryReport}/>
</div>
</WeaTop>);
}
}
export default Index;

View File

@ -0,0 +1,16 @@
.wdl-salary-dynamic-table {
.wea-new-top-content {
overflow-y: hidden;
.wdl-salary-dynamic-table-container {
height: 100%;
width: 100%;
padding: 8px 16px 0 16px;
background: #F6F6F6;
.wea-new-table {
background: #fff;
}
}
}
}