custom/常州光阳摩托车有限公司-聚才林
This commit is contained in:
parent
f9e9763854
commit
90e84a7375
|
|
@ -54,6 +54,8 @@ import TopologyMap from "./pages/topologyMap";
|
|||
import SupplementaryCalc from "./pages/supplementaryCalc";
|
||||
import VariableSalary from "./pages/variableSalary";
|
||||
import Layout from "./layout";
|
||||
|
||||
import CustomRoutes from "./pages/custom-pages";
|
||||
import stores from "./stores";
|
||||
import "./style/index";
|
||||
// 读取系统多语言配置
|
||||
|
|
@ -118,6 +120,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>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* 光阳摩托薪酬二开
|
||||
* 实发工资报表
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/7/23
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDatePicker, WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaTable, WeaTools, WeaTop } from "ecCom";
|
||||
import FormInfo from "../../../../components/FormInfo";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
import { conditions } from "../conditions";
|
||||
import moment from "moment";
|
||||
import * as API from "../api";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import cs from "classnames";
|
||||
import { Button } from "antd";
|
||||
import "../index.less";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showAdvance: false, conditions: [], payload: {}, loading: false, dataSource: [], columns: []
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data } = await API.getLedgerList();
|
||||
this.setState({
|
||||
conditions: _.map(conditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "salarySobIds") {
|
||||
return { ...o, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
|
||||
} else if (getKey(o) === "salaryMonth") {
|
||||
return { ...o, value: moment(new Date()).format("YYYY-MM") };
|
||||
}
|
||||
return o;
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
form.initFormFields(this.state.conditions);
|
||||
this.getQysfgzReportList();
|
||||
});
|
||||
}
|
||||
|
||||
getQysfgzReportList = () => {
|
||||
const { employeeName, salaryMonth, salarySobIds, ygxzs, kbIds } = form.getFormParams();
|
||||
const payload = {
|
||||
employeeName,
|
||||
salaryMonth: moment(salaryMonth).startOf("month").format("YYYY-MM-DD"),
|
||||
salarySobIds: salarySobIds ? salarySobIds.split(",") : [],
|
||||
ygxzs: ygxzs ? ygxzs.split(",") : [],
|
||||
kbIds: kbIds ? kbIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getQysfgzReportList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { column, data: dataSource } = data;
|
||||
this.setState({
|
||||
payload, dataSource,
|
||||
columns: _.map(column, item => ({ title: item.text, dataIndex: item.column, width: item.width }))
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleExport = () => {
|
||||
const { payload } = this.state;
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportQysfgzReport(payload);
|
||||
};
|
||||
handlePrint = () => {
|
||||
const { employeeName, salaryMonth } = form.getFormParams();
|
||||
const payload = {
|
||||
...form.getFormParams(), employeeName, type: "actual",
|
||||
salaryMonth: moment(salaryMonth).startOf("month").format("YYYY-MM-DD")
|
||||
};
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/printReport_guangyang?${convertToUrlString(payload)}`);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showAdvance, conditions, columns, loading, dataSource } = this.state;
|
||||
const buttons = [<Button type="primary" onClick={this.handleExport}>{getLabel(111, "导出")}</Button>,
|
||||
<Button type="primary" onClick={this.handlePrint}>{getLabel(111, "打印")}</Button>,
|
||||
<div className="advance-custom">
|
||||
<WeaDatePicker value={form.getFormParams().salaryMonth} format="YYYY-MM"
|
||||
onChange={v => {
|
||||
form.updateFields({ salaryMonth: v });
|
||||
this.getQysfgzReportList();
|
||||
}}
|
||||
style={{ width: 200, marginRight: 10 }}/>
|
||||
<WeaInputSearch placeholder={getLabel(111, "请输入姓名")} value={form.getFormParams().employeeName}
|
||||
onChange={v => form.updateFields({ employeeName: v })}
|
||||
onSearch={this.getQysfgzReportList}/>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "高级搜索")}</a>
|
||||
</div>];
|
||||
return (<WeaTop title={getLabel(111, "实发工资报表")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={buttons} className="actualSalaryReport">
|
||||
<div className="report-body">
|
||||
<div className={cs("advance-report", { "show-advance-report": showAdvance })}>
|
||||
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
|
||||
<div className="advance-report-btns">
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance }, () => this.getQysfgzReportList())}>{getLabel(111, "搜索")}</Button>
|
||||
<Button type="ghost" onClick={() => {
|
||||
form.resetForm();
|
||||
form.updateFields({ salaryMonth: moment(new Date()).format("YYYY-MM") });
|
||||
}}>{getLabel(111, "重置")}</Button>
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<WeaTable rowKey="id" scroll={{ x: 1200, y: "calc(100vh - 120px)" }} dataSource={dataSource} loading={loading}
|
||||
pagination={false} columns={columns}/>
|
||||
</div>
|
||||
</WeaTop>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postExportFetch, postFetch } from "../../../util/request";
|
||||
|
||||
export const getAccountList = (params) => {
|
||||
return WeaTools.callApi("/api/hrm/login/getAccountList", "GET", params);
|
||||
};
|
||||
export const getLedgerList = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/attendQuote/allSalarySobList", "GET", params);
|
||||
};
|
||||
export const getQysfgzReportList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/gysfgzReport/list", params);
|
||||
};
|
||||
export const getGyDepartmentSalaryReport = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/gyDepartmentSalaryReport/list", params);
|
||||
};
|
||||
export const exportQysfgzReport = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/salaryacct/acctresult/gysfgzReport/export", params);
|
||||
};
|
||||
export const exportGyDepartmentSalaryReport = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/salaryacct/acctresult/gyDepartmentSalaryReport/export", params);
|
||||
};
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
export const conditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["employeeName"],
|
||||
fieldcol: 18,
|
||||
label: "姓名",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["salaryMonth"],
|
||||
fieldcol: 18,
|
||||
label: "薪资所属月",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["salarySobIds"],
|
||||
fieldcol: 18,
|
||||
label: "薪资账套",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
multiple: true,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "用工性质",
|
||||
type: "31",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["ygxzs"],
|
||||
fieldcol: 18,
|
||||
isQuickSearch: false,
|
||||
label: "用工性质",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "部门",
|
||||
type: "57",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["kbIds"],
|
||||
fieldcol: 18,
|
||||
isQuickSearch: false,
|
||||
label: "部门",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
.actualSalaryReport {
|
||||
.report-body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 8px 16px 0;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-new-table {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.advance-custom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > a {
|
||||
border-radius: 0;
|
||||
height: 28px;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-left: none
|
||||
}
|
||||
}
|
||||
|
||||
.advance-report {
|
||||
display: none;
|
||||
background: #FFF;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.advance-report-btns {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 15px 0;
|
||||
border-top: 1px solid #dadada;
|
||||
|
||||
button {
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.show-advance-report {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wea-input-focus {
|
||||
margin-top: -4px;
|
||||
}
|
||||
}
|
||||
|
||||
.print-salary-detail-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 8px 16px;
|
||||
page-break-after: avoid; //避免在元素后插入分页符。
|
||||
table {
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-collapse: collapse;
|
||||
overflow: hidden;
|
||||
page-break-inside: avoid;
|
||||
page-break-after: avoid;
|
||||
page-break-before: avoid;
|
||||
|
||||
thead {
|
||||
tr {
|
||||
th {
|
||||
height: 35px;
|
||||
border: 1px solid #d9d9d9;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 9pt;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
min-width: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
tr {
|
||||
td:first-child {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
td {
|
||||
height: 35px;
|
||||
border: 1px solid #d9d9d9;
|
||||
text-align: left;
|
||||
font-size: 9pt;
|
||||
width: 100px;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
padding-left: 5px;
|
||||
min-width: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.print-table-bottom-info {
|
||||
padding: 10px 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
|
||||
span {
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
table {
|
||||
page-break-inside: auto;
|
||||
}
|
||||
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
display: table-footer-group;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* 光阳摩托薪酬二开
|
||||
* 报表打印
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/7/23
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import moment from "moment";
|
||||
import * as API from "../api";
|
||||
import "../index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getList = {
|
||||
"actual": API.getQysfgzReportList, "summary": API.getGyDepartmentSalaryReport
|
||||
};
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
columns: [], dataSource: [], userInfo: {}
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data: userInfo } = await API.getAccountList();
|
||||
const { employeeName, kbIds, salaryMonth, salarySobIds, type, ygxzs } = WeaTools.getUrlParams();
|
||||
let payload = {};
|
||||
if (type === "actual") {
|
||||
payload = {
|
||||
employeeName,
|
||||
salaryMonth: moment(salaryMonth).startOf("month").format("YYYY-MM-DD"),
|
||||
salarySobIds: salarySobIds ? salarySobIds.split(",") : [],
|
||||
ygxzs: ygxzs ? ygxzs.split(",") : [],
|
||||
kbIds: kbIds ? kbIds.split(",") : []
|
||||
};
|
||||
} else {
|
||||
payload = {
|
||||
salaryMonth: moment(salaryMonth).startOf("month").format("YYYY-MM-DD"),
|
||||
salarySobIds: salarySobIds ? salarySobIds.split(",") : [],
|
||||
ygxzs: ygxzs ? ygxzs.split(",") : [],
|
||||
kbIds: kbIds ? kbIds.split(",") : []
|
||||
};
|
||||
}
|
||||
getList[type](payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { column: columns, data: dataSource } = data;
|
||||
this.setState({ columns, dataSource, userInfo });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
const { columns, dataSource } = this.state;
|
||||
if (!_.isEmpty(columns) && !_.isEmpty(dataSource)) {
|
||||
setTimeout("window.print()", 500);
|
||||
//window.print()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { columns, dataSource, userInfo } = this.state;
|
||||
return (<div className="print-salary-detail-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width={30}><span>{getLabel(111, "序号")}</span></th>
|
||||
{_.map(columns, col => (<th key={col.column}><span>{col.text}</span></th>))}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{_.map(dataSource, (item, index) => (<tr>
|
||||
<td width={30}><span>{index + 1}</span></td>
|
||||
{_.map(columns, col => (<td key={col.column}><span>{item[col.column]}</span></td>))}
|
||||
</tr>))}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colSpan={columns.length + 1}>
|
||||
<div className="print-table-bottom-info">
|
||||
<p>{getLabel(111, "总经理:")}<span></span></p>
|
||||
<p>{getLabel(111, "副总经理:")}<span></span></p>
|
||||
<p>{getLabel(111, "管理中心:")}<span></span></p>
|
||||
<p>{getLabel(111, "制表人:")}<span>{userInfo.username}</span></p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 光阳摩托薪酬二开
|
||||
* 工资汇总报表列表
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/7/23
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDatePicker, WeaLoadingGlobal, WeaLocaleProvider, WeaTable, WeaTools, WeaTop } from "ecCom";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
import FormInfo from "../../../../components/FormInfo";
|
||||
import { conditions } from "../conditions";
|
||||
import moment from "moment";
|
||||
import * as API from "../api";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import cs from "classnames";
|
||||
import { Button } from "antd";
|
||||
import "../index.less";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showAdvance: false, conditions: [], payload: {}, loading: false, dataSource: [], columns: []
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data } = await API.getLedgerList();
|
||||
this.setState({
|
||||
conditions: _.map(conditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "salarySobIds") {
|
||||
return { ...o, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
|
||||
} else if (getKey(o) === "salaryMonth") {
|
||||
return { ...o, value: moment(new Date()).format("YYYY-MM") };
|
||||
} else if (getKey(o) === "employeeName") {
|
||||
return { ...o, hide: true };
|
||||
}
|
||||
return o;
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
form.initFormFields(this.state.conditions);
|
||||
this.getQysfgzReportList();
|
||||
});
|
||||
}
|
||||
|
||||
getQysfgzReportList = () => {
|
||||
const { salaryMonth, salarySobIds, ygxzs, kbIds } = form.getFormParams();
|
||||
const payload = {
|
||||
salaryMonth: moment(salaryMonth).startOf("month").format("YYYY-MM-DD"),
|
||||
salarySobIds: salarySobIds ? salarySobIds.split(",") : [],
|
||||
ygxzs: ygxzs ? ygxzs.split(",") : [],
|
||||
kbIds: kbIds ? kbIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getGyDepartmentSalaryReport(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { column, data: dataSource } = data;
|
||||
this.setState({
|
||||
payload, dataSource,
|
||||
columns: _.map(column, item => ({ title: item.text, dataIndex: item.column, width: item.width }))
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleExport = () => {
|
||||
const { payload } = this.state;
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportGyDepartmentSalaryReport(payload);
|
||||
};
|
||||
handlePrint = () => {
|
||||
const { employeeName, salaryMonth, ...extra } = form.getFormParams();
|
||||
const payload = {
|
||||
...extra, type: "summary",
|
||||
salaryMonth: moment(salaryMonth).startOf("month").format("YYYY-MM-DD")
|
||||
};
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/printReport_guangyang?${convertToUrlString(payload)}`);
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { showAdvance, conditions, columns, loading, dataSource } = this.state;
|
||||
const buttons = [<Button type="primary" onClick={this.handleExport}>{getLabel(111, "导出")}</Button>,
|
||||
<Button type="primary" onClick={this.handlePrint}>{getLabel(111, "打印")}</Button>,
|
||||
<div className="advance-custom">
|
||||
<WeaDatePicker value={form.getFormParams().salaryMonth} format="YYYY-MM"
|
||||
onChange={v => {
|
||||
form.updateFields({ salaryMonth: v });
|
||||
this.getQysfgzReportList();
|
||||
}}
|
||||
style={{ width: 200, marginRight: 10 }}/>
|
||||
<a href="javascript:void(0);" style={{ borderLeft: "1px solid #d9d9d9" }}
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "高级搜索")}</a>
|
||||
</div>];
|
||||
return (<WeaTop title={getLabel(111, "导出工资汇总报表")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={buttons} className="actualSalaryReport">
|
||||
<div className="report-body">
|
||||
<div className={cs("advance-report", { "show-advance-report": showAdvance })}>
|
||||
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
|
||||
<div className="advance-report-btns">
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance }, () => this.getQysfgzReportList())}>{getLabel(111, "搜索")}</Button>
|
||||
<Button type="ghost" onClick={() => {
|
||||
form.resetForm();
|
||||
form.updateFields({ salaryMonth: moment(new Date()).format("YYYY-MM") });
|
||||
}}>{getLabel(111, "重置")}</Button>
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<WeaTable rowKey="id" scroll={{ x: 1200, y: "calc(100vh - 120px)" }} dataSource={dataSource} loading={loading}
|
||||
pagination={false} columns={columns}/>
|
||||
</div>
|
||||
</WeaTop>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import React from "react";
|
||||
import Route from "react-router/lib/Route";
|
||||
import ActualSalaryReport from "./guangyang/actualSalaryReport";
|
||||
import SalarySummaryReport from "./guangyang/salarySummaryReport";
|
||||
import PrintReport from "./guangyang/printReport";
|
||||
|
||||
const CustomRoutes = [
|
||||
<Route key="actualSalaryReport_guangyang" path="actualSalaryReport_guangyang" component={ActualSalaryReport}/>,
|
||||
<Route key="salarySummaryReport_guangyang" path="salarySummaryReport_guangyang" component={SalarySummaryReport}/>,
|
||||
<Route key="printReport_guangyang" path="printReport_guangyang" component={PrintReport}/>
|
||||
];
|
||||
|
||||
export default CustomRoutes;
|
||||
Loading…
Reference in New Issue