From dfae2661a68cfc2840251bf945c903d8834a2a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 11 Apr 2023 13:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=8A=9F=E8=83=BD-=E8=96=AA?= =?UTF-8?q?=E9=85=AC=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/statistics.js | 11 ++ pc4mobx/hrmSalary/index.js | 3 + .../components/conditions.js | 54 +++++++++ .../components/dimensionSlide.js | 76 +++++++++++++ .../components/dimensionTable.js | 19 ++++ .../components/statisticsModal.js | 33 ++++++ .../pages/analysisOfSalaryStatistics/index.js | 107 ++++++++++++++++++ .../analysisOfSalaryStatistics/index.less | 21 ++++ pc4mobx/hrmSalary/stores/attendanceStore.js | 2 + 9 files changed, 326 insertions(+) create mode 100644 pc4mobx/hrmSalary/apis/statistics.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionTable.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.less diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js new file mode 100644 index 00000000..2536ea8c --- /dev/null +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -0,0 +1,11 @@ +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; + +//薪酬统计维度下拉列表 +export const dimensionSelectList = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/dimension/selectList", "GET", params); +}; +// 保存薪酬统计维度 +export const dimensionSave = (params) => { + return postFetch("/api/bs/hrmsalary/report/statistics/dimension/save", params); +}; diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index b59a534a..24931140 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -32,6 +32,7 @@ import SysConfig from "./pages/sysConfig"; import RuleConfig from "./pages/ruleConfig"; import Appconfig from "./pages/appConfig"; import FieldManagement from "./pages/fieldManagement"; +import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics" import stores from "./stores"; import "./style/index"; @@ -78,6 +79,7 @@ const DataAcquisition = (props) => props.children; // sysconfig-1 规则配置 // appconfig 应用配置 // fieldManagement 字段管理 +// analysisOfSalaryStatistics 薪酬统计分析 const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js new file mode 100644 index 00000000..260115e5 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js @@ -0,0 +1,54 @@ +export const condition = [ + { + items: [ + { + colSpan: 1, + checkbox: false, + checkboxValue: false, + conditionType: "SELECT", + domkey: ["dimType"], + fieldcol: 14, + label: "维度类型", + labelcol: 6, + options: [], + detailtype: 2, + rules: "required|string", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["dimCode"], + fieldcol: 14, + label: "统计维度", + labelcol: 6, + options: [], + rules: "required|string", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["dimName"], + fieldcol: 14, + label: "统计维度名称", + labelcol: 6, + value: "", + rules: "required|string", + viewAttr: 3, + }, + { + colSpan: 1, + conditionType: "TEXTAREA", + domkey: ["remark"], + fieldcol: 14, + label: "描述", + labelcol: 6, + value: "", + viewAttr: 2, + }, + ], + title: "基础设置", + defaultshow: true, + }, +]; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js new file mode 100644 index 00000000..f905b5a4 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js @@ -0,0 +1,76 @@ +/* + * Author: 黎永顺 + * name: 新增统计维度弹框 + * Description: + * Date: 2023/4/11 + */ +import React, { Component } from "react"; +import { WeaDialog } from "ecCom"; +import { Button } from "antd"; +import { condition } from "./conditions"; +import { commonEnumList } from "../../../apis/ruleconfig"; +import { dimensionSelectList } from "../../../apis/statistics"; +import { getSearchs } from "../../../util"; +import "../index.less"; + +class DimensionSlide extends Component { + constructor(props) { + super(props); + this.state = { + date: "" + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + const promise = this.initCondition(); + nextProps.form.initFormFields(condition); + } + } + + + initCondition = async () => { + const [dimTypeEnum, dimCodeList] = await Promise.all([this.commonEnumList(), this.dimensionSelectList()]); + console.log(dimTypeEnum, dimCodeList, condition); + }; + commonEnumList = () => { + const payload = { + enumClass: "com.engine.salary.report.enums.SalaryStatisticsDimensionTypeEnum" + }; + return commonEnumList(payload); + }; + dimensionSelectList = () => { + return dimensionSelectList(); + }; + handleSave = () => { + this.props.form.validateForm().then(f => { + if (f.isValid) { + } else { + f.showErrors(); + this.setState({ date: new Date() }); + } + }); + }; + + render() { + const { form } = this.props; + return ( + + 新建统计维度 + + + } + > + {getSearchs(form, condition, 1)} + + ); + } +} + +export default DimensionSlide; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionTable.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionTable.js new file mode 100644 index 00000000..8cdb57c9 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionTable.js @@ -0,0 +1,19 @@ +/* + * Author: 黎永顺 + * name: 统计维度管理列表 + * Description: + * Date: 2023/4/11 + */ +import React, { Component } from "react"; + +class DimensionTable extends Component { + render() { + return ( +
+ +
+ ); + } +} + +export default DimensionTable; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js new file mode 100644 index 00000000..de45c1c3 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js @@ -0,0 +1,33 @@ +/* + * Author: 黎永顺 + * name: 统计弹框 + * Description: + * Date: 2023/4/10 + */ +import React, { Component } from "react"; +import { WeaDialog } from "ecCom"; +import { Button } from "antd"; +import "../index.less"; + +class StatisticsModal extends Component { + render() { + const { typeKey, onCancel } = this.props; + const buttons = typeKey === "addReport" ? [ + + ] : []; + return ( + + {this.props.children} + + ); + } +} + +export default StatisticsModal; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js new file mode 100644 index 00000000..e3460063 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js @@ -0,0 +1,107 @@ +/* + * Author: 黎永顺 + * name: 薪酬统计分析 + * Description: + * Date: 2023/4/10 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaInputSearch, WeaReqTop } from "ecCom"; +import { Button } from "antd"; +import StatisticsModal from "./components/statisticsModal"; +import DimensionSlide from "./components/dimensionSlide"; +import "./index.less"; + +@inject("taxAgentStore", "attendanceStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "statistics", + slideReq: { + visible: false + }, + modalReq: { + title: "", visible: false, + typeKey: "" + } + }; + } + + handleReqBtnsClick = (key) => { + if (key === "search") { + + } else { + const { modalReq } = this.state; + const title = key === "dimension" ? +
+ 统计维度管理 + +
+ : "新建报表"; + this.setState({ + modalReq: { + ...modalReq, + title, visible: true, typeKey: key + } + }); + } + }; + handleCancel = () => { + const { modalReq } = this.state; + this.setState({ + modalReq: { + ...modalReq, visible: false + } + }); + }; + handleAddDimension = () => { + const { slideReq } = this.state; + this.setState({ + slideReq: { + ...slideReq, visible: true + } + }); + }; + handleClose = () => { + const { slideReq } = this.state; + this.setState({ + slideReq: { + ...slideReq, visible: false + } + }); + }; + + render() { + const { taxAgentStore: { showOperateBtn }, attendanceStore: { statisticsForm } } = this.props; + const { selectedKey, modalReq, slideReq } = this.state; + const buttons = [ + , + , + this.handleReqBtnsClick("search")}/> + ]; + const tabs = [ + { key: "statistics", title: "统计表" }, + { key: "detail", title: "员工明细" } + ]; + return ( + } + iconBgcolor="#F14A2D" buttons={!showOperateBtn ? buttons.slice(-1) : buttons} buttonSpace={10} + showDropIcon={false} tabDatas={tabs} className="xc_tj_fx_wrapper" + selectedKey={selectedKey} onChange={selectedKey => this.setState({ selectedKey })} + > +
+ +
123
+
+ +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.less b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.less new file mode 100644 index 00000000..9840ad74 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.less @@ -0,0 +1,21 @@ +.xc_tj_fx_wrapper { + .search { + top: -3px; + margin-right: 10px; + width: 220px; + } +} + +//统计维度弹框 +.dimensionModalWrapper, .dimensionSlideWrapper { + .dimensionTitle { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + } + + .wea-select, .ant-select, .ant-select-selection { + width: 100%; + } +} diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js index 3f3d2912..ed18f076 100644 --- a/pc4mobx/hrmSalary/stores/attendanceStore.js +++ b/pc4mobx/hrmSalary/stores/attendanceStore.js @@ -5,4 +5,6 @@ import { WeaForm } from "comsMobx"; export class AttendanceStore { @observable form = new WeaForm(); @observable refenceform = new WeaForm(); + //薪酬统计 新增form + @observable statisticsForm = new WeaForm(); }