Merge branch 'release/2.9.10.2312.02' into release/2.9.9.2312.02-个税
# Conflicts: # pc4mobx/hrmSalary/pages/calculate/calculate.js # pc4mobx/hrmSalary/pages/declare/declare.js # pc4mobx/hrmSalary/pages/mySalaryBenefits/index.js # pc4mobx/hrmSalary/pages/payrollRelease/index.js
This commit is contained in:
commit
a33b47373d
|
|
@ -5,6 +5,10 @@ import { postFetch } from "../util/request";
|
||||||
export const getArchiveList = params => {
|
export const getArchiveList = params => {
|
||||||
return postFetch("/api/bs/hrmsalary/salaryArchive/list", params);
|
return postFetch("/api/bs/hrmsalary/salaryArchive/list", params);
|
||||||
};
|
};
|
||||||
|
//薪资档案的高级搜索
|
||||||
|
export const getSaCondition = params => {
|
||||||
|
return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params);
|
||||||
|
};
|
||||||
//薪资档案-获取薪资档案详情表单
|
//薪资档案-获取薪资档案详情表单
|
||||||
export const getArchiveForm = params => {
|
export const getArchiveForm = params => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getForm", "get", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getForm", "get", params);
|
||||||
|
|
@ -100,7 +104,3 @@ export const getSingleSalaryItemInfo = (params) => {
|
||||||
export const editSingleSalaryItem = (params) => {
|
export const editSingleSalaryItem = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/editSingleSalaryItem", params);
|
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/editSingleSalaryItem", params);
|
||||||
};
|
};
|
||||||
// 基数调整记录列表
|
|
||||||
export const getAdjustHistoryList = (params) => {
|
|
||||||
return postFetch("/api/bs/hrmsalary/archives/getAdjustHistoryList", params);
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -108,14 +108,14 @@ export const deleteSalaryacct = (params) => {
|
||||||
|
|
||||||
// 薪资记录--归档薪资核算记录
|
// 薪资记录--归档薪资核算记录
|
||||||
export const fileSalaryAcct = (params) => {
|
export const fileSalaryAcct = (params) => {
|
||||||
return WeaTools.callApi(`/api/bs/hrmsalary/salaryacct/file`, "GET", params);
|
// return WeaTools.callApi(`/api/bs/hrmsalary/salaryacct/file`, "GET", params);
|
||||||
// return fetch(`/api/bs/hrmsalary/salaryacct/file?id=${params.id}`, {
|
return fetch(`/api/bs/hrmsalary/salaryacct/file?id=${params.id}`, {
|
||||||
// method: "GET",
|
method: "GET",
|
||||||
// mode: "cors",
|
mode: "cors",
|
||||||
// headers: {
|
headers: {
|
||||||
// "Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
// }
|
}
|
||||||
// }).then(res => res.json());
|
}).then(res => res.json());
|
||||||
};
|
};
|
||||||
// 薪资记录-回算
|
// 薪资记录-回算
|
||||||
export const backCalculate = (params) => {
|
export const backCalculate = (params) => {
|
||||||
|
|
@ -246,3 +246,7 @@ export const getExportField = params => {
|
||||||
export const customCacheExportField = (params) => {
|
export const customCacheExportField = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheExportField", params);
|
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheExportField", params);
|
||||||
};
|
};
|
||||||
|
//薪资核算-批量更新
|
||||||
|
export const salaryacctBatchUpdate = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/batchUpdate", params);
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -105,5 +105,8 @@ export const exportArchives = (ids) => {
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
// 基数调整记录列表
|
||||||
|
export const getAdjustHistoryList = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/archives/getAdjustHistoryList", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,32 +7,31 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
import { dealTemplate } from "../pcTemplate";
|
import { dealTemplate } from "../pcTemplate";
|
||||||
import moment from "moment";
|
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { theme, background, tip, tipPosi, itemTypeList } = this.props;
|
const { theme, background, tip, tipPosi, itemTypeList, title } = this.props;
|
||||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "mobile");
|
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "mobile");
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div className="pbmc-head">{getLabel(111, "薪酬预览")}</div>
|
{/*<div className="pbmc-head">{title || getLabel(111, "薪酬预览")}</div>*/}
|
||||||
<div className="pbmc-body">
|
<div className="pbmc-body">
|
||||||
<div className="weapp-salary-payroll-mobile-preview">
|
<div className="weapp-salary-payroll-mobile-preview">
|
||||||
<div className="bill-container">
|
<div className="bill-container">
|
||||||
<div className="bill-info-header">
|
<div className="bill-info-header">
|
||||||
<div className="title">{theme || ""}</div>
|
<div className="title">{theme || ""}</div>
|
||||||
<div className="time">{moment().format("YYYY-MM-DD HH:mm:ss")}</div>
|
{/*<div className="time">{moment().format("YYYY-MM-DD HH:mm:ss")}</div>*/}
|
||||||
{
|
{/*{*/}
|
||||||
background &&
|
{/* background &&*/}
|
||||||
<div className="img"><img src={`${background}`} alt="logo"/></div>
|
{/* <div className="img"><img src={`${background}`} alt="logo"/></div>*/}
|
||||||
}
|
{/*}*/}
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
!onlyOneGrup && tipPosi === "1" && tip &&
|
!onlyOneGrup && tipPosi.toString() === "1" && tip &&
|
||||||
<div className="corporate-culture-text top" title={tip}>{tip}</div>
|
<div className="corporate-culture-text top" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
|
||||||
}
|
}
|
||||||
<div className="salary-detail-table-container">
|
<div className="salary-detail-table-container">
|
||||||
{
|
{
|
||||||
|
|
@ -46,10 +45,11 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
<div className="group-list">
|
<div className="group-list">
|
||||||
{
|
{
|
||||||
(onlyOneGrup && tipPosi === "1" && tip) && (<div className="list-item send-tip top">
|
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (
|
||||||
<div className="label">{getLabel(111, "发放说明")}</div>
|
<div className="list-item send-tip top">
|
||||||
<div className="detail">{tip}</div>
|
<div className="label">{getLabel(111, "发放说明")}</div>
|
||||||
</div>)
|
<div className="detail">{tip}</div>
|
||||||
|
</div>)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
items.map((templatItem, index) => {
|
items.map((templatItem, index) => {
|
||||||
|
|
@ -57,15 +57,16 @@ class Index extends Component {
|
||||||
return <div className="list-item" key={index}>
|
return <div className="list-item" key={index}>
|
||||||
<div className="item-name" title={salaryItemShowName || name}><span
|
<div className="item-name" title={salaryItemShowName || name}><span
|
||||||
className="text">{salaryItemShowName || name || ""}</span></div>
|
className="text">{salaryItemShowName || name || ""}</span></div>
|
||||||
<div className="item-count">{salaryItemValue || "100"}</div>
|
<div className="item-count">{salaryItemValue}</div>
|
||||||
</div>;
|
</div>;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
(onlyOneGrup && tipPosi === "2" && tip) && (<div className="list-item send-tip bottom">
|
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (
|
||||||
<div className="label">{getLabel(111, "发放说明")}</div>
|
<div className="list-item send-tip bottom">
|
||||||
<div className="detail">{tip}</div>
|
<div className="label">{getLabel(111, "发放说明")}</div>
|
||||||
</div>)
|
<div className="detail">{tip}</div>
|
||||||
|
</div>)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
|
|
@ -73,9 +74,10 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
!onlyOneGrup && tipPosi === "2" && tip &&
|
!onlyOneGrup && tipPosi.toString() === "2" && tip &&
|
||||||
<div className="corporate-culture-text footer" title={tip}>{tip}</div>
|
<div className="corporate-culture-text footer" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
|
||||||
}
|
}
|
||||||
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.pbmc-body {
|
.pbmc-body {
|
||||||
height: calc(100% - 150px);
|
height: calc(100% - 50px);
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
|
|
@ -20,6 +20,18 @@
|
||||||
.bill-container {
|
.bill-container {
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.ant-btn {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.bill-info-header {
|
.bill-info-header {
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
|
|
||||||
|
|
@ -28,6 +40,7 @@
|
||||||
font-size: 19px;
|
font-size: 19px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
|
|
@ -55,7 +68,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.corporate-culture-text {
|
.corporate-culture-text {
|
||||||
font-size: 14px;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
color: #111;
|
color: #111;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
|
|
@ -72,15 +84,13 @@
|
||||||
|
|
||||||
.group-title {
|
.group-title {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
background: var(--base-white);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
color: #2780c4;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-height: 45px;
|
min-height: 45px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
border-bottom: 1px solid #f2f2f2;
|
border-bottom: 1px solid #f2f2f2;
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-list {
|
.group-list {
|
||||||
|
|
@ -92,16 +102,13 @@
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.item-name {
|
.item-name {
|
||||||
font-size: 16px;
|
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
width: 40%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: #fbfbfb;
|
background: #fbfbfb;
|
||||||
border-right: 1px solid #f2f2f2;
|
border-right: 1px solid #f2f2f2;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
color: #2780c4;
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-count {
|
.item-count {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { dealTemplate } from "./index";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Content extends Component {
|
||||||
|
render() {
|
||||||
|
const { theme, background, tip, tipPosi, itemTypeList, sendTime = new Date() } = this.props;
|
||||||
|
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc");
|
||||||
|
return (
|
||||||
|
<div className="salary-preview-container">
|
||||||
|
<div style={{ border: "10px solid #F6F6F6" }}>
|
||||||
|
<div className="edition-center">
|
||||||
|
<div className="header">
|
||||||
|
<div className="header-title">{theme || ""}</div>
|
||||||
|
{/*<div className="header-salary-date-time">{moment(sendTime).format("YYYY-MM-DD HH:mm:ss")}</div>*/}
|
||||||
|
</div>
|
||||||
|
<div className="body">
|
||||||
|
{/*{*/}
|
||||||
|
{/* background &&*/}
|
||||||
|
{/* <div className="comp-img"><img src={`${background}`} alt="logo"/></div>*/}
|
||||||
|
{/*}*/}
|
||||||
|
{
|
||||||
|
!onlyOneGrup && tipPosi.toString() === "1" && tip &&
|
||||||
|
<div className="corporate-culture-text" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
|
||||||
|
}
|
||||||
|
<div className="data-detail">
|
||||||
|
{
|
||||||
|
showData.map((groupItem, index) => {
|
||||||
|
// 如果当前组下没有条目 当前组直接不展示。
|
||||||
|
if (!groupItem) return null;
|
||||||
|
const { groupId, groupName, items = [] } = groupItem;
|
||||||
|
return (
|
||||||
|
<div className="salary-group" key={groupId || index}>
|
||||||
|
{
|
||||||
|
groupName ? <div className="group-title">{groupName}</div> : null
|
||||||
|
}
|
||||||
|
<div className="group-list">
|
||||||
|
{
|
||||||
|
(onlyOneGrup && tipPosi.toString() === "1" && tip) && (<div className="send-tip top">
|
||||||
|
<div className="label">{getLabel(111, "发放说明")}</div>
|
||||||
|
<div className="detail">{tip}</div>
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
items.map((templatItem, index) => {
|
||||||
|
const { salaryItemValue, name, salaryItemShowName, id } = templatItem || {};
|
||||||
|
return <div key={index} style={{ display: id ? "flex" : "none" }}
|
||||||
|
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
|
||||||
|
<div className="item-name" title={salaryItemShowName || name}>
|
||||||
|
<span className="text">{salaryItemShowName || name || ""}</span>
|
||||||
|
</div>
|
||||||
|
<div className="item-count">{salaryItemValue || ""}</div>
|
||||||
|
</div>;
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
{
|
||||||
|
(onlyOneGrup && tipPosi.toString() === "2" && tip) && (<div className="send-tip bottom">
|
||||||
|
<div className="label">{getLabel(111, "发放说明")}</div>
|
||||||
|
<div className="detail">{tip}</div>
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
{
|
||||||
|
!onlyOneGrup && tipPosi.toString() === "2" && tip &&
|
||||||
|
<div className="corporate-culture-text" title={tip} dangerouslySetInnerHTML={{ __html: tip }}/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{this.props.children}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Content;
|
||||||
|
|
@ -1,82 +1,15 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
import moment from "moment";
|
import Content from "./content";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { theme, background, tip, tipPosi, itemTypeList } = this.props;
|
|
||||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc");
|
|
||||||
return (
|
return (
|
||||||
<div className="pbpc-content">
|
<div className="pbpc-content">
|
||||||
<div className="weapp-salary-sp weapp-salary-payroll-pc-preview">
|
<div className="weapp-salary-sp weapp-salary-payroll-pc-preview"><Content {...this.props}/></div>
|
||||||
<div className="salary-preview-container">
|
|
||||||
<div className="edition-center">
|
|
||||||
<div className="header">
|
|
||||||
<div className="header-title">{theme || ""}</div>
|
|
||||||
<div className="header-salary-date-time">{moment().format("YYYY-MM-DD HH:mm:ss")}</div>
|
|
||||||
</div>
|
|
||||||
<div className="body">
|
|
||||||
{
|
|
||||||
background &&
|
|
||||||
<div className="comp-img"><img src={`${background}`} alt="logo"/></div>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
!onlyOneGrup && tipPosi === "1" && tip &&
|
|
||||||
<div className="corporate-culture-text" title={tip}>{tip}</div>
|
|
||||||
}
|
|
||||||
<div className="data-detail">
|
|
||||||
{
|
|
||||||
showData.map((groupItem, index) => {
|
|
||||||
// 如果当前组下没有条目 当前组直接不展示。
|
|
||||||
if (!groupItem) return null;
|
|
||||||
const { groupId, groupName, items = [] } = groupItem;
|
|
||||||
return (
|
|
||||||
<div className="salary-group" key={groupId || index}>
|
|
||||||
{
|
|
||||||
groupName ? <div className="group-title">{groupName}</div> : null
|
|
||||||
}
|
|
||||||
<div className="group-list">
|
|
||||||
{
|
|
||||||
(onlyOneGrup && tipPosi === "1" && tip) && (<div className="send-tip top">
|
|
||||||
<div className="label">{getLabel(111, "发放说明")}</div>
|
|
||||||
<div className="detail">{tip}</div>
|
|
||||||
</div>)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
items.map((templatItem, index) => {
|
|
||||||
const { salaryItemValue, name, salaryItemShowName } = templatItem || {};
|
|
||||||
return <div key={index}
|
|
||||||
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
|
|
||||||
<div className="item-name" title={salaryItemShowName || name}>
|
|
||||||
<span className="text">{salaryItemShowName || name || ""}</span>
|
|
||||||
</div>
|
|
||||||
<div className="item-count">{salaryItemValue || ""}</div>
|
|
||||||
</div>;
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
{
|
|
||||||
(onlyOneGrup && tipPosi === "2" && tip) && (<div className="send-tip bottom">
|
|
||||||
<div className="label">{getLabel(111, "发放说明")}</div>
|
|
||||||
<div className="detail">{tip}</div>
|
|
||||||
</div>)
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
{
|
|
||||||
!onlyOneGrup && tipPosi === "2" && tip &&
|
|
||||||
<div className="corporate-culture-text" title={tip}>{tip}</div>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -91,15 +24,15 @@ export const dealTemplate = (itemTypeList, type) => {
|
||||||
const { items, groupName, groupId } = group;
|
const { items, groupName, groupId } = group;
|
||||||
if (items.length !== 0) {
|
if (items.length !== 0) {
|
||||||
items.forEach((item) => {
|
items.forEach((item) => {
|
||||||
item.salaryItemValue = "100";
|
item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : "100";
|
||||||
});
|
});
|
||||||
if (items.length % 2 && type === "pc") items.push({});
|
if (items.length % 2 && type === "pc") items.push({});
|
||||||
// 未分类不展示标题
|
// 未分类不展示标题
|
||||||
if (!groupId.includes("222222222222222222")) {
|
// if (!groupId.includes("222222222222222222")) {
|
||||||
showData.push({ groupId, groupName, items });
|
showData.push({ groupId, groupName, items });
|
||||||
} else {
|
// } else {
|
||||||
showData.push({ items });
|
// showData.push({ items });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (cloneItemTypeList.length === 1) {
|
if (cloneItemTypeList.length === 1) {
|
||||||
|
|
|
||||||
|
|
@ -5,144 +5,6 @@
|
||||||
|
|
||||||
.weapp-salary-sp {
|
.weapp-salary-sp {
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
|
|
||||||
.salary-preview-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.edition-center {
|
|
||||||
max-width: 1000px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
padding-bottom: 32px;
|
|
||||||
|
|
||||||
.header {
|
|
||||||
height: 48px;
|
|
||||||
padding: 0 16px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #111;
|
|
||||||
|
|
||||||
.header-title {
|
|
||||||
height: 22px;
|
|
||||||
font-size: 17px;
|
|
||||||
color: #111;
|
|
||||||
line-height: 22px;
|
|
||||||
font-weight: 400;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-salary-date-time {
|
|
||||||
margin-top: 16px;
|
|
||||||
text-align: center;
|
|
||||||
height: 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #999;
|
|
||||||
line-height: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.body {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 32px;
|
|
||||||
|
|
||||||
.comp-img {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.corporate-culture-text {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 16px;
|
|
||||||
text-align: center;
|
|
||||||
min-height: 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #111;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-detail {
|
|
||||||
margin-top: 16px;
|
|
||||||
|
|
||||||
.salary-group {
|
|
||||||
margin-bottom: 16px;
|
|
||||||
|
|
||||||
.group-title {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.group-list {
|
|
||||||
margin-top: 16px;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.even {
|
|
||||||
border-left: 1px solid #e5e5e5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.zero, .first {
|
|
||||||
border-top: 1px solid #e5e5e5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-item {
|
|
||||||
width: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: left;
|
|
||||||
min-height: 40px;
|
|
||||||
align-items: center;
|
|
||||||
border-bottom: 1px solid #e5e5e5;
|
|
||||||
border-right: 1px solid #e5e5e5;
|
|
||||||
|
|
||||||
.item-name {
|
|
||||||
flex-basis: 170px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 170px;
|
|
||||||
padding: 0 16px;
|
|
||||||
height: 100%;
|
|
||||||
background: #fbfbfb;
|
|
||||||
border-right: 1px solid #e5e5e5;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #666;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.text {
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-count {
|
|
||||||
flex-basis: 328px;
|
|
||||||
padding-left: 16px;
|
|
||||||
height: 100%;
|
|
||||||
line-height: 40px;
|
|
||||||
background: #fff;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #111;
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.weapp-salary-payroll-pc-preview {
|
.weapp-salary-payroll-pc-preview {
|
||||||
|
|
@ -151,3 +13,148 @@
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.salary-preview-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.edition-center {
|
||||||
|
max-width: 1000px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 32px;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
height: 48px;
|
||||||
|
padding: 0 16px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #111;
|
||||||
|
|
||||||
|
.header-title {
|
||||||
|
height: 22px;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #111;
|
||||||
|
line-height: 22px;
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-salary-date-time {
|
||||||
|
margin-top: 16px;
|
||||||
|
text-align: center;
|
||||||
|
height: 14px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999;
|
||||||
|
line-height: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
width: 100%;
|
||||||
|
//margin-top: 32px;
|
||||||
|
|
||||||
|
.comp-img {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.corporate-culture-text {
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
color: #111;
|
||||||
|
padding: 8px 16px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-detail {
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
.salary-group {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
background: #FFF;
|
||||||
|
|
||||||
|
.group-title {
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 16px 0 0 8px;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-list {
|
||||||
|
margin-top: 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0 8px;
|
||||||
|
|
||||||
|
.even {
|
||||||
|
border-left: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zero, .first {
|
||||||
|
border-top: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
width: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: left;
|
||||||
|
min-height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.item-name {
|
||||||
|
//flex-basis: 170px;
|
||||||
|
//width: 170px;
|
||||||
|
flex: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 16px;
|
||||||
|
height: 100%;
|
||||||
|
background: #fbfbfb;
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #666;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-count {
|
||||||
|
//flex-basis: 328px;
|
||||||
|
flex: 1;
|
||||||
|
padding-left: 16px;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 40px;
|
||||||
|
background: #fff;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #111;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import { WeaLocaleProvider } from "ecCom";
|
||||||
import MySalaryMobile from "./pages/mySalaryMobile";
|
import MySalaryMobile from "./pages/mySalaryMobile";
|
||||||
import MySalary from "./pages/mySalaryBenefits";
|
import MySalary from "./pages/mySalaryBenefits";
|
||||||
import Programme from "./pages/socialSecurityBenefits/programme";
|
import Programme from "./pages/socialSecurityBenefits/programme";
|
||||||
import Archives from "./pages/socialSecurityBenefits/archives";
|
// import Archivess from "./pages/socialSecurityBenefits/archives";
|
||||||
|
import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
|
||||||
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
|
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
|
||||||
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
||||||
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
||||||
import SalaryItem from "./pages/salaryItem";
|
import SalaryItem from "./pages/salaryItem";
|
||||||
import PayrollFiles from "./pages/payrollFiles";
|
import PayrollFiles from "./pages/payrollFiles";
|
||||||
|
import SalaryFiles from "./pages/payrollFiles/salaryFiles";
|
||||||
import CumDeduct from "./pages/dataAcquisition/cumDeduct";
|
import CumDeduct from "./pages/dataAcquisition/cumDeduct";
|
||||||
import OtherDeduct from "./pages/dataAcquisition/otherDeduct";
|
import OtherDeduct from "./pages/dataAcquisition/otherDeduct";
|
||||||
import CumSituation from "./pages/dataAcquisition/cumSituation";
|
import CumSituation from "./pages/dataAcquisition/cumSituation";
|
||||||
|
|
@ -38,6 +40,7 @@ import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
|
||||||
import CompareDetail from "./pages/calculateDetail/compareDetail";
|
import CompareDetail from "./pages/calculateDetail/compareDetail";
|
||||||
import DoCalcDetail from "./pages/calculate/doCalc";
|
import DoCalcDetail from "./pages/calculate/doCalc";
|
||||||
import OfflineCompare from "./pages/calculate/calcOc";
|
import OfflineCompare from "./pages/calculate/calcOc";
|
||||||
|
import CalcView from "./pages/calculate/calcView";
|
||||||
import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail";
|
import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail";
|
||||||
import TemplatePreview from "./pages/payroll/templatePreview";
|
import TemplatePreview from "./pages/payroll/templatePreview";
|
||||||
import PayrollTemplatePreview from "./pages/payroll/templatePreview/tmpPreview"; //重构的工资单模板预览页面
|
import PayrollTemplatePreview from "./pages/payroll/templatePreview/tmpPreview"; //重构的工资单模板预览页面
|
||||||
|
|
@ -92,6 +95,7 @@ const DataAcquisition = (props) => props.children;
|
||||||
// calculate 薪资核算
|
// calculate 薪资核算
|
||||||
// calculateDetail 核算详情
|
// calculateDetail 核算详情
|
||||||
// DoCalcDetail 核算详情页面-新
|
// DoCalcDetail 核算详情页面-新
|
||||||
|
// CalcView 核算查看页面-新
|
||||||
// OfflineCompare 薪资核算线下对比-新
|
// OfflineCompare 薪资核算线下对比-新
|
||||||
// placeOnFileDetail 核算归档详情
|
// placeOnFileDetail 核算归档详情
|
||||||
// compareDetail 线下线上对比
|
// compareDetail 线下线上对比
|
||||||
|
|
@ -128,6 +132,7 @@ const Routes = (
|
||||||
component={SocialSecurityBenefits}>
|
component={SocialSecurityBenefits}>
|
||||||
<Route key="programme" path="programme" component={Programme}/>
|
<Route key="programme" path="programme" component={Programme}/>
|
||||||
<Route key="archives" path="archives" component={Archives}/>
|
<Route key="archives" path="archives" component={Archives}/>
|
||||||
|
{/*<Route key="archives_demo" path="archives_demo" component={Archivess}/>*/}
|
||||||
<Route key="standingBook" path="standingBook" component={StandingBook}/>
|
<Route key="standingBook" path="standingBook" component={StandingBook}/>
|
||||||
<Route
|
<Route
|
||||||
key="standingBookDetail"
|
key="standingBookDetail"
|
||||||
|
|
@ -141,7 +146,8 @@ const Routes = (
|
||||||
/>
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
<Route key="salaryItem" path="salaryItem" component={SalaryItem}/>
|
<Route key="salaryItem" path="salaryItem" component={SalaryItem}/>
|
||||||
<Route key="salaryFile" path="salaryFile" component={PayrollFiles}/>
|
<Route key="salaryFile" path="salaryFile" component={SalaryFiles}/>
|
||||||
|
<Route key="salaryFile-reconfig" path="salaryFile-reconfig" component={PayrollFiles}/>
|
||||||
<Route key="adjustSalaryManage" path="adjustSalaryManage" component={AdjustSalaryManage}/>
|
<Route key="adjustSalaryManage" path="adjustSalaryManage" component={AdjustSalaryManage}/>
|
||||||
<Route
|
<Route
|
||||||
key="dataAcquisition"
|
key="dataAcquisition"
|
||||||
|
|
@ -158,7 +164,8 @@ const Routes = (
|
||||||
<Route key="calculateDetail" path="calculateDetail" component={CalculateDetail}/>
|
<Route key="calculateDetail" path="calculateDetail" component={CalculateDetail}/>
|
||||||
<Route key="doCalc" path="calculate/:salaryAcctRecordId" component={DoCalcDetail}/>
|
<Route key="doCalc" path="calculate/:salaryAcctRecordId" component={DoCalcDetail}/>
|
||||||
<Route key="calcOc" path="calcOc/:salaryAcctRecordId" component={OfflineCompare}/>
|
<Route key="calcOc" path="calcOc/:salaryAcctRecordId" component={OfflineCompare}/>
|
||||||
<Route key="placeOnFileDetail" path="placeOnFileDetail/:salaryAcctRecordId" component={PlaceOnFileDetail}/>
|
<Route key="calcView" path="calcView/:salaryAcctRecordId" component={CalcView}/>
|
||||||
|
<Route key="placeOnFileDetail" path="placeOnFileDetail" component={PlaceOnFileDetail}/>
|
||||||
<Route key="compareDetail" path="compareDetail" component={CompareDetail}/>
|
<Route key="compareDetail" path="compareDetail" component={CompareDetail}/>
|
||||||
<Route key="payroll" path="payroll" component={Payroll}/>
|
<Route key="payroll" path="payroll" component={Payroll}/>
|
||||||
<Route key="watermarkPreview" path="payroll/watermark/preview" component={WatermarkPreview}/>
|
<Route key="watermarkPreview" path="payroll/watermark/preview" component={WatermarkPreview}/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资核算查看
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/12/7
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||||
|
import { Dropdown, Menu, message } from "antd";
|
||||||
|
import Layout from "../doCalc/layout";
|
||||||
|
import SalaryEditCalc from "../doCalc/components/salaryEditCalc";
|
||||||
|
import AdvanceInputBtn from "../doCalc/components/advanceInputBtn";
|
||||||
|
import { convertToUrlString } from "../../../util/url";
|
||||||
|
import { getExportField } from "../../../apis/calculate";
|
||||||
|
import CustomCalcExportDialog from "../doCalc/components/customCalcExportDialog";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("calculateStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
showChildren: false,
|
||||||
|
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] }
|
||||||
|
};
|
||||||
|
this.calc = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
init = () => this.setState({ showChildren: true });
|
||||||
|
|
||||||
|
handleMenuClick = ({ key }) => {
|
||||||
|
const { calculateStore: { ECSearchForm }, routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
|
const { consolidatedTaxation, ...extra } = ECSearchForm.getFormParams();
|
||||||
|
const payload = { ...extra, consolidatedTaxation: consolidatedTaxation === "0" ? "" : consolidatedTaxation };
|
||||||
|
switch (key) {
|
||||||
|
case "exportAll":
|
||||||
|
const url = `/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${salaryAcctRecordId}&ids=&${convertToUrlString(payload)}`;
|
||||||
|
window.open(`${window.ecologyContentPath || ""}${url}`, "_blank");
|
||||||
|
break;
|
||||||
|
case "export_selected":
|
||||||
|
const { calcTableRef: { wrappedInstance: { state: { selectedRowKeys } } } } = this.calc;
|
||||||
|
if (selectedRowKeys.length === 0) {
|
||||||
|
message.warning(getLabel(543306, "未选择条目"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const url1 = `/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${salaryAcctRecordId}&ids=${selectedRowKeys.join(",")}&${convertToUrlString(payload)}`;
|
||||||
|
window.open(`${window.ecologyContentPath || ""}${url1}`, "_blank");
|
||||||
|
break;
|
||||||
|
case "export_custom":
|
||||||
|
getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { checkItems, itemsByGroup } = data;
|
||||||
|
this.setState({
|
||||||
|
customExpDialog: {
|
||||||
|
...this.state.customExpDialog, visible: true, salaryAcctRecordId,
|
||||||
|
checkItems, itemsByGroup
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { showChildren, customExpDialog } = this.state;
|
||||||
|
const btns = [
|
||||||
|
<Dropdown.Button type="primary" style={{ marginRight: "10px" }}
|
||||||
|
onClick={() => this.handleMenuClick({ key: "exportAll" })}
|
||||||
|
overlay={<Menu onClick={(e) => this.handleMenuClick(e)}>
|
||||||
|
<Menu.Item key="export_selected">{getLabel(543715, "导出所选")}</Menu.Item>
|
||||||
|
<Menu.Item key="export_custom">{getLabel(544270, "自定义导出")}</Menu.Item>
|
||||||
|
</Menu>}>{getLabel(81272, "导出全部")}</Dropdown.Button>,
|
||||||
|
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
||||||
|
onAdvanceSearch={() => this.calc.onAdSearch(false)}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<Layout {...this.props} init={this.init}>
|
||||||
|
<WeaTop title={getLabel(111, "薪资核算详情")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||||
|
showDropIcon={false} buttons={btns}
|
||||||
|
>
|
||||||
|
<div className="salary-calculate-view">
|
||||||
|
{showChildren && <SalaryEditCalc {...this.props} calcDetail ref={dom => this.calc = dom}/>}
|
||||||
|
{/* 薪资核算-自定义导出*/}
|
||||||
|
<CustomCalcExportDialog
|
||||||
|
{...customExpDialog}
|
||||||
|
onCancel={() => {
|
||||||
|
this.setState({
|
||||||
|
customExpDialog: { ...customExpDialog, visible: false }
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</WeaTop>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
.salary-calculate-view {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
padding: 8px 16px;
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,7 @@ class Calculate extends Component {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
name: "",
|
name: "",
|
||||||
dateRange: [
|
dateRange: [
|
||||||
moment(new Date()).startOf("year").format("YYYY-MM"),
|
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||||
]
|
]
|
||||||
}, isRefresh: false,
|
}, isRefresh: false,
|
||||||
|
|
@ -123,7 +123,7 @@ class Calculate extends Component {
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
//查看详情
|
//查看详情
|
||||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/placeOnFileDetail/${id}?id=${id}`);
|
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcView/${id}`);
|
||||||
break;
|
break;
|
||||||
case "4":
|
case "4":
|
||||||
//重新核算
|
//重新核算
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 批量更新-薪资项目的值
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/12/6
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { getSearchs, toDecimal_n } from "../../../../../util";
|
||||||
|
import { salaryacctBatchUpdate } from "../../../../../apis/calculate";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("calculateStore")
|
||||||
|
@observer
|
||||||
|
class BatchUpdateSalaryItemValDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visibe && !nextProps.visible) nextProps.calculateStore.initBatchUpdateForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
save = () => {
|
||||||
|
const {
|
||||||
|
calculateStore: { batchUpdateForm }, salaryAcctRecordId, salaryItemId,
|
||||||
|
idList, pattern, dataType
|
||||||
|
} = this.props;
|
||||||
|
batchUpdateForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
const { value } = batchUpdateForm.getFormParams();
|
||||||
|
this.setState({ loading: true });
|
||||||
|
const payload = {
|
||||||
|
salaryAcctRecordId, salaryItemId, idList,
|
||||||
|
value: dataType === "number" ? toDecimal_n(value, pattern) : value
|
||||||
|
};
|
||||||
|
this.setState({ loading: false });
|
||||||
|
salaryacctBatchUpdate(payload).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.props.onCancel(true);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading } = this.state;
|
||||||
|
const { conditions, calculateStore: { batchUpdateForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props} title={getLabel(111, "批量更新")} initLoadCss
|
||||||
|
style={{ width: 480, height: 127 }}
|
||||||
|
buttons={[
|
||||||
|
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<div className="calc-update-dialog-layout">{getSearchs(batchUpdateForm, conditions, 1, false)}</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default BatchUpdateSalaryItemValDialog;
|
||||||
|
|
@ -143,3 +143,34 @@ export const editCalcSearchConditions = [
|
||||||
title: "常用条件"
|
title: "常用条件"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
export const batchUpdateConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["salaryItemName"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "批量编辑项目",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUTNUMBER",
|
||||||
|
domkey: ["value"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "批量编辑为",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
rules: "required",
|
||||||
|
viewAttr: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: ""
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,17 @@
|
||||||
* Date: 2023/9/14
|
* Date: 2023/9/14
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
import { message, Modal, Spin } from "antd";
|
import { message, Modal, Spin } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
|
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
|
||||||
import ProgressModal from "../../../../../components/progressModal";
|
import ProgressModal from "../../../../../components/progressModal";
|
||||||
|
import BatchUpdateSalaryItemValDialog from "./batchUpdateSalaryItemValDialog";
|
||||||
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
|
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
|
||||||
|
import { batchUpdateConditions } from "./condition";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
|
||||||
@inject("calculateStore")
|
@inject("calculateStore")
|
||||||
@observer
|
@observer
|
||||||
|
|
@ -22,7 +25,11 @@ class EditCalcTable extends Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
selectedRowKeys: [], progressVisible: false, progress: 0,
|
selectedRowKeys: [], progressVisible: false, progress: 0,
|
||||||
salaryCalcSlide: { visible: false, id: "" }
|
salaryCalcSlide: { visible: false, id: "" }, originPayloadData: {},
|
||||||
|
batchUpdateDialog: {
|
||||||
|
visible: false, salaryAcctRecordId: "", idList: [], salaryItemId: "",
|
||||||
|
conditions: [], pattern: 0, dataType: ""
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.timerLock = null;
|
this.timerLock = null;
|
||||||
}
|
}
|
||||||
|
|
@ -51,6 +58,10 @@ class EditCalcTable extends Component {
|
||||||
break;
|
break;
|
||||||
case "LOCKING":
|
case "LOCKING":
|
||||||
const { salaryItemId, lockType: lockStatus } = params;
|
const { salaryItemId, lockType: lockStatus } = params;
|
||||||
|
if (lockStatus === "BATCHUPDATE") {
|
||||||
|
this.batchUpdateSalaryItemVal(params);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.updateLockStatus({ lockStatus, salaryItemId });
|
this.updateLockStatus({ lockStatus, salaryItemId });
|
||||||
break;
|
break;
|
||||||
case "EDIT":
|
case "EDIT":
|
||||||
|
|
@ -120,6 +131,39 @@ class EditCalcTable extends Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
batchUpdateSalaryItemVal = (payload) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: <div>
|
||||||
|
<div style={{ textAlign: "center" }}>{getLabel(111, "确认编辑所有人员(所选人员)薪资核算记录?")}</div>
|
||||||
|
</div>,
|
||||||
|
onOk: () => {
|
||||||
|
const { salaryItemId, salaryItemName, dataType, pattern } = payload;
|
||||||
|
const { routeParams: { salaryAcctRecordId }, calculateStore: { batchUpdateForm } } = this.props;
|
||||||
|
const { selectedRowKeys: idList } = this.state;
|
||||||
|
this.setState({
|
||||||
|
batchUpdateDialog: {
|
||||||
|
...this.state.batchUpdateDialog, visible: true, salaryAcctRecordId, salaryItemId,
|
||||||
|
idList, pattern, dataType, conditions: _.map(batchUpdateConditions, item => ({
|
||||||
|
...item, items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "value") {
|
||||||
|
const otherParams = dataType === "number" ? { precision: pattern } : {};
|
||||||
|
return {
|
||||||
|
...o, ...otherParams, label: getLabel(o.lanId, o.label),
|
||||||
|
conditionType: dataType === "number" ? "INPUTNUMBER" : "INPUT"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o, label: getLabel(o.lanId, o.label) };
|
||||||
|
})
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}, () => {
|
||||||
|
batchUpdateForm.initFormFields(this.state.batchUpdateDialog.conditions);
|
||||||
|
batchUpdateForm.updateFields({ salaryItemName });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
window.removeEventListener("message", this.handleReceive, false);
|
window.removeEventListener("message", this.handleReceive, false);
|
||||||
|
|
@ -135,14 +179,19 @@ class EditCalcTable extends Component {
|
||||||
"当前状态未锁定,点击锁定": getLabel(111, "当前状态未锁定,点击锁定"),
|
"当前状态未锁定,点击锁定": getLabel(111, "当前状态未锁定,点击锁定"),
|
||||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||||
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
||||||
"批量锁定": getLabel(111, "批量锁定"), "查看拓扑图": getLabel(111, "查看拓扑图")
|
"批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
|
||||||
|
"查看拓扑图": getLabel(111, "查看拓扑图")
|
||||||
};
|
};
|
||||||
|
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||||
const childFrameObj = document.getElementById("atdTable");
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
};
|
};
|
||||||
queryCalcResultList = () => {
|
queryCalcResultList = () => {
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state;
|
||||||
const { calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId } } = this.props;
|
const {
|
||||||
|
calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId },
|
||||||
|
calcDetail = false
|
||||||
|
} = this.props;
|
||||||
const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams();
|
const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams();
|
||||||
const payload = {
|
const payload = {
|
||||||
salaryAcctRecordId, ...pageInfo, ...extra, otherConditions,
|
salaryAcctRecordId, ...pageInfo, ...extra, otherConditions,
|
||||||
|
|
@ -162,18 +211,22 @@ class EditCalcTable extends Component {
|
||||||
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
||||||
this.postMessageToChild({
|
this.postMessageToChild({
|
||||||
dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, sumRowlistUrl, payload,
|
dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, sumRowlistUrl, payload,
|
||||||
columns: _.every(traverse(columns), (it, idx) => !it.fixed) ? _.map(traverse(columns), (it, idx) => ({
|
calcDetail,
|
||||||
|
columns: _.every(traverse(columns, calcDetail), (it, idx) => !it.fixed) ? _.map(traverse(columns, calcDetail), (it, idx) => ({
|
||||||
...it,
|
...it,
|
||||||
fixed: idx < 2 ? "left" : false
|
fixed: idx < 2 ? "left" : false
|
||||||
})) : traverse(columns)
|
})) : traverse(columns, calcDetail)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
|
handleBatchEditing = () => {
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, progressVisible, progress, salaryCalcSlide } = this.state;
|
const { loading, progressVisible, progress, salaryCalcSlide, batchUpdateDialog } = this.state;
|
||||||
return (
|
return (
|
||||||
<div className="editCalcTable-layout">
|
<div className="editCalcTable-layout">
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
|
|
@ -183,6 +236,11 @@ class EditCalcTable extends Component {
|
||||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
||||||
id="atdTable"
|
id="atdTable"
|
||||||
/>
|
/>
|
||||||
|
<BatchUpdateSalaryItemValDialog {...batchUpdateDialog}
|
||||||
|
onCancel={(isRefresh) => this.setState({
|
||||||
|
batchUpdateDialog: { ...batchUpdateDialog, visible: false }
|
||||||
|
}, () => isRefresh && this.queryCalcResultList())}
|
||||||
|
/>
|
||||||
<EditSalaryCalcSlide {...salaryCalcSlide}
|
<EditSalaryCalcSlide {...salaryCalcSlide}
|
||||||
onClose={(isFresh) => this.setState({
|
onClose={(isFresh) => this.setState({
|
||||||
salaryCalcSlide: {
|
salaryCalcSlide: {
|
||||||
|
|
@ -209,18 +267,19 @@ class EditCalcTable extends Component {
|
||||||
|
|
||||||
export default EditCalcTable;
|
export default EditCalcTable;
|
||||||
|
|
||||||
const traverse = (arr) => {
|
const traverse = (arr, calcDetail) => {
|
||||||
return _.map(arr, item => {
|
return _.map(arr, item => {
|
||||||
if (!_.isEmpty(item.children)) {
|
if (!_.isEmpty(item.children)) {
|
||||||
return {
|
return {
|
||||||
title: item.text, width: item.width + "px", ellipsis: true,
|
title: item.text, width: item.width + "px", ellipsis: true,
|
||||||
dataIndex: item.column, children: traverse(item.children),
|
dataIndex: item.column, children: traverse(item.children, calcDetail),
|
||||||
fixed: item.fixed || false
|
fixed: item.fixed || false, dataType: item.dataType, align: "center"
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
title: item.text, width: item.width + "px", fixed: item.fixed || false,
|
title: item.text, width: item.width + "px", fixed: item.fixed || false,
|
||||||
dataIndex: item.column, ellipsis: true, lockStatus: item.lockStatus
|
dataIndex: item.column, ellipsis: true, lockStatus: item.lockStatus, calcDetail,
|
||||||
|
pattern: item.pattern, dataType: item.dataType, align: "center"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom";
|
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
import { getColumnDesc, getSalarySobCycle } from "../../../../../apis/calculate";
|
import { getColumnDesc, getSalarySobCycle } from "../../../../../apis/calculate";
|
||||||
import { sysConfCodeRule } from "../../../../../apis/ruleconfig";
|
import { sysConfCodeRule } from "../../../../../apis/ruleconfig";
|
||||||
import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
|
import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
|
||||||
|
|
@ -48,6 +49,9 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handleShowFormulaTa = (dataIndex) => this.setState({ formulaTd: dataIndex });
|
handleShowFormulaTa = (dataIndex) => this.setState({ formulaTd: dataIndex });
|
||||||
|
handleBatchEditing = (editable) => {
|
||||||
|
this.calcTableRef.wrappedInstance.handleBatchEditing(editable);
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
|
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
|
||||||
|
|
@ -72,7 +76,10 @@ class Index extends Component {
|
||||||
<span>{getLabel(18125, "公式")}=</span>
|
<span>{getLabel(18125, "公式")}=</span>
|
||||||
<span>{formulaObj.formulaContent}</span>
|
<span>{formulaObj.formulaContent}</span>
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
<div style={{ paddingRight: 8 }}>
|
||||||
|
{/*<Button type="primary"*/}
|
||||||
|
{/* onClick={() => this.handleBatchEditing(true)}>{getLabel(111, "批量保存")}</Button>*/}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||||
<EditCalcAdvanceSearchPannel
|
<EditCalcAdvanceSearchPannel
|
||||||
|
|
|
||||||
|
|
@ -185,3 +185,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calc-update-dialog-layout {
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-content {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
.wea-form-cell {
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,14 @@ class Layout extends Component {
|
||||||
if (isOpenDevolution) {
|
if (isOpenDevolution) {
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
salaryacctAcctresultCheckAuth({ salaryAcctRecordId }).then(({ status, data }) => {
|
salaryacctAcctresultCheckAuth({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||||
this.setState({ store: { ...this.state.store, loading: false, hasRight: status && data } });
|
this.setState({ store: { ...this.state.store, loading: false, hasRight: status && data } }, () => {
|
||||||
|
this.state.store.hasRight && this.props.init && this.props.init();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({ store: { ...this.state.store, loading: false, hasRight: true } });
|
this.setState({ store: { ...this.state.store, loading: false, hasRight: true } }, () => {
|
||||||
|
this.props.init && this.props.init();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ store: { ...this.state.store, loading: false } }));
|
}).catch(() => this.setState({ store: { ...this.state.store, loading: false } }));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ export default class PlaceOnFileDetail extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout {...this.props}>
|
// <Layout {...this.props}>
|
||||||
<div className="placeOnFileDetail">
|
<div className="placeOnFileDetail">
|
||||||
<CustomTab
|
<CustomTab
|
||||||
searchOperationItem={
|
searchOperationItem={
|
||||||
|
|
@ -229,7 +229,7 @@ export default class PlaceOnFileDetail extends React.Component {
|
||||||
closeMaskOnClick={() => this.setState({ slideVisiable: false })}/>
|
closeMaskOnClick={() => this.setState({ slideVisiable: false })}/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
// </Layout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class Calculate extends Component {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
taxAgentName: "",
|
taxAgentName: "",
|
||||||
dateRange: [
|
dateRange: [
|
||||||
moment(new Date()).startOf("year").format("YYYY-MM"),
|
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||||
]
|
]
|
||||||
}, isRefresh: false,
|
}, isRefresh: false,
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ class FieldSlide extends Component {
|
||||||
roundingMode: "1",
|
roundingMode: "1",
|
||||||
pattern: "2",
|
pattern: "2",
|
||||||
sortedIndex: "",
|
sortedIndex: "",
|
||||||
|
width: "",
|
||||||
description: ""
|
description: ""
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -72,6 +73,7 @@ class FieldSlide extends Component {
|
||||||
dataType,
|
dataType,
|
||||||
description,
|
description,
|
||||||
sortedIndex,
|
sortedIndex,
|
||||||
|
width,
|
||||||
sharedType,
|
sharedType,
|
||||||
roundingMode,
|
roundingMode,
|
||||||
taxAgentIds,
|
taxAgentIds,
|
||||||
|
|
@ -86,6 +88,7 @@ class FieldSlide extends Component {
|
||||||
dataType,
|
dataType,
|
||||||
description,
|
description,
|
||||||
sortedIndex,
|
sortedIndex,
|
||||||
|
width,
|
||||||
sharedType: sharedType ? sharedType.toString() : "0",
|
sharedType: sharedType ? sharedType.toString() : "0",
|
||||||
roundingMode: roundingMode ? roundingMode.toString() : "0",
|
roundingMode: roundingMode ? roundingMode.toString() : "0",
|
||||||
taxAgentIds,
|
taxAgentIds,
|
||||||
|
|
@ -140,6 +143,7 @@ class FieldSlide extends Component {
|
||||||
dataType,
|
dataType,
|
||||||
description,
|
description,
|
||||||
sortedIndex,
|
sortedIndex,
|
||||||
|
width,
|
||||||
sharedType,
|
sharedType,
|
||||||
roundingMode,
|
roundingMode,
|
||||||
taxAgentIds,
|
taxAgentIds,
|
||||||
|
|
@ -153,6 +157,7 @@ class FieldSlide extends Component {
|
||||||
dataType,
|
dataType,
|
||||||
description,
|
description,
|
||||||
sortedIndex,
|
sortedIndex,
|
||||||
|
width,
|
||||||
sharedType,
|
sharedType,
|
||||||
roundingMode: Number(roundingMode),
|
roundingMode: Number(roundingMode),
|
||||||
taxAgentIds,
|
taxAgentIds,
|
||||||
|
|
@ -192,6 +197,7 @@ class FieldSlide extends Component {
|
||||||
roundingMode: "1",
|
roundingMode: "1",
|
||||||
pattern: "2",
|
pattern: "2",
|
||||||
sortedIndex: "",
|
sortedIndex: "",
|
||||||
|
width: "",
|
||||||
description: ""
|
description: ""
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -217,6 +223,7 @@ class FieldSlide extends Component {
|
||||||
roundingMode,
|
roundingMode,
|
||||||
pattern,
|
pattern,
|
||||||
sortedIndex,
|
sortedIndex,
|
||||||
|
width,
|
||||||
description
|
description
|
||||||
} = this.state;
|
} = this.state;
|
||||||
return (
|
return (
|
||||||
|
|
@ -329,6 +336,11 @@ class FieldSlide extends Component {
|
||||||
<WeaInputNumber value={sortedIndex} precision={0}
|
<WeaInputNumber value={sortedIndex} precision={0}
|
||||||
onChange={value => this.handleChangeFields("sortedIndex", value)}/>
|
onChange={value => this.handleChangeFields("sortedIndex", value)}/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label="显示宽度" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||||
|
<WeaInputNumber value={width} precision={0} min={0}
|
||||||
|
onChange={value => this.handleChangeFields("width", value)}/>
|
||||||
|
<span style={{ paddingLeft: 10, position: "absolute", marginTop: 4 }}>px</span>
|
||||||
|
</WeaFormItem>
|
||||||
<WeaFormItem label="备注" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
<WeaFormItem label="备注" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||||
<WeaTextarea
|
<WeaTextarea
|
||||||
value={description}
|
value={description}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
|
import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import Authority from "../mySalary/authority";
|
import Authority from "../mySalary/authority";
|
||||||
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
|
||||||
import PhoneTemplate from "../payroll/templatePreview/phoneTemplate";
|
|
||||||
import "../payroll/templatePreview/index.less";
|
import "../payroll/templatePreview/index.less";
|
||||||
import * as API from "../../apis/mySalaryBenefits";
|
import * as API from "../../apis/mySalaryBenefits";
|
||||||
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
|
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
|
||||||
|
|
@ -13,7 +12,9 @@ import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../a
|
||||||
import CaptchaModal from "../../components/captchaModal";
|
import CaptchaModal from "../../components/captchaModal";
|
||||||
import PassSetDialog from "./passSetDialog";
|
import PassSetDialog from "./passSetDialog";
|
||||||
import { ConfirmBtns } from "../mySalary/mySalaryView";
|
import { ConfirmBtns } from "../mySalary/mySalaryView";
|
||||||
import "./index.less";
|
import Content from "../../components/pcTemplate/content";
|
||||||
|
import MobileTemplate from "../../components/mobileTemplate";
|
||||||
|
import "../mySalary/index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -174,76 +175,68 @@ export default class MobilePayroll extends React.Component {
|
||||||
const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
|
const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
|
||||||
const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
|
const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
|
||||||
const type = getQueryString("type");
|
const type = getQueryString("type");
|
||||||
const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {};
|
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <div>
|
||||||
const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : [];
|
<WeaDialog
|
||||||
|
onCancel={() => this.setState({ visible: false }, () => clearLoading())}
|
||||||
|
title="请输入二次验证密码" visible={visible} initLoadCss
|
||||||
|
className="verifyWrapper"
|
||||||
|
hasScroll buttons={[
|
||||||
|
<Button type="primary" size="small" onClick={this.doSecondAuth}>确定</Button>
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<WeaError tipPosition="bottom" ref="weaError" error="此项必填">
|
||||||
|
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
|
||||||
|
onChange={authCode => this.setState({ authCode })}/>
|
||||||
|
</WeaError>
|
||||||
|
{
|
||||||
|
notSetting &&
|
||||||
|
<div style={{ clear: "both", paddingTop: 10 }}>
|
||||||
|
{getLabel("514970", "您还未设置二次验证密码,点击")}
|
||||||
|
<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</WeaDialog>
|
||||||
|
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
|
||||||
|
</div>;
|
||||||
|
const {
|
||||||
|
salaryTemplate, salaryGroups, employeeInformation,
|
||||||
|
sendTime, confirmStatus
|
||||||
|
} = toJS(this.props.mySalaryStore.mySalaryBill);
|
||||||
|
const salaryProps = {
|
||||||
|
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
||||||
|
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
|
||||||
|
itemTypeList: [employeeInformation, ...salaryGroups]
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<div className="computerTemplate" style={{
|
<React.Fragment>
|
||||||
height: "100%",
|
|
||||||
overflowY: "hidden",
|
|
||||||
paddingBottom: "20px"
|
|
||||||
}}>
|
|
||||||
<WeaDialog
|
|
||||||
onCancel={() => this.setState({ visible: false }, () => clearLoading())}
|
|
||||||
title="请输入二次验证密码" visible={visible} initLoadCss
|
|
||||||
className="verifyWrapper"
|
|
||||||
hasScroll buttons={[
|
|
||||||
<Button type="primary" size="small" onClick={this.doSecondAuth}>确定</Button>
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<WeaError tipPosition="bottom" ref="weaError" error="此项必填">
|
|
||||||
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
|
|
||||||
onChange={authCode => this.setState({ authCode })}/>
|
|
||||||
</WeaError>
|
|
||||||
{
|
|
||||||
notSetting &&
|
|
||||||
<div style={{ clear: "both", paddingTop: 10 }}>
|
|
||||||
{getLabel("514970", "您还未设置二次验证密码,点击")}
|
|
||||||
<a href="javascript:void(0);"
|
|
||||||
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
|
|
||||||
{
|
{
|
||||||
type === "phone" ?
|
type === "phone" ?
|
||||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||||
store={this.props.mySalaryStore}>
|
store={this.props.mySalaryStore}>
|
||||||
<div className="templatePreview">
|
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
|
||||||
<div className="contentWrapper">
|
{
|
||||||
<PhoneTemplate
|
(_.isNil(confirmStatus) || confirmStatus === "0") &&
|
||||||
isPreview
|
<ConfirmBtns
|
||||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
goFeedback={this.handleGoFeedback}
|
||||||
>
|
/>
|
||||||
{
|
}
|
||||||
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) &&
|
</MobileTemplate>
|
||||||
<ConfirmBtns
|
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
|
||||||
goFeedback={this.handleGoFeedback}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</PhoneTemplate>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Authority>
|
</Authority>
|
||||||
:
|
:
|
||||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||||
store={this.props.mySalaryStore}>
|
store={this.props.mySalaryStore}>
|
||||||
<div className="templatePreview">
|
<div className="weapp-salary-my-salary-view-payroll">
|
||||||
<div className="contentWrapper">
|
<Content {...salaryProps}>
|
||||||
<ComputerTemplate
|
{
|
||||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
(_.isNil(confirmStatus) || confirmStatus === "0") &&
|
||||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
|
<ConfirmBtns
|
||||||
>
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
{
|
goFeedback={this.handleGoFeedback}
|
||||||
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) &&
|
/>
|
||||||
<ConfirmBtns
|
}
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
</Content>
|
||||||
goFeedback={this.handleGoFeedback}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</ComputerTemplate>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Authority>
|
</Authority>
|
||||||
}
|
}
|
||||||
|
|
@ -252,7 +245,7 @@ export default class MobilePayroll extends React.Component {
|
||||||
onCancel={() => this.setState({ captchaVisible: false })}
|
onCancel={() => this.setState({ captchaVisible: false })}
|
||||||
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ class PassSetDialog extends Component {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (secondaryPwd1 !== secondaryPwd2) {
|
if (secondaryPwd1 !== secondaryPwd2) {
|
||||||
message.error(getLabel("504376", "密码确认不正确!"));
|
message.error(getLabel(504376, "密码确认不正确!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,33 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.weapp-salary-my-salary-view-payroll {
|
||||||
|
padding: 32px 0;
|
||||||
|
height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.salary-preview-container {
|
||||||
|
max-width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border: 2px solid #FFF;
|
||||||
|
padding-top: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 1000px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.ant-btn {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ import { inject, observer } from "mobx-react";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
import Authority from "./authority";
|
import Authority from "./authority";
|
||||||
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
import Content from "../../components/pcTemplate/content";
|
||||||
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
||||||
import CaptchaModal from "../../components/captchaModal";
|
import CaptchaModal from "../../components/captchaModal";
|
||||||
import "../payroll/templatePreview/index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
|
@ -57,7 +57,7 @@ class MySalaryView extends Component {
|
||||||
handleGoFeedback = () => {
|
handleGoFeedback = () => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: getLabel(131329, "信息确认"),
|
title: getLabel(131329, "信息确认"),
|
||||||
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
content: getLabel(544271, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
||||||
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
||||||
|
|
@ -84,29 +84,26 @@ class MySalaryView extends Component {
|
||||||
if (_.isEmpty(mySalaryStore)) {
|
if (_.isEmpty(mySalaryStore)) {
|
||||||
return <div></div>;
|
return <div></div>;
|
||||||
}
|
}
|
||||||
const employeeInformation = !_.isEmpty(mySalaryStore) && mySalaryStore.employeeInformation;
|
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
|
||||||
const salaryGroups = !_.isEmpty(mySalaryStore) && mySalaryStore.salaryGroups;
|
const salaryProps = {
|
||||||
const salaryTemplateShowSet = !_.isEmpty(mySalaryStore) && mySalaryStore.salaryTemplate;
|
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
||||||
|
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
|
||||||
|
itemTypeList: [employeeInformation, ...salaryGroups]
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||||
store={this.props.mySalaryStore}>
|
store={this.props.mySalaryStore}>
|
||||||
<div style={{ height: "100%", overflow: "auto" }}>
|
<div className="weapp-salary-my-salary-view-payroll">
|
||||||
<div className="templatePreview">
|
<Content {...salaryProps}>
|
||||||
<ComputerTemplate
|
{
|
||||||
isMsgPreview
|
(_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
|
||||||
salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []}
|
<ConfirmBtns
|
||||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
>
|
goFeedback={this.handleGoFeedback}
|
||||||
{
|
/>
|
||||||
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0")) &&
|
}
|
||||||
<ConfirmBtns
|
</Content>
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
|
||||||
goFeedback={this.handleGoFeedback}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</ComputerTemplate>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Authority>
|
</Authority>
|
||||||
<CaptchaModal
|
<CaptchaModal
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,10 @@ class Index extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedKey: "1",
|
selectedKey: "1",
|
||||||
salaryYearMonth: [moment().startOf("year").format("YYYY-MM"), moment().endOf("year").format("YYYY-MM")]
|
salaryYearMonth: [
|
||||||
|
moment().subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||||
|
moment().endOf("year").format("YYYY-MM")
|
||||||
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,10 @@ class Index extends Component {
|
||||||
<span>{getLabel(111, "发放时间")}</span>
|
<span>{getLabel(111, "发放时间")}</span>
|
||||||
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
|
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0);">{`${getLabel(33564, "查看")}>`}</a>
|
<a href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&type=phone`}
|
||||||
|
target="_blank">
|
||||||
|
{`${getLabel(33564, "查看")}>`}
|
||||||
|
</a>
|
||||||
</li>;
|
</li>;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@ class Index extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
salaryYearMonth: [moment().startOf("year").format("YYYY-MM"), moment().startOf("month").format("YYYY-MM")],
|
salaryYearMonth: [
|
||||||
|
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||||
|
moment().endOf("year").format("YYYY-MM")],
|
||||||
isMore: true //是否还有更多数据
|
isMore: true //是否还有更多数据
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -39,7 +41,7 @@ class Index extends Component {
|
||||||
mySalaryMobile.removeEventListener("scroll", this.handleScroll, true);
|
mySalaryMobile.removeEventListener("scroll", this.handleScroll, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
getMySalaryBillList = () => {
|
getMySalaryBillList = (type) => {
|
||||||
const { salaryYearMonth, pageInfo } = this.state;
|
const { salaryYearMonth, pageInfo } = this.state;
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
mySalaryBillList({ salaryYearMonth, ...pageInfo }).then(({ status, data }) => {
|
mySalaryBillList({ salaryYearMonth, ...pageInfo }).then(({ status, data }) => {
|
||||||
|
|
@ -48,14 +50,13 @@ class Index extends Component {
|
||||||
const { datas: dataSource, pageInfo: pageResult } = data;
|
const { datas: dataSource, pageInfo: pageResult } = data;
|
||||||
const { pageNum: current, pageSize, total } = pageResult;
|
const { pageNum: current, pageSize, total } = pageResult;
|
||||||
this.setState({
|
this.setState({
|
||||||
dataSource: [...this.state.dataSource, ...dataSource],
|
dataSource: type ? dataSource : [...this.state.dataSource, ...dataSource],
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||||
}, () => this.setState({ isMore: this.state.dataSource.length < total }));
|
}, () => this.setState({ isMore: this.state.dataSource.length < total }));
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
handleLoadMore = () => {
|
handleLoadMore = () => {
|
||||||
// 为测试效果临时使用 message
|
|
||||||
const { pageInfo, isMore } = this.state;
|
const { pageInfo, isMore } = this.state;
|
||||||
if (!isMore) return;
|
if (!isMore) return;
|
||||||
const { current } = pageInfo;
|
const { current } = pageInfo;
|
||||||
|
|
@ -71,8 +72,9 @@ class Index extends Component {
|
||||||
const { salaryYearMonth } = this.state;
|
const { salaryYearMonth } = this.state;
|
||||||
const [salaryStartYearMonth, salaryEndYearMonth] = salaryYearMonth;
|
const [salaryStartYearMonth, salaryEndYearMonth] = salaryYearMonth;
|
||||||
this.setState({
|
this.setState({
|
||||||
|
pageInfo: { ...this.state.pageInfo, current: 1 },
|
||||||
salaryYearMonth: type === "salaryStartYearMonth" ? [val, salaryEndYearMonth] : [salaryStartYearMonth, val]
|
salaryYearMonth: type === "salaryStartYearMonth" ? [val, salaryEndYearMonth] : [salaryStartYearMonth, val]
|
||||||
}, () => this.getMySalaryBillList());
|
}, () => this.getMySalaryBillList(true));
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,6 @@ export default class BaseInformForm extends React.Component {
|
||||||
ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, autoSendTimeOfDay,
|
ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, autoSendTimeOfDay,
|
||||||
autoSendCycleType
|
autoSendCycleType
|
||||||
} = request;
|
} = request;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<WeaSearchGroup title="基础信息" items={[]} needTigger showGroup col={1} className="payrollBaseInfoWrapper">
|
<WeaSearchGroup title="基础信息" items={[]} needTigger showGroup col={1} className="payrollBaseInfoWrapper">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:薪资档案页面重构-高级搜索
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/8
|
||||||
|
*/
|
||||||
|
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("payrollFilesStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
const { payrollFilesStore: { salaryFileQueryForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="achrive-advance-search">
|
||||||
|
<WeaInputSearch value={salaryFileQueryForm.getFormParams().username}
|
||||||
|
onChange={v => salaryFileQueryForm.updateFields({ username: v })}
|
||||||
|
onSearch={this.props.onAdvanceSearch}
|
||||||
|
/>
|
||||||
|
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||||
|
onClick={this.props.onOpenAdvanceSearch}>{getLabel(545754, "高级搜索")}</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
.achrive-advance-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
top: -1.5px;
|
||||||
|
|
||||||
|
.wea-advanced-search {
|
||||||
|
top: 2px;
|
||||||
|
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;
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资档案页面重构-高级查询
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/8
|
||||||
|
*/
|
||||||
|
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 * as API from "../../../../apis/payrollFiles";
|
||||||
|
import { salaryFileSearchConditions } from "../../config";
|
||||||
|
import { getTaxAgentSelectList } from "../../../../apis/taxAgent";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
|
||||||
|
@inject("payrollFilesStore")
|
||||||
|
@observer
|
||||||
|
class salaryFileAdvanceSearchPannel extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
searchConditions: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async componentDidMount() {
|
||||||
|
const [{ data: userStatusList }, { data: taxAgentList }] = await Promise.all([
|
||||||
|
API.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }),
|
||||||
|
getTaxAgentSelectList()
|
||||||
|
]);
|
||||||
|
this.setState({
|
||||||
|
searchConditions: _.map(salaryFileSearchConditions, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, child => {
|
||||||
|
if (getKey(child) === "statuses") {
|
||||||
|
return {
|
||||||
|
...child,
|
||||||
|
options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel }))
|
||||||
|
};
|
||||||
|
} else if (getKey(child) === "taxAgentId") {
|
||||||
|
return {
|
||||||
|
...child,
|
||||||
|
options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...child };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
const { payrollFilesStore: { salaryFileQueryForm } } = this.props;
|
||||||
|
salaryFileQueryForm.initFormFields(this.state.searchConditions);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { searchConditions } = this.state;
|
||||||
|
const { payrollFilesStore: { salaryFileQueryForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<div className="wea-advanced-searchsAd">
|
||||||
|
{getSearchs(salaryFileQueryForm, searchConditions, 2, false)}
|
||||||
|
</div>
|
||||||
|
<div className="wea-search-buttons">
|
||||||
|
<div style={{ textAlign: "center" }}>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={() => salaryFileQueryForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default salaryFileAdvanceSearchPannel;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资档案页面重构-导入弹窗
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/9
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||||
|
import ImportDialog from "../../../.././components/importDialog";
|
||||||
|
import { convertToUrlString, getURLParameters } from "../../../../util/url";
|
||||||
|
import { importSalaryArchive } from "../../../../apis/payrollFiles";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("payrollFilesStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
importDialog: {
|
||||||
|
nextloading: false, link: "", importResult: {}, imageId: "",
|
||||||
|
previewUrl: "/api/bs/hrmsalary/salaryArchive/preview",
|
||||||
|
extraPreview: {}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
const { payrollFilesStore: { salaryFileQueryForm }, importType, isExtEmp } = nextProps;
|
||||||
|
let payload = {}, extraPreview = {};
|
||||||
|
if (importType !== "init" && importType !== "salaryItemAdjust") {
|
||||||
|
extraPreview = {
|
||||||
|
importType: "", listType: importType
|
||||||
|
};
|
||||||
|
payload = {
|
||||||
|
importType: "", listType: importType,
|
||||||
|
...salaryFileQueryForm.getFormParams()
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
extraPreview = {
|
||||||
|
importType: importType, listType: "FIXED"
|
||||||
|
};
|
||||||
|
payload = {
|
||||||
|
importType: importType, listType: "FIXED",
|
||||||
|
...salaryFileQueryForm.getFormParams()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (isExtEmp) payload = { ...payload, extSalaryArchiveList: true };
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...this.state.importDialog, extraPreview,
|
||||||
|
link: `/api/bs/hrmsalary/salaryArchive/downloadTemplate?${convertToUrlString(payload)}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
nextloading: false, link: "", importResult: {}, imageId: "",
|
||||||
|
previewUrl: "/api/bs/hrmsalary/salaryArchive/preview",
|
||||||
|
extraPreview: {}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleImport = (payload) => {
|
||||||
|
const { importDialog } = this.state, { isExtEmp } = this.props;
|
||||||
|
const { extraPreview } = importDialog;
|
||||||
|
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||||
|
importSalaryArchive({ ...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;
|
||||||
|
const { link } = importDialog;
|
||||||
|
return (
|
||||||
|
<ImportDialog
|
||||||
|
{...this.props} {...importDialog}
|
||||||
|
onResetImportResult={() => this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog, importResult: {}, imageId: "", link: ""
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
exportDataDom={
|
||||||
|
<WeaCheckbox
|
||||||
|
value={getURLParameters(link)["hasData"] === "true" ? "1" : "0"}
|
||||||
|
content={getLabel(543208, "导出现有数据")}
|
||||||
|
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||||
|
onChange={val => {
|
||||||
|
let payload = { ...getURLParameters(link), hasData: val === "1" };
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog,
|
||||||
|
link: `/api/bs/hrmsalary/salaryArchive/downloadTemplate?${convertToUrlString(payload)}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||||
|
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,223 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资档案页面重构-列表
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/8
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { WeaTableNew } from "comsMobx";
|
||||||
|
import SalaryFilesEditSlide from "../salaryFilesEditSlide";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { message, Spin } from "antd";
|
||||||
|
import * as API from "../../../../apis/payrollFiles";
|
||||||
|
|
||||||
|
const WeaTableComx = WeaTableNew.WeaTable;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const URLLIST = {
|
||||||
|
pending: "/api/bs/hrmsalary/salaryArchive/pendingList",
|
||||||
|
fixed: "/api/bs/hrmsalary/salaryArchive/fixedList",
|
||||||
|
suspend: "/api/bs/hrmsalary/salaryArchive/suspendList",
|
||||||
|
stop: "/api/bs/hrmsalary/salaryArchive/stopList",
|
||||||
|
ext: "/api/bs/hrmsalary/salaryArchive/extList"
|
||||||
|
};
|
||||||
|
const APILIST = {
|
||||||
|
addToSalarypayment: API.gotoFixed, //设为发薪员工
|
||||||
|
delPenditngToDo: API.deletePendingTodo, //待定薪删除待办
|
||||||
|
delSalaryFiles: API.deleteSalaryArchive, //删除薪资档案
|
||||||
|
salarySuspension: API.gotoStop, //停薪
|
||||||
|
delSuspendToDo: API.deleteSuspendTodo, //待停薪删除待办
|
||||||
|
cancelSalarySuspension: API.cancelStop //取消停薪
|
||||||
|
};
|
||||||
|
|
||||||
|
@inject("payrollFilesStore", "taxAgentStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
dataSource: [], columns: [], loading: false, selectedRowKeys: [],
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
salaryFilesEditSlide: { visible: false, salaryArchiveId: "" }
|
||||||
|
};
|
||||||
|
this.SFSlideRef = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.getSalaryFileList(this.props);
|
||||||
|
window.addEventListener("message", this.handleReceive, false);
|
||||||
|
window.addEventListener("resize", this.handleResize, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleResize = () => {
|
||||||
|
this.forceUpdate();
|
||||||
|
};
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if ((nextProps.selectedKey !== this.props.selectedKey) || (nextProps.isQuery !== this.props.isQuery)) {
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...this.state.pageInfo, current: 1, pageSize: 10, total: 0 }
|
||||||
|
}, () => this.getSalaryFileList(nextProps));
|
||||||
|
}
|
||||||
|
if ((nextProps.selectedKey !== this.props.selectedKey)) {
|
||||||
|
this.setState({
|
||||||
|
dataSource: [], columns: [], loading: false, selectedRowKeys: [],
|
||||||
|
salaryFilesEditSlide: { ...this.state.salaryFilesEditSlide, visible: false }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener("message", this.handleReceive, false);
|
||||||
|
window.removeEventListener("resize", this.handleResize, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
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.getSalaryFileList(this.props));
|
||||||
|
break;
|
||||||
|
case "ROWSELECTION":
|
||||||
|
const { selectedRowKeys } = params;
|
||||||
|
this.setState({ selectedRowKeys });
|
||||||
|
break;
|
||||||
|
case "ADD-TO-SALARYPAYMENT":
|
||||||
|
case "DEL-PENDITNG-TO-DO":
|
||||||
|
case "DEL-SALARY-FILES":
|
||||||
|
case "SALARY-SUSPENSION":
|
||||||
|
case "DEL-SUSPEND-TO-DO":
|
||||||
|
case "CANCEL-SALARY-SUSPENSION":
|
||||||
|
const { interfaceParams } = params;
|
||||||
|
this.handleSalaryOpts(_.camelCase(id), interfaceParams);
|
||||||
|
break;
|
||||||
|
case "CHANGE-SALARY":
|
||||||
|
case "VIEW":
|
||||||
|
case "EDIT":
|
||||||
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const { record: { id: salaryArchiveId } } = params;
|
||||||
|
this.setState({
|
||||||
|
salaryFilesEditSlide: {
|
||||||
|
...this.state.salaryFilesEditSlide, visible: true, salaryArchiveId,
|
||||||
|
runStatuses: this.props.selectedKey, showOperateBtn
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
handleSalaryOpts = (type, payload) => {
|
||||||
|
WeaLoadingGlobal.start();
|
||||||
|
APILIST[type](payload).then(({ status, data = {}, errormsg }) => {
|
||||||
|
WeaLoadingGlobal.destroy();
|
||||||
|
if (status) {
|
||||||
|
const { msg, type } = data;
|
||||||
|
if (type === "fail" || type === "info") {
|
||||||
|
message.error(msg);
|
||||||
|
} else if (type === "success") {
|
||||||
|
message.success(msg);
|
||||||
|
this.getSalaryFileList(this.props);
|
||||||
|
this.setState({ selectedRowKeys: [] });
|
||||||
|
} else {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.getSalaryFileList(this.props);
|
||||||
|
this.setState({ selectedRowKeys: [] });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
postMessageToChild = (payload = {}) => {
|
||||||
|
const i18n = {
|
||||||
|
"操作": getLabel(30585, "操作"), "调薪": getLabel(542686, "调薪"),
|
||||||
|
"增员": getLabel(543180, "增员"), "删除档案": getLabel(23238, "删除档案"),
|
||||||
|
"删除待办": getLabel(543181, "删除待办"), "查看": getLabel(33564, "查看"),
|
||||||
|
"取消停薪": getLabel(543309, "取消停薪"), "共": getLabel(18609, "共"),
|
||||||
|
"条": getLabel(18256, "条"), "设为发薪人员": getLabel(543308, "设为发薪人员"),
|
||||||
|
"停薪": getLabel(542692, "停薪"), "编辑": getLabel(501169, "编辑")
|
||||||
|
};
|
||||||
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
|
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
|
};
|
||||||
|
getSalaryFileList = (props) => {
|
||||||
|
const { pageInfo } = this.state;
|
||||||
|
const {
|
||||||
|
payrollFilesStore: { salaryFileQueryForm, queryList }, selectedKey, onChangeTopTabCount
|
||||||
|
} = props;
|
||||||
|
this.setState({ loading: true });
|
||||||
|
queryList(pageInfo, salaryFileQueryForm.getFormParams(), URLLIST[selectedKey]).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { pageInfo: result } = data;
|
||||||
|
const { list: dataSource, total, pageNum: current, pageSize } = result;
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||||
|
}, () => {
|
||||||
|
onChangeTopTabCount(selectedKey, total);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
getColumns = () => {
|
||||||
|
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
||||||
|
dataIndex: it.dataIndex, title: it.title, align: "left",
|
||||||
|
width: (it.dataIndex === "taxAgentName" || it.dataIndex === "operate") ? 185 : 150,
|
||||||
|
fixed: it.dataIndex === "username" ? "left" : it.dataIndex === "operate" ? "right" : "",
|
||||||
|
ellipsis: true
|
||||||
|
}));
|
||||||
|
if (!_.isEmpty(columns)) {
|
||||||
|
this.postMessageToChild({
|
||||||
|
columns, showOperateBtn, selectedKey: this.props.selectedKey,
|
||||||
|
showDelSalaryFileBtn: this.props.showDelSalaryFileBtn,
|
||||||
|
dataSource: this.state.dataSource, selectedRowKeys: this.state.selectedRowKeys,
|
||||||
|
showSum: false, pageInfo: this.state.pageInfo
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading, dataSource, salaryFilesEditSlide } = this.state;
|
||||||
|
const { payrollFilesStore: { tableStore } } = 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 * 39 + 113 : dataSource.length < 10 ? dataSource.length * 39 + 113 : parseFloat(dom.style.height) - 16;
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div className="table-layout" style={{ height: height + "px" }}>
|
||||||
|
<Spin spinning={loading}>
|
||||||
|
<iframe
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/salaryFileTable"
|
||||||
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/salaryFileTable"
|
||||||
|
id="atdTable"
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
<WeaTableComx
|
||||||
|
style={{ display: "none" }}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
needScroll={true}
|
||||||
|
columns={this.getColumns()}
|
||||||
|
/>
|
||||||
|
{/* 编辑查看员工薪资档案*/}
|
||||||
|
<SalaryFilesEditSlide {...salaryFilesEditSlide} ref={dom => this.SFSlideRef = dom}
|
||||||
|
onClose={(isFresh) => this.setState({
|
||||||
|
salaryFilesEditSlide: { ...salaryFilesEditSlide, visible: isFresh }
|
||||||
|
}, () => isFresh && this.getSalaryFileList(this.props))}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import React from "react";
|
||||||
|
import { WeaFormItem, WeaHelpfulTip, WeaSearchGroup } from "ecCom";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
|
||||||
|
export const renderSalaryFilesForm = (form, condition, setHasBeenModify) => {
|
||||||
|
const { isFormInit } = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
isFormInit && condition && condition.map(c => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem
|
||||||
|
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
onChange={() => setHasBeenModify(true)}/>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: fields.hide
|
||||||
|
});
|
||||||
|
});
|
||||||
|
!_.isEmpty(items) && group.push(
|
||||||
|
<WeaSearchGroup col={c.col} needTigger={true} showGroup={c.defaultshow} items={items} center={false}
|
||||||
|
className={c.col === 3 ? "basic-salary-file-wrapper" : (c.col === 2 || c.col === 1) ? "twoColumns-salary-file-wrapper" : ""}
|
||||||
|
title={
|
||||||
|
<span>
|
||||||
|
<span>{c.title}</span>
|
||||||
|
{
|
||||||
|
c.titleHelpful &&
|
||||||
|
<WeaHelpfulTip width={200} title={c.titleHelpful} placement="topLeft"
|
||||||
|
style={{ marginLeft: 8 }}/>
|
||||||
|
}
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
/>);
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,224 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资档案页面重构-薪资档案编辑与查看
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/11
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTools } from "ecCom";
|
||||||
|
import { Button, message, Modal } from "antd";
|
||||||
|
import { renderSalaryFilesForm } from "./form";
|
||||||
|
import { salaryFilesConditions } from "../../config";
|
||||||
|
import { getConditionDomkeys, toDecimal_n } from "../../../../util";
|
||||||
|
import * as API from "../../../../apis/archive";
|
||||||
|
import { savePaySet } from "../../../../apis/payrollFiles";
|
||||||
|
import SalaryItemChangeList from "../../../salaryFile/salaryItemChangeList";
|
||||||
|
import SalaryArchiveEditAdjLogRecord from "../../../salaryFile/salaryArchiveEditAdjLogRecord";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("payrollFilesStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, conditions: [], formData: {}, salaryAdjustmentInfo: {},
|
||||||
|
salaryArchiveItems: [], //薪资档案项目
|
||||||
|
adjLogRecordDialog: { //薪资档案-调薪
|
||||||
|
visible: false, title: "", salaryArchiveId: ""
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
document.querySelector(".salary-files-wrapper").classList.add("zIndex0-welfare-archive");
|
||||||
|
this.getArchiveForm(nextProps);
|
||||||
|
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||||
|
document.querySelector(".salary-files-wrapper").classList.remove("zIndex0-welfare-archive");
|
||||||
|
nextProps.payrollFilesStore.initSalaryFileForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getArchiveForm = async (props) => {
|
||||||
|
const { payrollFilesStore: { salaryFileForm }, salaryArchiveId, runStatuses, showOperateBtn } = props;
|
||||||
|
const { data: salaryAdjustmentInfo } = (runStatuses === "fixed") ? await API.salaryAdjustmentInfo() : { data: {} };
|
||||||
|
const payload = { salaryArchiveId };
|
||||||
|
API.getArchiveForm(payload).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { baseInfo: { employee }, paySet: { data: paySetData }, adjustSalaryItems = [] } = data;
|
||||||
|
const adjustSalaryItemsFormData = _.reduce(adjustSalaryItems, (pre, cur) => ({
|
||||||
|
...pre, [cur["id"]]: cur["value"]
|
||||||
|
}), {});
|
||||||
|
const formData = { ...paySetData, ...employee, ...adjustSalaryItemsFormData };
|
||||||
|
this.setState({
|
||||||
|
salaryAdjustmentInfo,
|
||||||
|
salaryArchiveItems: _.map(adjustSalaryItems, o => ({
|
||||||
|
adjustValue: o.value, salaryItemId: o.id, pattern: o.pattern, dataType: o.dataType
|
||||||
|
})),
|
||||||
|
conditions: _.map(salaryFilesConditions, o => {
|
||||||
|
if (o.salaryFile) {
|
||||||
|
return {
|
||||||
|
...o, items: _.map(adjustSalaryItems, g => {
|
||||||
|
const otherParams = g.dataType === "number" ? { precision: g.pattern } : {};
|
||||||
|
return {
|
||||||
|
colSpan: 3, fieldcol: 14, label: g.name, labelcol: 10, ...otherParams,
|
||||||
|
conditionType: g.dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
||||||
|
domkey: [g.id + ""], viewAttr: (runStatuses === "pending" && showOperateBtn) ? 2 : 1
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...o, items: _.map(o.items, g => {
|
||||||
|
if (getKey(g) === "payStartDate") {
|
||||||
|
return {
|
||||||
|
...g, label: getLabel(g.lanId, g.label),
|
||||||
|
viewAttr: ((runStatuses === "pending" || runStatuses === "ext") && showOperateBtn) ? g.viewAttr : 1
|
||||||
|
};
|
||||||
|
} else if (getKey(g) === "payEndDate") {
|
||||||
|
return {
|
||||||
|
...g, label: getLabel(g.lanId, g.label),
|
||||||
|
viewAttr: (runStatuses === "stop" || !showOperateBtn) ? 1 : (runStatuses === "suspend" && showOperateBtn) ? 3 : g.viewAttr,
|
||||||
|
rules: (runStatuses === "suspend" && showOperateBtn) ? "required|string" : ""
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...g, label: getLabel(g.lanId, g.label)
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
salaryFileForm.initFormFields(this.state.conditions);
|
||||||
|
_.map(getConditionDomkeys(this.state.conditions), k => {
|
||||||
|
salaryFileForm.updateFields({ [k]: formData[k] || "" });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
save = async () => {
|
||||||
|
const { salaryArchiveItems } = this.state;
|
||||||
|
const {
|
||||||
|
payrollFilesStore: { salaryFileForm, setHasBeenModify },
|
||||||
|
salaryArchiveId, runStatuses
|
||||||
|
} = this.props;
|
||||||
|
const [salaryForm] = await Promise.all([salaryFileForm.validateForm()]);
|
||||||
|
if (salaryForm.isValid) {
|
||||||
|
const { payStartDate, payEndDate, ...extraParams } = salaryForm.getFormParams();
|
||||||
|
const payload = {
|
||||||
|
salaryArchiveId, status: _.toUpper(runStatuses),
|
||||||
|
payStartDate, payEndDate,
|
||||||
|
salaryArchiveItems: _.map(salaryArchiveItems, o => ({
|
||||||
|
salaryItemId: o.salaryItemId,
|
||||||
|
adjustValue: (o.dataType === "number" && (extraParams[o.salaryItemId] || extraParams[o.salaryItemId] === 0)) ? toDecimal_n(extraParams[o.salaryItemId], o.pattern || 2) : extraParams[o.salaryItemId]
|
||||||
|
}))
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
savePaySet(payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
setHasBeenModify(false);
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.props.onClose(true);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
} else {
|
||||||
|
salaryForm.showErrors();
|
||||||
|
this.forceUpdate();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
renderTitle = () => {
|
||||||
|
const { loading, salaryAdjustmentInfo } = this.state, { runStatuses, showOperateBtn, salaryArchiveId } = this.props;
|
||||||
|
const { isShow, url } = salaryAdjustmentInfo;
|
||||||
|
return <div className="titleDialog">
|
||||||
|
<div className="titleCol titleLeftBox">
|
||||||
|
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||||
|
<div className="title">{getLabel(543312, "员工薪资档案")}</div>
|
||||||
|
</div>
|
||||||
|
<div className="titleCol titleRightBox">
|
||||||
|
{
|
||||||
|
runStatuses === "fixed" && showOperateBtn && isShow === "true" &&
|
||||||
|
<Button type="ghost" onClick={() => {
|
||||||
|
const linkUrl = url.indexOf("http") !== -1 ? url : `${window.location.origin}${url}`;
|
||||||
|
window.open(`${linkUrl}&salaryArchiveId=${salaryArchiveId}`, "_blank");
|
||||||
|
}}>{getLabel(543310, "发起调薪")}</Button>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
runStatuses === "fixed" && showOperateBtn &&
|
||||||
|
<Button type="ghost" onClick={() => {
|
||||||
|
this.setState({
|
||||||
|
adjLogRecordDialog: {
|
||||||
|
...this.state.adjLogRecordDialog,
|
||||||
|
visible: true, title: getLabel(542686, "调薪"), salaryArchiveId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}}>{getLabel(542686, "调薪")}</Button>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
runStatuses !== "stop" && showOperateBtn &&
|
||||||
|
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
handleClose = (visible = false) => {
|
||||||
|
const { payrollFilesStore: { hasBeenModify, setHasBeenModify }, onClose } = this.props;
|
||||||
|
if (hasBeenModify) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(545770, "确定放弃填写吗?放弃后数据将不会被保存!"),
|
||||||
|
onOk: () => {
|
||||||
|
onClose(visible);
|
||||||
|
setHasBeenModify(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
onClose(visible);
|
||||||
|
setHasBeenModify(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
payrollFilesStore: { salaryFileForm, setHasBeenModify }, runStatuses, salaryArchiveId,
|
||||||
|
showOperateBtn, visible
|
||||||
|
} = this.props;
|
||||||
|
const { conditions, adjLogRecordDialog } = this.state;
|
||||||
|
return (
|
||||||
|
<WeaSlideModal
|
||||||
|
className="salary-files-edit-layout" {...this.props}
|
||||||
|
top={0} width={800} height={100} measureT="%" measureX="px" measureY="%"
|
||||||
|
direction={"right"} title={this.renderTitle()} onClose={() => this.handleClose(false)}
|
||||||
|
content={<div className="salary-files-edit-area">
|
||||||
|
{
|
||||||
|
renderSalaryFilesForm(salaryFileForm, conditions, setHasBeenModify)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
runStatuses !== "pending" && visible &&
|
||||||
|
<WeaSearchGroup title={getLabel(543328, "薪资调整记录")} items={[]} needTigger showGroup>
|
||||||
|
<SalaryItemChangeList id={salaryArchiveId} selectedKey={runStatuses} showOperateBtn={showOperateBtn}/>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
}
|
||||||
|
<SalaryArchiveEditAdjLogRecord
|
||||||
|
{...adjLogRecordDialog}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
adjLogRecordDialog: {
|
||||||
|
adjLogRecordDialog, visible: false, title: "", salaryArchiveId: ""
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
</div>}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
import React from "react";
|
||||||
|
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button, Dropdown, Menu } from "antd";
|
||||||
|
import AdvanceInputBtn from "../components/advanceInputBtn";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
export const tabCondition = [
|
export const tabCondition = [
|
||||||
{
|
{
|
||||||
color: "#000000",
|
color: "#000000",
|
||||||
|
|
@ -35,3 +42,428 @@ export const tabCondition = [
|
||||||
viewcondition: "ext"
|
viewcondition: "ext"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
export const tabList = [
|
||||||
|
{ viewcondition: "pending", title: getLabel(542689, "待定薪"), showcount: true, groupid: "PENDING" },
|
||||||
|
{ viewcondition: "fixed", title: getLabel(544638, "发薪员工"), showcount: true, groupid: "FIXED" },
|
||||||
|
{ viewcondition: "suspend", title: getLabel(542691, "待停薪"), showcount: true, groupid: "SUSPEND" },
|
||||||
|
{ viewcondition: "stop", title: getLabel(544637, "停薪员工"), showcount: true, groupid: "STOP" },
|
||||||
|
{ viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "EXT" }
|
||||||
|
];
|
||||||
|
export const renderReqBtns = (selectedKey, salaryImportTypes, onSalaryOpts, showOperateBtn) => {
|
||||||
|
let reqBtns = [
|
||||||
|
<Button type="primary" onClick={() => onSalaryOpts("IMPORT")}>{getLabel(32935, "导入")}</Button>,
|
||||||
|
<AdvanceInputBtn
|
||||||
|
onOpenAdvanceSearch={() => onSalaryOpts("OPEN")} onAdvanceSearch={() => onSalaryOpts("SEARCH")}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
switch (selectedKey) {
|
||||||
|
case "pending":
|
||||||
|
!showOperateBtn && reqBtns.shift();
|
||||||
|
showOperateBtn && reqBtns.splice(1, 0, <Button type="ghost" onClick={() => onSalaryOpts("ALL-GO-TO-FIXED")}>
|
||||||
|
{getLabel(543304, "全部设为发薪人员")}
|
||||||
|
</Button>);
|
||||||
|
break;
|
||||||
|
case "suspend":
|
||||||
|
!showOperateBtn && reqBtns.shift();
|
||||||
|
break;
|
||||||
|
case "fixed":
|
||||||
|
case "ext":
|
||||||
|
reqBtns.shift();
|
||||||
|
showOperateBtn && reqBtns.unshift(
|
||||||
|
<Dropdown overlay={
|
||||||
|
<Menu className="dropdownMenuWrapper" onClick={({ key }) => onSalaryOpts("IMPORT", key)}>
|
||||||
|
{salaryImportTypes.map((item) => (
|
||||||
|
<Menu.Item key={item.id}>{item.content}</Menu.Item>
|
||||||
|
))}
|
||||||
|
</Menu>
|
||||||
|
}>
|
||||||
|
<Button type="primary">{getLabel(32935, "导入")}</Button>
|
||||||
|
</Dropdown>
|
||||||
|
);
|
||||||
|
showOperateBtn && reqBtns.unshift(<WeaHelpfulTip
|
||||||
|
width={300} placement="topLeft"
|
||||||
|
title={<HelpfulDiv/>}
|
||||||
|
/>);
|
||||||
|
break;
|
||||||
|
case "stop":
|
||||||
|
reqBtns.shift();
|
||||||
|
showOperateBtn && reqBtns.unshift(<Button type="primary"
|
||||||
|
onClick={() => onSalaryOpts("CANCEL-SALARY-SUSPENSION")}>{getLabel(543307, "批量取消停薪")}</Button>);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return reqBtns;
|
||||||
|
};
|
||||||
|
export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
|
||||||
|
let menus = [{
|
||||||
|
key: "custom_cols",
|
||||||
|
icon: <i className="icon-coms-Custom"/>,
|
||||||
|
content: getLabel(32535, "显示列定制")
|
||||||
|
}];
|
||||||
|
switch (selectedKey) {
|
||||||
|
case "pending":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "ADD-TO-SALARYPAYMENT",
|
||||||
|
icon: <i className="icon-coms-BatchEditing-Hot"/>,
|
||||||
|
content: getLabel(543305, "批量设为发薪员工")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "DEL-PENDITNG-TO-DO",
|
||||||
|
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||||
|
content: getLabel(543186, "批量删除待办")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case "fixed":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case "suspend":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "FULL-SALARY-SUSPENSION",
|
||||||
|
icon: <i className="icon-coms02-all"/>,
|
||||||
|
content: getLabel(543326, "全部停薪")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "SALARY-SUSPENSION",
|
||||||
|
icon: <i className="icon-coms-BatchEditing-Hot"/>,
|
||||||
|
content: getLabel(543724, "批量停薪")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "DEL-SUSPEND-TO-DO",
|
||||||
|
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||||
|
content: getLabel(543186, "批量删除待办")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case "stop":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return showOperateBtn ? menus : _.filter(menus, o => o.key === "custom_cols");
|
||||||
|
};
|
||||||
|
|
||||||
|
export const salaryFileSearchConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["username"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(25034, "姓名"),
|
||||||
|
labelcol: 8,
|
||||||
|
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: "164",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
domkey: ["subcompanyIds"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(33553, "分部"),
|
||||||
|
labelcol: 8,
|
||||||
|
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: 16,
|
||||||
|
label: getLabel(27511, "部门"),
|
||||||
|
labelcol: 8,
|
||||||
|
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: "24",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
domkey: ["positionIds"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(6086, "岗位"),
|
||||||
|
labelcol: 8,
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["statuses"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(382300, "人员状态"),
|
||||||
|
labelcol: 8,
|
||||||
|
options: [],
|
||||||
|
multiple: true,
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["taxAgentId"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(537996, "个税扣缴义务人"),
|
||||||
|
labelcol: 8,
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["workcode"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(1933, "工号"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "RANGEPICKER",
|
||||||
|
domkey: ["payStartDateStartDateStr", "payStartDateEndDateStr"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(542346, "起始发薪日期"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
conditionType: "RANGEPICKER",
|
||||||
|
domkey: ["payEndDateStartDateStr", "payEndDateEndDateStr"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: getLabel(542347, "最后发薪日期"),
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: getLabel(1361, "基本信息"),
|
||||||
|
col: 2
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const salaryFilesConditions = [
|
||||||
|
{
|
||||||
|
defaultshow: true, title: getLabel(1361, "基本信息"),
|
||||||
|
col: 3,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["username"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "姓名",
|
||||||
|
lanId: 25034,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["department"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "部门",
|
||||||
|
lanId: 27511,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["position"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "岗位",
|
||||||
|
lanId: 6086,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["hiredate"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "入职时间",
|
||||||
|
lanId: 1908,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["mobile"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "手机号",
|
||||||
|
lanId: 125238,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["taxAgent"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "个税扣缴义务人",
|
||||||
|
lanId: 537996,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
defaultshow: true, title: getLabel(543329, "发薪设置"),
|
||||||
|
col: 1,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "DATEPICKER",
|
||||||
|
domkey: ["payStartDate"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: "起始发薪日期",
|
||||||
|
lanId: 542346,
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "DATEPICKER",
|
||||||
|
domkey: ["payEndDate"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: "最后发薪日期",
|
||||||
|
lanId: 542347,
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
defaultshow: true, title: getLabel(538004, "薪资档案"),
|
||||||
|
titleHelpful: getLabel(543330, "提示:显示已生效的最新数据"),
|
||||||
|
col: 2, salaryFile: true,
|
||||||
|
items: []
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const HelpfulDiv = () => {
|
||||||
|
return <div className="helpWrapper">
|
||||||
|
<span>{getLabel(544742, "导入按钮使用场景说明:")}</span>
|
||||||
|
<span>{getLabel(544743, "1.档案初始化:")}</span>
|
||||||
|
<span className="pl10">
|
||||||
|
<span>{getLabel(544744, "a.初次使用薪酬模块,全量导入员工的薪资档案数据;")}</span>
|
||||||
|
<span>{getLabel(544745, "b.员工入职,导入新入职的员工的薪资档案数据(若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入);")}</span>
|
||||||
|
<span>{getLabel(544746, "c.返聘人员使用调薪功能调整薪资档案值或使用调整个税扣缴;")}</span>
|
||||||
|
</span>
|
||||||
|
<span>{getLabel(545755, "2.调薪:档案中已存在的人员批量调整薪资项目值(包括返聘人员的情况);")}</span>
|
||||||
|
<span>{getLabel(545756, "3.调整个税扣缴义务人:档案中已存在的人员批量调整个税扣缴义务人(包括返聘人员的情况);")}</span>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -111,3 +111,201 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//薪资档案页面重构
|
||||||
|
.salary-files-wrapper {
|
||||||
|
min-width: 1000px;
|
||||||
|
overflow: auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.wea-new-top-req-title > div:first-child > div > div {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
|
||||||
|
.wea-tab {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-files-content {
|
||||||
|
padding: 8px 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.table-layout {
|
||||||
|
.ant-spin-nested-loading, .ant-spin-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.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: 246px;
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//薪资档案页面重构-编辑查看抽屉页面
|
||||||
|
.salary-files-edit-layout {
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-slide-modal-title {
|
||||||
|
border-bottom: 1px solid #e5e5e5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-slide-modal-content {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.salary-files-edit-area {
|
||||||
|
background: #f6f6f6;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 16px;
|
||||||
|
|
||||||
|
.basic-salary-file-wrapper {
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
.wea-field-readonly {
|
||||||
|
vertical-align: bottom;
|
||||||
|
|
||||||
|
span.child-item {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 125px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div {
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(3) {
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(4), & > div:nth-child(5) {
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.twoColumns-salary-file-wrapper {
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
& > div {
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(2n) {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-search-group, .wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 5px 16px;
|
||||||
|
|
||||||
|
.wea-form-item-label {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,278 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资档案页面-重构
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/1/8
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLoadingGlobal, WeaLocaleProvider, WeaReqTop, WeaTab } from "ecCom";
|
||||||
|
import { message, Modal } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { renderDropMenuDatas, renderReqBtns, tabList } from "./config";
|
||||||
|
import SalaryFileAdvanceSearchPannel from "./components/salaryFileAdvanceSearchPannel";
|
||||||
|
import SalaryFileImportDialog from "./components/salaryFileImportDialog";
|
||||||
|
import SalaryFileList from "./components/salaryFileList";
|
||||||
|
import * as API from "../../apis/payrollFiles";
|
||||||
|
import { sysinfo } from "../../apis/ruleconfig";
|
||||||
|
import { convertToUrlString } from "../../util/url";
|
||||||
|
import cs from "classnames";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("payrollFilesStore", "taxAgentStore")
|
||||||
|
@observer
|
||||||
|
class SalaryFiles extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
selectedKey: "pending", showSearchAd: false, isQuery: false, showDelSalaryFileBtn: false,
|
||||||
|
topTabCount: { PENDING: 0, FIXED: 0, SUSPEND: 0, STOP: 0, EXT: 0 }, showExtEmpsWitch: false,
|
||||||
|
salaryFileImpDialog: { visible: false, title: getLabel(24023, "数据导入"), importType: "", isExtEmp: false },
|
||||||
|
salaryImportTypes: []
|
||||||
|
};
|
||||||
|
this.salaryFileListRef = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async componentDidMount() {
|
||||||
|
// salaryArchiveDelete, //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是,
|
||||||
|
// extEmpsWitch //非系统人员开关, 1: 开启, 0:关闭
|
||||||
|
const [{ data: salaryFileDelFlag }, { data: { extEmpsWitch } }, { data: salaryImportTypes }] =
|
||||||
|
await Promise.all([API.salaryArchiveDelete(), sysinfo(), API.getImportTypes()]);
|
||||||
|
this.setState({
|
||||||
|
showDelSalaryFileBtn: salaryFileDelFlag === "1", showExtEmpsWitch: extEmpsWitch === "1",
|
||||||
|
salaryImportTypes: _.filter(salaryImportTypes, it => it.id !== "taxAgentAdjust")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||||
|
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||||
|
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
|
||||||
|
onDropMenuClick = (key) => {
|
||||||
|
const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
|
||||||
|
switch (key) {
|
||||||
|
case "custom_cols":
|
||||||
|
const { payrollFilesStore: { tableStore } } = this.props;
|
||||||
|
tableStore.setColSetVisible(true);
|
||||||
|
tableStore.tableColSet(true);
|
||||||
|
break;
|
||||||
|
case "FULL-SALARY-SUSPENSION":
|
||||||
|
this.allGotoStop();
|
||||||
|
break;
|
||||||
|
case "ADD-TO-SALARYPAYMENT":
|
||||||
|
case "DEL-PENDITNG-TO-DO":
|
||||||
|
case "SALARY-SUSPENSION":
|
||||||
|
case "DEL-SUSPEND-TO-DO":
|
||||||
|
const { selectedRowKeys = [] } = state;
|
||||||
|
if (_.isEmpty(selectedRowKeys)) {
|
||||||
|
message.warning(getLabel(543303, "请选择表格数据!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
handleSalaryOpts && handleSalaryOpts(_.camelCase(key), selectedRowKeys);
|
||||||
|
break;
|
||||||
|
case "exportAll":
|
||||||
|
case "exportSelected":
|
||||||
|
this.handleExport(key);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
queryInsuranceTabTotal = (active, total) => {
|
||||||
|
API.queryTabTotal().then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||||
|
this.setState({
|
||||||
|
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleReqBtnsCLick = (type, importType) => {
|
||||||
|
const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
|
||||||
|
switch (type) {
|
||||||
|
case "OPEN":
|
||||||
|
this.handleOpenAdvanceSearch();
|
||||||
|
break;
|
||||||
|
case "SEARCH":
|
||||||
|
this.handleAdvanceSearch();
|
||||||
|
break;
|
||||||
|
case "IMPORT":
|
||||||
|
this.setState({
|
||||||
|
salaryFileImpDialog: {
|
||||||
|
...this.state.salaryFileImpDialog, visible: true,
|
||||||
|
importType: importType || _.upperCase(this.state.selectedKey),
|
||||||
|
isExtEmp: this.state.selectedKey === "ext"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "ALL-GO-TO-FIXED":
|
||||||
|
this.allGotoFixed();
|
||||||
|
break;
|
||||||
|
case "CANCEL-SALARY-SUSPENSION":
|
||||||
|
const { selectedRowKeys = [] } = state;
|
||||||
|
if (_.isEmpty(selectedRowKeys)) {
|
||||||
|
message.warning(getLabel(543303, "请选择表格数据!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
handleSalaryOpts && handleSalaryOpts(_.camelCase(type), selectedRowKeys);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description: 全部设为发薪员工
|
||||||
|
* Params:
|
||||||
|
* Date: 2024/1/9
|
||||||
|
*/
|
||||||
|
allGotoFixed = () => {
|
||||||
|
const { state } = this.salaryFileListRef.wrappedInstance || {};
|
||||||
|
const { pageInfo } = state;
|
||||||
|
if (pageInfo && pageInfo.total === 0) {
|
||||||
|
message.warning(getLabel(543300, "您没有需要处理的待定薪人员!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: `${getLabel(543301, "确定要将所有待定薪人员")}(${getLabel(18609, "共")}${pageInfo.total}${getLabel(30690, "条数据")})${getLabel(543302, "设为发薪人员吗")}?`,
|
||||||
|
onOk: () => {
|
||||||
|
WeaLoadingGlobal.start();
|
||||||
|
API.allGotoFixed({}).then(({ status, data, errormsg }) => {
|
||||||
|
WeaLoadingGlobal.destroy();
|
||||||
|
if (status) {
|
||||||
|
const { msg } = data;
|
||||||
|
message.info(msg || getLabel(30700, "操作成功!"));
|
||||||
|
this.handleAdvanceSearch();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || getLabel(30651, "操作失败!"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description: 全部停薪
|
||||||
|
* Params:
|
||||||
|
* Date: 2024/1/9
|
||||||
|
*/
|
||||||
|
allGotoStop = () => {
|
||||||
|
const { state } = this.salaryFileListRef.wrappedInstance || {};
|
||||||
|
const { pageInfo } = state;
|
||||||
|
if (pageInfo && pageInfo.total === 0) {
|
||||||
|
message.warning(getLabel(543325, "您没有需要处理的待停薪人员!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: `${getLabel(543723, "确定要将所有待停薪人员")}(${getLabel(18609, "共")}${pageInfo.total}${getLabel(30690, "条数据")})${getLabel(543327, "设为停薪人员吗")}?`,
|
||||||
|
onOk: () => {
|
||||||
|
WeaLoadingGlobal.start();
|
||||||
|
API.allGotoStop({}).then(({ status, data, errormsg }) => {
|
||||||
|
WeaLoadingGlobal.destroy();
|
||||||
|
if (status) {
|
||||||
|
const { msg } = data;
|
||||||
|
message.info(msg || getLabel(30700, "操作成功!"));
|
||||||
|
this.handleAdvanceSearch();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || getLabel(30651, "操作失败!"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description: 导出薪资档案文件
|
||||||
|
* Params:
|
||||||
|
* Date: 2024/1/9
|
||||||
|
*/
|
||||||
|
handleExport = (type) => {
|
||||||
|
const { payrollFilesStore: { salaryFileQueryForm } } = this.props;
|
||||||
|
const { selectedKey } = this.state;
|
||||||
|
let url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList`;
|
||||||
|
let payload = {}, runStatusList = _.upperCase(selectedKey);
|
||||||
|
const { state } = this.salaryFileListRef.wrappedInstance || {};
|
||||||
|
const { selectedRowKeys = [] } = state;
|
||||||
|
switch (selectedKey) {
|
||||||
|
case "pending":
|
||||||
|
case "suspend":
|
||||||
|
runStatusList = _.upperCase(selectedKey);
|
||||||
|
break;
|
||||||
|
case "fixed":
|
||||||
|
runStatusList = "FIXED,SUSPEND";
|
||||||
|
break;
|
||||||
|
case "stop":
|
||||||
|
runStatusList = "STOP_FROM_PENDING,STOP_FROM_SUSPEND";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (type === "exportAll") {
|
||||||
|
payload = { ids: "", runStatusList, ...salaryFileQueryForm.getFormParams() };
|
||||||
|
} else {
|
||||||
|
if (selectedRowKeys.length === 0) {
|
||||||
|
message.warning(getLabel(543345, "请选择需要导出的数据!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
payload = { ids: selectedRowKeys.join(",") };
|
||||||
|
}
|
||||||
|
window.open(`${url}?${convertToUrlString(payload)}`, "_blank");
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
selectedKey, topTabCount, showSearchAd, isQuery, showDelSalaryFileBtn, showExtEmpsWitch,
|
||||||
|
salaryFileImpDialog, salaryImportTypes
|
||||||
|
} = this.state;
|
||||||
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="salary-files-wrapper">
|
||||||
|
<WeaReqTop
|
||||||
|
title={getLabel(538004, "薪资档案")} buttonSpace={10} icon={<i className="icon-coms-fa"/>}
|
||||||
|
iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
|
||||||
|
onDropMenuClick={this.onDropMenuClick}
|
||||||
|
buttons={renderReqBtns(selectedKey, salaryImportTypes, this.handleReqBtnsCLick, showOperateBtn)}
|
||||||
|
replaceTab={
|
||||||
|
<WeaTab
|
||||||
|
datas={!showExtEmpsWitch ? _.dropRight(tabList) : tabList} autoCalculateWidth
|
||||||
|
keyParam="viewcondition" selectedKey={selectedKey} counts={topTabCount} countParam="groupid"
|
||||||
|
onChange={key => this.setState({ selectedKey: key })}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div className="salary-files-content">
|
||||||
|
<div
|
||||||
|
className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||||
|
<SalaryFileAdvanceSearchPannel
|
||||||
|
onCancel={() => this.setState({ showSearchAd: false })}
|
||||||
|
onAdSearch={this.onAdSearch}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/*列表*/}
|
||||||
|
<SalaryFileList isQuery={isQuery} ref={dom => this.salaryFileListRef = dom}
|
||||||
|
selectedKey={selectedKey} showOperateBtn={showOperateBtn}
|
||||||
|
showDelSalaryFileBtn={showDelSalaryFileBtn}
|
||||||
|
onChangeTopTabCount={this.queryInsuranceTabTotal}
|
||||||
|
/>
|
||||||
|
{/* 导入*/}
|
||||||
|
<SalaryFileImportDialog {...salaryFileImpDialog}
|
||||||
|
onCancel={(isFresh) => {
|
||||||
|
this.setState({
|
||||||
|
isQuery: isFresh ? !isQuery : isQuery,
|
||||||
|
salaryFileImpDialog: {
|
||||||
|
...salaryFileImpDialog, visible: false,
|
||||||
|
importType: "", isExtEmp: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}}/>
|
||||||
|
</div>
|
||||||
|
</WeaReqTop>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SalaryFiles;
|
||||||
|
|
@ -174,7 +174,7 @@ class Index extends Component {
|
||||||
if (it === "ackFeedbackStatus") {
|
if (it === "ackFeedbackStatus") {
|
||||||
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
|
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
|
||||||
} else {
|
} else {
|
||||||
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "" });
|
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class Index extends Component {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
salarySobId: "", name: "",
|
salarySobId: "", name: "",
|
||||||
dateRange: [
|
dateRange: [
|
||||||
moment(new Date()).startOf("year").format("YYYY-MM"),
|
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ export default class Index extends Component {
|
||||||
confValue: "0",
|
confValue: "0",
|
||||||
withDrawTaxDeclaration: "0",
|
withDrawTaxDeclaration: "0",
|
||||||
extEmpsWitch: "0",
|
extEmpsWitch: "0",
|
||||||
salaryAcctFixedColumns: 0
|
salaryAcctFixedColumns: 0,
|
||||||
|
welBaseDiffByPerAndCom: "0",
|
||||||
|
welBaseAutoAdjust: "0"
|
||||||
},
|
},
|
||||||
showEncryptOperationButton: "",
|
showEncryptOperationButton: "",
|
||||||
progressVisible: false,
|
progressVisible: false,
|
||||||
|
|
@ -66,7 +68,8 @@ export default class Index extends Component {
|
||||||
ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
|
ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
|
||||||
taxDeclarationFunction: operateTaxDeclaration = "1", salaryArchiveDelete: confValue,
|
taxDeclarationFunction: operateTaxDeclaration = "1", salaryArchiveDelete: confValue,
|
||||||
salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
|
salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
|
||||||
OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0"
|
OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0",
|
||||||
|
welBaseDiffByPerAndCom = "0", welBaseAutoAdjust = "0"
|
||||||
}
|
}
|
||||||
} = sysInfo;
|
} = sysInfo;
|
||||||
// const { data: { ascOrDesc, orderRule } } = orderRules;
|
// const { data: { ascOrDesc, orderRule } } = orderRules;
|
||||||
|
|
@ -87,7 +90,8 @@ export default class Index extends Component {
|
||||||
saveParams: {
|
saveParams: {
|
||||||
...saveParams,
|
...saveParams,
|
||||||
ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration, salaryAcctFixedColumns,
|
ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration, salaryAcctFixedColumns,
|
||||||
extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0"
|
extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0",
|
||||||
|
welBaseDiffByPerAndCom, welBaseAutoAdjust
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -307,6 +311,16 @@ export default class Index extends Component {
|
||||||
confValue: !_.isNil(val) ? val.toString() : "0"
|
confValue: !_.isNil(val) ? val.toString() : "0"
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "welBaseDiffByPerAndCom":
|
||||||
|
case "welBaseAutoAdjust":
|
||||||
|
this.saveSysOperate({
|
||||||
|
title: key === "welBaseDiffByPerAndCom" ?
|
||||||
|
getLabel(111, "福利档案基数区分个人和公司") :
|
||||||
|
getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
|
||||||
|
module: "basic", confKey: key,
|
||||||
|
confValue: val
|
||||||
|
});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -342,7 +356,9 @@ export default class Index extends Component {
|
||||||
confValue,
|
confValue,
|
||||||
withDrawTaxDeclaration,
|
withDrawTaxDeclaration,
|
||||||
extEmpsWitch,
|
extEmpsWitch,
|
||||||
salaryAcctFixedColumns
|
salaryAcctFixedColumns,
|
||||||
|
welBaseDiffByPerAndCom,
|
||||||
|
welBaseAutoAdjust
|
||||||
} = saveParams;
|
} = saveParams;
|
||||||
return (
|
return (
|
||||||
<div className="ruleWrapper">
|
<div className="ruleWrapper">
|
||||||
|
|
@ -398,6 +414,17 @@ export default class Index extends Component {
|
||||||
onChange={val => this.handleChange("confValue", val)}/>
|
onChange={val => this.handleChange("confValue", val)}/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
</WeaSearchGroup>
|
</WeaSearchGroup>
|
||||||
|
<WeaSearchGroup title={getLabel(111, "福利档案基数")} showGroup center>
|
||||||
|
<WeaFormItem label={getLabel(111, "区分个人和公司")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaCheckbox display="switch" value={welBaseDiffByPerAndCom}
|
||||||
|
onChange={val => this.handleChange("welBaseDiffByPerAndCom", val)}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
<WeaFormItem label={getLabel(111, "导入基数自动调整上/下限")} labelCol={{ span: 8 }}
|
||||||
|
wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaCheckbox display="switch" value={welBaseAutoAdjust}
|
||||||
|
onChange={val => this.handleChange("welBaseAutoAdjust", val)}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
</WeaSearchGroup>
|
||||||
<WeaSearchGroup title={getLabel(111, "薪资核算人员匹配规则")} showGroup center>
|
<WeaSearchGroup title={getLabel(111, "薪资核算人员匹配规则")} showGroup center>
|
||||||
<WeaFormItem label={getLabel(111, "匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
<WeaFormItem label={getLabel(111, "匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||||
<WeaSelect options={matchRuleOptions} value={matchRule}
|
<WeaSelect options={matchRuleOptions} value={matchRule}
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,14 @@ export const salaryItemFields = [
|
||||||
viewAttr: 2,
|
viewAttr: 2,
|
||||||
tip: ""
|
tip: ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "width",
|
||||||
|
label: "显示宽度",
|
||||||
|
lanId: 111,
|
||||||
|
type: "INPUTNUMBER",
|
||||||
|
viewAttr: 2,
|
||||||
|
tip: ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "description",
|
key: "description",
|
||||||
label: "备注",
|
label: "备注",
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,13 @@ class SalaryItemForm extends Component {
|
||||||
case "pattern":
|
case "pattern":
|
||||||
case "roundingMode":
|
case "roundingMode":
|
||||||
return { ...item, display: dataType === "number" };
|
return { ...item, display: dataType === "number" };
|
||||||
|
case "width":
|
||||||
case "sortedIndex":
|
case "sortedIndex":
|
||||||
return { ...item };
|
return {
|
||||||
|
...item,
|
||||||
|
label: getLabel(item.lanId, item.label),
|
||||||
|
display: ((!isLedger && key === "width") || key === "sortedIndex")
|
||||||
|
};
|
||||||
case "useInEmployeeSalary":
|
case "useInEmployeeSalary":
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
|
@ -164,8 +169,13 @@ class SalaryItemForm extends Component {
|
||||||
</WeaFormItem> :
|
</WeaFormItem> :
|
||||||
(type === "INPUTNUMBER" && display) ?
|
(type === "INPUTNUMBER" && display) ?
|
||||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||||
<WeaInputNumber value={value} viewAttr={viewAttr} precision={0}
|
<React.Fragment>
|
||||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
<WeaInputNumber value={value} viewAttr={viewAttr} precision={0}
|
||||||
|
min={key === "width" ? 0 : -99999}
|
||||||
|
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
||||||
|
{key === "width" && display &&
|
||||||
|
<span style={{ paddingLeft: 10, position: "absolute", marginTop: 4 }}>px</span>}
|
||||||
|
</React.Fragment>
|
||||||
</WeaFormItem> : null
|
</WeaFormItem> : null
|
||||||
}
|
}
|
||||||
</React.Fragment>;
|
</React.Fragment>;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
import { WeaSwitch } from "comsMobx";
|
|
||||||
import { Button } from "antd";
|
|
||||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
|
||||||
|
|
||||||
export const tabCondition = [
|
export const tabCondition = [
|
||||||
{
|
{
|
||||||
color: "#000000",
|
color: "#000000",
|
||||||
|
|
@ -42,97 +35,3 @@ export const tabCondition = [
|
||||||
viewcondition: "ext"
|
viewcondition: "ext"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
export const logConditions = [
|
|
||||||
{
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
colSpan: 1,
|
|
||||||
conditionType: "BROWSER",
|
|
||||||
browserConditionParam: {
|
|
||||||
completeParams: {},
|
|
||||||
conditionDataParams: {},
|
|
||||||
dataParams: {},
|
|
||||||
destDataParams: {},
|
|
||||||
hasAddBtn: false,
|
|
||||||
hasAdvanceSerach: true,
|
|
||||||
idSeparator: ",",
|
|
||||||
isAutoComplete: 1,
|
|
||||||
isDetail: 0,
|
|
||||||
isMultCheckbox: false,
|
|
||||||
isSingle: true,
|
|
||||||
linkUrl: "/hrm/resource/HrmResource.jsp?id=",
|
|
||||||
pageSize: 10,
|
|
||||||
quickSearchName: "",
|
|
||||||
replaceDatas: [],
|
|
||||||
title: "",
|
|
||||||
type: "1"
|
|
||||||
},
|
|
||||||
domkey: ["employeeId"],
|
|
||||||
fieldcol: 17,
|
|
||||||
label: "对象",
|
|
||||||
lanId: 106,
|
|
||||||
labelcol: 7,
|
|
||||||
value: ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
colSpan: 1,
|
|
||||||
conditionType: "BROWSER",
|
|
||||||
browserConditionParam: {
|
|
||||||
completeParams: {},
|
|
||||||
conditionDataParams: {},
|
|
||||||
dataParams: {},
|
|
||||||
destDataParams: {},
|
|
||||||
hasAddBtn: false,
|
|
||||||
hasAdvanceSerach: true,
|
|
||||||
idSeparator: ",",
|
|
||||||
isAutoComplete: 1,
|
|
||||||
isDetail: 0,
|
|
||||||
isMultCheckbox: false,
|
|
||||||
isSingle: true,
|
|
||||||
linkUrl: "/hrm/resource/HrmResource.jsp?id=",
|
|
||||||
pageSize: 10,
|
|
||||||
quickSearchName: "",
|
|
||||||
replaceDatas: [],
|
|
||||||
title: "",
|
|
||||||
type: "1"
|
|
||||||
},
|
|
||||||
domkey: ["operator"],
|
|
||||||
fieldcol: 17,
|
|
||||||
label: "操作人",
|
|
||||||
lanId: 111,
|
|
||||||
labelcol: 7,
|
|
||||||
value: ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
defaultshow: true
|
|
||||||
}
|
|
||||||
];
|
|
||||||
export const getLogSearchsForm = (form, condition, onSearch = () => void (0)) => {
|
|
||||||
const { isFormInit } = form;
|
|
||||||
const formParams = form.getFormParams();
|
|
||||||
let group = [];
|
|
||||||
isFormInit && condition && condition.map(c => {
|
|
||||||
let items = [];
|
|
||||||
c.items.map(fields => {
|
|
||||||
items.push({
|
|
||||||
com: (
|
|
||||||
<WeaFormItem
|
|
||||||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
|
||||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
|
||||||
tipPosition="bottom"
|
|
||||||
>
|
|
||||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
|
||||||
{
|
|
||||||
getKey(fields) === "operator" &&
|
|
||||||
<Button type="primary" onClick={onSearch} style={{ position: "absolute", right: "-70px", top: "0" }}>{getLabel(388113, "搜索")}</Button>
|
|
||||||
}
|
|
||||||
</WeaFormItem>),
|
|
||||||
colSpan: 1
|
|
||||||
});
|
|
||||||
});
|
|
||||||
group.push(
|
|
||||||
<WeaSearchGroup col={4} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} center={false}
|
|
||||||
/>);
|
|
||||||
});
|
|
||||||
return group;
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import UnifiedTable from "../../../components/UnifiedTable";
|
||||||
import { convertToUrlString, getURLParameters } from "../../../util/url";
|
import { convertToUrlString, getURLParameters } from "../../../util/url";
|
||||||
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
|
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
|
||||||
import ImportDialog from "../../../components/importDialog";
|
import ImportDialog from "../../../components/importDialog";
|
||||||
import OperateLogDialog from "./operateLogDialog";
|
import OperateLogDialog from "../welfareArchive/components/logDialog";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import { sysinfo } from "../../../apis/ruleconfig";
|
import { sysinfo } from "../../../apis/ruleconfig";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,36 +85,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//重构-社保福利档案
|
|
||||||
.logDialog {
|
|
||||||
.wea-dialog-body {
|
|
||||||
overflow-y: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logDialogContent {
|
|
||||||
background: #F6F6F6;
|
|
||||||
padding: 16px;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.wea-search-group {
|
|
||||||
padding: 0;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
background: #FFF;
|
|
||||||
|
|
||||||
.wea-form-cell {
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
.wea-form-item {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.logTable {
|
|
||||||
background: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ class CustomBenefitsTable extends Component {
|
||||||
content: getLabel(543231, "确认删除本条数据吗?"),
|
content: getLabel(543231, "确认删除本条数据吗?"),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.loading("正在删除中...", 0);
|
message.loading(getLabel(529063, "正在删除中..."), 0);
|
||||||
const payload = { id };
|
const payload = { id };
|
||||||
deleteCustomCategory(payload).then(({ status, errormsg }) => {
|
deleteCustomCategory(payload).then(({ status, errormsg }) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利档案页面重构-高级搜索
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/10/31
|
||||||
|
*/
|
||||||
|
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("archivesStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
const { archivesStore: { welfareForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="achrive-advance-search">
|
||||||
|
<WeaInputSearch value={welfareForm.getFormParams().username}
|
||||||
|
onChange={v => welfareForm.updateFields({ username: v })}
|
||||||
|
onSearch={this.props.onAdvanceSearch}
|
||||||
|
/>
|
||||||
|
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||||
|
onClick={this.props.onOpenAdvanceSearch}>{getLabel(111, "高级搜索")}</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
.achrive-advance-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
top: -1.5px;
|
||||||
|
|
||||||
|
.wea-advanced-search {
|
||||||
|
top: 2px;
|
||||||
|
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;
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,15 +1,16 @@
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* name: 社保福利档案-操作日志
|
* name:社保福利档案-操作日志
|
||||||
* Description:
|
* Description:
|
||||||
* Date: 2023/10/23
|
* Date: 2023/11/6
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import { getAdjustHistoryList } from "../../../../apis/archive";
|
import { getAdjustHistoryList } from "../../../../../apis/welfareArchive";
|
||||||
import { getLogSearchsForm, logConditions } from "../config";
|
import { getLogSearchsForm, logConditions } from "../../config";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
//重构-社保福利档案
|
||||||
|
.logDialog {
|
||||||
|
.wea-dialog-body {
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logDialogContent {
|
||||||
|
background: #F6F6F6;
|
||||||
|
padding: 16px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background: #FFF;
|
||||||
|
|
||||||
|
.wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.logTable {
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利档案页面重构-高级搜索面板
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/10/31
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { getSaCondition } from "../../../../../apis/archive";
|
||||||
|
import { getSearchs } from "../../../../../util";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("archivesStore")
|
||||||
|
@observer
|
||||||
|
class WelfareAdvanceSearchPannel extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
searchConditions: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
getSaCondition().then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
searchConditions: data.condition
|
||||||
|
}, () => {
|
||||||
|
const { archivesStore: { welfareForm } } = this.props;
|
||||||
|
welfareForm.initFormFields(this.state.searchConditions);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { searchConditions } = this.state;
|
||||||
|
const { archivesStore: { welfareForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<div className="wea-advanced-searchsAd">
|
||||||
|
{getSearchs(welfareForm, searchConditions, 2, false)}
|
||||||
|
</div>
|
||||||
|
<div className="wea-search-buttons">
|
||||||
|
<div style={{ textAlign: "center" }}>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={() => welfareForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default WelfareAdvanceSearchPannel;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,103 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利档案页面重构-导入
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/6
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||||
|
import ImportDialog from "../../../../../components/importDialog";
|
||||||
|
import { convertToUrlString, getURLParameters } from "../../../../../util/url";
|
||||||
|
import { importBatch } from "../../../../../apis/welfareArchive";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("archivesStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
importDialog: {
|
||||||
|
nextloading: false, link: "", importResult: {}, imageId: "",
|
||||||
|
previewUrl: "/api/bs/hrmsalary/scheme/preview"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
const { runStatuses, archivesStore: { welfareForm } } = nextProps;
|
||||||
|
const payload = {
|
||||||
|
[runStatuses !== "ext" ? "exportData" : "extWelArchiveList"]: "false",
|
||||||
|
runStatuses, ...welfareForm.getFormParams()
|
||||||
|
};
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...this.state.importDialog,
|
||||||
|
link: `/api/bs/hrmsalary/scheme/template/export?${convertToUrlString(payload)}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
nextloading: false, link: "", importResult: {}, imageId: "",
|
||||||
|
previewUrl: "/api/bs/hrmsalary/scheme/preview"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleImport = (payload) => {
|
||||||
|
const { importDialog } = this.state, { runStatuses: runStatus } = this.props;
|
||||||
|
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||||
|
importBatch({ ...payload, runStatus: runStatus.split(",")[0] }).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 { runStatuses, archivesStore: { welfareForm } } = this.props;
|
||||||
|
const { importDialog } = this.state;
|
||||||
|
const { link } = importDialog;
|
||||||
|
return (
|
||||||
|
<ImportDialog
|
||||||
|
{...this.props} {...importDialog}
|
||||||
|
onResetImportResult={() => this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog, importResult: {}, imageId: "", link: ""
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
exportDataDom={
|
||||||
|
<WeaCheckbox
|
||||||
|
value={getURLParameters(link)["exportData"] === "true" ? "1" : "0"}
|
||||||
|
content={getLabel(543208, "导出现有数据")}
|
||||||
|
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||||
|
onChange={val => {
|
||||||
|
let payload = {
|
||||||
|
exportData: val === "1", runStatuses, ...welfareForm.getFormParams()
|
||||||
|
};
|
||||||
|
runStatuses === "ext" && (payload = { ...payload, extWelArchiveList: true, runStatuses: "" });
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog,
|
||||||
|
link: `/api/bs/hrmsalary/scheme/template/export?${convertToUrlString(payload)}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||||
|
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,315 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:社保福利档案页面重构-查看编辑弹框
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/6
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
|
||||||
|
import * as API from "../../../../../apis/welfareArchive";
|
||||||
|
import { getTaxAgentSelectList } from "../../../../../apis/taxAgent";
|
||||||
|
import { getWelfareSearchsForm, welfareConditions } from "../../config";
|
||||||
|
import { getConditionDomkeys, toDecimal_n } from "../../../../../util";
|
||||||
|
import { Button, message, Modal } from "antd";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("archivesStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, conditions: [], formData: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
document.querySelector(".salary-welfare-archive").classList.add("zIndex0-welfare-archive");
|
||||||
|
const promise = this.getBaseForm(nextProps);
|
||||||
|
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||||
|
const { archivesStore: { initWelfareProfileForm } } = nextProps;
|
||||||
|
document.querySelector(".salary-welfare-archive").classList.remove("zIndex0-welfare-archive");
|
||||||
|
initWelfareProfileForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getBaseForm = async (props) => {
|
||||||
|
const { data: taxAgentList } = await getTaxAgentSelectList();
|
||||||
|
const {
|
||||||
|
archivesStore: { welfareProfileForm }, socialBase, fundBase, otherBase, runStatuses,
|
||||||
|
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData,
|
||||||
|
showOperateBtn
|
||||||
|
} = props;
|
||||||
|
let socialComData = {}, fundComData = {}, otherComData = {};
|
||||||
|
if (!_.isNil(socialBase.comItems) && !_.isNil(socialBase.comData)) {
|
||||||
|
_.forEach(getConditionDomkeys(socialBase.comItems), o => {
|
||||||
|
socialComData = {
|
||||||
|
...socialComData,
|
||||||
|
[`${o}_com`]: socialBase.comData[o]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!_.isNil(fundBase.comItems) && !_.isNil(fundBase.comData)) {
|
||||||
|
_.forEach(getConditionDomkeys(fundBase.comItems), o => {
|
||||||
|
fundComData = {
|
||||||
|
...fundComData,
|
||||||
|
[`${o}_com`]: fundBase.comData[o]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!_.isNil(otherBase.comItems) && !_.isNil(otherBase.comData)) {
|
||||||
|
_.forEach(getConditionDomkeys(otherBase.comItems), o => {
|
||||||
|
otherComData = {
|
||||||
|
...otherComData,
|
||||||
|
[`${o}_com`]: otherBase.comData[o]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
|
||||||
|
API.getBaseForm(payload).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { data: result } = data;
|
||||||
|
const formData = {
|
||||||
|
...result, ...socialBaseData, ...fundBaseData, ...othersBaseData,
|
||||||
|
...socialBase.data, ...fundBase.data, ...otherBase.data,
|
||||||
|
...socialComData, ...fundComData, ...otherComData
|
||||||
|
};
|
||||||
|
this.setState({
|
||||||
|
formData,
|
||||||
|
conditions: _.map(welfareConditions, o => {
|
||||||
|
if (o.title === "basic") {
|
||||||
|
return {
|
||||||
|
...o, title: getLabel(542699, "员工基本信息"),
|
||||||
|
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : o.viewAttr,
|
||||||
|
items: _.map(o.items, g => {
|
||||||
|
return { ...g, label: getLabel(g.lanId, g.label) };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
} else if (o.title === "taxAgent") {
|
||||||
|
return {
|
||||||
|
...o, title: getLabel(537996, "个税扣缴义务人"),
|
||||||
|
items: _.map(o.items, g => {
|
||||||
|
return {
|
||||||
|
...g, label: getLabel(g.lanId, g.label),
|
||||||
|
options: _.map(taxAgentList, j => ({ key: j.id, showname: j.content }))
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
} else if (o.title === "social" || o.title === "fund" || o.title === "others") {
|
||||||
|
const title = o.title === "social" ? getLabel(543194, "社保基础信息") : o.title === "fund" ? getLabel(543197, "公积金基础信息") : getLabel(543198, "其他福利基础信息");
|
||||||
|
return {
|
||||||
|
...o, title,
|
||||||
|
items: _.map(o.items, g => {
|
||||||
|
if (getKey(g) === "socialSchemeId" || getKey(g) === "fundSchemeId" || getKey(g) === "otherSchemeId" || _.lowerCase(getKey(g)).indexOf("take") !== -1) {
|
||||||
|
const key = _.lowerCase(getKey(g)).indexOf("take") !== -1 ? "underTake" : getKey(g);
|
||||||
|
return {
|
||||||
|
...g, label: getLabel(g.lanId, g.label),
|
||||||
|
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : g.viewAttr,
|
||||||
|
options: _.find(props[`${o.title}Items`], j => j.domkey[0] === key).options
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...g, label: getLabel(g.lanId, g.label),
|
||||||
|
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : g.viewAttr
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...o, items: _.map(o.items, g => {
|
||||||
|
return {
|
||||||
|
...g, label: getLabel(g.lanId, g.label),
|
||||||
|
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : g.viewAttr
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
welfareProfileForm.initFormFields(this.state.conditions);
|
||||||
|
_.map(getConditionDomkeys(this.state.conditions), k => {
|
||||||
|
if (k === "paymentOrganization") {
|
||||||
|
welfareProfileForm.updateFields({ [k]: paymentOrganization.toString() });
|
||||||
|
} else if (_.lowerCase(k).indexOf("social") !== -1 || k === "schemeAccount") {
|
||||||
|
welfareProfileForm.updateFields({ [k]: formData["SOCIAL_SECURITY"][k] ? formData["SOCIAL_SECURITY"][k].toString() : "" });
|
||||||
|
} else if (_.lowerCase(k).indexOf("fund") !== -1) {
|
||||||
|
welfareProfileForm.updateFields({ [k]: formData["ACCUMULATION_FUND"][k] ? formData["ACCUMULATION_FUND"][k].toString() : "" });
|
||||||
|
} else if (_.lowerCase(k).indexOf("other") !== -1) {
|
||||||
|
welfareProfileForm.updateFields({ [k]: formData["OTHER"][k] ? formData["OTHER"][k].toString() : "" });
|
||||||
|
} else {
|
||||||
|
welfareProfileForm.updateFields({ [k]: formData[k] || "" });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
covertPayload = (welfareType, underTakeType, paymentForm, paymentComForm) => {
|
||||||
|
const { archivesStore: { welfareProfileForm } } = this.props;
|
||||||
|
const welfareData = welfareProfileForm.getFormParams();
|
||||||
|
const { formData } = this.state;
|
||||||
|
return {
|
||||||
|
baseForm: JSON.stringify({
|
||||||
|
...formData[welfareType], ..._.reduce(_.keys(formData[welfareType]), (pre, cur) => {
|
||||||
|
if (welfareData[cur]) return { ...pre, [cur]: welfareData[cur] };
|
||||||
|
return { ...pre };
|
||||||
|
}, {}),
|
||||||
|
underTake: welfareData[`${underTakeType}UnderTake`]
|
||||||
|
}),
|
||||||
|
paymentForm: !_.isEmpty(paymentForm) ? JSON.stringify(_.reduce(paymentForm, (pre, cur) => {
|
||||||
|
if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: toDecimal_n(formData[cur], 2).toString() };
|
||||||
|
return { ...pre, [cur]: "0" };
|
||||||
|
}, {})) : "",
|
||||||
|
paymentComForm: !_.isEmpty(paymentComForm) ? JSON.stringify(_.reduce(paymentComForm, (pre, cur) => {
|
||||||
|
if (formData[`${cur}_com`] || formData[`${cur}_com`] === 0) return {
|
||||||
|
...pre,
|
||||||
|
[cur]: toDecimal_n(formData[`${cur}_com`], 2).toString()
|
||||||
|
};
|
||||||
|
return { ...pre, [cur]: "0" };
|
||||||
|
}, {})) : "",
|
||||||
|
welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true
|
||||||
|
};
|
||||||
|
};
|
||||||
|
save = async () => {
|
||||||
|
const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items), getConditionDomkeys(this.props.socialBase.comItems || [])),
|
||||||
|
fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items), getConditionDomkeys(this.props.fundBase.comItems || [])),
|
||||||
|
otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items), getConditionDomkeys(this.props.otherBase.comItems || []));
|
||||||
|
if (!(socailPayload.validate && fundPayload.validate && otherPayload.validate)) {
|
||||||
|
message.warning(getLabel(111, "请维护起始缴纳月!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.setState({ loading: true });
|
||||||
|
const [{
|
||||||
|
status: socialStatus,
|
||||||
|
errormsg: socialErrorMsg = "!"
|
||||||
|
}, {
|
||||||
|
status: fundStatus,
|
||||||
|
errormsg: fundErrorMsg = "!"
|
||||||
|
}, {
|
||||||
|
status: otherStatus,
|
||||||
|
errormsg: otherErrorMsg = "!"
|
||||||
|
}] = await Promise.all([API.save(socailPayload), API.save(fundPayload), API.save(otherPayload)]);
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (socialStatus && fundStatus && otherStatus) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.props.onClose(true);
|
||||||
|
} else {
|
||||||
|
message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
updateFormData = (baseData) => this.setState({ formData: { ...this.state.formData, ...baseData } });
|
||||||
|
handleFormChange = (val) => {
|
||||||
|
const changeKey = _.keys(val)[0], changeVal = val[changeKey].value;
|
||||||
|
const {
|
||||||
|
archivesStore: { setHasBeenModify },
|
||||||
|
onChangeProgramme, employeeId,
|
||||||
|
paymentOrganization, showOperateBtn
|
||||||
|
} = this.props;
|
||||||
|
setHasBeenModify(true);
|
||||||
|
if (changeKey === "socialSchemeId" || changeKey === "fundSchemeId" || changeKey === "otherSchemeId") {
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(this.state.conditions, o => {
|
||||||
|
if (
|
||||||
|
(o.typename === "SOCIAL_SECURITY" && changeKey === "socialSchemeId") ||
|
||||||
|
(o.typename === "ACCUMULATION_FUND" && changeKey === "fundSchemeId") ||
|
||||||
|
(o.typename === "OTHER" && changeKey === "otherSchemeId")
|
||||||
|
) {
|
||||||
|
return {
|
||||||
|
...o, items: _.map(o.items, g => {
|
||||||
|
if (getKey(g).indexOf("StartTime") !== -1) {
|
||||||
|
return {
|
||||||
|
...g, viewAttr: (changeVal && showOperateBtn) ? 3 : g.viewAttr
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...g };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
});
|
||||||
|
onChangeProgramme(changeKey.slice(0, changeKey.indexOf("SchemeId")), changeVal, {
|
||||||
|
employeeId,
|
||||||
|
paymentOrganization
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
|
||||||
|
handleSameChange = (baseItems, value) => {
|
||||||
|
let newFormDatas = {}, hasCompromise = false;
|
||||||
|
baseItems.forEach((formLabel) => {
|
||||||
|
const { min, max } = formLabel;
|
||||||
|
newFormDatas[getKey(formLabel)] = toDecimal_n(value, 2) || "";
|
||||||
|
if (min !== "0.000" && value !== "" && Number(value) < Number(min)) {
|
||||||
|
hasCompromise = true;
|
||||||
|
newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2);
|
||||||
|
}
|
||||||
|
if (max !== "0.000" && value !== "" && Number(value) > Number(max)) {
|
||||||
|
hasCompromise = true;
|
||||||
|
newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (hasCompromise) {
|
||||||
|
message.warning(getLabel("111", "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。"));
|
||||||
|
}
|
||||||
|
this.setState({ formData: { ...this.state.formData, ...newFormDatas } });
|
||||||
|
};
|
||||||
|
handleNoPaymentChange = (type, value) => this.setState({
|
||||||
|
formData: { ...this.state.formData, [type]: { ...this.state.formData[type], nonPayment: value } }
|
||||||
|
});
|
||||||
|
renderTitle = () => {
|
||||||
|
const { loading } = this.state;
|
||||||
|
const { runStatuses, showOperateBtn } = this.props;
|
||||||
|
return <div className="titleDialog">
|
||||||
|
<div className="titleCol titleLeftBox">
|
||||||
|
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||||
|
<div className="title">{getLabel(543191, "员工福利档案")}</div>
|
||||||
|
</div>
|
||||||
|
<div className="titleCol titleRightBox">
|
||||||
|
{
|
||||||
|
runStatuses !== "4,5" && showOperateBtn &&
|
||||||
|
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
handleClose = () => {
|
||||||
|
const { archivesStore: { hasBeenModify }, onClose } = this.props;
|
||||||
|
if (hasBeenModify) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(111, "确定放弃填写吗?放弃后数据将不会被保存!"),
|
||||||
|
onOk: () => {
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { archivesStore: { welfareProfileForm }, showOperateBtn } = this.props;
|
||||||
|
const { conditions, formData } = this.state;
|
||||||
|
return (
|
||||||
|
<WeaSlideModal
|
||||||
|
className="salary-welfare-archive-edit-layout" {...this.props}
|
||||||
|
top={0} width={800} height={100} measureT={"%"} measureX={"px"} measureY={"%"}
|
||||||
|
direction={"right"} title={this.renderTitle()} onClose={this.handleClose}
|
||||||
|
content={<div className="salary-welfare-archive-edit-area">
|
||||||
|
{
|
||||||
|
getWelfareSearchsForm(
|
||||||
|
welfareProfileForm, conditions, this.handleFormChange, this.handleNoPaymentChange, this.handleExtraChange,
|
||||||
|
this.handleSameChange, formData, this.props, showOperateBtn
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</div>}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,304 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:社保福利档案页面重构-列表
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/10/31
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { message, Modal, Spin } from "antd";
|
||||||
|
import WelfareEditArchiveSlide from "../welfareEditArchiveSlide";
|
||||||
|
import * as API from "../../../../../apis/welfareArchive";
|
||||||
|
import { welfareTypeEnum } from "../../config";
|
||||||
|
import { getConditionDomkeys, getConditionFields } from "../../../../../util";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const APILIST = {
|
||||||
|
runStatuses: API.queryList,
|
||||||
|
ext: API.getExtTable,
|
||||||
|
delToDo: API.updateRunStatus, //删除待办
|
||||||
|
delArchive: API.deleteArchive, //删除档案
|
||||||
|
addToPay: API.stayAddToPay, //增员
|
||||||
|
stayDelToStop: API.stayDelToStop, //减员
|
||||||
|
delToDoStay: API.cancelStayDel, //待减员-删除待办
|
||||||
|
cancelStop: API.cancelStopPayment //停缴员工-取消停缴
|
||||||
|
};
|
||||||
|
|
||||||
|
@inject("archivesStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
dataSource: [], columns: [], loading: false, selectedRowKeys: [],
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
welfareEditSlide: { visible: false, employeeId: "", welfareTypeEnum: "", paymentOrganization: "" }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
window.addEventListener("message", this.handleReceive, false);
|
||||||
|
window.addEventListener("resize", this.handleResize, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleResize = () => {
|
||||||
|
this.forceUpdate();
|
||||||
|
};
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener("message", this.handleReceive, false);
|
||||||
|
window.removeEventListener("resize", this.handleResize, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if ((nextProps.runStatuses !== this.props.runStatuses) || (nextProps.isQuery !== this.props.isQuery)) {
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...this.state.pageInfo, current: 1, pageSize: 10, total: 0 }
|
||||||
|
}, () => this.getWelfareList(nextProps));
|
||||||
|
}
|
||||||
|
if ((nextProps.runStatuses !== this.props.runStatuses)) {
|
||||||
|
this.setState({
|
||||||
|
dataSource: [], columns: [], loading: false, selectedRowKeys: [],
|
||||||
|
welfareEditSlide: { ...this.state.welfareEditSlide, visible: false }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReceive = async ({ data }) => {
|
||||||
|
const { type, payload: { id, params } = {} } = data;
|
||||||
|
if (type === "init") {
|
||||||
|
this.getWelfareList(this.props);
|
||||||
|
} else if (type === "turn") {
|
||||||
|
const { record: { baseInfo, employeeId, paymentOrganization } = {}, interfaceParams = {} } = params;
|
||||||
|
const { runStatuses, showOperateBtn } = this.props;
|
||||||
|
switch (id) {
|
||||||
|
case "PAGEINFO":
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...this.state.pageInfo, ...params }
|
||||||
|
}, () => this.getWelfareList(this.props));
|
||||||
|
break;
|
||||||
|
case "CHECKBOX":
|
||||||
|
const { selectedRowKeys } = params;
|
||||||
|
this.setState({ selectedRowKeys });
|
||||||
|
break;
|
||||||
|
case "EDIT":
|
||||||
|
case "VIEW":
|
||||||
|
const payload = { employeeId, paymentOrganization };
|
||||||
|
const [socialItems, fundItems, othersItems] = await Promise.all([
|
||||||
|
this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"] }),
|
||||||
|
this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"] }),
|
||||||
|
this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["other"] })
|
||||||
|
]);
|
||||||
|
this.setState({
|
||||||
|
welfareEditSlide: {
|
||||||
|
...this.state.welfareEditSlide, employeeId, paymentOrganization, runStatuses,
|
||||||
|
socialItems: socialItems.data.items[0].items,
|
||||||
|
socialBaseData: {
|
||||||
|
SOCIAL_SECURITY: { ...socialItems.data.data, socialUnderTake: socialItems.data.data.underTake }
|
||||||
|
},
|
||||||
|
fundItems: fundItems.data.items[0].items,
|
||||||
|
fundBaseData: {
|
||||||
|
ACCUMULATION_FUND: { ...fundItems.data.data, fundUnderTake: fundItems.data.data.underTake }
|
||||||
|
},
|
||||||
|
othersItems: othersItems.data.items[0].items,
|
||||||
|
othersBaseData: { OTHER: { ...othersItems.data.data, otherUnderTake: othersItems.data.data.underTake } }
|
||||||
|
}
|
||||||
|
}, async () => {
|
||||||
|
const { socialBaseData, fundBaseData, othersBaseData } = this.state.welfareEditSlide;
|
||||||
|
const { SOCIAL_SECURITY: { socialSchemeId } } = socialBaseData,
|
||||||
|
{ ACCUMULATION_FUND: { fundSchemeId } } = fundBaseData,
|
||||||
|
{ OTHER: { otherSchemeId } } = othersBaseData;
|
||||||
|
const [socialBase, fundBase, otherBase] = await Promise.all([
|
||||||
|
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"], schemeId: socialSchemeId }),
|
||||||
|
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"], schemeId: fundSchemeId }),
|
||||||
|
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["other"], schemeId: otherSchemeId })
|
||||||
|
]);
|
||||||
|
this.setState({
|
||||||
|
welfareEditSlide: {
|
||||||
|
...this.state.welfareEditSlide, visible: true, showOperateBtn,
|
||||||
|
socialBase: socialBase.data, fundBase: fundBase.data, otherBase: otherBase.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "ADD-TO-PAY":
|
||||||
|
case "STAY-DEL-TO-STOP":
|
||||||
|
case "CANCEL-STOP":
|
||||||
|
case "DEL-TO-DO":
|
||||||
|
case "DEL-TO-DO-STAY":
|
||||||
|
const module = (id === "ADD-TO-PAY" || id === "STAY-DEL-TO-STOP" || id === "CANCEL-STOP") ?
|
||||||
|
[baseInfo] : { ids: [baseInfo], ...interfaceParams };
|
||||||
|
this.handleWelfareOpts(_.camelCase(id), module);
|
||||||
|
break;
|
||||||
|
case "DEL-ARCHIVE":
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(388758, "确认要删除吗?"),
|
||||||
|
onOk: () => this.handleWelfareOpts(_.camelCase(id), [baseInfo])
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getProfileTypeForm = async (props) => {
|
||||||
|
const { employeeId, paymentOrganization, welfareTypeEnum } = props;
|
||||||
|
const payload = { employeeId, paymentOrganization, welfareTypeEnum };
|
||||||
|
return API.getBaseForm(payload);
|
||||||
|
};
|
||||||
|
getPaymentForm = async (props) => {
|
||||||
|
return API.getPaymentForm({ ...props });
|
||||||
|
};
|
||||||
|
getWelfareList = (props) => {
|
||||||
|
const { pageInfo } = this.state;
|
||||||
|
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;
|
||||||
|
const params = { ...pageInfo, ...welfareForm.getFormParams() };
|
||||||
|
const payload = runStatuses === "ext" ? { ...params, extWelArchiveList: true } : {
|
||||||
|
...params,
|
||||||
|
runStatuses: runStatuses.split(",")
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
APILIST[runStatuses === "ext" ? "ext" : "runStatuses"](payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { columns, datas: dataSource, pageInfo: { pageNum: current, pageSize, total } } = data;
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||||
|
columns: _.map(columns, o => {
|
||||||
|
const { column: dataIndex, text: title, width } = o;
|
||||||
|
if (dataIndex === "employeeName") {
|
||||||
|
return {
|
||||||
|
dataIndex, title, width, fixed: "left", ellipsis: true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
dataIndex, title, width, ellipsis: true
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
const { pageInfo, selectedRowKeys, columns, dataSource } = this.state;
|
||||||
|
onChangeTopTabCount(runStatuses, total);
|
||||||
|
this.postMessageToChild({
|
||||||
|
dataSource, pageInfo, selectedRowKeys, runStatuses,
|
||||||
|
columns, showOperateBtn
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description:批量操作
|
||||||
|
* Params:
|
||||||
|
* Date: 2023/11/3
|
||||||
|
*/
|
||||||
|
handleBatchOpt = (type, payload) => {
|
||||||
|
const { selectedRowKeys } = this.state;
|
||||||
|
if (_.isEmpty(selectedRowKeys)) {
|
||||||
|
message.warning(getLabel(543303, "请选择表格数据"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const params = _.isNil(payload) ? selectedRowKeys : { ids: selectedRowKeys, ...payload };
|
||||||
|
this.handleWelfareOpts(type, params);
|
||||||
|
};
|
||||||
|
handleWelfareOpts = (type, payload) => {
|
||||||
|
WeaLoadingGlobal.start();
|
||||||
|
APILIST[type](payload).then(({ status, data = {}, errormsg }) => {
|
||||||
|
WeaLoadingGlobal.destroy();
|
||||||
|
if (status) {
|
||||||
|
const { msg, type } = data;
|
||||||
|
if (type === "fail") {
|
||||||
|
message.error(msg);
|
||||||
|
} else if (type === "success") {
|
||||||
|
message.success(msg);
|
||||||
|
this.getWelfareList(this.props);
|
||||||
|
this.setState({ selectedRowKeys: [] });
|
||||||
|
} else {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.getWelfareList(this.props);
|
||||||
|
this.setState({ selectedRowKeys: [] });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
postMessageToChild = (payload = {}) => {
|
||||||
|
const i18n = {
|
||||||
|
"操作": getLabel(30585, "操作"), "编辑": getLabel(501169, "编辑"),
|
||||||
|
"增员": getLabel(543180, "增员"), "删除档案": getLabel(23238, "删除档案"),
|
||||||
|
"删除待办": getLabel(543181, "删除待办"), "减员": getLabel(543182, "减员"),
|
||||||
|
"查看": getLabel(33564, "查看"), "取消停缴": getLabel(543183, "取消停缴"),
|
||||||
|
"共": getLabel(18609, "共"), "条": getLabel(18256, "条")
|
||||||
|
};
|
||||||
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
|
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
|
};
|
||||||
|
handleChangeProgramme = (type, schemeId, payload) => {
|
||||||
|
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })
|
||||||
|
.then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { data: defVal, items, comData, comItems } = data;
|
||||||
|
this.setState({
|
||||||
|
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
|
||||||
|
}, () => {
|
||||||
|
const perData = _.reduce(getConditionDomkeys(items), (pre, cur) => {
|
||||||
|
const minNum = !_.isNil(getConditionFields(items)[cur].min) ? Number(getConditionFields(items)[cur].min) : undefined,
|
||||||
|
maxNum = !_.isNil(getConditionFields(items)[cur].max) ? Number(getConditionFields(items)[cur].max) : undefined;
|
||||||
|
const val = !_.isNil(defVal) ? Number(defVal[cur]) : 0;
|
||||||
|
return {
|
||||||
|
...pre,
|
||||||
|
[cur]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
|
||||||
|
};
|
||||||
|
}, {});
|
||||||
|
if (!_.isNil(comItems)) {
|
||||||
|
const comDataTmpv = _.reduce(getConditionDomkeys(comItems), (pre, cur) => {
|
||||||
|
const minNum = !_.isNil(getConditionFields(comItems)[cur].min) ? Number(getConditionFields(comItems)[cur].min) : undefined,
|
||||||
|
maxNum = !_.isNil(getConditionFields(comItems)[cur].max) ? Number(getConditionFields(comItems)[cur].max) : undefined;
|
||||||
|
const val = !_.isNil(comData) ? Number(comData[cur]) : 0;
|
||||||
|
return {
|
||||||
|
...pre,
|
||||||
|
[`${cur}_com`]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
|
||||||
|
};
|
||||||
|
}, {});
|
||||||
|
this.archiveSlideRef.wrappedInstance.updateFormData({ ...perData, ...comDataTmpv });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.archiveSlideRef.wrappedInstance.updateFormData({ ...perData });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading, dataSource, welfareEditSlide } = this.state;
|
||||||
|
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 * 39 + 113 : dataSource.length < 10 ? dataSource.length * 39 + 113 : parseFloat(dom.style.height) - 170;
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div className="table-layout" style={{ height: height + "px" }}>
|
||||||
|
<Spin spinning={loading}>
|
||||||
|
<iframe
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/welfareArchiveTable"
|
||||||
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/welfareArchiveTable"
|
||||||
|
id="atdTable"
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
{/* 编辑查看员工福利档案*/}
|
||||||
|
<WelfareEditArchiveSlide {...welfareEditSlide} ref={dom => this.archiveSlideRef = dom}
|
||||||
|
onClose={(isFresh) => this.setState({
|
||||||
|
welfareEditSlide: { ...welfareEditSlide, visible: false }
|
||||||
|
}, () => isFresh && this.getWelfareList(this.props))}
|
||||||
|
onChangeProgramme={this.handleChangeProgramme}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:社保福利档案页面重构-小提示
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/10/31
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
const { dataSource } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="tip-info-area">
|
||||||
|
<div className="title">{getLabel(543177, "小提示")}</div>
|
||||||
|
<div className="tip-detail">
|
||||||
|
{
|
||||||
|
_.map(dataSource, item => (<div className="tip-item">{getLabel(item.lanId, item.title)}</div>))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
||||||
|
export const HelpfulDiv = () => {
|
||||||
|
return <div className="helpWrapper">
|
||||||
|
<span>{getLabel(544362, "1、缴纳月份区间包含起始缴纳月,不包含最后缴纳月;")}</span>
|
||||||
|
<span>{getLabel(544365, "2、维护的所有的最后缴纳月都大于当前月,则该待办数据自动清除,不显示在待减员列表;")}</span>
|
||||||
|
<span>{getLabel(544366, "3、减员失败情况:①有起始缴纳月却未维护最后缴纳月;②员工存在未归档的核算数据;")}</span>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const CancelHelpfulDiv = () => {
|
||||||
|
return <div className="helpWrapper">
|
||||||
|
<span>{getLabel(544362, "1、缴纳月份区间包含起始缴纳月,不包含最后缴纳月;")}</span>
|
||||||
|
<span>{getLabel(544363, "2、若员工当前不在停缴档案的个税扣缴义务人下,则不可取消停缴;")}</span>
|
||||||
|
<span>{getLabel(544364, "3、若员工当前在其他个税扣缴义务人下正在缴纳,也不可取消停缴;")}</span>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,811 @@
|
||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
WeaCheckbox,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaHelpfulTip,
|
||||||
|
WeaInputNumber,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaTools
|
||||||
|
} from "ecCom";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||||
|
import { CancelHelpfulDiv, HelpfulDiv } from "./components/welfareTip";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
//批量操作列表
|
||||||
|
export const welfareTypeEnum = {
|
||||||
|
social: "SOCIAL_SECURITY",
|
||||||
|
fund: "ACCUMULATION_FUND",
|
||||||
|
other: "OTHER"
|
||||||
|
};
|
||||||
|
export const optTypeEnum = [
|
||||||
|
//批量增员
|
||||||
|
{
|
||||||
|
key: "batchStaffIncrease",
|
||||||
|
type: "addToPay",
|
||||||
|
payload: null
|
||||||
|
},
|
||||||
|
// 待增员-批量删除待办
|
||||||
|
{
|
||||||
|
key: "batchDeleteTodolist",
|
||||||
|
type: "delToDo",
|
||||||
|
payload: { runStatus: "4" }
|
||||||
|
},
|
||||||
|
// 待减员-批量删除待办
|
||||||
|
{
|
||||||
|
key: "batchDeleteTodolistStayDel",
|
||||||
|
type: "delToDoStay",
|
||||||
|
payload: { runStatus: "3" }
|
||||||
|
},
|
||||||
|
//批量减员
|
||||||
|
{
|
||||||
|
key: "batchReduction",
|
||||||
|
type: "stayDelToStop",
|
||||||
|
payload: null
|
||||||
|
},
|
||||||
|
//批量取消停缴
|
||||||
|
{
|
||||||
|
key: "batchCancellationOfSuspended",
|
||||||
|
type: "cancelStop",
|
||||||
|
payload: null
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const tabList = [
|
||||||
|
{ viewcondition: "1", title: getLabel(542711, "待增员"), showcount: true, groupid: "stayAdd" },
|
||||||
|
{ viewcondition: "2,3", title: getLabel(542504, "在缴员工"), showcount: true, groupid: "paying" },
|
||||||
|
{ viewcondition: "3", title: getLabel(542713, "待减员"), showcount: true, groupid: "stayDel" },
|
||||||
|
{ viewcondition: "4,5", title: getLabel(542505, "停缴员工"), showcount: true, groupid: "stopPay" },
|
||||||
|
{ viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "ext" }
|
||||||
|
];
|
||||||
|
export const welfareTipList = [
|
||||||
|
{
|
||||||
|
viewcondition: "1",
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
lanId: 544349,
|
||||||
|
title: "1、个税扣缴义务人变更进入【待增员】的,保留所有最新版本数据;若修改了数据再增员则修改的数据作为新版本保存;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544350,
|
||||||
|
title: "2、维护好员工的社保福利档案数据后,点击【增员】,数据会进入【在缴员工】;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544351,
|
||||||
|
title: "3、若不需给该员工缴纳,可点击【删除待办】进入【停缴员工】;进入【停缴员工】后,可以点击【取消停缴】再次进入【待增员】;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544352,
|
||||||
|
title: "4、不管起始缴纳月维护到哪个月,都可以进行增员,不影响核算判断;若维护了最后缴纳月,且小于等于当前月,则增员失败;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544353,
|
||||||
|
title: "5、增员失败情况:①终止缴纳月小于等于当前月;②方案或起始缴纳月未维护;"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
viewcondition: "2,3",
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
lanId: 544358,
|
||||||
|
title: "1、需缴纳社保福利的员工维护在【在缴员工】;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544359,
|
||||||
|
title: "2、可使用更新导入,调整档案数据;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544360,
|
||||||
|
title: "3、若维护了最后缴纳月且小于等于当前月,则自动进入【待减员】;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544361,
|
||||||
|
title: "4、核算人员范围为,【在缴员工】中的起始缴纳月和最后缴纳月区间包含当前月的人员;"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
viewcondition: "3",
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
lanId: 544355,
|
||||||
|
title: "1、数据进入【待减员】规则:①员工的人事状态属性从在职变成非在职,且在【在缴员工】里;②【在缴员工】里档案维护了缴纳终止月且小于等于当前月;③个税扣缴义务人发生调整;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544356,
|
||||||
|
title: "2、【待减员】为是否不再缴纳的待办状态,数据是从【在缴员工】中复制的,若不处理列表中的待办数据,也不影响社保福利核算;【待减员】维护的数据和【在缴员工】数据是同步的;"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lanId: 544357,
|
||||||
|
title: "3、点击【减员】前先维护最后缴纳月,所有有起始缴纳月的福利项的最后缴纳月都小于等于当前月且无未归档的核算数据的档案才能减员成功,减员成功后数据进入【停缴员工】;"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
viewcondition: "4,5",
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
lanId: 544354,
|
||||||
|
title: "1、不需要缴纳社保福利的员工,保存在【停缴员工】;"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
viewcondition: "ext",
|
||||||
|
list: []
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const renderDropMenuDatas = (selectedKey, getLabel, showOperateBtn) => {
|
||||||
|
let menus = [{
|
||||||
|
key: "log",
|
||||||
|
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||||
|
content: getLabel(111, "操作日志")
|
||||||
|
}];
|
||||||
|
if (showOperateBtn) {
|
||||||
|
switch (selectedKey) {
|
||||||
|
case "1":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "fullStaffIncrease",
|
||||||
|
icon: <i className="iconfont icon-quanbu"/>,
|
||||||
|
content: getLabel(543185, "全量增员")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "batchStaffIncrease",
|
||||||
|
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||||
|
content: getLabel(543187, "批量增员")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "batchDeleteTodolist",
|
||||||
|
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||||
|
content: getLabel(543186, "批量删除待办")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case "2,3":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "fullReduction",
|
||||||
|
icon: <i className="iconfont icon-quanbu"/>,
|
||||||
|
content: getLabel(543189, "全量减员")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "batchReduction",
|
||||||
|
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||||
|
content: getLabel(543188, "批量减员")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "batchDeleteTodolistStayDel",
|
||||||
|
icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||||
|
content: getLabel(543186, "批量删除待办")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case "4,5":
|
||||||
|
menus = [
|
||||||
|
{
|
||||||
|
key: "batchCancellationOfSuspended",
|
||||||
|
icon: <i className="iconfont icon-piliangcaozuo"/>,
|
||||||
|
content: getLabel(543190, "批量取消停缴")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportAll",
|
||||||
|
icon: <i className="iconfont icon-daochu"/>,
|
||||||
|
content: getLabel(81272, "导出全部")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "exportSelected",
|
||||||
|
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||||
|
content: getLabel(512938, "导出选中")
|
||||||
|
},
|
||||||
|
...menus
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return menus;
|
||||||
|
};
|
||||||
|
export const renderReqBtns = (selectedKey, getLabel, onOpenAdvanceSearch, onAdvanceSearch, onImport, showOperateBtn) => {
|
||||||
|
let reqBtns = showOperateBtn ? [
|
||||||
|
<Button type="primary" onClick={onImport}>{getLabel(32935, "导入")}</Button>,
|
||||||
|
<AdvanceInputBtn onOpenAdvanceSearch={onOpenAdvanceSearch} onAdvanceSearch={onAdvanceSearch}/>
|
||||||
|
] : [<AdvanceInputBtn onOpenAdvanceSearch={onOpenAdvanceSearch} onAdvanceSearch={onAdvanceSearch}/>];
|
||||||
|
if (showOperateBtn) {
|
||||||
|
switch (selectedKey) {
|
||||||
|
case "1":
|
||||||
|
reqBtns.unshift(<WeaHelpfulTip
|
||||||
|
width={300} placement="topLeft"
|
||||||
|
title={
|
||||||
|
<span>
|
||||||
|
{getLabel(544348, "提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除,因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。")}
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
/>);
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
reqBtns.shift();
|
||||||
|
reqBtns.unshift(<WeaHelpfulTip
|
||||||
|
width={300} placement="topLeft"
|
||||||
|
title={HelpfulDiv}
|
||||||
|
/>);
|
||||||
|
break;
|
||||||
|
case "4,5":
|
||||||
|
reqBtns.shift();
|
||||||
|
reqBtns.unshift(<WeaHelpfulTip
|
||||||
|
width={300} placement="topLeft"
|
||||||
|
title={CancelHelpfulDiv}
|
||||||
|
/>);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return reqBtns;
|
||||||
|
};
|
||||||
|
export const logConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: true,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: true,
|
||||||
|
linkUrl: "/hrm/resource/HrmResource.jsp?id=",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
title: "",
|
||||||
|
type: "1"
|
||||||
|
},
|
||||||
|
domkey: ["employeeId"],
|
||||||
|
fieldcol: 17,
|
||||||
|
label: "对象",
|
||||||
|
lanId: 106,
|
||||||
|
labelcol: 7,
|
||||||
|
value: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: true,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: true,
|
||||||
|
linkUrl: "/hrm/resource/HrmResource.jsp?id=",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
title: "",
|
||||||
|
type: "1"
|
||||||
|
},
|
||||||
|
domkey: ["operator"],
|
||||||
|
fieldcol: 17,
|
||||||
|
label: "操作人",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 7,
|
||||||
|
value: ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const getLogSearchsForm = (form, condition, onSearch = () => void (0)) => {
|
||||||
|
const { isFormInit } = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
isFormInit && condition && condition.map(c => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem
|
||||||
|
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||||
|
{
|
||||||
|
getKey(fields) === "operator" &&
|
||||||
|
<Button type="primary" onClick={onSearch}
|
||||||
|
style={{ position: "absolute", right: "-70px", top: "0" }}>{getLabel(388113, "搜索")}</Button>
|
||||||
|
}
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(
|
||||||
|
<WeaSearchGroup col={4} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} center={false}
|
||||||
|
/>);
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
export const welfareConditions = [
|
||||||
|
{
|
||||||
|
defaultshow: true,
|
||||||
|
title: "basic",
|
||||||
|
col: 3,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["username"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "姓名",
|
||||||
|
lanId: 25034,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["department"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "部门",
|
||||||
|
lanId: 27511,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["position"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "岗位",
|
||||||
|
lanId: 6086,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["telephone"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "手机号",
|
||||||
|
lanId: 125238,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["hiredate"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "入职日期",
|
||||||
|
lanId: 1516,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
defaultshow: true,
|
||||||
|
title: "taxAgent",
|
||||||
|
col: 1,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["paymentOrganization"],
|
||||||
|
fieldcol: 16,
|
||||||
|
label: "个税扣缴义务人",
|
||||||
|
lanId: 537996,
|
||||||
|
labelcol: 8,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
defaultshow: true,
|
||||||
|
title: "social", typename: "SOCIAL_SECURITY",
|
||||||
|
col: 2, showPaid: true,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["socialSchemeId"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "社保方案名称",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["socialUnderTake"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "社保个人实际承担方",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "MONTHPICKER",
|
||||||
|
domkey: ["socialStartTime"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "社保起始缴纳月",
|
||||||
|
lanId: 542507,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["schemeAccount"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "社保账号",
|
||||||
|
lanId: 81594,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "MONTHPICKER",
|
||||||
|
domkey: ["socialEndTime"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "社保最后缴纳月",
|
||||||
|
lanId: 542508,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
defaultshow: true,
|
||||||
|
title: "fund", typename: "ACCUMULATION_FUND",
|
||||||
|
col: 2, showPaid: true,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["fundSchemeId"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "公积金方案名称",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["fundUnderTake"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "公积金个人实际承担方",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "MONTHPICKER",
|
||||||
|
domkey: ["fundStartTime"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "公积金起始缴纳月",
|
||||||
|
lanId: 542509,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["fundAccount"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "公积金账号",
|
||||||
|
lanId: 542268,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "MONTHPICKER",
|
||||||
|
domkey: ["fundEndTime"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "公积金最后缴纳月",
|
||||||
|
lanId: 542510,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["supplementFundAccount"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "补充公积金账号",
|
||||||
|
lanId: 542270,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
defaultshow: true,
|
||||||
|
title: "others", typename: "OTHER",
|
||||||
|
col: 2, showPaid: true,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["otherSchemeId"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "其它福利名称",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["otherUnderTake"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "其它福利个人实际承担方",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "MONTHPICKER",
|
||||||
|
domkey: ["otherStartTime"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "其他福利起始缴纳月",
|
||||||
|
lanId: 542511,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 3,
|
||||||
|
conditionType: "MONTHPICKER",
|
||||||
|
domkey: ["otherEndTime"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "其他福利最后缴纳月",
|
||||||
|
lanId: 542512,
|
||||||
|
labelcol: 10,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const getWelfareSearchsForm = (
|
||||||
|
form, condition, onChange = () => void (0),
|
||||||
|
onNoPaymentChange = () => void (0), onExtraChange = () => void (0), onSameChange = () => void (0),
|
||||||
|
payload, extraFormField, showOperateBtn) => {
|
||||||
|
const CustomComponent = ({ type }) => {
|
||||||
|
const value = payload[type].nonPayment ? payload[type].nonPayment.toString() : "";
|
||||||
|
return <WeaCheckbox
|
||||||
|
value={value} content={getLabel(543196, "暂不缴纳")}
|
||||||
|
onChange={v => onNoPaymentChange(type, v)}
|
||||||
|
disabled={runStatuses === "4,5" || !showOperateBtn}
|
||||||
|
/>;
|
||||||
|
};
|
||||||
|
const { socialBase, fundBase, otherBase, runStatuses } = extraFormField;
|
||||||
|
const { isFormInit } = form;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
let group = [];
|
||||||
|
isFormInit && condition && condition.map(c => {
|
||||||
|
let items = [];
|
||||||
|
c.items.map(fields => {
|
||||||
|
items.push({
|
||||||
|
com: (
|
||||||
|
<WeaFormItem
|
||||||
|
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={onChange}/>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 1,
|
||||||
|
hide: fields.hide
|
||||||
|
});
|
||||||
|
});
|
||||||
|
!_.isEmpty(items) && group.push(
|
||||||
|
<WeaSearchGroup col={c.col} needTigger={true} showGroup={c.defaultshow} items={items} center={false}
|
||||||
|
title={c.title}
|
||||||
|
customComponent={c.showPaid ? <CustomComponent type={c.typename}/> : <span></span>}
|
||||||
|
className={c.col === 3 ? "basic-welfare-info-wrapper" : (c.col === 2 || c.items.length > 1) ? "twoColumns-welfare-info-wrapper" : ""}
|
||||||
|
/>);
|
||||||
|
});
|
||||||
|
return _.reduce(group, (pre, cur) => {
|
||||||
|
if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
|
||||||
|
if (!_.isNil(socialBase.comItems) && _.every(socialBase.comItems, o => o.items.length > 0)) {
|
||||||
|
return [
|
||||||
|
...pre, cur,
|
||||||
|
<BenefitBaseComponent
|
||||||
|
dataSource={_.map(socialBase.items, o => ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
|
||||||
|
value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>,
|
||||||
|
<BenefitBaseComponent
|
||||||
|
dataSource={_.map(socialBase.comItems, o => ({
|
||||||
|
...o, title: `${o.title}(${getLabel(1851, "公司")})`,
|
||||||
|
items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
|
||||||
|
}))}
|
||||||
|
value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [...pre, cur,
|
||||||
|
<BenefitBaseComponent dataSource={socialBase.items} value={payload}
|
||||||
|
onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>];
|
||||||
|
}
|
||||||
|
} else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
|
||||||
|
if (!_.isNil(fundBase.comItems) && _.every(fundBase.comItems, o => o.items.length > 0)) {
|
||||||
|
return [
|
||||||
|
...pre, cur,
|
||||||
|
<BenefitBaseComponent
|
||||||
|
dataSource={_.map(fundBase.items, o => ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
|
||||||
|
value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>,
|
||||||
|
<BenefitBaseComponent
|
||||||
|
dataSource={_.map(fundBase.comItems, o => ({
|
||||||
|
...o, title: `${o.title}(${getLabel(1851, "公司")})`,
|
||||||
|
items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
|
||||||
|
}))}
|
||||||
|
value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [...pre, cur,
|
||||||
|
<BenefitBaseComponent dataSource={fundBase.items} value={payload} onChange={onExtraChange}
|
||||||
|
onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>];
|
||||||
|
}
|
||||||
|
} else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
|
||||||
|
if (!_.isNil(otherBase.comItems) && _.every(otherBase.comItems, o => o.items.length > 0)) {
|
||||||
|
return [
|
||||||
|
...pre, cur,
|
||||||
|
<BenefitBaseComponent
|
||||||
|
dataSource={_.map(otherBase.items, o => ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
|
||||||
|
value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>,
|
||||||
|
<BenefitBaseComponent
|
||||||
|
dataSource={_.map(otherBase.comItems, o => ({
|
||||||
|
...o, title: `${o.title}(${getLabel(1851, "公司")})`,
|
||||||
|
items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
|
||||||
|
}))}
|
||||||
|
value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [...pre, cur,
|
||||||
|
<BenefitBaseComponent dataSource={otherBase.items} value={payload} onChange={onExtraChange}
|
||||||
|
onSameChange={onSameChange} runStatuses={runStatuses}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
|
/>];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [...pre, cur];
|
||||||
|
}, []);
|
||||||
|
};
|
||||||
|
|
||||||
|
const BenefitBaseComponent = (props) => {
|
||||||
|
const { dataSource, value, onChange, onSameChange, runStatuses, showOperateBtn } = props;
|
||||||
|
return <React.Fragment>
|
||||||
|
{
|
||||||
|
_.map(dataSource, item => {
|
||||||
|
const { title, items } = item;
|
||||||
|
return <WeaSearchGroup
|
||||||
|
items={_.map(items, child => ({
|
||||||
|
com: <WeaFormItem label={child.label} labelCol={{ span: 10 }} wrapperCol={{ span: 14 }}>
|
||||||
|
<WeaInputNumber
|
||||||
|
value={value[getKey(child)] || (child.min !== "0.000" ? child.min : 0)} precision={2}
|
||||||
|
min={child.min !== "0.000" ? child.min : -999999999999999}
|
||||||
|
max={child.max !== "0.000" ? child.max : 999999999999999}
|
||||||
|
onChange={v => onChange(getKey(child), v)}
|
||||||
|
viewAttr={(runStatuses === "4,5" || !showOperateBtn) ? 1 : 2}
|
||||||
|
/>
|
||||||
|
</WeaFormItem>
|
||||||
|
}))}
|
||||||
|
customComponent={<div className="welfare-same-box">
|
||||||
|
<span>{getLabel(543195, "各项福利基数一致")}</span>
|
||||||
|
<WeaInputNumber style={{ width: 100 }} onBlur={v => onSameChange(items, v)}
|
||||||
|
disabled={runStatuses === "4,5" || !showOperateBtn}/>
|
||||||
|
</div>}
|
||||||
|
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
|
||||||
|
/>;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</React.Fragment>;
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,185 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 社保福利档案页面重构
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/10/31
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLoadingGlobal, WeaLocaleProvider, WeaReqTop, WeaTab } from "ecCom";
|
||||||
|
import { message } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import WelfareAdvanceSearchPannel from "./components/welfareAdvanceSearchPannel";
|
||||||
|
import WelfareTableList from "./components/welfareTableList";
|
||||||
|
import WelfareArchivesImportDialog from "./components/welfareArchivesImportDialog";
|
||||||
|
import WelfareTip from "./components/welfareTip";
|
||||||
|
import LogDialog from "./components/logDialog";
|
||||||
|
import * as API from "../../../apis/welfareArchive";
|
||||||
|
import { sysinfo } from "../../../apis/ruleconfig";
|
||||||
|
import { optTypeEnum, renderDropMenuDatas, renderReqBtns, tabList, welfareTipList } from "./config";
|
||||||
|
import { convertToUrlString } from "../../../util/url";
|
||||||
|
import cs from "classnames";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const APILIST = {
|
||||||
|
fullStaffIncrease: API.allStayAddToPay,
|
||||||
|
fullReduction: API.allStayDelToStop
|
||||||
|
};
|
||||||
|
|
||||||
|
@inject("taxAgentStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
selectedKey: "1", showSearchAd: false, isQuery: false, logDialogVisible: false,
|
||||||
|
topTabCount: { stayAdd: 0, paying: 0, stayDel: 0, stopPay: 0, ext: 0 },
|
||||||
|
welfareImpDialog: { visible: false, title: getLabel(24023, "数据导入"), runStatuses: "" },
|
||||||
|
showExtEmpsWitch: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async componentDidMount() {
|
||||||
|
// extEmpsWitch //非系统人员开关, 1: 开启, 0:关闭
|
||||||
|
const [{ data: { extEmpsWitch } }] = await Promise.all([sysinfo()]);
|
||||||
|
this.setState({ showExtEmpsWitch: extEmpsWitch === "1" });
|
||||||
|
}
|
||||||
|
|
||||||
|
queryInsuranceTabTotal = (active, total) => {
|
||||||
|
API.queryInsuranceTabTotal().then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||||
|
this.setState({
|
||||||
|
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||||
|
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||||
|
handleImport = () => {
|
||||||
|
this.setState({
|
||||||
|
welfareImpDialog: {
|
||||||
|
...this.state.welfareImpDialog, visible: true,
|
||||||
|
runStatuses: this.state.selectedKey
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onDropMenuClick = (key) => {
|
||||||
|
switch (key) {
|
||||||
|
case "fullStaffIncrease":
|
||||||
|
case "fullReduction":
|
||||||
|
this.handleFullOptions(key);
|
||||||
|
break;
|
||||||
|
case "batchStaffIncrease":
|
||||||
|
case "batchDeleteTodolist":
|
||||||
|
case "batchReduction":
|
||||||
|
case "batchCancellationOfSuspended":
|
||||||
|
case "batchDeleteTodolistStayDel":
|
||||||
|
const type = _.find(optTypeEnum, o => o.key === key).type;
|
||||||
|
const payload = _.find(optTypeEnum, o => o.key === key).payload;
|
||||||
|
this.welfareListRef.wrappedInstance.handleBatchOpt(type, payload);
|
||||||
|
break;
|
||||||
|
case "exportAll":
|
||||||
|
case "exportSelected":
|
||||||
|
this.handleExport(key);
|
||||||
|
break;
|
||||||
|
case "log":
|
||||||
|
this.setState({ logDialogVisible: true });
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
|
||||||
|
handleFullOptions = (key) => {
|
||||||
|
WeaLoadingGlobal.start();
|
||||||
|
APILIST[key]().then(({ status, data, errormsg }) => {
|
||||||
|
WeaLoadingGlobal.destroy();
|
||||||
|
if (status) {
|
||||||
|
const { type, msg } = data;
|
||||||
|
if (type === "fail") {
|
||||||
|
message.error(msg);
|
||||||
|
} else {
|
||||||
|
message.success(msg);
|
||||||
|
this.onAdSearch();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => WeaLoadingGlobal.destroy());
|
||||||
|
};
|
||||||
|
handleExport = (key) => {
|
||||||
|
const {
|
||||||
|
state: { selectedRowKeys },
|
||||||
|
props: { archivesStore: { welfareForm } }
|
||||||
|
} = this.welfareListRef.wrappedInstance,
|
||||||
|
{ selectedKey: runStatuses } = this.state;
|
||||||
|
let payload = { runStatuses };
|
||||||
|
if (key.indexOf("Selected") !== -1 && _.isEmpty(selectedRowKeys)) {
|
||||||
|
message.warning(getLabel(543303, "请选择表格数据"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
payload = { ...payload, ids: selectedRowKeys.join(",") };
|
||||||
|
key.indexOf("Selected") === -1 && (payload = { ...payload, ids: "", ...welfareForm.getFormParams() });
|
||||||
|
window.open(`/api/bs/hrmsalary/scheme/export?${convertToUrlString(payload)}`, "_blank");
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
selectedKey, topTabCount, showSearchAd, isQuery,
|
||||||
|
logDialogVisible, welfareImpDialog, showExtEmpsWitch
|
||||||
|
} = this.state;
|
||||||
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list;
|
||||||
|
return (
|
||||||
|
<div className="salary-welfare-archive">
|
||||||
|
<WeaReqTop
|
||||||
|
title={getLabel(538001, "社保福利档案")} buttonSpace={10} icon={<i className="icon-coms-fa"/>}
|
||||||
|
iconBgcolor="#F14A2D" showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||||
|
dropMenuDatas={renderDropMenuDatas(selectedKey, getLabel, showOperateBtn)}
|
||||||
|
buttons={renderReqBtns(selectedKey, getLabel, this.handleOpenAdvanceSearch, this.handleAdvanceSearch, this.handleImport, showOperateBtn)}
|
||||||
|
replaceTab={
|
||||||
|
<WeaTab
|
||||||
|
datas={!showExtEmpsWitch ? _.dropRight(tabList) : tabList} autoCalculateWidth
|
||||||
|
keyParam="viewcondition" selectedKey={selectedKey} counts={topTabCount} countParam="groupid"
|
||||||
|
onChange={key => this.setState({ selectedKey: key })}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div className="salary-welfare-archive-content">
|
||||||
|
<div
|
||||||
|
className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||||
|
<WelfareAdvanceSearchPannel
|
||||||
|
onCancel={() => this.setState({ showSearchAd: false })}
|
||||||
|
onAdSearch={this.onAdSearch}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/*列表*/}
|
||||||
|
<WelfareTableList isQuery={isQuery} ref={dom => this.welfareListRef = dom}
|
||||||
|
runStatuses={selectedKey} showOperateBtn={showOperateBtn}
|
||||||
|
onChangeTopTabCount={this.queryInsuranceTabTotal}
|
||||||
|
/>
|
||||||
|
{/*提示*/}
|
||||||
|
{!_.isEmpty(tipList) && <WelfareTip dataSource={tipList}/>}
|
||||||
|
{/*操作日志*/}
|
||||||
|
<LogDialog visible={logDialogVisible} onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||||
|
{/* 导入*/}
|
||||||
|
<WelfareArchivesImportDialog {...welfareImpDialog}
|
||||||
|
onCancel={(isFresh) => {
|
||||||
|
this.setState({
|
||||||
|
isQuery: isFresh ? !isQuery : isQuery,
|
||||||
|
welfareImpDialog: {
|
||||||
|
...this.state.welfareImpDialog, visible: false,
|
||||||
|
runStatuses: ""
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}}/>
|
||||||
|
</div>
|
||||||
|
</WeaReqTop>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,227 @@
|
||||||
|
.zIndex0-welfare-archive {
|
||||||
|
.wea-new-top-req {
|
||||||
|
z-index: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-welfare-archive {
|
||||||
|
min-width: 1000px;
|
||||||
|
overflow: auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.wea-new-top-req-title > div:first-child > div > div {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
|
||||||
|
.wea-tab {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-welfare-archive-content {
|
||||||
|
padding: 8px 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.table-layout {
|
||||||
|
.ant-spin-nested-loading, .ant-spin-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.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: 320px;
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip-info-area {
|
||||||
|
margin-top: 16px;
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip-detail {
|
||||||
|
padding: 16px;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
.tip-item {
|
||||||
|
line-height: 24px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-welfare-archive-edit-layout {
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-slide-modal-title {
|
||||||
|
border-bottom: 1px solid #e5e5e5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-slide-modal-content {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.salary-welfare-archive-edit-area {
|
||||||
|
background: #f6f6f6;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 16px;
|
||||||
|
|
||||||
|
.basic-welfare-info-wrapper {
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
.wea-field-readonly {
|
||||||
|
vertical-align: bottom;
|
||||||
|
|
||||||
|
span.child-item {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 125px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(1), & > div:nth-child(2) {
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(3) {
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(4), & > div:nth-child(5) {
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.twoColumns-welfare-info-wrapper {
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
& > div:nth-child(1), & > div:nth-child(3) {
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(2), & > div:nth-child(4) {
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div:nth-child(5) {
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-search-group, .wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 5px 16px;
|
||||||
|
|
||||||
|
.wea-form-item-label {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.welfare-same-box {
|
||||||
|
& > span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,10 +9,14 @@ const { TableStore } = WeaTableNew;
|
||||||
|
|
||||||
export class ArchivesStore {
|
export class ArchivesStore {
|
||||||
@observable logForm = new WeaForm(); // 社保福利档案重构-日志查询条件log
|
@observable logForm = new WeaForm(); // 社保福利档案重构-日志查询条件log
|
||||||
|
@observable welfareForm = new WeaForm(); // 社保福利档案重构-列表查询form
|
||||||
|
@observable welfareProfileForm = new WeaForm(); // 社保福利档案重构-员工薪资档案form
|
||||||
|
@action initWelfareProfileForm = () => {
|
||||||
|
this.hasBeenModify = false;
|
||||||
|
this.welfareProfileForm = new WeaForm();
|
||||||
|
};
|
||||||
|
@observable hasBeenModify = false; //社保福利档案-员工薪资档数据-是否修改过
|
||||||
|
@action setHasBeenModify = (v) => this.hasBeenModify = v;//设置社保福利档案-员工薪资档数据
|
||||||
|
|
||||||
|
|
||||||
@observable tableStore = new TableStore(
|
@observable tableStore = new TableStore(
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ export class calculateStore {
|
||||||
@observable ECSearchForm = new WeaForm(); //薪资核算-form
|
@observable ECSearchForm = new WeaForm(); //薪资核算-form
|
||||||
@observable otherConditions = []; //薪资核算-其他查询条件
|
@observable otherConditions = []; //薪资核算-其他查询条件
|
||||||
@observable calculateForm = new WeaForm(); //薪资核算重构-核算form
|
@observable calculateForm = new WeaForm(); //薪资核算重构-核算form
|
||||||
|
@observable batchUpdateForm = new WeaForm(); //批量更新薪资项目-批量更新form
|
||||||
|
@action initBatchUpdateForm = () => this.batchUpdateForm = new WeaForm();
|
||||||
|
|
||||||
@observable tableStore = new TableStore(); // new table
|
@observable tableStore = new TableStore(); // new table
|
||||||
@observable form = new WeaForm(); // nrew 一个form
|
@observable form = new WeaForm(); // nrew 一个form
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,14 @@ export class PayrollFilesStore {
|
||||||
@observable pivotTableStore = new TableStore();
|
@observable pivotTableStore = new TableStore();
|
||||||
@observable adjustForm = new WeaForm(); //调薪记录-核算form
|
@observable adjustForm = new WeaForm(); //调薪记录-核算form
|
||||||
@action initAdjustForm = () => this.adjustForm = new WeaForm();//调薪记录-初始化核算form
|
@action initAdjustForm = () => this.adjustForm = new WeaForm();//调薪记录-初始化核算form
|
||||||
|
/*薪资档案页面重构*/
|
||||||
|
@observable salaryFileQueryForm = new WeaForm(); // 薪资档案查询form
|
||||||
|
@observable salaryFileForm = new WeaForm(); // 薪资档案form
|
||||||
|
@action initSalaryFileForm = () => this.salaryFileForm = new WeaForm(); // 薪资档案form初始化
|
||||||
|
|
||||||
|
@observable hasBeenModify = false; //薪资档案-员工薪资档案-是否修改过
|
||||||
|
@action setHasBeenModify = (v) => this.hasBeenModify = v;//薪资档案-员工薪资档案数据
|
||||||
|
/*薪资档案页面重构*/
|
||||||
|
|
||||||
@action("薪资档案-列表查询")
|
@action("薪资档案-列表查询")
|
||||||
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,15 @@ export const getConditionDomkeys = (condition) => {
|
||||||
});
|
});
|
||||||
return domkeyList;
|
return domkeyList;
|
||||||
};
|
};
|
||||||
|
// 获取condition的field集合
|
||||||
|
export const getConditionFields = (condition) => {
|
||||||
|
return _.reduce(condition, (pre, cur) => {
|
||||||
|
return {
|
||||||
|
...pre,
|
||||||
|
..._.reduce(cur.items, (pre1, cur1) => ({ ...pre1, [cur1["domkey"][0]]: cur1 }), {})
|
||||||
|
};
|
||||||
|
}, {});
|
||||||
|
};
|
||||||
|
|
||||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||||
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
|
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue