Merge branch 'release/2.15.1.2407.01' into release/2.15.1.2407.01-个税

This commit is contained in:
黎永顺 2024-09-05 16:02:53 +08:00
commit fdfd784c64
10 changed files with 232 additions and 23 deletions

View File

@ -242,13 +242,21 @@ class Index extends Component {
<BaseInfo {...this.props}/>
<WeaTab
datas={tabDatas} keyParam="viewcondition" selectedKey={selectedKey}
onChange={v => this.setState({ selectedKey: v }, () => this.queryPCList())}
onChange={v => this.setState({
selectedKey: v,
pageInfo: { ...pageInfo, current: 1 }
}, () => this.queryPCList())}
onSearch={v => this.setState({
pageInfo: { ...pageInfo, current: 1 }
}, () => this.queryPCList())}
onAdSearch={v => this.setState({
pageInfo: { ...pageInfo, current: 1 }
}, () => this.queryPCList())}
buttons={this.renderTabBtns()} searchType={["base", "advanced"]} advanceHeight={220}
showSearchAd={showSearchAd} setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
searchsAd={getSearchs(PCSearchForm, searchConditions, 2, false)}
onSearchChange={(v) => PCSearchForm.updateFields({ employeeName: v })}
searchsBaseValue={PCSearchForm.getFormParams().employeeName}
onSearch={this.queryPCList} onAdSearch={this.queryPCList}
onAdReset={() => PCSearchForm.resetForm()} autoCalculateWidth
/>
<WeaTable

View File

@ -271,6 +271,9 @@ class EditCalcTable extends Component {
}
}).catch(() => this.setState({ loading: false }));
};
handleQuery = () => {
this.setState({ pageInfo: { ...this.state.pageInfo, current: 1 } }, () => this.queryCalcResultList());
};
handleBatchEditing = () => {
};

View File

@ -30,7 +30,7 @@ class Index extends Component {
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
onAdSearch = (bool = true) => {
this.calcTableRef.wrappedInstance.queryCalcResultList();
this.calcTableRef.wrappedInstance.handleQuery();
bool && this.openAdvanceSearch();
};
init = async () => {

View File

@ -127,7 +127,8 @@ class LedgerSlide extends Component {
return {
...item,
items: _.map(item.items, it => {
// delete it.formulaContent;
delete it.originFormulaContent;
delete it.originSqlContent;
// if (it.id && it.id.length > 4) delete it.id;
return { ...it };
})
@ -135,7 +136,8 @@ class LedgerSlide extends Component {
}),
items: _.map(_.find(itemGroups, it => it.name === "未分类").items, child => {
// if (child.id && child.id.length > 4) delete child.id;
// delete child.formulaContent;
delete child.originFormulaContent;
delete child.originSqlContent;
return { ...child };
}) || [],
salarySobId: salarySobId || saveSalarySobId

View File

@ -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
}));
}
}

View File

@ -29,8 +29,8 @@ 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: "",
@ -69,10 +69,15 @@ 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") {
@ -282,7 +287,7 @@ class ReportContent extends Component {
onCancel={() => this.setState({
povitView: {
visible: false, id: "", dimensionId: "", dimensionValue: "",
isShare: false
isShare: false, salaryStartMonth: "", salaryEndMonth: ""
}
})}
/>

View File

@ -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 = [
<Button type="primary" onClick={() => onCancel({
validate: false, changeData: true
})}>{getLabel(111, "保存并自动修改基数")}</Button>,
<Button type="ghost" onClick={() => onCancel({
validate: false, changeData: false
})}>{getLabel(111, "仅保存方案设置")}</Button>
];
return (
<WeaDialog
{...this.props} hasScroll className="baseChangeDialog" initLoadCss ref={dom => 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)"
}}
>
<div className="baseChangeContent">
<Alert
message={getLabel(111, "是否需要将社保档案中不满足上下限的基数值,自动设置为对应的上限或下限值?")}
description={getLabel(111, "以下员工的社保福利档案基数大于上限值,或小于下限值:")}
type="warning"/>
{
!_.isEmpty(dataSource) ? <WeaTransferList
data={dataSource} renderItem={(it) => (<div className="detailBox">
<div className="order">{it.id}</div>
<div className="content" title={it.name}>{it.name}</div>
</div>)}
height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]}
/> : <div className="empty">{getLabel(111, "")}</div>
}
</div>
</WeaDialog>
);
}
}
export default BaseValidateDialog;

View File

@ -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) {
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 (
<WeaSlideModal
@ -207,6 +227,14 @@ class Index extends Component {
<PlanSetTable dataSource={planDatas} selectedKey={selectedKey} showOperateBtn={showOperateBtn}
onPlanSet={this.handleSetPlanDatas}/>
</WeaSearchGroup>
{/* */}
<BaseValidateDialog {...baseValidateDialog}
onCancel={(validatePayload = {}) => this.setState({
baseValidateDialog: {
visible: false, baseChangeInfo: [],
validatePayload: { validate: true, changeData: false, ...validatePayload }
}
}, () => !_.isEmpty(validatePayload) && this.save())}/>
</div>}
/>
);

View File

@ -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;

View File

@ -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;
}
}
}
}
}
}
}