diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js
index 013bddee..2ffee227 100644
--- a/pc4mobx/hrmSalary/apis/calculate.js
+++ b/pc4mobx/hrmSalary/apis/calculate.js
@@ -564,3 +564,7 @@ export const cacheImportField = (params) => {
body: JSON.stringify(params)
}).then(res => res.json());
};
+//薪资核算-页面查看权限
+export const salaryacctAcctresultCheckAuth = params => {
+ return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/checkAuth", "GET", params);
+};
diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js
index 8cf65377..360c8b62 100644
--- a/pc4mobx/hrmSalary/apis/declare.js
+++ b/pc4mobx/hrmSalary/apis/declare.js
@@ -1,4 +1,5 @@
import { WeaTools } from 'ecCom';
+import { postFetch } from '../util/request';
//个税申报表-个税申报表列表
export const getDeclareList = params => {
@@ -7,7 +8,7 @@ export const getDeclareList = params => {
mode: 'cors',
headers: {
'Content-Type': 'application/json'
- },
+ },
body: JSON.stringify(params)
}).then(res => res.json())
}
@@ -24,7 +25,7 @@ export const saveDeclare = params => {
mode: 'cors',
headers: {
'Content-Type': 'application/json'
- },
+ },
body: JSON.stringify(params)
}).then(res => res.json())
}
@@ -41,7 +42,7 @@ export const getDetailList = params => {
mode: 'cors',
headers: {
'Content-Type': 'application/json'
- },
+ },
body: JSON.stringify(params)
}).then(res => res.json())
}
@@ -52,13 +53,16 @@ export const exportSalaryArchive = (id = "") => {
fetch('/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=' + id).then(res => res.blob().then(blob => {
var filename=`个税申报表.xlsx`
var a = document.createElement('a');
- var url = window.URL.createObjectURL(blob);
+ var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = filename;
a.click();
window.URL.revokeObjectURL(url);
}))
}
-
+//个税申报表-撤回申报
+export const withDrawTaxDeclaration = (params) => {
+ return postFetch('/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration', params);
+}
diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js
index eaf11a11..1f9b1d64 100644
--- a/pc4mobx/hrmSalary/apis/payroll.js
+++ b/pc4mobx/hrmSalary/apis/payroll.js
@@ -367,3 +367,24 @@ export const getAvailableSalaryItemSet = (params) => {
export const salaryBillSendSum = (params) => {
return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params);
};
+//工资单发放-发送短信验证码
+export const sendMobileCode = (params) => {
+ return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params);
+};
+//工资单-验证方式
+export const payrollCheckType = params => {
+ return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
+};
+
+// 工资单基础设置-获取设置列表
+export const getSalaryBillBaseSetForm = (id) => {
+ return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/baseSet/getForm", "get", {});
+};
+//工资单基础设置-保存工资单基础设置(设置水印)
+export const salaryBillBaseSetSave = (params) => {
+ return postFetch("/api/bs/hrmsalary/salaryBill/baseSet/save", params);
+};
+//工资单基础设置-保存工资单基础设置(水印预览)
+export const salaryBillBaseSetPreviewWaterMark = (params) => {
+ return postFetch("/api/bs/hrmsalary/salaryBill/baseSet/previewWaterMark", params);
+};
diff --git a/pc4mobx/hrmSalary/apis/payrollFiles.js b/pc4mobx/hrmSalary/apis/payrollFiles.js
index 74cf1d72..7ebdb6bb 100644
--- a/pc4mobx/hrmSalary/apis/payrollFiles.js
+++ b/pc4mobx/hrmSalary/apis/payrollFiles.js
@@ -65,3 +65,11 @@ export const deletePendingTodo = (params) => {
export const deleteSuspendTodo = (params) => {
return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo', params);
}
+// 待定薪、停薪员工 是否允许删除薪资档案
+export const salaryArchiveDelete = (params) => {
+ return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete', 'GET', params);
+}
+// 删除薪资档案
+export const deleteSalaryArchive = (params) => {
+ return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive', params);
+}
diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js
index b0639647..2e3c0c4f 100644
--- a/pc4mobx/hrmSalary/apis/ruleconfig.js
+++ b/pc4mobx/hrmSalary/apis/ruleconfig.js
@@ -1,53 +1,65 @@
-import { WeaTools } from 'ecCom';
-import { postFetch } from '../util/request';
+import { WeaTools } from "ecCom";
+import { postFetch } from "../util/request";
//通用字典表 {enumClass:""}
export const commonEnumList = (params) => {
- return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params);
-}
+ return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
+};
export const sysOrderRule = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/sys/orderRule', 'GET', params);
-}
+ return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params);
+};
//保存排序规则
export const updateOrderRule = (params) => {
- return postFetch('/api/bs/hrmsalary/sys/updateOrderRule', params);
-}
+ return postFetch("/api/bs/hrmsalary/sys/updateOrderRule", params);
+};
//导入规则详情信息
export const sysConfCodeRule = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code', 'GET', params);
-}
+ return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code", "GET", params);
+};
//保存导入规则
export const saveMatchEmployeeModeRule = (params) => {
- return postFetch('/api/bs/hrmsalary/sys/saveMatchEmployeeModeRule', params);
-}
+ return postFetch("/api/bs/hrmsalary/sys/saveMatchEmployeeModeRule", params);
+};
//应用配置查询
export const queryAppsetting = (params) => {
- return WeaTools.callApi('/api/bs/hrmsalary/sys/app/setting', 'GET', params);
-}
+ return WeaTools.callApi("/api/bs/hrmsalary/sys/app/setting", "GET", params);
+};
//加密配置保存
export const saveEncryptSetting = (params) => {
- return postFetch('/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting', params);
-}
+ return postFetch("/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting", params);
+};
//加密配置保存
export const appSettingSave = (params) => {
- return postFetch('/api/bs/hrmsalary/sys/app/setting/save', params);
-}
+ return postFetch("/api/bs/hrmsalary/sys/app/setting/save", params);
+};
//获取加密进度条
export const getEncryptProgress = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/sys/app/getEncryptProgress', 'GET', params);
-}
+ return WeaTools.callApi("/api/bs/hrmsalary/sys/app/getEncryptProgress", "GET", params);
+};
//保存报税规则
export const operateTaxDeclarationFunction = (params) => {
- return postFetch('/api/bs/hrmsalary/sys/operateTaxDeclarationFunction', params);
-}
+ return postFetch("/api/bs/hrmsalary/sys/operateTaxDeclarationFunction", params);
+};
+//保存档案删除规则
+export const saveArchiveDelete = (params) => {
+ return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params);
+};
+//保存个税申报撤回规则
+export const saveWithDrawTaxDeclaration = (params) => {
+ return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params);
+};
+//保存匹配规则
+export const saveSalaryAcctEmployeeRule = (params) => {
+ return postFetch("/api/bs/hrmsalary/sys/saveSalaryAcctEmployeeRule", params);
+};
//保存薪酬统计报表
export const reportStatisticsReportSave = (params) => {
- return postFetch('/api/bs/hrmsalary/report/statistics/report/save', params);
-}
+ return postFetch("/api/bs/hrmsalary/report/statistics/report/save", params);
+};
//薪酬统计维度下拉列表
export const reportGetForm = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/report/statistics/report/getForm', 'GET', params);
-}
+ return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params);
+};
diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js
index 974ed260..a38f22ce 100644
--- a/pc4mobx/hrmSalary/apis/welfareArchive.js
+++ b/pc4mobx/hrmSalary/apis/welfareArchive.js
@@ -1,146 +1,150 @@
-import { WeaTools } from 'ecCom';
+import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
export const tips = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/tips', 'get', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/tips", "get", params);
};
export const getCondition = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/getSearchCondition', 'get', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params);
};
//社保福利档案列表
export const queryList = (params) => {
- return postFetch('/api/bs/hrmsalary/archives/getTable', params);
+ return postFetch("/api/bs/hrmsalary/archives/getTable", params);
};
//社保福利档案列表
export const queryInsuranceTabTotal = (params) => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/queryInsuranceTabTotal', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/queryInsuranceTabTotal", params);
};
//删除待办-待增员
export const updateRunStatus = (params) => {
- return postFetch('/api/bs/hrmsalary/archives/updateRunStatus', params);
+ return postFetch("/api/bs/hrmsalary/archives/updateRunStatus", params);
};
//删除待办-待减员
export const cancelStayDel = (params) => {
- return postFetch('/api/bs/hrmsalary/archives/cancelStayDel', params);
+ return postFetch("/api/bs/hrmsalary/archives/cancelStayDel", params);
};
//全量增员
export const allStayAddToPay = (params) => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/allStayAddToPay', 'GET', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/allStayAddToPay", "GET", params);
};
//全量减员
export const allStayDelToStop = (params) => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/allStayDelToStop', 'GET', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/allStayDelToStop", "GET", params);
};
//增员
export const stayAddToPay = (params) => {
- return postFetch('/api/bs/hrmsalary/archives/stayAddToPay', params);
+ return postFetch("/api/bs/hrmsalary/archives/stayAddToPay", params);
};
//减员
export const stayDelToStop = (params) => {
- return postFetch('/api/bs/hrmsalary/archives/stayDelToStop', params);
+ return postFetch("/api/bs/hrmsalary/archives/stayDelToStop", params);
+};
+//删除社保档案
+export const deleteArchive = (params) => {
+ return postFetch("/api/bs/hrmsalary/archives/deleteArchive", params);
};
//取消停缴
export const cancelStopPayment = (params) => {
- return postFetch('/api/bs/hrmsalary/archives/cancelStopPayment', params);
+ return postFetch("/api/bs/hrmsalary/archives/cancelStopPayment", params);
};
export const getTable = params => {
- return fetch('/api/bs/hrmsalary/archives/getTable', {
- method: 'POST',
- mode: 'cors',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(params)
- }).then(res => res.json())
+ return fetch("/api/bs/hrmsalary/archives/getTable", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
};
export const getBaseForm = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/getBaseForm', 'get', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/getBaseForm", "get", params);
};
export const getPaymentForm = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/getPaymentForm', 'get', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/getPaymentForm", "get", params);
};
// 保存
export const save = params => {
- return fetch('/api/bs/hrmsalary/archives/save', {
- method: 'POST',
- mode: 'cors',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(params)
- }).then(res => res.json())
+ return fetch("/api/bs/hrmsalary/archives/save", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
};
// 导出档案
export const exportDocument = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/export', 'get', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/export", "get", params);
};
// 导入档案 - 获取组件的一些前置参数
export const getImportDocumentParams = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/archives/getImportParams', 'get', params);
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/getImportParams", "get", params);
};
// 导入档案- 导出现有数据
export const exportCurData = params => {
- fetch('/api/bs/hrmsalary/scheme/template/export',{
- method: 'POST',
- mode: 'cors',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(params)
- }).then(res => res.blob().then(blob => {
- var filename=`社保福利档案模板.xlsx`
- var a = document.createElement('a');
- var url = window.URL.createObjectURL(blob);
- a.href = url;
- a.download = filename;
- a.click();
- window.URL.revokeObjectURL(url);
- }))
+ fetch("/api/bs/hrmsalary/scheme/template/export", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.blob().then(blob => {
+ var filename = `社保福利档案模板.xlsx`;
+ var a = document.createElement("a");
+ var url = window.URL.createObjectURL(blob);
+ a.href = url;
+ a.download = filename;
+ a.click();
+ window.URL.revokeObjectURL(url);
+ }));
};
// 导入档案-预览
export const previewCurData = (params) => {
- return fetch('/api/bs/hrmsalary/scheme/preview', {
- method: 'POST',
- mode: 'cors',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(params)
- }).then(res => res.json())
-}
+ return fetch("/api/bs/hrmsalary/scheme/preview", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
+};
// 档案导入
export const importBatch = (params) => {
- return fetch('/api/bs/hrmsalary/scheme/importBatch', {
- method: 'POST',
- mode: 'cors',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(params)
- }).then(res => res.json())
-}
+ return fetch("/api/bs/hrmsalary/scheme/importBatch", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
+};
// 导出档案
export const exportArchives = (ids) => {
- fetch('/api/bs/hrmsalary/scheme/export?ids=' + ids).then(res => res.blob().then(blob => {
- var filename=`社保福利档案.xlsx`
- var a = document.createElement('a');
- var url = window.URL.createObjectURL(blob);
- a.href = url;
- a.download = filename;
- a.click();
- window.URL.revokeObjectURL(url);
- }))
-}
+ fetch("/api/bs/hrmsalary/scheme/export?ids=" + ids).then(res => res.blob().then(blob => {
+ var filename = `社保福利档案.xlsx`;
+ var a = document.createElement("a");
+ var url = window.URL.createObjectURL(blob);
+ a.href = url;
+ a.download = filename;
+ a.click();
+ window.URL.revokeObjectURL(url);
+ }));
+};
diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.js b/pc4mobx/hrmSalary/components/UnifiedTable/index.js
index 8f406f4f..f8cbff97 100644
--- a/pc4mobx/hrmSalary/components/UnifiedTable/index.js
+++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.js
@@ -13,7 +13,7 @@ class Index extends Component {
return { ...item, fixed: "left", width: 176 };
}
if (item.dataIndex === "operate") {
- return { ...item, fixed: "right", width: "120px" };
+ return { ...item, fixed: "right", width: item.width || "120px" };
}
return { ...item, width: "33%" };
});
diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.less b/pc4mobx/hrmSalary/components/UnifiedTable/index.less
index e1dbaf1d..616d16f0 100644
--- a/pc4mobx/hrmSalary/components/UnifiedTable/index.less
+++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.less
@@ -8,17 +8,17 @@
}
.linkWapper {
- a {
- color: #4d7ad8;
- margin-right: 8px;
- }
+ //a {
+ // color: #4d7ad8;
+ // margin-right: 8px;
+ //}
i {
cursor: pointer;
}
- a:hover {
- text-decoration: none;
- }
+ //a:hover {
+ // text-decoration: none;
+ //}
}
}
diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.js b/pc4mobx/hrmSalary/components/captchaModal/index.js
new file mode 100644
index 00000000..35661772
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/captchaModal/index.js
@@ -0,0 +1,94 @@
+/*
+ * Author: 黎永顺
+ * name: 验证码弹框
+ * Description:
+ * Date: 2023/6/16
+ */
+import React, { Component } from "react";
+import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
+import { sendMobileCode } from "../../apis/payroll";
+import { Button } from "antd";
+import "./index.less";
+
+const { getLabel } = WeaLocaleProvider;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ captcha: "",
+ time: 60
+ };
+ this.timeRef = null;
+ }
+
+ componentWillUnmount() {
+ clearInterval(this.timeRef);
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) {
+ clearInterval(this.timeRef);
+ this.setState({ captcha: "", time: 60 });
+ }
+ }
+
+ handleSendCaptcha = () => {
+ sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
+ if (status) {
+ console.log(data);
+ this.timeRef = setInterval(() => {
+ const { time } = this.state;
+ this.setState({ time: time - 1 }, () => {
+ if (this.state.time === -1) {
+ clearInterval(this.timeRef);
+ this.setState({ time: 60 });
+ }
+ });
+ }, 1000);
+ }
+ });
+ };
+ handleConfirm = () => {
+ if (!this.state.captcha) {
+ this.refs.weaError.showError();
+ // return
+ }
+ this.props.onCancel();
+ this.props.onConfirm();
+ };
+
+ render() {
+ const { captcha, time } = this.state;
+ return (
+ {getLabel(826, "确定")}
+ ]}
+ >
+
+
+
+
+ this.setState({ captcha })}/>
+
+
+
+
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.less b/pc4mobx/hrmSalary/components/captchaModal/index.less
new file mode 100644
index 00000000..4f8d23b7
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/captchaModal/index.less
@@ -0,0 +1,29 @@
+.captchaWrapper {
+ .wea-dialog-body {
+ padding: 30px 20px;
+
+ .wea-form-item-wrapper {
+ .wea-error {
+ width: 100%;
+
+ .captchaInputBox {
+ display: flex;
+ align-items: center;
+
+ .wea-input-normal {
+ flex: 1;
+ }
+
+ button {
+ padding: 8px 10px;
+ border-radius: 0;
+ min-width: 80px;
+ text-align: center;
+ height: 30px;
+ line-height: 15px;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/components/upload/index.js b/pc4mobx/hrmSalary/components/upload/index.js
new file mode 100644
index 00000000..fd7cdd57
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/upload/index.js
@@ -0,0 +1,84 @@
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTools, WeaUpload } from "ecCom";
+import { Icon, Modal } from "antd";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const { viewer } = WeaTools;
+
+class ImageUploadList extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ imageUrl: ""
+ };
+ }
+
+ componentDidMount() {
+ const { wmImg } = this.props;
+ if (!_.isEmpty(wmImg)) {
+ this.setState({
+ imageUrl: wmImg[0].imgSrc
+ });
+ }
+ }
+
+ handleChange = (ids, list) => {
+ this.setState({
+ imageUrl: list[0].imgSrc
+ }, () => this.props.onChange([{ imgSrc: this.state.imageUrl }]));
+ };
+ handleDelete = () => {
+ Modal.confirm({
+ title: getLabel(111, "信息确认"),
+ content: getLabel(111, "确认要删除吗?"),
+ onOk: () => {
+ this.setState({
+ imageUrl: ""
+ }, () => this.props.onChange(null));
+ }
+ });
+ };
+
+
+ render() {
+ const { imageUrl } = this.state;
+ const uploadProps = {
+ uploadUrl: "/api/doc/upload/uploadFile",
+ listType: "img",
+ limitType: "jpg,jpeg,png,gif",
+ category: "string",
+ maxFilesNumber: 1,
+ onChange: this.handleChange
+ };
+ const imgPreviewProps = {
+ src: imageUrl,
+ width: 100,
+ height: 100
+ };
+ return (
+
+ {
+ imageUrl &&
+
+
![]()
+
+
+
+
+ }
+ {
+ !imageUrl &&
+
+
+
+
{getLabel(111, "上传图片")}
+
+
+ }
+
+ );
+ }
+}
+
+export default ImageUploadList;
diff --git a/pc4mobx/hrmSalary/components/upload/index.less b/pc4mobx/hrmSalary/components/upload/index.less
new file mode 100644
index 00000000..577de7c7
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/upload/index.less
@@ -0,0 +1,68 @@
+.textSetting {
+ .uploadWrapper {
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .previewWrapper {
+ border: 1px solid #d9d9d9 !important;
+
+ img {
+ width: 100%;
+ height: 100%;
+ margin-left: 0 !important;
+ cursor: pointer;
+ }
+
+ .operateWrapper {
+ display: none;
+ }
+ }
+
+ .previewWrapper:hover {
+ .operateWrapper {
+ display: flex;
+ position: absolute;
+ align-items: center;
+ justify-content: flex-end;
+ width: 30px;
+ height: 20px;
+ background-color: rgba(0, 0, 0, 0.3);
+ bottom: 4px;
+ right: 13px;
+ border-radius: 3px;
+ padding-right: 4px;
+ }
+ }
+ }
+
+ .upload-select-picture-card, .previewWrapper {
+ border: 1px dashed #d9d9d9;
+ width: 96px;
+ height: 96px;
+ padding: 0;
+ border-radius: 6px;
+ background-color: #fbfbfb;
+ text-align: center;
+ cursor: pointer;
+ -webkit-transition: border-color .3s ease;
+ -o-transition: border-color .3s ease;
+ transition: border-color .3s ease;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ margin-right: 8px;
+ margin-bottom: 8px;
+
+ span.rc-upload {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+
+ .upload-select-picture-card:hover {
+ border-color: #2db7f5;
+ }
+}
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index f2eb1cd7..4cea8b6f 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -35,6 +35,8 @@ import FieldManagement from "./pages/fieldManagement";
import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics";
import EmployeeList from "./pages/employeeView";
import ReportView from "./pages/reportView";
+import MySalaryView from "./pages/mySalary/mySalaryView";
+import WatermarkPreview from "./pages/payroll/watermarkPreview";
import stores from "./stores";
import "./style/index";
@@ -53,6 +55,7 @@ const SocialSecurityBenefits = (props) => props.children;
const DataAcquisition = (props) => props.children;
// mySalary 我的薪资福利
+// mySalaryView 我的薪资福利-查看工资单
// socialSecurityBenefits 社保福利
// programme 社保福利方案
// archives 社保福利档案
@@ -91,6 +94,7 @@ const Routes = (
onEnter={getLocaleLabel}
component={Home}>
+
+
;
};
}
- if (item.title == getLabel(30585, "操作") && showOperateBtn) {
+ if (item.dataIndex === "operate" && showOperateBtn) {
+ item.width = 150;
item.render = (text, record) => {
- const accountBtn = _.filter(
- record.operate,
- it => it.text == getLabel(538780, "核算") || it.text == getLabel(542637, "重新核算")
- );
- const notAccountBtn = _.filter(
- record.operate,
- it => it.text != getLabel(538780, "核算") && it.text != getLabel(542637, "重新核算")
- );
+ const accountBtn = _.take(record.operate, 2);
+ const notAccountBtn = _.drop(record.operate, 2);
let operateBtn = [];
if (!_.isEmpty(accountBtn)) {
operateBtn.push(
@@ -207,13 +202,8 @@ export default class Calculate extends React.Component {
style={{ display: "inline-block", marginRight: 8 }}>
{
- if (it.text == getLabel(538780, "核算") || it.text == getLabel(542637, "重新核算")) {
- it.text == getLabel(538780, "核算")
- ? this.handleAccount(record)
- : this.handleReaccount(record);
- }
- }}>
+ style={it.index !== "4" ? { padding: "0 12px" } : {}}
+ onClick={() => this.handleOperateClick(it.index, record)}>
{it.text}
@@ -229,31 +219,14 @@ export default class Calculate extends React.Component {
{notAccountBtn.map(cz =>
{
- if (cz.text == getLabel(538780, "核算")) {
- this.handleAccount(record);
- } else if (cz.text == getLabel(535052, "删除")) {
- this.handleDeleteItem(record);
- } else if (cz.text == getLabel(251, "归档")) {
- this.handleFile(record);
- } else if (cz.text == getLabel(542637, "重新核算")) {
- this.handleReaccount(record);
- } else if (cz.text == getLabel(33564, "查看")) {
- this.handleDetail(record);
- } else if (cz.text == getLabel(542638, "回算")) {
- this.handleBackCalculate(record);
- }
- }}>
+ onClick={() => this.handleOperateClick(cz.index, record)}>
{cz.text}
)}
}>
-
+
);
}
@@ -261,7 +234,23 @@ export default class Calculate extends React.Component {
};
}
});
- return showOperateBtn ? columns : _.filter(columns, it => it.title != getLabel(30585, "操作"));
+ return showOperateBtn ? columns : _.filter(columns, it => it.title !== "操作");
+ };
+
+ handleOperateClick = (index, record) => {
+ if (index === "0") {
+ this.handleAccount(record);
+ } else if (index === "1") {
+ this.handleDeleteItem(record);
+ } else if (index === "2") {
+ this.handleFile(record);
+ } else if (index === "4") {
+ this.handleReaccount(record);
+ } else if (index === "3") {
+ this.handleDetail(record);
+ } else if (index === "5") {
+ this.handleBackCalculate(record);
+ }
};
// 分页
@@ -291,56 +280,13 @@ export default class Calculate extends React.Component {
render() {
const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props;
- const {
- salaryListDataSource,
- salaryListColumns,
- loading,
- hasRight,
- form,
- condition,
- tableStore,
- showSearchAd,
- getTableDatas,
- doSearch,
- setShowSearchAd,
- salaryListPageInfo
- } = calculateStore;
+ const { salaryListDataSource, loading, hasRight, salaryListPageInfo } = calculateStore;
const { modalParam } = this.state;
if (!hasRight && !loading) {
// 无权限处理
return renderNoright();
}
- const rightMenu = [
- // 右键菜单
- {
- key: "BTN_COLUMN",
- icon: ,
- content: getLabel(32535, "显示列定制"),
- onClick: this.showColumn
- }
- ];
- const collectParams = {
- // 收藏功能配置
- favname: getLabel(538011, "薪资核算"),
- favouritetype: 1,
- objid: 0,
- link: "wui/index.html#/ns_demo03/index",
- importantlevel: 1
- };
- const adBtn = [
- // 高级搜索内部按钮
- ,
- ,
-
- ];
-
const renderRightOperation = () => {
const { startDate, endDate } = this.state;
return (
@@ -394,13 +340,10 @@ export default class Calculate extends React.Component {
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
} // 左侧图标
- iconBgcolor="#F14A2D" // 左侧图标背景色
- showDropIcon={false} // 是否显示下拉按钮
- dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
- dropMenuProps={{ collectParams }}>
- {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
+ title={getLabel(538011, "薪资核算")}
+ icon={
}
+ iconBgcolor="#F14A2D"
+ showDropIcon={false}>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
index 3e684fed..ecefceaa 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
@@ -6,9 +6,11 @@ import CustomTab from "../../components/customTab";
import { inject, observer } from "mobx-react";
import CompareDetailImportModal from "./compareDetailImportModal";
import CustomPaginationTable from "../../components/customPaginationTable";
+import { salaryacctAcctresultCheckAuth } from "../../apis/calculate";
+import Authority from "../mySalary/authority";
const getLabel = WeaLocaleProvider.getLabel;
-@inject("calculateStore")
+@inject("calculateStore", "taxAgentStore")
@observer
export default class CompareDetail extends React.Component {
constructor(props) {
@@ -18,7 +20,8 @@ export default class CompareDetail extends React.Component {
onlyDiffEmployee: true,
onlyDiffSalaryItem: true,
importModalVisible: false,
- searchValue: ""
+ searchValue: "",
+ calculateAuth: false
};
this.pageInfo = { current: 1, pageSize: 10 };
}
@@ -34,8 +37,23 @@ export default class CompareDetail extends React.Component {
current: 1
};
fetchComparisonResultList(params);
+ this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: getQueryString("id") })
}
+ salaryacctAcctresultCheckAuth = (params) => {
+ const { taxAgentStore: { getPermission } } = this.props;
+ getPermission().then(({ data }) => {
+ const { isOpenDevolution } = data;
+ if (isOpenDevolution) {
+ salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
+ this.setState({ calculateAuth: data && status });
+ });
+ } else {
+ this.setState({ calculateAuth: true });
+ }
+ });
+ };
+
getColumns = (columns) => {
let newColumns = [...columns];
newColumns.map(item => {
@@ -170,7 +188,7 @@ export default class CompareDetail extends React.Component {
comparisonResultColumns
}
} = this.props;
- const { importModalVisible, searchValue } = this.state;
+ const { importModalVisible, searchValue, calculateAuth } = this.state;
const renderRightOperation = () => {
return (
@@ -204,60 +222,63 @@ export default class CompareDetail extends React.Component {
);
};
return (
-
-
-
-
-
{getLabel(18125, "公式")}=
-
{getLabel(543280, "系统值")};{getLabel(543281, "线下值")};{getLabel(543282, "差值")}
+
+
+
+
+
+ {getLabel(18125, "公式")}=
+ {getLabel(543280, "系统值")};{getLabel(543281, "线下值")};{getLabel(543282, "差值")}
+
-
-
- {
- this.pageInfo.current = value;
- this.handleDataPageChange(value);
- }}
- onShowSizeChange={(current, pageSize) => {
- this.pageInfo = { current, pageSize };
- this.handleShowSizeChange(this.pageInfo);
- }}
- />
-
+
+ {
+ this.pageInfo.current = value;
+ this.handleDataPageChange(value);
+ }}
+ onShowSizeChange={(current, pageSize) => {
+ this.pageInfo = { current, pageSize };
+ this.handleShowSizeChange(this.pageInfo);
+ }}
+ />
+
- {
- importModalVisible && {
- this.handleComparisonFinish();
- }}
- onCancel={() => {
- this.setState({
- importModalVisible: false
- });
- }}
- />
- }
-
+ {
+ importModalVisible &&
{
+ this.handleComparisonFinish();
+ }}
+ onCancel={() => {
+ this.setState({
+ importModalVisible: false
+ });
+ }}
+ />
+ }
+
+
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
index f2b10150..8e68aa1d 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
@@ -17,8 +17,10 @@ import {
import { convertToUrlString, getQueryString } from "../../util/url";
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
import ProgressModal from "../../components/progressModal";
+import { salaryacctAcctresultCheckAuth } from "../../apis/calculate";
import Authority from "../mySalary/authority";
+
const { ButtonSelect } = WeaDropdown;
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "salaryFileStore", "taxAgentStore")
@@ -43,23 +45,39 @@ export default class CalculateDetail extends React.Component {
progressVisible: false,
progress: 0,
accountIds: [],
- accountExceptInfo: ""
+ accountExceptInfo: "",
+ calculateAuth: false
};
this.id = "";
this.timer = null;
}
- componentWillMount() {
+ async componentWillMount() {
let id = getQueryString("id");
this.id = id;
const { calculateStore: { checkTaxAgent }, salaryFileStore } = this.props;
const { commonEnumList } = salaryFileStore;
+ this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: id });
checkTaxAgent(this.id);
let modalParam = { ...this.state.modalParam, salaryAcctRecordId: id };
this.setState({ modalParam });
commonEnumList("user", { enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" });
}
+ salaryacctAcctresultCheckAuth = (params) => {
+ const { taxAgentStore: { getPermission } } = this.props;
+ getPermission().then(({ data }) => {
+ const { isOpenDevolution } = data;
+ if (isOpenDevolution) {
+ salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
+ this.setState({ calculateAuth: data && status });
+ });
+ } else {
+ this.setState({ calculateAuth: true });
+ }
+ });
+ };
+
Input = (value, key) => {
const { employeeName, workcode } = this.state.searchItemsValue;
return (
@@ -273,7 +291,7 @@ export default class CalculateDetail extends React.Component {
};
render() {
- const { selectedKey, acctResultImportVisiable, showSearchAd } = this.state;
+ const { selectedKey, acctResultImportVisiable, showSearchAd, calculateAuth } = this.state;
const { taxAgentStore: { payrollPermission } } = this.props;
const menu = (
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js
index 607d2d42..0f85d51d 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js
@@ -33,7 +33,8 @@ export default class PhoneTemplate extends React.Component {
}
componentDidMount() {
- if (this.props.isMsgPreview && this.props.salaryItemSet && window.em) {
+ // && window.em
+ if (this.props.isMsgPreview && this.props.salaryItemSet) {
this.setState({
salaryItemSet: JSON.parse(this.props.salaryItemSet),
salaryTemplateShowSet: JSON.parse(this.props.salaryTemplateShowSet)
diff --git a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js
index 1711e103..9e986510 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js
+++ b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js
@@ -1,10 +1,10 @@
import React from "react";
import { inject, observer } from "mobx-react";
-import { Radio, Spin } from "antd";
-import { WeaTableNew } from "comsMobx";
-
-const WeaTable = WeaTableNew.WeaTable;
+import { WeaLocaleProvider, WeaTable } from "ecCom";
+import { toJS } from "mobx";
+import { Dropdown, Menu, Radio, Spin } from "antd";
+const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
export default class TemplateSettingList extends React.Component {
@@ -15,23 +15,23 @@ export default class TemplateSettingList extends React.Component {
}
// 编辑操作按钮
- onEdit(record) {
+ onEdit = (record) => {
this.props.onEdit && this.props.onEdit(record);
- }
+ };
// 复制操作按钮
- onCopy(record) {
+ onCopy = (record) => {
this.props.onCopy && this.props.onCopy(record);
- }
+ };
// 删除操作按钮
- onDelete(record) {
+ onDelete = (record) => {
this.props.onDelete && this.props.onDelete(record);
- }
+ };
// 操作按钮
- onOperatesClick = (record, index, operate, flag) => {
- switch (operate.index.toString()) {
+ onOperatesClick = (record, operate) => {
+ switch (operate) {
case "0": // 编辑
this.onEdit(record);
break;
@@ -45,21 +45,22 @@ export default class TemplateSettingList extends React.Component {
};
// 默认使用配置
- recordItemChange(record) {
+ recordItemChange = (record) => {
const { payrollStore } = this.props;
const { changePayrollDefaultUse, getPayrollTemplateList } = payrollStore;
changePayrollDefaultUse(record.id).then(() => {
getPayrollTemplateList();
});
- }
+ };
// 增加编辑功能,重写columns绑定事件
- getColumns = columns => {
- const { showOperateBtn } = this.props;
- let newColumns = "";
- newColumns = columns.map(column => {
+ getColumns = () => {
+ const { showOperateBtn, payrollStore } = this.props;
+ const { templateTableColumns: columns } = payrollStore;
+ let newColumns = [];
+ newColumns = _.filter(toJS(columns), item => item.dataIndex !== "id").map(column => {
let newColumn = column;
- newColumn.render = (text, record, index) => {
+ newColumn.render = (text, record) => {
//前端元素转义
let valueSpan =
record[newColumn.dataIndex + "span"] !== undefined
@@ -70,10 +71,8 @@ export default class TemplateSettingList extends React.Component {
return (
{
- this.recordItemChange(record);
- }}
+ checked={record.useType === "1"}
+ onChange={() => this.recordItemChange(record)}
/>
);
default:
@@ -82,25 +81,79 @@ export default class TemplateSettingList extends React.Component {
};
return newColumn;
});
- return newColumns;
+ return [
+ ...newColumns,
+ {
+ dataIndex: "operate",
+ title: getLabel(30585, "操作"),
+ width: 150,
+ render: (_, record) => {
+ return
+ this.onOperatesClick(record, "0")}>{getLabel(501169, "编辑")}
+ this.onOperatesClick(record, "1")}>{getLabel(77, "复制")}
+ this.onOperatesClick(record, "2")}>
+ {getLabel(535052, "删除")}
+
+ }>
+
+
+ ;
+ }
+ }
+ ];
};
render() {
const { payrollStore } = this.props;
- const { templateStore, loading } = payrollStore;
+ const {
+ templateTableDataSource,
+ loading,
+ templateTablePageInfo,
+ setTemplateTablePageInfo,
+ getPayrollTemplateList,
+ templateTableSelectedRowKeys,
+ setTemplateTableSelectedRowKeys
+ } = payrollStore;
+ const pagination = {
+ ...templateTablePageInfo,
+ showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
+ showQuickJumper: true,
+ showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ setTemplateTablePageInfo({ ...templateTablePageInfo, current, pageSize }, () => {
+ getPayrollTemplateList();
+ });
+ },
+ onChange: current => {
+ setTemplateTablePageInfo({ ...templateTablePageInfo, current }, () => {
+ getPayrollTemplateList();
+ });
+ }
+ };
+ const rowSelection = {
+ selectedRowKeys: toJS(templateTableSelectedRowKeys),
+ onChange: selectedRowKeys => setTemplateTableSelectedRowKeys(selectedRowKeys)
+ };
return (
- {loading
- ?
-
-
- :
}
+ {
+ loading
+ ?
+
+
+ :
+ }
);
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js
new file mode 100644
index 00000000..a6bd6564
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js
@@ -0,0 +1,58 @@
+/*
+ * Author: 黎永顺
+ * name: 水印预览
+ * Description:
+ * Date: 2023/6/15
+ */
+import React, { Component } from "react";
+import { salaryBillBaseSetPreviewWaterMark } from "../../apis/payroll";
+import { WeaTools } from "ecCom";
+
+const { watermark } = WeaTools;
+
+class WatermarkPreview extends Component {
+ componentDidMount() {
+ const wmSetting = window.localStorage.getItem("wmSetting");
+ wmSetting && this.salaryBillBaseSetPreviewWaterMark(JSON.parse(wmSetting));
+ }
+
+ salaryBillBaseSetPreviewWaterMark = (payload) => {
+ salaryBillBaseSetPreviewWaterMark(payload).then(({ status, data }) => {
+ if (status) {
+ const { wmSetting: { wmHeight: height, wmWidth: width, wmNoTransparent, wmRotate } } = payload;
+ watermark({
+ text: data,
+ src: "",
+ width, height,
+ rotate: `-${wmRotate || 15}`,
+ alpha: wmNoTransparent / 100 || 0.15,
+ interval: 2000,
+ intervalCheck: true,
+ clickCheck: true
+ });
+ }
+ });
+ };
+
+ render() {
+ return (
+
+
水印预览效果
+
水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果
+
水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果
+
水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果
+
水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果
+
水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果
+
水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果
+
+ );
+ }
+}
+
+export default WatermarkPreview;
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
index 5e9857e2..59b9fb37 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
@@ -86,7 +86,8 @@ class Index extends Component {
paysetParams: {
payStartDate: "",
payEndDate: ""
- }
+ },
+ salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
};
}
@@ -166,7 +167,7 @@ class Index extends Component {
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
dataIndex: it.dataIndex,
- width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 120 : it.dataIndex === "taxAgentName" ? 176 : 150,
+ width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150,
title: it.title, align: "left",
fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "",
ellipsis: true
@@ -200,14 +201,16 @@ class Index extends Component {
postMessageToChild = (payload) => {
const childFrameObj = document.getElementById("atdTable");
const { dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys } = payload;
+ const { salaryArchiveDelete } = this.state;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys, i18n
+ dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys, salaryArchiveDelete, i18n
}), "*");
};
init = async () => {
const { data: archiveStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" });
const { data: userStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" });
+ const { data: salaryArchiveDelete } = await this.salaryArchiveDelete();
this.setState({
archiveStatusList: [{
key: "",
@@ -222,7 +225,8 @@ class Index extends Component {
}, ..._.map(userStatusList, it => ({
key: String(it.value),
showname: it.defaultLabel
- }))]
+ }))],
+ salaryArchiveDelete
}, () =>
this.getImportTypes());
};
@@ -250,7 +254,7 @@ class Index extends Component {
});
queryList(payload, searchItemsValue, url).then(({ data, status }) => {
this.setState({ loading: { ...loading, query: false } });
- if (status) {
+ if (status && selectedKey === _.lowerCase(data.listType)) {
const { pageInfo: paganition } = data;
const { list: dataSource, total, pageNum: current, pageSize } = paganition;
this.setState({
@@ -293,6 +297,9 @@ class Index extends Component {
commonEnumList = (params) => {
return API.commonEnumList(params);
};
+ salaryArchiveDelete = () => {
+ return API.salaryArchiveDelete();
+ };
getImportTypes = () => {
API.getImportTypes().then(({ data, status }) => {
if (status) {
@@ -502,7 +509,7 @@ class Index extends Component {
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
dataIndex: it.dataIndex,
- width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 120 : it.dataIndex === "taxAgentName" ? 176 : 150,
+ width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150,
title: it.title, align: "left",
fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "",
ellipsis: true
@@ -552,6 +559,21 @@ class Index extends Component {
this.deleteSuspendTodo([id]);
} else if (key === "view") {
this.handleEdit(id);
+ } else if (key === "deleteAchives") {
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(388758, "确认要删除吗?"),
+ onOk: () => {
+ API.deleteSalaryArchive([id]).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.query();
+ } else {
+ message.error(errormsg || getLabel(30651, "操作失败"));
+ }
+ });
+ }
+ });
}
};
// 查看 Slide 头部操作按钮
@@ -564,7 +586,7 @@ class Index extends Component {
arrList.push();
+ }}>发起调薪);
}
if (showOperateBtn && selectedKey === "fixed") {
arrList.push(
{/*统计数据范围及规则设置弹框*/}
this.setState({
statisticalPayload: { visible: false, id: "", dimension: "" }
}, () => isRefresh && this.reportRef.reportStatisticsReportGetData(report.id, report.dimensionId))}
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
index 8a3a1a03..363531bd 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
@@ -5,109 +5,70 @@
* Date: 2022-09-19 18:15:32
*/
import React, { Component } from "react";
-import { WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
-import { CheckBox } from "../appConfig";
-import { Button, message, Modal } from "antd";
+import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
+import { message, Modal } from "antd";
import * as API from "../../apis/ruleconfig";
import "./index.less";
import ProgressModal from "../../components/progressModal";
-const getLabel = WeaLocaleProvider.getLabel;
+const { getLabel } = WeaLocaleProvider;
-class Index extends Component {
+export default class Index extends Component {
constructor(props) {
super(props);
this.state = {
items: [],
- importItems: [],
- enctryItems: [],
- declareItems: [],
- loading: {
- order: false,
- employee: false,
- encry: false,
- declare: false
- },
+ matchRuleOptions: [], orderOptions: [], ascOptions: [], employeeOptions: [],
saveParams: {
orderRule: "",
ascOrDesc: "",
rule: "",
enctry: "",
- operateTaxDeclaration: ""
+ operateTaxDeclaration: "",
+ matchRule: "",
+ confValue: "0",
+ withDrawTaxDeclaration: "0"
},
+ showEncryptOperationButton: "",
progressVisible: false,
progress: 50
};
}
- componentDidMount() {
- let sysSetting = this.getSysSetting();
+ async componentDidMount() {
+ const { saveParams } = this.state;
+ const [
+ matchRuleEnum, orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum,
+ orderRules, codeRule, appSettings
+ ] = await Promise.all([
+ this.matchRuleEnum(), this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(),
+ this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting()
+ ]);
+ const matchRuleOptions = _.map(matchRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
+ const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
+ const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
+ const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
+ const { data: { ascOrDesc, orderRule } } = orderRules;
+ const { data: rule } = codeRule;
+ const {
+ data: {
+ showEncryptOperationButton,
+ isOpenEncrypt: enctry,
+ isOpenTaxDeclaration: operateTaxDeclaration,
+ salaryAcctEmployeeRule: matchRule,
+ salaryArchiveDelete: confValue, withDrawTaxDeclaration
+ }
+ } = appSettings;
+ this.setState({
+ matchRuleOptions, orderOptions, ascOptions, employeeOptions,
+ showEncryptOperationButton,
+ saveParams: {
+ ...saveParams,
+ ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration
+ }
+ });
}
- getSysSetting = async () => {
- const [orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum, sysOrderRule, sysConfCodeRule, queryAppsetting] = await Promise.all([this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(), this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting()]);
- if (orderRuleEnum.status && ascOrDescEnum.status && matchEmployeeModeEnum.status) {
- const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
- const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
- const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
- this.setState({
- items: [
- {
- com: Select({
- label: getLabel(15512, "排序字段"),
- onChange: this.handleChane,
- value: sysOrderRule.data.orderRule,
- options: orderOptions
- })
- },
- {
- com: Select({
- label: getLabel(543351, "正序/倒序"),
- onChange: this.handleChane,
- value: sysOrderRule.data.ascOrDesc,
- options: ascOptions
- })
- }
- ],
- importItems: [
- {
- com: Select({
- label: getLabel(543352, "人员字段"),
- onChange: this.handleChane,
- value: sysConfCodeRule.data,
- options: employeeOptions
- })
- }
- ],
- enctryItems: queryAppsetting.data.showEncryptOperationButton === "true" ? [
- {
- com: CheckBox({
- label: getLabel(526997, "加密设置"),
- value: queryAppsetting.data.isOpenEncrypt,
- onChange: (data) => this.handleChane({ type: getLabel(526997, "加密设置"), selected: data })
- })
- }
- ] : [],
- declareItems: [
- {
- com: CheckBox({
- label: getLabel(543353, "个税申报"),
- value: queryAppsetting.data.isOpenTaxDeclaration,
- onChange: (data) => this.handleChane({ type: getLabel(543353, "个税申报"), selected: data })
- })
- }
- ],
- saveParams: {
- ...this.state.saveParams,
- orderRule: sysOrderRule.data.orderRule,
- ascOrDesc: sysOrderRule.data.ascOrDesc,
- rule: sysConfCodeRule.data,
- enctry: queryAppsetting.data.isOpenEncrypt,
- operateTaxDeclaration: queryAppsetting.data.isOpenTaxDeclaration
- }
- });
- }
- };
sysOrderRule = () => {
return API.sysOrderRule();
};
@@ -117,6 +78,12 @@ class Index extends Component {
queryAppsetting = () => {
return API.queryAppsetting();
};
+ matchRuleEnum = () => {
+ const payload = {
+ enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum"
+ };
+ return API.commonEnumList(payload);
+ };
orderRuleEnum = () => {
const payload = {
enumClass: "com.engine.salary.sys.enums.OrderRuleEnum"
@@ -135,152 +102,195 @@ class Index extends Component {
};
return API.commonEnumList(payload);
};
- handleSave = (type) => {
- const { saveParams } = this.state;
- if (type === "ORDER") {
- if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) {
- Modal.warning({
- title: getLabel(131329, "信息确认"),
- content: getLabel(384146, "必要信息不完整,红色*为必填项!")
- });
- return;
- }
- this.setState({ loading: { ...this.state.loading, order: true } });
- API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => {
- this.setState({ loading: { ...this.state.loading, order: false } });
+ updateOrderRule = () => {
+ API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"]))
+ .then(({ status, errormsg }) => {
if (status) {
- message.success(getLabel(22619, "保存成功"));
- let sysSetting = this.getSysSetting();
+ message.success(getLabel(22619, "保存成功!"));
} else {
- message.error(errormsg || getLabel(22620, "保存失败"));
+ message.error(errormsg || getLabel(22620, "保存失败!"));
}
});
- } else if (type === "EMPLOYEE") {
- if (_.isEmpty(saveParams.rule)) {
- Modal.warning({
- title: getLabel(131329, "信息确认"),
- content: getLabel(384146, "必要信息不完整,红色*为必填项!")
- });
- return;
+ };
+ saveMatchEmployeeModeRule = () => {
+ API.saveMatchEmployeeModeRule(_.pick(this.state.saveParams, ["rule"])).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(22619, "保存成功!"));
+ } else {
+ message.error(errormsg || getLabel(22620, "保存失败!"));
}
- this.setState({ loading: { ...this.state.loading, employee: true } });
- API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => {
- this.setState({ loading: { ...this.state.loading, employee: false } });
+ });
+ };
+ saveSalaryAcctEmployeeRule = () => {
+ API.saveSalaryAcctEmployeeRule({ rule: this.state.saveParams.matchRule })
+ .then(({ status, errormsg }) => {
if (status) {
- message.success(getLabel(22619, "保存成功"));
- let sysSetting = this.getSysSetting();
+ message.success(getLabel(22619, "保存成功!"));
} else {
- message.error(errormsg || getLabel(22620, "保存失败"));
+ message.error(errormsg || getLabel(22620, "保存失败!"));
}
});
- } else if (type === "ENCRYTION") {
- Modal.confirm({
- title: getLabel(131329, "信息确认"),
- content: getLabel(543354, "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!"),
- onOk: () => {
- this.setState({ loading: { ...this.state.loading, encry: true } });
- API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => {
- this.setState({ loading: { ...this.state.loading, encry: false } });
- if (status) {
- const { isSuccess, progressId, msg } = data;
- if (!isSuccess) {
- message.error(errormsg || msg || getLabel(22620, "保存失败"));
- return;
- }
- this.setState({
- progressVisible: true,
- progress: 0
- }, () => {
- let number = 1;
- this.timer && clearInterval(this.timer);
- this.timer = setInterval(() => {
- API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
- const { progress_statue } = data;
- if (progress_statue === "success" && this.timer) {
- clearInterval(this.timer);
- this.timer = null;
- number = 1;
- this.setState({
- progress: 100
- }, () => {
- this.setState({
- progressVisible: false
- });
- });
- message.success(getLabel(22619, "保存成功"));
- } else if (progress_statue === "in_progress" && this.timer) {
- if (this.state.progress >= 90) {
- this.setState({
- progress: this.state.progress + (0.001 * this.state.progress)
- });
- } else {
- this.setState({
- progress: 10 * number
- }, () => number++);
- }
- } else if (!status || (progress_statue === "fail" && this.timer)) {
- clearInterval(this.timer);
- this.timer = null;
- number = 1;
- this.setState({
- progress: 100
- }, () => {
- this.setState({
- progressVisible: false
- });
- });
- message.error(errormsg || getLabel(22620, "保存失败"));
- }
+ };
+ operateTaxDeclarationFunction = () => {
+ API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"]))
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(22619, "保存成功!"));
+ } else {
+ message.error(errormsg || getLabel(22620, "保存失败!"));
+ }
+ });
+ };
+ saveEncryptSetting = () => {
+ API.saveEncryptSetting({ isOpenEncrypt: this.state.saveParams.enctry })
+ .then(({ data, status, errormsg }) => {
+ if (status) {
+ const { isSuccess, progressId, msg } = data;
+ if (!isSuccess) {
+ message.error(errormsg || msg || getLabel(22620, "保存失败!"));
+ return;
+ }
+ this.setState({
+ progressVisible: true,
+ progress: 0
+ }, () => {
+ let number = 1;
+ this.timer && clearInterval(this.timer);
+ this.timer = setInterval(() => {
+ API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
+ const { progress_statue } = data;
+ if (progress_statue === "success" && this.timer) {
+ clearInterval(this.timer);
+ this.timer = null;
+ number = 1;
+ this.setState({
+ progress: 100
+ }, () => {
+ this.setState({
+ progressVisible: false
+ });
});
- }, 1000);
+ message.success(getLabel(22619, "保存成功!"));
+ } else if (progress_statue === "in_progress" && this.timer) {
+ if (this.state.progress >= 90) {
+ this.setState({
+ progress: this.state.progress + (0.001 * this.state.progress)
+ });
+ } else {
+ this.setState({
+ progress: 10 * number
+ }, () => number++);
+ }
+ } else if (!status || (progress_statue === "fail" && this.timer)) {
+ clearInterval(this.timer);
+ this.timer = null;
+ number = 1;
+ this.setState({
+ progress: 100
+ }, () => {
+ this.setState({
+ progressVisible: false
+ });
+ });
+ message.error(errormsg || getLabel(22620, "保存失败!"));
+ }
});
- }
+ }, 1000);
});
- },
- onCancel: () => {
}
});
- } else if (type === "DECLARATION") {
- this.setState({ loading: { ...this.state.loading, declare: true } });
- API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => {
- this.setState({ loading: { ...this.state.loading, declare: false } });
+ };
+ saveArchiveDelete = () => {
+ API.saveArchiveDelete(_.pick(this.state.saveParams, ["confValue"]))
+ .then(({ status, errormsg }) => {
if (status) {
- message.success(getLabel(22619, "保存成功"));
- let sysSetting = this.getSysSetting();
+ message.success(getLabel(22619, "保存成功!"));
} else {
- message.error(errormsg || getLabel(22620, "保存失败"));
+ message.error(errormsg || getLabel(22620, "保存失败!"));
+ }
+ });
+ };
+ withDrawTaxDeclaration = () => {
+ API.saveWithDrawTaxDeclaration({ confValue: _.pick(this.state.saveParams, ["withDrawTaxDeclaration"]).withDrawTaxDeclaration })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(22619, "保存成功!"));
+ } else {
+ message.error(errormsg || getLabel(22620, "保存失败!"));
}
});
- }
};
- handleChane = (data) => {
- const { type, selected } = data;
- if (type === getLabel(15512, "排序字段")) {
- this.setState({
- saveParams: { ...this.state.saveParams, orderRule: selected }
- });
- } else if (type === getLabel(543351, "正序/倒序")) {
- this.setState({
- saveParams: { ...this.state.saveParams, ascOrDesc: selected }
- });
- } else if (type === getLabel(543352, "人员字段")) {
- this.setState({
- saveParams: { ...this.state.saveParams, rule: selected }
- });
- } else if (type === getLabel(526997, "加密设置")) {
- this.setState({
- saveParams: { ...this.state.saveParams, enctry: selected }
- });
- } else if (type === getLabel(543353, "个税申报")) {
- this.setState({
- saveParams: { ...this.state.saveParams, operateTaxDeclaration: selected }
- });
- }
+ handleChange = (key, val) => {
+ const { saveParams } = this.state;
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(111, "确认要保存吗?"),
+ onOk: () => {
+ this.setState({
+ saveParams: {
+ ...saveParams,
+ [key]: val
+ }
+ }, () => {
+ switch (key) {
+ case "orderRule":
+ case "ascOrDesc":
+ this.updateOrderRule();
+ break;
+ case "rule":
+ this.saveMatchEmployeeModeRule();
+ break;
+ case "matchRule":
+ this.saveSalaryAcctEmployeeRule();
+ break;
+ case "operateTaxDeclaration":
+ this.operateTaxDeclarationFunction();
+ break;
+ case "enctry":
+ this.saveEncryptSetting();
+ break;
+ case "confValue":
+ this.saveArchiveDelete();
+ break;
+ case "withDrawTaxDeclaration":
+ this.withDrawTaxDeclaration();
+ break;
+ default:
+ break;
+ }
+ });
+ },
+ onCancel: () => {
+ this.setState({
+ saveParams: {
+ ...saveParams,
+ [key]: saveParams[key]
+ }
+ });
+ }
+ });
};
render() {
- const { items, importItems, enctryItems, declareItems, loading } = this.state;
+ const {
+ saveParams,
+ matchRuleOptions,
+ orderOptions,
+ ascOptions,
+ employeeOptions,
+ showEncryptOperationButton
+ } = this.state;
+ const {
+ orderRule,
+ ascOrDesc,
+ rule,
+ enctry,
+ operateTaxDeclaration,
+ matchRule,
+ confValue,
+ withDrawTaxDeclaration
+ } = saveParams;
return (
-
- {getLabel(543356, "排序规则")}
-
-
- } showGroup center items={items}/>
-
- {getLabel(543357, "人员校验规则")}
-
-
- } showGroup center items={importItems}/>
+
+
+ this.handleChange("orderRule", val)}
+ />
+
+
+ this.handleChange("ascOrDesc", val)}
+ />
+
+
+
+
+ this.handleChange("rule", val)}
+ />
+
+
{
- !_.isEmpty(enctryItems) &&
-
- {getLabel(543358, "加密规则")}
-
-
- } showGroup center items={enctryItems}/>
+ showEncryptOperationButton === "true" &&
+
+
+ this.handleChange("enctry", val)}/>
+
+
}
-
- {getLabel(543359, "报税规则")}
-
-
- } showGroup center items={declareItems}/>
+
+
+ this.handleChange("operateTaxDeclaration", val)}/>
+
+
+ this.handleChange("withDrawTaxDeclaration", val)}/>
+
+
+
+
+ this.handleChange("confValue", val)}/>
+
+
+
+
+ this.handleChange("matchRule", val)}
+ />
+
+
{
this.state.progressVisible &&
{
const {
label,
@@ -357,7 +381,7 @@ export const Select = payload => {
} = payload;
return (
- {text};
case "useInEmployeeSalary":
- return ;
+ return ;
case "useDefault":
- return ;
+ return ;
default:
return ;
}
@@ -125,37 +125,22 @@ export default class SalaryItem extends React.Component {
columns.push({
key: "operate",
title: getLabel(30585, "操作"),
+ width: 120,
render: (text, record) => {
return (
- {
- this.onEditItem(record, true);
- }}>{(showSalaryItemBtn || showOperateBtn) ? getLabel(501169, "编辑") : getLabel(33564, "查看")}
+
+ this.onEditItem(record, true)}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"}
+ {
+ (record.canDelete && (showSalaryItemBtn || showOperateBtn)) &&
+ this.handleDeleteItem(record)}
+ >{getLabel(535052, "删除")}
+ }
+
);
}
});
- columns.push({
- title: "",
- key: "moreOperate",
- dataIndex: "moreOperate",
- render: (text, record) => {
- if (record.canDelete && (showSalaryItemBtn || showOperateBtn)) {
- return (
-
-
- {
- this.handleDeleteItem(record);
- }}>{getLabel(535052, "删除")}
-
- }>
-
-
- );
- } else {
- return "";
- }
- }
- });
return [
// {
// title: "序号",
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js
index 853f7cb3..7e20dc52 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js
@@ -34,7 +34,15 @@ export default class SystemSalaryItemModal extends React.Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
- columns, dataSource,
+ columns: _.map(columns, item => {
+ return {
+ ...item,
+ render: (text) => {
+ return {text};
+ }
+ };
+ }),
+ dataSource,
pageInfo: { ...pageInfo, current, pageSize, total }
});
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
index eab74c7d..de4b06af 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
@@ -14,6 +14,7 @@ import * as API from "../../../apis/welfareArchive";
import ImportModal from "../../../components/importModal";
import TipLabel from "../../../components/TipLabel";
import UnifiedTable from "../../../components/UnifiedTable";
+import { salaryArchiveDelete } from "../../../apis/payrollFiles";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@@ -50,7 +51,8 @@ export default class Archives extends React.Component {
current: 1,
pageSize: 10,
total: 0
- }
+ },
+ salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
};
this.record = {};
}
@@ -58,6 +60,7 @@ export default class Archives extends React.Component {
componentDidMount() {
const { archivesStore: { doInit } } = this.props;
doInit();
+ this.salaryArchiveDelete();
this.queryList({ runStatuses: ["1"] });
}
@@ -93,6 +96,15 @@ export default class Archives extends React.Component {
}
});
};
+ salaryArchiveDelete = () => {
+ salaryArchiveDelete().then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ salaryArchiveDelete: data
+ });
+ }
+ });
+ };
handleEdit = (record) => {
this.record = record;
@@ -104,7 +116,7 @@ export default class Archives extends React.Component {
};
getColumns = () => {
- const { columns, pageInfo, selectedKey } = this.state;
+ const { columns, salaryArchiveDelete, selectedKey } = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
let tmpV = _.map(columns.filter(item => item.display === "TRUE"), item => {
return {
@@ -119,31 +131,68 @@ export default class Archives extends React.Component {
return tmpV.length > 0 ? [
...tmpV, {
title: getLabel(30585, "操作"),
+ width: 150,
dataIndex: "operate",
render: (text, record) => {
return (
this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? getLabel(501169, "编辑") : getLabel(33564, "查看")}
+ {
+ showOperateBtn && selectedKey === "pending" &&
+
this.stayAddToPay([record.baseInfo])}>增员
+ }
+ {
+ showOperateBtn && selectedKey === "suspend" &&
+
this.stayDelToStop([record.baseInfo])}>减员
+ }
+ {
+ showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
+
this.deleteSocialArchive([record.baseInfo])}>删除档案
+ }
+ {
+ showOperateBtn && selectedKey === "stop" && salaryArchiveDelete !== "1" &&
+
this.cancelStopPayment([record.baseInfo])}>取消停缴
+ }
{
showOperateBtn && selectedKey === "pending" &&
{
- if (key === "addMember") {
- this.stayAddToPay([record.baseInfo]);
- } else {
- Modal.warning({
- title: getLabel(131329, "信息确认"),
- content: `${getLabel(543179, "确定要删除该条待办人员吗")}?`,
- onOk: () => this.deleteTodoList({ runStatus: "4", ids: [record.baseInfo] })
- });
- }
- }}>
- {getLabel(543180, "增员")}
- {getLabel(543181, "删除待办")}
- } title="">
+ content={
+ salaryArchiveDelete === "1" ?
+ :
+
+ } title="">
}
@@ -159,18 +208,15 @@ export default class Archives extends React.Component {
content: `${getLabel(543179, "确定要删除该条待办人员吗")}?`,
onOk: () => this.cancelStayDel({ runStatus: "3", ids: [record.baseInfo] })
});
- } else {
- this.stayDelToStop([record.baseInfo]);
}
}}>
-
{getLabel(543182, "减员")}
{getLabel(543181, "删除待办")}
} title="">
}
{
- showOperateBtn && selectedKey === "stop" &&
+ showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
{
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(388758, "确认要删除吗?"),
+ onOk: () => {
+ API.deleteArchive(params).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.query();
+ } else {
+ message.error(errormsg || getLabel(30651, "操作失败"));
+ }
+ });
+ }
+ });
+ };
//取消停缴
cancelStopPayment = (payload) => {
API.cancelStopPayment(payload).then(({ status, errormsg }) => {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
index 56eab922..791fd0f3 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
@@ -3,8 +3,7 @@ import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
-import { WeaTableNew } from "comsMobx";
-import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
+import { renderNoright } from "../../../util";
import CustomTab from "../../../components/customTab";
import SlideModalTitle from "../../../components/slideModalTitle";
import TipLabel from "../../../components/TipLabel";
@@ -14,12 +13,11 @@ import { paymentScopeEnum, welfareTypeEnum } from "./enum";
import CustomPaginationTable from "../../../components/customPaginationTable";
import TwoColContent from "../../../components/twoColContent";
import CopySchemaModal from "./copySchemaModal";
-import "./index.less";
import CustomBenefitsTable from "./customBenefitsTable";
+import "./index.less";
-const getLabel = WeaLocaleProvider.getLabel;
-const WeaMobxTable = WeaTableNew.WeaTable;
+const { getLabel } = WeaLocaleProvider;
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
@observer
export default class Programme extends React.Component {
@@ -58,25 +56,17 @@ export default class Programme extends React.Component {
newColumns = newColumns.map(column => {
let newColumn = column;
- newColumn.render = (text, record, index) => {
+ newColumn.render = (text, record) => {
//前端元素转义
let valueSpan =
record[newColumn.dataIndex + "span"] !== undefined
? record[newColumn.dataIndex + "span"]
: record[newColumn.dataIndex];
- if (newColumn.dataIndex == "id") {
- newColumn.display = false;
- }
+ if (newColumn.dataIndex === "id") newColumn.display = false;
switch (newColumn.dataIndex) {
case "operate":
return (
- {
- this.onEdit(record);
- }}>
- {getLabel(93, "编辑")}
-
+ this.onEdit(record)}>{getLabel(93, "编辑")}
);
default:
return ;
@@ -88,59 +78,38 @@ export default class Programme extends React.Component {
newColumns.push({
title: getLabel(30585, "操作"),
dataIndex: "operate",
+ width: 120,
render: (text, record) => {
return (
- {
- this.onEdit(record);
- }}>
- {showOperateBtn ? getLabel(93, "编辑") : getLabel(33564, "查看")}
-
- );
- }
- });
- showOperateBtn && newColumns.push({
- key: "moreOperate",
- dataIndex: "moreOperate",
- render: (text, record) => {
- return (
-
-
- {
- this.onCopy(record);
- }}>
- {getLabel(77, "复制")}
-
-
- {/*暂时隐藏*/}
-
- {
- this.onDelete(record);
- }}>
- {getLabel(91, "删除")}
-
-
-
- }>
-
-
-
-
-
+
+ this.onEdit(record)}
+ style={{ marginRight: 10 }}>{showOperateBtn ? getLabel(93, "编辑") : getLabel(33564, "查看")}
+ {
+ showOperateBtn &&
+ this.onCopy(record)}
+ style={{ marginRight: 10 }}>{getLabel(77, "复制")}
+ }
+ {
+ showOperateBtn &&
+
+
+ this.onDelete(record)}>{getLabel(535052, "删除")}
+
+
+ }>
+
+
+ }
+
);
}
});
return newColumns;
};
- onEdit(record) {
+ onEdit = (record) => {
let id = record.id;
const { programmeStore } = this.props;
const { getForm, selectedKey } = programmeStore;
@@ -150,15 +119,15 @@ export default class Programme extends React.Component {
}).then(() => {
this.setState({ slideVisiable: true, customEdit: true, currentOperate: "update" });
});
- }
+ };
- onCopy(record) {
+ onCopy = (record) => {
this.setState({
copyId: record.id,
copyModalValue: record.schemeName,
copyModalVisible: true
});
- }
+ };
onDelete = (record) => {
const { programmeStore: { deleteScheme, deleteLoading, selectedKey } } = this.props;
@@ -384,7 +353,7 @@ export default class Programme extends React.Component {
style={{ width: "150px" }}
onChange={v => {
setCustomSelectkey(v);
- this.customBenefitsTableRef.getCustomCategoryList({ curren: 1, welfareTypeEnum: v });
+ this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v });
}}
/>}
@@ -410,13 +379,6 @@ export default class Programme extends React.Component {
welfareTypeEnum={customSelectkey}
onCustomEdit={this.onCustomEdit}
/>
- //
}
rightContent={renderCustomRightContent()}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js
index 5837f824..092ba9e1 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js
@@ -12,8 +12,8 @@ import { getCalculateProgress } from "../../../apis/calculate";
import "./index.less";
import UnifiedTable from "../../../components/UnifiedTable";
+const { getLabel } = WeaLocaleProvider;
const MonthPicker = DatePicker.MonthPicker;
-const getLabel = WeaLocaleProvider.getLabel;
@inject("standingBookStore", "taxAgentStore")
@observer
@@ -140,28 +140,54 @@ export default class StandingBook extends React.Component {
{
title: getLabel(30585, "操作"),
dataIndex: "operate",
+ width: 150,
key: "operate",
render: (text, r) => {
const { billStatus, billMonth, creator } = r;
return (
- {billStatus === getLabel(17999, "未归档") && (
+ {billStatus === "0" && (
this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}>
{getLabel(538780, "核算")}
)}
- {billStatus === getLabel(18800, "已归档") && (
+ {billStatus === "0" && (
+ this.handleOperate({
+ key: "archive",
+ billMonth,
+ paymentOrganizationId: r.paymentOrganizationId,
+ creator
+ })}>
+ 归档
+
+ )}
+ {billStatus === "1" && (
+ this.handleOperate({
+ key: "view",
+ billMonth,
+ paymentOrganizationId: r.paymentOrganizationId,
+ creator
+ })}>
+ 查看
+
+ )}
+ {billStatus === "1" && (
this.socialSecurityBenefitsRecalculate({ id: r.id })}>
{getLabel(542637, "重新核算")}
)}
- {billStatus === getLabel(17999, "未归档") && (
+ {billStatus === "0" && (
- {getLabel(251, "归档")}
- {/* 异常详情 */}
{getLabel(535052, "删除")}
- {/* 操作日志 */}
}>
-
-
- )}
- {billStatus === getLabel(18800, "已归档") && (
-
- this.handleOperate({
- key,
- billMonth,
- paymentOrganizationId: r.paymentOrganizationId,
- creator
- })
- }>
- {getLabel(33564, "查看")}
-
- }>
-
+
)}
@@ -442,7 +447,6 @@ export default class StandingBook extends React.Component {
];
const pagination = {
-
...this.pageInfo,
total: total,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
@@ -492,14 +496,24 @@ export default class StandingBook extends React.Component {
it.dataIndex !== "id").map(item => {
- if (item.dataIndex !== "operate") {
+ if (item.dataIndex !== "operate" && item.dataIndex !== "billStatus") {
return {
...item,
+ width:150,
render: (text) => {
return {text};
}
};
}
+ if (item.dataIndex === "billStatus") {
+ return {
+ ...item,
+ render: (_, record) => {
+ return {record.billStatus === "1" ? getLabel(18800, "已归档") : getLabel(17999, "未归档")};
+ }
+ };
+ }
return { ...item };
})}
dataSource={list}
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js b/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js
index 269fbf3d..23505cad 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js
@@ -57,7 +57,7 @@ export const editConditions = [
conditionType: "INPUTNUMBER",
domkey: ["sortedIndex"],
fieldcol: 14,
- label: "排序",
+ label: "显示顺序",
labelcol: 6,
value: "",
viewAttr: 2,
@@ -95,7 +95,7 @@ export const decentralizationConditions = [
conditionType: "INPUTNUMBER",
domkey: ["sortedIndex"],
fieldcol: 14,
- label: "排序",
+ label: "显示顺序",
labelcol: 6,
value: "",
viewAttr: 2,
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js
index c0305023..73faa353 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/index.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js
@@ -1,8 +1,8 @@
import React from "react";
import { inject, observer } from "mobx-react";
-import { Button, Col, Dropdown, Menu, message, Modal, Row, Switch } from "antd";
-import { WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
-import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
+import { Button, Col, message, Modal, Row, Switch } from "antd";
+import { WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTable, WeaTop, WeaLocaleProvider } from "ecCom";
+import { renderNoright } from "../../util";
import EditModal from "./editModal";
import TipLabel from "../../components/TipLabel";
import { decentralizationConditions, editConditions } from "./editConditions";
@@ -200,7 +200,7 @@ export default class TaxAgent extends React.Component {
}
});
if (status) {
- message.success(getLabel(528075, "新增成功"));
+ message.success("新增成功");
this.setState({
editModalProps: {
...editModalProps,
@@ -358,22 +358,11 @@ export default class TaxAgent extends React.Component {
onClick={() => this.showEditModal(record.id)}>
{getLabel(501169, "编辑")}
-
-
- this.deleteTaxAgent(record.id)}>
- {getLabel(535052, "删除")}
-
-
-
- }>
-
-
-
-
+ this.deleteTaxAgent(record.id)}>
+ {getLabel(535052, "删除")}
+
}
],
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.less b/pc4mobx/hrmSalary/pages/taxAgent/index.less
index ccff7add..6bfafdb0 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/index.less
+++ b/pc4mobx/hrmSalary/pages/taxAgent/index.less
@@ -39,12 +39,13 @@
.operationWapper,
.employeeRangeWapper {
a {
- color: #4d7ad8;
+ //color: #4d7ad8;
+ margin-right: 10px;
}
- a:hover {
- text-decoration: none;
- }
+ //a:hover {
+ // text-decoration: none;
+ //}
a.ant-dropdown-link {
margin-left: 18px;
diff --git a/pc4mobx/hrmSalary/stores/mySalary.js b/pc4mobx/hrmSalary/stores/mySalary.js
index ef50b397..61988d5b 100644
--- a/pc4mobx/hrmSalary/stores/mySalary.js
+++ b/pc4mobx/hrmSalary/stores/mySalary.js
@@ -1,11 +1,12 @@
import { action, observable } from "mobx";
import { message } from "antd";
import { WeaForm, WeaLogView, WeaTableNew } from "comsMobx";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaLocaleProvider, WeaTools } from "ecCom";
import moment from "moment";
import * as API from "../apis/mySalaryBenefits";
+const { watermark } = WeaTools;
const { LogStore } = WeaLogView;
const getLabel = WeaLocaleProvider.getLabel;
const { TableStore } = WeaTableNew;
@@ -48,29 +49,30 @@ export class MySalaryStore {
@action setMySalaryBill = (mySalaryBill) => {
this.mySalaryBill = mySalaryBill;
};
- @action init = async (isRoot = true) => {
+ @action init = async (isRoot = true, callback) => {
this.clear();
//1.check is need second verify
if (window.doCheckSecondaryVerify4ec) {
window.doCheckSecondaryVerify4ec({ mouldCode: "HRM", itemCode: "SALARY" }, (data) => this.getData({
...data,
- isRoot
+ isRoot, callback
}));
} else {
//4.loaddata
- this.getData({ status: "1", token: "", isRoot });
+ this.getData({ status: "1", token: "", isRoot, callback });
}
};
@action
getData = async (params = {}) => {
if (_.isEmpty(params)) return;
- const { status, isRoot, token } = params;
+ const { status, isRoot, token, callback } = params;
if (status == "1") {
// Object.assign(this._reqParams, { token });
// this.getFormData({ viewAttr: 1 });
this.hasRight = true;
isRoot && this.mySalaryBillList([moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")]);
+ callback && callback();
} else {
this.hasRight = false;
}
@@ -167,6 +169,46 @@ export class MySalaryStore {
if (res.status) {
this.mySalaryBill = res.data;
resolve(res.data);
+ const { salaryTemplate } = res.data;
+ const { salaryWatermark } = salaryTemplate;
+ if (watermark && salaryWatermark) {
+ const { wmSetting, watermarkStatus } = JSON.parse(salaryWatermark);
+ if (!watermarkStatus) return;
+ const {
+ wmText,
+ wmHeight: height,
+ wmWidth: width,
+ wmNoTransparent,
+ wmRotate,
+ wmImg,
+ wmClassify
+ } = wmSetting;
+ if (wmClassify === "text") {
+ watermark({
+ text: wmText,
+ width,
+ height,
+ src: "",
+ rotate: `-${wmRotate || 15}`,
+ alpha: wmNoTransparent / 100 || 0.15,
+ interval: 2000,
+ intervalCheck: true,
+ clickCheck: true
+ });
+ } else {
+ watermark({
+ text: "",
+ width,
+ height,
+ src: wmImg[0].imgSrc,
+ rotate: `-${wmRotate || 15}`,
+ alpha: wmNoTransparent / 100 || 0.15,
+ interval: 2000,
+ intervalCheck: true,
+ clickCheck: true
+ });
+ }
+ }
} else {
message.error(res.errormsg || "获取失败");
reject("获取失败");
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js
index d6d3be81..e42cdba0 100644
--- a/pc4mobx/hrmSalary/stores/payroll.js
+++ b/pc4mobx/hrmSalary/stores/payroll.js
@@ -55,6 +55,14 @@ export class payrollStore {
@observable canWidthdrawColumns = []; // 可以撤回的列表列名
@observable canWithdrawPageInfo = {}; // 可以撤回列表分页对象
+ // **** 工资单模板 ****
+ @observable templateTableColumns = []; // 工资单模板columns
+ @observable templateTableDataSource = []; // 工资单模板dataSource
+ @observable templateTablePageInfo = {
+ current: 1, pageSize: 10, total: 0
+ }; // 工资单模板pageInfo
+ @observable templateTableSelectedRowKeys = []; // 工资单模板复选框
+
@action
setReplenishSalaryTemplateSalaryItemSet = replenishSalaryTemplateSalaryItemSet =>
(this.replenishSalaryTemplateSalaryItemSet = replenishSalaryTemplateSalaryItemSet);
@@ -80,6 +88,14 @@ export class payrollStore {
@action
setSalaryItemSet = salaryItemSet => (this.salaryItemSet = salaryItemSet);
+ @action("工资单模板分页信息修改")
+ setTemplateTablePageInfo = (pageInfo, callback) => {
+ this.templateTablePageInfo = { ...this.templateTablePageInfo, ...pageInfo };
+ callback && callback();
+ };
+ @action("工资单模板复选框选择")
+ setTemplateTableSelectedRowKeys = (selectedRowKeys) => this.templateTableSelectedRowKeys = selectedRowKeys;
+
// 初始化操作
@action
doInit = () => {
@@ -136,9 +152,15 @@ export class payrollStore {
@action
getPayrollTemplateList = (params = {}) => {
this.loading = true;
- API.getPayrollTemplateList(params).then(res => {
+ API.getPayrollTemplateList({ ...this.templateTablePageInfo, ...params }).then(res => {
if (res.status) {
- this.templateStore.getDatas(res.data.datas);
+ this.templateTableColumns = res.data.columns;
+ this.templateTableDataSource = res.data.list;
+ this.setTemplateTablePageInfo({
+ current: res.data.pageNum,
+ pageSize: res.data.pageSize,
+ total: res.data.total
+ });
} else {
message.error(res.errormsg || "获取失败");
}
@@ -149,9 +171,7 @@ export class payrollStore {
// 工资单模板-获取工资单模板基础设置表单
@action
getPayrollBaseForm = (id = "") => {
- let params = {
- id
- };
+ let params = { id };
return new Promise((resolve, reject) => {
API.getPayrollBaseForm(params).then(res => {
if (res.status) {
@@ -354,6 +374,7 @@ export class payrollStore {
API.deletePayroll(ids).then(res => {
if (res.status) {
message.success("删除成功");
+ this.setTemplateTableSelectedRowKeys([]);
this.getPayrollTemplateList();
} else {
message.error(res.errormsg || "删除失败");
@@ -525,7 +546,7 @@ export class payrollStore {
reject();
}
}).catch(() => {
- this.btnLoading = false
+ this.btnLoading = false;
// WeaLoadingGlobal.end();
// WeaLoadingGlobal.destroy();
});
@@ -553,7 +574,7 @@ export class payrollStore {
reject();
}
}).catch(() => {
- this.btnLoading = false
+ this.btnLoading = false;
WeaLoadingGlobal.end();
WeaLoadingGlobal.destroy();
});
diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js
index d197db2e..aff71ae6 100644
--- a/pc4mobx/hrmSalary/stores/taxAgent.js
+++ b/pc4mobx/hrmSalary/stores/taxAgent.js
@@ -147,7 +147,8 @@ export class TaxAgentStore {
this.setSalaryItemBtn((isOpenDevolution && (isChief || isAdminEnable)));
//薪酬统计报表权限
this.setStatisticsReportBtn(!isOpenDevolution ? true : !!(isAdminEnable || isChief));
- this.setPayrollPermission(isAdminEnable && isOpenDevolution);
+ //薪资核算详情页面查看权限
+ this.setPayrollPermission(isAdminEnable && isOpenDevolution || !isOpenDevolution);
resolve({ status, data });
} else {
reject();