@@ -626,7 +635,7 @@ export default class PayrollGrant extends React.Component {
);
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less
index ebcbbe4c..ad636d55 100644
--- a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less
+++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less
@@ -96,6 +96,10 @@
& > ul {
border: 1px solid #e5e5e5;
+ .sortable-handle {
+ display: none;
+ }
+
.wea-sortable-salary-item {
padding: 0;
margin: 0;
diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
index 9eaa2ece..7d2edc9c 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
+++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
@@ -106,7 +106,7 @@ class TemplateBaseSettings extends Component {
render() {
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
- const { limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting;
+ const { monthType = "SALARY_DATE", limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting;
return (
;
}
}
]}
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
index e59cf608..1ebc0216 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
@@ -123,7 +123,7 @@ class Index extends Component {
}).catch(() => this.setState({ loading: false }));
};
renderTitle = () => {
- const { tmplId } = this.props, { current, loading } = this.state;
+ const { tmplId, detail } = this.props, { current, loading } = this.state;
const { payrollStore: { payrollTempNormalForm, setTmplDataSource, tmplDataSource } } = this.props;
return
@@ -156,7 +156,11 @@ class Index extends Component {
-
+ {
+ !detail &&
+
+ }
}
@@ -185,8 +189,29 @@ class Index extends Component {
payrollStore: {
initPayrollTempForm, initPayrollTempFeedbackForm, setSalaryBillItemNameSetting,
initPayrollTempNormalForm, setTmplDataSource, hasBeenModify
- }, onClose
+ }, onClose, detail
} = this.props;
+ if (detail) {
+ initPayrollTempForm();
+ initPayrollTempFeedbackForm();
+ initPayrollTempNormalForm();
+ setTmplDataSource({});
+ setSalaryBillItemNameSetting([
+ {
+ salaryTemplateId: "",
+ salaryBillType: 0,
+ itemShowNameSetting: []
+ },
+ {
+ salaryTemplateId: "",
+ salaryBillType: 1,
+ itemShowNameSetting: []
+ }
+ ]);
+ this.setState({ current: 0 });
+ onClose(type);
+ return;
+ }
if (hasBeenModify) {
Modal.confirm({
title: getLabel(131329, "信息确认"),
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/index.less b/pc4mobx/hrmSalary/pages/payrollRelease/index.less
index 245c991f..634a44e4 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/index.less
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/index.less
@@ -27,6 +27,7 @@
.salary-payroll-content {
padding: 8px 16px;
height: 100%;
+ overflow-y: auto;
& > .wea-search-group {
background: #FFF;
@@ -157,7 +158,7 @@
margin-left: 10px;
position: absolute;
top: 25%;
- right: -208px;
+ right: -262px;
margin-top: -2px;
.sftv-item {
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/condition.js b/pc4mobx/hrmSalary/pages/reportView/components/condition.js
index f0c3b8e6..0cda350a 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/condition.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/condition.js
@@ -91,36 +91,36 @@ export const condition = [
labelcol: 6,
viewAttr: 2
},
- // {
- // browserConditionParam: {
- // completeParams: {},
- // conditionDataParams: {},
- // dataParams: {},
- // destDataParams: {},
- // hasAddBtn: false,
- // hasAdvanceSerach: true,
- // idSeparator: ",",
- // isAutoComplete: 1,
- // isDetail: 0,
- // isMultCheckbox: false,
- // isSingle: false,
- // linkUrl: "",
- // pageSize: 10,
- // quickSearchName: "",
- // replaceDatas: [],
- // title: getLabel(111, "岗位"),
- // type: "278",
- // viewAttr: 2
- // },
- // colSpan: 2,
- // conditionType: "BROWSER",
- // domkey: ["position"],
- // fieldcol: 18,
- // isQuickSearch: false,
- // label: getLabel(111, "岗位"),
- // labelcol: 6,
- // viewAttr: 2
- // },
+ {
+ browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: true,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: false,
+ linkUrl: "",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: getLabel(111, "岗位"),
+ type: "278",
+ viewAttr: 2
+ },
+ colSpan: 2,
+ conditionType: "BROWSER",
+ domkey: ["position"],
+ fieldcol: 18,
+ isQuickSearch: false,
+ label: getLabel(111, "岗位"),
+ labelcol: 6,
+ viewAttr: 2
+ },
{
browserConditionParam: {
completeParams: {},
@@ -403,8 +403,8 @@ export const mapBarOptions = (params) => ({
},
grid: {
top: "10%",
- right: "0%",
- left: "5%",
+ right: "2%",
+ left: "2%",
bottom: "10%",
containLabel: true
},
@@ -457,8 +457,9 @@ export const mapBarOptions = (params) => ({
series: _.map(params.data, (item, index) => {
return {
name: item.name,
- barWidth: "32",
- barGap: "0%",
+ barMaxWidth: 30,
+ barMinWidth: 10,
+ barGap: 0,
data: _.map(item.data, (it) => it.replace(/,/g, "")),
type: "bar",
itemStyle: {
@@ -484,6 +485,10 @@ export const mapBarOptions = (params) => ({
];
}
},
+ textStyle: {
+ textShadowColor: "transparent",
+ color: "#fff"
+ },
rich: {
a: {
fontWeight: "bold",
@@ -501,8 +506,9 @@ export const mapBarOptions = (params) => ({
}),
dataZoom: [
{
- type: "inside"
-
+ type: "inside",
+ start: params.xAxis.length <= 7 ? 0 : 25,
+ end: params.xAxis.length <= 7 ? 100 : 75,
},
{
type: "slider",
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
index 6a80e8fb..aa5f1bed 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
@@ -36,8 +36,8 @@ class PovitpivotChartModal extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
- const { id, dimensionId, dimensionValue, isShare } = nextProps;
- this.getDataPerspective({ id, dimensionId, dimensionValue, isShare });
+ const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = nextProps;
+ this.getDataPerspective({ id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth });
} else {
this.setState({
dataSource: [],
@@ -64,11 +64,11 @@ class PovitpivotChartModal extends Component {
});
} else if (type === "turn") {
if (id === "PAGEINFO") {
- const { id, dimensionId, dimensionValue, isShare } = this.props;
+ const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = this.props;
const { pageNum: current, size: pageSize } = params;
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
this.getDataPerspective({
- id, dimensionId, dimensionValue, isShare
+ id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth
}));
}
}
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
index a7808410..9716234a 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
@@ -5,8 +5,8 @@
* Date: 2023/4/21
*/
import React, { Component } from "react";
-import { Spin } from "antd";
-import { WeaEchart } from "ecCom";
+import { message, Spin } from "antd";
+import { WeaEchart, WeaLocaleProvider } from "ecCom";
import RightOptions from "./rightOptions";
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition";
@@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal";
import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide";
import "../index.less";
+const getLabel = WeaLocaleProvider.getLabel;
+
class ReportContent extends Component {
constructor(props) {
super(props);
@@ -27,13 +29,14 @@ class ReportContent extends Component {
chartsType: "0",
chartsInfo: {},
povitView: {
- visible: false, id: "", isShare: false,
- dimensionId: "", dimensionValue: ""
+ visible: false, id: "", isShare: false, dimensionId: "", dimensionValue: "", salaryStartMonth: "",
+ salaryEndMonth: ""
},
rangSet: {
visible: false, reportId: "",
rangeVal: {}
- }
+ },
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
@@ -56,9 +59,9 @@ class ReportContent extends Component {
handleReceive = ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
- const { columns, countResult, dataSource } = this.state;
+ const { columns, countResult, dataSource, pageInfo } = this.state;
this.postMessageToChild({
- columns, countResult, dataSource,
+ columns, countResult, dataSource, pageInfo,
showSum: !_.isEmpty(countResult)
});
} else if (type === "turn") {
@@ -66,36 +69,49 @@ class ReportContent extends Component {
if (id === "PIVOTCHART") {
const { record } = params;
const { dimension: dimensionValue } = record;
- const { id: pivotId, dimensionId, isShare } = this.props.report;
+ const {
+ id: pivotId, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start
+ } = this.props.report;
+ const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
+
this.setState({
povitView: {
- visible: true, id: pivotId, dimensionId, dimensionValue, isShare
+ visible: true, id: pivotId, dimensionId, dimensionValue, isShare,
+ salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
}
});
+ } else if (id === "PAGEINFO_REPORT") {
+ this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report));
}
}
};
postMessageToChild = (payload) => {
+ const i18n = {
+ "共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
+ "总计": getLabel(523, "总计")
+ };
const childFrameObj = document.getElementById("atdTable");
- const { dataSource, columns, showSum, countResult } = payload;
+ const { dataSource, columns, showSum, countResult, pageInfo } = payload;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, showSum, countResult
+ dataSource, columns, showSum, countResult, i18n, pageInfo
}), "*");
};
reportStatisticsReportGetData = (params) => {
- const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
+ const { pageInfo } = this.state;
+ const { id, dimension, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
const payload = {
- id, dimensionId, isShare,
+ id, dimensionId, isShare, ...pageInfo,
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
};
this.setState({ loading: true });
reportStatisticsReportGetData(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status && id.toString() === data.reportId.toString()) {
- const { countResult, columns, pageInfo: { list } } = data;
+ const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data;
this.setState({
- countResult,
+ countResult, dataSource: list || [],
+ pageInfo: dimension === getLabel(111, "人员") ? { ...pageInfo, current: pageNum, pageSize, total } : null,
columns: _.map(columns, it => ({
...it,
dataIndex: it.column, width: it.width ? it.width + "px" : 150,
@@ -105,12 +121,11 @@ class ReportContent extends Component {
dataIndex: child.column, width: child.width ? child.width + "px" : 150,
title: child.text, align: "center"
})) : []
- })),
- dataSource: list || []
+ }))
}, () => {
this.postMessageToChild({
columns: this.state.columns, countResult: this.state.countResult,
- dataSource: this.state.dataSource,
+ dataSource: this.state.dataSource, pageInfo: this.state.pageInfo,
showSum: !_.isEmpty(this.state.countResult)
});
});
@@ -195,6 +210,11 @@ class ReportContent extends Component {
}).catch(() => this.setState({ loading: false }));
};
handleChangeChartOpts = (chartsType, viewType) => {
+ const { loading } = this.state;
+ if (loading) {
+ message.info(getLabel(111, "列表正在加载中,请稍后"));
+ return;
+ }
this.setState({ chartsInfo: {} });
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
const { report: { id: reportId } } = this.props;
@@ -267,7 +287,7 @@ class ReportContent extends Component {
onCancel={() => this.setState({
povitView: {
visible: false, id: "", dimensionId: "", dimensionValue: "",
- isShare: false
+ isShare: false, salaryStartMonth: "", salaryEndMonth: ""
}
})}
/>
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
index 6b2e496c..45ee98bb 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
@@ -71,7 +71,7 @@ class StatisticalMicroSettingsSlide extends Component {
getTaxAgentSelectList = async (props) => {
const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]);
- getTaxAgentSelectList(true).then(({ status, data }) => {
+ getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
if (status) {
const conditions = _.map(condition, item => {
return {
@@ -149,7 +149,7 @@ class StatisticalMicroSettingsSlide extends Component {
hiredate: extra["hiredate1__hiredate2"].value || [],
department: _.map(department.valueObj, it => ({ id: it.id, name: it.name })),
employee: _.map(employee.valueObj, it => ({ id: it.id, name: it.name })),
- // position: _.map(position.valueObj, it => ({ id: it.id, name: it.name })),
+ position: _.map(position.valueObj, it => ({ id: it.id, name: it.name })),
subCompany: _.map(subCompany.valueObj, it => ({ id: it.id, name: it.name })),
taxAgent: value ? _.map(value.split(","), (it, idx) => ({ id: it, name: valueSpan.split(",")[idx] })) : [],
status: statusVal ? _.map(statusVal.split(","), (it, idx) => ({
@@ -412,7 +412,10 @@ const StatisticalScopePicker = (props) => {
{
- return current && endDate && current.getTime() > new Date(endDate).getTime();
+ if (!current || !endDate) return false;
+ const tooEarly = moment(current.getTime()).isBefore(moment(endDate).subtract(12, "month"));
+ const tooLate = moment(current.getTime()).isAfter(moment(endDate));
+ return !!tooEarly || !!tooLate;
}}
format="YYYY-MM"
onChange={(val) => onChange([val, endDate], timeType)}
@@ -422,7 +425,10 @@ const StatisticalScopePicker = (props) => {
{
- return current && startDate && current.getTime() < new Date(startDate).getTime();
+ if (!current || !startDate) return false;
+ const tooEarly = moment(current.getTime()).isAfter(moment(startDate).add(12, "month"));
+ const tooLate = moment(current.getTime()).isBefore(moment(startDate));
+ return !!tooEarly || !!tooLate;
}}
format="YYYY-MM"
viewAttr={viewAttr}
diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js
index 82f935e5..4d01e7c0 100644
--- a/pc4mobx/hrmSalary/pages/reportView/index.js
+++ b/pc4mobx/hrmSalary/pages/reportView/index.js
@@ -6,13 +6,12 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
-import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
+import { WeaLeftRightLayout, WeaLoadingGlobal, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
import { message, Modal } from "antd";
import LeftTab from "./components/leftTab";
import ReportContent from "./components/reportContent";
import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide";
-import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
-import { convertToUrlString } from "../../util/url";
+import { exportDataReport, reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
import TopBtns from "./components/topBtns";
import "./index.less";
@@ -92,6 +91,10 @@ class Index extends Component {
* Date: 2023/4/24
*/
exportData = () => {
+ if (this.reportRef.state.loading) {
+ message.info(getLabel(111, "列表正在加载中,请稍后"));
+ return;
+ }
const { report } = this.state;
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report;
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
@@ -99,7 +102,8 @@ class Index extends Component {
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");
+ WeaLoadingGlobal.start();
+ const promise = exportDataReport(payload);
};
render() {
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
index 59ed5b5e..6bc04d8c 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
@@ -1,16 +1,28 @@
-import React from "react";
-import { WeaLocaleProvider } from "ecCom";
-
-const getLabel = WeaLocaleProvider.getLabel;
-
export const conditions = [
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["rule"],
+ fieldcol: 10,
+ label: "人员字段",
+ lanId: 543352,
+ labelcol: 8,
+ options: [],
+ viewAttr: 2
+ }
+ ],
+ title: "人员校验规则",
+ lanId: 543357,
+ defaultshow: true
+ },
{
items: [
{
conditionType: "SELECT",
domkey: ["orderRule"],
fieldcol: 10,
- label: getLabel(15512, "排序字段"),
+ label: "排序字段",
lanId: 15512,
labelcol: 8,
options: [],
@@ -20,47 +32,30 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["ascOrDesc"],
fieldcol: 10,
- label: getLabel(543351, "正序/倒序"),
+ label: "正序/倒序",
lanId: 543351,
labelcol: 8,
options: [],
viewAttr: 2
}
],
- title: getLabel(543356, "排序规则"),
+ title: "排序规则",
lanId: 543356,
defaultshow: true
},
- {
- items: [
- {
- conditionType: "SELECT",
- domkey: ["rule"],
- fieldcol: 10,
- label: getLabel(543352, "人员字段"),
- lanId: 543352,
- labelcol: 8,
- options: [],
- viewAttr: 2
- }
- ],
- title: getLabel(543357, "人员校验规则"),
- lanId: 543357,
- defaultshow: true
- },
{
items: [
{
conditionType: "SWITCH",
domkey: ["OPEN_APPLICATION_ENCRYPT"],
fieldcol: 10,
- label: getLabel(526997, "加密设置"),
+ label: "加密设置",
lanId: 526997,
labelcol: 8,
viewAttr: 2
}
],
- title: getLabel(543358, "加密规则"),
+ title: "加密规则",
lanId: 543358,
defaultshow: true
},
@@ -68,24 +63,58 @@ export const conditions = [
items: [
{
conditionType: "SWITCH",
- domkey: ["taxDeclarationFunction"],
+ domkey: ["salaryShowStatus"],
fieldcol: 10,
- label: getLabel(111, "系统算税"),
+ label: "显示工资单页签",
lanId: 111,
labelcol: 8,
- viewAttr: 1
+ viewAttr: 2
},
{
conditionType: "SWITCH",
- domkey: ["WITHDRAW_TAX_DECLARATION"],
+ domkey: ["adjustShowStatus"],
fieldcol: 10,
- label: getLabel(111, "撤回申报表"),
+ label: "显示调薪记录页签",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["taxAgentShowStatus"],
+ fieldcol: 10,
+ label: "显示【个税扣缴义务人】信息",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
- title: getLabel(111, "算税规则"),
+ title: "我的薪资福利设置",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["welBaseDiffByPerAndCom"],
+ fieldcol: 10,
+ label: "区分个人和公司",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["welBaseAutoAdjust"],
+ fieldcol: 10,
+ label: "导入基数自动调整上/下限",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "福利档案基数",
lanId: 111,
defaultshow: true
},
@@ -95,167 +124,110 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["salaryArchiveDelete"],
fieldcol: 10,
- label: getLabel(111, "允许删除档案"),
+ label: "允许删除档案",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
- title: getLabel(538004, "薪资档案"),
+ title: "薪资档案",
lanId: 538004,
defaultshow: true
},
- {
- items: [
- {
- conditionType: "SWITCH",
- domkey: ["welBaseDiffByPerAndCom"],
- fieldcol: 10,
- label: getLabel(111, "区分个人和公司"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- },
- {
- conditionType: "SWITCH",
- domkey: ["welBaseAutoAdjust"],
- fieldcol: 10,
- label: getLabel(111, "导入基数自动调整上/下限"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "福利档案基数"),
- lanId: 111,
- defaultshow: true
- },
{
items: [
{
conditionType: "SELECT",
domkey: ["matchRule"],
fieldcol: 10,
- label: getLabel(111, "匹配规则"),
+ label: "匹配规则",
+ lanId: 111,
+ options: [],
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["salaryAcctFixedColumns"],
+ fieldcol: 10,
+ label: "固定数",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "薪资核算",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["taxDeclarationFunction"],
+ fieldcol: 10,
+ label: "系统算税",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 1
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["WITHDRAW_TAX_DECLARATION"],
+ fieldcol: 10,
+ label: "撤回申报表",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "算税规则",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["REPORT_ORGANIZATIN_TYPE"],
+ fieldcol: 10,
+ label: "组织信息",
+ lanId: 111,
+ options: [],
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"],
+ fieldcol: 10,
+ label: "薪资明细显示模式",
lanId: 111,
options: [],
labelcol: 8,
viewAttr: 2
}
],
- title: getLabel(111, "薪资核算人员匹配规则"),
- lanId: 111,
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "INPUTNUMBER",
- domkey: ["salaryAcctFixedColumns"],
- fieldcol: 10,
- label: getLabel(111, "固定数"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "薪资核算固定列头数"),
- lanId: 111,
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SWITCH",
- domkey: ["extEmpsWitch"],
- fieldcol: 10,
- label: getLabel(111, "开启非系统人员"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "非系统人员"),
- lanId: 111,
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SWITCH",
- domkey: ["salaryShowStatus"],
- fieldcol: 10,
- label: getLabel(111, "显示工资单页签"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- },
- {
- conditionType: "SWITCH",
- domkey: ["adjustShowStatus"],
- fieldcol: 10,
- label: getLabel(111, "显示调薪记录页签"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- },
- {
- conditionType: "SWITCH",
- domkey: ["taxAgentShowStatus"],
- fieldcol: 10,
- label: getLabel(111, "显示【个税扣缴义务人】信息"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "我的薪资福利设置"),
- lanId: 111,
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SWITCH",
- domkey: ["SALARY_APPROVAL_STATUS"],
- fieldcol: 10,
- label: getLabel(111, "薪资审批"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- },
- {
- conditionType: "SWITCH",
- domkey: ["APPROVAL_CAN_MANUAL_FILE_STATUS"],
- fieldcol: 10,
- label: getLabel(111, "开启审批的核算记录允许手动归档"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- },
- {
- conditionType: "SWITCH",
- domkey: ["APPROVAL_CAN_RE_CALC_STATUS"],
- fieldcol: 10,
- label: getLabel(111, "开启审批的核算记录允许重新核算"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- },
- {
- conditionType: "SWITCH",
- domkey: ["APPROVAL_CAN_EDIT_RESULT_STATUS"],
- fieldcol: 10,
- label: getLabel(111, "审批流程发起后允许修改核算数据"),
- lanId: 111,
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "薪资审批设置"),
+ title: "薪资报表",
lanId: 111,
defaultshow: true
}
+ // {
+ // items: [
+ // {
+ // conditionType: "SWITCH",
+ // domkey: ["extEmpsWitch"],
+ // fieldcol: 10,
+ // label: "开启非系统人员",
+ // lanId: 111,
+ // labelcol: 8,
+ // viewAttr: 2
+ // }
+ // ],
+ // title: "非系统人员",
+ // lanId: 111,
+ // defaultshow: true
+ // },
];
export const payloadList = [
{ enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" },
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/form.js b/pc4mobx/hrmSalary/pages/ruleConfig/form.js
index c1308ec4..9b17f248 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/form.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/form.js
@@ -1,7 +1,9 @@
import React from "react";
-import { WeaFormItem, WeaSearchGroup } from "ecCom";
+import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaSwitch } from "comsMobx";
+const getKey = WeaTools.getKey;
+
export const renderRuleForm = (form, condition, onChange) => {
const { isFormInit } = form;
const formParams = form.getFormParams();
@@ -15,7 +17,11 @@ export const renderRuleForm = (form, condition, onChange) => {
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom">
-
+ getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)}
+ onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })}
+ />
),
colSpan: 1,
hide: fields.hide
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.less b/pc4mobx/hrmSalary/pages/ruleConfig/index.less
index a4599477..a7a7c267 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/index.less
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.less
@@ -3,7 +3,7 @@
overflow: hidden !important;
.ruleWrapper {
- padding: 16px;
+ padding: 8px 16px 0;
background: #e5e5e5;
height: 100%;
overflow: hidden auto;
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
index 7b6bf93c..431f9030 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
@@ -10,10 +10,10 @@ import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom";
import { message, Modal } from "antd";
import * as API from "../../apis/ruleconfig";
import { conditions, payloadList } from "./conditions";
+import ProgressModal from "../../components/progressModal";
import { renderRuleForm } from "./form";
import { getConditionDomkeys } from "../../util";
import "./index.less";
-import ProgressModal from "../../components/progressModal";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -25,6 +25,7 @@ class RuleConfig extends Component {
super(props);
this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 };
this.timer = null;
+ this.handleDebounce = null;
}
componentDidMount() {
@@ -40,28 +41,30 @@ class RuleConfig extends Component {
sysinfo, conditions: _.map(conditions, item => ({
...item, title: getLabel(item.lanId, item.title),
items: _.map(item.items, o => {
+ o = { ...o, label: getLabel(o.lanId, o.label) };
if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") {
+ return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
+ } else if (getKey(o) === "REPORT_ORGANIZATIN_TYPE") {
return {
- ...o, label: getLabel(o.lanId, o.label),
- options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel }))
+ ...o, options: [
+ { key: "0", showname: getLabel(111, "核算时组织信息"), selected: true },
+ { key: "1", showname: getLabel(111, "实时组织信息"), selected: false }
+ ]
+ };
+ } else if (getKey(o) === "SALARY_DETAILS_REPORT_SHOW_TYPE") {
+ return {
+ ...o, options: [
+ { key: "0", showname: getLabel(111, "定制列"), selected: true },
+ { key: "1", showname: getLabel(111, "模板"), selected: false }
+ ]
};
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
- return {
- ...o, label: getLabel(o.lanId, o.label),
- viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1
- };
+ return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
} else if (getKey(o) === "taxDeclarationFunction") {
return {
- ...o, label: getLabel(o.lanId, o.label),
+ ...o,
viewAttr: (_.isNil(sysinfo.taxDeclarationFunction) || sysinfo.taxDeclarationFunction !== "0") ? 2 : 1
};
- } else if (
- getKey(o) === "APPROVAL_CAN_MANUAL_FILE_STATUS" || getKey(o) === "APPROVAL_CAN_RE_CALC_STATUS" || getKey(o) === "APPROVAL_CAN_EDIT_RESULT_STATUS"
- ) {
- return {
- ...o, label: getLabel(o.lanId, o.label),
- hide: sysinfo["SALARY_APPROVAL_STATUS"] === "0" || _.isNil(sysinfo["SALARY_APPROVAL_STATUS"])
- };
}
return { ...o, label: getLabel(o.lanId, o.label) };
})
@@ -81,7 +84,9 @@ class RuleConfig extends Component {
} else if (item === "matchRule") {
form.updateFields({ [item]: { value: sysinfo["salaryAcctEmployeeRule"] || "" } });
} else if (item === "taxDeclarationFunction") {
- form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } });
+ form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "1") } });
+ } else if (item === "REPORT_ORGANIZATIN_TYPE" || item === "SALARY_DETAILS_REPORT_SHOW_TYPE") {
+ form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "0") } });
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
} else if (item === "OPEN_APPLICATION_ENCRYPT") {
@@ -133,24 +138,26 @@ class RuleConfig extends Component {
case "taxAgentShowStatus":
case "salaryShowStatus":
case "adjustShowStatus":
- case "SALARY_APPROVAL_STATUS":
- case "APPROVAL_CAN_MANUAL_FILE_STATUS":
- case "APPROVAL_CAN_RE_CALC_STATUS":
- case "APPROVAL_CAN_EDIT_RESULT_STATUS":
- const confTitle = {
- welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
- welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
- salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
- extEmpsWitch: getLabel(544097, "开启非系统人员"),
- taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
- salaryShowStatus: getLabel(111, "显示工资单页签"),
- adjustShowStatus: getLabel(111, "显示调薪记录页签"),
- SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"),
- APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"),
- APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"),
- APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据")
- };
- this.unifiedSettings(key, confTitle[key]);
+ case "REPORT_ORGANIZATIN_TYPE":
+ case "SALARY_DETAILS_REPORT_SHOW_TYPE":
+ if (!this.handleDebounce) {
+ this.handleDebounce = _.debounce(() => {
+ const confTitle = {
+ welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
+ welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
+ salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
+ extEmpsWitch: getLabel(544097, "开启非系统人员"),
+ taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
+ salaryShowStatus: getLabel(111, "显示工资单页签"),
+ adjustShowStatus: getLabel(111, "显示调薪记录页签"),
+ REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息"),
+ SALARY_DETAILS_REPORT_SHOW_TYPE: getLabel(111, "薪资明细显示模式")
+ };
+ this.unifiedSettings(key, confTitle[key]);
+ this.handleDebounce = null;
+ }, 500);
+ }
+ this.handleDebounce();
break;
default:
break;
@@ -317,20 +324,6 @@ class RuleConfig extends Component {
API.saveSysOperate(payload).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(22619, "保存成功!"));
- if (confKey === "SALARY_APPROVAL_STATUS") {
- this.setState({
- conditions: _.map(this.state.conditions, item => ({
- ...item, items: _.map(item.items, o => {
- if (
- getKey(o) === "APPROVAL_CAN_MANUAL_FILE_STATUS" || getKey(o) === "APPROVAL_CAN_RE_CALC_STATUS" || getKey(o) === "APPROVAL_CAN_EDIT_RESULT_STATUS"
- ) {
- return { ...o, hide: form.getFormParams()[confKey] === "0" };
- }
- return { ...o };
- })
- }))
- });
- }
} else {
message.error(errormsg || getLabel(22620, "保存失败!"));
}
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js
index a46b7129..6975ee63 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js
@@ -16,7 +16,7 @@ import {
} from "../../apis/archive";
import { inject, observer } from "mobx-react";
import { adjCondition } from "./columns";
-import { getDomkes, getSearchs } from "../../util";
+import { getDomkes, getSearchs, toDecimal_n } from "../../util";
import moment from "moment";
const { getLabel } = WeaLocaleProvider;
@@ -149,7 +149,10 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component {
let payload = {
...adjForm.getFormParams(), salaryArchiveId,
effectiveTime: moment(new Date(adjForm.getFormParams().effectiveTime)).format("YYYY-MM-DD"),
- salaryArchiveItems: _.map(list, o => ({ salaryItemId: o.salaryItem, adjustValue: o.adjustAfter }))
+ salaryArchiveItems: _.map(list, o => ({
+ salaryItemId: o.salaryItem,
+ adjustValue: o.dataType === "number" ? toDecimal_n(o.adjustAfter, o.pattern) : o.adjustAfter
+ }))
};
if (salaryArchiveItemId) {
payload = { ...payload, canOperator, salaryArchiveItemId };
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
index e34b5431..b2cae4bd 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
@@ -128,13 +128,14 @@ export const salaryItemFields = [
viewAttr: 2,
tip: ""
},
- // {
- // key: "defaultValue",
- // label: "默认值",
- // type: "INPUT",
- // viewAttr: 2,
- // tip: ""
- // },
+ {
+ key: "defaultValue",
+ label: "默认值",
+ type: "INPUT",
+ viewAttr: 2,
+ precision: 2,
+ tip: ""
+ },
{
key: "formulaContent",
label: "公式",
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js
index 4be1e225..f6898090 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js
@@ -1,9 +1,8 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
-import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
-import { renderLoading } from "../../util";
-import CustomTab from "../../components/customTab";
+import { WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
+import { renderLoading, toDecimal_n } from "../../util";
import SystemSalaryItemModal from "./systemSalaryItemModal";
import { columns } from "./columns";
import SlideModalTitle from "../../components/slideModalTitle";
@@ -12,6 +11,8 @@ import CustomPaginationTable from "../../components/customPaginationTable";
import SyncToSalaryAccountSetDialog from "./syncToSalaryAccountSetDialog";
import "../socialSecurityBenefits/programme/index.less";
import LogDialog from "../../components/logViewModal";
+import SalaryItemImportDialog from "./salaryItemImport";
+import * as API from "../../apis/item";
const { getLabel } = WeaLocaleProvider;
@inject("salaryItemStore", "taxAgentStore", "salaryFileStore")
@@ -29,7 +30,8 @@ export default class SalaryItem extends React.Component {
searchParams: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: [],
syncSalarySetDialog: { visible: false, title: "", id: "" },
- logDialogVisible: false, filterConditions: "[]"
+ logDialogVisible: false, filterConditions: "[]",
+ salaryItemImpDialog: { visible: false, title: getLabel(24023, "数据导入") }
};
columns.map(item => {
if (item.dataIndex == "refere") {
@@ -213,6 +215,19 @@ export default class SalaryItem extends React.Component {
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
});
break;
+ case "export":
+ WeaLoadingGlobal.start();
+ const { selectedRowKeys } = this.state;
+ const promise = API.exportSalaryitem({ ids: selectedRowKeys });
+ WeaLoadingGlobal.destroy();
+ break;
+ case "import":
+ this.setState({
+ salaryItemImpDialog: {
+ ...this.state.salaryItemImpDialog, visible: true
+ }
+ });
+ break;
default:
break;
}
@@ -220,12 +235,10 @@ export default class SalaryItem extends React.Component {
render() {
const {
- salaryItemStore,
- salaryFileStore,
- taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
+ salaryItemStore, salaryFileStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
} = this.props;
const { userStatusList } = salaryFileStore;
- const { selectedRowKeys, logDialogVisible, filterConditions } = this.state;
+ const { selectedRowKeys, logDialogVisible, filterConditions, salaryItemImpDialog } = this.state;
const { loading, deleteItemRequest, getTableDatas } = salaryItemStore;
const {
tableDataSource,
@@ -257,51 +270,36 @@ export default class SalaryItem extends React.Component {
);
- const renderRightOperation = () => {
- return (
- {
- (showOperateBtn || showSalaryItemBtn) &&
- handleMenuClick({ key: "1" })}
- style={{ marginRight: "10px" }}>{getLabel(111, "新增自定义薪资项")}
+ const buttons = [
+ handleMenuClick({ key: "1" })}>{getLabel(111, "新增自定义薪资项")},
+
);
-
- };
-
+ });
+ }
+ });
+ }}>{getLabel(32136, "批量删除")},
+ this.setState({ searchValue: value })}
+ onSearch={value => this.handleSearch(value)}/>
+ ];
// 新建和修改保存的回调
const handleSlideSave = (continueFlag) => {
const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props;
@@ -314,16 +312,21 @@ export default class SalaryItem extends React.Component {
});
return;
}
- saveItem(payload, continueFlag).then(() => {
- getTableDatas({ ...this.state.searchParams }).then(res => {
- this.setState({
- searchParams: {
- ...this.state.searchParams,
- total: res.total
- }
+ const { pattern, defaultValue, dataType, ...extra } = payload;
+ saveItem({
+ ...extra, pattern, dataType,
+ defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue
+ }, continueFlag)
+ .then(() => {
+ getTableDatas({ ...this.state.searchParams }).then(res => {
+ this.setState({
+ searchParams: {
+ ...this.state.searchParams,
+ total: res.total
+ }
+ });
});
});
- });
};
const renderCustomOperate = () => {
@@ -362,23 +365,31 @@ export default class SalaryItem extends React.Component {
};
const rowSelection = {
selectedRowKeys,
- onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }),
- getCheckboxProps: record => ({
- disabled: !record.canDelete // Column configuration not to be checked
- })
+ onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
+ // getCheckboxProps: record => ({
+ // disabled: !record.canDelete // Column configuration not to be checked
+ // })
};
return (
} iconBgcolor="#F14A2D"
showDropIcon onDropMenuClick={this.onDropMenuClick}
dropMenuDatas={[
+ {
+ key: "import",
+ icon:
,
+ content: getLabel(111, "导入")
+ },
+ {
+ key: "export",
+ icon:
,
+ content: getLabel(111, "导出")
+ },
{
key: "log", icon:
,
content: getLabel(545781, "操作日志")
}
- ]}
- >
-
+ ]} buttons={(showOperateBtn || showSalaryItemBtn) ? buttons : buttons.slice(-1)}>
this.setState({ logDialogVisible: false })}/>
+ {/* 导入*/}
+ {
+ this.setState({
+ salaryItemImpDialog: { ...salaryItemImpDialog, visible: false }
+ }, () => callback && this.handleSearch(this.state.searchValue));
+ }}/>
{
systemItemVisible &&
{
- // if (key === "valueType" && !this.props.isLedger) {
- // onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
- // } else {
- onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
- // }
+ if (key === "dataType") {
+ onChangeFieldsItem({ [key]: v, defaultValue: "" });
+ } else {
+ onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
+ }
});
};
@@ -148,7 +150,7 @@ class SalaryItemForm extends Component {
{
_.map(salaryItemFieldsList, item => {
- const { key, label, type, viewAttr, tip, options, display = true, multiple = false } = item;
+ const { key, label, type, viewAttr, tip, options, display = true, multiple = false, precision = 0 } = item;
const value = !_.isNil(request[key]) ? request[key].toString() : "";
return
{
@@ -181,9 +183,10 @@ class SalaryItemForm extends Component {
(type === "INPUTNUMBER" && display) ?
- this.handleChangeSalaryFiledItems(key, v)}/>
+ this.handleChangeSalaryFiledItems(key, v)}/>
{key === "width" && display &&
px}
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemImport/index.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemImport/index.js
new file mode 100644
index 00000000..32a622a8
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemImport/index.js
@@ -0,0 +1,87 @@
+/*
+ * 薪资项目导入
+ *
+ * @Author: 黎永顺
+ * @Date: 2024/8/7
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaCheckbox, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
+import ImportDialog from "../../../components/importDialog";
+import * as API from "../../../apis/item";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ importDialog: {
+ nextloading: false, link: null, importResult: {}, imageId: "",
+ previewUrl: "/api/bs/hrmsalary/salaryitem/preview", hasData: false
+ }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ this.setState({ importDialog: { ...this.state.importDialog, link: this.handleExportTemp } });
+ } else {
+ this.setState({
+ importDialog: {
+ nextloading: false, link: null, importResult: {}, imageId: "",
+ previewUrl: "/api/bs/hrmsalary/salaryitem/preview", hasData: false
+ }
+ });
+ }
+ }
+
+ handleExportTemp = () => {
+ const { importDialog } = this.state;
+ const { hasData } = importDialog;
+ WeaLoadingGlobal.start();
+ const promise = API.downloadTemplate({ hasData });
+ WeaLoadingGlobal.destroy();
+ };
+ handleImport = (payload) => {
+ const { importDialog } = this.state, { isExtEmp } = this.props;
+ const { extraPreview } = importDialog;
+ this.setState({ importDialog: { ...importDialog, nextloading: true } });
+ API.importSalaryitem({ ...payload, ...extraPreview, isExtEmp }).then(({ data, status }) => {
+ this.setState({ importDialog: { ...importDialog, nextloading: false } });
+ if (status) {
+ this.setState({
+ importDialog: { ...importDialog, ...payload, importResult: data }
+ });
+ }
+ }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
+ };
+
+ render() {
+ const { importDialog } = this.state;
+ return (
+ this.setState({
+ importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
+ })}
+ exportDataDom={
+ {
+ this.setState({ importDialog: { ...importDialog, hasData: val === "1" } });
+ }}
+ />
+ }
+ nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
+ nextUplaodCallback={imageId => this.handleImport({ imageId })}
+ />
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js
index 16dd0855..4a702b64 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js
@@ -16,17 +16,13 @@ import moment from "moment";
const getLabel = WeaLocaleProvider.getLabel;
const getKey = WeaTools.getKey;
-@inject("standingBookStore")
-@observer
+@inject("standingBookStore") @observer
class WelfareRecordQuery extends Component {
constructor(props) {
super(props);
this.state = {
conditions: [],
- dateRange: [
- moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
- moment(new Date()).endOf("year").format("YYYY-MM")
- ]
+ dateRange: [moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"), moment(new Date()).endOf("year").format("YYYY-MM")]
};
}
@@ -36,8 +32,7 @@ class WelfareRecordQuery extends Component {
this.setState({
conditions: _.map(welfareRQConditions, item => {
return {
- ...item,
- items: _.map(item.items, o => {
+ ...item, items: _.map(item.items, o => {
if (getKey(o) === "taxAgents") {
return { ...o, options: _.map(data, g => ({ key: g.id.toString(), showname: g.name })) };
}
@@ -63,28 +58,22 @@ class WelfareRecordQuery extends Component {
let items = [];
c.items.map(fields => {
items.push({
- com: (
-
-
- )
+ com: (
+
+ )
});
});
- group.push(
-
- this.setState({ dateRange: v }, () => this.getWelfareRecordList())}/>
- )
- },
- ...items
- ]}
- />);
+ group.push(
+ this.setState({ dateRange: v }, () => this.getWelfareRecordList())}/>
+ )
+ }, ...items]}
+ />);
});
return group;
};
@@ -101,9 +90,7 @@ class WelfareRecordQuery extends Component {
render() {
const { standingBookStore: { welfareRQForm } } = this.props;
const { conditions } = this.state;
- return (
- {this.renderForm(welfareRQForm, conditions)}
- );
+ return ({this.renderForm(welfareRQForm, conditions)}
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less
index 38dae0ed..8da302a1 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less
@@ -57,24 +57,22 @@
//社保福利台账页面重构
.salary-welfare-record {
- min-width: 1000px;
- overflow: auto;
- width: 100%;
- height: 100%;
- background: #f6f6f6;
-
.salary-welfare-record-content {
width: 100%;
height: 100%;
- padding: 8px 16px;
+ padding: 8px 16px 0 16px;
+ background: #F6F6F6;
display: flex;
flex-direction: column;
.salary-welfare-record-query {
width: 100%;
+ padding: 0 8px;
+ margin-bottom: 8px;
height: 46px;
display: flex;
align-items: center;
+ background: #FFF;
.wea-search-group {
width: 100%;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js
index f4089c44..80083d56 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js
@@ -123,50 +123,45 @@ class StandingBook extends Component {
const rightBtns = [ this.setState({
accountDialog: { ...accountDialog, visible: true, title: getLabel(538780, "核算") }
})}>{getLabel(538780, "核算")}];
- return (
-
-
}
- iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []}
- showDropIcon onDropMenuClick={this.onDropMenuClick}
- dropMenuDatas={[
- {
- key: "log", icon:
,
- content: getLabel(545781, "操作日志")
- }
- ]}
- >
-
- {
- this.setState({
- queryForm: { ...queryForm, ...payload }
- }, () => this.wfListRef.wrappedInstance.getWelfareRecordList());
- }}
- onPutAccountOptions={options => this.setState({ accountDialog: { ...accountDialog, options } })}
- />
- this.wfListRef = dom} queryForm={queryForm}
- onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
-
-
this.setState({
- accountDialog: { ...accountDialog, visible: false, title: "", loading: false }
- })} onOk={this.handleAccount}
- />
- {/*操作日志*/}
- this.setState({ logDialogVisible: false })}/>
- {/*核算进度条*/}
- {
- this.state.progressVisible &&
- {
- this.setState({ progressVisible: false, progress: 0 }, () => clearInterval(this.timer));
- }}
- />
- }
-
+ return (}
+ iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []} className="salary-welfare-record"
+ showDropIcon onDropMenuClick={this.onDropMenuClick}
+ dropMenuDatas={[
+ {
+ key: "log", icon: ,
+ content: getLabel(545781, "操作日志")
+ }
+ ]}>
+
+ {
+ this.setState({
+ queryForm: { ...queryForm, ...payload }
+ }, () => this.wfListRef.wrappedInstance.getWelfareRecordList());
+ }}
+ onPutAccountOptions={options => this.setState({ accountDialog: { ...accountDialog, options } })}
+ />
+ this.wfListRef = dom} queryForm={queryForm}
+ onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
- );
+ this.setState({
+ accountDialog: { ...accountDialog, visible: false, title: "", loading: false }
+ })} onOk={this.handleAccount}
+ />
+ {/*操作日志*/}
+ this.setState({ logDialogVisible: false })}/>
+ {/*核算进度条*/}
+ {
+ this.state.progressVisible &&
+ {
+ this.setState({ progressVisible: false, progress: 0 }, () => clearInterval(this.timer));
+ }}
+ />
+ }
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
index b1271972..979cccc9 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
@@ -62,7 +62,6 @@ class RegEditDetial extends Component {
otherComJson: {}
};
_.forEach(socialData.dataSource, item => {
- console.log(item)
if (item.personalPaymentAmount) {
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
}
@@ -164,7 +163,6 @@ class RegEditDetial extends Component {
const social = this.combinedData(socialSecurity, result);
const fund = this.combinedData(accumulationFund, result);
const other = this.combinedData(otherBenefits, result);
- console.log(social)
this.setState({
listMap: [
{
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index a9029a86..11524d22 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -238,7 +238,7 @@ class Index extends Component {
"操作日志": getLabel(545781, "操作日志")
};
const childFrameObj = document.getElementById("atdTable");
- childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
+ childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
handleChangeProgramme = (type, schemeId, payload) => {
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/baseValidateDialog.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/baseValidateDialog.js
new file mode 100644
index 00000000..631ef2ee
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/baseValidateDialog.js
@@ -0,0 +1,76 @@
+/*
+ * 方案信息确认
+ * 保存并自动修改基数,仅保存方案设置
+ * @Author: 黎永顺
+ * @Date: 2024/8/19
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
+import { Alert, Button } from "antd";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const WeaTransferList = WeaTransfer.list;
+
+class BaseValidateDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { dataSource: [] };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ this.setState({
+ dataSource: _.filter(_.map(nextProps.baseChangeInfo.split("\n"), (g, gi) => ({
+ id: gi + 1, name: g
+ })), k => !!k.name)
+ });
+ }
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
+ dataSource: []
+ });
+ }
+
+ render() {
+ const { dataSource } = this.state, { onCancel } = this.props;
+ const scrollHeight = this.baseChangeRef ? this.baseChangeRef.state.height - 118 : 606.6;
+ const buttons = [
+ onCancel({
+ validate: false, changeData: true
+ })}>{getLabel(111, "保存并自动修改基数")},
+ onCancel({
+ validate: false, changeData: false
+ })}>{getLabel(111, "仅保存方案设置")}
+ ];
+ return (
+ this.baseChangeRef = dom}
+ title={getLabel(131329, "信息确认")} buttons={buttons}
+ style={{
+ width: 750, height: 606.6, minHeight: 200, minWidth: 380,
+ maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
+ }}
+ >
+
+
+ {
+ !_.isEmpty(dataSource) ?
()}
+ height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]}
+ /> : {getLabel(111, "无数据变更记录")}
+ }
+
+
+ );
+ }
+}
+
+export default BaseValidateDialog;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
index d97654e6..da42ac66 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
@@ -12,6 +12,7 @@ import { Button, message, Modal } from "antd";
import * as API from "../../../../../apis/welfareScheme";
import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
import { getConditionDomkeys, getSearchs } from "../../../../../util";
+import BaseValidateDialog from "./baseValidateDialog";
import { planConditons } from "../../config";
import cs from "classnames";
@@ -24,7 +25,10 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- loading: false, conditions: [], selectedKey: "2", planDatas: []
+ loading: false, conditions: [], selectedKey: "2", planDatas: [],
+ baseValidateDialog: {
+ visible: false, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
+ }
};
}
@@ -86,21 +90,37 @@ class Index extends Component {
if (planForm.getFormParams().sharedType === "1" && _.isEmpty(planForm.getFormParams().taxAgentIds)) {
planForm.showError("taxAgentIds", getLabel(111, "\"可见范围\"未填写"));
} else {
- const { planDatas } = this.state;
- const payload = {
+ const { planDatas, baseValidateDialog } = this.state;
+ const { validatePayload } = baseValidateDialog;
+ let payload = {
insuranceScheme: {
...planForm.getFormParams(), welfareType: welfareTypeEnum, id,
paymentArea: planForm.getFormParams().paymentType
},
insuranceSchemeDetailList: planDatas
};
+ id && (payload = { ...payload, ...validatePayload });
this.setState({ loading: true });
- API[id ? "updateScheme" : "createScheme"](payload).then(({ status, errormsg }) => {
+ API[id ? "updateScheme" : "createScheme"](payload).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
- message.success(getLabel(30700, "操作成功!"));
- setHasBeenModify(false);
- this.props.onClose(true);
+ if (id && Object.prototype.toString.call(data) === "[object String]" && data.indexOf("\n") !== -1) {
+ this.setState({
+ baseValidateDialog: {
+ visible: true, baseChangeInfo: data,
+ validatePayload: { ...baseValidateDialog.validatePayload, validate: false }
+ }
+ });
+ } else {
+ message.success(getLabel(30700, "操作成功!"));
+ setHasBeenModify(false);
+ this.props.onClose(true);
+ this.setState({
+ baseValidateDialog: {
+ ...baseValidateDialog, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
+ }
+ });
+ }
} else {
message.error(errormsg);
}
@@ -194,7 +214,7 @@ class Index extends Component {
render() {
- const { conditions, planDatas, selectedKey } = this.state;
+ const { conditions, planDatas, selectedKey, baseValidateDialog } = this.state;
const { programmeStore: { planForm }, showOperateBtn } = this.props;
return (
+ {/* */}
+ this.setState({
+ baseValidateDialog: {
+ visible: false, baseChangeInfo: [],
+ validatePayload: { validate: true, changeData: false, ...validatePayload }
+ }
+ }, () => !_.isEmpty(validatePayload) && this.save())}/>
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
index 9447e487..10751d50 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
@@ -246,7 +246,9 @@ class PlanSetTable extends Component {
{ key: "5", showname: "5" },
{ key: "6", showname: "6" },
{ key: "7", showname: "7" },
- { key: "8", showname: "8" }
+ { key: "8", showname: "8" },
+ { key: "9", showname: "9" },
+ { key: "10", showname: "10" }
]} viewAttr={showOperateBtn ? 2 : 1}
onChange={validNum => onEdit({
record: { ...record, validNum },
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
index 20d50c88..4f7028ad 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
@@ -13,7 +13,6 @@ import WelfarePlanList from "./components/welfarePlanList";
import LogDialog from "../../../components/logViewModal";
import cs from "classnames";
import "./index.less";
-import { tabList } from "../welfareArchive/config";
const getLabel = WeaLocaleProvider.getLabel;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
index 5a057203..5566cc8e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -269,3 +269,91 @@
}
}
+
+//方案基数变化
+.baseChangeDialog {
+ .wea-dialog-body {
+ overflow-y: hidden;
+ }
+
+ .baseChangeContent {
+ background: #F6F6F6;
+ padding: 16px;
+ width: 100%;
+ height: 100%;
+
+ .empty {
+ width: 100%;
+ display: flex;
+ height: 100%;
+ justify-content: center;
+ align-items: center;
+ background: #ffff;
+ }
+
+ .wea-search-group {
+ padding: 0;
+ margin-bottom: 10px;
+ background: #FFF;
+
+ .wea-form-cell {
+ padding: 0;
+
+ .wea-form-item {
+ padding: 10px;
+ }
+ }
+ }
+
+ .logTable {
+ background: #FFFFFF;
+ }
+
+ .wea-transfer-list-wrapper {
+ border: none;
+
+ .ant-tree-switcher {
+ display: none;
+ }
+
+ .transfer-tree {
+ background: #FFF;
+ border: 1px solid #dadada;
+ padding: 0;
+
+ & > li:not(:last-child) {
+ .detailBox .content {
+ border-bottom: 1px solid #dadada;
+ }
+ }
+
+ & > li {
+ margin: 0 !important;
+
+ .detailBox {
+ display: flex;
+ align-items: center;
+
+ .order {
+ width: 35px;
+ color: #999;
+ text-align: center;
+ }
+
+ .content {
+ position: relative;
+ flex: 1;
+ min-height: 40px;
+ line-height: 40px;
+ color: #000;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
index 23d14a23..59ad23fa 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
@@ -1,8 +1,19 @@
import React from "react";
import { Button, Col, Row } from "antd";
-import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom";
+import {
+ WeaBrowser,
+ WeaCheckbox,
+ WeaDialog,
+ WeaError,
+ WeaHelpfulTip,
+ WeaLocaleProvider,
+ WeaSelect,
+ WeaTextarea
+} from "ecCom";
+import { SQLHelpTip } from "../../components/PersonalScopeModal";
import "../ledger/index.less";
+const { getLabel } = WeaLocaleProvider;
export default class AddTaxAgentModal extends React.Component {
constructor(props) {
super(props);
@@ -10,10 +21,30 @@ export default class AddTaxAgentModal extends React.Component {
selectedKey: "EMPLOYEE",
checkboxValue: "",
checkAll: "0",
- ids: ""
+ ids: "",
+ idsName: ""
};
}
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ if (!_.isEmpty(nextProps.scopeRecord)) {
+ const { employeeStatus } = nextProps;
+ const checked = _.map(employeeStatus, it => it.id);
+ const bool = _.every(checked, it => nextProps.scopeRecord.status.indexOf(it) !== -1);
+ this.setState({
+ selectedKey: nextProps.scopeRecord.targetType,
+ checkboxValue: nextProps.scopeRecord.status,
+ checkAll: bool ? "1" : "0",
+ ids: nextProps.scopeRecord.targetType === "SQL" ? nextProps.scopeRecord.target : String(nextProps.scopeRecord.targetId),
+ idsName: nextProps.scopeRecord.targetName
+ });
+ } else {
+ this.handleReset();
+ }
+ }
+ }
+
onCheckboxChange = (checkboxValue) => {
const { employeeStatus } = this.props;
const checked = _.map(employeeStatus, it => it.id);
@@ -24,7 +55,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({
checkAll: "1"
});
- }else{
+ } else {
this.setState({
checkAll: "0"
});
@@ -34,14 +65,14 @@ export default class AddTaxAgentModal extends React.Component {
// 保存
handleSave = () => {
- const { onTaxAgentSave } = this.props;
+ const { onTaxAgentSave, scopeRecord } = this.props;
const { checkboxValue, ids, selectedKey } = this.state;
const payload = {
employeeStatus: checkboxValue.split(","),
- targetParams: _.map(ids.split(","), (it) => ({
- targetType: selectedKey,
+ targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({
+ targetType: selectedKey, target: "",
targetId: it
- }))
+ })) : [{ targetType: selectedKey, targetId: "0", target: ids }]
};
if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) {
this.refs.weaError.showError();
@@ -56,21 +87,22 @@ export default class AddTaxAgentModal extends React.Component {
this.refs.weaError1.showError();
return;
}
- onTaxAgentSave && onTaxAgentSave(payload);
+ onTaxAgentSave && onTaxAgentSave({ ...payload, id: scopeRecord.id });
};
// 重置
handleReset = () => {
this.setState({
- selectedKey: "EMPLOYEE",
+ selectedKey: !_.isEmpty(this.props.scopeRecord) ? this.props.scopeRecord.targetType : "EMPLOYEE",
checkboxValue: "",
- checkAll: '0',
- ids: ""
+ checkAll: "0",
+ ids: "",
+ idsName: ""
});
};
render() {
- const { employeeStatus, targetTypeList, visible, onCancel, loading } = this.props;
+ const { employeeStatus, targetTypeList, visible, onCancel, loading, scopeRecord } = this.props;
return (
({
...it,
key: it.id,
@@ -119,11 +151,12 @@ export default class AddTaxAgentModal extends React.Component {
type={17}
viewAttr={3}
value={this.state.ids}
+ replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
title={"人员选择"}
- isSingle={false}
+ isSingle={!_.isEmpty(scopeRecord)}
inputStyle={{ width: 200 }}
onChange={(ids, names, datas) => {
- this.setState({ ids });
+ this.setState({ ids, idsName: names });
}}
/>
@@ -137,11 +170,12 @@ export default class AddTaxAgentModal extends React.Component {
type={57}
viewAttr={3}
title="部门选择"
- isSingle={false}
+ isSingle={!_.isEmpty(scopeRecord)}
inputStyle={{ width: 200 }}
value={this.state.ids}
+ replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
onChange={(ids, names, datas) => {
- this.setState({ ids });
+ this.setState({ ids, idsName: names });
}}
/>
@@ -155,11 +189,12 @@ export default class AddTaxAgentModal extends React.Component {
type={164}
viewAttr={3}
title={"分部选择"}
- isSingle={false}
+ isSingle={!_.isEmpty(scopeRecord)}
inputStyle={{ width: 200 }}
value={this.state.ids}
+ replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
onChange={(ids, names, datas) => {
- this.setState({ ids });
+ this.setState({ ids, idsName: names });
}}
/>
@@ -173,15 +208,28 @@ export default class AddTaxAgentModal extends React.Component {
type={278}
viewAttr={3}
title={"岗位选择"}
- isSingle={false}
+ isSingle={!_.isEmpty(scopeRecord)}
value={this.state.ids}
+ replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]}
inputStyle={{ width: 200 }}
onChange={(ids, names, datas) => {
- this.setState({ ids });
+ this.setState({ ids, idsName: names });
}}
/>
)}
+ {this.state.selectedKey === "SQL" && (
+
+
+ this.setState({ ids })}/>
+ }/>
+
+
+ )}
@@ -197,13 +245,13 @@ export default class AddTaxAgentModal extends React.Component {
if (checkAll === "1") {
const checked = _.map(employeeStatus, it => it.id);
this.setState({
- checkAll: '1',
+ checkAll: "1",
checkboxValue: checked.join(",")
});
} else {
this.setState({
- checkAll: '0',
- checkboxValue: ''
+ checkAll: "0",
+ checkboxValue: ""
});
}
}}/>
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js
index da0bd2bb..81e8fb55 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js
@@ -8,6 +8,7 @@ import React, { Component } from "react";
import { message, Modal } from "antd";
import { inject, observer } from "mobx-react";
import SlideTaxagentUser from "./slideTaxagentUser";
+import { taxAgentRangeEdit } from "../../apis/taxAgent";
import "./index.less";
const personScopeWarrper = {};
@@ -199,7 +200,7 @@ export default class PersonalScope extends Component {
taxAgentRangeSave = (module) => {
const { taxAgentId } = this.props;
const { pageObj } = this.state;
- const { includeType } = module;
+ const { includeType, id } = module;
const { taxAgentRangeSave, taxAgentRangeExtSave } = this.props.taxAgentStore;
this.setState({ submitLoading: true });
if (includeType === "2") {
@@ -214,26 +215,25 @@ export default class PersonalScope extends Component {
}
});
} else {
- taxAgentRangeSave({ ...module, taxAgentId }).then(
- ({ status, errormsg }) => {
- this.setState({ submitLoading: false });
- if (status) {
- this.tagAgentRef.closeModal();
- message.success("新增成功");
- includeType == "1"
- ? this.getTaxAgentRangeListInclude({
- current: pageObj.current,
- pageSize: pageObj.pageSize
- })
- : this.getTaxAgentRangeListExclude({
- current: pageObj.current,
- pageSize: pageObj.pageSize
- });
- } else {
- message.error(errormsg || "新增失败");
- }
+ const API= id ? taxAgentRangeEdit : taxAgentRangeSave;
+ API({ ...module, taxAgentId }).then(({ status, errormsg }) => {
+ this.setState({ submitLoading: false });
+ if (status) {
+ this.tagAgentRef.closeModal();
+ message.success("操作成功");
+ includeType == "1"
+ ? this.getTaxAgentRangeListInclude({
+ current: pageObj.current,
+ pageSize: pageObj.pageSize
+ })
+ : this.getTaxAgentRangeListExclude({
+ current: pageObj.current,
+ pageSize: pageObj.pageSize
+ });
+ } else {
+ message.error(errormsg);
}
- );
+ });
}
};
@@ -285,7 +285,7 @@ export default class PersonalScope extends Component {
onTaxAngetSearch={({ targetName, targetWorkcode, tab }) => {
tab == "1"
? this.getTaxAgentRangeListInclude({ targetName, targetWorkcode })
- : tab == "0" ? this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }):
+ : tab == "0" ? this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }) :
this.taxAgentRangelistExt({ targetName, targetWorkcode });
}}
onChangeTab={(tab) => {
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
index d60cc7f4..78168514 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
@@ -15,6 +15,7 @@ export default class SlideTaxagentUser extends React.Component {
showSearchAd: false,
externalPersonModalVisible: false, //外部人员关联弹框
addTaxagentModalVisible: false,
+ scopeRecord: {},
includeType: "1",
selectedRowKeys: [],
searchValue: "",
@@ -72,7 +73,8 @@ export default class SlideTaxagentUser extends React.Component {
closeModal = () => {
this.setState({
addTaxagentModalVisible: false,
- externalPersonModalVisible: false
+ externalPersonModalVisible: false,
+ scopeRecord: {}
}, () => {
this.addTaxRef && this.addTaxRef.handleReset();
});
@@ -131,7 +133,8 @@ export default class SlideTaxagentUser extends React.Component {
externalPersonModalVisible,
importParams,
previewDataSource,
- showSearchAd, extEmpsWitch
+ showSearchAd, extEmpsWitch,
+ scopeRecord
} = this.state;
const {
submitLoading,
@@ -224,106 +227,33 @@ export default class SlideTaxagentUser extends React.Component {
onSearchChange={searchValue => this.setState({ searchValue })}
onChange={v => this.setState({ includeType: v }, () => onChangeTab && onChangeTab(this.state.includeType))}
/>
- {/**/}
- {/*
*/}
- {/* {*/}
- {/* this.handleTabClick(1);*/}
- {/* }}>*/}
- {/* 人员范围*/}
- {/* | {*/}
- {/* this.handleTabClick(0);*/}
- {/* }}>*/}
- {/* 从范围中排除*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* {*/}
- {/* (hideIconInTax || showSalaryItemBtn) &&
*/}
- {/* {*/}
- {/* includeType == "1" &&*/}
- {/*
{*/}
- {/* this.setState({ importParams: { ...importParams, visible: true, step: 0 } });*/}
- {/* }}*/}
- {/* >*/}
- {/* }*/}
- {/*
*/}
- {/* {*/}
- {/* this.handleTabDelete();*/}
- {/* }}*/}
- {/* >*/}
- {/* this.setState({ addTaxagentModalVisible: true })}*/}
- {/* >*/}
- {/*
*/}
- {/*
*/}
- {/* }*/}
- {/*
*/}
- {/*
{*/}
- {/* this.setState({ searchValue: value });*/}
- {/* }}*/}
- {/* onSearch={value => {*/}
- {/* this.handleSearch(value);*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
this.setState({ externalPersonModalVisible: false })}
+ onCancel={() => this.setState({ externalPersonModalVisible: false, scopeRecord: {} })}
onExternalPersonSave={val => onTaxAgentSave({ ...val, includeType: includeType })}
/>
this.addTaxRef = ref}
+ scopeRecord={scopeRecord}
loading={submitLoading}
employeeStatus={employeeStatus}
targetTypeList={targetTypeList}
@@ -332,7 +262,7 @@ export default class SlideTaxagentUser extends React.Component {
onTaxAgentSave({ ...val, includeType: includeType })}
visible={addTaxagentModalVisible}
onCancel={() => {
- this.setState({ addTaxagentModalVisible: false });
+ this.setState({ addTaxagentModalVisible: false, scopeRecord: {} });
}}
/>
{importParams.visible && (
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/advanceInputBtn/index.js
new file mode 100644
index 00000000..8c0983da
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/advanceInputBtn/index.js
@@ -0,0 +1,35 @@
+/*
+ * Author: 黎永顺
+ * name:薪酬统计报表-高级搜索
+ * Description:
+ * Date: 2024/3/26
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { Button } from "antd";
+import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("baseTableStore")
+@observer
+class Index extends Component {
+ render() {
+ const { baseTableStore: { VSalryForm }, searchType } = this.props;
+ return (
+
+ VSalryForm.updateFields({ username: v })}
+ onSearch={this.props.onAdvanceSearch}
+ />
+ {
+ searchType === "advance" && {getLabel(545754, "高级搜索")}
+ }
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/variableSalary/components/advanceInputBtn/index.less
new file mode 100644
index 00000000..f301e571
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/advanceInputBtn/index.less
@@ -0,0 +1,28 @@
+.variable-advance-search {
+ display: flex;
+ align-items: center;
+ position: relative;
+ top: -1.5px;
+
+ .wea-advanced-search {
+ top: 1px;
+ left: -1px;
+ height: 28px;
+ line-height: 1;
+ border-radius: 0;
+ position: relative;
+ color: #474747;
+ padding: 4px 15px;
+ }
+
+ .wea-advanced-search:hover {
+ border: 1px solid #dadada;
+ color: #474747;
+ }
+
+ .text-elli {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js
new file mode 100644
index 00000000..7813cde7
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js
@@ -0,0 +1,143 @@
+/*
+ * 浮动薪酬
+ * 新建编辑薪资档案
+ * @Author: 黎永顺
+ * @Date: 2024/8/8
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
+import { Button, message } from "antd";
+import { getSearchs } from "../../../../util";
+import { salaryFileConditions } from "../../conditions";
+import * as API from "../../../../apis/variableSalary";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("baseTableStore") @observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ conditions: [], loading: false
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ document.querySelector(".variable_salary_wrapper").classList.add("zIndex0-weaslide-title");
+ this.initForm(nextProps);
+ } else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
+ document.querySelector(".variable_salary_wrapper").classList.remove("zIndex0-weaslide-title");
+ this.props.baseTableStore.initVSSalaryFileForm();
+ }
+ }
+
+ initForm = async (props) => {
+ const { baseTableStore: { VSSalaryFileForm }, detail } = props;
+ const { data: taxAgentOption } = await API.getAdminTaxAgentList();
+ API.getCreateForm().then(({ data }) => {
+ this.setState({
+ conditions: [..._.map(salaryFileConditions, item => ({
+ ...item, items: _.map(item.items, o => {
+ if (getKey(o) === "taxAgentIds") {
+ return {
+ ...o,
+ viewAttr: !_.isEmpty(detail) ? 1 : 3,
+ label: getLabel(o.lanId, o.label),
+ value: detail[getKey(o)] || "",
+ options: _.map(taxAgentOption, (o, i) => ({ key: o.id, showname: o.content }))
+ };
+ }
+ return {
+ ...o,
+ viewAttr: !_.isEmpty(detail) ? 1 : 3,
+ label: getLabel(o.lanId, o.label),
+ value: detail[getKey(o)] || ""
+ };
+ })
+ })), {
+ items: _.map(data, o => ({
+ conditionType: "INPUT",
+ domkey: [String(o.id)],
+ fieldcol: 14,
+ label: o.name,
+ labelcol: 6,
+ value: detail[`${String(o.id)}_variableItem`] || "",
+ viewAttr: 2
+ })), title: "", col: 2, defaultshow: true
+ }]
+ }, () => {
+ VSSalaryFileForm.initFormFields(this.state.conditions);
+ if (!_.isEmpty(detail)) {
+ VSSalaryFileForm.updateFields({
+ employeeId: {
+ value: detail["employeeId"],
+ valueSpan: detail["username"],
+ valueObj: [{ id: detail["employeeId"], name: detail["username"] }]
+ }
+ });
+ }
+ });
+ });
+ };
+ convertPayload = (payload) => {
+ const itemValueList = [];
+ return _.reduce(_.keys(payload), (pre, cur) => {
+ if (!_.isNaN(parseInt(cur))) {
+ itemValueList.push({ variableItemId: cur, itemValue: payload[cur] });
+ return { ...pre, itemValueList };
+ }
+ return { ...pre, [cur]: payload[cur] };
+ }, {});
+ };
+ save = () => {
+ const { baseTableStore: { VSSalaryFileForm }, onSearch, detail: { id } } = this.props;
+ VSSalaryFileForm.validateForm().then(f => {
+ if (f.isValid) {
+ const payload = VSSalaryFileForm.getFormParams();
+ this.setState({ loading: true });
+ API.createVariableSalary({ ...this.convertPayload(payload), id })
+ .then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.props.onClose(onSearch());
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => this.setState({ loading: false }));
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+ renderTitle = () => {
+ const { loading } = this.state, { title } = this.props;
+ return
+
+
+ {getLabel(537558, "保存")}
+
+
;
+ };
+
+ render() {
+ const { conditions } = this.state;
+ const { baseTableStore: { VSSalaryFileForm }, onClose } = this.props;
+ return ( onClose()}
+ top={0} width={800} height={100} measureT="%" measureX="px" measureY="%" title={this.renderTitle()}
+ content={{getSearchs(VSSalaryFileForm, conditions, 2, false)}
}
+ />);
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileImportDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileImportDialog/index.js
new file mode 100644
index 00000000..415f7e33
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileImportDialog/index.js
@@ -0,0 +1,130 @@
+/*
+ * 浮动薪酬
+ * 薪资档案导入
+ * @Author: 黎永顺
+ * @Date: 2024/8/8
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaLocaleProvider } from "ecCom";
+import ImportDialog from "../../../../components/importDialog";
+import * as API from "../../../../apis/variableSalary";
+import { convertToUrlString } from "../../../../util/url";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ importDialog: {
+ nextloading: false, link: "/api/bs/hrmsalary/variableSalary/downloadTemplate",
+ importResult: {}, imageId: "", hasData: false, salaryMonth: "",
+ previewUrl: "/api/bs/hrmsalary/variableSalary/preview"
+ }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ const { importDialog } = this.state;
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ const { baseTableStore: { VSalryForm, VExtraSalryForm } } = nextProps;
+ const payload = {
+ ...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(), hasData: importDialog.hasData
+ };
+ this.setState({
+ importDialog: {
+ ...importDialog, salaryMonth: VExtraSalryForm.getFormParams().salaryMonth,
+ link: `${importDialog.link}?${convertToUrlString(payload)}`
+ }
+ });
+ } else {
+ this.setState({
+ importDialog: {
+ nextloading: false, link: "/api/bs/hrmsalary/variableSalary/downloadTemplate", hasData: false,
+ importResult: {}, imageId: "", previewUrl: "/api/bs/hrmsalary/variableSalary/preview", salaryMonth: ""
+ }
+ });
+ }
+ }
+
+ handleImport = (payload) => {
+ const { baseTableStore: { VExtraSalryForm } } = this.props;
+ const { importDialog } = this.state;
+ const { salaryMonth } = importDialog;
+ const { taxAgentIds } = VExtraSalryForm.getFormParams();
+ this.setState({ importDialog: { ...importDialog, nextloading: true } });
+ API.importVariableSalary({
+ ...payload, salaryMonth, taxAgentIds: _.isEmpty(taxAgentIds) ? [] : taxAgentIds.split(",")
+ }).then(({ data, status }) => {
+ this.setState({ importDialog: { ...importDialog, nextloading: false } });
+ if (status) {
+ this.setState({
+ importDialog: { ...importDialog, ...payload, importResult: data }
+ });
+ }
+ }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
+ };
+ renderFormComponent = () => {
+ const { baseTableStore: { VSalryForm, VExtraSalryForm } } = this.props;
+ const { importDialog } = this.state;
+ const { salaryMonth: month, hasData } = importDialog;
+ return
+
+ {
+ const payload = {
+ ...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
+ salaryMonth: val, hasData
+ };
+ this.setState({
+ importDialog: {
+ ...importDialog, salaryMonth: val,
+ link: `/api/bs/hrmsalary/variableSalary/downloadTemplate?${convertToUrlString(payload)}`
+ }
+ });
+ }}/>
+
+
;
+ };
+
+ render() {
+ const { importDialog } = this.state;
+ return (
+ this.setState({
+ importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
+ })}
+ importParams={this.renderFormComponent()}
+ exportDataDom={
+ {
+ const { baseTableStore: { VSalryForm, VExtraSalryForm } } = this.props;
+ const { salaryMonth } = importDialog;
+ const payload = {
+ salaryMonth, ...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
+ hasData: val === "1"
+ };
+ this.setState({
+ importDialog: {
+ ...importDialog, hasData: val === "1",
+ link: `/api/bs/hrmsalary/variableSalary/downloadTemplate?${convertToUrlString(payload)}`
+ }
+ });
+ }}
+ />
+ }
+ nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
+ nextUplaodCallback={imageId => this.handleImport({ imageId })}
+ />
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileList/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileList/index.js
new file mode 100644
index 00000000..9f583eee
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileList/index.js
@@ -0,0 +1,212 @@
+/*
+ * 浮动薪酬
+ * 薪资档案列表
+ * @Author: 黎永顺
+ * @Date: 2024/8/8
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaTools } from "ecCom";
+import { WeaTableNew } from "comsMobx";
+import { message, Modal, Spin } from "antd";
+import * as API from "../../../../apis/variableSalary";
+import { getSearchs } from "../../../../util";
+import { extraConditions } from "../../conditions";
+import AdvanceInputBtn from "../advanceInputBtn";
+import SearchPannel from "../searchPannel";
+import { toJS } from "mobx";
+import cs from "classnames";
+
+const WeaTableComx = WeaTableNew.WeaTable;
+const getLabel = WeaLocaleProvider.getLabel;
+const getKey = WeaTools.getKey;
+
+@inject("baseTableStore") @observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ loading: false,
+ dataSource: [],
+ columns: [],
+ selectedRowKeys: [],
+ condtions: [],
+ showSearchAd: false
+ };
+ }
+
+ async componentDidMount() {
+ const { data: taxAgentOption } = await API.getAdminTaxAgentList();
+ this.setState({
+ condtions: _.map(extraConditions, item => {
+ return {
+ ...item, items: _.map(item.items, child => {
+ if (getKey(child) === "taxAgentIds") {
+ return {
+ ...child,
+ label: getLabel(child.lanId, child.label),
+ options: _.map(taxAgentOption, o => ({ key: o.id, showname: o.content }))
+ };
+ }
+ return { ...child, label: getLabel(child.lanId, child.label) };
+ })
+ };
+ })
+ }, () => {
+ const { baseTableStore: { VExtraSalryForm } } = this.props;
+ VExtraSalryForm.initFormFields(this.state.condtions);
+ });
+ window.addEventListener("message", this.handleReceive, false);
+ window.addEventListener("resize", this.handleResize, false);
+ this.getVariableSalaryList();
+ }
+
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ window.removeEventListener("resize", this.handleResize, false);
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.isQuery !== this.props.isQuery) this.setState({
+ pageInfo: { ...this.state.pageInfo, current: 1 }
+ }, () => this.getVariableSalaryList());
+ }
+
+ handleReceive = async ({ data }) => {
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "init") {
+ this.getColumns();
+ } else if (type === "turn") {
+ switch (id) {
+ case "PAGEINFO":
+ this.setState({
+ pageInfo: { ...this.state.pageInfo, ...params }
+ }, () => this.getVariableSalaryList());
+ break;
+ case "CHECKBOX":
+ const { selectedRowKeys } = params;
+ this.setState({ selectedRowKeys });
+ break;
+ case "DEL":
+ this.handleDelete([params.id]);
+ break;
+ case "EDIT":
+ this.handleView(params.id);
+ break;
+ default:
+ break;
+ }
+ }
+ };
+ getVariableSalaryList = () => {
+ const { baseTableStore: { VSalryForm, VExtraSalryForm, getVariableSalaryList } } = this.props;
+ const { pageInfo } = this.state;
+ const { taxAgentIds } = VExtraSalryForm.getFormParams(), { departmentIds } = VSalryForm.getFormParams();
+ this.setState({ loading: true });
+ getVariableSalaryList({
+ ...pageInfo, ...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
+ departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [],
+ taxAgentIds: _.isEmpty(taxAgentIds) ? [] : taxAgentIds.split(",")
+ }).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { pageInfo: result } = data;
+ const { list: dataSource, pageNum: current, pageSize, total } = result;
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
+ });
+ }
+ });
+ };
+ handleView = (id) => {
+ API.getVariableSalaryDetail({ id }).then(({ status, data }) => {
+ if (status) this.props.onViewSalaryFile(data.data);
+ });
+ };
+ handleDelete = (ids) => {
+ Modal.confirm({
+ title: getLabel(111, "信息确认"), content: getLabel(111, "确认删除吗?"), onOk: () => {
+ API.deleteVariableSalary({ ids }).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(111, "删除成功"));
+ this.setState({ selectedRowKeys: [] }, () => this.getVariableSalaryList());
+ } else {
+ message.error(errormsg);
+ }
+ });
+ }
+ });
+ };
+ getColumns = () => {
+ const { baseTableStore: { SFTableStore }, showOperateBtn } = this.props;
+ const columns = _.map(_.filter(toJS(SFTableStore.columns), (item) => item.display === "true"), (it, idx) => ({
+ dataIndex: it.dataIndex, title: it.title, align: "left", width: 150, ellipsis: true
+ }));
+ if (!_.isEmpty(columns)) {
+ this.postMessageToChild({
+ columns,
+ showOperateBtn,
+ dataSource: this.state.dataSource,
+ scrollHeight: 95,
+ pageInfo: this.state.pageInfo,
+ unitTableType: "variableSalary",
+ selectedRowKeys: this.state.selectedRowKeys
+ });
+ }
+ return columns;
+ };
+ postMessageToChild = (payload = {}) => {
+ const i18n = {
+ "操作": getLabel(30585, "操作"),
+ "编辑": getLabel(111, "编辑"),
+ "共": getLabel(18609, "共"),
+ "条": getLabel(18256, "条"),
+ "删除": getLabel(111, "删除")
+ };
+ const childFrameObj = document.getElementById("unitTable");
+ childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
+ };
+ openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
+
+ render() {
+ const { loading, dataSource, condtions, showSearchAd } = this.state;
+ const { baseTableStore: { SFTableStore, VExtraSalryForm } } = this.props;
+ const dom = document.querySelector(".wea-new-top-req-content");
+ let height = 280;
+ if (dom && dataSource.length > 0) {
+ height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 46 + 108 : dataSource.length < 10 ? dataSource.length * 46 + 108 : parseFloat(dom.style.height) - 62;
+ }
+ return (
+
+ {getSearchs(VExtraSalryForm, condtions, 2, false, () => this.getVariableSalaryList())}
+
this.openAdvanceSearch()}
+ onAdvanceSearch={this.getVariableSalaryList}/>
+
+
+ this.setState({ showSearchAd: false })}
+ onAdSearch={() => {
+ this.openAdvanceSearch();
+ this.getVariableSalaryList();
+ }}/>
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemDialog/index.js
new file mode 100644
index 00000000..cc4d456d
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemDialog/index.js
@@ -0,0 +1,80 @@
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
+import { Button, message } from "antd";
+import { getSearchs } from "../../../../util";
+import { salaryItemsConditions } from "../../conditions";
+import * as API from "../../../../apis/variableSalary";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("baseTableStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ conditions: [], loading: false
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm(nextProps);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.baseTableStore.initVSSalaryItemForm();
+ }
+
+ initForm = (props) => {
+ const { baseTableStore: { VSSalaryItemForm } } = props;
+ this.setState({
+ conditions: _.map(salaryItemsConditions, item => ({
+ ...item,
+ items: _.map(item.items, o => {
+ if (getKey(o) === "dataType") {
+ return { ...o, options: _.map(o.options, g => ({ ...g, showname: getLabel(g.lanId, g.showname) })) };
+ }
+ return { ...o, label: getLabel(o.lanId, o.label) };
+ })
+ }))
+ }, () => VSSalaryItemForm.initFormFields(this.state.conditions));
+ };
+ save = () => {
+ const { baseTableStore: { VSSalaryItemForm }, onSearch, id } = this.props;
+ VSSalaryItemForm.validateForm().then(f => {
+ if (f.isValid) {
+ const payload = VSSalaryItemForm.getFormParams();
+ this.setState({ loading: true });
+ API.saveVariableSalaryItem({ ...payload, id })
+ .then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.props.onCancel(onSearch());
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => this.setState({ loading: false }));
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const { conditions, loading } = this.state;
+ const { baseTableStore: { VSSalaryItemForm } } = this.props;
+ return (
+ this.props.onCancel()}>{getLabel(111, "取消")},
+ {getLabel(111, "保存")}
+ ]}
+ >
+ {getSearchs(VSSalaryItemForm, conditions, 1, false)}
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemList/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemList/index.js
new file mode 100644
index 00000000..bceb4585
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemList/index.js
@@ -0,0 +1,113 @@
+/*
+ * 浮动薪酬
+ * 薪资项目列表
+ * @Author: 黎永顺
+ * @Date: 2024/8/8
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTable } from "ecCom";
+import { message, Modal } from "antd";
+import * as API from "../../../../apis/variableSalary";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], columns: []
+ };
+ }
+
+ componentDidMount() {
+ this.getVariableSalaryItemList();
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.isQuery !== this.props.isQuery) this.setState({
+ pageInfo: { ...this.state.pageInfo, current: 1 }
+ }, () => this.getVariableSalaryItemList());
+ }
+
+ getVariableSalaryItemList = () => {
+ const { baseTableStore: { VSalryForm } } = this.props;
+ const { pageInfo } = this.state;
+ const { username: itemName } = VSalryForm.getFormParams();
+ this.setState({ loading: true });
+ API.getVariableSalaryItemList({ ...pageInfo, itemName }).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
+ columns: [
+ ..._.filter(columns, o => o.dataIndex !== "id"),
+ {
+ title: getLabel(111, "操作"), dataIndex: "oprate",
+ render: (__, record) => (
+ this.handleEdit(record.id)}>{getLabel(111, "编辑")}
+ {
+ record.canDelete && this.handleDelete([record.id])}>{getLabel(111, "删除")}
+ }
+ )
+ }
+ ]
+ }
+ );
+ }
+ });
+ };
+ handleEdit = (id) => {
+ API.getVariableSalaryItemDetail({ id }).then(({ status, data }) => {
+ if (status) this.props.onEditSalaryItem(data);
+ });
+ };
+ handleDelete = (itemIds) => {
+ Modal.confirm({
+ title: getLabel(111, "信息确认"),
+ content: getLabel(111, "确认删除吗?"),
+ onOk: () => {
+ API.deleteVariableSalaryItem({ itemIds }).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(111, "删除成功"));
+ this.getVariableSalaryItemList();
+ } else {
+ message.error(errormsg);
+ }
+ });
+ }
+ });
+ };
+
+ render() {
+ const { columns, dataSource, loading, pageInfo } = this.state;
+ const pagination = {
+ ...pageInfo,
+ showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
+ showQuickJumper: true,
+ showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => this.getVariableSalaryItemList());
+ },
+ onChange: current => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => this.getVariableSalaryItemList());
+ }
+ };
+ return (
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/searchPannel/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/searchPannel/index.js
new file mode 100644
index 00000000..722390c2
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/searchPannel/index.js
@@ -0,0 +1,68 @@
+/*
+ * Author: 黎永顺
+ * name:薪酬统计报薪资明细-高级查询
+ * Description:
+ * Date: 2024/3/26
+ */
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTools } from "ecCom";
+import { Button } from "antd";
+import { inject, observer } from "mobx-react";
+import { getSearchs } from "../../../../util";
+import { conditions } from "../../conditions";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const getKey = WeaTools.getKey;
+
+@inject("baseTableStore")
+@observer
+class VariableSalarySearchPannel extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ searchConditions: []
+ };
+ }
+
+ componentDidMount() {
+ this.setState({
+ searchConditions: _.map(conditions, item => {
+ return {
+ ...item,
+ items: _.map(item.items, child => ({ ...child, label: getLabel(child.lanId, child.label) }))
+ };
+ })
+ }, () => {
+ const { baseTableStore: { VSalryForm } } = this.props;
+ VSalryForm.initFormFields(this.state.searchConditions);
+ });
+ }
+
+ render() {
+ const { searchConditions } = this.state;
+ const { baseTableStore: { VSalryForm } } = this.props;
+ return (
+
+
+ {getSearchs(VSalryForm, searchConditions, 2, false)}
+
+
+
+
+ {getLabel(388113, "搜索")}
+
+
+ VSalryForm.resetForm()}>{getLabel(2022, "重置")}
+
+
+ {getLabel(31129, "取消")}
+
+
+
+
+ );
+ }
+}
+
+export default VariableSalarySearchPannel;
+
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/conditions.js b/pc4mobx/hrmSalary/pages/variableSalary/conditions.js
new file mode 100644
index 00000000..56ce7208
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/conditions.js
@@ -0,0 +1,199 @@
+import moment from "moment";
+
+export const conditions = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["itemName"],
+ fieldcol: 14,
+ label: "项目名称",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ hide: true,
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["username"],
+ fieldcol: 14,
+ label: "名称",
+ lanId: 111,
+ labelcol: 6,
+ 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: "57",
+ viewAttr: 2
+ },
+ conditionType: "BROWSER",
+ domkey: ["departmentIds"],
+ fieldcol: 14,
+ label: "部门",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["workcode"],
+ fieldcol: 14,
+ label: "工号",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+export const extraConditions = [
+ {
+ items: [
+ {
+ conditionType: "MONTHPICKER",
+ domkey: ["salaryMonth"],
+ fieldcol: 16,
+ label: "薪资所属月",
+ lanId: 111,
+ labelcol: 8,
+ value: moment(new Date()).format("YYYY-MM"),
+ viewAttr: 2
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["taxAgentIds"],
+ fieldcol: 16,
+ label: "个税扣缴义务人",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ options: [],
+ multiple: true,
+ viewAttr: 2
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+export const salaryItemsConditions = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["name"],
+ fieldcol: 14,
+ label: "名称",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["dataType"],
+ fieldcol: 14,
+ label: "字段类型",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ options: [
+ { key: "number", showname: "数值", lanId: 111, selected: true },
+ { key: "string", showname: "字符", lanId: 111, selected: false }
+ ],
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+export const salaryFileConditions = [
+ {
+ items: [
+ {
+ conditionType: "MONTHPICKER",
+ domkey: ["salaryMonth"],
+ fieldcol: 16,
+ label: "薪资所属月",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["taxAgentIds"],
+ fieldcol: 16,
+ label: "个税扣缴义务人",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ options: [],
+ rules: "required",
+ viewAttr: 3
+ },
+ {
+ browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: false,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: true,
+ icon: "icon-coms-hrm",
+ linkUrl: "",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: "",
+ type: "17",
+ viewAttr: 2
+ },
+ conditionType: "BROWSER",
+ domkey: ["employeeId"],
+ fieldcol: 16,
+ label: "人员",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ viewAttr: 3
+ }
+ ],
+ title: "", col: 2,
+ defaultshow: true
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.js b/pc4mobx/hrmSalary/pages/variableSalary/index.js
new file mode 100644
index 00000000..6eb00d27
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/index.js
@@ -0,0 +1,146 @@
+/*
+ * 浮动薪酬
+ *
+ * @Author: 黎永顺
+ * @Date: 2024/8/8
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { toJS } from "mobx";
+import { WeaLoadingGlobal, WeaLocaleProvider, WeaReqTop } from "ecCom";
+import * as API from "../../apis/variableSalary";
+import AdvanceInputBtn from "./components/advanceInputBtn";
+import SalaryItemDialog from "./components/salaryItemDialog";
+import SalaryFileDialog from "./components/salaryFileDialog";
+import SalaryItemList from "./components/salaryItemList";
+import SalaryFileList from "./components/salaryFileList";
+import SalaryFileImportDialog from "./components/salaryFileImportDialog";
+import { Button, message } from "antd";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("taxAgentStore", "baseTableStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ selectedKey: "salaryFile", isQuery: false,
+ SIDialog: { visible: false, title: "", id: "" }, //薪资项目薪资编辑弹框
+ SFDialog: { visible: false, title: "", detail: {} }, //薪资档案编辑弹框
+ SFImpDialog: { visible: false, title: getLabel(24023, "数据导入") }//薪资档案导入
+ };
+ }
+
+ handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
+ handleOperate = (type, detail = {}) => {
+ const { baseTableStore: { SFTableStore, VSalryForm, VExtraSalryForm } } = this.props;
+ switch (type) {
+ case "create":
+ this.setState({
+ SFDialog: {
+ ...this.state.SFDialog, visible: true, detail,
+ title: _.isEmpty(detail) ? getLabel(111, "新增浮动数据") : getLabel(111, "编辑浮动数据")
+ }
+ });
+ break;
+ case "import":
+ this.setState({ SFImpDialog: { ...this.state.SFImpDialog, visible: true } });
+ break;
+ case "export":
+ const columns = _.map(_.filter(toJS(SFTableStore.columns), (item) => item.display === "true"), it => it.dataIndex);
+ const { taxAgentIds } = VExtraSalryForm.getFormParams(), { departmentIds } = VSalryForm.getFormParams();
+ const payload = {
+ ...VSalryForm.getFormParams(), ...VExtraSalryForm.getFormParams(),
+ taxAgentIds: !_.isEmpty(taxAgentIds) ? taxAgentIds.split(",") : [],
+ departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [],
+ columns
+ };
+ WeaLoadingGlobal.start();
+ const promise = API.exportVariableSalary(payload);
+ break;
+ case "custom_cols":
+ SFTableStore.setColSetVisible(true);
+ SFTableStore.tableColSet(true);
+ break;
+ case "batchDel":
+ const { state: { selectedRowKeys }, handleDelete } = this.salaryListRef.wrappedInstance;
+ if (_.isEmpty(selectedRowKeys)) {
+ message.warning(getLabel(111, "请选择数据!"));
+ return;
+ }
+ handleDelete(selectedRowKeys);
+ break;
+ default:
+ break;
+ }
+ };
+
+ render() {
+ const { selectedKey, SIDialog, SFDialog, SFImpDialog, isQuery } = this.state;
+ const { taxAgentStore: { showOperateBtn }, baseTableStore: { VSSalaryItemForm } } = this.props;
+ const tabs = [
+ {
+ title: getLabel(111, "浮动数据"), key: "salaryFile", showDropIcon: true,
+ dropMenuDatas: showOperateBtn ? [
+ { key: "export", icon: , content: getLabel(111, "导出") },
+ { key: "custom_cols", icon: , content: getLabel(32535, "显示列定制") }
+ ] : [
+ { key: "custom_cols", icon: , content: getLabel(32535, "显示列定制") }
+ ],
+ buttons: showOperateBtn ? [
+ this.handleOperate("create")}>{getLabel(111, "新建")},
+ this.handleOperate("import")}>{getLabel(111, "导入")},
+ this.handleOperate("batchDel")}>{getLabel(111, "批量删除")}
+ ] : [],
+ children: this.salaryListRef = dom}
+ onViewSalaryFile={(data) => this.handleOperate("create", data)}/>
+ },
+ {
+ title: getLabel(111, "字段管理"), key: "salaryItem", showDropIcon: false, dropMenuDatas: [],
+ buttons: showOperateBtn ? [
+ this.setState({
+ SIDialog: { visible: true, id: "", title: getLabel(111, "新增薪资项目") }
+ })}>{getLabel(111, "新建")},
+
+ ] : [],
+ children: this.setState({
+ SIDialog: { visible: true, id: data.id, title: getLabel(111, "编辑薪资项目") }
+ }, () => VSSalaryItemForm.updateFields({
+ name: data.name, dataType: data.dataType
+ }))}/>
+ }
+ ];
+ return (
+ } selectedKey={selectedKey}
+ iconBgcolor="#F14A2D" tabDatas={tabs} className="variable_salary_wrapper"
+ buttons={_.find(tabs, o => selectedKey === o.key).buttons} buttonSpace={10}
+ onChange={selectedKey => this.setState({ selectedKey, SFDialog: { ...SFDialog, visible: false } })}
+ showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
+ dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
+ >
+ {_.find(tabs, o => selectedKey === o.key).children}
+ {/*薪资项目*/}
+ this.setState({
+ SIDialog: { ...SIDialog, visible: false }
+ }, () => callback && callback())}/>
+ {/*薪资档案*/}
+ this.setState({
+ SFDialog: { ...SFDialog, visible: false }
+ }, () => callback && callback())}/>
+ {/* 薪资档案导入*/}
+ {
+ this.setState({ SFImpDialog: { ...SFImpDialog, visible: false } },
+ () => callback && this.handleAdvanceSearch());
+ }}/>
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.less b/pc4mobx/hrmSalary/pages/variableSalary/index.less
new file mode 100644
index 00000000..52613c61
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/variableSalary/index.less
@@ -0,0 +1,140 @@
+.variable_salary_wrapper {
+ .wea-new-top-req-title > div:last-child {
+ right: 16px !important;
+ }
+
+ .extraFormQuery {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: #FFF;
+ margin-bottom: 8px;
+ padding-right: 8px;
+
+ .wea-search-group {
+ padding: 0;
+ flex: 1;
+
+ .wea-content {
+ max-width: 50%;
+
+ .wea-form-cell-wrapper, .wea-form-cell {
+ border: none;
+ }
+ }
+ }
+ }
+
+ .wea-new-top-req-content {
+ padding: 8px 16px 0 16px;
+
+ .wea-new-table {
+ background: #FFF;
+ }
+
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100% !important;
+ }
+
+ }
+
+ .searchAdvanced-condition-hide {
+ display: none;
+ }
+
+ .searchAdvanced-condition-container {
+ background: #FFF;
+ margin-bottom: 10px;
+ border: 1px solid #e5e5e5;
+
+ .wea-search-buttons {
+ border-top: 1px solid #dadada;
+ padding: 15px 0;
+ }
+
+ .wea-advanced-searchsAd {
+ height: 108px;
+ overflow: hidden auto;
+
+ .formItem-delete {
+ position: absolute;
+ top: 0;
+ right: -40px;
+ }
+
+ .searchAdvanced-commonSelect {
+ border-top: 1px solid #ebebeb;
+ margin: 0 25px;
+ padding: 10px 0;
+ }
+
+ .custom-advance-largeSpacing {
+ padding-left: 26px;
+
+ .link {
+ border: none;
+ border-radius: 0;
+ padding: 12px 10px 12px 26px;
+ color: #2db7f5
+ }
+ }
+
+ .wea-form-item-wrapper {
+ display: block !important;
+ }
+ }
+ }
+
+ .variable_salary_file_dialog {
+ .scroller {
+ background: #f6f6f6 !important;
+ }
+
+ .wea-slide-modal-title {
+ border-bottom: 1px solid #e5e5e5 !important;
+ }
+
+ .titleDialog {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 46px 0 16px;
+
+ .titleCol {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ }
+
+ .titleLeftBox {
+ .titleIcon {
+ color: #fff;
+ margin: 0;
+ width: 40px;
+ height: 40px;
+ line-height: 40px;
+ font-size: 22px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #F14A2D;
+ border-radius: 50%;
+ }
+
+ .title {
+ font-size: 14px;
+ color: #333;
+ padding-left: 6px;
+ }
+ }
+
+ .titleRightBox {
+ justify-content: flex-end;
+
+ button:last-child {
+ margin-left: 10px;
+ }
+ }
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js
index 142caa6d..40dcf875 100644
--- a/pc4mobx/hrmSalary/stores/attendanceStore.js
+++ b/pc4mobx/hrmSalary/stores/attendanceStore.js
@@ -22,6 +22,9 @@ export class AttendanceStore {
@observable extensionForm = new WeaForm(); //扩展属性
@action("报表查看-扩展属性表单初始化")
initExtensionForm = () => this.extensionForm = new WeaForm();
+ @observable tempForm = new WeaForm(); //扩展属性
+ @action("薪资明细-模板设置表单初始化")
+ initTempForm = () => this.tempForm = new WeaForm();
@action("报表查看-分享报表表单初始化")
initShareForm = () => this.shareForm = new WeaForm();
diff --git a/pc4mobx/hrmSalary/stores/baseTable.js b/pc4mobx/hrmSalary/stores/baseTable.js
index cc639b54..f41ed561 100644
--- a/pc4mobx/hrmSalary/stores/baseTable.js
+++ b/pc4mobx/hrmSalary/stores/baseTable.js
@@ -1,8 +1,9 @@
-import { observable, action, toJS } from 'mobx';
-import { message } from 'antd';
-import { WeaForm, WeaTableNew } from 'comsMobx';
+import { action, observable } from "mobx";
+import { message } from "antd";
+import { WeaForm, WeaTableNew } from "comsMobx";
-import * as API from '../apis'; // 引入API接口文件
+import * as API from "../apis"; // 引入API接口文件
+import { getVariableSalaryList } from "../apis/variableSalary"; //浮动薪酬-薪资档案列表查询
const { TableStore } = WeaTableNew;
@@ -14,12 +15,39 @@ export class BaseTableStore {
@observable showSearchAd = false; // 高级搜索面板显示
@observable loading = true; // 数据加载状态
+ // 浮动薪酬相关
+ @observable VExtraSalryForm = new WeaForm(); // 浮动薪酬extra查询form
+ @observable VSalryForm = new WeaForm(); // 浮动薪酬查询form
+ @observable VSSalaryItemForm = new WeaForm(); // 新增编辑浮动薪酬项目form
+ @action initVSSalaryItemForm = () => this.VSSalaryItemForm = new WeaForm();
+ @observable VSSalaryFileForm = new WeaForm(); // 新增编辑薪资档案form
+ @action initVSSalaryFileForm = () => this.VSSalaryFileForm = new WeaForm();
+ @observable SFTableStore = new TableStore(); // 浮动薪酬-薪资档案table
+
+ @action("浮动薪酬-薪资档案列表查询")
+ getVariableSalaryList = (payload) => {
+ return new Promise((resolve, reject) => {
+ getVariableSalaryList(payload).then(res => {
+ const { data, status } = res;
+ if (status) {
+ const { dataKey } = data;
+ const { datas } = dataKey;
+ this.SFTableStore.getDatas(datas);
+ }
+ resolve(res);
+ }).catch(() => {
+ reject();
+ });
+ });
+ };
+
+
// 初始化操作
@action
doInit = () => {
this.getCondition();
this.getTableDatas();
- }
+ };
// 获得高级搜索表单数据
@action
@@ -29,10 +57,10 @@ export class BaseTableStore {
this.condition = res.condition;
this.form.initFormFields(res.condition); // 渲染高级搜索form表单
} else {
- message.error(res.msg || '接口调用失败!')
+ message.error(res.msg || "接口调用失败!");
}
}));
- }
+ };
// 渲染table数据
@action
@@ -45,11 +73,11 @@ export class BaseTableStore {
this.tableStore.getDatas(res.datas); // table 请求数据
this.hasRight = res.hasRight;
} else {
- message.error(res.msg || '接口调用失败!')
+ message.error(res.msg || "接口调用失败!");
}
this.loading = false;
}));
- }
+ };
@action
setShowSearchAd = bool => this.showSearchAd = bool;
@@ -58,6 +86,6 @@ export class BaseTableStore {
@action doSearch = () => {
this.getTableDatas();
this.showSearchAd = false;
- }
+ };
-}
\ No newline at end of file
+}
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js
index 4da841d0..52a402fa 100644
--- a/pc4mobx/hrmSalary/stores/payroll.js
+++ b/pc4mobx/hrmSalary/stores/payroll.js
@@ -69,6 +69,7 @@ export class payrollStore {
@observable salarySendDetailDataSource = []; // 详情列表DataSource
@observable salarySendDetailTableStore = new TableStore(); // 详情列表store
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
+ @observable salaryTableStore = new TableStore();//薪资查看详情页表格Store
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
@observable detailListCondition = []; // 详情页搜索条件
@observable salarySendDetailPageInfo = {};
@@ -458,7 +459,9 @@ export class payrollStore {
departmentIds: form.departmentIds ? form.departmentIds.split(",") : [],
subCompanyIds: form.subCompanyIds ? form.subCompanyIds.split(",") : []
};
+ this.loading = true;
API.getInfoList(params).then(res => {
+ this.loading = false;
if (res.status) {
this.salaryGrantTableStore = res.data.columns;
this.salaryGrantDataSource = res.data.list;
@@ -470,7 +473,7 @@ export class payrollStore {
} else {
message.error(res.errormsg || "获取失败");
}
- });
+ }).catch(() => this.loading = false);
};
// 工资单-工资单发放详情列表
diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js
index c9095936..d70e0113 100644
--- a/pc4mobx/hrmSalary/stores/payrollFiles.js
+++ b/pc4mobx/hrmSalary/stores/payrollFiles.js
@@ -24,11 +24,12 @@ export class PayrollFilesStore {
@action("薪资档案-列表查询")
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
return new Promise((resolve, reject) => {
- const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue;
+ const { departmentIds, positionIds, subcompanyIds, statuses, taxAgentIds, ...extra } = searchItemsValue;
API.queryList({
departmentIds: departmentIds ? departmentIds.split(",") : [],
positionIds: positionIds ? positionIds.split(",") : [],
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
+ taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
statuses: statuses ? statuses.split(",") : [],
...payload, ...extra, url
}).then(res => {
diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js
index ef5cfe2d..33b74a55 100644
--- a/pc4mobx/hrmSalary/stores/taxAgent.js
+++ b/pc4mobx/hrmSalary/stores/taxAgent.js
@@ -8,6 +8,15 @@ import { decentralizationConditions, editConditions } from "../pages/taxAgent/ed
const { TableStore } = WeaTableNew;
export class TaxAgentStore {
+ @observable advanceForm = new WeaForm(); //权限-角色高级搜索form表单
+ @observable roleForm = new WeaForm(); //权限-角色form表单
+ @action initRoleForm = () => this.roleForm = new WeaForm();
+ @observable roleOperatorForm = new WeaForm(); //权限-角色操作者form表单
+ @action initRoleOperatorForm = () => this.roleOperatorForm = new WeaForm();
+ @observable PageAndOptAuth = { able: false, opts: [] }; // 业务线页面权限
+ @action initPageAndOptAuth = () => this.PageAndOptAuth = { able: true, opts: ["query", "admin"] };// 设置业务线页面权限
+
+
@observable tableStore = new TableStore(); // new table
@observable form = new WeaForm(); //表单实体
@observable formDecentralization = new WeaForm(); //关闭分权表单
@@ -140,6 +149,7 @@ export class TaxAgentStore {
return new Promise((resolve, reject) => {
API.getPermission(params).then(({ status, data }) => {
if (status) {
+ this.PageAndOptAuth = data;
const { isAdminEnable, isChief, isOpenDevolution } = data;
this.setShowOperateBtn(
!isOpenDevolution ? true : isAdminEnable ? true : false
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index c543e762..c1425339 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -39,6 +39,10 @@
.form-dialog-layout {
background: #f6f6f6;
+ .wea-form-item .wea-form-item-wrapper .wea-field-readonly {
+ line-height: 28px;
+ }
+
.wea-search-group {
padding: 16px;
}
@@ -70,6 +74,40 @@
}
}
}
+
+ .multiple_select {
+ .wea-select-input .arrow {
+ position: absolute;
+ right: 4px;
+ top: 8px;
+ color: #666;
+ }
+
+ .wdb {
+ word-break: break-all !important;
+ word-wrap: break-word !important;
+ }
+
+ .wea-select-input {
+ height: 30px;
+ white-space: nowrap;
+ min-width: 100px;
+ max-width: 345px;
+ width: 100%;
+ display: inline-block;
+ padding: 4px 17px 4px 4px;
+ position: relative;
+ min-height: 30px;
+ border: 1px solid #d9d9d9;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ }
}
.multipleSelect-layout {
@@ -89,3 +127,10 @@
}
+//公共slide框标题样式
+.zIndex0-weaslide-title {
+ .wea-new-top-req {
+ z-index: 0 !important;
+ }
+}
+
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index c95ea59c..0ce4532f 100644
--- a/pc4mobx/hrmSalary/util/index.js
+++ b/pc4mobx/hrmSalary/util/index.js
@@ -26,7 +26,7 @@ export const getConditionFields = (condition) => {
};
// 渲染form表单: 一般对form的渲染都统一使用该方法
-export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
+export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title, classnames = "") => {
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
@@ -41,7 +41,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
tipPosition="bottom" // 错误提示的显示位置: top/bottom
- className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""}
+ className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames}
>