Merge branch 'release/2.15.1.2407.01-个税' into custom-艾志工业-合并个税
# Conflicts: # pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js # pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js # pc4mobx/hrmSalary/pages/declareDetail/index.js
This commit is contained in:
commit
4477d04fb1
|
|
@ -278,5 +278,23 @@ export const getCompareSobConfig = params => {
|
||||||
export const updateSobConfig = params => {
|
export const updateSobConfig = params => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params);
|
||||||
};
|
};
|
||||||
|
//薪资核算-计算个税
|
||||||
|
export const acctresultCalcTax = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTax", params);
|
||||||
|
};
|
||||||
|
//薪资核算-获取个税计算反馈
|
||||||
|
export const calcTaxFeedback = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTaxFeedback", params);
|
||||||
|
};
|
||||||
|
//薪资核算-人员异常
|
||||||
|
export const listPage4NotDeclare = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/listPage4NotDeclare", params);
|
||||||
|
};
|
||||||
|
// 核算结果--核算税后工资
|
||||||
|
export const afterTaxAccounting = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/afterTaxAccounting", params);
|
||||||
|
};
|
||||||
|
// 核算税后工资进度条
|
||||||
|
export const getAfterTaxAccountingProgress = (id) => {
|
||||||
|
return WeaTools.callApi("/api/bs/hrmsalary/progress/getRate?cacheKey=AFTER_TAX_ACCT_PROGRESS_" + id, "get", {});
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ export const employeedeclareExportTemplate = params => {
|
||||||
};
|
};
|
||||||
//个税申报表申报数据-下载申报内置算税结果
|
//个税申报表申报数据-下载申报内置算税结果
|
||||||
export const exportGetDeclareTaxResultFeedback = params => {
|
export const exportGetDeclareTaxResultFeedback = params => {
|
||||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetDeclareTaxResultFeedback", params);
|
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetCompanyIncomes", params);
|
||||||
};
|
};
|
||||||
//个税申报表申报数据-数据导入
|
//个税申报表申报数据-数据导入
|
||||||
export const taxdeclarationImportData = (params) => {
|
export const taxdeclarationImportData = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@ export const deleteLedger = params => {
|
||||||
export const getLedgerBasicForm = params => {
|
export const getLedgerBasicForm = params => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/basic/getForm", "get", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/basic/getForm", "get", params);
|
||||||
};
|
};
|
||||||
|
//薪资帐套基本信息工资类型接口
|
||||||
|
export const getIncomeCategoryList = params => {
|
||||||
|
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/incomeCategoryList", "get", params);
|
||||||
|
};
|
||||||
|
|
||||||
//保存薪资帐套基本信息
|
//保存薪资帐套基本信息
|
||||||
export const saveLedgerBasic = params => {
|
export const saveLedgerBasic = params => {
|
||||||
|
|
@ -143,6 +147,10 @@ export const getBackitemForm = params => {
|
||||||
export const taxreportruleGetForm = params => {
|
export const taxreportruleGetForm = params => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxreportrule/getForm", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxreportrule/getForm", "GET", params);
|
||||||
};
|
};
|
||||||
|
//薪资账套下的个税字段对应-个税字段对应
|
||||||
|
export const taxruleGetForm = params => {
|
||||||
|
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxrule/getForm", "GET", params);
|
||||||
|
};
|
||||||
//薪资账套下的个税申报-累计字段对应
|
//薪资账套下的个税申报-累计字段对应
|
||||||
export const addupruleGetForm = params => {
|
export const addupruleGetForm = params => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/adduprule/getForm", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/adduprule/getForm", "GET", params);
|
||||||
|
|
@ -151,6 +159,10 @@ export const addupruleGetForm = params => {
|
||||||
export const taxreportruleSave = params => {
|
export const taxreportruleSave = params => {
|
||||||
return postFetch("/api/bs/hrmsalary/salarysob/taxreportrule/save", params);
|
return postFetch("/api/bs/hrmsalary/salarysob/taxreportrule/save", params);
|
||||||
};
|
};
|
||||||
|
//保存薪资账套下的个税字段对应规则
|
||||||
|
export const taxruleSave = params => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/salarysob/taxrule/save", params);
|
||||||
|
};
|
||||||
//保存薪资账套下的累计字段对应关系
|
//保存薪资账套下的累计字段对应关系
|
||||||
export const addupruleSave = params => {
|
export const addupruleSave = params => {
|
||||||
return postFetch("/api/bs/hrmsalary/salarysob/adduprule/save", params);
|
return postFetch("/api/bs/hrmsalary/salarysob/adduprule/save", params);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { WeaTools } from "ecCom";
|
import { WeaTools } from "ecCom";
|
||||||
import { postFetch } from "../util/request";
|
import { postExportFetch, postFetch } from "../util/request";
|
||||||
import { convertToUrlString } from "../util/url";
|
import { convertToUrlString } from "../util/url";
|
||||||
|
|
||||||
//工资单-工资单发放列表
|
//工资单-工资单发放列表
|
||||||
|
|
@ -244,3 +244,12 @@ export const getSmsSalaryItemSet = (params) => {
|
||||||
export const genPdfBeforeExport = (params) => {
|
export const genPdfBeforeExport = (params) => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/genPdfBeforeExport", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/genPdfBeforeExport", "GET", params);
|
||||||
};
|
};
|
||||||
|
//工资单预览
|
||||||
|
export const salaryBillPreview = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/salaryBill/preview", params);
|
||||||
|
};
|
||||||
|
// 工资单查看详情导出-重构
|
||||||
|
export const exportDetailList_reconfig = (params) => {
|
||||||
|
return postExportFetch("/api/bs/hrmsalary/salaryBill/send/exportDetailList", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { WeaTools } from "ecCom";
|
import { WeaTools } from "ecCom";
|
||||||
import { postFetch } from "../util/request";
|
import { postExportFetch, postFetch } from "../util/request";
|
||||||
|
|
||||||
//通用字典表 {enumClass:""}
|
//通用字典表 {enumClass:""}
|
||||||
export const commonEnumList = (params) => {
|
export const commonEnumList = (params) => {
|
||||||
|
|
@ -75,3 +75,7 @@ export const reportGetForm = params => {
|
||||||
export const saveSalarySendFeedback = (params) => {
|
export const saveSalarySendFeedback = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
|
return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
|
||||||
};
|
};
|
||||||
|
// 数据分析列表导出
|
||||||
|
export const exportDataReport = (params) => {
|
||||||
|
return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportData", params);
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<WeaReqTop
|
||||||
|
title={getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||||
|
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<WeaTop title={getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||||
|
iconBgcolor="#F14A2D" {...this.props}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -5,9 +5,11 @@
|
||||||
* Date: 2023/9/5
|
* Date: 2023/9/5
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import { postFetch } from "../../../util/request";
|
import { postFetch } from "../../../util/request";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
class ImpStep2 extends Component {
|
class ImpStep2 extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -41,9 +43,15 @@ class ImpStep2 extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { dataSource, columns, loading } = this.state;
|
const { dataSource, columns, loading } = this.state;
|
||||||
const { scrollHeight } = this.props;
|
const { scrollHeight } = this.props;
|
||||||
|
const pagination = {
|
||||||
|
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`,
|
||||||
|
total: dataSource.length,
|
||||||
|
showSizeChanger: true
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<WeaTable
|
<WeaTable
|
||||||
dataSource={dataSource} columns={columns} loading={loading} scroll={{ x: 800, y: `${scrollHeight}px` }}
|
dataSource={dataSource} columns={columns} loading={loading} scroll={{ x: 800, y: `${scrollHeight}px` }}
|
||||||
|
pagination={pagination}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页
|
||||||
// import Payroll from "./pages/payroll";
|
// import Payroll from "./pages/payroll";
|
||||||
import Payroll from "./pages/payrollRelease"; //重构的工资单发放页面
|
import Payroll from "./pages/payrollRelease"; //重构的工资单发放页面
|
||||||
import PayrollGrant from "./pages/payroll/payrollGrant";
|
import PayrollGrant from "./pages/payroll/payrollGrant";
|
||||||
import PayrollDetail from "./pages/payroll/payrollDetail";
|
import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
|
||||||
// import Declare from "./pages/declare";
|
// import Declare from "./pages/declare";
|
||||||
import DeclareDetail from "./pages/declareDetail";
|
import DeclareDetail from "./pages/declareDetail";
|
||||||
import DeclareOnlineComparison from "./pages/declareOnlineComparison";
|
import DeclareOnlineComparison from "./pages/declareOnlineComparison";
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class Index extends Component {
|
||||||
effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "",
|
effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "",
|
||||||
operateTime: operateTime1 ? `${operateTime1},${operateTime2}` : ""
|
operateTime: operateTime1 ? `${operateTime1},${operateTime2}` : ""
|
||||||
};
|
};
|
||||||
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_target");
|
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_blank");
|
||||||
this.handleDebounce = null;
|
this.handleDebounce = null;
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class SalaryDetails extends Component {
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
pageInfo: { ...this.state.pageInfo, current: 1 }, updateSum: true
|
||||||
}, () => this.getSalaryList(nextProps));
|
}, () => this.getSalaryList(nextProps));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ class SalaryDetails extends Component {
|
||||||
const { pageNum: current, size: pageSize } = params;
|
const { pageNum: current, size: pageSize } = params;
|
||||||
this.setState({
|
this.setState({
|
||||||
pageInfo: { ...pageInfo, current, pageSize },
|
pageInfo: { ...pageInfo, current, pageSize },
|
||||||
updateSum: true
|
updateSum: false
|
||||||
}, () => this.getSalaryList(this.props));
|
}, () => this.getSalaryList(this.props));
|
||||||
} else if (id === "CHECKBOX") {
|
} else if (id === "CHECKBOX") {
|
||||||
const { selectedRowKeys: checkBox } = params;
|
const { selectedRowKeys: checkBox } = params;
|
||||||
|
|
@ -99,13 +99,17 @@ class SalaryDetails extends Component {
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
handleExportSalaryList = (key) => {
|
handleExportSalaryList = (key) => {
|
||||||
|
const { attendanceStore: { tableStore } } = this.props;
|
||||||
let { selectedRowKeys, payload } = this.state;
|
let { selectedRowKeys, payload } = this.state;
|
||||||
if (key === "SELECTED" && selectedRowKeys.length === 0) {
|
if (key === "SELECTED" && selectedRowKeys.length === 0) {
|
||||||
message.warning(getLabel(543345, "请选择需要导出的数据!"));
|
message.warning(getLabel(543345, "请选择需要导出的数据!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WeaLoadingGlobal.start();
|
WeaLoadingGlobal.start();
|
||||||
const promise = API.exportSalaryList({ ...payload, ids: key === "SELECTED" ? selectedRowKeys : [] });
|
const promise = API.exportSalaryList({
|
||||||
|
...payload, ids: key === "SELECTED" ? selectedRowKeys : [],
|
||||||
|
columns: _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"), o => o.dataIndex)
|
||||||
|
});
|
||||||
};
|
};
|
||||||
getColumns = () => {
|
getColumns = () => {
|
||||||
const { attendanceStore: { tableStore } } = this.props;
|
const { attendanceStore: { tableStore } } = this.props;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* Date: 2023/9/25
|
* Date: 2023/9/25
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
import { WeaBrowser, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||||
import cs from "classnames";
|
import cs from "classnames";
|
||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
@ -13,6 +13,48 @@ import "./index.less";
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class EditSalaryBaseInfo extends Component {
|
class EditSalaryBaseInfo extends Component {
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (this.props.visible !== nextProps.visible && nextProps.visible && !_.isEmpty(nextProps.baseInfo)) {
|
||||||
|
nextProps.onChange(_.map(nextProps.baseInfo, it => {
|
||||||
|
const { fieldValue, canEdit, fieldValueObj } = it;
|
||||||
|
if (canEdit) {
|
||||||
|
const { id: value, name: valueSpan } = fieldValueObj || fieldValue;
|
||||||
|
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
|
||||||
|
}
|
||||||
|
return { ...it };
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
renderBrowser = (item) => {
|
||||||
|
const { fieldType, fieldValue, fieldCode } = item;
|
||||||
|
const { id: value, name: valueSpan } = fieldValue;
|
||||||
|
let browserType = {};
|
||||||
|
switch (fieldType) {
|
||||||
|
case "subcompanyBrowser":
|
||||||
|
browserType = { ...browserType, type: 164, title: getLabel(111, "选择分部") };
|
||||||
|
break;
|
||||||
|
case "departmentBrowser":
|
||||||
|
browserType = { ...browserType, type: 4, title: getLabel(111, "选择部门") };
|
||||||
|
break;
|
||||||
|
case "jobtitleBrowser":
|
||||||
|
browserType = { ...browserType, type: 24, title: getLabel(111, "选择岗位") };
|
||||||
|
break;
|
||||||
|
case "jobcallBrowser":
|
||||||
|
browserType = { ...browserType, type: 260, title: getLabel(111, "选择职称") };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return <WeaBrowser {...browserType} viewAttr={3} value={value} valueSpan={valueSpan} inputStyle={{ width: 200 }}
|
||||||
|
onChange={(value, valueSpan) => this.props.onChange(_.map(this.props.baseInfo, it => {
|
||||||
|
if (fieldCode === it.fieldCode) {
|
||||||
|
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
|
||||||
|
}
|
||||||
|
return { ...it };
|
||||||
|
}))}/>;
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { baseInfo } = this.props;
|
const { baseInfo } = this.props;
|
||||||
return (
|
return (
|
||||||
|
|
@ -32,7 +74,7 @@ class EditSalaryBaseInfo extends Component {
|
||||||
<Row type="flex" className="esf-form-content">
|
<Row type="flex" className="esf-form-content">
|
||||||
{
|
{
|
||||||
_.map(baseInfo, (item, index) => {
|
_.map(baseInfo, (item, index) => {
|
||||||
const { fieldName, fieldValue } = item;
|
const { fieldName, fieldType, fieldValue, fieldValueObj } = item;
|
||||||
return (
|
return (
|
||||||
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 24 : 12}>
|
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 24 : 12}>
|
||||||
<Row className={cs("esf-form-item", {
|
<Row className={cs("esf-form-item", {
|
||||||
|
|
@ -43,7 +85,13 @@ class EditSalaryBaseInfo extends Component {
|
||||||
<span className="label" title={fieldName}>{fieldName}</span>
|
<span className="label" title={fieldName}>{fieldName}</span>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 21 : 18}>
|
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 21 : 18}>
|
||||||
<span className="value" title={fieldValue}>{fieldValue}</span>
|
<span className="value" title={fieldValue}>
|
||||||
|
{
|
||||||
|
fieldType.indexOf("Browser") !== -1 ?
|
||||||
|
this.renderBrowser({ ...item, fieldValue: fieldValueObj || fieldValue }) :
|
||||||
|
fieldValue
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* Date: 2023/9/25
|
* Date: 2023/9/25
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Button, message } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import { WeaLocaleProvider, WeaSlideModal, WeaTab } from "ecCom";
|
import { WeaLocaleProvider, WeaSlideModal, WeaTab } from "ecCom";
|
||||||
import EditSalaryBaseInfo from "./baseInfo";
|
import EditSalaryBaseInfo from "./baseInfo";
|
||||||
import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
|
import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
|
||||||
|
|
@ -87,9 +87,16 @@ class EditSalaryCalcSlide extends Component {
|
||||||
};
|
};
|
||||||
save = () => {
|
save = () => {
|
||||||
const { id: salaryAcctEmpId } = this.props;
|
const { id: salaryAcctEmpId } = this.props;
|
||||||
const { issuedAndReissueItems, itemsByGroup } = this.state;
|
const { issuedAndReissueItems, itemsByGroup, baseInfo } = this.state;
|
||||||
|
if (_.every(baseInfo, it => !it.canEdit || (it.canEdit && !it.fieldValue))) {
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
const payload = {
|
const payload = {
|
||||||
salaryAcctEmpId,
|
salaryAcctEmpId, employeeInfos: baseInfo,
|
||||||
items: [
|
items: [
|
||||||
..._.reduce(itemsByGroup, (pre, cur) => {
|
..._.reduce(itemsByGroup, (pre, cur) => {
|
||||||
return [
|
return [
|
||||||
|
|
@ -133,7 +140,8 @@ class EditSalaryCalcSlide extends Component {
|
||||||
top={0} width={60} height={100} measure={"%"}
|
top={0} width={60} height={100} measure={"%"}
|
||||||
direction={"right"} title={this.renderTitle()}
|
direction={"right"} title={this.renderTitle()}
|
||||||
content={<div className="salary-calculate-esf-area">
|
content={<div className="salary-calculate-esf-area">
|
||||||
<EditSalaryBaseInfo baseInfo={baseInfo}/>
|
<EditSalaryBaseInfo {...this.props} baseInfo={baseInfo}
|
||||||
|
onChange={baseInfo => this.setState({ baseInfo })}/>
|
||||||
<WeaTab keyParam="viewcondition" className="calc-esf-tab"
|
<WeaTab keyParam="viewcondition" className="calc-esf-tab"
|
||||||
selectedKey={selectedKey} onChange={v => this.setState({ selectedKey: v })}
|
selectedKey={selectedKey} onChange={v => this.setState({ selectedKey: v })}
|
||||||
datas={!_.isEmpty(issuedAndReissueItems) ? topTab : topTab.slice(0, 1)}
|
datas={!_.isEmpty(issuedAndReissueItems) ? topTab : topTab.slice(0, 1)}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
|
||||||
import EditCalcTable from "./editCalcTable";
|
import EditCalcTable from "./editCalcTable";
|
||||||
import SalaryMonthTip from "../salaryMonthTip";
|
import SalaryMonthTip from "../salaryMonthTip";
|
||||||
import SalaryCalcLayout from "./salaryCalcLayout";
|
import SalaryCalcLayout from "./salaryCalcLayout";
|
||||||
|
import PersonAbnormalDialog from "./personAbnormalDialog";
|
||||||
import cs from "classnames";
|
import cs from "classnames";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -22,7 +23,8 @@ class Index extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
salarySobCycle: {}, showSearchAd: false,
|
salarySobCycle: {}, showSearchAd: false,
|
||||||
columnDesc: {}, formulaTd: "", showTotalCell: false
|
columnDesc: {}, formulaTd: "", showTotalCell: false,
|
||||||
|
perAbnormalDialog: { visible: false, salaryAcctRecordId: "" }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,7 +52,7 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
|
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell, perAbnormalDialog } = this.state;
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
|
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
|
||||||
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
|
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
|
||||||
|
|
@ -65,7 +67,13 @@ class Index extends Component {
|
||||||
style={{ marginLeft: 10 }}
|
style={{ marginLeft: 10 }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
<div>
|
||||||
|
<div className="abnormal-text"
|
||||||
|
onClick={() => this.setState({
|
||||||
|
perAbnormalDialog: { visible: true, salaryAcctRecordId }
|
||||||
|
})}>{getLabel(111, "未报送人员")}:{salarySobCycle.abnormalEmployeeNum}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="salary-flex-between formula-detail-area">
|
<div className="salary-flex-between formula-detail-area">
|
||||||
<div className="formula-detail">
|
<div className="formula-detail">
|
||||||
|
|
@ -87,6 +95,10 @@ class Index extends Component {
|
||||||
<EditCalcTable ref={dom => this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
|
<EditCalcTable ref={dom => this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
|
||||||
{...this.props} showTotalCell={showTotalCell}
|
{...this.props} showTotalCell={showTotalCell}
|
||||||
onShowFormulaTd={this.handleShowFormulaTa}/>
|
onShowFormulaTd={this.handleShowFormulaTa}/>
|
||||||
|
<PersonAbnormalDialog {...perAbnormalDialog}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
perAbnormalDialog: { ...perAbnormalDialog, visible: false }
|
||||||
|
})}/>
|
||||||
</div>
|
</div>
|
||||||
</SalaryCalcLayout>);
|
</SalaryCalcLayout>);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.abnormal-text {
|
||||||
|
color: #ef9502;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.formula-detail-area {
|
.formula-detail-area {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资核算-人员异常
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/8/18
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
|
import { listPage4NotDeclare } from "../../../../../apis/calculate";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
class PersonAbnormalDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
loading: false, columns: [], dataSource: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.queryList(nextProps);
|
||||||
|
}
|
||||||
|
|
||||||
|
queryList = (props) => {
|
||||||
|
const { salaryAcctRecordId } = props, { pageInfo } = this.state;
|
||||||
|
const payload = { ...pageInfo, recordId: salaryAcctRecordId };
|
||||||
|
this.setState({ loading: true });
|
||||||
|
listPage4NotDeclare(payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||||
|
this.setState({
|
||||||
|
dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, columns
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { loading, columns, dataSource, pageInfo } = 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.queryList(this.props));
|
||||||
|
},
|
||||||
|
onChange: current => {
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current }
|
||||||
|
}, () => this.queryList(this.props));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props}
|
||||||
|
scalable hasScroll className="declareResultDialog" initLoadCss
|
||||||
|
title={getLabel(111, "未报送人员")}
|
||||||
|
style={{
|
||||||
|
width: 1150, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||||
|
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="declareResultDialogContent">
|
||||||
|
<WeaTable
|
||||||
|
columns={columns} dataSource={dataSource}
|
||||||
|
loading={loading} className="declareTable"
|
||||||
|
pagination={pagination}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PersonAbnormalDialog;
|
||||||
|
|
@ -9,7 +9,7 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import Layout from "./layout";
|
import Layout from "./layout";
|
||||||
import { acctresultAccounting, getCalculateProgress, getExportField } from "../../../apis/calculate";
|
import * as API from "../../../apis/calculate";
|
||||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||||
import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
|
import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
|
||||||
import SalaryEditCalc from "./components/salaryEditCalc";
|
import SalaryEditCalc from "./components/salaryEditCalc";
|
||||||
|
|
@ -27,7 +27,7 @@ class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedKey: "person", progressVisible: false, progress: 0,
|
selectedKey: "person", progressVisible: false, progress: 0, loading: { calcTax: false, feedback: false },
|
||||||
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
|
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
|
||||||
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
|
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
|
||||||
accountExceptInfo: "" //核算报错信息,
|
accountExceptInfo: "" //核算报错信息,
|
||||||
|
|
@ -60,11 +60,11 @@ class Index extends Component {
|
||||||
this.setState({ progress: 0 });
|
this.setState({ progress: 0 });
|
||||||
let payload = { salaryAcctRecordId };
|
let payload = { salaryAcctRecordId };
|
||||||
if (key === "calc_selected") payload = _.assign(payload, { ids: selectedRowKeys });
|
if (key === "calc_selected") payload = _.assign(payload, { ids: selectedRowKeys });
|
||||||
acctresultAccounting(payload).then(() => {
|
API.acctresultAccounting(payload).then(() => {
|
||||||
this.setState({ progressVisible: true });
|
this.setState({ progressVisible: true });
|
||||||
if (this.timer) clearInterval(this.timer);
|
if (this.timer) clearInterval(this.timer);
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
|
API.getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
|
||||||
let progress = data.progress;
|
let progress = data.progress;
|
||||||
if (progress === 1 && this.timer) {
|
if (progress === 1 && this.timer) {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
|
|
@ -101,7 +101,7 @@ class Index extends Component {
|
||||||
window.open(`${window.ecologyContentPath || ""}${url}`, "_blank");
|
window.open(`${window.ecologyContentPath || ""}${url}`, "_blank");
|
||||||
break;
|
break;
|
||||||
case "export_custom":
|
case "export_custom":
|
||||||
getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
|
API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const { checkItems, itemsByGroup } = data;
|
const { checkItems, itemsByGroup } = data;
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
@ -129,8 +129,71 @@ class Index extends Component {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
acctresultCalcTax = () => {
|
||||||
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
|
this.setState({ loading: { ...this.state.loading, calcTax: true } });
|
||||||
|
API.acctresultCalcTax({ salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: { ...this.state.loading, calcTax: false } });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(111, "操作成功!"));
|
||||||
|
this.calc.onAdSearch(false);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: { ...this.state.loading, calcTax: false } }));
|
||||||
|
};
|
||||||
|
calcTaxFeedback = () => {
|
||||||
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
|
this.setState({ loading: { ...this.state.loading, feedback: true } });
|
||||||
|
API.calcTaxFeedback({ salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: { ...this.state.loading, feedback: false } });
|
||||||
|
if (status) {
|
||||||
|
this.calc.onAdSearch(false);
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(111, "成功获取个税信息,是否继续计算税后工资?"),
|
||||||
|
onOk: () => this.afterTaxAccounting()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: { ...this.state.loading, feedback: false } }));
|
||||||
|
};
|
||||||
|
afterTaxAccounting = () => {
|
||||||
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
|
this.setState({ progress: 0 });
|
||||||
|
let payload = { salaryAcctRecordId };
|
||||||
|
API.afterTaxAccounting(payload).then(() => {
|
||||||
|
this.setState({ progressVisible: true });
|
||||||
|
if (this.timer) clearInterval(this.timer);
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
API.getAfterTaxAccountingProgress(salaryAcctRecordId).then(({ data }) => {
|
||||||
|
let progress = data.progress;
|
||||||
|
if (progress === 1 && this.timer) {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null;
|
||||||
|
this.setState({
|
||||||
|
progressVisible: false,
|
||||||
|
accountExceptInfo: data.message
|
||||||
|
});
|
||||||
|
message.success(getLabel(111, "操作完成"));
|
||||||
|
this.calc.onAdSearch(false);
|
||||||
|
} else if (!data.status) {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null;
|
||||||
|
this.setState({
|
||||||
|
progressVisible: false,
|
||||||
|
accountExceptInfo: data.message
|
||||||
|
});
|
||||||
|
message.error(data.message);
|
||||||
|
}
|
||||||
|
this.setState({ progress: Number(progress) * 100 });
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
};
|
||||||
renderReqBtns = () => {
|
renderReqBtns = () => {
|
||||||
const { selectedKey, accountExceptInfo } = this.state;
|
const { selectedKey, accountExceptInfo, loading } = this.state;
|
||||||
let reqBtns = [];
|
let reqBtns = [];
|
||||||
switch (selectedKey) {
|
switch (selectedKey) {
|
||||||
case "calc":
|
case "calc":
|
||||||
|
|
@ -151,6 +214,10 @@ class Index extends Component {
|
||||||
<Dropdown.Button onClick={() => this.doCacl("ALL")} overlay={menu} type="primary">
|
<Dropdown.Button onClick={() => this.doCacl("ALL")} overlay={menu} type="primary">
|
||||||
{getLabel(543545, "核算所有人")}
|
{getLabel(543545, "核算所有人")}
|
||||||
</Dropdown.Button>,
|
</Dropdown.Button>,
|
||||||
|
<Button type="ghost" onClick={this.acctresultCalcTax}
|
||||||
|
loading={loading.calcTax}>{getLabel(111, "在线算税")}</Button>,
|
||||||
|
<Button type="ghost" loading={loading.feedback}
|
||||||
|
onClick={this.calcTaxFeedback}>{getLabel(111, "获取算税结果")}</Button>,
|
||||||
<Dropdown overlay={moreMenu}><Button type="ghost">{getLabel(17499, "更多")}</Button></Dropdown>,
|
<Dropdown overlay={moreMenu}><Button type="ghost">{getLabel(17499, "更多")}</Button></Dropdown>,
|
||||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
||||||
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
|
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class PayrollItemsTable extends Component {
|
||||||
const { canEdit, dataType, pattern } = record;
|
const { canEdit, dataType, pattern } = record;
|
||||||
return dataType === "number" ? <WeaInputNumber
|
return dataType === "number" ? <WeaInputNumber
|
||||||
disabled={!canEdit}
|
disabled={!canEdit}
|
||||||
precision={pattern || 2}
|
precision={!_.isNil(pattern) ? pattern : 0}
|
||||||
value={text || 0}
|
value={text || 0}
|
||||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
|
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
|
||||||
/> : <WeaInput
|
/> : <WeaInput
|
||||||
|
|
|
||||||
|
|
@ -530,7 +530,7 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
|
const { taxAgentStore: { showOperateBtn, taxAgentOption }, cumSituationStore: { form } } = this.props;
|
||||||
const {
|
const {
|
||||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||||
importPayload, year, exportPayloadType, cumTaxPeriodDialog, targetid
|
importPayload, year, exportPayloadType, cumTaxPeriodDialog, targetid
|
||||||
|
|
@ -549,7 +549,7 @@ class Index extends Component {
|
||||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||||
>
|
>
|
||||||
<SalaryCumDeductChooseTaxPeriodDialog
|
<SalaryCumDeductChooseTaxPeriodDialog
|
||||||
{...cumTaxPeriodDialog}
|
{...cumTaxPeriodDialog} taxAgentOption={taxAgentOption}
|
||||||
onCancel={() => this.setState({
|
onCancel={() => this.setState({
|
||||||
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
|
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,18 @@ export const paymentBankConditions = [
|
||||||
value: "",
|
value: "",
|
||||||
viewAttr: 1,
|
viewAttr: 1,
|
||||||
options: []
|
options: []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["paymentNumber"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "缴款帐号",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1,
|
||||||
|
options: []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
defaultshow: true
|
defaultshow: true
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,12 @@ class PaymentBtn extends Component {
|
||||||
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
|
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
|
||||||
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.khhhh }))
|
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.khhhh }))
|
||||||
};
|
};
|
||||||
|
} else if (key === "paymentNumber") {
|
||||||
|
return {
|
||||||
|
...it,
|
||||||
|
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
|
||||||
|
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.jkzh }))
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return { ...it };
|
return { ...it };
|
||||||
})
|
})
|
||||||
|
|
@ -176,15 +182,16 @@ class PaymentBtn extends Component {
|
||||||
taxPaymentAgreemenPay = () => {
|
taxPaymentAgreemenPay = () => {
|
||||||
const { paymentDialog } = this.state;
|
const { paymentDialog } = this.state;
|
||||||
const { taxAmount } = paymentDialog;
|
const { taxAmount } = paymentDialog;
|
||||||
const { declareStore: { paymentForm } } = this.props;
|
const { declareStore: { paymentForm }, reportType } = this.props;
|
||||||
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||||
paymentForm.validateForm().then(f => {
|
paymentForm.validateForm().then(f => {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const { protocolNumber } = paymentForm.getFormParams();
|
const { protocolNumber, paymentNumber } = paymentForm.getFormDatas();
|
||||||
const payload = {
|
const payload = {
|
||||||
taxDeclareRecordId: getQueryString("id"),
|
taxDeclareRecordId: getQueryString("id"),
|
||||||
taxYearMonth: taxYearMonth + "-01",
|
taxYearMonth: taxYearMonth + "-01",
|
||||||
taxAgentId, taxAmount, protocolNumber
|
taxAgentId, taxAmount, protocolNumber: protocolNumber.value,
|
||||||
|
reportType, paymentNumber: paymentNumber.valueSpan
|
||||||
};
|
};
|
||||||
this.setState({
|
this.setState({
|
||||||
paymentDialog: {
|
paymentDialog: {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ class PaymentDialog extends Component {
|
||||||
if (key === "protocolNumber") {
|
if (key === "protocolNumber") {
|
||||||
const { declareStore: { paymentForm } } = this.props;
|
const { declareStore: { paymentForm } } = this.props;
|
||||||
paymentForm.updateFields({
|
paymentForm.updateFields({
|
||||||
count: val[key].value
|
count: val[key].value,
|
||||||
|
paymentNumber: val[key].value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,9 @@ class PaymentFeedbackBtn extends Component {
|
||||||
const { paymentDialog, paymentFeedbackDialog } = this.state;
|
const { paymentDialog, paymentFeedbackDialog } = this.state;
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Button type="ghost" onClick={this.handlePaymentFeedback}>{getLabel(111, "缴款反馈")}</Button>
|
{/*个税接口改造*/}
|
||||||
|
{/*<Button type="ghost" onClick={this.handlePaymentFeedback}>{getLabel(111, "缴款反馈")}</Button>*/}
|
||||||
|
<Button type="ghost" onClick={this.taxPaymentAgreementPayFeedback}>{getLabel(111, "缴款反馈")}</Button>
|
||||||
<PaymentDialog
|
<PaymentDialog
|
||||||
{...paymentDialog}
|
{...paymentDialog}
|
||||||
onCancel={this.handleCancel}
|
onCancel={this.handleCancel}
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
onlineComparison = () => {
|
onlineComparison = () => {
|
||||||
const [__, taxDeclarationId] = this.state.selectedKey.split("%%");
|
const [__, taxDeclarationId] = this.state.selectedKey.split("%%");
|
||||||
window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail/${taxDeclarationId}`, "_target");
|
window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail/${taxDeclarationId}`, "_blank");
|
||||||
};
|
};
|
||||||
handleTabEdit = (tabKey, type) => {
|
handleTabEdit = (tabKey, type) => {
|
||||||
if (type === "remove") {
|
if (type === "remove") {
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,8 @@ class Index extends Component {
|
||||||
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
|
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
|
||||||
"操作": getLabel(30585, "操作"), "删除": getLabel(535052, "删除"),
|
"操作": getLabel(30585, "操作"), "删除": getLabel(535052, "删除"),
|
||||||
"共": getLabel(83698, "共"), "条": getLabel(18256, "条"),
|
"共": getLabel(83698, "共"), "条": getLabel(18256, "条"),
|
||||||
"加载中": getLabel(83698, "加载中"), "作废": getLabel(111, "作废")
|
"加载中": getLabel(83698, "加载中")
|
||||||
|
// "作废": getLabel(111, "作废")
|
||||||
};
|
};
|
||||||
const childFrameObj = document.getElementById("atdTable");
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* 个税字段对应
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2024/6/17
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||||
|
import LedgerFieldsItemPopver from "./ledgerFieldsItemPopver";
|
||||||
|
import { taxruleGetForm } from "../../../apis/ledger";
|
||||||
|
import LedgerFieldsTable from "./ledgerFieldsTable";
|
||||||
|
import uuidV4 from "uuid/v4";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
class IncomeTaxFields extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
selectedKey: "", tabs: [],
|
||||||
|
incomeTaxFields: [], keywords: ""
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.taxruleGetForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
taxruleGetForm = () => {
|
||||||
|
const { editId, saveSalarySobId } = this.props;
|
||||||
|
taxruleGetForm({ id: editId || saveSalarySobId }).then(({ status, data }) => {
|
||||||
|
if (status && !_.isEmpty(data)) {
|
||||||
|
this.setState({
|
||||||
|
tabs: _.map(data, it => ({ viewcondition: it.incomeCategoryId, title: it.incomeCategoryName })),
|
||||||
|
selectedKey: _.take(data)[0].incomeCategoryId,
|
||||||
|
incomeTaxFields: _.map(data, it => ({
|
||||||
|
...it, taxReportRules: _.map(it.taxRules, o => ({
|
||||||
|
...o, canEdit: o.canEdit, id: uuidV4(), reportColumnDataIndex: o.taxIndex, reportColumnName: o.name,
|
||||||
|
salaryItem: [{ id: o.salaryItemId, name: o.salaryItemName }]
|
||||||
|
}))
|
||||||
|
}))
|
||||||
|
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleChangeSwitch = (visible, id) => {
|
||||||
|
const { incomeTaxFields, selectedKey } = this.state;
|
||||||
|
this.setState({
|
||||||
|
incomeTaxFields: _.map(incomeTaxFields, it => {
|
||||||
|
if (it.incomeCategoryId === selectedKey) {
|
||||||
|
return {
|
||||||
|
...it,
|
||||||
|
taxReportRules: _.map(it.taxReportRules, child => {
|
||||||
|
if (child.id === id) {
|
||||||
|
return { ...child, visible };
|
||||||
|
}
|
||||||
|
return { ...child, visible: false };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...it };
|
||||||
|
})
|
||||||
|
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
|
||||||
|
};
|
||||||
|
handleChangeIncomeFieldsItem = (salaryItem, recordRuleId) => {
|
||||||
|
const { incomeTaxFields, selectedKey } = this.state;
|
||||||
|
this.setState({
|
||||||
|
incomeTaxFields: _.map(incomeTaxFields, it => {
|
||||||
|
if (it.incomeCategoryId === selectedKey) {
|
||||||
|
return {
|
||||||
|
...it,
|
||||||
|
taxReportRules: _.map(it.taxReportRules, child => {
|
||||||
|
if (child.id === recordRuleId) {
|
||||||
|
return { ...child, visible: false, salaryItem };
|
||||||
|
}
|
||||||
|
return { ...child, visible: false };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...it };
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { editId, saveSalarySobId } = this.props;
|
||||||
|
const { selectedKey, tabs, incomeTaxFields, keywords } = this.state;
|
||||||
|
const list = _.map(incomeTaxFields, it => {
|
||||||
|
if (it.incomeCategoryId === selectedKey) {
|
||||||
|
return {
|
||||||
|
...it,
|
||||||
|
taxReportRules: _.filter(it.taxReportRules, item => item.reportColumnName.indexOf(keywords) !== -1)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...it };
|
||||||
|
});
|
||||||
|
const dataSource = _.takeWhile(list, it => it.incomeCategoryId === selectedKey);
|
||||||
|
return (
|
||||||
|
<WeaSearchGroup
|
||||||
|
className="incomeWrapper" showGroup needTigger={false}
|
||||||
|
title={
|
||||||
|
<div className="incomeTitleContail">
|
||||||
|
<WeaTab
|
||||||
|
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey}
|
||||||
|
searchType={["base"]} searchsBasePlaceHolder={getLabel(111, "请输入对象")}
|
||||||
|
onSearch={val => this.setState({ keywords: val })}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<LedgerFieldsTable
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: <span>
|
||||||
|
<span style={{ marginRight: 8 }}>{getLabel(111, "个税申报表字段")}</span>
|
||||||
|
{/*<WeaHelpfulTip*/}
|
||||||
|
{/* title={getLabel(111, "若【个税申报表字段】与【对应本账套薪资项目】对应,则申报表内数据为当前账套核算数据,若【个税申报表字段】未与【对应本账套薪资项目】对应,则申报表内数据默认显示为0")}*/}
|
||||||
|
{/* placement="top" width={250}*/}
|
||||||
|
{/*/>*/}
|
||||||
|
</span>,
|
||||||
|
width: "50%",
|
||||||
|
dataIndex: "reportColumnName"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: getLabel(111, "对应本账套薪资项目"),
|
||||||
|
width: "50%",
|
||||||
|
dataIndex: "salaryItem",
|
||||||
|
render: (_, record) => (
|
||||||
|
<LedgerFieldsItemPopver salarySobId={editId || saveSalarySobId} record={record}
|
||||||
|
onChangeSwitch={this.handleChangeSwitch}
|
||||||
|
onChange={this.handleChangeIncomeFieldsItem}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
dataSource={dataSource}
|
||||||
|
/>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default IncomeTaxFields;
|
||||||
|
|
@ -9,7 +9,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ledgerSlideContent {
|
.ledgerSlideLayout {
|
||||||
|
.wea-new-top {
|
||||||
|
.ant-col-10 {
|
||||||
|
padding-right: 45px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
||||||
|
right: 45px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ledgerSlideContent {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.copyWrapper {
|
.copyWrapper {
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
* Date: 2022/12/9
|
* Date: 2022/12/9
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
|
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom";
|
||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { baseSettingFormItem } from "../config";
|
import { baseSettingFormItem } from "../config";
|
||||||
import { getLedgerBasicForm } from "../../../apis/ledger";
|
import { getIncomeCategoryList, getLedgerBasicForm } from "../../../apis/ledger";
|
||||||
import {
|
import {
|
||||||
generateBasicInfo,
|
generateBasicInfo,
|
||||||
getAddMonthYearMonth,
|
getAddMonthYearMonth,
|
||||||
|
|
@ -18,10 +18,12 @@ import {
|
||||||
getSubtractMonthYearMonth,
|
getSubtractMonthYearMonth,
|
||||||
prefixAddZero
|
prefixAddZero
|
||||||
} from "../../../util/date";
|
} from "../../../util/date";
|
||||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
import cs from "classnames";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
@inject("taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
class LedgerBaseSetting extends Component {
|
class LedgerBaseSetting extends Component {
|
||||||
|
|
@ -124,10 +126,7 @@ class LedgerBaseSetting extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
commonEenumList = () => {
|
commonEenumList = () => {
|
||||||
const payload = {
|
getIncomeCategoryList().then(({ status, data }) => {
|
||||||
enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum"
|
|
||||||
};
|
|
||||||
commonEnumList(payload).then(({ status, data }) => {
|
|
||||||
if (status) {
|
if (status) {
|
||||||
const { baseForm } = this.state;
|
const { baseForm } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
@ -135,7 +134,16 @@ class LedgerBaseSetting extends Component {
|
||||||
if (it.key === "taxableItems") {
|
if (it.key === "taxableItems") {
|
||||||
return {
|
return {
|
||||||
...it,
|
...it,
|
||||||
options: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
|
options: _.map(data, it => ({
|
||||||
|
key: it.value.toString(),
|
||||||
|
showname: <div className="reportTypeName-box">
|
||||||
|
<span>{it.defaultLabel}</span>
|
||||||
|
<span
|
||||||
|
className={cs("reportTypeName", { "danger": it.reportTypeName === getLabel(111, "非居民所得") })}>
|
||||||
|
{it.reportTypeName}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
}))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return { ...it };
|
return { ...it };
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import LedgerSalaryItemEditSlide from "./ledgerSalaryItemEditSlide";
|
||||||
import { getSalaryItemForm } from "../../../apis/ledger";
|
import { getSalaryItemForm } from "../../../apis/ledger";
|
||||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||||
import FormalFormModal from "../../salaryItem/formalFormModal";
|
import FormalFormModal from "../../salaryItem/formalFormModal";
|
||||||
|
import { toDecimal_n } from "../../../util";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -88,7 +89,7 @@ class LedgerSalaryItemTable extends Component {
|
||||||
handleEditSalaryItem = async (record) => {
|
handleEditSalaryItem = async (record) => {
|
||||||
const { salarySobId, dataSource } = this.props, { salaryItemId, id } = record;
|
const { salarySobId, dataSource } = this.props, { salaryItemId, id } = record;
|
||||||
const {
|
const {
|
||||||
itemHide: hideDefault,
|
itemHide: hideDefault, defaultValue,
|
||||||
valueType, name, description,
|
valueType, name, description,
|
||||||
roundingMode, formulaId, dataType, useInEmployeeSalary,
|
roundingMode, formulaId, dataType, useInEmployeeSalary,
|
||||||
pattern, canEdit, formulaContent, originFormulaContent, originSqlContent
|
pattern, canEdit, formulaContent, originFormulaContent, originSqlContent
|
||||||
|
|
@ -123,7 +124,7 @@ class LedgerSalaryItemTable extends Component {
|
||||||
...this.state.salaryItemPayload,
|
...this.state.salaryItemPayload,
|
||||||
visible: true,
|
visible: true,
|
||||||
request: {
|
request: {
|
||||||
canEdit, dataType, description,
|
canEdit, dataType, description, defaultValue,
|
||||||
formulaContent, formulaId, name,
|
formulaContent, formulaId, name,
|
||||||
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
|
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
|
||||||
valueType, roundingMode, pattern,
|
valueType, roundingMode, pattern,
|
||||||
|
|
@ -151,11 +152,12 @@ class LedgerSalaryItemTable extends Component {
|
||||||
});
|
});
|
||||||
const { salaryItemId } = record;
|
const { salaryItemId } = record;
|
||||||
const {
|
const {
|
||||||
hideDefault, roundingMode, pattern, valueType,
|
hideDefault, roundingMode, pattern, valueType, defaultValue,
|
||||||
originFormulaContent, originSqlContent, formulaId
|
originFormulaContent, originSqlContent, formulaId, dataType
|
||||||
} = request;
|
} = request;
|
||||||
this.handleChangeSalaryItem({
|
this.handleChangeSalaryItem({
|
||||||
itemHide: hideDefault.toString(),
|
itemHide: hideDefault.toString(),
|
||||||
|
defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue,
|
||||||
roundingMode, pattern, valueType,
|
roundingMode, pattern, valueType,
|
||||||
formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent,
|
formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent,
|
||||||
formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId,
|
formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId,
|
||||||
|
|
|
||||||
|
|
@ -8,20 +8,23 @@ import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
|
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
|
||||||
import LedgerBaseSetting from "./ledgerBaseSetting";
|
import LedgerBaseSetting from "./ledgerBaseSetting";
|
||||||
import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel";
|
import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel";
|
||||||
import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules";
|
import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules";
|
||||||
import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem";
|
import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem";
|
||||||
import LedgerSalaryItem from "./ledgerSalaryItem";
|
import LedgerSalaryItem from "./ledgerSalaryItem";
|
||||||
import IncomeTaxFields from "./incomeTaxFields";
|
import IncomeTaxFields from "./incomeTaxFields";
|
||||||
|
import IncomeTaxFieldsCorresponding from "./incomeTaxFieldsCorresponding";
|
||||||
import CumulativeFields from "./cumulativeFields";
|
import CumulativeFields from "./cumulativeFields";
|
||||||
|
import WeaTopTitle from "../../../components/custom-title/weaTopTitle";
|
||||||
|
import WeaReqTitle from "../../../components/custom-title/weaReqTitle";
|
||||||
import {
|
import {
|
||||||
addupruleSave,
|
addupruleSave,
|
||||||
saveAdjustmentRule,
|
saveAdjustmentRule,
|
||||||
saveLedgerBasic,
|
saveLedgerBasic,
|
||||||
saveLedgerItem,
|
saveLedgerItem,
|
||||||
taxreportruleSave
|
taxreportruleSave,
|
||||||
|
taxruleSave
|
||||||
} from "../../../apis/ledger";
|
} from "../../../apis/ledger";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -39,6 +42,7 @@ class LedgerSlide extends Component {
|
||||||
baseSettingInfo: {},
|
baseSettingInfo: {},
|
||||||
adjustRules: [],
|
adjustRules: [],
|
||||||
empFields: [], itemGroups: [],
|
empFields: [], itemGroups: [],
|
||||||
|
taxruleFields: [], taxruleKeys: "", //个税字段对应
|
||||||
incomeTaxFields: [], incomeTaxKeys: "", //个税申报字段对应
|
incomeTaxFields: [], incomeTaxKeys: "", //个税申报字段对应
|
||||||
addupruleFields: [], addupruleKeys: "", //累计字段对应
|
addupruleFields: [], addupruleKeys: "", //累计字段对应
|
||||||
saveSalarySobId: "",
|
saveSalarySobId: "",
|
||||||
|
|
@ -100,7 +104,6 @@ class LedgerSlide extends Component {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
this.handleClose();
|
|
||||||
} else {
|
} else {
|
||||||
message.success(errormsg || "保存失败");
|
message.success(errormsg || "保存失败");
|
||||||
}
|
}
|
||||||
|
|
@ -147,6 +150,46 @@ class LedgerSlide extends Component {
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description:个税字段对应-保存
|
||||||
|
* Params:
|
||||||
|
* Date: 2023/8/16
|
||||||
|
*/
|
||||||
|
taxRuleSave = () => {
|
||||||
|
const { editId } = this.props;
|
||||||
|
const { taxruleKeys, taxruleFields, saveSalarySobId, taxableItems } = this.state;
|
||||||
|
const payload = {
|
||||||
|
salarySobId: editId || saveSalarySobId,
|
||||||
|
incomeCategoryParams: _.map(taxruleFields, it => {
|
||||||
|
if (it.incomeCategoryId === taxruleKeys) {
|
||||||
|
return {
|
||||||
|
incomeCategory: it.incomeCategoryId,
|
||||||
|
taxRuleParams: _.map(it.taxReportRules, child => {
|
||||||
|
return {
|
||||||
|
taxIndex: child.reportColumnDataIndex,
|
||||||
|
salaryItemId: _.map(child.salaryItem, o => o.id).join(",")
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
incomeCategory: it.incomeCategoryId,
|
||||||
|
taxRuleParams: []
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
taxruleSave(payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(22619, "保存成功!"));
|
||||||
|
!editId && (taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") && this.handleClose();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description:个税申报字段对应-保存
|
* Description:个税申报字段对应-保存
|
||||||
|
|
@ -154,33 +197,29 @@ class LedgerSlide extends Component {
|
||||||
* Date: 2023/8/16
|
* Date: 2023/8/16
|
||||||
*/
|
*/
|
||||||
taxreportruleSave = () => {
|
taxreportruleSave = () => {
|
||||||
const { taxableItems, incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state;
|
|
||||||
const { editId } = this.props;
|
const { editId } = this.props;
|
||||||
if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) {
|
const { incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state;
|
||||||
this.saveLedgerAdjustRule();
|
const payload = {
|
||||||
} else {
|
salarySobId: editId || saveSalarySobId,
|
||||||
const payload = {
|
incomeCategoryParams: _.map(incomeTaxFields, it => {
|
||||||
salarySobId: editId || saveSalarySobId,
|
if (it.incomeCategoryId === incomeTaxKeys) {
|
||||||
incomeCategoryParams: _.map(incomeTaxFields, it => {
|
|
||||||
if (it.incomeCategoryId === incomeTaxKeys) {
|
|
||||||
return {
|
|
||||||
incomeCategory: it.incomeCategoryId,
|
|
||||||
taxReportRuleParams: _.map(it.taxReportRules, child => {
|
|
||||||
return {
|
|
||||||
reportColumnDataIndex: child.reportColumnDataIndex,
|
|
||||||
salaryItemId: _.map(child.salaryItem, o => o.id).join(",")
|
|
||||||
};
|
|
||||||
})
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
incomeCategory: it.incomeCategoryId,
|
incomeCategory: it.incomeCategoryId,
|
||||||
taxReportRuleParams: []
|
taxReportRuleParams: _.map(it.taxReportRules, child => {
|
||||||
|
return {
|
||||||
|
reportColumnDataIndex: child.reportColumnDataIndex,
|
||||||
|
salaryItemId: _.map(child.salaryItem, o => o.id).join(",")
|
||||||
|
};
|
||||||
|
})
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
};
|
return {
|
||||||
this.saveTaxreportrule(payload);
|
incomeCategory: it.incomeCategoryId,
|
||||||
}
|
taxReportRuleParams: []
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
this.saveTaxreportrule(payload);
|
||||||
};
|
};
|
||||||
saveTaxreportrule = (payload) => {
|
saveTaxreportrule = (payload) => {
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
|
|
@ -200,7 +239,10 @@ class LedgerSlide extends Component {
|
||||||
* Date: 2023/8/17
|
* Date: 2023/8/17
|
||||||
*/
|
*/
|
||||||
addupruleSave = () => {
|
addupruleSave = () => {
|
||||||
const { taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields, addupruleKeys, saveSalarySobId } = this.state;
|
const {
|
||||||
|
taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields,
|
||||||
|
addupruleKeys, saveSalarySobId
|
||||||
|
} = this.state;
|
||||||
const { editId } = this.props;
|
const { editId } = this.props;
|
||||||
if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) {
|
if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) {
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -250,27 +292,21 @@ class LedgerSlide extends Component {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success(getLabel(22619, "保存成功!"));
|
message.success(getLabel(22619, "保存成功!"));
|
||||||
|
!editId && this.handleClose();
|
||||||
} else {
|
} else {
|
||||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handleChangeSlideTab = (current) => {
|
handleClose = () => this.setState({ current: 0, baseSettingInfo: {} }, () => this.props.onCancel());
|
||||||
this.setState({ current: Number(current) });
|
|
||||||
};
|
|
||||||
handleClose = () => {
|
|
||||||
this.setState({ current: 0 }, () => this.props.onCancel());
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description: 基础信息字段切换
|
* Description: 基础信息字段切换
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2022/12/9
|
* Date: 2022/12/9
|
||||||
*/
|
*/
|
||||||
handleChangeSaveParams = (baseSettingInfo) => {
|
handleChangeSaveParams = (baseSettingInfo) => this.setState({ baseSettingInfo });
|
||||||
this.setState({ baseSettingInfo });
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description: 薪资项目保存数据
|
* Description: 薪资项目保存数据
|
||||||
|
|
@ -280,179 +316,138 @@ class LedgerSlide extends Component {
|
||||||
handleSaveSalaryItemParams = (empFields, itemGroups) => {
|
handleSaveSalaryItemParams = (empFields, itemGroups) => {
|
||||||
this.setState({ empFields, itemGroups });
|
this.setState({ empFields, itemGroups });
|
||||||
};
|
};
|
||||||
renderChildren = () => {
|
|
||||||
const { editId } = this.props;
|
|
||||||
const { current, saveSalarySobId, taxableItems } = this.state;
|
|
||||||
let CurrentDom = null;
|
|
||||||
switch (current) {
|
|
||||||
case 0:
|
|
||||||
CurrentDom = <LedgerBaseSetting
|
|
||||||
{...this.props} onSaveParams={this.handleChangeSaveParams}
|
|
||||||
onTaxableItemsChange={(val) => this.setState({ taxableItems: val })}
|
|
||||||
/>;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
CurrentDom = <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
CurrentDom = <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
|
|
||||||
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
CurrentDom = <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
|
|
||||||
<IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}
|
|
||||||
onSetTaxreportrule={(incomeTaxFields, selectedKey) => this.setState({
|
|
||||||
incomeTaxFields,
|
|
||||||
incomeTaxKeys: selectedKey
|
|
||||||
})}/> :
|
|
||||||
<CumulativeFields {...this.props} saveSalarySobId={saveSalarySobId}
|
|
||||||
onSetAdduprule={(addupruleFields, selectedKey) => this.setState({
|
|
||||||
addupruleFields,
|
|
||||||
addupruleKeys: selectedKey
|
|
||||||
})}/>;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
|
|
||||||
<LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
|
|
||||||
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/> :
|
|
||||||
<IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}
|
|
||||||
onSetTaxreportrule={(incomeTaxFields, selectedKey) => this.setState({
|
|
||||||
incomeTaxFields,
|
|
||||||
incomeTaxKeys: selectedKey
|
|
||||||
})}/>;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
CurrentDom =
|
|
||||||
<LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
|
|
||||||
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
CurrentDom = null;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return CurrentDom;
|
|
||||||
};
|
|
||||||
renderCustomOperate = () => {
|
|
||||||
const { taxAgentStore: { showOperateBtn }, editId } = this.props;
|
|
||||||
const { current, loading, taxableItems } = this.state;
|
|
||||||
let CurrentDom = [];
|
|
||||||
//管理员操作权限
|
|
||||||
if (showOperateBtn) {
|
|
||||||
switch (current) {
|
|
||||||
case 0:
|
|
||||||
CurrentDom = [
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
loading={loading}
|
|
||||||
onClick={this.saveLedgerBasic}
|
|
||||||
>{editId ? "保存" : "保存并进入下一步"}</Button>
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
CurrentDom = !editId ? [
|
|
||||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
|
||||||
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
|
|
||||||
] : [];
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
CurrentDom = !editId ?
|
|
||||||
[
|
|
||||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
|
||||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
loading={loading}
|
|
||||||
onClick={() => {
|
|
||||||
this.setState({ current: current + 1 }, () => {
|
|
||||||
this.saveLedgerItem();
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>保存并进入下一步</Button>
|
|
||||||
] : [
|
|
||||||
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>保存</Button>
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
CurrentDom = !editId ?
|
|
||||||
[
|
|
||||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
|
||||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
|
||||||
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
|
|
||||||
] : [];
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
CurrentDom = !editId ?
|
|
||||||
[
|
|
||||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
|
||||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
loading={loading}
|
|
||||||
onClick={() => {
|
|
||||||
this.setState({ current: current + 1 }, () => this.addupruleSave());
|
|
||||||
}}
|
|
||||||
>保存并进入下一步</Button>
|
|
||||||
] : [
|
|
||||||
<Button type="primary" loading={loading} onClick={this.addupruleSave}>保存</Button>
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
CurrentDom = !editId ?
|
|
||||||
[
|
|
||||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
|
||||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
loading={loading}
|
|
||||||
onClick={() => {
|
|
||||||
this.setState({ current: current + 1 }, () => this.taxreportruleSave());
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{
|
|
||||||
(!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
|
|
||||||
getLabel(555, "完成") :
|
|
||||||
getLabel(33199, "保存并进入下一步")
|
|
||||||
}
|
|
||||||
</Button>
|
|
||||||
] : [
|
|
||||||
<Button type="primary" loading={loading} onClick={this.taxreportruleSave}>保存</Button>
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
CurrentDom = !editId ?
|
|
||||||
[
|
|
||||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
|
||||||
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>完成</Button>
|
|
||||||
] : [
|
|
||||||
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>保存</Button>
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return CurrentDom;
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const { current, taxableItems, saveSalarySobId, loading } = this.state;
|
||||||
let tabs = [
|
let tabs = [
|
||||||
{ key: 0, title: getLabel(82751, "基础设置") },
|
{
|
||||||
{ key: 1, title: getLabel(543467, "关联人员") },
|
key: 0, title: getLabel(82751, "基础设置"),
|
||||||
{ key: 2, title: getLabel(542362, "薪资项目") },
|
createBtns: [
|
||||||
{ key: 3, title: getLabel(543468, "回算薪资项目") },
|
<Button type="primary" loading={loading}
|
||||||
{ key: 4, title: getLabel(111, "累计字段对应") },
|
onClick={this.saveLedgerBasic}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||||
{ key: 5, title: getLabel(111, "个税申报字段对应") },
|
],
|
||||||
{ key: 6, title: getLabel(543469, "调薪计薪规则") }
|
editBtns: [
|
||||||
|
<Button type="primary" loading={loading} onClick={this.saveLedgerBasic}>{getLabel(111, "保存")}</Button>
|
||||||
|
],
|
||||||
|
children: <LedgerBaseSetting
|
||||||
|
{...this.props} onSaveParams={this.handleChangeSaveParams}
|
||||||
|
onTaxableItemsChange={(val) => this.setState({ taxableItems: val })}
|
||||||
|
/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1, title: getLabel(543467, "关联人员"),
|
||||||
|
createBtns: [
|
||||||
|
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||||
|
<Button type="primary"
|
||||||
|
onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
|
||||||
|
],
|
||||||
|
editBtns: [],
|
||||||
|
children: <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2, title: getLabel(542362, "薪资项目"),
|
||||||
|
createBtns: [
|
||||||
|
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
|
<Button type="primary" loading={loading} onClick={() => {
|
||||||
|
this.setState({ current: current + 1 }, () => this.saveLedgerItem());
|
||||||
|
}}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||||
|
],
|
||||||
|
editBtns: [
|
||||||
|
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>{getLabel(111, "保存")}</Button>
|
||||||
|
],
|
||||||
|
children: <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
|
||||||
|
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3, title: getLabel(543468, "回算薪资项目"),
|
||||||
|
createBtns: [
|
||||||
|
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
|
<Button type="primary"
|
||||||
|
onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
|
||||||
|
],
|
||||||
|
editBtns: [],
|
||||||
|
children: <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4, title: getLabel(543469, "调薪计薪规则"),
|
||||||
|
createBtns: [
|
||||||
|
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
|
<Button type="primary" loading={loading}
|
||||||
|
onClick={() => this.setState({ current: current + 1 }, () => this.saveLedgerAdjustRule())}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||||
|
],
|
||||||
|
editBtns: [
|
||||||
|
<Button type="primary" loading={loading}
|
||||||
|
onClick={this.saveLedgerAdjustRule}>{getLabel(111, "保存")}</Button>
|
||||||
|
],
|
||||||
|
children: <LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
|
||||||
|
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5, title: getLabel(111, "个税申报配置"),
|
||||||
|
createBtns: [
|
||||||
|
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
|
<Button type="primary" loading={loading}
|
||||||
|
onClick={() => this.setState({ current: current + 1 }, () => this.taxreportruleSave())}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||||
|
],
|
||||||
|
editBtns: [<Button type="primary" loading={loading}
|
||||||
|
onClick={this.taxreportruleSave}>{getLabel(111, "保存")}</Button>],
|
||||||
|
children: <IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}
|
||||||
|
onSetTaxreportrule={(incomeTaxFields, selectedKey) => this.setState({
|
||||||
|
incomeTaxFields,
|
||||||
|
incomeTaxKeys: selectedKey
|
||||||
|
})}/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6, title: getLabel(111, "同步个税配置"),
|
||||||
|
createBtns:
|
||||||
|
!(taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
|
||||||
|
[
|
||||||
|
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
|
<Button type="primary" loading={loading}
|
||||||
|
onClick={() => this.setState({ current: current + 1 }, () => this.taxRuleSave())}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||||
|
] : [
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
|
<Button type="primary" loading={loading} onClick={this.taxRuleSave}>{getLabel(111, "完成")}</Button>
|
||||||
|
],
|
||||||
|
editBtns: [<Button type="primary" loading={loading}
|
||||||
|
onClick={this.taxRuleSave}>{getLabel(111, "保存")}</Button>],
|
||||||
|
children: <IncomeTaxFieldsCorresponding {...this.props} saveSalarySobId={saveSalarySobId}
|
||||||
|
onSetTaxreportrule={(taxruleFields, selectedKey) => this.setState({
|
||||||
|
taxruleFields, taxruleKeys: selectedKey
|
||||||
|
})}/>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7, title: getLabel(111, "累计字段对应"),
|
||||||
|
createBtns: [
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
|
<Button type="primary" loading={loading} onClick={this.addupruleSave}>{getLabel(111, "完成")}</Button>
|
||||||
|
],
|
||||||
|
editBtns: [<Button type="primary" loading={loading}
|
||||||
|
onClick={this.addupruleSave}>{getLabel(111, "保存")}</Button>],
|
||||||
|
children: <CumulativeFields {...this.props} saveSalarySobId={saveSalarySobId}
|
||||||
|
onSetAdduprule={(addupruleFields, selectedKey) => this.setState({
|
||||||
|
addupruleFields, addupruleKeys: selectedKey
|
||||||
|
})}/>
|
||||||
|
}
|
||||||
];
|
];
|
||||||
const { title, visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
(taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") &&
|
||||||
const { current, taxableItems } = this.state;
|
(tabs = _.map(_.filter(tabs, o => o.key !== 7), (k, j) => ({ ...k, key: j })));
|
||||||
(taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") && (tabs = _.filter(tabs, o => o.key !== 4));
|
|
||||||
return (
|
return (
|
||||||
<WeaSlideModal
|
<WeaSlideModal
|
||||||
className="slideOuterWrapper"
|
className="ledgerSlideLayout slideOuterWrapper"
|
||||||
visible={visible}
|
visible={visible}
|
||||||
top={0}
|
top={0}
|
||||||
width={100}
|
width={100}
|
||||||
|
|
@ -460,18 +455,10 @@ class LedgerSlide extends Component {
|
||||||
direction="right"
|
direction="right"
|
||||||
measure="%"
|
measure="%"
|
||||||
title={
|
title={
|
||||||
<SlideModalTitle
|
!editId ? <WeaTopTitle buttons={_.find(tabs, o => current === o.key).createBtns}/> :
|
||||||
subtitle={title}
|
<WeaReqTitle buttons={showOperateBtn ? _.find(tabs, o => current === o.key).editBtns : []}
|
||||||
tabs={editId ? tabs : []}
|
tabDatas={tabs} selectedKey={String(current)}
|
||||||
loading={false}
|
onChange={cur => this.setState({ current: parseInt(cur) })}/>
|
||||||
showOperateBtn={showOperateBtn}
|
|
||||||
editable={false}
|
|
||||||
onSave={() => {
|
|
||||||
}}
|
|
||||||
selectedTab={current}
|
|
||||||
customOperate={this.renderCustomOperate()}
|
|
||||||
subItemChange={this.handleChangeSlideTab}
|
|
||||||
/>
|
|
||||||
}
|
}
|
||||||
content={
|
content={
|
||||||
<div className="ledgerSlideContent">
|
<div className="ledgerSlideContent">
|
||||||
|
|
@ -486,9 +473,7 @@ class LedgerSlide extends Component {
|
||||||
}
|
}
|
||||||
</WeaSteps>
|
</WeaSteps>
|
||||||
}
|
}
|
||||||
{
|
{_.find(tabs, o => current === o.key).children}
|
||||||
this.renderChildren()
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
onClose={this.handleClose}
|
onClose={this.handleClose}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,3 @@
|
||||||
.ledgerOuter {
|
|
||||||
.wea-new-top {
|
|
||||||
.ant-col-10 {
|
|
||||||
& > span:nth-child(2) {
|
|
||||||
margin-top: -6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ledgerWrapper {
|
.ledgerWrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("payrollStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
const { payrollStore: { detailListConditionForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="advance-search">
|
||||||
|
<WeaInputSearch value={detailListConditionForm.getFormParams().username}
|
||||||
|
onChange={v => detailListConditionForm.updateFields({ username: v })}
|
||||||
|
onSearch={this.props.onAdvanceSearch}
|
||||||
|
/>
|
||||||
|
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||||
|
onClick={this.props.onOpenAdvanceSearch}>{getLabel(111, "高级搜索")}</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
.advance-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
top: -2.5px;
|
||||||
|
|
||||||
|
.wea-advanced-search {
|
||||||
|
top: 2px;
|
||||||
|
left: -1px;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 1;
|
||||||
|
border-radius: 0;
|
||||||
|
position: relative;
|
||||||
|
color: #474747;
|
||||||
|
padding: 4px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-advanced-search:hover {
|
||||||
|
border: 1px solid #dadada;
|
||||||
|
color: #474747;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-elli {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,145 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* 查看工资单详情-列表
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2024/7/15
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Spin } from "antd";
|
||||||
|
import { WeaTableNew } from "comsMobx";
|
||||||
|
import * as API from "../../../../../apis/payroll";
|
||||||
|
import { getQueryString } from "../../../../../util/url";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const WeaTableComx = WeaTableNew.WeaTable;
|
||||||
|
|
||||||
|
@inject("payrollStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, dataSource: [], visible: false, updateSum: true, payload: {},
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
window.addEventListener("message", this.handleReceive, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener("message", this.handleReceive, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.isQuery !== this.props.isQuery) this.setState({ updateSum: true }, () => this.getPayrollDetailList());
|
||||||
|
}
|
||||||
|
|
||||||
|
handleReceive = async ({ data }) => {
|
||||||
|
const { type, payload: { id, params } = {} } = data;
|
||||||
|
if (type === "init") {
|
||||||
|
this.getPayrollDetailList();
|
||||||
|
} else if (type === "turn") {
|
||||||
|
switch (id) {
|
||||||
|
case "PAGEINFO":
|
||||||
|
const { pageNum: current, size: pageSize } = params;
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...this.state.pageInfo, current, pageSize },
|
||||||
|
updateSum: false
|
||||||
|
}, () => this.getPayrollDetailList());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getPayrollDetailList = () => {
|
||||||
|
const { pageInfo } = this.state;
|
||||||
|
const salarySendId = getQueryString("id");
|
||||||
|
const { payrollStore: { detailListConditionForm: form, salaryTableStore } } = this.props;
|
||||||
|
const payload = {
|
||||||
|
salarySendId, ...pageInfo, ...form.getFormParams(),
|
||||||
|
departmentIds: form.getFormParams().departmentIds ? form.getFormParams().departmentIds.split(",") : [],
|
||||||
|
subCompanyIds: form.getFormParams().subCompanyIds ? form.getFormParams().subCompanyIds.split(",") : []
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API.getPayrollDetailList(payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { dataKey, pageInfo: pageResult, datas: dataSource } = data;
|
||||||
|
const { datas } = dataKey;
|
||||||
|
const { pageNum: current, pageSize, total } = pageResult;
|
||||||
|
salaryTableStore.getDatas(datas);
|
||||||
|
this.setState({ payload, dataSource, pageInfo: { ...pageInfo, current, pageSize, total } });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
getColumns = () => {
|
||||||
|
const { payrollStore: { salaryTableStore }, showTotalCell } = this.props;
|
||||||
|
const { dataSource, pageInfo, selectedRowKeys, payload, updateSum } = this.state;
|
||||||
|
const columns = _.filter(toJS(salaryTableStore.columns), (item) => item.display === "true");
|
||||||
|
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/salaryBill/send/sum" : "";
|
||||||
|
if (!_.isEmpty(columns)) {
|
||||||
|
this.postMessageToChild({
|
||||||
|
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true,
|
||||||
|
tableScrollHeight: pageInfo.total === 0 ? 90 : 156,
|
||||||
|
sumRowlistUrl, payload: { ...payload, updateSum },
|
||||||
|
columns: _.map(columns, (it, idx) => ({
|
||||||
|
...it, width: it.oldWidth, fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||||
|
ellipsis: true
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
postMessageToChild = (payload) => {
|
||||||
|
const i18n = {
|
||||||
|
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||||
|
"总计": getLabel(523, "总计")
|
||||||
|
};
|
||||||
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
|
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||||
|
};
|
||||||
|
handleSetCustomCols = () => {
|
||||||
|
const { payrollStore: { salaryTableStore } } = this.props;
|
||||||
|
this.setState({ updateSum: true }, () => {
|
||||||
|
salaryTableStore.setColSetVisible(true);
|
||||||
|
salaryTableStore.tableColSet(true);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { payrollStore: { salaryTableStore } } = this.props;
|
||||||
|
const { loading, pageInfo } = this.state;
|
||||||
|
const { pageSize, total } = pageInfo;
|
||||||
|
const columnNum = total > 10 ? pageSize + 1 : total + 1;
|
||||||
|
return (
|
||||||
|
<div style={{
|
||||||
|
height: `calc((39px * ${columnNum}) + 126.84px)`,
|
||||||
|
maxHeight: "678px",
|
||||||
|
minHeight: !total ? "270px" : "inherit"
|
||||||
|
}}>
|
||||||
|
<Spin spinning={loading}>
|
||||||
|
<iframe
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/calcTable"
|
||||||
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
||||||
|
id="atdTable"
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
<WeaTableComx style={{ display: "none" }} needScroll={true} columns={this.getColumns()}
|
||||||
|
comsWeaTableStore={salaryTableStore}/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { getSearchs } from "../../../../../util";
|
||||||
|
import { Button } from "antd";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("payrollStore")
|
||||||
|
@observer
|
||||||
|
class Index extends Component {
|
||||||
|
render() {
|
||||||
|
const { payrollStore: { detailListConditionForm }, conditions } = this.props;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<div className="wea-advanced-searchsAd">
|
||||||
|
{getSearchs(detailListConditionForm, conditions, 2, false)}
|
||||||
|
</div>
|
||||||
|
<div className="wea-search-buttons">
|
||||||
|
<div style={{ textAlign: "center" }}>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={() => detailListConditionForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||||
|
</span>
|
||||||
|
<span style={{ marginLeft: 15 }}>
|
||||||
|
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* 薪资所属月-提示框
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2024/7/15
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class SalaryMonthHelpfulTip extends Component {
|
||||||
|
render() {
|
||||||
|
const { salarySendDetailBaseInfo = {} } = this.props;
|
||||||
|
const { salarySobCycle: { salaryCycle, taxCycle, attendCycle, socialSecurityCycle } } = salarySendDetailBaseInfo;
|
||||||
|
const { fromDate, endDate } = salaryCycle;
|
||||||
|
const { fromDate: aFromDate, endDate: aEndDate } = attendCycle;
|
||||||
|
return (
|
||||||
|
<WeaHelpfulTip width={200} placement="topLeft"
|
||||||
|
title={<div>
|
||||||
|
<div>{getLabel(111, "薪资周期")}</div>
|
||||||
|
<div><span>{fromDate}</span><span>{getLabel(111, "至")}</span><span>{endDate}</span></div>
|
||||||
|
<div>{getLabel(111, "税款所属期")}</div>
|
||||||
|
<div>{taxCycle}</div>
|
||||||
|
<div>{getLabel(111, "考勤取值周期")}</div>
|
||||||
|
<div><span>{aFromDate}</span><span>{getLabel(111, "至")}</span><span>{aEndDate}</span></div>
|
||||||
|
<div>{getLabel(111, "福利台账月份")}</div>
|
||||||
|
<div>{`${getLabel(111, "引用")}${socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}</div>
|
||||||
|
</div>}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SalaryMonthHelpfulTip;
|
||||||
|
|
@ -31,3 +31,75 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查看工资单详情-重构
|
||||||
|
.salary-payroll-details-layout {
|
||||||
|
.ant-spin-nested-loading, .ant-spin-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-payroll-details {
|
||||||
|
padding: 0 16px 16px;
|
||||||
|
|
||||||
|
.salary-tb-tip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-payroll-template-name {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchAdvanced-condition-hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchAdvanced-condition-container {
|
||||||
|
background: #FFF;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.wea-search-buttons {
|
||||||
|
border-top: 1px solid #dadada;
|
||||||
|
padding: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-advanced-searchsAd {
|
||||||
|
height: 246px;
|
||||||
|
overflow: hidden auto;
|
||||||
|
|
||||||
|
.formItem-delete {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: -40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchAdvanced-commonSelect {
|
||||||
|
border-top: 1px solid #ebebeb;
|
||||||
|
margin: 0 25px;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-advance-largeSpacing {
|
||||||
|
padding-left: 26px;
|
||||||
|
|
||||||
|
.link {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 12px 10px 12px 26px;
|
||||||
|
color: #2db7f5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,113 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* 查看工资单详情-重构页面
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2024/7/15
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
|
import { WeaLoadingGlobal, WeaLocaleProvider, WeaTop } from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||||
|
import SalaryMonthHelpfulTip from "./components/salaryMonthHelpfulTip";
|
||||||
|
import SalaryDetailSearchPannel from "./components/salaryDetailSearchPannel";
|
||||||
|
import SalaryDetailList from "./components/salaryDetailList";
|
||||||
|
import { getQueryString } from "../../../util/url";
|
||||||
|
import { removePropertyCondition } from "../../../util/response";
|
||||||
|
import { sysConfCodeRule } from "../../../apis/ruleconfig";
|
||||||
|
import * as API from "../../../apis/payroll";
|
||||||
|
import cs from "classnames";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("taxAgentStore", "payrollStore")
|
||||||
|
@observer
|
||||||
|
class PayrollDetail extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
salarySendDetailBaseInfo: {}, showSearchAd: false, isQuery: false, conditions: [],
|
||||||
|
showTotalCell: false
|
||||||
|
};
|
||||||
|
this.listRef = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async componentDidMount() {
|
||||||
|
const id = getQueryString("id");
|
||||||
|
const { payrollStore: { detailListConditionForm } } = this.props;
|
||||||
|
const [{ data: salarySendDetailBaseInfo }, { data }, { data: confCode }] = await Promise.all([
|
||||||
|
API.getPayrollInfo({ id }), API.getPayrollDetailSa(),
|
||||||
|
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })
|
||||||
|
]);
|
||||||
|
this.setState({
|
||||||
|
salarySendDetailBaseInfo, showTotalCell: confCode === "1",
|
||||||
|
conditions: removePropertyCondition(data.condition)
|
||||||
|
}, () => detailListConditionForm.initFormFields(this.state.conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
handleExportAll = () => {
|
||||||
|
const { payrollStore: { salaryTableStore } } = this.props;
|
||||||
|
const columns = _.filter(toJS(salaryTableStore.columns), (item) => item.display === "true");
|
||||||
|
WeaLoadingGlobal.start();
|
||||||
|
const salarySendId = getQueryString("id");
|
||||||
|
const promise = API.exportDetailList_reconfig({ salarySendId, columns: _.map(columns, it => it.dataIndex) });
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
|
||||||
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
|
const { salaryMonth, template } = salarySendDetailBaseInfo;
|
||||||
|
const dropMenuDatas = [
|
||||||
|
{
|
||||||
|
key: "BTN_COLUMN",
|
||||||
|
icon: <i className="icon-coms-Custom"/>,
|
||||||
|
content: getLabel(111, "显示列定制"),
|
||||||
|
onClick: () => this.listRef.wrappedInstance.handleSetCustomCols()
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const btns = [
|
||||||
|
<Button type="primary" onClick={this.handleExportAll}>{getLabel(111, "导出全部")}</Button>,
|
||||||
|
<AdvanceInputBtn onOpenAdvanceSearch={() => this.setState({ showSearchAd: true })}
|
||||||
|
onAdvanceSearch={() => this.setState({ isQuery: !isQuery })}/>
|
||||||
|
];
|
||||||
|
!showOperateBtn && btns.shift();
|
||||||
|
return (
|
||||||
|
<WeaTop
|
||||||
|
title={getLabel(111, "查看工资单详情")} icon={<i className="icon-coms-fa"/>}
|
||||||
|
iconBgcolor="#F14A2D" showDropIcon={true} dropMenuDatas={dropMenuDatas}
|
||||||
|
buttons={btns} className="salary-payroll-details-layout"
|
||||||
|
>
|
||||||
|
<div className="salary-payroll-details">
|
||||||
|
<div className="salary-tb-tip">
|
||||||
|
<div>
|
||||||
|
<span><span
|
||||||
|
className="label">{getLabel(111, "薪资所属月")}</span>:<span>{salaryMonth}</span></span>
|
||||||
|
{
|
||||||
|
!_.isEmpty(salarySendDetailBaseInfo) &&
|
||||||
|
<SalaryMonthHelpfulTip salarySendDetailBaseInfo={salarySendDetailBaseInfo}/>
|
||||||
|
}
|
||||||
|
<span
|
||||||
|
className="salary-payroll-template-name"><span
|
||||||
|
className="label">{getLabel(111, "工资单模板")}</span>:<span>{template}</span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||||
|
<SalaryDetailSearchPannel onCancel={() => this.setState({ showSearchAd: false })}
|
||||||
|
onAdSearch={() => this.setState({ isQuery: !isQuery })}
|
||||||
|
conditions={conditions}/>
|
||||||
|
</div>
|
||||||
|
{/*列表*/}
|
||||||
|
<SalaryDetailList isQuery={isQuery} showTotalCell={showTotalCell} ref={dom => this.listRef = dom}/>
|
||||||
|
</div>
|
||||||
|
</WeaTop>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PayrollDetail;
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
import React from 'react'
|
|
||||||
import { payrollGrantDetailColumns, dataSource} from '../columns'
|
|
||||||
|
|
||||||
export default class PayrollGrantDeatail extends React.Component {
|
|
||||||
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const handleMenuClick = () => {
|
|
||||||
|
|
||||||
}
|
|
||||||
const menu = (
|
|
||||||
<Menu onClick={handleMenuClick}>
|
|
||||||
<Menu.Item key="1">导出选中</Menu.Item>
|
|
||||||
</Menu>
|
|
||||||
);
|
|
||||||
const renderRightOperation = () => {
|
|
||||||
return (
|
|
||||||
<div style={{display: "inline-block"}}>
|
|
||||||
<Dropdown.Button style={{marginRight: "10px"}} overlay={menu}>导出全部</Dropdown.Button>
|
|
||||||
<WeaInputSearch />
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<CustomTab
|
|
||||||
searchOperationItem={
|
|
||||||
renderRightOperation()
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<div className="titleBar">
|
|
||||||
<div className="titleBarLeft">
|
|
||||||
<span>薪资所属月:2021-11</span>
|
|
||||||
<WeaHelpfulTip
|
|
||||||
style={{marginLeft: '10px', marginRight: "10px"}}
|
|
||||||
width={200}
|
|
||||||
title="薪资周期\n
|
|
||||||
2021-11-01至2021-11-30\n
|
|
||||||
税款所属期\n
|
|
||||||
2021-12\n
|
|
||||||
考勤取值周期\n
|
|
||||||
2021-11-01至2021-11-30\n
|
|
||||||
福利台账月份\n
|
|
||||||
引用2021-11的福利台账数据"
|
|
||||||
placement="topLeft"
|
|
||||||
/>
|
|
||||||
<span>工资单模板:上海泛微工资单1</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="titleBarRight">
|
|
||||||
<span>已发放:111/<span style={{color: "red"}}>1111</span></span>
|
|
||||||
<span style={{marginLeft: "10px"}}>未确认:111</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<Table dataSource={dataSource} columns={payrollGrantDetailColumns} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
.payPreBox {
|
||||||
|
.pay-preview-layout {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* 工资单预览
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2024/6/17
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { salaryBillPreview } from "../../../../apis/payroll";
|
||||||
|
import Content from "../../../../components/pcTemplate/content";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class PayrollPreviewDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
salaryBillData: { salaryTemplate: {}, salaryGroups: [], employeeInformation: {} }
|
||||||
|
};
|
||||||
|
this.preRef = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
const { salaryInfoId, recipient } = nextProps;
|
||||||
|
salaryBillPreview({ salaryInfoId, recipient }).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({ salaryBillData: data });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
salaryTemplate, salaryGroups, employeeInformation, sendTime
|
||||||
|
} = this.state.salaryBillData;
|
||||||
|
const salaryProps = {
|
||||||
|
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
||||||
|
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
|
||||||
|
itemTypeList: [employeeInformation, ...salaryGroups]
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props} ref={dom => this.preRef = dom} scalable hasScroll className="payPreBox" initLoadCss
|
||||||
|
style={{
|
||||||
|
width: 998, height: window.innerHeight - 40, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||||
|
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="pay-preview-layout">{!_.isEmpty(salaryGroups) && <Content {...salaryProps}/>}</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PayrollPreviewDialog;
|
||||||
|
|
@ -10,6 +10,7 @@ import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||||
import PayrollPartTable from "./payrollPartTable";
|
import PayrollPartTable from "./payrollPartTable";
|
||||||
import { genPdfBeforeExport, getPayrollIssuanceProgressBar } from "../../../apis/payroll";
|
import { genPdfBeforeExport, getPayrollIssuanceProgressBar } from "../../../apis/payroll";
|
||||||
import ProgressModal from "../../../components/progressModal";
|
import ProgressModal from "../../../components/progressModal";
|
||||||
|
import PayrollPreviewDialog from "./components/payrollPreviewDialog";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
const { ButtonSelect } = WeaDropdown;
|
const { ButtonSelect } = WeaDropdown;
|
||||||
|
|
@ -31,6 +32,10 @@ export default class PayrollGrant extends React.Component {
|
||||||
title: "工资单发放",
|
title: "工资单发放",
|
||||||
grantType: "",
|
grantType: "",
|
||||||
salarySendId: ""
|
salarySendId: ""
|
||||||
|
},
|
||||||
|
payrollPreviewDialog: {
|
||||||
|
visible: false, title: getLabel(111, "工资单预览"),
|
||||||
|
salaryInfoId: "", recipient: ""
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.pageInfo = { current: 1, pageSize: 10 };
|
this.pageInfo = { current: 1, pageSize: 10 };
|
||||||
|
|
@ -303,7 +308,7 @@ export default class PayrollGrant extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
getColumns = () => {
|
getColumns = () => {
|
||||||
const { selectedKey, showFeedbackColumn } = this.state;
|
const { selectedKey, showFeedbackColumn, payrollPreviewDialog } = this.state;
|
||||||
const { payrollStore } = this.props;
|
const { payrollStore } = this.props;
|
||||||
const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore;
|
const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore;
|
||||||
return _.map([
|
return _.map([
|
||||||
|
|
@ -323,6 +328,15 @@ export default class PayrollGrant extends React.Component {
|
||||||
onClick={() => this.handleWithdraw({ ids: [record.id] })}>
|
onClick={() => this.handleWithdraw({ ids: [record.id] })}>
|
||||||
撤回
|
撤回
|
||||||
</a>
|
</a>
|
||||||
|
<a href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||||
|
onClick={() => this.setState({
|
||||||
|
payrollPreviewDialog: {
|
||||||
|
...payrollPreviewDialog,
|
||||||
|
visible: true, salaryInfoId: record.id, recipient: record.employeeId
|
||||||
|
}
|
||||||
|
})}>
|
||||||
|
{getLabel(111, "查看")}
|
||||||
|
</a>
|
||||||
{
|
{
|
||||||
salarySendDetailBaseInfo.showPdfBtn &&
|
salarySendDetailBaseInfo.showPdfBtn &&
|
||||||
<a
|
<a
|
||||||
|
|
@ -367,11 +381,21 @@ export default class PayrollGrant extends React.Component {
|
||||||
}
|
}
|
||||||
} else if (salarySendDetailBaseInfo.canSend) {
|
} else if (salarySendDetailBaseInfo.canSend) {
|
||||||
return (
|
return (
|
||||||
<a
|
<React.Fragment>
|
||||||
href="javascript:void(0);"
|
<a
|
||||||
onClick={() => this.handleGrant({ ids: [record.id] })}>
|
href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||||
发放
|
onClick={() => this.handleGrant({ ids: [record.id] })}>
|
||||||
</a>
|
发放
|
||||||
|
</a>
|
||||||
|
<a href="javascript:void(0);" onClick={() => this.setState({
|
||||||
|
payrollPreviewDialog: {
|
||||||
|
...payrollPreviewDialog,
|
||||||
|
visible: true, salaryInfoId: record.id, recipient: record.employeeId
|
||||||
|
}
|
||||||
|
})}>
|
||||||
|
{getLabel(111, "查看")}
|
||||||
|
</a>
|
||||||
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -538,9 +562,10 @@ export default class PayrollGrant extends React.Component {
|
||||||
grantListCondition,
|
grantListCondition,
|
||||||
setGrantListShowSearchAd,
|
setGrantListShowSearchAd,
|
||||||
salaryGrantPageInfo,
|
salaryGrantPageInfo,
|
||||||
getInfoList
|
getInfoList,
|
||||||
|
loading
|
||||||
} = payrollStore;
|
} = payrollStore;
|
||||||
const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams } = this.state;
|
const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams, payrollPreviewDialog } = this.state;
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
selectedRowKeys,
|
selectedRowKeys,
|
||||||
onChange: this.onSelectChange
|
onChange: this.onSelectChange
|
||||||
|
|
@ -569,35 +594,19 @@ export default class PayrollGrant extends React.Component {
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<div className="payrollGrant_new">
|
<div className="payrollGrant_new">
|
||||||
<WeaTop
|
<WeaTop title="工资单发放" icon={<i className="icon-coms-meeting"/>} iconBgcolor="#F14A2D"
|
||||||
title="工资单发放" // 文字
|
showDropIcon={true} buttons={this.getSearchsAdQuick()}/>
|
||||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
|
||||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
|
||||||
showDropIcon={true} // 是否显示下拉按钮
|
|
||||||
buttons={this.getSearchsAdQuick()}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<WeaTab
|
<WeaTab
|
||||||
datas={topTab}
|
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} searchType={["base", "advanced"]}
|
||||||
keyParam="viewcondition"
|
onChange={v => this.setState({ selectedKey: v }, () => {
|
||||||
selectedKey={selectedKey}
|
getInfoList({ salarySendId: currentId, isGranted: v !== "0" });
|
||||||
onChange={v =>
|
})}
|
||||||
this.setState({ selectedKey: v }, () => {
|
searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn}
|
||||||
getInfoList({
|
setShowSearchAd={bool => setGrantListShowSearchAd(bool)}
|
||||||
salarySendId: currentId,
|
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)}
|
||||||
isGranted: v !== "0"
|
onSearch={() => this.handleSearch()}
|
||||||
});
|
onSearchChange={v => grantListConditionForm.updateFields({ username: v })}
|
||||||
})
|
searchsBaseValue={grantListConditionForm.getFormParams().username}
|
||||||
}
|
|
||||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
|
||||||
searchsBasePlaceHolder="请输入姓名"
|
|
||||||
showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板
|
|
||||||
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
|
|
||||||
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据
|
|
||||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
|
||||||
onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
|
|
||||||
onSearchChange={v => grantListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
|
||||||
searchsBaseValue={grantListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
|
||||||
/>
|
/>
|
||||||
<div className="titleBar">
|
<div className="titleBar">
|
||||||
<div className="titleBarLeft">
|
<div className="titleBarLeft">
|
||||||
|
|
@ -626,7 +635,7 @@ export default class PayrollGrant extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
{
|
{
|
||||||
!_.isEmpty(this.getColumns()) ?
|
!loading ?
|
||||||
<CustomPaginationTable
|
<CustomPaginationTable
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|
@ -666,6 +675,14 @@ export default class PayrollGrant extends React.Component {
|
||||||
progress={this.state.progress}
|
progress={this.state.progress}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
{/*工资单预览*/}
|
||||||
|
<PayrollPreviewDialog {...payrollPreviewDialog}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
payrollPreviewDialog: {
|
||||||
|
...payrollPreviewDialog,
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
})}/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class salaryFileAdvanceSearchPannel extends Component {
|
||||||
...child,
|
...child,
|
||||||
options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel }))
|
options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel }))
|
||||||
};
|
};
|
||||||
} else if (getKey(child) === "taxAgentId") {
|
} else if (getKey(child) === "taxAgentIds") {
|
||||||
return {
|
return {
|
||||||
...child,
|
...child,
|
||||||
options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
|
options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
|
||||||
|
|
|
||||||
|
|
@ -324,10 +324,11 @@ export const salaryFileSearchConditions = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
conditionType: "SELECT",
|
conditionType: "SELECT",
|
||||||
domkey: ["taxAgentId"],
|
domkey: ["taxAgentIds"],
|
||||||
fieldcol: 16,
|
fieldcol: 16,
|
||||||
label: getLabel(537996, "个税扣缴义务人"),
|
label: getLabel(537996, "个税扣缴义务人"),
|
||||||
labelcol: 8,
|
labelcol: 8,
|
||||||
|
multiple: true,
|
||||||
options: [],
|
options: [],
|
||||||
viewAttr: 2
|
viewAttr: 2
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -403,8 +403,8 @@ export const mapBarOptions = (params) => ({
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: "10%",
|
top: "10%",
|
||||||
right: "0%",
|
right: "2%",
|
||||||
left: "5%",
|
left: "2%",
|
||||||
bottom: "10%",
|
bottom: "10%",
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
|
|
@ -457,8 +457,9 @@ export const mapBarOptions = (params) => ({
|
||||||
series: _.map(params.data, (item, index) => {
|
series: _.map(params.data, (item, index) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
barWidth: "32",
|
barMaxWidth: 30,
|
||||||
barGap: "0%",
|
barMinWidth: 10,
|
||||||
|
barGap: 0,
|
||||||
data: _.map(item.data, (it) => it.replace(/,/g, "")),
|
data: _.map(item.data, (it) => it.replace(/,/g, "")),
|
||||||
type: "bar",
|
type: "bar",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
|
|
@ -484,6 +485,10 @@ export const mapBarOptions = (params) => ({
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
textStyle: {
|
||||||
|
textShadowColor: "transparent",
|
||||||
|
color: "#fff"
|
||||||
|
},
|
||||||
rich: {
|
rich: {
|
||||||
a: {
|
a: {
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
|
|
@ -501,8 +506,9 @@ export const mapBarOptions = (params) => ({
|
||||||
}),
|
}),
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
type: "inside"
|
type: "inside",
|
||||||
|
start: params.xAxis.length <= 7 ? 0 : 25,
|
||||||
|
end: params.xAxis.length <= 7 ? 100 : 75,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "slider",
|
type: "slider",
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
* Date: 2023/4/21
|
* Date: 2023/4/21
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Spin } from "antd";
|
import { message, Spin } from "antd";
|
||||||
import { WeaEchart } from "ecCom";
|
import { WeaEchart, WeaLocaleProvider } from "ecCom";
|
||||||
import RightOptions from "./rightOptions";
|
import RightOptions from "./rightOptions";
|
||||||
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
|
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
|
||||||
import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition";
|
import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition";
|
||||||
|
|
@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal";
|
||||||
import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide";
|
import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide";
|
||||||
import "../index.less";
|
import "../index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class ReportContent extends Component {
|
class ReportContent extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -33,7 +35,8 @@ class ReportContent extends Component {
|
||||||
rangSet: {
|
rangSet: {
|
||||||
visible: false, reportId: "",
|
visible: false, reportId: "",
|
||||||
rangeVal: {}
|
rangeVal: {}
|
||||||
}
|
},
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,9 +59,9 @@ class ReportContent extends Component {
|
||||||
handleReceive = ({ data }) => {
|
handleReceive = ({ data }) => {
|
||||||
const { type, payload: { id, params } = {} } = data;
|
const { type, payload: { id, params } = {} } = data;
|
||||||
if (type === "init") {
|
if (type === "init") {
|
||||||
const { columns, countResult, dataSource } = this.state;
|
const { columns, countResult, dataSource, pageInfo } = this.state;
|
||||||
this.postMessageToChild({
|
this.postMessageToChild({
|
||||||
columns, countResult, dataSource,
|
columns, countResult, dataSource, pageInfo,
|
||||||
showSum: !_.isEmpty(countResult)
|
showSum: !_.isEmpty(countResult)
|
||||||
});
|
});
|
||||||
} else if (type === "turn") {
|
} else if (type === "turn") {
|
||||||
|
|
@ -72,30 +75,38 @@ class ReportContent extends Component {
|
||||||
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
|
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (id === "PAGEINFO_REPORT") {
|
||||||
|
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
postMessageToChild = (payload) => {
|
postMessageToChild = (payload) => {
|
||||||
|
const i18n = {
|
||||||
|
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||||
|
"总计": getLabel(523, "总计")
|
||||||
|
};
|
||||||
const childFrameObj = document.getElementById("atdTable");
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
const { dataSource, columns, showSum, countResult } = payload;
|
const { dataSource, columns, showSum, countResult, pageInfo } = payload;
|
||||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||||
dataSource, columns, showSum, countResult
|
dataSource, columns, showSum, countResult, i18n, pageInfo
|
||||||
}), "*");
|
}), "*");
|
||||||
};
|
};
|
||||||
reportStatisticsReportGetData = (params) => {
|
reportStatisticsReportGetData = (params) => {
|
||||||
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
|
const { pageInfo } = this.state;
|
||||||
|
const { id, dimension, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
|
||||||
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
||||||
const payload = {
|
const payload = {
|
||||||
id, dimensionId, isShare,
|
id, dimensionId, isShare, ...pageInfo,
|
||||||
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
||||||
};
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
reportStatisticsReportGetData(payload).then(({ status, data }) => {
|
reportStatisticsReportGetData(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status && id.toString() === data.reportId.toString()) {
|
if (status && id.toString() === data.reportId.toString()) {
|
||||||
const { countResult, columns, pageInfo: { list } } = data;
|
const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data;
|
||||||
this.setState({
|
this.setState({
|
||||||
countResult,
|
countResult, dataSource: list || [],
|
||||||
|
pageInfo: dimension === getLabel(111, "人员") ? { ...pageInfo, current: pageNum, pageSize, total } : null,
|
||||||
columns: _.map(columns, it => ({
|
columns: _.map(columns, it => ({
|
||||||
...it,
|
...it,
|
||||||
dataIndex: it.column, width: it.width ? it.width + "px" : 150,
|
dataIndex: it.column, width: it.width ? it.width + "px" : 150,
|
||||||
|
|
@ -105,12 +116,11 @@ class ReportContent extends Component {
|
||||||
dataIndex: child.column, width: child.width ? child.width + "px" : 150,
|
dataIndex: child.column, width: child.width ? child.width + "px" : 150,
|
||||||
title: child.text, align: "center"
|
title: child.text, align: "center"
|
||||||
})) : []
|
})) : []
|
||||||
})),
|
}))
|
||||||
dataSource: list || []
|
|
||||||
}, () => {
|
}, () => {
|
||||||
this.postMessageToChild({
|
this.postMessageToChild({
|
||||||
columns: this.state.columns, countResult: this.state.countResult,
|
columns: this.state.columns, countResult: this.state.countResult,
|
||||||
dataSource: this.state.dataSource,
|
dataSource: this.state.dataSource, pageInfo: this.state.pageInfo,
|
||||||
showSum: !_.isEmpty(this.state.countResult)
|
showSum: !_.isEmpty(this.state.countResult)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -195,6 +205,11 @@ class ReportContent extends Component {
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}).catch(() => this.setState({ loading: false }));
|
||||||
};
|
};
|
||||||
handleChangeChartOpts = (chartsType, viewType) => {
|
handleChangeChartOpts = (chartsType, viewType) => {
|
||||||
|
const { loading } = this.state;
|
||||||
|
if (loading) {
|
||||||
|
message.info(getLabel(111, "列表正在加载中,请稍后"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.setState({ chartsInfo: {} });
|
this.setState({ chartsInfo: {} });
|
||||||
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
|
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
|
||||||
const { report: { id: reportId } } = this.props;
|
const { report: { id: reportId } } = this.props;
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,10 @@ const StatisticalScopePicker = (props) => {
|
||||||
<WeaDatePicker
|
<WeaDatePicker
|
||||||
value={startDate} disabled={disabled}
|
value={startDate} disabled={disabled}
|
||||||
disabledDate={(current) => {
|
disabledDate={(current) => {
|
||||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
if (!current || !endDate) return false;
|
||||||
|
const start = moment(startDate || endDate).subtract(11, "months").format("YYYY-MM");
|
||||||
|
const end = moment(startDate).add(12, "months").format("YYYY-MM");
|
||||||
|
return current.getTime() < new Date(start).getTime() || current.getTime() > new Date(endDate || end).getTime();
|
||||||
}}
|
}}
|
||||||
format="YYYY-MM"
|
format="YYYY-MM"
|
||||||
onChange={(val) => onChange([val, endDate], timeType)}
|
onChange={(val) => onChange([val, endDate], timeType)}
|
||||||
|
|
@ -422,7 +425,11 @@ const StatisticalScopePicker = (props) => {
|
||||||
<WeaDatePicker
|
<WeaDatePicker
|
||||||
value={endDate} disabled={disabled}
|
value={endDate} disabled={disabled}
|
||||||
disabledDate={(current) => {
|
disabledDate={(current) => {
|
||||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
if (!current || !startDate) return false;
|
||||||
|
const start = moment(endDate).subtract(12, "months").format("YYYY-MM");
|
||||||
|
const end = moment(endDate || startDate).add(12, "months").format("YYYY-MM");
|
||||||
|
|
||||||
|
return current.getTime() > new Date(end).getTime() || current.getTime() < new Date(startDate || start).getTime();
|
||||||
}}
|
}}
|
||||||
format="YYYY-MM"
|
format="YYYY-MM"
|
||||||
viewAttr={viewAttr}
|
viewAttr={viewAttr}
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,12 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
|
import { WeaLeftRightLayout, WeaLoadingGlobal, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
|
||||||
import { message, Modal } from "antd";
|
import { message, Modal } from "antd";
|
||||||
import LeftTab from "./components/leftTab";
|
import LeftTab from "./components/leftTab";
|
||||||
import ReportContent from "./components/reportContent";
|
import ReportContent from "./components/reportContent";
|
||||||
import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide";
|
import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide";
|
||||||
import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
|
import { exportDataReport, reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
|
||||||
import { convertToUrlString } from "../../util/url";
|
|
||||||
import TopBtns from "./components/topBtns";
|
import TopBtns from "./components/topBtns";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -92,6 +91,10 @@ class Index extends Component {
|
||||||
* Date: 2023/4/24
|
* Date: 2023/4/24
|
||||||
*/
|
*/
|
||||||
exportData = () => {
|
exportData = () => {
|
||||||
|
if (this.reportRef.state.loading) {
|
||||||
|
message.info(getLabel(111, "列表正在加载中,请稍后"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
const { report } = this.state;
|
const { report } = this.state;
|
||||||
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report;
|
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report;
|
||||||
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
||||||
|
|
@ -99,7 +102,8 @@ class Index extends Component {
|
||||||
id, dimensionId, isShare,
|
id, dimensionId, isShare,
|
||||||
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
||||||
};
|
};
|
||||||
window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?${convertToUrlString(payload)}`, "_blank");
|
WeaLoadingGlobal.start();
|
||||||
|
const promise = exportDataReport(payload);
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { WeaFormItem, WeaSearchGroup } from "ecCom";
|
import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
|
||||||
import { WeaSwitch } from "comsMobx";
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
|
||||||
export const renderRuleForm = (form, condition, onChange) => {
|
export const renderRuleForm = (form, condition, onChange) => {
|
||||||
const { isFormInit } = form;
|
const { isFormInit } = form;
|
||||||
const formParams = form.getFormParams();
|
const formParams = form.getFormParams();
|
||||||
|
|
@ -15,7 +17,11 @@ export const renderRuleForm = (form, condition, onChange) => {
|
||||||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||||
tipPosition="bottom">
|
tipPosition="bottom">
|
||||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={onChange}/>
|
<WeaSwitch
|
||||||
|
fieldConfig={fields} form={form} formParams={formParams}
|
||||||
|
onChange={v => getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)}
|
||||||
|
onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })}
|
||||||
|
/>
|
||||||
</WeaFormItem>),
|
</WeaFormItem>),
|
||||||
colSpan: 1,
|
colSpan: 1,
|
||||||
hide: fields.hide
|
hide: fields.hide
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ class RuleConfig extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 };
|
this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 };
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
|
this.handleDebounce = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
@ -116,16 +117,22 @@ class RuleConfig extends Component {
|
||||||
case "taxAgentShowStatus":
|
case "taxAgentShowStatus":
|
||||||
case "salaryShowStatus":
|
case "salaryShowStatus":
|
||||||
case "adjustShowStatus":
|
case "adjustShowStatus":
|
||||||
const confTitle = {
|
if (!this.handleDebounce) {
|
||||||
welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
|
this.handleDebounce = _.debounce(() => {
|
||||||
welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
|
const confTitle = {
|
||||||
salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
|
welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
|
||||||
extEmpsWitch: getLabel(544097, "开启非系统人员"),
|
welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
|
||||||
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
|
salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
|
||||||
salaryShowStatus: getLabel(111, "显示工资单页签"),
|
extEmpsWitch: getLabel(544097, "开启非系统人员"),
|
||||||
adjustShowStatus: getLabel(111, "显示调薪记录页签")
|
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
|
||||||
};
|
salaryShowStatus: getLabel(111, "显示工资单页签"),
|
||||||
this.unifiedSettings(key, confTitle[key]);
|
adjustShowStatus: getLabel(111, "显示调薪记录页签")
|
||||||
|
};
|
||||||
|
this.unifiedSettings(key, confTitle[key]);
|
||||||
|
this.handleDebounce = null;
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
this.handleDebounce();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
|
import { Dropdown, Menu } from "antd";
|
||||||
import * as API from "../../../apis/taxAgent";
|
import * as API from "../../../apis/taxAgent";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -114,6 +115,17 @@ class TaxAgentTable extends Component {
|
||||||
<a href="javaScript:void(0);" style={{ marginLeft: 10 }}
|
<a href="javaScript:void(0);" style={{ marginLeft: 10 }}
|
||||||
onClick={() => onOperate("delete", record.id)}>{getLabel(535052, "删除")}</a>
|
onClick={() => onOperate("delete", record.id)}>{getLabel(535052, "删除")}</a>
|
||||||
}
|
}
|
||||||
|
<Dropdown
|
||||||
|
overlay={
|
||||||
|
<Menu>
|
||||||
|
<Menu.Item>
|
||||||
|
<a href="javascript:void(0)" style={{ marginLeft: 10 }}
|
||||||
|
onClick={() => onOperate("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||||
|
</Menu.Item>
|
||||||
|
</Menu>
|
||||||
|
}>
|
||||||
|
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||||
|
</Dropdown>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
.ant-col-10 {
|
.ant-col-10 {
|
||||||
span:nth-child(2) {
|
span:nth-child(2) {
|
||||||
margin-top: -6px;
|
//margin-top: -6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import ComHint from "./components/comHint";
|
||||||
import TaxAgentTable from "./components/taxAgentTable";
|
import TaxAgentTable from "./components/taxAgentTable";
|
||||||
import TaxAgentSlide from "./components/taxAgentSlide";
|
import TaxAgentSlide from "./components/taxAgentSlide";
|
||||||
import * as API from "../../apis/taxAgent";
|
import * as API from "../../apis/taxAgent";
|
||||||
|
import LogDialog from "../../components/logViewModal";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
@ -24,7 +25,9 @@ class TaxAgent extends Component {
|
||||||
taxAgentSlideProps: {
|
taxAgentSlideProps: {
|
||||||
isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"),
|
isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"),
|
||||||
taxAgentId: "", current: 0, salaryOn: true
|
taxAgentId: "", current: 0, salaryOn: true
|
||||||
}
|
},
|
||||||
|
logDialogVisible: false,
|
||||||
|
filterConditions: "[]"
|
||||||
};
|
};
|
||||||
this.taxAgentTableRef = null;
|
this.taxAgentTableRef = null;
|
||||||
}
|
}
|
||||||
|
|
@ -165,6 +168,12 @@ class TaxAgent extends Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "log":
|
||||||
|
this.setState({
|
||||||
|
logDialogVisible: true,
|
||||||
|
filterConditions: itemId ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${itemId}\"}]` : "[]"
|
||||||
|
});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -173,7 +182,7 @@ class TaxAgent extends Component {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
searchValue, decentralization, taxAgentSlideProps,
|
searchValue, decentralization, taxAgentSlideProps,
|
||||||
permission, syncLoading
|
permission, syncLoading, logDialogVisible, filterConditions
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button type="primary" onClick={this.taxAgentRangeSync}
|
<Button type="primary" onClick={this.taxAgentRangeSync}
|
||||||
|
|
@ -202,6 +211,13 @@ class TaxAgent extends Component {
|
||||||
icon={<i className="icon-coms-fa"/>}
|
icon={<i className="icon-coms-fa"/>}
|
||||||
iconBgcolor="#F14A2D"
|
iconBgcolor="#F14A2D"
|
||||||
buttons={btns}
|
buttons={btns}
|
||||||
|
showDropIcon onDropMenuClick={key => this.handleOperate(key)}
|
||||||
|
dropMenuDatas={[
|
||||||
|
{
|
||||||
|
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||||
|
content: getLabel(545781, "操作日志")
|
||||||
|
}
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<div className="comContent">
|
<div className="comContent">
|
||||||
{
|
{
|
||||||
|
|
@ -226,6 +242,9 @@ class TaxAgent extends Component {
|
||||||
onOk={() => this.taxAgentTableRef.getTaxAgentList()}
|
onOk={() => this.taxAgentTableRef.getTaxAgentList()}
|
||||||
onCancel={(isUpdate = false) => this.handelResetSlide(isUpdate)}
|
onCancel={(isUpdate = false) => this.handelResetSlide(isUpdate)}
|
||||||
/>
|
/>
|
||||||
|
{/*操作日志*/}
|
||||||
|
<LogDialog visible={logDialogVisible} logFunction="taxagent" filterConditions={filterConditions}
|
||||||
|
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -128,13 +128,14 @@ export const salaryItemFields = [
|
||||||
viewAttr: 2,
|
viewAttr: 2,
|
||||||
tip: ""
|
tip: ""
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// key: "defaultValue",
|
key: "defaultValue",
|
||||||
// label: "默认值",
|
label: "默认值",
|
||||||
// type: "INPUT",
|
type: "INPUT",
|
||||||
// viewAttr: 2,
|
viewAttr: 2,
|
||||||
// tip: ""
|
precision: 2,
|
||||||
// },
|
tip: ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "formulaContent",
|
key: "formulaContent",
|
||||||
label: "公式",
|
label: "公式",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
|
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
|
||||||
import { renderLoading } from "../../util";
|
import { renderLoading, toDecimal_n } from "../../util";
|
||||||
import CustomTab from "../../components/customTab";
|
import CustomTab from "../../components/customTab";
|
||||||
import SystemSalaryItemModal from "./systemSalaryItemModal";
|
import SystemSalaryItemModal from "./systemSalaryItemModal";
|
||||||
import { columns } from "./columns";
|
import { columns } from "./columns";
|
||||||
|
|
@ -314,16 +314,21 @@ export default class SalaryItem extends React.Component {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
saveItem(payload, continueFlag).then(() => {
|
const { pattern, defaultValue, dataType, ...extra } = payload;
|
||||||
getTableDatas({ ...this.state.searchParams }).then(res => {
|
saveItem({
|
||||||
this.setState({
|
...extra, pattern, dataType,
|
||||||
searchParams: {
|
defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue
|
||||||
...this.state.searchParams,
|
}, continueFlag)
|
||||||
total: res.total
|
.then(() => {
|
||||||
}
|
getTableDatas({ ...this.state.searchParams }).then(res => {
|
||||||
|
this.setState({
|
||||||
|
searchParams: {
|
||||||
|
...this.state.searchParams,
|
||||||
|
total: res.total
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderCustomOperate = () => {
|
const renderCustomOperate = () => {
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,16 @@ export const patternOptions = [
|
||||||
key: "8",
|
key: "8",
|
||||||
showname: "8",
|
showname: "8",
|
||||||
selected: false
|
selected: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "9",
|
||||||
|
showname: "9",
|
||||||
|
selected: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "10",
|
||||||
|
showname: "10",
|
||||||
|
selected: false
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class SalaryItemForm extends Component {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
label: getLabel(item.lanId, item.label),
|
label: getLabel(item.lanId, item.label),
|
||||||
display: ((!isLedger && key === "width") || key === "sortedIndex")
|
display: !isLedger
|
||||||
};
|
};
|
||||||
case "useInEmployeeSalary":
|
case "useInEmployeeSalary":
|
||||||
return {
|
return {
|
||||||
|
|
@ -88,7 +88,7 @@ class SalaryItemForm extends Component {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
||||||
display: valueType && valueType.toString() === "1",
|
display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0,
|
||||||
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
|
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
|
||||||
};
|
};
|
||||||
case "formulaContent":
|
case "formulaContent":
|
||||||
|
|
@ -122,6 +122,8 @@ class SalaryItemForm extends Component {
|
||||||
return { ...item, type: v === "number" ? "INPUTNUMBER" : "INPUT" };
|
return { ...item, type: v === "number" ? "INPUTNUMBER" : "INPUT" };
|
||||||
} else if (key === "valueType" && item.key === "defaultValue") {
|
} else if (key === "valueType" && item.key === "defaultValue") {
|
||||||
return { ...item, display: v === "1" };
|
return { ...item, display: v === "1" };
|
||||||
|
} else if (key === "pattern" && item.key === "defaultValue") {
|
||||||
|
return { ...item, precision: parseInt(v) };
|
||||||
} else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) {
|
} else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
|
@ -133,11 +135,11 @@ class SalaryItemForm extends Component {
|
||||||
return { ...item };
|
return { ...item };
|
||||||
})
|
})
|
||||||
}, () => {
|
}, () => {
|
||||||
// if (key === "valueType" && !this.props.isLedger) {
|
if (key === "dataType") {
|
||||||
// onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
|
onChangeFieldsItem({ [key]: v, defaultValue: "" });
|
||||||
// } else {
|
} else {
|
||||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -148,7 +150,7 @@ class SalaryItemForm extends Component {
|
||||||
<WeaSearchGroup showGroup needTigger={false}>
|
<WeaSearchGroup showGroup needTigger={false}>
|
||||||
{
|
{
|
||||||
_.map(salaryItemFieldsList, item => {
|
_.map(salaryItemFieldsList, item => {
|
||||||
const { key, label, type, viewAttr, tip, options, display = true, multiple = false } = item;
|
const { key, label, type, viewAttr, tip, options, display = true, multiple = false, precision = 0 } = item;
|
||||||
const value = !_.isNil(request[key]) ? request[key].toString() : "";
|
const value = !_.isNil(request[key]) ? request[key].toString() : "";
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
{
|
{
|
||||||
|
|
@ -181,9 +183,10 @@ class SalaryItemForm extends Component {
|
||||||
(type === "INPUTNUMBER" && display) ?
|
(type === "INPUTNUMBER" && display) ?
|
||||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<WeaInputNumber value={value} viewAttr={viewAttr} precision={0}
|
<WeaInputNumber
|
||||||
min={key === "width" ? 0 : -99999}
|
value={key === "width" && value ? parseInt(value) : value}
|
||||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
precision={precision} viewAttr={viewAttr}
|
||||||
|
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
||||||
{key === "width" && display &&
|
{key === "width" && display &&
|
||||||
<span style={{ paddingLeft: 10, position: "absolute", marginTop: 4 }}>px</span>}
|
<span style={{ paddingLeft: 10, position: "absolute", marginTop: 4 }}>px</span>}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,9 @@ class PlanSetTable extends Component {
|
||||||
{ key: "5", showname: "5" },
|
{ key: "5", showname: "5" },
|
||||||
{ key: "6", showname: "6" },
|
{ key: "6", showname: "6" },
|
||||||
{ key: "7", showname: "7" },
|
{ key: "7", showname: "7" },
|
||||||
{ key: "8", showname: "8" }
|
{ key: "8", showname: "8" },
|
||||||
|
{ key: "9", showname: "9" },
|
||||||
|
{ key: "10", showname: "10" }
|
||||||
]} viewAttr={showOperateBtn ? 2 : 1}
|
]} viewAttr={showOperateBtn ? 2 : 1}
|
||||||
onChange={validNum => onEdit({
|
onChange={validNum => onEdit({
|
||||||
record: { ...record, validNum },
|
record: { ...record, validNum },
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ export class payrollStore {
|
||||||
@observable salarySendDetailDataSource = []; // 详情列表DataSource
|
@observable salarySendDetailDataSource = []; // 详情列表DataSource
|
||||||
@observable salarySendDetailTableStore = new TableStore(); // 详情列表store
|
@observable salarySendDetailTableStore = new TableStore(); // 详情列表store
|
||||||
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
|
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
|
||||||
|
@observable salaryTableStore = new TableStore();//薪资查看详情页表格Store
|
||||||
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
|
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
|
||||||
@observable detailListCondition = []; // 详情页搜索条件
|
@observable detailListCondition = []; // 详情页搜索条件
|
||||||
@observable salarySendDetailPageInfo = {};
|
@observable salarySendDetailPageInfo = {};
|
||||||
|
|
@ -458,7 +459,9 @@ export class payrollStore {
|
||||||
departmentIds: form.departmentIds ? form.departmentIds.split(",") : [],
|
departmentIds: form.departmentIds ? form.departmentIds.split(",") : [],
|
||||||
subCompanyIds: form.subCompanyIds ? form.subCompanyIds.split(",") : []
|
subCompanyIds: form.subCompanyIds ? form.subCompanyIds.split(",") : []
|
||||||
};
|
};
|
||||||
|
this.loading = true;
|
||||||
API.getInfoList(params).then(res => {
|
API.getInfoList(params).then(res => {
|
||||||
|
this.loading = false;
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
this.salaryGrantTableStore = res.data.columns;
|
this.salaryGrantTableStore = res.data.columns;
|
||||||
this.salaryGrantDataSource = res.data.list;
|
this.salaryGrantDataSource = res.data.list;
|
||||||
|
|
@ -470,7 +473,7 @@ export class payrollStore {
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败");
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
});
|
}).catch(() => this.loading = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 工资单-工资单发放详情列表
|
// 工资单-工资单发放详情列表
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,12 @@ export class PayrollFilesStore {
|
||||||
@action("薪资档案-列表查询")
|
@action("薪资档案-列表查询")
|
||||||
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue;
|
const { departmentIds, positionIds, subcompanyIds, statuses, taxAgentIds, ...extra } = searchItemsValue;
|
||||||
API.queryList({
|
API.queryList({
|
||||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||||
positionIds: positionIds ? positionIds.split(",") : [],
|
positionIds: positionIds ? positionIds.split(",") : [],
|
||||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||||
|
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
|
||||||
statuses: statuses ? statuses.split(",") : [],
|
statuses: statuses ? statuses.split(",") : [],
|
||||||
...payload, ...extra, url
|
...payload, ...extra, url
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -83,3 +83,27 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//薪资账套-工资类型下拉选项样式自定义
|
||||||
|
.reportTypeName-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.reportTypeName {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 8px;
|
||||||
|
align-items: center;
|
||||||
|
color: #ffcd50;
|
||||||
|
border: 1px solid #ffde8a;
|
||||||
|
background-color: #fff5db;
|
||||||
|
border-radius: 2px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.danger {
|
||||||
|
color: #ff666a !important;
|
||||||
|
border: 1px solid #ffc1c3 !important;
|
||||||
|
background-color: #ffdfe0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue