+
+ {
+ _.map(scopeBtns.slice(0, 2), o => (
+ ))
+ }
+
+
+ {
+ _.map(scopeBtns.slice(2, 6), o => (
+ ))
+ }
+
+
+ {
+ _.map(scopeBtns.slice(6), o => (
+ ))
+ }
+
+
+
onChange([], 10)}>{getLabel(111, "指定月份")}
+
+ {
+ return current && endDate && current.getTime() > new Date(endDate).getTime();
+ }}
+ format="YYYY-MM"
+ onChange={(val) => onChange([val, endDate], timeType)}
+ viewAttr={viewAttr}
+ />
+ 至
+ {
+ return current && startDate && current.getTime() < new Date(startDate).getTime();
+ }}
+ format="YYYY-MM"
+ viewAttr={viewAttr}
+ onChange={(val) => onChange([startDate, val], timeType)}
+ />
+
+
+
;
+};
export const MonthRangePicker = (props) => {
const { dateRange, onChange, viewAttr, disabled = false } = props;
const [startDate, endDate] = dateRange || [];
@@ -369,3 +435,48 @@ export const MonthRangePicker = (props) => {
/>
;
};
+// 获取所属月份值
+export const getSalaryMonthValue = (dateType) => {
+ let start = "", end = "";
+ switch (dateType) {
+ case 1:
+ start = moment().add(-1, "month").startOf("month").format("YYYY-MM");
+ end = moment().add(-1, "month").endOf("month").format("YYYY-MM");
+ break;
+ case 2:
+ start = moment().startOf("month").format("YYYY-MM");
+ end = moment().endOf("month").format("YYYY-MM");
+ break;
+ case 3:
+ start = moment().year() + "-01";
+ end = moment().year() + "-03";
+ break;
+ case 4:
+ start = moment().year() + "-04";
+ end = moment().year() + "-06";
+ break;
+ case 5:
+ start = moment().year() + "-07";
+ end = moment().year() + "-09";
+ break;
+ case 6:
+ start = moment().year() + "-10";
+ end = moment().year() + "-12";
+ break;
+ case 7:
+ start = moment().startOf("year").format("YYYY-MM");
+ end = moment().endOf("year").subtract(6, "month").format("YYYY-MM");
+ break;
+ case 8:
+ start = moment().startOf("year").add(6, "month").format("YYYY-MM");
+ end = moment().endOf("year").format("YYYY-MM");
+ break;
+ case 9:
+ start = moment().startOf("year").format("YYYY-MM");
+ end = moment().endOf("year").format("YYYY-MM");
+ break;
+ default:
+ break;
+ }
+ return [start, end];
+};
diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js
index ffe5a3db..82f935e5 100644
--- a/pc4mobx/hrmSalary/pages/reportView/index.js
+++ b/pc4mobx/hrmSalary/pages/reportView/index.js
@@ -10,9 +10,10 @@ import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom"
import { message, Modal } from "antd";
import LeftTab from "./components/leftTab";
import ReportContent from "./components/reportContent";
-import StatisticalMicroSettingsSlide from "./components/statisticalMicroSettingsSlide";
-import TopBtns from "./components/topBtns";
+import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide";
import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
+import { convertToUrlString } from "../../util/url";
+import TopBtns from "./components/topBtns";
import "./index.less";
@@ -92,8 +93,13 @@ class Index extends Component {
*/
exportData = () => {
const { report } = this.state;
- const { id, dimensionId, isShare } = report;
- window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?id=${id}&dimensionId=${dimensionId}&isShare=${isShare}`, "_blank");
+ const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report;
+ const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
+ const payload = {
+ id, dimensionId, isShare,
+ salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
+ };
+ window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?${convertToUrlString(payload)}`, "_blank");
};
render() {
@@ -113,7 +119,7 @@ class Index extends Component {
ref={dom => this.leftTabRef = dom}
onChangeTab={report =>
this.setState({
- report,
+ report: !_.isNil(report) ? report : this.state.report,
statisticalPayload: { visible: false, id: "", dimension: "" }
})}
/>
@@ -152,7 +158,7 @@ class Index extends Component {
taxAgentAdminOption={taxAgentOption} isShare={isShare}
onClose={(isRefresh) => this.setState({
statisticalPayload: { visible: false, id: "", dimension: "" }
- }, () => isRefresh && this.reportRef.reportStatisticsReportGetData(report.id, report.dimensionId, report.isShare))}
+ }, () => isRefresh && this.leftTabRef.reportStatisticsReportList())}
/>
diff --git a/pc4mobx/hrmSalary/pages/reportView/index.less b/pc4mobx/hrmSalary/pages/reportView/index.less
index ecf9b997..e1e94313 100644
--- a/pc4mobx/hrmSalary/pages/reportView/index.less
+++ b/pc4mobx/hrmSalary/pages/reportView/index.less
@@ -304,6 +304,36 @@
display: flex;
align-items: center;
}
+
+ .date-set-area {
+ .date-item {
+ margin-bottom: 5px;
+
+ button {
+ margin-right: 10px;
+ }
+ }
+
+ .data-picker {
+ display: flex;
+ align-items: center;
+
+ .title {
+ color: #5d9cec;
+ cursor: pointer;
+ font-size: 12px;
+ margin-right: 10px;
+ }
+
+ .show-data-picker {
+ display: flex;
+ }
+
+ .hide-data-picker {
+ display: none !important;
+ }
+ }
+ }
}
//新建自定义统计项目
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js
index 84bcb6ff..e4e94622 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js
@@ -1,3 +1,10 @@
+import { WeaSwitch } from "comsMobx";
+import { Button } from "antd";
+import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
export const tabCondition = [
{
color: "#000000",
@@ -33,5 +40,99 @@ export const tabCondition = [
showcount: true,
title: "非系统人员",
viewcondition: "ext"
- },
+ }
];
+export const logConditions = [
+ {
+ items: [
+ {
+ colSpan: 1,
+ conditionType: "BROWSER",
+ browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: true,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: true,
+ linkUrl: "/hrm/resource/HrmResource.jsp?id=",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: "",
+ type: "1"
+ },
+ domkey: ["employeeId"],
+ fieldcol: 17,
+ label: "对象",
+ lanId: 106,
+ labelcol: 7,
+ value: ""
+ },
+ {
+ colSpan: 1,
+ conditionType: "BROWSER",
+ browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: true,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: true,
+ linkUrl: "/hrm/resource/HrmResource.jsp?id=",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: "",
+ type: "1"
+ },
+ domkey: ["operator"],
+ fieldcol: 17,
+ label: "操作人",
+ lanId: 111,
+ labelcol: 7,
+ value: ""
+ }
+ ],
+ defaultshow: true
+ }
+];
+export const getLogSearchsForm = (form, condition, onSearch = () => void (0)) => {
+ const { isFormInit } = form;
+ const formParams = form.getFormParams();
+ let group = [];
+ isFormInit && condition && condition.map(c => {
+ let items = [];
+ c.items.map(fields => {
+ items.push({
+ com: (
+