custom-旭化成

This commit is contained in:
lys 2025-01-06 16:09:02 +08:00
parent 4c147d79dd
commit c3ea99d974
4 changed files with 45 additions and 6 deletions

View File

@ -0,0 +1,6 @@
import { postFetch } from "../../util/request";
// 旭化成-报表查询
export const getxhcDepartmentReport = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/xhcDepartmentReport/list", params);
};

View File

@ -18,13 +18,13 @@ export const xhcConditions = [
pageSize: 10,
quickSearchName: "",
replaceDatas: [],
title: getLabel(111, "分部"),
title: "所属公司",
type: "164",
viewAttr: 2
},
colSpan: 2,
conditionType: "BROWSER",
domkey: ["subCompany"],
domkey: ["subCompanyIds"],
fieldcol: 18,
isQuickSearch: false,
label: "所属公司",
@ -48,13 +48,13 @@ export const xhcConditions = [
pageSize: 10,
quickSearchName: "",
replaceDatas: [],
title: getLabel(111, "部门"),
title: "所属部门",
type: "57",
viewAttr: 2
},
colSpan: 2,
conditionType: "BROWSER",
domkey: ["department"],
domkey: ["departmentIds"],
fieldcol: 18,
isQuickSearch: false,
label: "所属部门",

View File

@ -1,6 +1,9 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaSearchGroup, WeaTop } from "ecCom";
import { WeaLocaleProvider, WeaTop } from "ecCom";
import FormInfo from "../../../components/FormInfo";
import { xhcConditions } from "./conditions";
import * as API from "../../../apis/custom-apis/xhc";
import { Button } from "antd";
import "./index.less";
@ -9,12 +12,32 @@ const getLabel = WeaLocaleProvider.getLabel;
@inject("XHCStore")
@observer
class DepartmentReport extends Component {
componentDidMount() {
const { XHCStore: { form } } = this.props;
form.initFormFields(xhcConditions);
this.getxhcDepartmentReport();
}
getxhcDepartmentReport = () => {
const { XHCStore: { form } } = this.props, { subCompanyIds, departmentIds } = form.getFormParams();
const payload = {
subCompanyIds: subCompanyIds ? subCompanyIds.split(",") : [],
departmentIds: departmentIds ? departmentIds.split(",") : []
};
API.getxhcDepartmentReport(payload).then(({ status, data }) => {
if (status) {
console.log(data);
}
});
};
render() {
const { XHCStore: { form } } = this.props;
return (<WeaTop
title={getLabel(111, "报表管理")} buttonSpace={10} className="xhc_report"
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[<Button type="primary">{getLabel(17416, "导出")}</Button>]}>
<WeaSearchGroup title="" showGroup needTigger items={[]}></WeaSearchGroup>
<FormInfo center={false} form={form} formFields={xhcConditions} colCount={3}/>
</WeaTop>);
}
}

View File

@ -0,0 +1,10 @@
.xhc_report {
.wea-new-top-content {
background: #f6f6f6;
padding: 8px 16px 0 16px;
}
.wea-search-group {
margin-bottom: 8px;
}
}