custom/万德隆
This commit is contained in:
parent
d5fdab4699
commit
971b4bf281
|
|
@ -1,3 +1,4 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
|
||||
// 万德隆薪资动态表
|
||||
|
|
@ -8,3 +9,6 @@ export const getDynamicSalaryReport = params => {
|
|||
export const importWdlDynamicSalaryReport = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/wdl/importWdlDynamicSalaryReport", params);
|
||||
};
|
||||
export const getlbSelectList = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/wdl/lbSelectList", "GET", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,125 @@
|
|||
export const conditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["lbList"],
|
||||
fieldcol: 18,
|
||||
label: "类别",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
multiple: true,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "262",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["bgddList"],
|
||||
fieldcol: 18,
|
||||
label: "办公地点",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "278",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["gwmcList"],
|
||||
fieldcol: 18,
|
||||
label: "岗位名称",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {
|
||||
type: 162,
|
||||
fielddbtype: "browser.zj_123",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
},
|
||||
conditionDataParams: {
|
||||
type: "browser.zj_123",
|
||||
fielddbtype: "browser.zj_123",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
},
|
||||
dataParams: {
|
||||
type: "browser.zj_123",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
},
|
||||
destDataParams: {
|
||||
type: "browser.zj_123",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "162",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["gwzjList"],
|
||||
fieldcol: 18,
|
||||
label: "岗位职级",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -8,30 +8,60 @@
|
|||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTable, WeaTools, WeaTop } from "ecCom";
|
||||
import WdlImportDialog from "../components/wdlImportDialog";
|
||||
import { Button } from "antd";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
import FormInfo from "../../../../components/FormInfo";
|
||||
import { conditions } from "./conditions";
|
||||
import * as API from "../api";
|
||||
import { getlbSelectList } from "../api";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import { Button } from "antd";
|
||||
import cs from "classnames";
|
||||
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 = {
|
||||
columns: [], dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, visible: false
|
||||
columns: [], dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, visible: false,
|
||||
showAdvance: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getDynamicSalaryReport();
|
||||
async componentDidMount() {
|
||||
const { data } = await getlbSelectList();
|
||||
this.setState({
|
||||
conditions: _.map(conditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "lbList") {
|
||||
return { ...o, options: _.map(data, it => ({ key: String(it.id), showname: it.name })) };
|
||||
}
|
||||
return o;
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
form.initFormFields(this.state.conditions);
|
||||
this.getDynamicSalaryReport();
|
||||
});
|
||||
}
|
||||
|
||||
getDynamicSalaryReport = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const { pageInfo } = this.state, { lbList, bgddList, gwmcList, gwzjList } = form.getFormParams();
|
||||
const payload = {
|
||||
lbList: lbList ? lbList.split(",") : [],
|
||||
bgddList: bgddList ? bgddList.split(",") : [],
|
||||
gwmcList: gwmcList ? gwmcList.split(",") : [],
|
||||
gwzjList: gwzjList ? gwzjList.split(",") : [],
|
||||
...pageInfo
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getDynamicSalaryReport({ ...pageInfo }).then(({ status, data }) => {
|
||||
API.getDynamicSalaryReport(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, pageInfo: result } = data, { pageNum: current, pageSize, total, list: dataSource } = result;
|
||||
|
|
@ -45,7 +75,7 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { loading, columns, dataSource, pageInfo, visible } = this.state;
|
||||
const { loading, columns, dataSource, pageInfo, visible, showAdvance, conditions } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`,
|
||||
|
|
@ -67,9 +97,22 @@ class Index extends Component {
|
|||
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>]}
|
||||
>
|
||||
onClick={() => window.open(`/api/bs/hrmsalary/salaryacct/wdl/exportDynamicSalaryReport?${convertToUrlString(form.getFormParams())}`, "_blank")}>{getLabel(17416, "导出")}</Button>,
|
||||
<a href="javascript:void(0);" className="advanceBtn"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "高级搜索")}</a>]}>
|
||||
<div className="wdl-salary-dynamic-table-container">
|
||||
<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, pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.getDynamicSalaryReport())}>{getLabel(111, "搜索")}</Button>
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>{getLabel(111, "重置")}</Button>
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<WeaTable loading={loading} columns={columns} dataSource={dataSource} pagination={pagination}
|
||||
scroll={{ x: 1200, y: `calc(100vh - 170px)` }}/>
|
||||
<WdlImportDialog title={getLabel(111, "数据导入")} visible={visible}
|
||||
|
|
|
|||
|
|
@ -13,4 +13,53 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.advanceBtn {
|
||||
border-radius: 0;
|
||||
height: 28px;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue