diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js
index fcddfaab..c8920887 100644
--- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js
+++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js
@@ -55,7 +55,7 @@ class StatisticsModal extends Component {
return (
{
+ const { reportName, selectedKeys } = this.state;
+ const { onChangeTab } = this.props;
+ reportStatisticsReportList({ reportName }).then(({ status, data: reportList }) => {
+ if (status) this.setState({ reportList }, () => {
+ onChangeTab(_.find(this.state.reportList, it => it.id === selectedKeys[0]));
+ });
+ });
+ };
+
+ render() {
+ const { reportName, selectedKeys, reportList } = this.state;
+ const { onChangeTab } = this.props;
+ return (
+
+
+ this.setState({ reportName })}
+ placeholder={getLabel(111, "请输入报表名称")} onSearch={this.reportStatisticsReportList}
+ />
+
+
+
+ );
+ }
+}
+
+export default LeftTab;
diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js
new file mode 100644
index 00000000..0b80f004
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/reportView/index.js
@@ -0,0 +1,78 @@
+/*
+ * Author: 黎永顺
+ * name: 薪酬报表查看
+ * Description:
+ * Date: 2023/4/20
+ */
+import React, { Component } from "react";
+import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
+import LeftTab from "./components/leftTab";
+import { reportGetForm } from "../../apis/ruleconfig";
+import "./index.less";
+
+
+const { getLabel } = WeaLocaleProvider;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ report: {},
+ dimensionList: []
+ };
+ }
+
+ componentDidMount() {
+ this.reportGetForm();
+ }
+
+ reportGetForm = () => {
+ reportGetForm().then(({ status, data }) => {
+ if (status) {
+ const { statsDimOptions } = data;
+ this.setState({
+ dimensionList: _.map(statsDimOptions, it => ({ key: it.id, showname: it.content }))
+ });
+ }
+ });
+ };
+
+ render() {
+ const { report, dimensionList } = this.state;
+ return (
+ }
+ iconBgcolor="#F14A2D"
+ showDropIcon={false}
+ className="reportViewWrapper"
+ >
+ this.setState({ report })}/>}
+ >
+
+
+
+
{report.reportName}
+
+
+
+ {getLabel(111, "统计维度")}:
+
+
+
+
+
+
+
+ {/* 内容区 */}
+
+
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/reportView/index.less b/pc4mobx/hrmSalary/pages/reportView/index.less
new file mode 100644
index 00000000..8baa98f2
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/reportView/index.less
@@ -0,0 +1,100 @@
+.reportViewWrapper {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+
+ .wea-new-top-content {
+ flex: 1;
+
+ .leftTabWrapper {
+ background: #FFF;
+ height: 100%;
+ overflow-y: auto;
+
+ .searchArea {
+ width: 100%;
+ height: 49px;
+ line-height: 49px;
+ padding: 0 6px;
+
+ .wea-input-focus {
+ width: 100%;
+ }
+ }
+
+ .ant-menu {
+ border-right-color: transparent !important;
+
+ .ant-menu-item, .ant-menu-item {
+ border-left: 4px solid transparent;
+ border-right: none;
+ }
+
+ .ant-menu-item-selected, .ant-menu-selected {
+ border-left: 4px solid #2db7f5;
+ background: #f5f5f5;
+ border-right: none;
+ }
+
+ .ant-menu-item-active, .ant-menu-item:hover, .ant-menu-submenu-active, .ant-menu-submenu-title:hover {
+ background: #f5f5f5;
+ }
+ }
+ }
+
+ .rightLayout {
+ .layoutHeader {
+ height: 50px;
+
+ .layoutRow {
+ height: 100%;
+ display: flex;
+ align-content: center;
+ padding: 8px 16px;
+ background-color: #f9f9f9;
+ border-bottom: 1px solid #e5e5e5;
+
+ .layoutCol {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+
+ .rightColTitle {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ white-space: nowrap;
+
+ .icon-coms02-currency {
+ font-size: 16px;
+ color: #2db7f5;
+ margin: 0 10px;
+ cursor: pointer;
+ }
+
+ .dimension {
+ display: flex;
+ align-items: center;
+
+ .wea-select {
+ width: 150px;
+ margin-left: 10px;
+ }
+ }
+
+ .iconWrapper {
+ display: flex;
+ align-items: center;
+ }
+ }
+ }
+
+ .layoutColRight {
+ justify-content: flex-end;
+ }
+ }
+ }
+ }
+ }
+}
From 335624d91b167fb7b9f3817f55359e36dc2ab2ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 20 Apr 2023 15:51:08 +0800
Subject: [PATCH 21/37] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=E8=AF=A6=E6=83=85=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E7=9A=84=E5=90=88=E8=AE=A1=E8=A1=8Cbug=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E4=BB=A5=E5=8F=8A=E8=80=83=E6=83=85=E5=BC=95=E7=94=A8?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?=
=?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/dataAcquisition/attendance/index.js | 10 +++++-----
.../standingBookDetail/components/normal.js | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
index 4e5d734f..fca6e52a 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
@@ -56,17 +56,17 @@ class Index extends Component {
};
handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) }));
handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds();
- handleImportAttendanceData= ()=>{
+ handleImportAttendanceData = () => {
this.attendanceTableRef.handleImportAttendanceData({
visiable: true, params: {}, step: 0,
columns: [], slideDataSource: [], importResult: []
});
- }
- handleQuoteAttendanceData= ()=>{
+ };
+ handleQuoteAttendanceData = () => {
this.attendanceTableRef.handleQuoteAttendanceData({
visible: true, title: "引用考勤数据"
});
- }
+ };
render() {
const { selectedKey, salaryMonth, fieldName } = this.state;
@@ -82,7 +82,7 @@ class Index extends Component {
return (
this.setState({ selectedKey: v })}
searchsBaseValue={fieldName} onSearchChange={fieldName => this.setState({ fieldName })}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
index b3b61565..08b5c839 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
@@ -78,7 +78,7 @@ export default class NormalIndex extends Component {
if (type === "init") {
const { selectedKey } = this.props;
const { status, data: sysData } = await this.sysConfCodeRule();
- const { data: { sumRow: siaccountSum } } = await this.siaccountDetailCommonListSum();
+ const { data: { sumRow: siaccountSum } } = status && sysData === "1" ? await this.siaccountDetailCommonListSum() : { data: { sumRow: {} } };
this.setState({
showSum: selectedKey === "1" && status && sysData === "1",
siaccountSum
@@ -243,7 +243,7 @@ export default class NormalIndex extends Component {
};
getNormalList = async (payload = {}) => {
const { status, data: sysData } = await this.sysConfCodeRule();
- const { data: { sumRow: siaccountSum } } = await this.siaccountDetailCommonListSum();
+ const { data: { sumRow: siaccountSum } } = status && sysData === "1" ? await this.siaccountDetailCommonListSum() : { data: { sumRow: {} } };
const { getNormalList } = this.props.standingBookStore;
getNormalList({ ...payload }).then(({ list, columns = [], total }) => {
this.setState({
@@ -255,7 +255,7 @@ export default class NormalIndex extends Component {
};
getSupplementaryList = async (payload = {}) => {
const { status, data: sysData } = await this.sysConfCodeRule();
- const { data: { sumRow: siaccountSum } } = await this.siaccountDetailCommonListSum();
+ const { data: { sumRow: siaccountSum } } = status && sysData === "1" ? await this.siaccountDetailCommonListSum() : { data: { sumRow: {} } };
const { getSupplementaryList } = this.props.standingBookStore;
getSupplementaryList({
...payload
From e59adcc7d50d601796af21f4cb4e06ddc50ccb0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 20 Apr 2023 16:14:39 +0800
Subject: [PATCH 22/37] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=E8=AF=A6=E6=83=85=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E7=9A=84=E5=90=88=E8=AE=A1=E8=A1=8Cbug=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E4=BB=A5=E5=8F=8A=E8=80=83=E6=83=85=E5=BC=95=E7=94=A8?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?=
=?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../standingBookDetail/components/normal.js | 2 +-
.../standingBookDetail/components/regList.js | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
index 1fe2eab1..40f9fc83 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
@@ -84,7 +84,7 @@ export default class NormalIndex extends Component {
const { status, data: sysData } = await this.sysConfCodeRule();
const { data: { sumRow: siaccountSum } } = status && sysData === "1" && selectedKey === "1" ?
await this.siaccountDetailCommonListSum() :
- status && sysData === "1" && await this.siaccountDetailSupplementaryListSum();
+ status && sysData === "1" ? await this.siaccountDetailSupplementaryListSum() : { data: { sumRow: {} } };
this.setState({
showSum: status && sysData === "1",
siaccountSum: (status && sysData === "1") ? siaccountSum : {}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js
index 477de105..65f8b835 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js
@@ -47,12 +47,12 @@ class RegList extends Component {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
const { status, data: sysData } = await this.sysConfCodeRule();
- const { data: { sumRow: siaccountSum } } = listType === "regression" ?
+ const { data: { sumRow: siaccountSum } } = status && sysData === "1" && listType === "regression" ?
await this.siaccountDetailRecessionListSum() :
- await this.siaccountDetailBalanceListSum();
+ status && sysData === "1" ? await this.siaccountDetailBalanceListSum() : { data: { sumRow: {} } };
this.setState({
showSum: status && sysData === "1",
- siaccountSum
+ siaccountSum: (status && sysData === "1") ? siaccountSum : {}
}, () => this.postMessageToChild());
} else if (type === "turn") {
if (id === "PAGEINFO") {
@@ -110,9 +110,9 @@ class RegList extends Component {
recessionList = async (module) => {
const { type } = this.props;
const { status: sysStatus, data: sysData } = await this.sysConfCodeRule();
- const { data: { sumRow: siaccountSum } } = type === "regression" ?
+ const { data: { sumRow: siaccountSum } } = sysStatus && sysData === "1" && type === "regression" ?
await this.siaccountDetailRecessionListSum({ ...module }) :
- await this.siaccountDetailBalanceListSum({ ...module });
+ sysStatus && sysData === "1" ? await this.siaccountDetailBalanceListSum({ ...module }) : { data: { sumRow: {} } };
const { loading, pageInfo } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
From 8f3320ae117167098ffb5adfc6c9b2e55794a56f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Sun, 23 Apr 2023 11:28:18 +0800
Subject: [PATCH 23/37] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E9=85=AC?=
=?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/statistics.js | 12 +
pc4mobx/hrmSalary/common/leftTree-hide.png | Bin 0 -> 3308 bytes
pc4mobx/hrmSalary/common/leftTree-show.png | Bin 0 -> 3312 bytes
.../pages/reportView/components/condition.js | 153 +++++++++++++
.../components/customStatisticsItemsModal.js | 205 +++++++++++++++++
.../pages/reportView/components/leftTab.js | 11 +
.../reportView/components/reportContent.js | 99 +++++++++
.../reportView/components/rightOptions.js | 45 ++++
.../statisticalMicroSettingsSlide.js | 206 ++++++++++++++++++
pc4mobx/hrmSalary/pages/reportView/index.js | 81 ++++++-
pc4mobx/hrmSalary/pages/reportView/index.less | 196 +++++++++++++++++
pc4mobx/hrmSalary/stores/attendanceStore.js | 2 +
pc4mobx/hrmSalary/util/index.js | 4 +-
13 files changed, 1004 insertions(+), 10 deletions(-)
create mode 100644 pc4mobx/hrmSalary/common/leftTree-hide.png
create mode 100644 pc4mobx/hrmSalary/common/leftTree-show.png
create mode 100644 pc4mobx/hrmSalary/pages/reportView/components/condition.js
create mode 100644 pc4mobx/hrmSalary/pages/reportView/components/customStatisticsItemsModal.js
create mode 100644 pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
create mode 100644 pc4mobx/hrmSalary/pages/reportView/components/rightOptions.js
create mode 100644 pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js
index ed8f9d37..248a9037 100644
--- a/pc4mobx/hrmSalary/apis/statistics.js
+++ b/pc4mobx/hrmSalary/apis/statistics.js
@@ -5,6 +5,14 @@ import { postFetch } from "../util/request";
export const dimensionGetForm = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/dimension/getForm", "GET", params);
};
+//获取自定义统计项目表单
+export const statisticsItemGetform = (params) => {
+ return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/item/getForm", "GET", params);
+};
+//自定义统计项目列表
+export const statisticsItemList = (params) => {
+ return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/item/list", "GET", params);
+};
// 保存薪酬统计维度
export const dimensionSave = (params) => {
return postFetch("/api/bs/hrmsalary/report/statistics/dimension/save", params);
@@ -30,3 +38,7 @@ export const reportStatisticsReportDelete = (params) => {
export const reportStatisticsReportGetData = (params) => {
return postFetch("/api/bs/hrmsalary/report/statistics/report/getData", params);
};
+//保存自定义统计项目
+export const reportStatisticsItemSave = (params) => {
+ return postFetch("/api/bs/hrmsalary/report/statistics/item/save", params);
+};
diff --git a/pc4mobx/hrmSalary/common/leftTree-hide.png b/pc4mobx/hrmSalary/common/leftTree-hide.png
new file mode 100644
index 0000000000000000000000000000000000000000..0a1cadfc7d8c3d490ae14f41fd32197bdd2cda31
GIT binary patch
literal 3308
zcmVKLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA
z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7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mWADJlpK>kqk(fVV@r_fLLKIeS?{4e)}
z^ZO;zpECde03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(`>RI+y?e7jKeZ#YO-C
z0v$<2K~#9!?A6bU5@8s?@vqv93S#5Dh{1pm)A*oX*f4wuPtInuhbPpn=^A4SS;DzBme3PR
zatI;r0zZM*yMWR44Z|?7Z967}c(4Rt0#|m1)X%(86eyKSXqu+}YL;bDsZ>ZNlj_fJnkMCP
zIh=$H<&XA7yN5Q!d_D(olp){u0sbgMlgR|&i!wAA3;;eTL9XjE8jZdIr-7m2a7eq|
zJ_jCd)w4H+l#*_@+XL$+#a{q?Nfy4IG+6W~@5 {
+ statisticsItemGetform(payload).then(({ status, data }) => {
+ if (status) {
+ const { ruleData } = data;
+ const { columns, data: dataSource } = ruleData;
+ this.setState({ columns, dataSource });
+ }
+ });
+ };
+ handleChangeColumnCheckBox = (key, value, id) => {
+ const { dataSource } = this.state;
+ this.setState({
+ dataSource: _.map(dataSource, it => {
+ if (it.id === id) {
+ return {
+ ...it,
+ [key]: Number(value)
+ };
+ }
+ return { ...it };
+ })
+ });
+ };
+ handleChangeColumnAllChecked = (key, val) => {
+ const { dataSource } = this.state;
+ this.setState({
+ dataSource: _.map(dataSource, it => {
+ return {
+ ...it,
+ [key]: Number(val)
+ };
+ })
+ });
+ };
+ handleChangeColumnM2MValue = (key, value, id) => {
+ const { dataSource } = this.state;
+ this.setState({
+ dataSource: _.map(dataSource, it => {
+ if (it.id === id) {
+ return {
+ ...it,
+ [key]: value
+ };
+ }
+ return { ...it };
+ })
+ });
+ };
+
+ render() {
+ const { loading, columns, dataSource, formData } = this.state;
+ const { itemName } = formData;
+ const cols = _.map(columns, it => {
+ const { text, column } = it;
+ if (column === "ruleName" || column === "ratio" || column === "m2m" || column === "y2y") {
+ const key = column === "ruleName" ? "total" : column;
+ return {
+ ...it,
+ title:
+ !!child[`${key}Value`])}
+ onChange={val => this.handleChangeColumnAllChecked(`${key}Value`, val)}
+ />
+ {text}
+ ,
+ render: (txt, record) => {
+ return
+ this.handleChangeColumnCheckBox(`${key}Value`, val, record.id)}
+ />
+
+ {column === "ruleName" ? record["ruleName"] : text}
+
+ ;
+ }
+ };
+ } else if (column === "m2mLimit") {
+ return {
+ ...it,
+ title:
+ {text}
+ 10%,差值和增幅标记为红色,增幅<-10%标记为绿色")}
+ placement="top" width={200}/>
+ ,
+ render: (txt, record) => {
+ return !!record["m2mValue"] && this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
+ />;
+ }
+ };
+ } else if (column === "y2yLimit") {
+ return {
+ ...it,
+ title:
+ {text}
+ 10%,差值和增幅标记为红色,增幅<-10%标记为绿色")}
+ placement="top" width={200}/>
+ ,
+ render: (txt, record) => {
+ return !!record["y2yValue"] && this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
+ />;
+ }
+ };
+ }
+ });
+ return (
+
+ {getLabel(111, "新建自定义统计项目")}
+
+
+ }
+ style={{ width: 900, height: 500 }}
+ className="statisticItemsWrapper"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default CustomStatisticsItemsModal;
+/*
+ * Author: 黎永顺
+ * Description: 区间设置
+ * Params:
+ * Date: 2023/4/23
+ */
+const IntervalSettingsComp = (props) => {
+ const { LowerLimit, UpperLimit, onChange } = props;
+ return
+ onChange("min", val)}/>
+ {`% <${getLabel(111, "增幅")}<`}
+ onChange("max", val)}/>
+ %
+
;
+};
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/leftTab.js b/pc4mobx/hrmSalary/pages/reportView/components/leftTab.js
index 329d23ab..c4c1494f 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/leftTab.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/leftTab.js
@@ -37,6 +37,17 @@ class LeftTab extends Component {
});
});
};
+ updateReportList = (report) => {
+ const { reportList } = this.state;
+ this.setState({
+ reportList: _.reduce(reportList, (pre, cur) => {
+ if (report.id === cur.id) {
+ return [...pre, report];
+ }
+ return [...pre, cur];
+ }, [])
+ });
+ };
render() {
const { reportName, selectedKeys, reportList } = this.state;
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
new file mode 100644
index 00000000..529004c1
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
@@ -0,0 +1,99 @@
+/*
+ * Author: 黎永顺
+ * name: 报表内容区
+ * Description:
+ * Date: 2023/4/21
+ */
+import React, { Component } from "react";
+import { Spin } from "antd";
+import RightOptions from "./rightOptions";
+import { reportStatisticsReportGetData } from "../../../apis/statistics";
+import "../index.less";
+
+class ReportContent extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ columns: [],
+ dataSource: [],
+ countResult: {},
+ loading: false
+ };
+ }
+
+ componentDidMount() {
+ window.addEventListener("message", this.handleReceive, false);
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.report !== this.props.report && nextProps.report.dimensionId) {
+ this.reportStatisticsReportGetData(nextProps.report.id, nextProps.report.dimensionId);
+ }
+ }
+
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
+ handleReceive = ({ data }) => {
+ const { type } = data;
+ if (type === "init") {
+ const { columns, countResult, dataSource } = this.state;
+ this.postMessageToChild({
+ columns, countResult, dataSource,
+ showSum: !_.isEmpty(countResult)
+ });
+ } else if (type === "turn") {
+ }
+ };
+ postMessageToChild = (payload) => {
+ const childFrameObj = document.getElementById("atdTable");
+ const { dataSource, columns, showSum, countResult } = payload;
+ childFrameObj.contentWindow.postMessage(JSON.stringify({
+ dataSource, columns, showSum, countResult
+ }), "*");
+ };
+
+ reportStatisticsReportGetData = (id, dimensionId) => {
+ const payload = { id, dimensionId };
+ this.setState({ loading: true });
+ reportStatisticsReportGetData(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { countResult, columns, pageInfo: { list } } = data;
+ this.setState({
+ countResult,
+ columns: _.map(columns, it => ({ ...it, dataIndex: it.column, title: it.text, align: "center" })),
+ dataSource: list || []
+ }, () => {
+ this.postMessageToChild({
+ columns: this.state.columns, countResult: this.state.countResult,
+ dataSource: this.state.dataSource,
+ showSum: !_.isEmpty(this.state.countResult)
+ });
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+
+ render() {
+ const { loading } = this.state;
+ return (
+
+ );
+ }
+}
+
+export default ReportContent;
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/rightOptions.js b/pc4mobx/hrmSalary/pages/reportView/components/rightOptions.js
new file mode 100644
index 00000000..30d2b1b7
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/reportView/components/rightOptions.js
@@ -0,0 +1,45 @@
+/*
+ * Author: 黎永顺
+ * name: 内容操作按钮区
+ * Description:
+ * Date: 2023/4/21
+ */
+import React, { Component } from "react";
+import "../index.less";
+
+class RightOptions extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ show: true
+ };
+ }
+
+ render() {
+ const { show } = this.state;
+ return (
+
+
+
+
this.setState({ show: !show })}>
+ {
+ show ?
:
+
+ }
+
+
+
+ );
+ }
+}
+
+export default RightOptions;
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
new file mode 100644
index 00000000..b4e3984f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
@@ -0,0 +1,206 @@
+/*
+ * Author: 黎永顺
+ * name: 统计数据范围及规则设置
+ * Description:
+ * Date: 2023/4/21
+ */
+import React, { Component } from "react";
+import { toJS } from "mobx";
+import {
+ WeaButtonIcon,
+ WeaError,
+ WeaFormItem,
+ WeaHelpfulTip,
+ WeaLocaleProvider,
+ WeaRangePicker,
+ WeaSearchGroup,
+ WeaSelect,
+ WeaSlideModal,
+ WeaTable
+} from "ecCom";
+import CustomStatisticsItemsModal from "./customStatisticsItemsModal";
+import moment from "moment";
+import { Button } from "antd";
+import { condition } from "./condition";
+import { getSearchs } from "../../../util";
+import { reportStatisticsItemSave } from "../../../apis/statistics";
+import "../index.less";
+
+
+const { getLabel } = WeaLocaleProvider;
+
+class StatisticalMicroSettingsSlide extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false,
+ selectedRowKeys: [],
+ conditions: [],
+ salaryMonth: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")],
+ statisticalItemPayload: {
+ visible: false, id: "", dimension: ""
+ }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.taxAgentAdminOption !== this.props.taxAgentAdminOption && !_.isEmpty(nextProps.taxAgentAdminOption)) {
+ const conditions = _.map(condition, item => {
+ return {
+ ...item,
+ items: _.map(item.items, child => {
+ if (child.domkey[0] === "taxAgent") {
+ return {
+ ...child,
+ options: toJS(nextProps.taxAgentAdminOption)
+ };
+ }
+ return { ...child };
+ })
+ };
+ });
+ this.setState({ conditions });
+ nextProps.form.initFormFields(condition);
+ }
+ }
+
+ reportStatisticsItemSave = () => {
+ const { salaryMonth } = this.state;
+ const { form, id, dimension } = this.props;
+ const [salaryStartMonth, salaryEndMonth] = salaryMonth;
+ const { hiredate, ...extra } = form.getFormDatas();
+ if (!salaryEndMonth && !salaryStartMonth) {
+ this.refs.weaError.showError();
+ return;
+ }
+ const payload = {
+ dimension, id,
+ hiredate: hiredate.value, items: [],
+ salaryEndMonth,
+ salaryStartMonth
+ };
+ console.log(payload, extra);
+ return;
+ this.setState({ loading: true });
+ reportStatisticsItemSave(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ console.log(status, data);
+ }).catch(() => this.setState({ loading: false }));
+ };
+
+ renderGroupTitle = () => {
+ return
+ {getLabel(111, "统计数据范围")}
+ {getLabel(111, "统计满足以下所有条件的人员薪资核算数据,不选则默认为选择全部")}
+
;
+ };
+ renderProjectTitle = () => {
+ const { id, dimension } = this.props;
+ return
+
+ {getLabel(111, "统计项目")}
+
+
+
+
+ this.setState({
+ statisticalItemPayload: { visible: true, id, dimension }
+ })}
+ />
+
+
;
+ };
+ drop = datas => {
+ console.log("datas", datas);
+ };
+
+ render() {
+ const { salaryMonth, conditions, selectedRowKeys, loading, statisticalItemPayload } = this.state;
+ const columns = [
+ {
+ title: "统计项名称",
+ dataIndex: "itemName"
+ },
+ {
+ title: "统计单位",
+ dataIndex: "unitType",
+ render: () => {
+ return
;
+ }
+ }
+ ];
+ const rowSelection = {
+ selectedRowKeys,
+ onChange: (selectedRowKeys) => {
+ this.setState({ selectedRowKeys }, () => {
+ });
+ }
+ };
+ return (
+
}
+ content={
+
+
+
+
+ this.setState({ salaryMonth: v })}
+ />
+
+
+
+ {
+ getSearchs(this.props.form, conditions, 2, false, () => {
+ }, this.renderGroupTitle())
+ }
+
+
+ this.setState({
+ statisticalItemPayload: { visible: false, id: "", dimension: "" }
+ })}
+ />
+
+
+ }
+ />
+ );
+ }
+}
+
+export default StatisticalMicroSettingsSlide;
+const TitleDialog = (props) => {
+ return
+
+
+
+
{getLabel(111, "统计数据范围及规则设置")}
+
+
+
+
+
+
;
+};
diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js
index 0b80f004..a5492ba9 100644
--- a/pc4mobx/hrmSalary/pages/reportView/index.js
+++ b/pc4mobx/hrmSalary/pages/reportView/index.js
@@ -5,25 +5,35 @@
* Date: 2023/4/20
*/
import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
+import { message, Modal } from "antd";
import LeftTab from "./components/leftTab";
-import { reportGetForm } from "../../apis/ruleconfig";
+import ReportContent from "./components/reportContent";
+import StatisticalMicroSettingsSlide from "./components/statisticalMicroSettingsSlide";
+import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
import "./index.less";
-
const { getLabel } = WeaLocaleProvider;
+@inject("taxAgentStore", "attendanceStore")
+@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
report: {},
- dimensionList: []
+ dimensionList: [],
+ statisticalPayload: {
+ visible: false, id: "", dimension: ""
+ }
};
}
componentDidMount() {
+ const { taxAgentStore: { getTaxAgentSelectListAsAdmin } } = this.props;
this.reportGetForm();
+ getTaxAgentSelectListAsAdmin();
}
reportGetForm = () => {
@@ -36,9 +46,48 @@ class Index extends Component {
}
});
};
+ /*
+ * Author: 黎永顺
+ * Description: 统计维度切换
+ * Params:
+ * Date: 2023/4/20
+ */
+ handleChangeDimension = (dimensionId, dimension) => {
+ const { report } = this.state;
+ Modal.confirm({
+ title: getLabel(111, "信息确认"),
+ content: getLabel(111, "确认要更改统计维度吗?"),
+ onOk: () => {
+ const payload = {
+ id: report.id,
+ reportName: report.reportName,
+ dimensionIds: dimensionId.split(",")
+ };
+ reportStatisticsReportSave(payload).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(111, "切换成功"));
+ this.setState({
+ report: {
+ ...report, dimensionId,
+ dimension
+ }
+ }, () => this.leftTabRef.updateReportList(this.state.report));
+ } else {
+ message.error(errormsg || getLabel(111, "切换失败"));
+ this.setState({ report: { ...report } });
+ }
+ });
+ },
+ onCancel: () => {
+ this.setState({ report: { ...report } });
+ }
+ });
+ };
render() {
- const { report, dimensionList } = this.state;
+ const { report, dimensionList, statisticalPayload } = this.state;
+ const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentAdminOption } } = this.props;
return (
this.setState({ report })}/>}
+ leftCom={ this.leftTabRef = dom} onChangeTab={report => this.setState({ report })}/>}
>
@@ -59,15 +108,31 @@ class Index extends Component {
{getLabel(111, "统计维度")}:
-
+ this.handleChangeDimension(key, showname)}/>
-
+
+ this.setState({
+ statisticalPayload: { visible: true, id: report.id, dimension: report.dimensionId }
+ })}
+ />
+
+ {/*统计数据范围及规则设置弹框*/}
+
this.setState({
+ statisticalPayload: { visible: false, id: "", dimension: "" }
+ })}
+ />