diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js
index 85805d5c..5f74cc6b 100644
--- a/pc4mobx/hrmSalary/apis/calculate.js
+++ b/pc4mobx/hrmSalary/apis/calculate.js
@@ -278,5 +278,23 @@ export const getCompareSobConfig = params => {
export const updateSobConfig = 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", {});
+};
diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js
index ccc70771..553733d0 100644
--- a/pc4mobx/hrmSalary/apis/index.js
+++ b/pc4mobx/hrmSalary/apis/index.js
@@ -37,7 +37,7 @@ export const getDetailChanges = params => {
};
//获取薪资账套全列表
export const getSalarysobListAll = params => {
- return postFetch("/api/bs/hrmsalary/salarysob/listAll", params);
+ return postFetch("/api/bs/hrmsalary/salarysob/listAllByAuth", params);
};
//补算
export const supplementAcctRecord = (params) => {
diff --git a/pc4mobx/hrmSalary/apis/item.js b/pc4mobx/hrmSalary/apis/item.js
index ab4ff6c2..180b22d0 100644
--- a/pc4mobx/hrmSalary/apis/item.js
+++ b/pc4mobx/hrmSalary/apis/item.js
@@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
-import { postFetch } from "../util/request";
+import { postExportFetch, postFetch } from "../util/request";
// 薪资项目-获取列表
export const getItemList = params => {
@@ -84,3 +84,19 @@ export const getSalarySobBySalaryItem = params => {
export const syncSalaryItemToSalarySobItem = params => {
return postFetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem", params);
};
+
+// 导出薪资项目
+export const exportSalaryitem = (params) => {
+ return postExportFetch("/api/bs/hrmsalary/salaryitem/export", params);
+};
+// 下载模板
+export const downloadTemplate = (params) => {
+ return postExportFetch("/api/bs/hrmsalary/salaryitem/downloadTemplate", params);
+};
+
+// 导入薪资项目
+export const importSalaryitem = (params) => {
+ return postFetch("/api/bs/hrmsalary/salaryitem/import", params);
+};
+
+
diff --git a/pc4mobx/hrmSalary/apis/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js
index 9c9d625e..59f898d4 100644
--- a/pc4mobx/hrmSalary/apis/ledger.js
+++ b/pc4mobx/hrmSalary/apis/ledger.js
@@ -25,6 +25,10 @@ export const deleteLedger = params => {
export const getLedgerBasicForm = 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 => {
@@ -143,6 +147,10 @@ export const getBackitemForm = params => {
export const taxreportruleGetForm = 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 => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/adduprule/getForm", "GET", params);
@@ -151,6 +159,10 @@ export const addupruleGetForm = params => {
export const taxreportruleSave = 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 => {
return postFetch("/api/bs/hrmsalary/salarysob/adduprule/save", params);
diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js
index 8ca9fab7..48fcecb2 100644
--- a/pc4mobx/hrmSalary/apis/payroll.js
+++ b/pc4mobx/hrmSalary/apis/payroll.js
@@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
-import { postFetch } from "../util/request";
+import { postExportFetch, postFetch } from "../util/request";
import { convertToUrlString } from "../util/url";
//工资单-工资单发放列表
@@ -248,3 +248,8 @@ export const genPdfBeforeExport = (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);
+};
+
diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js
index b5f4f87f..eebd320f 100644
--- a/pc4mobx/hrmSalary/apis/ruleconfig.js
+++ b/pc4mobx/hrmSalary/apis/ruleconfig.js
@@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
-import { postFetch } from "../util/request";
+import { postExportFetch, postFetch } from "../util/request";
//通用字典表 {enumClass:""}
export const commonEnumList = (params) => {
@@ -75,3 +75,15 @@ export const reportGetForm = params => {
export const saveSalarySendFeedback = (params) => {
return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
};
+// 数据分析列表导出
+export const exportDataReport = (params) => {
+ return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportData", params);
+};
+//迁入配置
+export const uploadConfig = (params) => {
+ return postFetch("/api/bs/hrmsalary/sys/uploadConfig", params);
+};
+//迁入配置
+export const downloadConfig = (params) => {
+ return postExportFetch("/api/bs/hrmsalary/sys/downloadConfig", params);
+};
diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
index b6fd6ffb..d0718a2f 100644
--- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
+++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
@@ -5,13 +5,24 @@
* Date: 2022/11/30
*/
import React, { Component } from "react";
-import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
+import {
+ WeaBrowser,
+ WeaDialog,
+ WeaFormItem,
+ WeaHelpfulTip,
+ WeaLocaleProvider,
+ WeaSearchGroup,
+ WeaSelect,
+ WeaTextarea
+} from "ecCom";
import { Button, message, Modal } from "antd";
import { getTaxAgentRangeForm } from "../../apis/taxAgent";
import { commonEnumList } from "../../apis/ruleconfig";
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
import "./index.less";
+const getLabel = WeaLocaleProvider.getLabel;
+
class PersonalScopeModal extends Component {
constructor(props) {
super(props);
@@ -91,6 +102,11 @@ class PersonalScopeModal extends Component {
key: "POSITION",
showname: "岗位",
selected: false
+ },
+ {
+ key: "SQL",
+ showname: "SQL",
+ selected: false
}
];
this.setState({
@@ -124,7 +140,9 @@ class PersonalScopeModal extends Component {
const payload = {
employeeStatus: status.split(","),
includeType,
- targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })),
+ targetParams: targetType !== "SQL" ?
+ _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) :
+ [{ targetType, targetId: "0", target: targetTypeIds }],
[saveKeyVal["key"]]: saveKeyVal["value"]
};
this.setState({ loading: true });
@@ -156,6 +174,12 @@ class PersonalScopeModal extends Component {
case "POSITION":
browserType = { ...browserType, type: 278, title: "岗位选择" };
break;
+ case "SQL":
+ return
+ this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>
+ }/>
+
;
default:
break;
}
@@ -259,3 +283,13 @@ class PersonalScopeModal extends Component {
}
export default PersonalScopeModal;
+
+export const SQLHelpTip = () => {
+ return
+
{getLabel(111, "注意事项:")}
+
{getLabel(111, "1、sql需返回人员id")}
+
{getLabel(111, "2、sql结尾不需要 ; go /等符号")}
+
{getLabel(111, "使用例子:定义获取岗位是开发的人员")}
+
{getLabel(111, "select id from hrmresource where JOBTITLE = 17")}
+
;
+};
diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js
index a98b2d58..5ca73075 100644
--- a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js
+++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js
@@ -33,7 +33,8 @@ class ImpStep1 extends Component {
multiple: false,
action: "/api/doc/upload/uploadFile",
fileList,
- onChange: this.handleChange
+ onChange: this.handleChange,
+ ...this.props.customDragger
};
return (
@@ -45,7 +46,7 @@ class ImpStep1 extends Component {
{this.props.importParams}
}
- {getLabel(543202, "导入Excel")}
+ {_.isEmpty(this.props.customDragger) && {getLabel(543202, "导入Excel")}
}
@@ -56,36 +57,39 @@ class ImpStep1 extends Component {
+ {
+ (_.isNil(this.props.customDragger) || this.props.customDragger.showOperateDesc) &&
+
+
+
{getLabel(27577, "操作步骤")}
+
+ {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}
+ {
+ typeof this.props.link === "string" ?
+ {getLabel(543207, "点击这里下载模板")} :
+ {getLabel(543207, "点击这里下载模板")}
+ }
+
+ {this.props.exportDataDom}
+
+
{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}
+
{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}
+
+ {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`}
+
+
-
-
{getLabel(27577, "操作步骤")}
-
- {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}
- {
- typeof this.props.link === "string" ?
- {getLabel(543207, "点击这里下载模板")} :
- {getLabel(543207, "点击这里下载模板")}
- }
-
- {this.props.exportDataDom}
-
-
{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}
-
{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}
-
- {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`}
-
-
-
-
-
{getLabel(543223, "Excel文件说明")}
-
{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}
-
{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}
-
{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}
-
-
+
+
{getLabel(543223, "Excel文件说明")}
+
{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}
+
{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}
+
{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}
+
+
+ }
);
}
diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js
index df9575ef..82ed0adb 100644
--- a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js
+++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js
@@ -7,6 +7,7 @@
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import successImg from "../../importModal/success.svg";
+import MoveInResult from "./moveInResult";
const getLabel = WeaLocaleProvider.getLabel;
@@ -16,32 +17,41 @@ class ImpStep3 extends Component {
return (
{
- !_.isEmpty(importResult) ?
-
-

-
- {getLabel(389249, "已导入")}
- {importResult.successCount}
- {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}
- {importResult.errorCount} {getLabel(30690, "条数据")}
-
-
:
-
-
{getLabel(111, "导入失败")}
-
- }
- {
- (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) &&
-
:
+
{
- title: getLabel(25700, "错误信息"),
- dataIndex: "message"
+ !_.isEmpty(importResult) ?
+
+

+ {
+ importResult.successCount &&
+
+ {getLabel(389249, "已导入")}
+ {importResult.successCount}
+ {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}
+ {importResult.errorCount} {getLabel(30690, "条数据")}
+
+ }
+
:
+
+
{getLabel(111, "导入失败")}
+
}
- ]}
- dataSource={importResult.errorData || importResult.errorNotice} pagination={false}
- scroll={{ y: `calc(100vh - 387px)` }}
- />
+ {
+ !_.isEmpty(importResult) && (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) &&
+
+ }
+
}
);
diff --git a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js
new file mode 100644
index 00000000..2a6358a6
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js
@@ -0,0 +1,56 @@
+/*
+ * 薪酬迁入结果展示
+ *
+ * @Author: 黎永顺
+ * @Date: 2024/8/16
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTable } from "ecCom";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class MoveInResult extends Component {
+ downloadTxtfile = (value, type) => {
+ if (!value) return;
+ const element = document.createElement("a");
+ const file = new Blob([value], { type: "text/plain" });
+ element.href = URL.createObjectURL(file);
+ element.download = `导入${type}信息.txt`;
+ document.body.appendChild(element);
+ element.click();
+ };
+
+ render() {
+ const { dataSource } = this.props;
+ return (
+ (
+ this.downloadTxtfile(record.success.join("\n"), getLabel(111, "成功"))}>
+ {record.success.length}
+ this.downloadTxtfile(record.warning.join("\n"), getLabel(111, "警告"))}>{record.warning.length}
+ this.downloadTxtfile(record.error.join("\n"), getLabel(111, "错误"))}>{record.error.length}
+ )
+ }
+ ]}
+ dataSource={dataSource} pagination={false} bordered scroll={{ y: `calc(100vh - 333px)` }}
+ />
+ );
+ }
+}
+
+export default MoveInResult;
diff --git a/pc4mobx/hrmSalary/components/importDialog/index.js b/pc4mobx/hrmSalary/components/importDialog/index.js
index 796358d3..41e76e23 100644
--- a/pc4mobx/hrmSalary/components/importDialog/index.js
+++ b/pc4mobx/hrmSalary/components/importDialog/index.js
@@ -36,13 +36,17 @@ class Index extends Component {
}
renderChildren = () => {
- const { current } = this.state, { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props;
+ const { current } = this.state, {
+ importParams, link, excludeKey, importResult,
+ exportDataDom = null, customDragger
+ } = this.props;
const scrollHeight = this.importRef ? this.importRef.state.height - 232 : 606.6;
let CurrentDom = null;
switch (current) {
case 0:
- CurrentDom = this.step1Ref = dom}/>;
+ CurrentDom =
+ this.step1Ref = dom}/>;
break;
case 1:
CurrentDom = ;
@@ -100,13 +104,16 @@ class Index extends Component {
}
const [file] = fileList;
const { response } = file;
- this.setState({
- current: this.state.current + 1,
- fileid: response.data.fileid
- }, () => {
- !excludeKey && this.props.nextCallback && this.props.nextCallback(this.state.fileid);
- excludeKey && this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
- });
+ if (!excludeKey) {
+ this.setState({
+ current: this.state.current + 1,
+ fileid: response.data.fileid
+ }, () => {
+ this.props.nextCallback && this.props.nextCallback(this.state.fileid);
+ });
+ } else {
+ this.props.nextUplaodCallback && this.props.nextUplaodCallback(response.data.fileid);
+ }
} else {
this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
}
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index c3c33dc8..3751c137 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -24,7 +24,7 @@ import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页
// import Payroll from "./pages/payroll";
import Payroll from "./pages/payrollRelease"; //重构的工资单发放页面
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 DeclareDetail from "./pages/declareDetail";
import DeclareOnlineComparison from "./pages/declareOnlineComparison";
@@ -61,6 +61,7 @@ import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
import TopologyMap from "./pages/topologyMap";
import SupplementaryCalc from "./pages/supplementaryCalc";
+import Layout from "./layout";
//二开页面路由
import PersonalConfirm from "./pages/custom-pages/angli/personalConfirm";
import SalaryAccounting from "./pages/custom-pages/angli/salaryAccounting"
@@ -129,7 +130,7 @@ const DataAcquisition = (props) => props.children;
// intelligentCalculateSalarySettings 智能算薪
const Routes = (
-
+
@@ -139,8 +140,8 @@ const Routes = (
-
-
+
+
diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js
new file mode 100644
index 00000000..f1ad9a67
--- /dev/null
+++ b/pc4mobx/hrmSalary/layout.js
@@ -0,0 +1,53 @@
+/*
+ * 薪酬管理-
+ * layout组件
+ * @Author: 黎永顺
+ * @Date: 2024/8/15
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTools } from "ecCom";
+import stores from "./stores";
+
+const { ls } = WeaTools;
+const { getLabel } = WeaLocaleProvider;
+
+class Layout extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {};
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
+ if (window.location.hash.indexOf("payroll") !== -1) {
+ window.localStorage.removeItem("template-basedata");
+ window.localStorage.removeItem("salary-showset");
+ }
+ }
+ }
+
+ componentDidMount() {
+ if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
+ const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css";
+ const link = document.createElement("link");
+ link.setAttribute("rel", "stylesheet");
+ link.setAttribute("type", "text/css");
+ link.setAttribute("href", src);
+ let header = document.getElementById("container");
+ header.appendChild(link);
+ top.$(".ant-message").remove();
+ window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
+ }
+ }
+
+ render() {
+ return (
+ {this.props.children}
+ );
+ }
+}
+
+export default Layout;
diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js
index d2c71fb3..d1fd2bb9 100644
--- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js
+++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js
@@ -97,7 +97,7 @@ class Index extends Component {
effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "",
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;
}, 500);
}
diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js
index 9d8d2816..3f01a8bf 100644
--- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js
+++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js
@@ -99,13 +99,17 @@ class SalaryDetails extends Component {
}).catch(() => this.setState({ loading: false }));
};
handleExportSalaryList = (key) => {
+ const { attendanceStore: { tableStore } } = this.props;
let { selectedRowKeys, payload } = this.state;
if (key === "SELECTED" && selectedRowKeys.length === 0) {
message.warning(getLabel(543345, "请选择需要导出的数据!"));
return;
}
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 = () => {
const { attendanceStore: { tableStore } } = this.props;
diff --git a/pc4mobx/hrmSalary/pages/appConfig/index.js b/pc4mobx/hrmSalary/pages/appConfig/index.js
index a7b3d7ce..e13000eb 100644
--- a/pc4mobx/hrmSalary/pages/appConfig/index.js
+++ b/pc4mobx/hrmSalary/pages/appConfig/index.js
@@ -5,7 +5,17 @@
* Date: 2022-09-27 18:17:02
*/
import React, { Component } from "react";
-import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaTop } from "ecCom";
+import {
+ WeaCheckbox,
+ WeaDatePicker,
+ WeaFormItem,
+ WeaInput,
+ WeaLoadingGlobal,
+ WeaLocaleProvider,
+ WeaSearchGroup,
+ WeaTop
+} from "ecCom";
+import MoveInDialog from "./moveInDialog";
import * as API from "../../apis/ruleconfig";
import { Button, message } from "antd";
import "./index.less";
@@ -18,6 +28,7 @@ const Input = (props) => {
);
};
+const getLabel = WeaLocaleProvider.getLabel;
class AppConfig extends Component {
constructor(props) {
@@ -28,7 +39,8 @@ class AppConfig extends Component {
isLog: "0",
openFormulaForcedEditing: "0",
version: "",
- loading: false
+ loading: false,
+ moveInDialog: { visible: false, title: getLabel(111, "数据迁入") }
};
}
@@ -62,10 +74,29 @@ class AppConfig extends Component {
}
});
};
+ handleOperate = (type) => {
+ switch (type) {
+ case "import":
+ this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: true } });
+ break;
+ case "export":
+ WeaLoadingGlobal.start();
+ const promise = API.downloadConfig();
+ break;
+ default:
+ break;
+ }
+ };
render() {
- const { openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version } = this.state;
- const btns = [];
+ const {
+ openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version, moveInDialog
+ } = this.state;
+ const btns = [
+ ,
+ ,
+
+ ];
const items = [
{
com: Input({
@@ -115,6 +146,8 @@ class AppConfig extends Component {
buttons={btns}
/>
+ this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: false } })}/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js
new file mode 100644
index 00000000..afdf3765
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js
@@ -0,0 +1,73 @@
+/*
+ * 数据迁入
+ *
+ * @Author: 黎永顺
+ * @Date: 2024/8/12
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { message } from "antd";
+import ImportDialog from "../../components/importDialog";
+import * as API from "../../apis/ruleconfig";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class MoveInDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ importDialog: {
+ nextloading: false, importResult: {}, imageId: "",
+ customDragger: { showOperateDesc: false, accept: ".xml" }
+ }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) {
+ this.setState({
+ importDialog: {
+ ...this.state.importDialog,
+ importResult: {}, imageId: "",
+ customDragger: { showOperateDesc: false, accept: ".xml" }
+ }
+ });
+ }
+ }
+
+ handleImport = (payload) => {
+ const { importDialog } = this.state;
+ this.setState({ importDialog: { ...importDialog, nextloading: true } });
+ API.uploadConfig({ ...payload }).then(({ data, status, errormsg }) => {
+ this.setState({ importDialog: { ...importDialog, nextloading: false } });
+ if (status) {
+ this.setState({
+ importDialog: { ...importDialog, ...payload, importResult: data }
+ });
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
+ };
+
+ render() {
+ const { importDialog } = this.state;
+ return (
+ this.setState({
+ importDialog: {
+ ...importDialog, importResult: {}, imageId: "", link: ""
+ }
+ })}
+ nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
+ nextUplaodCallback={imageId => this.handleImport({ imageId })}
+ />
+ );
+ }
+}
+
+export default MoveInDialog;
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js
index eb4deb00..f65b40e6 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js
@@ -276,13 +276,21 @@ class Index extends Component {
this.setState({ selectedKey: v }, () => this.queryPCList())}
+ onChange={v => this.setState({
+ selectedKey: v,
+ pageInfo: { ...pageInfo, current: 1 }
+ }, () => this.queryPCList())}
+ onSearch={v => this.setState({
+ pageInfo: { ...pageInfo, current: 1 }
+ }, () => this.queryPCList())}
+ onAdSearch={v => this.setState({
+ pageInfo: { ...pageInfo, current: 1 }
+ }, () => this.queryPCList())}
buttons={this.renderTabBtns()} searchType={["base", "advanced"]} advanceHeight={220}
showSearchAd={showSearchAd} setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
searchsAd={getSearchs(PCSearchForm, searchConditions, 2, false)}
onSearchChange={(v) => PCSearchForm.updateFields({ employeeName: v })}
searchsBaseValue={PCSearchForm.getFormParams().employeeName}
- onSearch={this.queryPCList} onAdSearch={this.queryPCList}
onAdReset={() => PCSearchForm.resetForm()} autoCalculateWidth
/>
{
+ 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 this.props.onChange(_.map(this.props.baseInfo, it => {
+ if (fieldCode === it.fieldCode) {
+ return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
+ }
+ return { ...it };
+ }))}/>;
+ };
+
render() {
const { baseInfo } = this.props;
return (
@@ -32,7 +74,7 @@ class EditSalaryBaseInfo extends Component {
{
_.map(baseInfo, (item, index) => {
- const { fieldName, fieldValue } = item;
+ const { fieldName, fieldType, fieldValue, fieldValueObj } = item;
return (
{fieldName}
- {fieldValue}
+
+ {
+ fieldType.indexOf("Browser") !== -1 ?
+ this.renderBrowser({ ...item, fieldValue: fieldValueObj || fieldValue }) :
+ fieldValue
+ }
+
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
index 58f353f1..867ca7ba 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
@@ -271,6 +271,9 @@ class EditCalcTable extends Component {
}
}).catch(() => this.setState({ loading: false }));
};
+ handleQuery = () => {
+ this.setState({ pageInfo: { ...this.state.pageInfo, current: 1 } }, () => this.queryCalcResultList());
+ };
handleBatchEditing = () => {
};
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js
index 16cacd2c..235bac13 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js
@@ -5,7 +5,7 @@
* Date: 2023/9/25
*/
import React, { Component } from "react";
-import { Button, message } from "antd";
+import { Button, message, Modal } from "antd";
import { WeaLocaleProvider, WeaSlideModal, WeaTab } from "ecCom";
import EditSalaryBaseInfo from "./baseInfo";
import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
@@ -87,9 +87,16 @@ class EditSalaryCalcSlide extends Component {
};
save = () => {
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 = {
- salaryAcctEmpId,
+ salaryAcctEmpId, employeeInfos: baseInfo,
items: [
..._.reduce(itemsByGroup, (pre, cur) => {
return [
@@ -97,14 +104,14 @@ class EditSalaryCalcSlide extends Component {
..._.map(cur.salaryItems, it => {
return {
salaryItemId: it.salaryItemId,
- resultValue: (it.dataType === "number" && !!it.resultValue) ? toDecimal_n(it.resultValue, it.pattern || 2) : it.resultValue
+ resultValue: (it.dataType === "number" && !!it.resultValue) ? toDecimal_n(it.resultValue, !_.isNil(it.pattern) ? it.pattern : 2) : it.resultValue
};
})
];
}, []),
...issuedAndReissueItems.map(item => ({
salaryItemId: item.salaryItemId,
- resultValue: (item.dataType === "number" && !!item.resultValue) ? toDecimal_n(item.resultValue, item.pattern || 2) : item.resultValue
+ resultValue: (item.dataType === "number" && !!item.resultValue) ? toDecimal_n(item.resultValue, !_.isNil(item.pattern) ? item.pattern : 2) : item.resultValue
}))
]
};
@@ -133,7 +140,8 @@ class EditSalaryCalcSlide extends Component {
top={0} width={60} height={100} measure={"%"}
direction={"right"} title={this.renderTitle()}
content={
-
+ this.setState({ baseInfo })}/>
this.setState({ selectedKey: v })}
datas={!_.isEmpty(issuedAndReissueItems) ? topTab : topTab.slice(0, 1)}
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
index ee91061b..5a70bb18 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
@@ -12,6 +12,7 @@ import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
import EditCalcTable from "./editCalcTable";
import SalaryMonthTip from "../salaryMonthTip";
import SalaryCalcLayout from "./salaryCalcLayout";
+import PersonAbnormalDialog from "./personAbnormalDialog";
import cs from "classnames";
import "./index.less";
@@ -22,13 +23,14 @@ class Index extends Component {
super(props);
this.state = {
salarySobCycle: {}, showSearchAd: false,
- columnDesc: {}, formulaTd: "", showTotalCell: false
+ columnDesc: {}, formulaTd: "", showTotalCell: false,
+ perAbnormalDialog: { visible: false, salaryAcctRecordId: "" }
};
}
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
onAdSearch = (bool = true) => {
- this.calcTableRef.wrappedInstance.queryCalcResultList();
+ this.calcTableRef.wrappedInstance.handleQuery();
bool && this.openAdvanceSearch();
};
init = async () => {
@@ -50,7 +52,7 @@ class Index extends Component {
};
render() {
- const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
+ const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell, perAbnormalDialog } = this.state;
const { routeParams: { salaryAcctRecordId } } = this.props;
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
return ( this.onAdSearch(false)}>
@@ -65,7 +67,13 @@ class Index extends Component {
style={{ marginLeft: 10 }}
/>
-
+
+
this.setState({
+ perAbnormalDialog: { visible: true, salaryAcctRecordId }
+ })}>{getLabel(111, "未报送人员")}:{salarySobCycle.abnormalEmployeeNum}
+
+
@@ -87,6 +95,10 @@ class Index extends Component {
this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
{...this.props} showTotalCell={showTotalCell}
onShowFormulaTd={this.handleShowFormulaTa}/>
+ this.setState({
+ perAbnormalDialog: { ...perAbnormalDialog, visible: false }
+ })}/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
index 3d23810b..0514dc38 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
@@ -14,6 +14,11 @@
padding-bottom: 0;
height: 46px;
margin-bottom: 0;
+
+ .abnormal-text {
+ color: #ef9502;
+ cursor: pointer;
+ }
}
.formula-detail-area {
@@ -28,6 +33,15 @@
display: flex;
align-items: center;
width: 100%;
+
+ & > span:first-child {
+ display: inline-block;
+ min-width: 44px;
+ }
+
+ & > span:last-child {
+ flex: 1;
+ }
}
}
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/personAbnormalDialog.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/personAbnormalDialog.js
new file mode 100644
index 00000000..1498fc02
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/personAbnormalDialog.js
@@ -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 (
+
+
+
+
+
+ );
+ }
+}
+
+export default PersonAbnormalDialog;
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
index 17d4b09e..213c802b 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
@@ -9,7 +9,7 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { inject, observer } from "mobx-react";
import Layout from "./layout";
-import { acctresultAccounting, getCalculateProgress, getExportField } from "../../../apis/calculate";
+import * as API from "../../../apis/calculate";
import AdvanceInputBtn from "./components/advanceInputBtn";
import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
import SalaryEditCalc from "./components/salaryEditCalc";
@@ -29,7 +29,7 @@ class Index extends Component {
constructor(props) {
super(props);
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: [] },
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
accountExceptInfo: "" //核算报错信息,
@@ -61,11 +61,11 @@ class Index extends Component {
this.setState({ progress: 0 });
let payload = { salaryAcctRecordId };
if (key === "calc_selected") payload = _.assign(payload, { ids: selectedRowKeys });
- acctresultAccounting(payload).then(() => {
+ API.acctresultAccounting(payload).then(() => {
this.setState({ progressVisible: true });
if (this.timer) clearInterval(this.timer);
this.timer = setInterval(() => {
- getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
+ API.getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
let progress = data.progress;
if (progress === 1 && this.timer) {
clearInterval(this.timer);
@@ -105,7 +105,7 @@ class Index extends Component {
window.open(`${window.ecologyContentPath || ""}${url}`, "_blank");
break;
case "export_custom":
- getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
+ API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
if (status) {
const { checkItems, itemsByGroup } = data;
this.setState({
@@ -133,8 +133,71 @@ class Index extends Component {
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 = () => {
- const { selectedKey, accountExceptInfo } = this.state;
+ const { selectedKey, accountExceptInfo, loading } = this.state;
let reqBtns = [];
switch (selectedKey) {
case "calc":
@@ -155,6 +218,10 @@ class Index extends Component {
this.doCacl("ALL")} overlay={menu} type="primary">
{getLabel(543545, "核算所有人")}
,
+
,
+
,
,
this.calc.openAdvanceSearch()}
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js b/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js
index 33a90a08..9d2ddfce 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js
@@ -40,7 +40,7 @@ class PayrollItemsTable extends Component {
const { canEdit, dataType, pattern } = record;
return dataType === "number" ? onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
/> : ({ ...o, width: 150, fixed: null }))
+ columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
});
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js
index 14de4956..c8fdb4b9 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js
@@ -55,7 +55,7 @@ class AttendanceRefrenceDataModal extends Component {
...item,
items: _.map(items, child => {
const { domkey } = child;
- if (domkey[0] === "salarySobId") {
+ if (domkey[0] === "salarySobIds") {
return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
}
return { ...child };
@@ -77,19 +77,23 @@ class AttendanceRefrenceDataModal extends Component {
refenceform.validateForm().then(f => {
if (f.isValid) {
const payload = refenceform.getFormParams();
- const checkPayload = { salaryYearMonthStr: payload.salaryYearMonth, salarySobId: payload.salarySobId };
+ const checkPayload = {
+ salaryYearMonthStr: payload.salaryYearMonth,
+ salarySobIds: payload.salarySobIds.split(",")
+ };
this.setState({ loading: true });
checkOperation(checkPayload).then(({ status, errormsg: errormessage }) => {
if (status) {
- syncAttendanceRefer(payload).then(({ status, errormsg }) => {
- this.setState({ loading: false });
- if (status) {
- message.success("同步成功");
- onCancel(true);
- } else {
- message.error(errormsg || "同步失败");
- }
- }).catch(() => this.setState({ loading: false }));
+ syncAttendanceRefer({ ...payload, salarySobIds: payload.salarySobIds.split(",") })
+ .then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success("同步成功");
+ onCancel(true);
+ } else {
+ message.error(errormsg || "同步失败");
+ }
+ }).catch(() => this.setState({ loading: false }));
} else {
this.setState({ loading: false });
message.error(errormessage);
@@ -212,9 +216,9 @@ class AttendanceRefrenceDataModal extends Component {
];
return (
-
+
- {getSearchs(refenceform, condition, 1)}
+ {getSearchs(refenceform, condition, 1, false, null, "", "multiple_select")}
{/* 表头设置 */}
this.setState({ targetid: "" })}
>
this.setState({
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
})}
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js
index cb9ce2fe..7a9046ba 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js
@@ -86,6 +86,18 @@ export const paymentBankConditions = [
value: "",
viewAttr: 1,
options: []
+ },
+ {
+ colSpan: 1,
+ conditionType: "SELECT",
+ domkey: ["paymentNumber"],
+ fieldcol: 12,
+ label: "缴款帐号",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ viewAttr: 1,
+ options: []
}
],
defaultshow: true
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js
index 4f6ad59f..6fca282a 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js
@@ -5,9 +5,9 @@
* Date: 2023/8/22
*/
import React, { Component } from "react";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaLocaleProvider, WeaLoadingGlobal } from "ecCom";
import { inject, observer } from "mobx-react";
-import { Button, Dropdown, Menu, message, Modal } from "antd";
+import { Button, message, Modal } from "antd";
import PaymentDialog from "./paymentDialog";
import {
taxPaymentAgreemenPay,
@@ -122,6 +122,7 @@ class PaymentBtn extends Component {
};
getBankAccountInfo = (payload) => {
let loop = () => {
+ WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") });
clearTimeout(this.timer);
this.timer = setTimeout(async () => {
let response = await taxPaymentgetAgreementFeedback(payload);
@@ -129,6 +130,7 @@ class PaymentBtn extends Component {
if (status) {
const { finish, form } = data;
if (finish) {
+ WeaLoadingGlobal.destroy();
const { feedbacks, bankForm } = form;
const { paymentDialog } = this.state;
this.setState({
@@ -155,6 +157,12 @@ class PaymentBtn extends Component {
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
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 };
})
@@ -168,6 +176,7 @@ class PaymentBtn extends Component {
} else {
message.warning(errormsg);
clearTimeout(this.timer);
+ WeaLoadingGlobal.destroy();
}
}, 800);
};
@@ -176,15 +185,16 @@ class PaymentBtn extends Component {
taxPaymentAgreemenPay = () => {
const { paymentDialog } = this.state;
const { taxAmount } = paymentDialog;
- const { declareStore: { paymentForm } } = this.props;
+ const { declareStore: { paymentForm }, reportType } = this.props;
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
paymentForm.validateForm().then(f => {
if (f.isValid) {
- const { protocolNumber } = paymentForm.getFormParams();
+ const { protocolNumber, paymentNumber } = paymentForm.getFormDatas();
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxYearMonth: taxYearMonth + "-01",
- taxAgentId, taxAmount, protocolNumber
+ taxAgentId, taxAmount, protocolNumber: protocolNumber.value,
+ reportType, paymentNumber: paymentNumber.valueSpan
};
this.setState({
paymentDialog: {
@@ -332,15 +342,16 @@ class PaymentBtn extends Component {
const { paymentDialog } = this.state;
return (
-
- {getLabel(111, "银行端凭证缴款")}
- {getLabel(111, "作废缴款凭证")}
-
- }
- type="ghost">{getLabel(111, "三方缴款")}
+
+ {/**/}
+ {/* {getLabel(111, "银行端凭证缴款")}*/}
+ {/* {getLabel(111, "作废缴款凭证")}*/}
+ {/* */}
+ {/* }*/}
+ {/* type="ghost">{getLabel(111, "三方缴款")}*/}
-
+ {/*个税接口改造*/}
+ {/**/}
+
{
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) => {
if (type === "remove") {
@@ -388,9 +388,9 @@ class Index extends Component {
,
-
+ //
));
if (!intelCalcSalaryStatus) {
if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) {
diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js
index ed7805cf..f9783c57 100644
--- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js
@@ -21,7 +21,8 @@ import {
employeedeclareList4Add,
employeedeclareList4Update,
employeedeclareRefresh,
- employeeDelete, employeeInvalid,
+ employeeDelete,
+ employeeInvalid,
getDeclareFeedback
} from "../../apis/declare";
import { advanceConditions, submitStatus } from "./constants";
@@ -146,7 +147,8 @@ class Index extends Component {
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
"操作": getLabel(30585, "操作"), "删除": getLabel(535052, "删除"),
"共": getLabel(83698, "共"), "条": getLabel(18256, "条"),
- "加载中": getLabel(83698, "加载中"), "作废": getLabel(111, "作废")
+ "加载中": getLabel(83698, "加载中")
+ // "作废": getLabel(111, "作废")
};
const childFrameObj = document.getElementById("atdTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js
new file mode 100644
index 00000000..3df66b4c
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js
@@ -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 (
+
+ this.setState({ keywords: val })}
+ />
+
+ }
+ >
+
+ {getLabel(111, "个税申报表字段")}
+ {/**/}
+ ,
+ width: "50%",
+ dataIndex: "reportColumnName"
+ },
+ {
+ title: getLabel(111, "对应本账套薪资项目"),
+ width: "50%",
+ dataIndex: "salaryItem",
+ render: (_, record) => (
+
+ )
+ }
+ ]}
+ dataSource={dataSource}
+ />
+
+ );
+ }
+}
+
+export default IncomeTaxFields;
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js
index eaef2a08..add0af5c 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js
@@ -5,11 +5,11 @@
* Date: 2022/12/9
*/
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 { inject, observer } from "mobx-react";
import { baseSettingFormItem } from "../config";
-import { getLedgerBasicForm } from "../../../apis/ledger";
+import { getIncomeCategoryList, getLedgerBasicForm } from "../../../apis/ledger";
import {
generateBasicInfo,
getAddMonthYearMonth,
@@ -18,10 +18,12 @@ import {
getSubtractMonthYearMonth,
prefixAddZero
} from "../../../util/date";
-import { commonEnumList } from "../../../apis/ruleconfig";
import moment from "moment";
+import cs from "classnames";
import "./index.less";
+const getLabel = WeaLocaleProvider.getLabel;
+
@inject("taxAgentStore")
@observer
class LedgerBaseSetting extends Component {
@@ -128,10 +130,7 @@ class LedgerBaseSetting extends Component {
});
};
commonEenumList = () => {
- const payload = {
- enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum"
- };
- commonEnumList(payload).then(({ status, data }) => {
+ getIncomeCategoryList().then(({ status, data }) => {
if (status) {
const { baseForm } = this.state;
this.setState({
@@ -139,7 +138,16 @@ class LedgerBaseSetting extends Component {
if (it.key === "taxableItems") {
return {
...it,
- options: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
+ options: _.map(data, it => ({
+ key: it.value.toString(),
+ showname:
+ {it.defaultLabel}
+
+ {it.reportTypeName}
+
+
+ }))
};
}
return { ...it };
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
index 2bb99eb1..eaf6e97e 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
@@ -8,20 +8,23 @@ import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
import { Button, message, Modal } from "antd";
-import SlideModalTitle from "../../../components/slideModalTitle";
import LedgerBaseSetting from "./ledgerBaseSetting";
import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel";
import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules";
import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem";
import LedgerSalaryItem from "./ledgerSalaryItem";
import IncomeTaxFields from "./incomeTaxFields";
+import IncomeTaxFieldsCorresponding from "./incomeTaxFieldsCorresponding";
import CumulativeFields from "./cumulativeFields";
+import WeaTopTitle from "../../../components/custom-title/weaTopTitle";
+import WeaReqTitle from "../../../components/custom-title/weaReqTitle";
import {
addupruleSave,
saveAdjustmentRule,
saveLedgerBasic,
saveLedgerItem,
- taxreportruleSave
+ taxreportruleSave,
+ taxruleSave
} from "../../../apis/ledger";
import "./index.less";
@@ -39,6 +42,7 @@ class LedgerSlide extends Component {
baseSettingInfo: {},
adjustRules: [],
empFields: [], itemGroups: [],
+ taxruleFields: [], taxruleKeys: "", //个税字段对应
incomeTaxFields: [], incomeTaxKeys: "", //个税申报字段对应
addupruleFields: [], addupruleKeys: "", //累计字段对应
saveSalarySobId: "",
@@ -101,7 +105,6 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
- this.handleClose();
} else {
message.success(errormsg || "保存失败");
}
@@ -125,7 +128,8 @@ class LedgerSlide extends Component {
return {
...item,
items: _.map(item.items, it => {
- // delete it.formulaContent;
+ delete it.originFormulaContent;
+ delete it.originSqlContent;
// if (it.id && it.id.length > 4) delete it.id;
return { ...it };
})
@@ -133,7 +137,8 @@ class LedgerSlide extends Component {
}),
items: _.map(_.find(itemGroups, it => it.name === "未分类").items, child => {
// if (child.id && child.id.length > 4) delete child.id;
- // delete child.formulaContent;
+ delete child.originFormulaContent;
+ delete child.originSqlContent;
return { ...child };
}) || [],
salarySobId: salarySobId || saveSalarySobId
@@ -148,6 +153,46 @@ class LedgerSlide extends Component {
}
}).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: 黎永顺
* Description:个税申报字段对应-保存
@@ -155,33 +200,29 @@ class LedgerSlide extends Component {
* Date: 2023/8/16
*/
taxreportruleSave = () => {
- const { taxableItems, incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state;
const { editId } = this.props;
- if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) {
- this.saveLedgerAdjustRule();
- } else {
- const payload = {
- salarySobId: editId || saveSalarySobId,
- 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(",")
- };
- })
- };
- }
+ const { incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state;
+ const payload = {
+ salarySobId: editId || saveSalarySobId,
+ incomeCategoryParams: _.map(incomeTaxFields, it => {
+ if (it.incomeCategoryId === incomeTaxKeys) {
return {
incomeCategory: it.incomeCategoryId,
- taxReportRuleParams: []
+ taxReportRuleParams: _.map(it.taxReportRules, child => {
+ return {
+ reportColumnDataIndex: child.reportColumnDataIndex,
+ salaryItemId: _.map(child.salaryItem, o => o.id).join(",")
+ };
+ })
};
- })
- };
- this.saveTaxreportrule(payload);
- }
+ }
+ return {
+ incomeCategory: it.incomeCategoryId,
+ taxReportRuleParams: []
+ };
+ })
+ };
+ this.saveTaxreportrule(payload);
};
saveTaxreportrule = (payload) => {
this.setState({ loading: true });
@@ -201,7 +242,10 @@ class LedgerSlide extends Component {
* Date: 2023/8/17
*/
addupruleSave = () => {
- const { taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields, addupruleKeys, saveSalarySobId } = this.state;
+ const {
+ taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields,
+ addupruleKeys, saveSalarySobId
+ } = this.state;
const { editId } = this.props;
if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) {
const payload = {
@@ -251,27 +295,21 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success(getLabel(22619, "保存成功!"));
+ !editId && this.handleClose();
} else {
message.error(errormsg || getLabel(22620, "保存失败!"));
}
}).catch(() => this.setState({ loading: false }));
}
};
- handleChangeSlideTab = (current) => {
- this.setState({ current: Number(current) });
- };
- handleClose = () => {
- this.setState({ current: 0 }, () => this.props.onCancel());
- };
+ handleClose = () => this.setState({ current: 0, baseSettingInfo: {} }, () => this.props.onCancel());
/*
* Author: 黎永顺
* Description: 基础信息字段切换
* Params:
* Date: 2022/12/9
*/
- handleChangeSaveParams = (baseSettingInfo) => {
- this.setState({ baseSettingInfo });
- };
+ handleChangeSaveParams = (baseSettingInfo) => this.setState({ baseSettingInfo });
/*
* Author: 黎永顺
* Description: 薪资项目保存数据
@@ -281,179 +319,138 @@ class LedgerSlide extends Component {
handleSaveSalaryItemParams = (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 = this.setState({ taxableItems: val })}
- />;
- break;
- case 1:
- CurrentDom = ;
- break;
- case 2:
- CurrentDom = ;
- break;
- case 3:
- CurrentDom = ;
- break;
- case 4:
- CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
- this.setState({
- incomeTaxFields,
- incomeTaxKeys: selectedKey
- })}/> :
- this.setState({
- addupruleFields,
- addupruleKeys: selectedKey
- })}/>;
- break;
- case 5:
- CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
- this.setState({ adjustRules })}/> :
- this.setState({
- incomeTaxFields,
- incomeTaxKeys: selectedKey
- })}/>;
- break;
- case 6:
- CurrentDom =
- 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 = [
-
- ];
- break;
- case 1:
- CurrentDom = !editId ? [
- ,
-
- ] : [];
- break;
- case 2:
- CurrentDom = !editId ?
- [
- ,
- ,
-
- ] : [
-
- ];
- break;
- case 3:
- CurrentDom = !editId ?
- [
- ,
- ,
-
- ] : [];
- break;
- case 4:
- CurrentDom = !editId ?
- [
- ,
- ,
-
- ] : [
-
- ];
- break;
- case 5:
- CurrentDom = !editId ?
- [
- ,
- ,
-
- ] : [
-
- ];
- break;
- case 6:
- CurrentDom = !editId ?
- [
- ,
-
- ] : [
-
- ];
- break;
- default:
- break;
- }
- }
- return CurrentDom;
- };
render() {
+ const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
+ const { current, taxableItems, saveSalarySobId, loading } = this.state;
let tabs = [
- { key: 0, title: getLabel(82751, "基础设置") },
- { key: 1, title: getLabel(543467, "关联人员") },
- { key: 2, title: getLabel(542362, "薪资项目") },
- { key: 3, title: getLabel(543468, "回算薪资项目") },
- { key: 4, title: getLabel(111, "累计字段对应") },
- { key: 5, title: getLabel(111, "个税申报字段对应") },
- { key: 6, title: getLabel(543469, "调薪计薪规则") }
+ {
+ key: 0, title: getLabel(82751, "基础设置"),
+ createBtns: [
+
+ ],
+ editBtns: [
+
+ ],
+ children: this.setState({ taxableItems: val })}
+ />
+ },
+ {
+ key: 1, title: getLabel(543467, "关联人员"),
+ createBtns: [
+ ,
+
+ ],
+ editBtns: [],
+ children:
+ },
+ {
+ key: 2, title: getLabel(542362, "薪资项目"),
+ createBtns: [
+ ,
+ ,
+
+ ],
+ editBtns: [
+
+ ],
+ children:
+ },
+ {
+ key: 3, title: getLabel(543468, "回算薪资项目"),
+ createBtns: [
+ ,
+ ,
+
+ ],
+ editBtns: [],
+ children:
+ },
+ {
+ key: 4, title: getLabel(543469, "调薪计薪规则"),
+ createBtns: [
+ ,
+ ,
+
+ ],
+ editBtns: [
+
+ ],
+ children: this.setState({ adjustRules })}/>
+ },
+ {
+ key: 5, title: getLabel(111, "个税申报配置"),
+ createBtns: [
+ ,
+ ,
+
+ ],
+ editBtns: [],
+ children: this.setState({
+ incomeTaxFields,
+ incomeTaxKeys: selectedKey
+ })}/>
+ },
+ {
+ key: 6, title: getLabel(111, "同步个税配置"),
+ createBtns:
+ !(taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
+ [
+ ,
+ ,
+
+ ] : [
+ ,
+
+ ],
+ editBtns: [],
+ children: this.setState({
+ taxruleFields, taxruleKeys: selectedKey
+ })}/>
+ },
+ {
+ key: 7, title: getLabel(111, "累计字段对应"),
+ createBtns: [
+ ,
+
+ ],
+ editBtns: [],
+ children: this.setState({
+ addupruleFields, addupruleKeys: selectedKey
+ })}/>
+ }
];
- const { title, visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
- const { current, taxableItems } = this.state;
- (taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") && (tabs = _.filter(tabs, o => o.key !== 4));
+ (taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") &&
+ (tabs = _.map(_.filter(tabs, o => o.key !== 7), (k, j) => ({ ...k, key: j })));
return (
{
- }}
- selectedTab={current}
- customOperate={this.renderCustomOperate()}
- subItemChange={this.handleChangeSlideTab}
- />
+ !editId ? current === o.key).createBtns}/> :
+ current === o.key).editBtns : []}
+ tabDatas={tabs} selectedKey={String(current)}
+ onChange={cur => this.setState({ current: parseInt(cur) })}/>
}
content={
@@ -487,9 +476,7 @@ class LedgerSlide extends Component {
}
}
- {
- this.renderChildren()
- }
+ {_.find(tabs, o => current === o.key).children}
}
onClose={this.handleClose}
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/advanceInputBtn/index.js
new file mode 100644
index 00000000..82c06533
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/advanceInputBtn/index.js
@@ -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 (
+
+ detailListConditionForm.updateFields({ username: v })}
+ onSearch={this.props.onAdvanceSearch}
+ />
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/advanceInputBtn/index.less
new file mode 100644
index 00000000..1a3d7283
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/advanceInputBtn/index.less
@@ -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;
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryDetailList/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryDetailList/index.js
new file mode 100644
index 00000000..3c5e23b5
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryDetailList/index.js
@@ -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 (
+
+
+
+
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryDetailSearchPannel/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryDetailSearchPannel/index.js
new file mode 100644
index 00000000..8d1243f7
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryDetailSearchPannel/index.js
@@ -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 (
+
+
+ {getSearchs(detailListConditionForm, conditions, 2, false)}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryMonthHelpfulTip.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryMonthHelpfulTip.js
new file mode 100644
index 00000000..91654775
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/components/salaryMonthHelpfulTip.js
@@ -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 (
+
+ {getLabel(111, "薪资周期")}
+ {fromDate}{getLabel(111, "至")}{endDate}
+ {getLabel(111, "税款所属期")}
+ {taxCycle}
+ {getLabel(111, "考勤取值周期")}
+ {aFromDate}{getLabel(111, "至")}{aEndDate}
+ {getLabel(111, "福利台账月份")}
+ {`${getLabel(111, "引用")}${socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}
+ }/>
+ );
+ }
+}
+
+export default SalaryMonthHelpfulTip;
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less
index 01a180a0..c78ed091 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less
@@ -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
+ }
+ }
+
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
new file mode 100644
index 00000000..a0c9e495
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
@@ -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: ,
+ content: getLabel(111, "显示列定制"),
+ onClick: () => this.listRef.wrappedInstance.handleSetCustomCols()
+ }
+ ];
+ const btns = [
+ ,
+ this.setState({ showSearchAd: true })}
+ onAdvanceSearch={() => this.setState({ isQuery: !isQuery })}/>
+ ];
+ !showOperateBtn && btns.shift();
+ return (
+ }
+ iconBgcolor="#F14A2D" showDropIcon={true} dropMenuDatas={dropMenuDatas}
+ buttons={btns} className="salary-payroll-details-layout"
+ >
+
+
+
+ {getLabel(111, "薪资所属月")}:{salaryMonth}
+ {
+ !_.isEmpty(salarySendDetailBaseInfo) &&
+
+ }
+ {getLabel(111, "工资单模板")}:{template}
+
+
+
+ this.setState({ showSearchAd: false })}
+ onAdSearch={() => this.setState({ isQuery: !isQuery })}
+ conditions={conditions}/>
+
+ {/*列表*/}
+
this.listRef = dom}/>
+
+
+ );
+ }
+}
+
+export default PayrollDetail;
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollGrantDetail.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollGrantDetail.js
deleted file mode 100644
index abe3003f..00000000
--- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollGrantDetail.js
+++ /dev/null
@@ -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 = (
-
- );
- const renderRightOperation = () => {
- return (
-
- 导出全部
-
-
- )
- }
- return (
-
-
-
-
- 薪资所属月:2021-11
-
- 工资单模板:上海泛微工资单1
-
-
-
- 已发放:111/1111
- 未确认:111
-
-
-
-
-
- )
- }
-}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js
index d7b43cd5..3f164873 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js
@@ -41,7 +41,7 @@ class salaryFileAdvanceSearchPannel extends Component {
...child,
options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel }))
};
- } else if (getKey(child) === "taxAgentId") {
+ } else if (getKey(child) === "taxAgentIds") {
return {
...child,
options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
index 25b815a0..e1ee1288 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
@@ -324,10 +324,11 @@ export const salaryFileSearchConditions = [
},
{
conditionType: "SELECT",
- domkey: ["taxAgentId"],
+ domkey: ["taxAgentIds"],
fieldcol: 16,
label: getLabel(537996, "个税扣缴义务人"),
labelcol: 8,
+ multiple: true,
options: [],
viewAttr: 2
},
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
index 6a80e8fb..aa5f1bed 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
@@ -36,8 +36,8 @@ class PovitpivotChartModal extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
- const { id, dimensionId, dimensionValue, isShare } = nextProps;
- this.getDataPerspective({ id, dimensionId, dimensionValue, isShare });
+ const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = nextProps;
+ this.getDataPerspective({ id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth });
} else {
this.setState({
dataSource: [],
@@ -64,11 +64,11 @@ class PovitpivotChartModal extends Component {
});
} else if (type === "turn") {
if (id === "PAGEINFO") {
- const { id, dimensionId, dimensionValue, isShare } = this.props;
+ const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = this.props;
const { pageNum: current, size: pageSize } = params;
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
this.getDataPerspective({
- id, dimensionId, dimensionValue, isShare
+ id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth
}));
}
}
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
index a7808410..9716234a 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
@@ -5,8 +5,8 @@
* Date: 2023/4/21
*/
import React, { Component } from "react";
-import { Spin } from "antd";
-import { WeaEchart } from "ecCom";
+import { message, Spin } from "antd";
+import { WeaEchart, WeaLocaleProvider } from "ecCom";
import RightOptions from "./rightOptions";
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition";
@@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal";
import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide";
import "../index.less";
+const getLabel = WeaLocaleProvider.getLabel;
+
class ReportContent extends Component {
constructor(props) {
super(props);
@@ -27,13 +29,14 @@ class ReportContent extends Component {
chartsType: "0",
chartsInfo: {},
povitView: {
- visible: false, id: "", isShare: false,
- dimensionId: "", dimensionValue: ""
+ visible: false, id: "", isShare: false, dimensionId: "", dimensionValue: "", salaryStartMonth: "",
+ salaryEndMonth: ""
},
rangSet: {
visible: false, reportId: "",
rangeVal: {}
- }
+ },
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
@@ -56,9 +59,9 @@ class ReportContent extends Component {
handleReceive = ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
- const { columns, countResult, dataSource } = this.state;
+ const { columns, countResult, dataSource, pageInfo } = this.state;
this.postMessageToChild({
- columns, countResult, dataSource,
+ columns, countResult, dataSource, pageInfo,
showSum: !_.isEmpty(countResult)
});
} else if (type === "turn") {
@@ -66,36 +69,49 @@ class ReportContent extends Component {
if (id === "PIVOTCHART") {
const { record } = params;
const { dimension: dimensionValue } = record;
- const { id: pivotId, dimensionId, isShare } = this.props.report;
+ const {
+ id: pivotId, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start
+ } = this.props.report;
+ const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
+
this.setState({
povitView: {
- visible: true, id: pivotId, dimensionId, dimensionValue, isShare
+ visible: true, id: pivotId, dimensionId, dimensionValue, isShare,
+ salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
}
});
+ } else if (id === "PAGEINFO_REPORT") {
+ this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report));
}
}
};
postMessageToChild = (payload) => {
+ const i18n = {
+ "共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
+ "总计": getLabel(523, "总计")
+ };
const childFrameObj = document.getElementById("atdTable");
- const { dataSource, columns, showSum, countResult } = payload;
+ const { dataSource, columns, showSum, countResult, pageInfo } = payload;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, showSum, countResult
+ dataSource, columns, showSum, countResult, i18n, pageInfo
}), "*");
};
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 payload = {
- id, dimensionId, isShare,
+ id, dimensionId, isShare, ...pageInfo,
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
};
this.setState({ loading: true });
reportStatisticsReportGetData(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status && id.toString() === data.reportId.toString()) {
- const { countResult, columns, pageInfo: { list } } = data;
+ const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data;
this.setState({
- countResult,
+ countResult, dataSource: list || [],
+ pageInfo: dimension === getLabel(111, "人员") ? { ...pageInfo, current: pageNum, pageSize, total } : null,
columns: _.map(columns, it => ({
...it,
dataIndex: it.column, width: it.width ? it.width + "px" : 150,
@@ -105,12 +121,11 @@ class ReportContent extends Component {
dataIndex: child.column, width: child.width ? child.width + "px" : 150,
title: child.text, align: "center"
})) : []
- })),
- dataSource: list || []
+ }))
}, () => {
this.postMessageToChild({
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)
});
});
@@ -195,6 +210,11 @@ class ReportContent extends Component {
}).catch(() => this.setState({ loading: false }));
};
handleChangeChartOpts = (chartsType, viewType) => {
+ const { loading } = this.state;
+ if (loading) {
+ message.info(getLabel(111, "列表正在加载中,请稍后"));
+ return;
+ }
this.setState({ chartsInfo: {} });
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
const { report: { id: reportId } } = this.props;
@@ -267,7 +287,7 @@ class ReportContent extends Component {
onCancel={() => this.setState({
povitView: {
visible: false, id: "", dimensionId: "", dimensionValue: "",
- isShare: false
+ isShare: false, salaryStartMonth: "", salaryEndMonth: ""
}
})}
/>
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
index 6b2e496c..e82f2eaa 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
@@ -71,7 +71,7 @@ class StatisticalMicroSettingsSlide extends Component {
getTaxAgentSelectList = async (props) => {
const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]);
- getTaxAgentSelectList(true).then(({ status, data }) => {
+ getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
if (status) {
const conditions = _.map(condition, item => {
return {
@@ -412,7 +412,10 @@ const StatisticalScopePicker = (props) => {
{
- return current && endDate && current.getTime() > new Date(endDate).getTime();
+ if (!current || !endDate) return false;
+ const tooEarly = moment(current.getTime()).isBefore(moment(endDate).subtract(12, "month"));
+ const tooLate = moment(current.getTime()).isAfter(moment(endDate));
+ return !!tooEarly || !!tooLate;
}}
format="YYYY-MM"
onChange={(val) => onChange([val, endDate], timeType)}
@@ -422,7 +425,10 @@ const StatisticalScopePicker = (props) => {
{
- return current && startDate && current.getTime() < new Date(startDate).getTime();
+ if (!current || !startDate) return false;
+ const tooEarly = moment(current.getTime()).isAfter(moment(startDate).add(12, "month"));
+ const tooLate = moment(current.getTime()).isBefore(moment(startDate));
+ return !!tooEarly || !!tooLate;
}}
format="YYYY-MM"
viewAttr={viewAttr}
diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js
index 82f935e5..4d01e7c0 100644
--- a/pc4mobx/hrmSalary/pages/reportView/index.js
+++ b/pc4mobx/hrmSalary/pages/reportView/index.js
@@ -6,13 +6,12 @@
*/
import React, { Component } from "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 LeftTab from "./components/leftTab";
import ReportContent from "./components/reportContent";
import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide";
-import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
-import { convertToUrlString } from "../../util/url";
+import { exportDataReport, reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
import TopBtns from "./components/topBtns";
import "./index.less";
@@ -92,6 +91,10 @@ class Index extends Component {
* Date: 2023/4/24
*/
exportData = () => {
+ if (this.reportRef.state.loading) {
+ message.info(getLabel(111, "列表正在加载中,请稍后"));
+ return;
+ }
const { report } = this.state;
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report;
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
@@ -99,7 +102,8 @@ class Index extends Component {
id, dimensionId, isShare,
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() {
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/form.js b/pc4mobx/hrmSalary/pages/ruleConfig/form.js
index c1308ec4..9b17f248 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/form.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/form.js
@@ -1,7 +1,9 @@
import React from "react";
-import { WeaFormItem, WeaSearchGroup } from "ecCom";
+import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaSwitch } from "comsMobx";
+const getKey = WeaTools.getKey;
+
export const renderRuleForm = (form, condition, onChange) => {
const { isFormInit } = form;
const formParams = form.getFormParams();
@@ -15,7 +17,11 @@ export const renderRuleForm = (form, condition, onChange) => {
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom">
-
+ getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)}
+ onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })}
+ />
),
colSpan: 1,
hide: fields.hide
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
index efda13dd..3f24a0d6 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
@@ -25,6 +25,7 @@ class RuleConfig extends Component {
super(props);
this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 };
this.timer = null;
+ this.handleDebounce = null;
}
componentDidMount() {
@@ -116,16 +117,22 @@ class RuleConfig extends Component {
case "taxAgentShowStatus":
case "salaryShowStatus":
case "adjustShowStatus":
- const confTitle = {
- welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
- welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
- salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
- extEmpsWitch: getLabel(544097, "开启非系统人员"),
- taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
- salaryShowStatus: getLabel(111, "显示工资单页签"),
- adjustShowStatus: getLabel(111, "显示调薪记录页签")
- };
- this.unifiedSettings(key, confTitle[key]);
+ if (!this.handleDebounce) {
+ this.handleDebounce = _.debounce(() => {
+ const confTitle = {
+ welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
+ welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
+ salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
+ extEmpsWitch: getLabel(544097, "开启非系统人员"),
+ taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
+ salaryShowStatus: getLabel(111, "显示工资单页签"),
+ adjustShowStatus: getLabel(111, "显示调薪记录页签")
+ };
+ this.unifiedSettings(key, confTitle[key]);
+ this.handleDebounce = null;
+ }, 500);
+ }
+ this.handleDebounce();
break;
default:
break;
diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js
index 8783090b..c21d1d41 100644
--- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js
+++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js
@@ -6,6 +6,7 @@
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
+import { Dropdown, Menu } from "antd";
import * as API from "../../../apis/taxAgent";
import "./index.less";
@@ -114,6 +115,17 @@ class TaxAgentTable extends Component {
onOperate("delete", record.id)}>{getLabel(535052, "删除")}
}
+
+
+ onOperate("log", record.id)}>{getLabel(545781, "操作日志")}
+
+
+ }>
+
+
}
]}
diff --git a/pc4mobx/hrmSalary/pages/salary/index.less b/pc4mobx/hrmSalary/pages/salary/index.less
index 8373a244..de04ce9f 100644
--- a/pc4mobx/hrmSalary/pages/salary/index.less
+++ b/pc4mobx/hrmSalary/pages/salary/index.less
@@ -37,7 +37,7 @@
.ant-col-10 {
span:nth-child(2) {
- margin-top: -6px;
+ //margin-top: -6px;
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js
index 4cd931fc..4ab69a82 100644
--- a/pc4mobx/hrmSalary/pages/salary/taxAgent.js
+++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js
@@ -7,6 +7,7 @@ import ComHint from "./components/comHint";
import TaxAgentTable from "./components/taxAgentTable";
import TaxAgentSlide from "./components/taxAgentSlide";
import * as API from "../../apis/taxAgent";
+import LogDialog from "../../components/logViewModal";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@@ -24,7 +25,9 @@ class TaxAgent extends Component {
taxAgentSlideProps: {
isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"),
taxAgentId: "", current: 0, salaryOn: true
- }
+ },
+ logDialogVisible: false,
+ filterConditions: "[]"
};
this.taxAgentTableRef = null;
}
@@ -165,6 +168,12 @@ class TaxAgent extends Component {
}
});
break;
+ case "log":
+ this.setState({
+ logDialogVisible: true,
+ filterConditions: itemId ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${itemId}\"}]` : "[]"
+ });
+ break;
default:
break;
}
@@ -173,7 +182,7 @@ class TaxAgent extends Component {
render() {
const {
searchValue, decentralization, taxAgentSlideProps,
- permission, syncLoading
+ permission, syncLoading, logDialogVisible, filterConditions
} = this.state;
const btns = [
}
iconBgcolor="#F14A2D"
buttons={btns}
+ showDropIcon onDropMenuClick={key => this.handleOperate(key)}
+ dropMenuDatas={[
+ {
+ key: "log", icon: ,
+ content: getLabel(545781, "操作日志")
+ }
+ ]}
>
{
@@ -226,6 +242,9 @@ class TaxAgent extends Component {
onOk={() => this.taxAgentTableRef.getTaxAgentList()}
onCancel={(isUpdate = false) => this.handelResetSlide(isUpdate)}
/>
+ {/*操作日志*/}
+ this.setState({ logDialogVisible: false })}/>
);
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js
index a46b7129..6975ee63 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js
@@ -16,7 +16,7 @@ import {
} from "../../apis/archive";
import { inject, observer } from "mobx-react";
import { adjCondition } from "./columns";
-import { getDomkes, getSearchs } from "../../util";
+import { getDomkes, getSearchs, toDecimal_n } from "../../util";
import moment from "moment";
const { getLabel } = WeaLocaleProvider;
@@ -149,7 +149,10 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component {
let payload = {
...adjForm.getFormParams(), salaryArchiveId,
effectiveTime: moment(new Date(adjForm.getFormParams().effectiveTime)).format("YYYY-MM-DD"),
- salaryArchiveItems: _.map(list, o => ({ salaryItemId: o.salaryItem, adjustValue: o.adjustAfter }))
+ salaryArchiveItems: _.map(list, o => ({
+ salaryItemId: o.salaryItem,
+ adjustValue: o.dataType === "number" ? toDecimal_n(o.adjustAfter, o.pattern) : o.adjustAfter
+ }))
};
if (salaryArchiveItemId) {
payload = { ...payload, canOperator, salaryArchiveItemId };
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js
index 09875add..f6898090 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js
@@ -1,9 +1,8 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
-import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
+import { WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
import { renderLoading, toDecimal_n } from "../../util";
-import CustomTab from "../../components/customTab";
import SystemSalaryItemModal from "./systemSalaryItemModal";
import { columns } from "./columns";
import SlideModalTitle from "../../components/slideModalTitle";
@@ -12,6 +11,8 @@ import CustomPaginationTable from "../../components/customPaginationTable";
import SyncToSalaryAccountSetDialog from "./syncToSalaryAccountSetDialog";
import "../socialSecurityBenefits/programme/index.less";
import LogDialog from "../../components/logViewModal";
+import SalaryItemImportDialog from "./salaryItemImport";
+import * as API from "../../apis/item";
const { getLabel } = WeaLocaleProvider;
@inject("salaryItemStore", "taxAgentStore", "salaryFileStore")
@@ -29,7 +30,8 @@ export default class SalaryItem extends React.Component {
searchParams: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: [],
syncSalarySetDialog: { visible: false, title: "", id: "" },
- logDialogVisible: false, filterConditions: "[]"
+ logDialogVisible: false, filterConditions: "[]",
+ salaryItemImpDialog: { visible: false, title: getLabel(24023, "数据导入") }
};
columns.map(item => {
if (item.dataIndex == "refere") {
@@ -213,6 +215,19 @@ export default class SalaryItem extends React.Component {
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
});
break;
+ case "export":
+ WeaLoadingGlobal.start();
+ const { selectedRowKeys } = this.state;
+ const promise = API.exportSalaryitem({ ids: selectedRowKeys });
+ WeaLoadingGlobal.destroy();
+ break;
+ case "import":
+ this.setState({
+ salaryItemImpDialog: {
+ ...this.state.salaryItemImpDialog, visible: true
+ }
+ });
+ break;
default:
break;
}
@@ -220,12 +235,10 @@ export default class SalaryItem extends React.Component {
render() {
const {
- salaryItemStore,
- salaryFileStore,
- taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
+ salaryItemStore, salaryFileStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
} = this.props;
const { userStatusList } = salaryFileStore;
- const { selectedRowKeys, logDialogVisible, filterConditions } = this.state;
+ const { selectedRowKeys, logDialogVisible, filterConditions, salaryItemImpDialog } = this.state;
const { loading, deleteItemRequest, getTableDatas } = salaryItemStore;
const {
tableDataSource,
@@ -257,51 +270,36 @@ export default class SalaryItem extends React.Component {
);
- const renderRightOperation = () => {
- return (
- {
- (showOperateBtn || showSalaryItemBtn) &&
- handleMenuClick({ key: "1" })}
- style={{ marginRight: "10px" }}>{getLabel(111, "新增自定义薪资项")}
+ const buttons = [
+ handleMenuClick({ key: "1" })}>{getLabel(111, "新增自定义薪资项")},
+
);
-
- };
-
+ });
+ }
+ });
+ }}>{getLabel(32136, "批量删除")},
+ this.setState({ searchValue: value })}
+ onSearch={value => this.handleSearch(value)}/>
+ ];
// 新建和修改保存的回调
const handleSlideSave = (continueFlag) => {
const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props;
@@ -367,23 +365,31 @@ export default class SalaryItem extends React.Component {
};
const rowSelection = {
selectedRowKeys,
- onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }),
- getCheckboxProps: record => ({
- disabled: !record.canDelete // Column configuration not to be checked
- })
+ onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
+ // getCheckboxProps: record => ({
+ // disabled: !record.canDelete // Column configuration not to be checked
+ // })
};
return (
} iconBgcolor="#F14A2D"
showDropIcon onDropMenuClick={this.onDropMenuClick}
dropMenuDatas={[
+ {
+ key: "import",
+ icon:
,
+ content: getLabel(111, "导入")
+ },
+ {
+ key: "export",
+ icon:
,
+ content: getLabel(111, "导出")
+ },
{
key: "log", icon:
,
content: getLabel(545781, "操作日志")
}
- ]}
- >
-
+ ]} buttons={(showOperateBtn || showSalaryItemBtn) ? buttons : buttons.slice(-1)}>
this.setState({ logDialogVisible: false })}/>
+ {/* 导入*/}
+ {
+ this.setState({
+ salaryItemImpDialog: { ...salaryItemImpDialog, visible: false }
+ }, () => callback && this.handleSearch(this.state.searchValue));
+ }}/>
{
systemItemVisible &&
{
+ const { importDialog } = this.state;
+ const { hasData } = importDialog;
+ WeaLoadingGlobal.start();
+ const promise = API.downloadTemplate({ hasData });
+ WeaLoadingGlobal.destroy();
+ };
+ handleImport = (payload) => {
+ const { importDialog } = this.state, { isExtEmp } = this.props;
+ const { extraPreview } = importDialog;
+ this.setState({ importDialog: { ...importDialog, nextloading: true } });
+ API.importSalaryitem({ ...payload, ...extraPreview, isExtEmp }).then(({ data, status }) => {
+ this.setState({ importDialog: { ...importDialog, nextloading: false } });
+ if (status) {
+ this.setState({
+ importDialog: { ...importDialog, ...payload, importResult: data }
+ });
+ }
+ }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
+ };
+
+ render() {
+ const { importDialog } = this.state;
+ return (
+ this.setState({
+ importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
+ })}
+ exportDataDom={
+ {
+ this.setState({ importDialog: { ...importDialog, hasData: val === "1" } });
+ }}
+ />
+ }
+ nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
+ nextUplaodCallback={imageId => this.handleImport({ imageId })}
+ />
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/baseValidateDialog.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/baseValidateDialog.js
new file mode 100644
index 00000000..631ef2ee
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/baseValidateDialog.js
@@ -0,0 +1,76 @@
+/*
+ * 方案信息确认
+ * 保存并自动修改基数,仅保存方案设置
+ * @Author: 黎永顺
+ * @Date: 2024/8/19
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
+import { Alert, Button } from "antd";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const WeaTransferList = WeaTransfer.list;
+
+class BaseValidateDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { dataSource: [] };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ this.setState({
+ dataSource: _.filter(_.map(nextProps.baseChangeInfo.split("\n"), (g, gi) => ({
+ id: gi + 1, name: g
+ })), k => !!k.name)
+ });
+ }
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
+ dataSource: []
+ });
+ }
+
+ render() {
+ const { dataSource } = this.state, { onCancel } = this.props;
+ const scrollHeight = this.baseChangeRef ? this.baseChangeRef.state.height - 118 : 606.6;
+ const buttons = [
+ onCancel({
+ validate: false, changeData: true
+ })}>{getLabel(111, "保存并自动修改基数")},
+ onCancel({
+ validate: false, changeData: false
+ })}>{getLabel(111, "仅保存方案设置")}
+ ];
+ return (
+ this.baseChangeRef = dom}
+ title={getLabel(131329, "信息确认")} buttons={buttons}
+ style={{
+ width: 750, height: 606.6, minHeight: 200, minWidth: 380,
+ maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
+ }}
+ >
+
+
+ {
+ !_.isEmpty(dataSource) ?
()}
+ height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]}
+ /> : {getLabel(111, "无数据变更记录")}
+ }
+
+
+ );
+ }
+}
+
+export default BaseValidateDialog;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
index d97654e6..da42ac66 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
@@ -12,6 +12,7 @@ import { Button, message, Modal } from "antd";
import * as API from "../../../../../apis/welfareScheme";
import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
import { getConditionDomkeys, getSearchs } from "../../../../../util";
+import BaseValidateDialog from "./baseValidateDialog";
import { planConditons } from "../../config";
import cs from "classnames";
@@ -24,7 +25,10 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- loading: false, conditions: [], selectedKey: "2", planDatas: []
+ loading: false, conditions: [], selectedKey: "2", planDatas: [],
+ baseValidateDialog: {
+ visible: false, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
+ }
};
}
@@ -86,21 +90,37 @@ class Index extends Component {
if (planForm.getFormParams().sharedType === "1" && _.isEmpty(planForm.getFormParams().taxAgentIds)) {
planForm.showError("taxAgentIds", getLabel(111, "\"可见范围\"未填写"));
} else {
- const { planDatas } = this.state;
- const payload = {
+ const { planDatas, baseValidateDialog } = this.state;
+ const { validatePayload } = baseValidateDialog;
+ let payload = {
insuranceScheme: {
...planForm.getFormParams(), welfareType: welfareTypeEnum, id,
paymentArea: planForm.getFormParams().paymentType
},
insuranceSchemeDetailList: planDatas
};
+ id && (payload = { ...payload, ...validatePayload });
this.setState({ loading: true });
- API[id ? "updateScheme" : "createScheme"](payload).then(({ status, errormsg }) => {
+ API[id ? "updateScheme" : "createScheme"](payload).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
- message.success(getLabel(30700, "操作成功!"));
- setHasBeenModify(false);
- this.props.onClose(true);
+ if (id && Object.prototype.toString.call(data) === "[object String]" && data.indexOf("\n") !== -1) {
+ this.setState({
+ baseValidateDialog: {
+ visible: true, baseChangeInfo: data,
+ validatePayload: { ...baseValidateDialog.validatePayload, validate: false }
+ }
+ });
+ } else {
+ message.success(getLabel(30700, "操作成功!"));
+ setHasBeenModify(false);
+ this.props.onClose(true);
+ this.setState({
+ baseValidateDialog: {
+ ...baseValidateDialog, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
+ }
+ });
+ }
} else {
message.error(errormsg);
}
@@ -194,7 +214,7 @@ class Index extends Component {
render() {
- const { conditions, planDatas, selectedKey } = this.state;
+ const { conditions, planDatas, selectedKey, baseValidateDialog } = this.state;
const { programmeStore: { planForm }, showOperateBtn } = this.props;
return (
+ {/* */}
+ this.setState({
+ baseValidateDialog: {
+ visible: false, baseChangeInfo: [],
+ validatePayload: { validate: true, changeData: false, ...validatePayload }
+ }
+ }, () => !_.isEmpty(validatePayload) && this.save())}/>
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
index 20d50c88..4f7028ad 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
@@ -13,7 +13,6 @@ import WelfarePlanList from "./components/welfarePlanList";
import LogDialog from "../../../components/logViewModal";
import cs from "classnames";
import "./index.less";
-import { tabList } from "../welfareArchive/config";
const getLabel = WeaLocaleProvider.getLabel;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
index 5a057203..5566cc8e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -269,3 +269,91 @@
}
}
+
+//方案基数变化
+.baseChangeDialog {
+ .wea-dialog-body {
+ overflow-y: hidden;
+ }
+
+ .baseChangeContent {
+ background: #F6F6F6;
+ padding: 16px;
+ width: 100%;
+ height: 100%;
+
+ .empty {
+ width: 100%;
+ display: flex;
+ height: 100%;
+ justify-content: center;
+ align-items: center;
+ background: #ffff;
+ }
+
+ .wea-search-group {
+ padding: 0;
+ margin-bottom: 10px;
+ background: #FFF;
+
+ .wea-form-cell {
+ padding: 0;
+
+ .wea-form-item {
+ padding: 10px;
+ }
+ }
+ }
+
+ .logTable {
+ background: #FFFFFF;
+ }
+
+ .wea-transfer-list-wrapper {
+ border: none;
+
+ .ant-tree-switcher {
+ display: none;
+ }
+
+ .transfer-tree {
+ background: #FFF;
+ border: 1px solid #dadada;
+ padding: 0;
+
+ & > li:not(:last-child) {
+ .detailBox .content {
+ border-bottom: 1px solid #dadada;
+ }
+ }
+
+ & > li {
+ margin: 0 !important;
+
+ .detailBox {
+ display: flex;
+ align-items: center;
+
+ .order {
+ width: 35px;
+ color: #999;
+ text-align: center;
+ }
+
+ .content {
+ position: relative;
+ flex: 1;
+ min-height: 40px;
+ line-height: 40px;
+ color: #000;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
index 23d14a23..fae1b5c6 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
@@ -1,8 +1,19 @@
import React from "react";
import { Button, Col, Row } from "antd";
-import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom";
+import {
+ WeaBrowser,
+ WeaCheckbox,
+ WeaDialog,
+ WeaError,
+ WeaHelpfulTip,
+ WeaLocaleProvider,
+ WeaSelect,
+ WeaTextarea
+} from "ecCom";
+import { SQLHelpTip } from "../../components/PersonalScopeModal";
import "../ledger/index.less";
+const { getLabel } = WeaLocaleProvider;
export default class AddTaxAgentModal extends React.Component {
constructor(props) {
super(props);
@@ -24,7 +35,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({
checkAll: "1"
});
- }else{
+ } else {
this.setState({
checkAll: "0"
});
@@ -38,10 +49,10 @@ export default class AddTaxAgentModal extends React.Component {
const { checkboxValue, ids, selectedKey } = this.state;
const payload = {
employeeStatus: checkboxValue.split(","),
- targetParams: _.map(ids.split(","), (it) => ({
- targetType: selectedKey,
+ targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({
+ targetType: selectedKey, target: "",
targetId: it
- }))
+ })) : [{ targetType: selectedKey, targetId: "0", target: ids }]
};
if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) {
this.refs.weaError.showError();
@@ -64,7 +75,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({
selectedKey: "EMPLOYEE",
checkboxValue: "",
- checkAll: '0',
+ checkAll: "0",
ids: ""
});
};
@@ -182,6 +193,18 @@ export default class AddTaxAgentModal extends React.Component {
/>
)}
+ {this.state.selectedKey === "SQL" && (
+
+
+ this.setState({ ids })}/>
+ }/>
+
+
+ )}
@@ -197,13 +220,13 @@ export default class AddTaxAgentModal extends React.Component {
if (checkAll === "1") {
const checked = _.map(employeeStatus, it => it.id);
this.setState({
- checkAll: '1',
+ checkAll: "1",
checkboxValue: checked.join(",")
});
} else {
this.setState({
- checkAll: '0',
- checkboxValue: ''
+ checkAll: "0",
+ checkboxValue: ""
});
}
}}/>
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js
index ef1e46a1..52a402fa 100644
--- a/pc4mobx/hrmSalary/stores/payroll.js
+++ b/pc4mobx/hrmSalary/stores/payroll.js
@@ -69,6 +69,7 @@ export class payrollStore {
@observable salarySendDetailDataSource = []; // 详情列表DataSource
@observable salarySendDetailTableStore = new TableStore(); // 详情列表store
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
+ @observable salaryTableStore = new TableStore();//薪资查看详情页表格Store
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
@observable detailListCondition = []; // 详情页搜索条件
@observable salarySendDetailPageInfo = {};
diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js
index 947549b2..62edcb2e 100644
--- a/pc4mobx/hrmSalary/stores/payrollFiles.js
+++ b/pc4mobx/hrmSalary/stores/payrollFiles.js
@@ -26,11 +26,12 @@ export class PayrollFilesStore {
@action("薪资档案-列表查询")
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
return new Promise((resolve, reject) => {
- const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue;
+ const { departmentIds, positionIds, subcompanyIds, statuses, taxAgentIds, ...extra } = searchItemsValue;
API.queryList({
departmentIds: departmentIds ? departmentIds.split(",") : [],
positionIds: positionIds ? positionIds.split(",") : [],
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
+ taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
statuses: statuses ? statuses.split(",") : [],
...payload, ...extra, url
}).then(res => {
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index 4ce6ef7a..d238e695 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -70,6 +70,40 @@
}
}
}
+
+ .multiple_select {
+ .wea-select-input .arrow {
+ position: absolute;
+ right: 4px;
+ top: 8px;
+ color: #666;
+ }
+
+ .wdb {
+ word-break: break-all !important;
+ word-wrap: break-word !important;
+ }
+
+ .wea-select-input {
+ height: 30px;
+ white-space: nowrap;
+ min-width: 100px;
+ max-width: 345px;
+ width: 100%;
+ display: inline-block;
+ padding: 4px 17px 4px 4px;
+ position: relative;
+ min-height: 30px;
+ border: 1px solid #d9d9d9;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ }
}
//公式编辑框样式
@@ -83,3 +117,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;
+ }
+}
+
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index 3f5e47bd..cf13077a 100644
--- a/pc4mobx/hrmSalary/util/index.js
+++ b/pc4mobx/hrmSalary/util/index.js
@@ -26,7 +26,7 @@ export const getConditionFields = (condition) => {
};
// 渲染form表单: 一般对form的渲染都统一使用该方法
-export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
+export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title, classnames = "") => {
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
@@ -41,7 +41,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
tipPosition="bottom" // 错误提示的显示位置: top/bottom
- className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""}
+ className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames}
>