Merge branch 'hotfix/2.9.42309.01' into release/2.9.42309.01

This commit is contained in:
黎永顺 2023-09-21 14:16:40 +08:00
commit 0c1fdd7d13
10 changed files with 148 additions and 180 deletions

View File

@ -117,6 +117,7 @@ export default class BaseInformForm extends React.Component {
{
this.state.inited &&
<WeaSelect
disabled={this.props.id}
viewAttr={3}
options={options}
value={salarySob ? salarySob : ""}

View File

@ -94,7 +94,7 @@ export default class ComputerTemplate extends React.Component {
<div className="sobItemWrapper">
{
salaryItemSet.length > 0 &&
salaryItemSet.map((group, index) => {
_.filter(salaryItemSet, it => (!_.isNil(it) && !_.isEmpty(it))).map((group, index) => {
return <div className="sobItem">
<div className="descript-title">{group.groupName}</div>
<div className="descriptions-view">

View File

@ -75,7 +75,7 @@ export default class PhoneTemplate extends React.Component {
<div className="sobItemWrapper">
{
salaryItemSet.length > 0 &&
salaryItemSet.map((group, index) => (
_.filter(salaryItemSet, it => (!_.isNil(it) && !_.isEmpty(it))).map((group, index) => (
<div className="sobItem">
<div className="descript-title">{group.groupName}</div>
<div className="descriptions-view">

View File

@ -11,15 +11,16 @@ class AllWithoutPay extends Component {
message.warning("未选择条目");
return;
}
API.gotoStop(selectedRowKeys).then(({ status, errormsg }) => {
API.gotoStop(selectedRowKeys).then(({ status, data, errormsg }) => {
if (status) {
message.success("操作成功!");
const { msg } = data;
message.info(msg || "操作成功!");
refreshList();
} else {
message.error(errormsg || "操作失败!");
}
});
}else{
} else {
const { pageInfo } = this.props;
if (pageInfo.total === 0) {
message.warning("您没有需要处理的待停薪人员!");
@ -31,7 +32,7 @@ class AllWithoutPay extends Component {
onOk: () => {
API.allGotoStop({}).then(({ status, data, errormsg }) => {
if (status) {
const { msg }= data;
const { msg } = data;
message.info(msg || "操作成功!");
refreshList();
} else {

View File

@ -1,114 +1,10 @@
// 社保
export const socialSecurityColumns = [{
title: "方案名称",
dataIndex: "title",
key: "title"
}, {
title: "缴纳类型",
dataIndex: "username",
key: "username"
}, {
title: "缴纳范围",
dataIndex: "projectName",
key: "projectName"
}, {
title: "备注",
dataIndex: "customer",
key: "customer"
}, {
title: "操作",
dataIndex: "customer",
key: "customer"
}];
// 公积金
export const accumulationFundColumns = [{
title: "方案名称",
dataIndex: "title",
key: "title"
}, {
title: "缴纳类型",
dataIndex: "username",
key: "username"
}, {
title: "缴纳范围",
dataIndex: "projectName",
key: "projectName"
}, {
title: "备注",
dataIndex: "customer",
key: "customer"
}, {
title: "操作",
dataIndex: "customer",
key: "customer"
}];
// 企业年金及其他福利
export const otherBenefitsColumns = [
{
title: "方案名称",
dataIndex: "title",
key: "title"
},
{
title: "缴纳类型",
dataIndex: "title",
key: "title"
},
{
title: "缴纳范围",
dataIndex: "title",
key: "title"
},
{
title: "备注",
dataIndex: "title",
key: "title"
},
{
title: "操作",
dataIndex: "title",
key: "title"
}
];
export const CustomBenefitsColumns = [
{
title: "福利名称",
dataIndex: "title",
key: "title"
},
{
title: "启用",
dataIndex: "title",
key: "title"
},
{
title: "类型",
dataIndex: "title",
key: "title"
},
{
title: "缴纳对象",
dataIndex: "title",
key: "title"
},
{
title: "操作",
dataIndex: "title",
key: "title"
}
];
export const insertUpdateColumns = [
{
title: "类型名称",
dataIndex: "insuranceName",
key: "insuranceName",
width: 120,
fixed: 'left'
fixed: "left"
},
{
title: "是否缴费",
@ -172,8 +68,39 @@ export const insertUpdateColumns = [
}
];
export const dataSource = [];
export const conditons = [
{
items: [
{
colSpan: 2,
conditionType: "INPUT",
domkey: ["schemeName"],
fieldcol: 12,
isQuickSearch: true,
label: "方案名称",
lanId: 33162,
labelcol: 6,
value: "",
viewAttr: 2
},
{
colSpan: 2,
conditionType: "SELECT",
domkey: ["paymentTypeEnum"],
fieldcol: 12,
isQuickSearch: true,
label: "缴纳类型",
lanId: 543163,
labelcol: 6,
value: "",
options: [],
viewAttr: 2
}
],
title: "",
defaultshow: true
}
];

View File

@ -141,6 +141,11 @@ export default class DefaultSlideForm extends React.Component {
key: "2",
selected: true,
showname: "2"
},
{
key: "3",
selected: false,
showname: "3"
}
];
item.render = (text, record) => {

View File

@ -2,9 +2,8 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
import { renderNoright } from "../../../util";
import CustomTab from "../../../components/customTab";
import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTab, WeaTools, WeaTop } from "ecCom";
import { getSearchs, renderNoright } from "../../../util";
import SlideModalTitle from "../../../components/slideModalTitle";
import TipLabel from "../../../components/TipLabel";
import DefaultSlideForm from "./defaultSlideForm";
@ -14,8 +13,10 @@ import CustomPaginationTable from "../../../components/customPaginationTable";
import TwoColContent from "../../../components/twoColContent";
import CopySchemaModal from "./copySchemaModal";
import CustomBenefitsTable from "./customBenefitsTable";
import { conditons } from "./columns";
import "./index.less";
const getKey = WeaTools.getKey;
const { getLabel } = WeaLocaleProvider;
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
@observer
@ -30,7 +31,8 @@ export default class Programme extends React.Component {
copyModalValue: "",
copyId: "",
customNewVisible: false,
customEdit: false
customEdit: false,
showSearchAd: false
};
this.pageInfo = { current: 1, pageSize: 10 };
@ -38,12 +40,29 @@ export default class Programme extends React.Component {
componentWillMount() {
const { programmeStore, salaryFileStore, taxAgentStore } = this.props;
const { doInit } = programmeStore;
const { doInit, planSearchForm } = programmeStore;
doInit();
const { commonEnumList } = salaryFileStore;
commonEnumList("user", { enumClass: "com.engine.salary.enums.sicategory.SharedTypeEnum" });
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
getTaxAgentSelectListAsAdmin();
planSearchForm.initFormFields(_.map(conditons, item => {
return {
...item,
items: _.map(item.items, o => {
if (getKey(o) === "paymentTypeEnum") {
return {
...o,
options: [
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
]
};
}
return { ...o };
})
};
}));
}
// 增加编辑功能重写columns绑定事件
@ -173,6 +192,7 @@ export default class Programme extends React.Component {
}
render() {
const { showSearchAd } = this.state;
const { programmeStore, taxAgentStore: { showOperateBtn } } = this.props;
const { loading, hasRight, form, getTableDatas } = programmeStore;
const {
@ -187,7 +207,8 @@ export default class Programme extends React.Component {
customNewVisible,
tableDataSource,
tableColumns,
tablePageInfo
tablePageInfo,
planSearchForm
} = programmeStore;
if (!hasRight && !loading) return renderNoright();
@ -317,59 +338,65 @@ export default class Programme extends React.Component {
const { programmeStore: { initSlideParms } } = this.props;
initSlideParms();
};
const customButtons = [
<WeaSelect
options={options}
value={customSelectkey}
style={{ width: "150px" }}
onChange={v => {
setCustomSelectkey(v);
this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v });
}}
/>
];
const tabButtons = [
<Button type="primary" onClick={() => {
selectedKey === "custom" ? handleCustomNewClick() : handleNewClick();
}}>{getLabel(365, "新建")}</Button>
];
return (
<div className="socialSecurityAndWelfareSchemeWrapper">
<WeaTop
title="社保福利方案" // 文字
icon={<i className="icon-coms-fa"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={false} // 是否显示下拉按钮
title="社保福利方案" icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D" showDropIcon={false}
>
<CustomTab
topTab={topTab}
searchOperationItem={
<div>
{/* 操作按钮权限 */}
{showOperateBtn &&
<Button
type="primary"
style={{ marginRight: "10px" }}
onClick={() => {
if (selectedKey == "custom") {
handleCustomNewClick();
} else {
handleNewClick();
}
}}>
新建
</Button>}
{selectedKey == "custom" &&
<WeaSelect
options={options}
value={customSelectkey}
style={{ width: "150px" }}
onChange={v => {
setCustomSelectkey(v);
this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v });
}}
/>}
</div>
}
<WeaTab
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey}
searchType={selectedKey !== "custom" ? ["base", "advanced"] : []}
showSearchAd={showSearchAd}
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
advanceHeight={200} searchsAd={getSearchs(planSearchForm, _.map(conditons, item => {
return {
...item,
items: _.map(item.items, o => {
if (getKey(o) === "paymentTypeEnum") {
return {
...o,
options: [
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
]
};
}
return { ...o };
})
};
}), 2, false)}
onAdSearch={() => getTableDatas(selectedKey)}
onAdReset={v => planSearchForm.resetForm()}
onSearch={() => getTableDatas(selectedKey)}
onChange={v => {
setSelectedKey(v);
handleSlideClose();
if (v == "custom") {
// 自定义福利
} else {
getTableDatas(v);
}
v !== "custom" && getTableDatas(v);
}}
onSearchChange={v => planSearchForm.updateFields({ schemeName: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
searchsBaseValue={planSearchForm.getFormParams().schemeName}
buttons={!showOperateBtn ? [] : selectedKey !== "custom" ? tabButtons : [...tabButtons, ...customButtons]}
/>
<div className="tableWrapper">
<WeaNewScroll height="100%">
{selectedKey == "custom"
{selectedKey === "custom"
? <TwoColContent
leftContent={
<CustomBenefitsTable

View File

@ -260,7 +260,7 @@ class AdjustTable extends Component {
dataSource: _.map(dataSource, (item, idx) => {
if (index === idx) {
return {
...item,
...item, adjustTo: "",
companyTotal: data[0].totalNum,
adjustToOptions: categoryType ? _.map(categoryType.split(","), tmpV => {
return _.find(item.categoryTypeOptions, tmpJ => tmpJ.key === tmpV);
@ -330,7 +330,7 @@ class AdjustTable extends Component {
};
handleClick = (record) => {
const { status, id, paymentOrganization, billMonth } = record;
const { status, id, paymentOrganization, billMonth, employeeId } = record;
const { targetOptions } = this.state;
if (status) {
Modal.confirm({
@ -338,7 +338,8 @@ class AdjustTable extends Component {
content: "确定撤回吗?撤回后该笔调差将失效!",
onOk: () => {
const payload = { id, paymentOrganization, billMonth };
compensationBack(payload).then(({ status, data, errormsg }) => {
compensationBack(payload).then(async ({ status, data, errormsg }) => {
const { data: categoryTypeOptions } = await compensationCategoryType({ id: _.find(targetOptions, child => child.employeeId == employeeId).target });
if (status) {
message.success(data || "撤回成功");
this.setState({
@ -347,7 +348,11 @@ class AdjustTable extends Component {
return {
...it,
status: false,
uuid: new Date().getTime() + idx
uuid: new Date().getTime() + idx,
categoryTypeOptions: _.map(categoryTypeOptions, child => ({
key: child.id,
showname: child.content
}))
};
}
return { ...it, uuid: new Date().getTime() + idx };

View File

@ -73,7 +73,7 @@ class AdjustmentSlide extends Component {
const { data: dataMsg, errorMessage = [] } = data;
const msg = dataMsg + errorMessage.join(",");
!_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || "保存成功");
_.isEmpty(errorMessage) &&
// _.isEmpty(errorMessage) &&
this.adjustTableRef.getCompensationList().then(r => {
});
} else {

View File

@ -8,6 +8,10 @@ import { notNull } from "../util/validate";
const { TableStore } = WeaTableNew;
export class ProgrammeStore {
//lys-表单初始化(方案查询表单)
@observable planSearchForm = new WeaForm();
@observable tableStore = new TableStore(); // new table
@observable condition = []; // 存储后台得到的form数据
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@ -94,20 +98,18 @@ export class ProgrammeStore {
@action
getTableDatas = (selectKey = "SOCIAL_SECURITY", params) => {
this.loading = true;
const formParams = this.form.getFormParams() || {};
params = params || formParams;
params.welfareTypeEnum = selectKey;
API.getTable(params).then(action(res => {
if (res.status) { // 接口请求成功/失败处理
// this.tableStore.getDatas(res.data.datas); // table 请求数据
this.tableDataSource = res.data.list ? res.data.list : [];
this.tableColumns = res.data.columns;
this.tablePageInfo = res.data;
} else {
message.error(res.errormsg || "接口调用失败!");
}
this.loading = false;
}));
API.getTable({ ...params, ...this.planSearchForm.getFormParams(), welfareTypeEnum: selectKey })
.then(action(res => {
if (res.status) { // 接口请求成功/失败处理
// this.tableStore.getDatas(res.data.datas); // table 请求数据
this.tableDataSource = res.data.list ? res.data.list : [];
this.tableColumns = res.data.columns;
this.tablePageInfo = res.data;
} else {
message.error(res.errormsg || "接口调用失败!");
}
this.loading = false;
}));
};