Merge branch 'hotfix/2.15.1.2407.01' into release/2.15.1.2407.01
This commit is contained in:
commit
d09c5f1d96
|
|
@ -97,7 +97,7 @@ class Index extends Component {
|
|||
effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "",
|
||||
operateTime: operateTime1 ? `${operateTime1},${operateTime2}` : ""
|
||||
};
|
||||
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_target");
|
||||
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_blank");
|
||||
this.handleDebounce = null;
|
||||
}, 500);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/9/25
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { WeaBrowser, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import cs from "classnames";
|
||||
import { Col, Row } from "antd";
|
||||
import "./index.less";
|
||||
|
|
@ -13,6 +13,48 @@ import "./index.less";
|
|||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class EditSalaryBaseInfo extends Component {
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (this.props.visible !== nextProps.visible && nextProps.visible && !_.isEmpty(nextProps.baseInfo)) {
|
||||
nextProps.onChange(_.map(nextProps.baseInfo, it => {
|
||||
const { fieldValue, canEdit, fieldValueObj } = it;
|
||||
if (canEdit) {
|
||||
const { id: value, name: valueSpan } = fieldValueObj || fieldValue;
|
||||
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
|
||||
}
|
||||
return { ...it };
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
renderBrowser = (item) => {
|
||||
const { fieldType, fieldValue, fieldCode } = item;
|
||||
const { id: value, name: valueSpan } = fieldValue;
|
||||
let browserType = {};
|
||||
switch (fieldType) {
|
||||
case "subcompanyBrowser":
|
||||
browserType = { ...browserType, type: 164, title: getLabel(111, "选择分部") };
|
||||
break;
|
||||
case "departmentBrowser":
|
||||
browserType = { ...browserType, type: 4, title: getLabel(111, "选择部门") };
|
||||
break;
|
||||
case "jobtitleBrowser":
|
||||
browserType = { ...browserType, type: 24, title: getLabel(111, "选择岗位") };
|
||||
break;
|
||||
case "jobcallBrowser":
|
||||
browserType = { ...browserType, type: 260, title: getLabel(111, "选择职称") };
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return <WeaBrowser {...browserType} viewAttr={3} value={value} valueSpan={valueSpan} inputStyle={{ width: 200 }}
|
||||
onChange={(value, valueSpan) => this.props.onChange(_.map(this.props.baseInfo, it => {
|
||||
if (fieldCode === it.fieldCode) {
|
||||
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
|
||||
}
|
||||
return { ...it };
|
||||
}))}/>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { baseInfo } = this.props;
|
||||
return (
|
||||
|
|
@ -32,7 +74,7 @@ class EditSalaryBaseInfo extends Component {
|
|||
<Row type="flex" className="esf-form-content">
|
||||
{
|
||||
_.map(baseInfo, (item, index) => {
|
||||
const { fieldName, fieldValue } = item;
|
||||
const { fieldName, fieldType, fieldValue, fieldValueObj } = item;
|
||||
return (
|
||||
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 24 : 12}>
|
||||
<Row className={cs("esf-form-item", {
|
||||
|
|
@ -43,7 +85,13 @@ class EditSalaryBaseInfo extends Component {
|
|||
<span className="label" title={fieldName}>{fieldName}</span>
|
||||
</Col>
|
||||
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 21 : 18}>
|
||||
<span className="value" title={fieldValue}>{fieldValue}</span>
|
||||
<span className="value" title={fieldValue}>
|
||||
{
|
||||
fieldType.indexOf("Browser") !== -1 ?
|
||||
this.renderBrowser({ ...item, fieldValue: fieldValueObj || fieldValue }) :
|
||||
fieldValue
|
||||
}
|
||||
</span>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/9/25
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, message } from "antd";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaTab } from "ecCom";
|
||||
import EditSalaryBaseInfo from "./baseInfo";
|
||||
import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
|
||||
|
|
@ -87,9 +87,16 @@ class EditSalaryCalcSlide extends Component {
|
|||
};
|
||||
save = () => {
|
||||
const { id: salaryAcctEmpId } = this.props;
|
||||
const { issuedAndReissueItems, itemsByGroup } = this.state;
|
||||
const { issuedAndReissueItems, itemsByGroup, baseInfo } = this.state;
|
||||
if (_.every(baseInfo, it => !it.canEdit || (it.canEdit && !it.fieldValue))) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
salaryAcctEmpId,
|
||||
salaryAcctEmpId, employeeInfos: baseInfo,
|
||||
items: [
|
||||
..._.reduce(itemsByGroup, (pre, cur) => {
|
||||
return [
|
||||
|
|
@ -133,7 +140,8 @@ class EditSalaryCalcSlide extends Component {
|
|||
top={0} width={60} height={100} measure={"%"}
|
||||
direction={"right"} title={this.renderTitle()}
|
||||
content={<div className="salary-calculate-esf-area">
|
||||
<EditSalaryBaseInfo baseInfo={baseInfo}/>
|
||||
<EditSalaryBaseInfo {...this.props} baseInfo={baseInfo}
|
||||
onChange={baseInfo => this.setState({ baseInfo })}/>
|
||||
<WeaTab keyParam="viewcondition" className="calc-esf-tab"
|
||||
selectedKey={selectedKey} onChange={v => this.setState({ selectedKey: v })}
|
||||
datas={!_.isEmpty(issuedAndReissueItems) ? topTab : topTab.slice(0, 1)}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class ReportContent extends Component {
|
|||
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
|
||||
}
|
||||
});
|
||||
} else if (id === "PAGEINFO") {
|
||||
} else if (id === "PAGEINFO_REPORT") {
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -412,7 +412,10 @@ const StatisticalScopePicker = (props) => {
|
|||
<WeaDatePicker
|
||||
value={startDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||
if (!current || !endDate) return false;
|
||||
const start = moment(startDate || endDate).subtract(11, "months").format("YYYY-MM");
|
||||
const end = moment(startDate).add(12, "months").format("YYYY-MM");
|
||||
return current.getTime() < new Date(start).getTime() || current.getTime() > new Date(endDate || end).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => onChange([val, endDate], timeType)}
|
||||
|
|
@ -422,7 +425,11 @@ const StatisticalScopePicker = (props) => {
|
|||
<WeaDatePicker
|
||||
value={endDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
||||
if (!current || !startDate) return false;
|
||||
const start = moment(endDate).subtract(12, "months").format("YYYY-MM");
|
||||
const end = moment(endDate || startDate).add(12, "months").format("YYYY-MM");
|
||||
|
||||
return current.getTime() > new Date(end).getTime() || current.getTime() < new Date(startDate || start).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
viewAttr={viewAttr}
|
||||
|
|
|
|||
Loading…
Reference in New Issue