Merge branch 'master' into feature/2.9.9.2312.01-薪资核算查看权限
# Conflicts: # pc4mobx/hrmSalary/index.js # pc4mobx/hrmSalary/pages/calculate/calculate.js
This commit is contained in:
commit
197849ecaa
|
|
@ -191,3 +191,9 @@ export const exportSiaccountWelfaresupplyimporttemplatetemplate = params => {
|
||||||
export const exportSiaccountWelfarebalanceimporttemplatetetemplate = params => {
|
export const exportSiaccountWelfarebalanceimporttemplatetetemplate = params => {
|
||||||
return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export", params);
|
return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export", params);
|
||||||
};
|
};
|
||||||
|
export const getBalancePaymentGroup = params => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/siaccount/detail/getBalancePaymentGroup", params);
|
||||||
|
};
|
||||||
|
export const addNewBalance = params => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/siaccount/detail/addNewBalance", params);
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,10 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
items.map((templatItem, index) => {
|
items.map((templatItem, index) => {
|
||||||
const { salaryItemValue, name } = templatItem || {};
|
const { salaryItemValue, name, salaryItemShowName } = templatItem || {};
|
||||||
return <div className="list-item" key={index}>
|
return <div className="list-item" key={index}>
|
||||||
<div className="item-name" title={name}><span className="text">{name || ""}</span></div>
|
<div className="item-name" title={salaryItemShowName || name}><span
|
||||||
|
className="text">{salaryItemShowName || name || ""}</span></div>
|
||||||
<div className="item-count">{salaryItemValue || "100"}</div>
|
<div className="item-count">{salaryItemValue || "100"}</div>
|
||||||
</div>;
|
</div>;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,11 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
items.map((templatItem, index) => {
|
items.map((templatItem, index) => {
|
||||||
const { salaryItemValue, name } = templatItem || {};
|
const { salaryItemValue, name, salaryItemShowName } = templatItem || {};
|
||||||
return <div key={index}
|
return <div key={index}
|
||||||
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
|
className={`list-item ${index % 2 === 0 ? "even" : "odd"} ${index === 0 ? "zero" : ""} ${index === 1 ? "first" : ""}`}>
|
||||||
<div className="item-name" title={name}>
|
<div className="item-name" title={salaryItemShowName || name}>
|
||||||
<span className="text">{name || ""}</span>
|
<span className="text">{salaryItemShowName || name || ""}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="item-count">{salaryItemValue || ""}</div>
|
<div className="item-count">{salaryItemValue || ""}</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Route from "react-router/lib/Route";
|
import Route from "react-router/lib/Route";
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
// import MySalary from "./pages/mySalary";
|
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 Archives from "./pages/socialSecurityBenefits/archives";
|
||||||
|
|
@ -63,6 +63,7 @@ const Home = (props) => props.children;
|
||||||
const SocialSecurityBenefits = (props) => props.children;
|
const SocialSecurityBenefits = (props) => props.children;
|
||||||
const DataAcquisition = (props) => props.children;
|
const DataAcquisition = (props) => props.children;
|
||||||
|
|
||||||
|
// mySalaryMobile 我的薪资福利-移动端
|
||||||
// mySalary 我的薪资福利
|
// mySalary 我的薪资福利
|
||||||
// mySalaryView 我的薪资福利-查看工资单
|
// mySalaryView 我的薪资福利-查看工资单
|
||||||
// socialSecurityBenefits 社保福利
|
// socialSecurityBenefits 社保福利
|
||||||
|
|
@ -107,6 +108,7 @@ const Routes = (
|
||||||
path="hrmSalary"
|
path="hrmSalary"
|
||||||
onEnter={getLocaleLabel}
|
onEnter={getLocaleLabel}
|
||||||
component={Home}>
|
component={Home}>
|
||||||
|
<Route key="mySalaryMobile" path="mySalaryMobile" component={MySalaryMobile}/>
|
||||||
<Route key="mySalary" path="mySalary" component={MySalary}/>
|
<Route key="mySalary" path="mySalary" component={MySalary}/>
|
||||||
<Route key="mySalaryView" path="mySalary/:salaryInfoId" component={MySalaryView}/>
|
<Route key="mySalaryView" path="mySalary/:salaryInfoId" component={MySalaryView}/>
|
||||||
<Route
|
<Route
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
* Date: 2023/9/26
|
* Date: 2023/9/26
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
import { Alert } from "antd";
|
import { Alert, Spin } from "antd";
|
||||||
import { comparisonResultList } from "../../../../apis/calculate";
|
import { comparisonResultList } from "../../../../apis/calculate";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
@ -21,9 +21,35 @@ class SalaryCalcOcList extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.comparisonResultList(this.props);
|
window.addEventListener("message", this.handleReceive, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener("message", this.handleReceive, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReceive = async ({ data }) => {
|
||||||
|
const { type, payload: { id, params } = {} } = data;
|
||||||
|
if (type === "init") {
|
||||||
|
this.comparisonResultList(this.props);
|
||||||
|
} else if (type === "turn") {
|
||||||
|
switch (id) {
|
||||||
|
case "PAGEINFO":
|
||||||
|
const { size: pageSize, pageNum: current } = params;
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...this.state.pageInfo, current, pageSize }
|
||||||
|
}, () => this.comparisonResultList(this.props));
|
||||||
|
break;
|
||||||
|
case "FORMULA":
|
||||||
|
const { formulaDesc } = params;
|
||||||
|
this.setState({ formulaDesc });
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (
|
if (
|
||||||
(nextProps.form.onlyDiffEmployee !== this.props.form.onlyDiffEmployee) ||
|
(nextProps.form.onlyDiffEmployee !== this.props.form.onlyDiffEmployee) ||
|
||||||
|
|
@ -34,6 +60,15 @@ class SalaryCalcOcList extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
postMessageToChild = (payload = {}) => {
|
||||||
|
const i18n = {
|
||||||
|
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||||
|
"总计": getLabel(523, "总计"), "系统值": getLabel(543280, "系统值"),
|
||||||
|
"线下值": getLabel(543281, "线下值"), "差值": getLabel(543282, "差值")
|
||||||
|
};
|
||||||
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
|
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
|
};
|
||||||
comparisonResultList = (props) => {
|
comparisonResultList = (props) => {
|
||||||
const { form, routeParams: { salaryAcctRecordId } } = props;
|
const { form, routeParams: { salaryAcctRecordId } } = props;
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state;
|
||||||
|
|
@ -42,85 +77,54 @@ class SalaryCalcOcList extends Component {
|
||||||
comparisonResultList(payload).then(({ status, data }) => {
|
comparisonResultList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
|
const { columns, pageInfo: { pageNum: current, pageSize, total, list: dataSource } } = data;
|
||||||
this.setState({
|
this.setState({
|
||||||
dataSource, columns,
|
dataSource, columns: this.convertColumns(this.removeItem(columns)),
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||||
|
}, () => {
|
||||||
|
const { pageInfo, dataSource, columns } = this.state;
|
||||||
|
this.postMessageToChild({ dataSource, pageInfo, columns });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
|
removeItem = (cols) => {
|
||||||
|
return _.filter(cols, o => {
|
||||||
|
if (JSON.stringify(o.children) === "[]") {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
this.removeItem(o.children);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
convertColumns = (cols) => {
|
||||||
|
return _.map(cols, (item, index) => {
|
||||||
|
const col = { title: item.text, dataIndex: item.column };
|
||||||
|
if (_.isNaN(parseInt(item.column))) {
|
||||||
|
return { ...col, width: 150, fixed: item.fixed || false };
|
||||||
|
} else {
|
||||||
|
return { ...col, width: 180, children: this.convertColumns(item.children) };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { dataSource, loading, columns, pageInfo, formulaDesc } = this.state;
|
const { loading, formulaDesc } = this.state;
|
||||||
const pagination = {
|
|
||||||
...pageInfo,
|
|
||||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
|
||||||
showQuickJumper: true,
|
|
||||||
showSizeChanger: true,
|
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
|
||||||
onShowSizeChange: (current, pageSize) => {
|
|
||||||
this.setState({
|
|
||||||
pageInfo: { ...pageInfo, current, pageSize }
|
|
||||||
}, () => this.comparisonResultList(this.props));
|
|
||||||
},
|
|
||||||
onChange: current => {
|
|
||||||
this.setState({
|
|
||||||
pageInfo: { ...pageInfo, current }
|
|
||||||
}, () => this.comparisonResultList(this.props));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<div className="wea-new-table ">
|
||||||
<Alert message={`${getLabel(18125, "公式")}:${formulaDesc}`} type="info"/>
|
<Alert message={`${getLabel(18125, "公式")}:${formulaDesc}`} type="info"/>
|
||||||
<WeaTable
|
<Spin spinning={loading}>
|
||||||
rowKey="id" pagination={pagination} loading={loading} dataSource={dataSource}
|
<iframe
|
||||||
scroll={{ x: 840, y: "calc(100vh - 246px)" }}
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
columns={_.map(columns, (o, i) => {
|
// src="http://localhost:7607/#/OCTable"
|
||||||
if (i > 1) {
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/OCTable"
|
||||||
if (i > 2) {
|
id="atdTable"
|
||||||
return {
|
/>
|
||||||
...o, width: 180,
|
</Spin>
|
||||||
render: (__, record) => {
|
</div>
|
||||||
const formulaDesc = record["customParameters"][`${o["dataIndex"]}`];
|
|
||||||
const showDifference = record[`${o["dataIndex"]}_type`] === "number";
|
|
||||||
const { acctResultValue, excelResultValue } = record[o["dataIndex"]] || {};
|
|
||||||
return <div className="comparison-column-item-container"
|
|
||||||
onClick={() => this.setState({ formulaDesc })}>
|
|
||||||
<div className="comparison-single-row">
|
|
||||||
<span>{getLabel(543280, "系统值")}:</span>
|
|
||||||
<span>{acctResultValue}</span>
|
|
||||||
</div>
|
|
||||||
<div className="comparison-single-row">
|
|
||||||
<span>{getLabel(543281, "线下值")}:</span>
|
|
||||||
<span>{excelResultValue}</span>
|
|
||||||
</div>
|
|
||||||
{
|
|
||||||
showDifference &&
|
|
||||||
<div className="comparison-single-row danger">
|
|
||||||
<span>{getLabel(543282, "差值")}:</span>
|
|
||||||
<span>{calculateDifference(acctResultValue, excelResultValue)}</span>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { ...o, width: 180 };
|
|
||||||
}
|
|
||||||
return { ...o, width: 150, fixed: "left" };
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SalaryCalcOcList;
|
export default SalaryCalcOcList;
|
||||||
// 计算差值
|
|
||||||
const calculateDifference = (systemValue, excelValue) => {
|
|
||||||
if (_.isNil(systemValue) || _.isNil(excelValue)) return "";
|
|
||||||
const systemNum = Number(systemValue);
|
|
||||||
const excelNum = Number(excelValue);
|
|
||||||
return (systemNum - excelNum).toFixed(2);
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -55,29 +55,12 @@
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
|
||||||
.wea-new-table {
|
.wea-new-table {
|
||||||
background: #FFF;
|
|
||||||
height: calc(100% - 44px);
|
height: calc(100% - 44px);
|
||||||
|
|
||||||
.ant-table-tbody {
|
.ant-spin-nested-loading, .ant-spin-container {
|
||||||
td {
|
height: 100% !important;
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.comparison-column-item-container {
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
.comparison-single-row {
|
|
||||||
margin: 4px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.danger {
|
|
||||||
color: #ff4d4f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,12 +82,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-table-tbody {
|
.ant-table-tbody {
|
||||||
|
.ant-table-row-indent {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
span {
|
span {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,9 @@ import FileMergeDetail from "./fileMergeDetail";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { getExportField } from "../../apis/calculate";
|
import { getExportField } from "../../apis/calculate";
|
||||||
import "./index.less";
|
|
||||||
import CustomExportDialog from "./customExportDialog";
|
import CustomExportDialog from "./customExportDialog";
|
||||||
|
import Layout from "../calculate/doCalc/layout";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
@inject("calculateStore")
|
@inject("calculateStore")
|
||||||
|
|
@ -162,17 +163,18 @@ export default class PlaceOnFileDetail extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="placeOnFileDetail">
|
<Layout {...this.props}>
|
||||||
<CustomTab
|
<div className="placeOnFileDetail">
|
||||||
searchOperationItem={
|
<CustomTab
|
||||||
renderRightOperation()
|
searchOperationItem={
|
||||||
}
|
renderRightOperation()
|
||||||
/>
|
}
|
||||||
<div className="tabWrapper" style={{ borderBottom: "none" }}>
|
/>
|
||||||
<span style={{ marginRight: 10 }}>薪资所属月:{baseSalarySobCycle.salaryMonth}</span>
|
<div className="tabWrapper" style={{ borderBottom: "none" }}>
|
||||||
<WeaHelpfulTip
|
<span style={{ marginRight: 10 }}>薪资所属月:{baseSalarySobCycle.salaryMonth}</span>
|
||||||
width={100}
|
<WeaHelpfulTip
|
||||||
title={`薪资周期\n
|
width={100}
|
||||||
|
title={`薪资周期\n
|
||||||
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
|
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
|
||||||
税款所属期\n
|
税款所属期\n
|
||||||
${baseSalarySobCycle.taxCycle}\n
|
${baseSalarySobCycle.taxCycle}\n
|
||||||
|
|
@ -180,53 +182,54 @@ export default class PlaceOnFileDetail extends React.Component {
|
||||||
${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.endDate}\n
|
${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.endDate}\n
|
||||||
福利台账月份\n
|
福利台账月份\n
|
||||||
引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
|
引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
|
||||||
placement="topLeft"
|
placement="topLeft"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="tabWrapper">
|
||||||
|
<span>公式=</span>
|
||||||
|
<span>{toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}</span>
|
||||||
|
</div>
|
||||||
|
<div className="tableWrapper">
|
||||||
|
<iframe
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/atdTable"
|
||||||
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
||||||
|
id="atdTable"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<CustomExportDialog
|
||||||
|
{...customExportParams}
|
||||||
|
searchItemsValue={{ employeeName: this.state.searchValue }}
|
||||||
|
onCancel={() => {
|
||||||
|
this.setState({
|
||||||
|
customExportParams: {
|
||||||
|
visible: false, checkItems: [], itemsByGroup: []
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
{
|
||||||
<div className="tabWrapper">
|
slideVisiable &&
|
||||||
<span>公式=</span>
|
<WeaSlideModal
|
||||||
<span>{toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}</span>
|
visible={slideVisiable}
|
||||||
</div>
|
top={0}
|
||||||
<div className="tableWrapper">
|
width={40}
|
||||||
<iframe
|
height={100}
|
||||||
style={{ border: 0, width: "100%", height: "100%" }}
|
direction={"right"}
|
||||||
// src="http://localhost:7607/#/atdTable"
|
measure={"%"}
|
||||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
title={
|
||||||
id="atdTable"
|
<SlideModalTitle
|
||||||
/>
|
subtitle={"合并计税详情"}
|
||||||
</div>
|
editable={true}
|
||||||
<CustomExportDialog
|
/>
|
||||||
{...customExportParams}
|
|
||||||
searchItemsValue={{ employeeName: this.state.searchValue }}
|
|
||||||
onCancel={() => {
|
|
||||||
this.setState({
|
|
||||||
customExportParams: {
|
|
||||||
visible: false, checkItems: [], itemsByGroup: []
|
|
||||||
}
|
}
|
||||||
});
|
content={(<FileMergeDetail/>)}
|
||||||
}}
|
onClose={() => this.setState({ slideVisiable: false })}
|
||||||
/>
|
showMask={true}
|
||||||
{
|
closeMaskOnClick={() => this.setState({ slideVisiable: false })}/>
|
||||||
slideVisiable &&
|
}
|
||||||
<WeaSlideModal
|
</div>
|
||||||
visible={slideVisiable}
|
</Layout>
|
||||||
top={0}
|
|
||||||
width={40}
|
|
||||||
height={100}
|
|
||||||
direction={"right"}
|
|
||||||
measure={"%"}
|
|
||||||
title={
|
|
||||||
<SlideModalTitle
|
|
||||||
subtitle={"合并计税详情"}
|
|
||||||
editable={true}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
content={(<FileMergeDetail/>)}
|
|
||||||
onClose={() => this.setState({ slideVisiable: false })}
|
|
||||||
showMask={true}
|
|
||||||
closeMaskOnClick={() => this.setState({ slideVisiable: false })}/>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,17 @@
|
||||||
// text-decoration: none;
|
// text-decoration: none;
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wea-new-table {
|
||||||
|
.ant-table-tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
height: 41px !important;
|
||||||
|
border-bottom: 1px solid #e2e2e2 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.moreIconWrapper {
|
.moreIconWrapper {
|
||||||
|
|
@ -80,17 +91,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wea-new-table {
|
|
||||||
.ant-table-tbody {
|
|
||||||
tr {
|
|
||||||
td {
|
|
||||||
height: 41px !important;
|
|
||||||
border-bottom: 1px solid #e2e2e2 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.slideOuterWrapper {
|
.slideOuterWrapper {
|
||||||
.wea-slide-modal-title {
|
.wea-slide-modal-title {
|
||||||
height: initial;
|
height: initial;
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
||||||
canDelete: true,
|
canDelete: true,
|
||||||
fieldId: key,
|
fieldId: key,
|
||||||
fieldName: showname,
|
fieldName: showname,
|
||||||
id: dataSource.length,
|
id: key,
|
||||||
salarySobId: "",
|
salarySobId: "",
|
||||||
sortedIndex: dataSource.length
|
sortedIndex: dataSource.length
|
||||||
};
|
};
|
||||||
|
|
@ -52,6 +52,9 @@ class LedgerSalaryItemBaseInfo extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { dataSource, onChangeSortableList, onPreview } = this.props;
|
const { dataSource, onChangeSortableList, onPreview } = this.props;
|
||||||
const { empFieldListOptions } = this.state;
|
const { empFieldListOptions } = this.state;
|
||||||
|
const options = _.map(empFieldListOptions, o => ({
|
||||||
|
...o, disabled: _.map(dataSource, g => g.fieldId).includes(o.key)
|
||||||
|
}));
|
||||||
return (
|
return (
|
||||||
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
|
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
|
||||||
<div className="userInfoWrapper">
|
<div className="userInfoWrapper">
|
||||||
|
|
@ -77,7 +80,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
||||||
/>
|
/>
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
showSearch
|
showSearch
|
||||||
options={empFieldListOptions}
|
options={options}
|
||||||
style={{ width: 150 }}
|
style={{ width: 150 }}
|
||||||
onChange={this.handleAddEmpList}
|
onChange={this.handleAddEmpList}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资账套查询
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/27
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||||
|
import { searchConditions } from "../config";
|
||||||
|
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("ledgerStore")
|
||||||
|
@observer
|
||||||
|
class LedgerSearchComp extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
conditions: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.getTaxAgentSelectList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getTaxAgentSelectList = () => {
|
||||||
|
const { ledgerStore: { searchForm } } = this.props;
|
||||||
|
getTaxAgentSelectList().then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(searchConditions, o => {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
items: _.map(o.items, j => {
|
||||||
|
if (getKey(j) === "taxAgentId") {
|
||||||
|
return {
|
||||||
|
...j,
|
||||||
|
options: [{ key: "", showname: getLabel(332, "全部") }, ..._.map(data, g => ({
|
||||||
|
key: g.id,
|
||||||
|
showname: g.content
|
||||||
|
}))]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...j };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => searchForm.initFormFields(this.state.conditions));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
formRender = (form, condition) => {
|
||||||
|
const { isFormInit } = form, 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}/>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 2
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(
|
||||||
|
<WeaSearchGroup col={2} needTigger={true} title={c.title} showGroup={c.defaultshow} center={false}
|
||||||
|
items={items}/>);
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { conditions } = this.state;
|
||||||
|
const { ledgerStore: { searchForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="ledgerSearch-Wrapper">
|
||||||
|
{this.formRender(searchForm, conditions)}
|
||||||
|
<Button type="primary" onClick={this.props.onSearch}>{getLabel(388113, "搜索")}</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LedgerSearchComp;
|
||||||
|
|
@ -112,7 +112,7 @@ class LedgerSlide extends Component {
|
||||||
const { editId: salarySobId } = this.props;
|
const { editId: salarySobId } = this.props;
|
||||||
const payload = {
|
const payload = {
|
||||||
empFields: _.map(empFields, it => {
|
empFields: _.map(empFields, it => {
|
||||||
if (Object.prototype.toString.call(it.id) === "[object Number]") delete it.id;
|
if (!it.salarySobId) delete it.id;
|
||||||
return { ...it };
|
return { ...it };
|
||||||
}),
|
}),
|
||||||
itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => {
|
itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { changeLedgerStatus, deleteLedger, getLedgerList } from "../../../apis/l
|
||||||
import CopyLedgerModal from "./copyLedgerModal";
|
import CopyLedgerModal from "./copyLedgerModal";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
@inject("taxAgentStore", "ledgerStore")
|
||||||
@observer
|
@observer
|
||||||
class LedgerTable extends Component {
|
class LedgerTable extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -42,9 +42,9 @@ class LedgerTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getLedgerList = (extra = {}) => {
|
getLedgerList = (extra = {}) => {
|
||||||
const { name } = this.props;
|
const { ledgerStore: { searchForm } } = this.props;
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state;
|
||||||
const payload = { name, ...pageInfo, ...extra };
|
const payload = { ...searchForm.getFormParams(), ...pageInfo, ...extra };
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
getLedgerList(payload).then(({ status, data }) => {
|
getLedgerList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,37 @@ export const copyConditions = [
|
||||||
defaultshow: true
|
defaultshow: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
export const searchConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["name"],
|
||||||
|
fieldcol: 24,
|
||||||
|
otherParams: {
|
||||||
|
placeholder: "请输入薪资账套名称"
|
||||||
|
},
|
||||||
|
lanId: 543431,
|
||||||
|
labelcol: 0,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["taxAgentId"],
|
||||||
|
fieldcol: 24,
|
||||||
|
lanId: 543234,
|
||||||
|
label: "",
|
||||||
|
labelcol: 0,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
export const categoryConditions = [
|
export const categoryConditions = [
|
||||||
{
|
{
|
||||||
items: [
|
items: [
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,11 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaInputSearch, WeaTop } from "ecCom";
|
import { WeaTop } from "ecCom";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import LedgerTable from "./components/ledgerTable";
|
import LedgerTable from "./components/ledgerTable";
|
||||||
import LedgerSlide from "./components/ledgerSlide";
|
import LedgerSlide from "./components/ledgerSlide";
|
||||||
|
import LedgerSearchComp from "./components/ledgerSearchComp";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
@inject("taxAgentStore")
|
||||||
|
|
@ -60,11 +61,7 @@ class Index extends Component {
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}
|
onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}
|
||||||
>新建</Button>,
|
>新建</Button>,
|
||||||
<WeaInputSearch
|
<LedgerSearchComp onSearch={() => this.setState({ doSearch: !doSearch })}/>
|
||||||
value={searchVal} placeholder="请输入薪资账套名称"
|
|
||||||
onChange={searchVal => this.setState({ searchVal })}
|
|
||||||
onSearch={() => this.setState({ doSearch: !doSearch })}
|
|
||||||
/>
|
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<WeaTop
|
<WeaTop
|
||||||
|
|
@ -75,7 +72,7 @@ class Index extends Component {
|
||||||
buttons={showOperateBtn ? btns : btns.slice(-1)}
|
buttons={showOperateBtn ? btns : btns.slice(-1)}
|
||||||
>
|
>
|
||||||
<div className="ledgerWrapper">
|
<div className="ledgerWrapper">
|
||||||
<LedgerTable name={searchVal} doSearch={doSearch} onEditLedger={this.handleEditLedger}/>
|
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}/>
|
||||||
<LedgerSlide
|
<LedgerSlide
|
||||||
{...slideparams}
|
{...slideparams}
|
||||||
onCancel={this.handleResetLedger}
|
onCancel={this.handleResetLedger}
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,38 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ledgerSearch-Wrapper {
|
||||||
|
min-width: 350px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: 70px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
& > button {
|
||||||
|
position: absolute;
|
||||||
|
right: -70px;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-search-group, .wea-content {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-cell-wrapper {
|
||||||
|
& > div.wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.ant-select-selection-selected-value {
|
||||||
|
width: 150px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div.wea-form-cell:first-child {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,6 @@ export default class MobilePayroll extends React.Component {
|
||||||
<div className="templatePreview">
|
<div className="templatePreview">
|
||||||
<div className="contentWrapper">
|
<div className="contentWrapper">
|
||||||
<ComputerTemplate
|
<ComputerTemplate
|
||||||
isPreview
|
|
||||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
||||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
|
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ class MySalaryView extends Component {
|
||||||
<div style={{ height: "100%", overflow: "auto" }}>
|
<div style={{ height: "100%", overflow: "auto" }}>
|
||||||
<div className="templatePreview">
|
<div className="templatePreview">
|
||||||
<ComputerTemplate
|
<ComputerTemplate
|
||||||
isPreview isMsgPreview
|
isMsgPreview
|
||||||
salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []}
|
salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []}
|
||||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 移动端页面-日期选择组件
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/10
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import moment from "moment";
|
||||||
|
import { Picker, Popup } from "spring-picker";
|
||||||
|
import "spring-picker/lib/style.css";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visible: false,
|
||||||
|
salaryYearMonth: { year: "", month: "" }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { value } = nextProps;
|
||||||
|
const [year, month] = value.split("-");
|
||||||
|
this.setState({
|
||||||
|
salaryYearMonth: { year, month }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChangeYear = (year) => {
|
||||||
|
this.setState({ salaryYearMonth: { ...this.state.salaryYearMonth, year } });
|
||||||
|
};
|
||||||
|
handleChangeMonth = (month) => {
|
||||||
|
|
||||||
|
this.setState({ salaryYearMonth: { ...this.state.salaryYearMonth, month: parseInt(month).toString() } });
|
||||||
|
};
|
||||||
|
handleCancel = () => {
|
||||||
|
this.setState({ visible: false });
|
||||||
|
};
|
||||||
|
handleConfirm = () => {
|
||||||
|
const { year, month } = this.state.salaryYearMonth;
|
||||||
|
this.setState({ visible: false }, () => {
|
||||||
|
this.props.onChange(moment(new Date(`${year}- ${month}`)).format("YYYY-MM"));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { value } = this.props;
|
||||||
|
const { visible } = this.state;
|
||||||
|
const [year, month] = value.split("-");
|
||||||
|
return (
|
||||||
|
<div className="ui-picker-address">
|
||||||
|
<span className="date" onClick={() => this.setState({ visible: true })}>{value}</span>
|
||||||
|
<Popup visible={visible} onCancel={this.handleCancel} onConfirm={this.handleConfirm}>
|
||||||
|
<Picker
|
||||||
|
onChange={this.handleChangeYear}
|
||||||
|
data={{
|
||||||
|
list: YearFn(Number(moment().subtract(100, "year").format("YYYY")), Number(moment().add(100, "year").format("YYYY"))),
|
||||||
|
defaultValue: year,
|
||||||
|
displayValue(name) {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Picker
|
||||||
|
onChange={this.handleChangeMonth}
|
||||||
|
data={{
|
||||||
|
list: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
||||||
|
defaultValue: `${parseInt(month)}月`,
|
||||||
|
displayValue(name) {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Popup>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
const YearFn = (lowEnd, highEnd) => {
|
||||||
|
let list = [];
|
||||||
|
for (let i = lowEnd; i <= highEnd; i++) {
|
||||||
|
list.push(i.toString());
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 我的薪资福利-移动端列表数据
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/13
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import moment from "moment";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { dataSource, isMore, loading } = this.props;
|
||||||
|
return (
|
||||||
|
<ul className="payrollList-wrapper">
|
||||||
|
{
|
||||||
|
_.map(dataSource, it => {
|
||||||
|
return <li className="item">
|
||||||
|
<div className="salaryMonth">
|
||||||
|
<span>{moment(it.salaryYearMonth).format("YYYY-MM")}</span>
|
||||||
|
<span>{`${getLabel(15323, "第")}${it.acctTimes}${getLabel(18929, "次")}`}</span>
|
||||||
|
</div>
|
||||||
|
<div className="sendTime">
|
||||||
|
<span>{getLabel(111, "发放时间")}</span>
|
||||||
|
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
|
||||||
|
</div>
|
||||||
|
<a href="javascript:void(0);">{`${getLabel(33564, "查看")}>`}</a>
|
||||||
|
</li>;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
{
|
||||||
|
loading && <li className="more">{getLabel(31230, "加载中")}</li>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
!isMore && <li className="empty">{getLabel(83553, "暂无数据")}</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 我的薪资福利-移动端列表
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/10
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider, WeaTab } from "ecCom";
|
||||||
|
import moment from "moment";
|
||||||
|
import MobileDatePicker from "./components/mobileDatePicker";
|
||||||
|
import PayrollList from "./components/payrollList";
|
||||||
|
import { mySalaryBillList } from "../../apis/mySalaryBenefits";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
salaryYearMonth: [moment().startOf("year").format("YYYY-MM"), moment().startOf("month").format("YYYY-MM")],
|
||||||
|
isMore: true //是否还有更多数据
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.getMySalaryBillList();
|
||||||
|
const mySalaryMobile = document.getElementById("mySalaryMobile");
|
||||||
|
mySalaryMobile.addEventListener("scroll", this.handleScroll, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleScroll = () => {
|
||||||
|
this.isTouchBottom(this.handleLoadMore);
|
||||||
|
};
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
const mySalaryMobile = document.getElementById("mySalaryMobile");
|
||||||
|
mySalaryMobile.removeEventListener("scroll", this.handleScroll, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
getMySalaryBillList = () => {
|
||||||
|
const { salaryYearMonth, pageInfo } = this.state;
|
||||||
|
this.setState({ loading: true });
|
||||||
|
mySalaryBillList({ salaryYearMonth, ...pageInfo }).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { datas: dataSource, pageInfo: pageResult } = data;
|
||||||
|
const { pageNum: current, pageSize, total } = pageResult;
|
||||||
|
this.setState({
|
||||||
|
dataSource: [...this.state.dataSource, ...dataSource],
|
||||||
|
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||||
|
}, () => this.setState({ isMore: this.state.dataSource.length < total }));
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
handleLoadMore = () => {
|
||||||
|
// 为测试效果临时使用 message
|
||||||
|
const { pageInfo, isMore } = this.state;
|
||||||
|
if (!isMore) return;
|
||||||
|
const { current } = pageInfo;
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current: current + 1 }
|
||||||
|
}, () => this.getMySalaryBillList());
|
||||||
|
};
|
||||||
|
isTouchBottom = (handler) => {
|
||||||
|
const div = document.getElementById("mySalaryMobile");
|
||||||
|
if ((div.scrollHeight - div.scrollTop) === div.clientHeight) handler();
|
||||||
|
};
|
||||||
|
handleChange = (type, val) => {
|
||||||
|
const { salaryYearMonth } = this.state;
|
||||||
|
const [salaryStartYearMonth, salaryEndYearMonth] = salaryYearMonth;
|
||||||
|
this.setState({
|
||||||
|
salaryYearMonth: type === "salaryStartYearMonth" ? [val, salaryEndYearMonth] : [salaryStartYearMonth, val]
|
||||||
|
}, () => this.getMySalaryBillList());
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { salaryYearMonth, dataSource, isMore, loading } = this.state;
|
||||||
|
const [salaryStartYearMonth, salaryEndYearMonth] = salaryYearMonth;
|
||||||
|
return (
|
||||||
|
<div id="mySalaryMobile" className="salary-mobile-list-wrapper">
|
||||||
|
<div className="salary-mobile-list-tab">
|
||||||
|
<WeaTab
|
||||||
|
datas={[{ title: getLabel(111, "工资单"), viewcondition: "Payroll" }]}
|
||||||
|
keyParam="viewcondition" selectedKey="Payroll"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="searchWrapper">
|
||||||
|
<MobileDatePicker value={salaryStartYearMonth}
|
||||||
|
onChange={(v) => this.handleChange("salaryStartYearMonth", v)}/>
|
||||||
|
<span className="to">{getLabel(15322, "至")}</span>
|
||||||
|
<MobileDatePicker value={salaryEndYearMonth} onChange={(v) => this.handleChange("salaryEndYearMonth", v)}/>
|
||||||
|
</div>
|
||||||
|
<PayrollList dataSource={dataSource} isMore={isMore} loading={loading}/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
.salary-mobile-list-wrapper {
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
background: #f6f6f6;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.salary-mobile-list-tab {
|
||||||
|
background: #fff;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-tab {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchWrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 0;
|
||||||
|
background: #fff;
|
||||||
|
height: 40px;
|
||||||
|
position: fixed;
|
||||||
|
top: 47px;
|
||||||
|
|
||||||
|
.to {
|
||||||
|
margin: 0 10px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-picker-address {
|
||||||
|
.date {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-popup-title {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-popup-content {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.ui-picker-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.ui-picker-item {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.payrollList-wrapper {
|
||||||
|
padding: 8px 0;
|
||||||
|
margin-top: 87px;
|
||||||
|
|
||||||
|
li.empty, li.more {
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #FFF;
|
||||||
|
margin: 0 8px 8px;
|
||||||
|
|
||||||
|
.salaryMonth {
|
||||||
|
display: flex;
|
||||||
|
padding: 10px;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
& > span:first-child {
|
||||||
|
color: #2db7f5;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > span:last-child {
|
||||||
|
background: rgba(45, 183, 245, .1);
|
||||||
|
color: #2db7f5;
|
||||||
|
font-size: 12px;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px;
|
||||||
|
transform: scale(.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sendTime {
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
& > span:first-child {
|
||||||
|
color: #999;
|
||||||
|
margin-right: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > span:last-child {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #2db7f5;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -47,6 +47,12 @@
|
||||||
box-shadow: rgba(214, 214, 214, 0.5) 0px 0px 14px 0px;
|
box-shadow: rgba(214, 214, 214, 0.5) 0px 0px 14px 0px;
|
||||||
border: 3px solid #fff;
|
border: 3px solid #fff;
|
||||||
|
|
||||||
|
.sobItemDiv {
|
||||||
|
width: 100%;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
.background-wrapper {
|
.background-wrapper {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ export const tempNormalSetConditions = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
colSpan: 1,
|
colSpan: 1,
|
||||||
conditionType: "INPUT",
|
conditionType: "TEXTAREA",
|
||||||
domkey: ["textContent"],
|
domkey: ["textContent"],
|
||||||
fieldcol: 14,
|
fieldcol: 14,
|
||||||
label: "文本内容",
|
label: "文本内容",
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,19 @@ const { getLabel } = WeaLocaleProvider;
|
||||||
export const condition = [
|
export const condition = [
|
||||||
{
|
{
|
||||||
items: [
|
items: [
|
||||||
{
|
// {
|
||||||
colSpan: 2,
|
// colSpan: 2,
|
||||||
checkbox: false,
|
// checkbox: false,
|
||||||
checkboxValue: false,
|
// checkboxValue: false,
|
||||||
conditionType: "SELECT",
|
// conditionType: "SELECT",
|
||||||
domkey: ["taxAgent"],
|
// domkey: ["taxAgent"],
|
||||||
fieldcol: 18,
|
// fieldcol: 18,
|
||||||
label: getLabel(111, "个税扣缴义务人"),
|
// label: getLabel(111, "个税扣缴义务人"),
|
||||||
labelcol: 6,
|
// labelcol: 6,
|
||||||
options: [],
|
// options: [],
|
||||||
multiple: true,
|
// multiple: true,
|
||||||
viewAttr: 2
|
// viewAttr: 2
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
browserConditionParam: {
|
browserConditionParam: {
|
||||||
completeParams: {},
|
completeParams: {},
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
const { form, id, dimension, onClose } = this.props;
|
const { form, id, dimension, onClose } = this.props;
|
||||||
const [salaryStartMonth, salaryEndMonth] = salaryMonth;
|
const [salaryStartMonth, salaryEndMonth] = salaryMonth;
|
||||||
const { department, employee, position, subCompany, taxAgent, ...extra } = form.getFormDatas();
|
const { department, employee, position, subCompany, taxAgent, ...extra } = form.getFormDatas();
|
||||||
const { value, valueSpan } = taxAgent;
|
// const { value, valueSpan } = taxAgent;
|
||||||
if (!salaryEndMonth || !salaryStartMonth) {
|
if (!salaryEndMonth || !salaryStartMonth) {
|
||||||
this.refs.weaError.showError();
|
this.refs.weaError.showError();
|
||||||
return;
|
return;
|
||||||
|
|
@ -137,7 +137,7 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
employee: _.map(employee.valueObj, it => ({ id: it.id, name: it.name })),
|
employee: _.map(employee.valueObj, it => ({ id: it.id, name: it.name })),
|
||||||
// position: _.map(position.valueObj, it => ({ id: it.id, name: it.name })),
|
// position: _.map(position.valueObj, it => ({ id: it.id, name: it.name })),
|
||||||
subCompany: _.map(subCompany.valueObj, it => ({ id: it.id, name: it.name })),
|
subCompany: _.map(subCompany.valueObj, it => ({ id: it.id, name: it.name })),
|
||||||
taxAgent: value ? _.map(value.split(","), (it, idx) => ({ id: it, name: valueSpan.split(",")[idx] })) : [],
|
// taxAgent: value ? _.map(value.split(","), (it, idx) => ({ id: it, name: valueSpan.split(",")[idx] })) : [],
|
||||||
items: dataSource,
|
items: dataSource,
|
||||||
salaryEndMonth: salaryEndMonth + "-01",
|
salaryEndMonth: salaryEndMonth + "-01",
|
||||||
salaryStartMonth: salaryStartMonth + "-01"
|
salaryStartMonth: salaryStartMonth + "-01"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,16 @@
|
||||||
* Date: 2022-09-19 18:15:32
|
* Date: 2022-09-19 18:15:32
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
|
import {
|
||||||
|
WeaCheckbox,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaInputNumber,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaNewScroll,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaSelect,
|
||||||
|
WeaTop
|
||||||
|
} from "ecCom";
|
||||||
import { message, Modal } from "antd";
|
import { message, Modal } from "antd";
|
||||||
import * as API from "../../apis/ruleconfig";
|
import * as API from "../../apis/ruleconfig";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
@ -28,7 +37,8 @@ export default class Index extends Component {
|
||||||
matchRule: "",
|
matchRule: "",
|
||||||
confValue: "0",
|
confValue: "0",
|
||||||
withDrawTaxDeclaration: "0",
|
withDrawTaxDeclaration: "0",
|
||||||
extEmpsWitch: "0"
|
extEmpsWitch: "0",
|
||||||
|
salaryAcctFixedColumns: 0
|
||||||
},
|
},
|
||||||
showEncryptOperationButton: "",
|
showEncryptOperationButton: "",
|
||||||
progressVisible: false,
|
progressVisible: false,
|
||||||
|
|
@ -56,7 +66,7 @@ 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"
|
OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0"
|
||||||
}
|
}
|
||||||
} = sysInfo;
|
} = sysInfo;
|
||||||
// const { data: { ascOrDesc, orderRule } } = orderRules;
|
// const { data: { ascOrDesc, orderRule } } = orderRules;
|
||||||
|
|
@ -76,7 +86,7 @@ export default class Index extends Component {
|
||||||
showEncryptOperationButton,
|
showEncryptOperationButton,
|
||||||
saveParams: {
|
saveParams: {
|
||||||
...saveParams,
|
...saveParams,
|
||||||
ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration,
|
ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration, salaryAcctFixedColumns,
|
||||||
extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0"
|
extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -228,7 +238,7 @@ export default class Index extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
saveSysOperate = (payload) => {
|
saveSysOperate = (payload) => {
|
||||||
API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch })
|
API.saveSysOperate({ ...payload })
|
||||||
.then(({ status, errormsg }) => {
|
.then(({ status, errormsg }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success(getLabel(22619, "保存成功!"));
|
message.success(getLabel(22619, "保存成功!"));
|
||||||
|
|
@ -286,7 +296,15 @@ export default class Index extends Component {
|
||||||
case "extEmpsWitch":
|
case "extEmpsWitch":
|
||||||
this.saveSysOperate({
|
this.saveSysOperate({
|
||||||
title: getLabel(111, "开启非系统人员"),
|
title: getLabel(111, "开启非系统人员"),
|
||||||
module: "basic", confKey: key
|
module: "basic", confKey: key,
|
||||||
|
confValue: val
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "salaryAcctFixedColumns":
|
||||||
|
this.saveSysOperate({
|
||||||
|
title: getLabel(111, "薪资核算固定列头数"),
|
||||||
|
module: "basic", confKey: key,
|
||||||
|
confValue: !_.isNil(val) ? val.toString() : "0"
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -323,7 +341,8 @@ export default class Index extends Component {
|
||||||
matchRule,
|
matchRule,
|
||||||
confValue,
|
confValue,
|
||||||
withDrawTaxDeclaration,
|
withDrawTaxDeclaration,
|
||||||
extEmpsWitch
|
extEmpsWitch,
|
||||||
|
salaryAcctFixedColumns
|
||||||
} = saveParams;
|
} = saveParams;
|
||||||
return (
|
return (
|
||||||
<div className="ruleWrapper">
|
<div className="ruleWrapper">
|
||||||
|
|
@ -386,6 +405,16 @@ export default class Index extends Component {
|
||||||
/>
|
/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
</WeaSearchGroup>
|
</WeaSearchGroup>
|
||||||
|
<WeaSearchGroup title={getLabel(111, "薪资核算固定列头数")} showGroup center>
|
||||||
|
<WeaFormItem label={getLabel(111, "固定数")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||||
|
<WeaInputNumber min={0} value={salaryAcctFixedColumns}
|
||||||
|
onChange={v => this.setState({
|
||||||
|
saveParams: { ...saveParams, salaryAcctFixedColumns: v }
|
||||||
|
})}
|
||||||
|
onBlur={val => this.handleChange("salaryAcctFixedColumns", val)}
|
||||||
|
/>
|
||||||
|
</WeaFormItem>
|
||||||
|
</WeaSearchGroup>
|
||||||
<WeaSearchGroup title={getLabel(111, "非系统人员")} showGroup center>
|
<WeaSearchGroup title={getLabel(111, "非系统人员")} showGroup center>
|
||||||
<WeaFormItem label={getLabel(111, "开启非系统人员")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
<WeaFormItem label={getLabel(111, "开启非系统人员")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
<WeaCheckbox display="switch" value={extEmpsWitch}
|
<WeaCheckbox display="switch" value={extEmpsWitch}
|
||||||
|
|
|
||||||
|
|
@ -216,19 +216,18 @@ export default class SalaryItem extends React.Component {
|
||||||
const handleMenuClick = (e) => {
|
const handleMenuClick = (e) => {
|
||||||
const { salaryItemStore: { setEditSlideVisible, initRequest } } = this.props;
|
const { salaryItemStore: { setEditSlideVisible, initRequest } } = this.props;
|
||||||
if (e.key === "1") {
|
if (e.key === "1") {
|
||||||
setSystemItemVisible(true);
|
|
||||||
} else if (e.key === "2") {
|
|
||||||
this.setState({ editable: true, isAdd: true });
|
this.setState({ editable: true, isAdd: true });
|
||||||
initRequest();
|
initRequest();
|
||||||
setEditSlideVisible(true);
|
setEditSlideVisible(true);
|
||||||
|
} else if (e.key === "2") {
|
||||||
|
setSystemItemVisible(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu onClick={handleMenuClick}>
|
<Menu onClick={handleMenuClick}>
|
||||||
<Menu.Item key="2">{getLabel(111, "新增自定义薪资项")}</Menu.Item>
|
<Menu.Item key="2">{getLabel(111, "新增系统薪资项")}</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderRightOperation = () => {
|
const renderRightOperation = () => {
|
||||||
|
|
@ -236,7 +235,7 @@ export default class SalaryItem extends React.Component {
|
||||||
{
|
{
|
||||||
(showOperateBtn || showSalaryItemBtn) &&
|
(showOperateBtn || showSalaryItemBtn) &&
|
||||||
<Dropdown.Button overlay={menu} type="primary" onClick={() => handleMenuClick({ key: "1" })}
|
<Dropdown.Button overlay={menu} type="primary" onClick={() => handleMenuClick({ key: "1" })}
|
||||||
style={{ marginRight: "10px" }}>{getLabel(111, "新增系统薪资项")}</Dropdown.Button>
|
style={{ marginRight: "10px" }}>{getLabel(111, "新增自定义薪资项")}</Dropdown.Button>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
(showOperateBtn || showSalaryItemBtn) &&
|
(showOperateBtn || showSalaryItemBtn) &&
|
||||||
|
|
@ -265,7 +264,7 @@ export default class SalaryItem extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}}>批量删除薪资项</Button>
|
}}>{getLabel(32136, "批量删除")}</Button>
|
||||||
}
|
}
|
||||||
<WeaInputSearch value={this.state.searchValue} placeholder={"请输入名称"} onChange={(value) => {
|
<WeaInputSearch value={this.state.searchValue} placeholder={"请输入名称"} onChange={(value) => {
|
||||||
this.setState({ searchValue: value });
|
this.setState({ searchValue: value });
|
||||||
|
|
|
||||||
|
|
@ -1,78 +1,88 @@
|
||||||
export const roundingModeOptions = [
|
export const roundingModeOptions = [
|
||||||
{
|
{
|
||||||
key: "1",
|
key: "1",
|
||||||
selected: false,
|
selected: false,
|
||||||
showname: "原始数据"
|
showname: "原始数据"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "2",
|
key: "2",
|
||||||
selected: false,
|
selected: false,
|
||||||
showname: "四舍五入"
|
showname: "四舍五入"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "3",
|
key: "3",
|
||||||
selected: false,
|
selected: false,
|
||||||
showname: "向上舍入"
|
showname: "向上舍入"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "4",
|
key: "4",
|
||||||
selected: false,
|
selected: false,
|
||||||
showname: "向下舍入"
|
showname: "向下舍入"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "5",
|
key: "5",
|
||||||
selected: false,
|
selected: false,
|
||||||
showname: "见分进角"
|
showname: "见分进角"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export const patternOptions = [
|
export const patternOptions = [
|
||||||
{
|
{
|
||||||
key: "0",
|
key: "0",
|
||||||
showname: "0",
|
showname: "0",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "1",
|
key: "1",
|
||||||
showname: "1",
|
showname: "1",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "2",
|
key: "2",
|
||||||
showname: "2",
|
showname: "2",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "3",
|
key: "3",
|
||||||
showname: "3",
|
showname: "3",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "4",
|
key: "4",
|
||||||
showname: "4",
|
showname: "4",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "5",
|
key: "5",
|
||||||
showname: "5",
|
showname: "5",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "6",
|
key: "6",
|
||||||
showname: "6",
|
showname: "6",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
]
|
{
|
||||||
|
key: "7",
|
||||||
|
showname: "7",
|
||||||
|
selected: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "8",
|
||||||
|
showname: "8",
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
export const dataTypeOptions = [
|
export const dataTypeOptions = [
|
||||||
{
|
{
|
||||||
key: "number",
|
key: "number",
|
||||||
showname: "数值",
|
showname: "数值",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "string",
|
key: "string",
|
||||||
showname: "字符",
|
showname: "字符",
|
||||||
selected: false
|
selected: false
|
||||||
},
|
}
|
||||||
]
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,43 @@
|
||||||
export const columns = [
|
export const socialAccountConditions = [
|
||||||
{
|
{
|
||||||
title: "账单月份",
|
items: [
|
||||||
dataIndex: 'title',
|
{
|
||||||
key: 'title',
|
colSpan: 1,
|
||||||
},
|
conditionType: "MONTHPICKER",
|
||||||
{
|
domkey: ["billMonth"],
|
||||||
title: "状态",
|
fieldcol: 14,
|
||||||
dataIndex: 'title',
|
label: "账单月份",
|
||||||
key: 'title',
|
lanId: 542443,
|
||||||
},
|
labelcol: 6,
|
||||||
{
|
value: "",
|
||||||
title: "社保核算人数",
|
rules: "required|string",
|
||||||
dataIndex: 'title',
|
viewAttr: 3
|
||||||
key: 'title',
|
},
|
||||||
},
|
{
|
||||||
{
|
colSpan: 1,
|
||||||
title: "公积金核算人数",
|
conditionType: "SELECT",
|
||||||
dataIndex: 'title',
|
domkey: ["paymentOrganization"],
|
||||||
key: 'title',
|
fieldcol: 14,
|
||||||
},
|
label: "个税扣缴义务人",
|
||||||
{
|
lanId: 537996,
|
||||||
title: "其他福利核算人数",
|
labelcol: 6,
|
||||||
dataIndex: 'title',
|
options: [],
|
||||||
key: 'title',
|
rules: "required|string",
|
||||||
},
|
viewAttr: 3
|
||||||
{
|
},
|
||||||
title: "公积金缴费",
|
{
|
||||||
dataIndex: 'title',
|
colSpan: 1,
|
||||||
key: 'title',
|
conditionType: "INPUT",
|
||||||
},
|
domkey: ["remarks"],
|
||||||
{
|
fieldcol: 14,
|
||||||
title: "其他福利缴费",
|
label: "备注",
|
||||||
dataIndex: 'title',
|
lanId: 536726,
|
||||||
key: 'title',
|
labelcol: 6,
|
||||||
},
|
value: "",
|
||||||
{
|
viewAttr: 2
|
||||||
title: "核算人",
|
}
|
||||||
dataIndex: 'title',
|
],
|
||||||
key: 'title',
|
defaultshow: true,
|
||||||
},
|
title: ""
|
||||||
{
|
}
|
||||||
title: "最后操作时间",
|
];
|
||||||
dataIndex: 'title',
|
|
||||||
key: 'title',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "备注",
|
|
||||||
dataIndex: 'title',
|
|
||||||
key: 'title',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
dataIndex: 'title',
|
|
||||||
key: 'title',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
export const dataSource = [];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,86 +5,73 @@
|
||||||
* LastEditTime: 2022-06-28 15:52:31
|
* LastEditTime: 2022-06-28 15:52:31
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Button, Form, Input } from "antd";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaDatePicker, WeaDialog, WeaSelect } from "ecCom";
|
import { Button } from "antd";
|
||||||
|
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
|
import { socialAccountConditions } from "../columns";
|
||||||
|
import { getSearchs } from "../../../../util";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const createForm = Form.create;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
const FormItem = Form.Item;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
||||||
|
@inject("standingBookStore")
|
||||||
|
@observer
|
||||||
class Accountdialog extends Component {
|
class Accountdialog extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {};
|
this.state = { conditions: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSubmit = e => {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
const { onOk } = this.props;
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.init(nextProps);
|
||||||
e.preventDefault();
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.standingBookStore.initAccountForm();
|
||||||
this.props.form.validateFields((errors, values) => {
|
}
|
||||||
if (!!errors) {
|
|
||||||
return;
|
init = (props) => {
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(socialAccountConditions, item => ({
|
||||||
|
...item, items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "paymentOrganization") {
|
||||||
|
return {
|
||||||
|
...o, label: getLabel(o.lanId, o.label),
|
||||||
|
options: this.props.options
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o, label: getLabel(o.lanId, o.label) };
|
||||||
|
})
|
||||||
|
}))
|
||||||
|
}, () => props.standingBookStore.accountForm.initFormFields(this.state.conditions));
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSubmit = () => {
|
||||||
|
const { onOk, standingBookStore: { accountForm } } = this.props;
|
||||||
|
accountForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
onOk(accountForm.getFormParams());
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
}
|
}
|
||||||
onOk(values);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { getFieldProps } = this.props.form;
|
const { conditions } = this.state;
|
||||||
const formItemLayout = {
|
const { standingBookStore: { accountForm }, loading } = this.props;
|
||||||
labelCol: { span: 7 },
|
|
||||||
wrapperCol: { span: 12 }
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<WeaDialog
|
<WeaDialog
|
||||||
{...this.props}
|
{...this.props}
|
||||||
style={{ width: 520 }}
|
style={{ width: 520, height: 156 }}
|
||||||
initLoadCss
|
initLoadCss className="accountDialogWrapper"
|
||||||
className="accountDialogWrapper"
|
|
||||||
buttons={[
|
buttons={[
|
||||||
<Button
|
<Button type="primary" onClick={this.handleSubmit} loading={loading}>
|
||||||
type="primary"
|
|
||||||
onClick={this.handleSubmit}
|
|
||||||
loading={this.props.loading}>
|
|
||||||
保存并进入核算
|
保存并进入核算
|
||||||
</Button>
|
</Button>
|
||||||
]}>
|
]}>
|
||||||
<Form horizontal form={this.props.form} style={{ marginTop: 16 }}>
|
{getSearchs(accountForm, conditions, 1, false)}
|
||||||
<FormItem {...formItemLayout} label="账单月份">
|
|
||||||
<WeaDatePicker
|
|
||||||
viewAttr={3}
|
|
||||||
style={{ width: "100%" }}
|
|
||||||
format="YYYY-MM"
|
|
||||||
{...getFieldProps("billMonth", {
|
|
||||||
initialValue: new Date(),
|
|
||||||
rules: [{ required: true, message: "请选择日期" }]
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
{/* {
|
|
||||||
this.props.isAdmin && */}
|
|
||||||
<FormItem {...formItemLayout} label="个税扣缴义务人">
|
|
||||||
<WeaSelect
|
|
||||||
style={{ width: "100%" }}
|
|
||||||
viewAttr={3}
|
|
||||||
options={this.props.options}
|
|
||||||
{...getFieldProps("paymentOrganization", {
|
|
||||||
initialValue: "",
|
|
||||||
rules: [{ required: true, message: "请选择个税扣缴义务人" }]
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
{/* } */}
|
|
||||||
<FormItem {...formItemLayout} label="备注">
|
|
||||||
<Input
|
|
||||||
type="textarea"
|
|
||||||
{...getFieldProps("remarks", { initialValue: "" })}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</Form>
|
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default createForm()(Accountdialog);
|
export default Accountdialog;
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,38 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.accountDialogWrapper{
|
.accountDialogWrapper {
|
||||||
.wea-select,.ant-select,.ant-select-selection{
|
.wea-dialog-body {
|
||||||
|
background: #f6f6f6;
|
||||||
|
padding: 16px;
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
padding: 0;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 5px 16px;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-content, .wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select, .ant-select, .ant-select-selection {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.ant-select-selection{
|
|
||||||
|
.ant-select-selection {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
||||||
|
.ant-select-selection-selected-value {
|
||||||
|
max-width: 238px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Button, DatePicker, Dropdown, Menu, message, Modal } from "antd";
|
import { Button, DatePicker, Dropdown, Menu, message, Modal } from "antd";
|
||||||
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaTop } from "ecCom";
|
||||||
import { renderNoright } from "../../../util";
|
import { renderNoright } from "../../../util";
|
||||||
import Accountdialog from "./components/accountDialog";
|
import Accountdialog from "./components/accountDialog";
|
||||||
import AbnormalDrawer from "./components/abnormalDrawer";
|
import AbnormalDrawer from "./components/abnormalDrawer";
|
||||||
|
|
@ -25,7 +25,8 @@ export default class StandingBook extends React.Component {
|
||||||
selectedKey: "0",
|
selectedKey: "0",
|
||||||
tableParams: {
|
tableParams: {
|
||||||
startTime: moment(new Date()).startOf("year").format("YYYY-MM"),
|
startTime: moment(new Date()).startOf("year").format("YYYY-MM"),
|
||||||
endTime: moment(new Date()).startOf("month").format("YYYY-MM")
|
endTime: moment(new Date()).startOf("month").format("YYYY-MM"),
|
||||||
|
paymentOrganization: ""
|
||||||
},
|
},
|
||||||
current: 1,
|
current: 1,
|
||||||
dialogProps: {
|
dialogProps: {
|
||||||
|
|
@ -344,6 +345,7 @@ export default class StandingBook extends React.Component {
|
||||||
progressVisible: false,
|
progressVisible: false,
|
||||||
progress: 0
|
progress: 0
|
||||||
});
|
});
|
||||||
|
message.error(data.message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.state.progress !== 100) {
|
if (this.state.progress !== 100) {
|
||||||
|
|
@ -423,7 +425,7 @@ export default class StandingBook extends React.Component {
|
||||||
tableStore
|
tableStore
|
||||||
} = standingBookStore;
|
} = standingBookStore;
|
||||||
const { list, columns, total } = this.state.tableData;
|
const { list, columns, total } = this.state.tableData;
|
||||||
const { startTime, endTime } = this.state.tableParams;
|
const { startTime, endTime, paymentOrganization } = this.state.tableParams;
|
||||||
const { dialogProps, drawerProps } = this.state;
|
const { dialogProps, drawerProps } = this.state;
|
||||||
const abnormalColumns = _.map(
|
const abnormalColumns = _.map(
|
||||||
_.filter(tableStore.columns, (it) => it.hide && it.hide === "false"),
|
_.filter(tableStore.columns, (it) => it.hide && it.hide === "false"),
|
||||||
|
|
@ -465,31 +467,32 @@ export default class StandingBook extends React.Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="standingbookWrapper">
|
<div className="standingbookWrapper">
|
||||||
<WeaTop
|
<WeaTop title="社保福利台账" icon={<i className="icon-coms-fa"/>}
|
||||||
title="社保福利台账" // 文字
|
iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []}
|
||||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
|
||||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
|
||||||
buttons={showOperateBtn ? rightBtns : []}
|
|
||||||
>
|
>
|
||||||
<div className="billDateWrapper">
|
<div className="filterWrapper">
|
||||||
<div>账单月份:</div>
|
<div className="billDateWrapper">
|
||||||
<MonthPicker
|
<div>账单月份:</div>
|
||||||
value={startTime}
|
<MonthPicker value={startTime} format="YYYY-MM"
|
||||||
format="YYYY-MM"
|
disabledDate={current => (current && endTime && current.getTime() > new Date(endTime).getTime())}
|
||||||
disabledDate={(current) => {
|
onChange={(val) => this.handleChangeMonth("startTime", val)}
|
||||||
return current && endTime && current.getTime() > new Date(endTime).getTime();
|
/>
|
||||||
}}
|
<span className="to">至</span>
|
||||||
onChange={(val) => this.handleChangeMonth("startTime", val)}
|
<MonthPicker value={endTime} format="YYYY-MM"
|
||||||
/>
|
disabledDate={current => (current && startTime && current.getTime() < new Date(startTime).getTime())}
|
||||||
<span className="to">至</span>
|
onChange={(val) => this.handleChangeMonth("endTime", val)}
|
||||||
<MonthPicker
|
/>
|
||||||
value={endTime}
|
</div>
|
||||||
format="YYYY-MM"
|
<div className="billDateWrapper">
|
||||||
disabledDate={(current) => {
|
<span className="to">{getLabel(537996, "个税扣缴义务人")}:</span>
|
||||||
return current && startTime && current.getTime() < new Date(startTime).getTime();
|
<WeaSelect value={paymentOrganization} options={dialogProps.options} style={{ width: 200 }}
|
||||||
}}
|
onChange={val => this.setState({
|
||||||
onChange={(val) => this.handleChangeMonth("endTime", val)}
|
tableParams: { ...this.state.tableParams, paymentOrganization: val }
|
||||||
/>
|
}, () => {
|
||||||
|
this.getCommonList({ ...this.state.tableParams, ...this.pageInfo });
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
<WeaNewScroll height="100%">
|
<WeaNewScroll height="100%">
|
||||||
|
|
@ -522,15 +525,7 @@ export default class StandingBook extends React.Component {
|
||||||
/>
|
/>
|
||||||
</WeaNewScroll>
|
</WeaNewScroll>
|
||||||
</div>
|
</div>
|
||||||
|
<Accountdialog {...dialogProps} onCancel={() => this.handleClose()} onOk={this.handleOk} loading={loading}/>
|
||||||
{dialogProps.visible && (
|
|
||||||
<Accountdialog
|
|
||||||
{...dialogProps}
|
|
||||||
onCancel={() => this.handleClose()}
|
|
||||||
onOk={this.handleOk}
|
|
||||||
loading={loading}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{/*核算进度条*/}
|
{/*核算进度条*/}
|
||||||
{
|
{
|
||||||
this.state.progressVisible &&
|
this.state.progressVisible &&
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.billDateWrapper {
|
.filterWrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 46px;
|
|
||||||
padding: 0 16px;
|
|
||||||
|
|
||||||
.to {
|
.billDateWrapper {
|
||||||
padding: 0 8px;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 46px;
|
||||||
|
padding: 0 16px;
|
||||||
|
|
||||||
|
.to {
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,223 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 添加补差人员
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/28
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaDialog, WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaTableEdit } from "ecCom";
|
||||||
|
import * as API from "../../../../apis/standingBook";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import { addPersonConditions } from "../constant";
|
||||||
|
import { getSearchs, toDecimal_n } from "../../../../util";
|
||||||
|
import { convertData } from "./supplementarySlide";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("standingBookStore")
|
||||||
|
@observer
|
||||||
|
class AddCompensationPersonnelDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
conditions: [], paymentList: [
|
||||||
|
{ title: getLabel(538967, "社保"), titleSign: "social", payment: [] },
|
||||||
|
{ title: getLabel(538969, "公积金"), titleSign: "fund", payment: [] },
|
||||||
|
{ title: getLabel(542518, "企业年金及其它福利"), titleSign: "other", payment: [] }
|
||||||
|
], loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
const { standingBookStore: { addCPForm } } = nextProps;
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(addPersonConditions, o => {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
items: _.map(o.items, g => ({
|
||||||
|
...g, label: getLabel(g.lanId, g.label)
|
||||||
|
})),
|
||||||
|
title: getLabel(111, "补差人员")
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => addCPForm.initFormFields(this.state.conditions));
|
||||||
|
}
|
||||||
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.standingBookStore.initAddCPForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
getBalancePaymentGroup = () => {
|
||||||
|
const { standingBookStore: { addCPForm }, paymentOrganization } = this.props;
|
||||||
|
const payload = { ...addCPForm.getFormParams(), paymentOrganization };
|
||||||
|
API.getBalancePaymentGroup(payload).then(({ status, data }) => {
|
||||||
|
if (status && !_.isEmpty(data)) {
|
||||||
|
this.setState({
|
||||||
|
paymentList: [
|
||||||
|
{
|
||||||
|
title: getLabel(538967, "社保"), titleSign: "social",
|
||||||
|
payment: convertData(_.filter(data, it => it.titleSign === "social"))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(538969, "公积金"), titleSign: "fund",
|
||||||
|
payment: convertData(_.filter(data, it => it.titleSign === "fund"))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(542518, "企业年金及其它福利"), titleSign: "other",
|
||||||
|
payment: convertData(_.filter(data, it => it.titleSign === "other"))
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message.error(getLabel(111, "数据不存在!"));
|
||||||
|
this.setState({
|
||||||
|
paymentList: [
|
||||||
|
{ title: getLabel(538967, "社保"), titleSign: "social", payment: [] },
|
||||||
|
{ title: getLabel(538969, "公积金"), titleSign: "fund", payment: [] },
|
||||||
|
{ title: getLabel(542518, "企业年金及其它福利"), titleSign: "other", payment: [] }
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
renderColumns = () => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
title: getLabel(543262, "福利项"),
|
||||||
|
dataIndex: "insuranceName",
|
||||||
|
key: "insuranceName",
|
||||||
|
com: [
|
||||||
|
{ label: "", type: "INPUT", viewAttr: 1, key: "insuranceName" }
|
||||||
|
],
|
||||||
|
colSpan: 1,
|
||||||
|
width: "33%"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543263, "个人缴纳金额"),
|
||||||
|
dataIndex: "custom",
|
||||||
|
key: "custom",
|
||||||
|
com: [
|
||||||
|
{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||||
|
onChange={v => onEdit({
|
||||||
|
record: { ...record, [`${record.insuranceId}_per`]: v },
|
||||||
|
index, key: "per", value: v
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
],
|
||||||
|
colSpan: 1,
|
||||||
|
width: "33%"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(543264, "单位缴纳金额"),
|
||||||
|
dataIndex: "custom",
|
||||||
|
key: "custom",
|
||||||
|
com: [
|
||||||
|
{
|
||||||
|
type: "custom",
|
||||||
|
key: "custom",
|
||||||
|
render: (text, record, index, onEdit) => (
|
||||||
|
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||||
|
onChange={v => onEdit({
|
||||||
|
record: { ...record, [`${record.insuranceId}_com`]: v },
|
||||||
|
index, key: "com", value: v
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
],
|
||||||
|
colSpan: 1,
|
||||||
|
width: "33%"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
save = () => {
|
||||||
|
const { standingBookStore: { addCPForm }, paymentOrganization, billMonth } = this.props;
|
||||||
|
const { paymentList } = this.state;
|
||||||
|
addCPForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
const payload = {
|
||||||
|
billMonth, paymentOrganization, ...addCPForm.getFormParams(),
|
||||||
|
...this.convertItemJSON(_.find(paymentList, i => i.titleSign === "social").payment, "social"),
|
||||||
|
...this.convertItemJSON(_.find(paymentList, i => i.titleSign === "fund").payment, "fund"),
|
||||||
|
...this.convertItemJSON(_.find(paymentList, i => i.titleSign === "other").payment, "other")
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API.addNewBalance(payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.props.onCancel(true);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
convertItemJSON = (list, type) => {
|
||||||
|
let perJson = {}, comJson = {};
|
||||||
|
_.forEach(list, o => {
|
||||||
|
if (!_.isNil(o.per)) {
|
||||||
|
perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, 2) });
|
||||||
|
}
|
||||||
|
if (!_.isNil(o.com)) {
|
||||||
|
comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, 2) });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return { [`${type}PerJson`]: JSON.stringify(perJson), [`${type}ComJson`]: JSON.stringify(comJson) };
|
||||||
|
};
|
||||||
|
getRowSelection = (rowSelection) => {
|
||||||
|
let sel = { ...rowSelection };
|
||||||
|
sel.getCheckboxProps = (record) => {
|
||||||
|
return { disabled: true };
|
||||||
|
};
|
||||||
|
return sel;
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { conditions, paymentList, loading } = this.state;
|
||||||
|
const { standingBookStore: { addCPForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog {...this.props} scalable title={getLabel(111, "添加补差人员")} initLoadCss
|
||||||
|
className="add-comp-per-dialog"
|
||||||
|
buttons={[<Button type="primary" onClick={this.save}
|
||||||
|
loading={loading}>{getLabel(826, "确定")}</Button>]}
|
||||||
|
style={{
|
||||||
|
width: 800, height: 600, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||||
|
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="add-comp-per-content">
|
||||||
|
<div className="form">{getSearchs(addCPForm, conditions, 1, false, this.getBalancePaymentGroup)}</div>
|
||||||
|
{
|
||||||
|
_.map(paymentList, item => (
|
||||||
|
<WeaSearchGroup title={item.title} showGroup needTigger>
|
||||||
|
<WeaTableEdit columns={this.renderColumns()} datas={item.payment} showTitle={false}
|
||||||
|
getRowSelection={this.getRowSelection}
|
||||||
|
onChange={payment => this.setState({
|
||||||
|
paymentList: _.map(paymentList, o => {
|
||||||
|
if (o.titleSign === item.titleSign) {
|
||||||
|
return { ...o, payment };
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AddCompensationPersonnelDialog;
|
||||||
|
|
@ -150,6 +150,67 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//补差添加人员弹框
|
||||||
|
.add-comp-per-dialog {
|
||||||
|
.wea-dialog-body {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.add-comp-per-content {
|
||||||
|
height: 100%;
|
||||||
|
background: #F6F6F6;
|
||||||
|
padding: 16px;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
.form {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
padding: 0;
|
||||||
|
background: #FFF;
|
||||||
|
|
||||||
|
.wea-title {
|
||||||
|
background: #f6f6f6;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
.text-elli {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-content {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 4px 16px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-title {
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.text-elli {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-table-edit {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//退差人员选择框
|
//退差人员选择框
|
||||||
.regSelectWrapper {
|
.regSelectWrapper {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class InputPaymentAmount extends Component {
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return (
|
return (
|
||||||
<WeaInputNumber
|
<WeaInputNumber
|
||||||
value={record[`${record.insuranceId}_per`]}
|
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
@ -30,7 +30,7 @@ class InputPaymentAmount extends Component {
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return (
|
return (
|
||||||
<WeaInputNumber
|
<WeaInputNumber
|
||||||
value={record[`${record.insuranceId}_com`]}
|
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -14,23 +14,20 @@ import { calcPageNo } from "../../../../util";
|
||||||
import RegList from "./regList";
|
import RegList from "./regList";
|
||||||
import RegEditDetial from "./regEditDetial";
|
import RegEditDetial from "./regEditDetial";
|
||||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||||
|
import AddCompensationPersonnelDialog from "./addCompensationPersonnelDialog";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
class MakeupDifference extends Component {
|
class MakeupDifference extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
selectKey: [],
|
selectKey: [], fieldData: {}, loading: { save: false }, importDiffModal: { visible: false },
|
||||||
fieldData: {},
|
|
||||||
returnEditPersonSlide: {
|
returnEditPersonSlide: {
|
||||||
title: "",
|
title: "", editId: "", visible: false
|
||||||
editId: "",
|
|
||||||
visible: false
|
|
||||||
},
|
},
|
||||||
importDiffModal: {
|
addPersonalDialog: {
|
||||||
visible: false
|
visible: false, paymentOrganization: "", billMonth: ""
|
||||||
},
|
}
|
||||||
loading: { save: false }
|
|
||||||
};
|
};
|
||||||
this.diffListRef = null;
|
this.diffListRef = null;
|
||||||
this.regTopRef = null;
|
this.regTopRef = null;
|
||||||
|
|
@ -54,7 +51,7 @@ class MakeupDifference extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleChangeOpt = (key) => {
|
handleChangeOpt = (key) => {
|
||||||
const { importDiffModal } = this.state;
|
const { importDiffModal, addPersonalDialog } = this.state;
|
||||||
const name = this.regTopRef.state.name;
|
const name = this.regTopRef.state.name;
|
||||||
const workcode = this.regTopRef.state.workcode;
|
const workcode = this.regTopRef.state.workcode;
|
||||||
const billMonth = getQueryString("billMonth");
|
const billMonth = getQueryString("billMonth");
|
||||||
|
|
@ -77,6 +74,13 @@ class MakeupDifference extends Component {
|
||||||
case "search":
|
case "search":
|
||||||
this.diffListRef.recessionList({ userName: name, workcode, current: 1 });
|
this.diffListRef.recessionList({ userName: name, workcode, current: 1 });
|
||||||
break;
|
break;
|
||||||
|
case "add":
|
||||||
|
this.setState({
|
||||||
|
addPersonalDialog: {
|
||||||
|
...addPersonalDialog, visible: true, paymentOrganization, billMonth
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +103,7 @@ class MakeupDifference extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const billMonth = getQueryString("billMonth");
|
const billMonth = getQueryString("billMonth");
|
||||||
const { selectKey, importDiffModal, fieldData, returnEditPersonSlide } = this.state;
|
const { selectKey, importDiffModal, fieldData, returnEditPersonSlide, addPersonalDialog } = this.state;
|
||||||
return (
|
return (
|
||||||
<div className="differenceWrapper">
|
<div className="differenceWrapper">
|
||||||
<RegTop
|
<RegTop
|
||||||
|
|
@ -119,6 +123,15 @@ class MakeupDifference extends Component {
|
||||||
/>
|
/>
|
||||||
{/*编辑弹框*/}
|
{/*编辑弹框*/}
|
||||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
||||||
|
{/*添加补差人员*/}
|
||||||
|
<AddCompensationPersonnelDialog {...addPersonalDialog}
|
||||||
|
onCancel={(isRefresh) => this.setState({
|
||||||
|
addPersonalDialog: {
|
||||||
|
...addPersonalDialog,
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
}, () => isRefresh && this.diffListRef.recessionList())}
|
||||||
|
/>
|
||||||
{/*导入补差*/}
|
{/*导入补差*/}
|
||||||
{
|
{
|
||||||
importDiffModal.visible &&
|
importDiffModal.visible &&
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,14 @@
|
||||||
* Date: 2022/11/23
|
* Date: 2022/11/23
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaInputNumber, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
|
import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
|
||||||
import { message } from "antd";
|
import { message } from "antd";
|
||||||
import * as API from "../../../../apis/standingBook";
|
import * as API from "../../../../apis/standingBook";
|
||||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||||
import { regColumns } from "../constant";
|
import { regColumns } from "../constant";
|
||||||
|
import { toDecimal_n } from "../../../../util";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class RegEditDetial extends Component {
|
class RegEditDetial extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -111,26 +114,26 @@ class RegEditDetial extends Component {
|
||||||
};
|
};
|
||||||
_.forEach(socialData.dataSource, item => {
|
_.forEach(socialData.dataSource, item => {
|
||||||
if (item.personalPaymentAmount) {
|
if (item.personalPaymentAmount) {
|
||||||
payload["socialPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
|
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||||
}
|
}
|
||||||
if (item.companyPaymentAmount) {
|
if (item.companyPaymentAmount) {
|
||||||
payload["socialComJson"][item["insuranceId"]] = item.companyPaymentAmount;
|
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.forEach(foundData.dataSource, item => {
|
_.forEach(foundData.dataSource, item => {
|
||||||
if (item.personalPaymentAmount) {
|
if (item.personalPaymentAmount) {
|
||||||
payload["fundPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
|
payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||||
}
|
}
|
||||||
if (item.companyPaymentAmount) {
|
if (item.companyPaymentAmount) {
|
||||||
payload["fundComJson"][item["insuranceId"]] = item.companyPaymentAmount;
|
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.forEach(otherData.dataSource, item => {
|
_.forEach(otherData.dataSource, item => {
|
||||||
if (item.personalPaymentAmount) {
|
if (item.personalPaymentAmount) {
|
||||||
payload["otherPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
|
payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||||
}
|
}
|
||||||
if (item.companyPaymentAmount) {
|
if (item.companyPaymentAmount) {
|
||||||
payload["otherComJson"][item["insuranceId"]] = item.companyPaymentAmount;
|
payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.forEach(Object.keys(payload), item => {
|
_.forEach(Object.keys(payload), item => {
|
||||||
|
|
@ -198,13 +201,13 @@ class RegEditDetial extends Component {
|
||||||
let socialSecurity = [], accumulationFund = [], otherBenefits = [];
|
let socialSecurity = [], accumulationFund = [], otherBenefits = [];
|
||||||
const { data: result } = data;
|
const { data: result } = data;
|
||||||
_.map(result, it => {
|
_.map(result, it => {
|
||||||
if (it.title.indexOf("社保") !== -1) {
|
if (it.titleSign === "social") {
|
||||||
socialSecurity.push(it);
|
socialSecurity.push(it);
|
||||||
}
|
}
|
||||||
if (it.title.indexOf("公积金") !== -1) {
|
if (it.titleSign === "fund") {
|
||||||
accumulationFund.push(it);
|
accumulationFund.push(it);
|
||||||
}
|
}
|
||||||
if (it.title.indexOf("其他") !== -1) {
|
if (it.titleSign === "other") {
|
||||||
otherBenefits.push(it);
|
otherBenefits.push(it);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -226,9 +229,9 @@ class RegEditDetial extends Component {
|
||||||
result = _.map(_.uniqWith(fieldItems, _.isEqual), item => {
|
result = _.map(_.uniqWith(fieldItems, _.isEqual), item => {
|
||||||
let obj = { benefits: item };
|
let obj = { benefits: item };
|
||||||
_.forEach(data, it => {
|
_.forEach(data, it => {
|
||||||
if (item === it.insuranceName && it.paymentScope === "个人") {
|
if (item === it.insuranceName && it.paymentScopeSign === "per") {
|
||||||
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
|
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
|
||||||
} else if (item === it.insuranceName && it.paymentScope === "公司") {
|
} else if (item === it.insuranceName && it.paymentScopeSign === "com") {
|
||||||
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
|
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaTab } from "ecCom";
|
import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||||
import { getQueryString } from "../../../../util/url";
|
import { getQueryString } from "../../../../util/url";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class RegTop extends Component {
|
class RegTop extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -38,13 +40,16 @@ class RegTop extends Component {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
const [dom1, ...extra] = dom;
|
const [dom1, ...extra] = dom;
|
||||||
const domBtn = regtopType === "regression" ?
|
const domBtn = regtopType === "regression" ?
|
||||||
<Button type="primary" onClick={() => onChange("add")}>添加</Button> :
|
[<Button type="primary" onClick={() => onChange("add")}>添加</Button>] :
|
||||||
<Button type="primary" onClick={() => onChange("import")}>导入</Button>;
|
[
|
||||||
|
<Button type="primary" onClick={() => onChange("add")}>{getLabel(384113, "添加")}</Button>,
|
||||||
|
<Button type="primary" onClick={() => onChange("import")}>{getLabel(32935, "导入")}</Button>
|
||||||
|
];
|
||||||
dom = [
|
dom = [
|
||||||
dom1,
|
dom1,
|
||||||
<Button type="primary" disabled={_.isEmpty(selectKey)} onClick={() => onChange("delete")}>
|
<Button type="primary" disabled={_.isEmpty(selectKey)} onClick={() => onChange("delete")}>
|
||||||
删除
|
删除
|
||||||
</Button>, domBtn, ...extra
|
</Button>, ...domBtn, ...extra
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return dom;
|
return dom;
|
||||||
|
|
@ -69,7 +74,7 @@ class RegTop extends Component {
|
||||||
{
|
{
|
||||||
title: `账单月份: ${billMonth}`,
|
title: `账单月份: ${billMonth}`,
|
||||||
viewcondition: "1"
|
viewcondition: "1"
|
||||||
},
|
}
|
||||||
]}
|
]}
|
||||||
keyParam="viewcondition" selectedKey="" advanceHeight={200} searchsAd={this.getSearchs()}
|
keyParam="viewcondition" selectedKey="" advanceHeight={200} searchsAd={this.getSearchs()}
|
||||||
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
|
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { message, Modal } from "antd";
|
import { message, Modal } from "antd";
|
||||||
import { WeaFormItem, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom";
|
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom";
|
||||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||||
import { Picker, SelectWithAll } from "./regAddEmployee";
|
import { Picker, SelectWithAll } from "./regAddEmployee";
|
||||||
import { Browser } from "../../../dataAcquisition/addItems";
|
import { Browser } from "../../../dataAcquisition/addItems";
|
||||||
|
|
@ -15,6 +15,9 @@ import { getPaymentGroup, getSupplementPaymentForm, siaccountSupplementarySave }
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import BusinessAccounting from "./businessAccounting";
|
import BusinessAccounting from "./businessAccounting";
|
||||||
import InputPaymentAmount from "./inputPaymentAmount";
|
import InputPaymentAmount from "./inputPaymentAmount";
|
||||||
|
import { toDecimal_n } from "../../../../util";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
@inject("taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
|
|
@ -88,8 +91,12 @@ class SupplementarySlide extends Component {
|
||||||
_.map(inputPaymentAmount[item], child => {
|
_.map(inputPaymentAmount[item], child => {
|
||||||
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
|
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
|
||||||
valueCom = child[`${child.insuranceId}_com`];
|
valueCom = child[`${child.insuranceId}_com`];
|
||||||
_.assign(payload[`${item}PerString`], { [key]: valuePer ? valuePer.toString() : "0" });
|
if (!child.perDisabled) {
|
||||||
_.assign(payload[`${item}ComString`], { [key]: valueCom ? valueCom.toString() : "0" });
|
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) || "0" });
|
||||||
|
}
|
||||||
|
if (!child.comDisabled) {
|
||||||
|
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
for (let i in payload) {
|
for (let i in payload) {
|
||||||
|
|
@ -97,22 +104,6 @@ class SupplementarySlide extends Component {
|
||||||
}
|
}
|
||||||
return payload;
|
return payload;
|
||||||
};
|
};
|
||||||
convertData = (dataSource) => {
|
|
||||||
let endList = [];
|
|
||||||
_.values(_.groupBy(dataSource, "insuranceName")).forEach((itemList) => {
|
|
||||||
let data = {};
|
|
||||||
itemList.forEach(d => {
|
|
||||||
const perKey = `${d.insuranceId}_per`, comKey = `${d.insuranceId}_com`;
|
|
||||||
data = _.assign(data, {
|
|
||||||
...d,
|
|
||||||
[perKey]: "",
|
|
||||||
[comKey]: ""
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return endList.push(data);
|
|
||||||
});
|
|
||||||
return endList;
|
|
||||||
};
|
|
||||||
handleSaveSupplementSalary = () => {
|
handleSaveSupplementSalary = () => {
|
||||||
const { billMonth, paymentOrganization, onCancel } = this.props;
|
const { billMonth, paymentOrganization, onCancel } = this.props;
|
||||||
const { baseInfo } = this.state;
|
const { baseInfo } = this.state;
|
||||||
|
|
@ -185,9 +176,9 @@ class SupplementarySlide extends Component {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({
|
||||||
businessAccounting: {
|
businessAccounting: {
|
||||||
socialSecurityBase: _.filter(data, it => it.title === "社保"),
|
socialSecurityBase: _.filter(data, it => it.titleSign === "social"),
|
||||||
fundBase: _.filter(data, it => it.title === "公积金"),
|
fundBase: _.filter(data, it => it.titleSign === "fund"),
|
||||||
otherBase: _.filter(data, it => it.title === "企业年金及其它福利")
|
otherBase: _.filter(data, it => it.titleSign === "other")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -214,9 +205,9 @@ class SupplementarySlide extends Component {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputPaymentAmount: {
|
inputPaymentAmount: {
|
||||||
socialPayment: this.convertData(_.filter(data, it => it.title === "社保")),
|
socialPayment: convertData(_.filter(data, it => it.titleSign === "social")),
|
||||||
fundPayment: this.convertData(_.filter(data, it => it.title === "公积金")),
|
fundPayment: convertData(_.filter(data, it => it.titleSign === "fund")),
|
||||||
otherPayment: this.convertData(_.filter(data, it => it.title === "企业年金及其它福利"))
|
otherPayment: convertData(_.filter(data, it => it.titleSign === "other"))
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -348,6 +339,16 @@ class SupplementarySlide extends Component {
|
||||||
...baseInfo,
|
...baseInfo,
|
||||||
supplementType,
|
supplementType,
|
||||||
historyMonth: ""
|
historyMonth: ""
|
||||||
|
},
|
||||||
|
businessAccounting: {
|
||||||
|
socialSecurityBase: [],
|
||||||
|
fundBase: [],
|
||||||
|
otherBase: []
|
||||||
|
},
|
||||||
|
inputPaymentAmount: {
|
||||||
|
socialPayment: [],
|
||||||
|
fundPayment: [],
|
||||||
|
otherPayment: []
|
||||||
}
|
}
|
||||||
}, () => this.handleChangeItem());
|
}, () => this.handleChangeItem());
|
||||||
}
|
}
|
||||||
|
|
@ -431,3 +432,22 @@ export const SelectDetailType = payload => {
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const convertData = (dataSource) => {
|
||||||
|
let endList = [];
|
||||||
|
_.values(_.groupBy(dataSource, "insuranceName")).forEach((itemList) => {
|
||||||
|
let data = {};
|
||||||
|
itemList.forEach(d => {
|
||||||
|
const perKey = `${d.insuranceId}_per`, comKey = `${d.insuranceId}_com`;
|
||||||
|
data = _.assign(data, {
|
||||||
|
...d,
|
||||||
|
[perKey]: "",
|
||||||
|
[comKey]: "",
|
||||||
|
perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
|
||||||
|
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com")
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return endList.push(data);
|
||||||
|
});
|
||||||
|
return endList;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,56 @@
|
||||||
export const unArchiveTabs = [
|
|
||||||
{
|
|
||||||
title: "正常缴纳",
|
|
||||||
viewcondition: "NORMAL",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "异动清单",
|
|
||||||
viewcondition: "LIST",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "补缴",
|
|
||||||
viewcondition: "PAY",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "总览",
|
|
||||||
viewcondition: "OVERVIEW",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const archiveTabs = [
|
|
||||||
{
|
|
||||||
title: "正常缴纳",
|
|
||||||
viewcondition: "NORMAL",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "补缴",
|
|
||||||
viewcondition: "PAY",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "总览",
|
|
||||||
viewcondition: "OVERVIEW",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const regColumns = [
|
export const regColumns = [
|
||||||
{
|
{
|
||||||
title: '福利项',
|
title: "福利项",
|
||||||
dataIndex: 'benefits',
|
dataIndex: "benefits",
|
||||||
key: 'benefits',
|
key: "benefits"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '个人缴纳金额',
|
title: "个人缴纳金额",
|
||||||
dataIndex: 'personalPaymentAmount',
|
dataIndex: "personalPaymentAmount",
|
||||||
key: 'personalPaymentAmount',
|
key: "personalPaymentAmount"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '单位缴纳金额',
|
title: "单位缴纳金额",
|
||||||
dataIndex: 'companyPaymentAmount',
|
dataIndex: "companyPaymentAmount",
|
||||||
key: 'companyPaymentAmount',
|
key: "companyPaymentAmount"
|
||||||
},
|
}
|
||||||
|
];
|
||||||
|
export const addPersonConditions = [
|
||||||
|
{
|
||||||
|
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: 14,
|
||||||
|
label: "对象",
|
||||||
|
lanId: 106,
|
||||||
|
labelcol: 7,
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3,
|
||||||
|
value: ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: ""
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,12 @@ import * as API from "../apis/standingBook";
|
||||||
const { TableStore } = WeaTableNew;
|
const { TableStore } = WeaTableNew;
|
||||||
|
|
||||||
export class StandingBookStore {
|
export class StandingBookStore {
|
||||||
|
@observable accountForm = new WeaForm(); // 社保台账核算Form
|
||||||
|
@action initAccountForm = () => this.accountForm = new WeaForm();
|
||||||
|
@observable addCPForm = new WeaForm(); // 社保台账详情页面,添加补差人员form
|
||||||
|
@action initAddCPForm = () => this.addCPForm = 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
|
||||||
@observable ocForm = new WeaForm(); // 社保福利线下对比form
|
@observable ocForm = new WeaForm(); // 社保福利线下对比form
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export class LedgerStore {
|
||||||
//重构薪资账套
|
//重构薪资账套
|
||||||
@observable copyForm = new WeaForm(); // 复制form
|
@observable copyForm = new WeaForm(); // 复制form
|
||||||
@observable categoryForm = new WeaForm(); // 新增分类form
|
@observable categoryForm = new WeaForm(); // 新增分类form
|
||||||
|
@observable searchForm = new WeaForm(); // 查询form
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
|
||||||
|
|
@ -117,17 +117,10 @@ export const padding0 = (num, length) => {
|
||||||
}
|
}
|
||||||
return "0." + num;
|
return "0." + num;
|
||||||
};
|
};
|
||||||
export const toDecimal_n = (x, num) => {
|
export const toDecimal_n = (num, decimalPlaces) => {
|
||||||
if (isNaN(parseFloat(x))) return false;
|
if (num === null || !isFinite(num)) return null
|
||||||
let f = Math.round(x * 100) / 100;
|
if (decimalPlaces < 0) return null;
|
||||||
let s = f.toString();
|
const multiplier = Math.pow(10, decimalPlaces);
|
||||||
let rs = s.indexOf(".");
|
const roundedNum = Math.round(num * multiplier) / multiplier;
|
||||||
if (rs < 0) {
|
return roundedNum.toFixed(decimalPlaces);
|
||||||
rs = s.length;
|
|
||||||
s += ".";
|
|
||||||
}
|
|
||||||
while (s.length <= rs + num) {
|
|
||||||
s += "0";
|
|
||||||
}
|
|
||||||
return s;
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue