diff --git a/pc4mobx/hrmSalary/apis/datapush.js b/pc4mobx/hrmSalary/apis/datapush.js
index 3b2adc5c..fb26cf9b 100644
--- a/pc4mobx/hrmSalary/apis/datapush.js
+++ b/pc4mobx/hrmSalary/apis/datapush.js
@@ -24,3 +24,23 @@ export const savePushItemList = (params) => {
export const deletePushItemList = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/push/item/delete", "GET", params);
};
+// 推送记录列表
+export const getPushRecordList = (params) => {
+ return postFetch("/api/bs/hrmsalary/push/record/list", params);
+};
+// 推送记录详细列表
+export const getPushRecordDetail = (params) => {
+ return postFetch("/api/bs/hrmsalary/push/record/detail", params);
+};
+// 推送记录-推送
+export const pushRecords = (params) => {
+ return postFetch("/api/bs/hrmsalary/push/record/push", params);
+};
+// 推送记录-撤回
+export const withdrawRecords = (params) => {
+ return postFetch("/api/bs/hrmsalary/push/record/withdraw", params);
+};
+//创建推送记录
+export const createPushRecords = (params) => {
+ return postFetch("/api/bs/hrmsalary/push/record/create", params);
+};
diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js
index f197ba27..75e3eb73 100644
--- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js
+++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js
@@ -45,11 +45,13 @@ export const doSecondAuth = (params, headers) => {
export const getPasswordForm = params => {
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
};
-export const checkPassword = params => {
- return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
+export const checkPassword = (params, headers) => {
+ return formHeaderPost("/api/hrm/secondarypwd/checkPassword", "POST", params, headers);
+ // return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
};
-export const saveSecondaryPwd = params => {
- return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
+export const saveSecondaryPwd = (params, headers) => {
+ return formHeaderPost("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params, headers);
+ // return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
};
export const salaryBillGetToken = params => {
return postFetch("/api/bs/hrmsalary/salaryBill/getToken", params);
diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js
index 48fcecb2..fdef4e0e 100644
--- a/pc4mobx/hrmSalary/apis/payroll.js
+++ b/pc4mobx/hrmSalary/apis/payroll.js
@@ -202,26 +202,38 @@ 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 sendMobileCode = (params, header = {}) => {
+ return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params, header);
+};
+//工资单发放-发送短信验证码
+export const checkMobileCode = (params, header = {}) => {
+ return postFetch("/api/bs/hrmsalary/salaryBill/checkMobileCode", params, header);
};
//工资单-验证方式
export const payrollCheckType = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
};
//工资单-反馈验证
-export const feedBackSalaryBill = params => {
+export const feedBackSalaryBill = async params => {
const { header, ...payload } = params;
- return fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, {
+ const res = await fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, {
method: "GET",
mode: "cors",
headers: { "Content-Type": "application/json", ...header }
- }).then(res => res.json());
+ });
+ return await res.json();
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
};
//工资单-确认
-export const confirmSalaryBill = params => {
- return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
+export const confirmSalaryBill = async params => {
+ const { header, ...payload } = params;
+ const res = await fetch(`/api/bs/hrmsalary/salaryBill/confirmSalaryBill?${convertToUrlString(payload)}`, {
+ method: "GET",
+ mode: "cors",
+ headers: { "Content-Type": "application/json", ...header }
+ });
+ return await res.json();
+ // return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
};
// 工资单基础设置-获取设置列表
diff --git a/pc4mobx/hrmSalary/components/FormInfo/index.js b/pc4mobx/hrmSalary/components/FormInfo/index.js
index d6940489..d0d87963 100644
--- a/pc4mobx/hrmSalary/components/FormInfo/index.js
+++ b/pc4mobx/hrmSalary/components/FormInfo/index.js
@@ -67,7 +67,7 @@ export default class FormInfo extends Component {
}
}
coms != null && formItems.push({
- com: ({coms}),
+ com: ({coms}), hide: field.hide,
col
});
diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.js b/pc4mobx/hrmSalary/components/captchaModal/index.js
index a7f00b9b..87da6745 100644
--- a/pc4mobx/hrmSalary/components/captchaModal/index.js
+++ b/pc4mobx/hrmSalary/components/captchaModal/index.js
@@ -6,31 +6,32 @@
*/
import React, { Component } from "react";
import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
-import { sendMobileCode } from "../../apis/payroll";
-import { Button } from "antd";
+import { WeaForm, WeaSwitch } from "comsMobx";
+import { checkMobileCode, sendMobileCode } from "../../apis/payroll";
+import { getQueryString } from "../../util/url";
+import FormInfo from "../FormInfo";
+import { captchaCondition } from "../../pages/mobilePayroll/pwdCondtion";
+import MobileModal from "../../pages/mobilePayroll/mobileModal";
+import { Button, message } from "antd";
import "./index.less";
+const form = new WeaForm();
const { getLabel } = WeaLocaleProvider;
class Index extends Component {
constructor(props) {
super(props);
- this.state = {
- captcha: "",
- time: 60
- };
+ this.state = { captcha: "", time: 60 };
this.timeRef = null;
}
+ componentDidMount() {
+ form.initFormFields(captchaCondition);
+ }
+
componentWillUnmount() {
clearInterval(this.timeRef);
- }
-
- componentWillReceiveProps(nextProps, nextContext) {
- if (nextProps.visible !== this.props.visible && !nextProps.visible) {
- clearInterval(this.timeRef);
- this.setState({ captcha: "", time: 60 });
- }
+ this.setState({ captcha: "", time: 60 });
}
handleSendCaptcha = () => {
@@ -48,44 +49,73 @@ class Index extends Component {
}
});
};
- handleConfirm = () => {
- if (!this.state.captcha) {
+ handleConfirm = async () => {
+ const type = getQueryString("type"), f = await form.validateForm();
+ if (!this.state.captcha && type !== "phone") {
this.refs.weaError.showError();
- // return
+ return;
+ } else if (!f.isValid && type === "phone") {
+ f.showErrors();
+ return;
}
- this.props.onCancel();
- this.props.onConfirm();
+ checkMobileCode({ id: this.props.id, mobileCode: this.state.captcha }).then(({ status, errormsg }) => {
+ if (status) {
+ this.props.onCancel();
+ this.props.onConfirm();
+ } else {
+ message.error(errormsg);
+ }
+ });
};
render() {
- const { captcha, time } = this.state;
- return (
- {getLabel(826, "确定")}
- ]}
- >
-
-
-
-
- this.setState({ captcha })}/>
-
-
-
-
-
-
+ const { captcha, time } = this.state, type = getQueryString("type");
+ const itemRender = {
+ mobileCode: (field, textAreaProps, form, formParams) => {
+ return (
+ this.setState({ captcha: form.getFormParams().mobileCode })}/>
+
+
);
+ }
+ };
+ return (
+ {
+ type === "phone" ?
+
+ :
+ {getLabel(826, "确定")}
+ ]}
+ >
+
+
+
+
+ this.setState({ captcha })}/>
+
+
+
+
+
+
+ }
+
);
}
}
diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.less b/pc4mobx/hrmSalary/components/captchaModal/index.less
index 4f8d23b7..2728112b 100644
--- a/pc4mobx/hrmSalary/components/captchaModal/index.less
+++ b/pc4mobx/hrmSalary/components/captchaModal/index.less
@@ -5,25 +5,25 @@
.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;
- }
- }
}
}
}
}
+
+.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/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js
index 1893e77e..1775ee97 100644
--- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js
+++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js
@@ -166,7 +166,7 @@ class SalaryDetails extends Component {
this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
columns: _.map(columns, (it, idx) => ({
- dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true,
+ dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true, showSee: false,
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : (it.width || it.oldWidth),
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
ellipsis: true
diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js
index 5d7b516d..3a7b563d 100644
--- a/pc4mobx/hrmSalary/pages/calculate/calculate.js
+++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js
@@ -6,7 +6,8 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
-import { WeaLocaleProvider, WeaTop } from "ecCom";
+import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom";
+import { WeaForm } from "comsMobx";
import { Button, message, Modal } from "antd";
import moment from "moment";
import CalculateQuery from "./components/calculateQuery";
@@ -15,9 +16,15 @@ import CalculateDialog from "./components/calculateDialog";
import ProgressModal from "../../components/progressModal";
import LogDialog from "../../components/logViewModal";
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
+import FormInfo from "../../components/FormInfo";
+import { queryConditions } from "./config";
+import { postFetch } from "../../util/request";
+import cs from "classnames";
import "./index.less";
+const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
+const form = new WeaForm();
@inject("calculateStore", "taxAgentStore")
@observer
@@ -31,17 +38,32 @@ class Calculate extends Component {
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
moment(new Date()).endOf("year").format("YYYY-MM")
]
- }, isRefresh: false, logDialogVisible: false,
+ }, isRefresh: false, logDialogVisible: false, conditions: [],
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
- calcDaialog: { visible: false, title: "" }
+ calcDaialog: { visible: false, title: "" }, showAdvance: false
};
this.timer = null;
this.handleDebounce = null;
}
+ async componentDidMount() {
+ const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
+ this.setState({
+ conditions: _.map(queryConditions, item => ({
+ ...item, items: _.map(item.items, o => {
+ o = { ...o, label: getLabel(o.lanId, o.label) };
+ if (getKey(o) === "taxAgentIds") {
+ return { ...o, options: _.map(data, k => ({ key: k.id + "", showname: k.name })) };
+ }
+ return { ...o };
+ })
+ }))
+ }, () => form.initFormFields(this.state.conditions));
+ }
+
renderCalculateOpts = () => {
const { taxAgentStore: { PageAndOptAuth } } = this.props;
- const { queryParams, isRefresh } = this.state;
+ const { queryParams, isRefresh, showAdvance } = this.state;
const admin = PageAndOptAuth.opts.includes("admin");
let calculateOpts = [
,
- this.setState({
- isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
- queryParams: { ...queryParams, ...v }
- })} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
+ this.setState({ showAdvance: !showAdvance })}
+ onChange={v => this.setState({
+ isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
+ queryParams: { ...queryParams, ...v }
+ })} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
];
return !admin ? calculateOpts.slice(1) : calculateOpts;
};
@@ -189,7 +212,9 @@ class Calculate extends Component {
};
render() {
- const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state;
+ const {
+ queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance
+ } = this.state;
return (
} iconBgcolor="#F14A2D"
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
@@ -201,7 +226,18 @@ class Calculate extends Component {
}
]}>
-
+
+
+
+
+
+
+
+
+
this.setState({
calcDaialog: { ...calcDaialog, visible: false },
diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js
index 00cd202d..0c74ccd5 100644
--- a/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js
@@ -21,11 +21,14 @@ class Index extends Component {
this.props.onChange({ dateRange: v })}/>
- this.props.onChange({ name: v })}
- onSearch={this.props.onSearch}
- />
+
);
}
diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js
index 5059017f..0b4ea0a0 100644
--- a/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js
@@ -29,12 +29,14 @@ class Index extends Component {
}
getSalaryAcctList = (props) => {
- const { pageInfo } = this.state;
- const { queryParams } = props;
+ const { pageInfo } = this.state, { queryParams, form } = props;
+ const { taxAgentIds } = form.getFormParams();
const { dateRange, ...extra } = queryParams;
const [startMonthStr, endMonthStr] = dateRange || [];
const params = { startMonthStr, endMonthStr, ...extra };
- const payload = { ...pageInfo, ...params };
+ const payload = {
+ ...pageInfo, ...params, taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : []
+ };
this.setState({ loading: true });
getSalaryAcctList(payload).then(({ status, data }) => {
this.setState({ loading: false });
diff --git a/pc4mobx/hrmSalary/pages/calculate/config.js b/pc4mobx/hrmSalary/pages/calculate/config.js
new file mode 100644
index 00000000..02da5b10
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/calculate/config.js
@@ -0,0 +1,19 @@
+export const queryConditions = [
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["taxAgentIds"],
+ fieldcol: 14,
+ label: "个税扣缴义务人",
+ lanI: 111,
+ multiple: true,
+ options: [],
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ defaultshow: true
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js
index 5deeaecd..239ccb9e 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js
@@ -99,7 +99,8 @@ class EditSalaryCalcSlide extends Component {
return;
}
const payload = {
- salaryAcctEmpId, employeeInfos: baseInfo,
+ salaryAcctEmpId,
+ employeeInfos: _.map(baseInfo, o => ({ ...o, fieldValue: o.fieldValue.id || o.fieldValue })),
items: [
..._.reduce(itemsByGroup, (pre, cur) => {
return [
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
index 4e3fb3b4..ff3ef53f 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
@@ -150,6 +150,10 @@
.esf-base-info-form, .wea-title, .wea-content {
padding: 0;
+
+ .ant-row {
+ height: 100%;
+ }
}
.esf-form-content {
diff --git a/pc4mobx/hrmSalary/pages/calculate/index.less b/pc4mobx/hrmSalary/pages/calculate/index.less
index 045f4b8c..2e73f6b2 100644
--- a/pc4mobx/hrmSalary/pages/calculate/index.less
+++ b/pc4mobx/hrmSalary/pages/calculate/index.less
@@ -62,6 +62,24 @@
}
}
+ .advance-custom {
+ display: flex;
+ align-items: center;
+
+ & > a {
+ border-radius: 0;
+ height: 28px;
+ position: relative;
+ color: #474747;
+ padding: 4px 15px;
+ background-color: transparent;
+ display: flex;
+ align-items: center;
+ border: 1px solid #d9d9d9;
+ border-left: none
+ }
+ }
+
.wea-input-focus {
margin-top: -4px;
}
@@ -72,6 +90,32 @@
overflow-y: hidden;
}
+ .advance-calc {
+ display: none;
+ background: #FFF;
+ margin-bottom: 8px;
+
+ .advance-calc-btns {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 15px 0;
+ border-top: 1px solid #dadada;
+
+ button {
+ margin-right: 15px;
+ }
+ }
+
+ .wea-search-group, .wea-content {
+ padding: 0;
+ }
+ }
+
+ .show-advance-calc {
+ display: block;
+ }
+
.calculate-body {
height: 100%;
width: 100%;
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
index be64c8e8..2f4804b6 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
@@ -5,9 +5,9 @@
* Date: 2023/3/7
*/
import React, { Component } from "react";
-import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
-import { Button } from "antd";
+import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTop } from "ecCom";
import { viewAttendQuote } from "../../../../apis/attendance";
+import { Button, Spin } from "antd";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@@ -16,11 +16,31 @@ class AttendanceDataViewSlide extends Component {
constructor(props) {
super(props);
this.state = {
- loading: { query: false }, keyword: "", dataSource: [], columns: [],
- pageInfo: { current: 1, pageSize: 10, total: 0 }
+ loading: { query: false }, keyword: "", dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
+ componentDidMount() {
+ window.addEventListener("message", this.handleReceive, false);
+ }
+
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
+ handleReceive = async ({ data }) => {
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "turn") {
+ switch (id) {
+ case "PAGEINFO":
+ this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.viewAttendQuote());
+ break;
+ default:
+ break;
+ }
+ }
+ };
+
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
@@ -33,19 +53,29 @@ class AttendanceDataViewSlide extends Component {
viewAttendQuote = (extraPayload = {}, props) => {
const { loading, pageInfo, keyword } = this.state;
- const { attendQuoteId } = props;
+ const { attendQuoteId } = props || this.props;
this.setState({ loading: { ...loading, query: true } });
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
this.setState({
- pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
- columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null }))
- });
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
+ }, () => this.postMessageToChild({
+ pageInfo: this.state.pageInfo, dataSource, showRowSelection: false, unitTableType: "attendanceView",
+ columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : false }))
+ }));
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
};
+ postMessageToChild = (payload = {}) => {
+ const i18n = {
+ "操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
+ "条": getLabel(18256, "条")
+ };
+ const childFrameObj = document.getElementById("attendanceViewTable");
+ childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
+ };
handleExportAttendQuote = () => {
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
@@ -60,24 +90,7 @@ class AttendanceDataViewSlide extends Component {
render() {
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
- const { columns, dataSource, loading, pageInfo, keyword } = this.state;
- const pagination = {
- ...pageInfo,
- showTotal: (total) => `共 ${total} 条`,
- pageSizeOptions: ["10", "20", "50", "100"],
- showSizeChanger: true,
- showQuickJumper: true,
- onShowSizeChange: (current, pageSize) => {
- this.setState({
- pageInfo: { ...pageInfo, current, pageSize }
- }, () => this.viewAttendQuote({}, this.props));
- },
- onChange: (current) => {
- this.setState({
- pageInfo: { ...pageInfo, current }
- }, () => this.viewAttendQuote({}, this.props));
- }
- };
+ const { loading, keyword } = this.state;
const btns = [
,
{getLabel(543376, "考勤周期")}:{salaryYearMonth}
-
+
+
+
+
+
}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less
index 51316cab..8b586900 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less
@@ -54,8 +54,8 @@
margin-bottom: 8px;
}
- .wea-new-table {
- background: #FFF;
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
}
}
diff --git a/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js b/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js
index e595e7dc..bc8ad18a 100644
--- a/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js
+++ b/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js
@@ -73,9 +73,14 @@ class CustomTreeSelect extends Component {
const { itemName } = detail;
return (
this.getSourceItem(node.props.value)}
- onSelect={this.handleSelect}>
+ onSelect={this.handleSelect}
+ treeNodeFilterProp="title"
+ filterTreeNode={(inputValue, treeNode) => {
+ const title = treeNode.props.title.props ? treeNode.props.title.props.children[0].props.children : treeNode.props.title;
+ return title.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0;
+ }}>
{
_.map(sourceList, o => (
diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js
new file mode 100644
index 00000000..e0bd1255
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js
@@ -0,0 +1,149 @@
+/*
+ * 数据推送记录
+ * 创建
+ * @Author: 黎永顺
+ * @Date: 2025/4/15
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
+import FormInfo from "../../../../components/FormInfo";
+import { RQconditions } from "../../conditions";
+import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
+import { getSalaryAcctList } from "../../../../apis/calculate";
+import { createPushRecords } from "../../../../apis/datapush";
+import { WeaForm, WeaSwitch } from "comsMobx";
+import { Button, message } from "antd";
+import moment from "moment";
+
+const form = new WeaForm();
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+class CreatePushRecordDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
+ conditions: []
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ this.setState({
+ conditions: _.map(RQconditions, item => ({
+ ...item,
+ items: _.map(item.items, o => {
+ o = { ...o, label: getLabel(o.lanId, o.label) };
+ if (getKey(o) === "startMonthStr") {
+ return {
+ ...o, value: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM")
+ };
+ } else if (getKey(o) === "endMonthStr") {
+ return {
+ ...o, value: moment(new Date()).endOf("year").format("YYYY-MM")
+ };
+ }
+ return o;
+ })
+ }))
+ }, () => {
+ form.initFormFields(this.state.conditions);
+ this.getSalaryAcctList();
+ });
+ } else {
+ form.resetForm();
+ }
+ }
+
+ getSalaryAcctList = () => {
+ const { pageInfo } = this.state, payload = { ...pageInfo, ...form.getFormParams() };
+ this.setState({ loading: true });
+ getSalaryAcctList(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
+ this.setState({
+ dataSource, pageInfo: { current, pageSize, total },
+ columns: _.filter(columns, it => (it.dataIndex !== "backCalcStatus" && it.dataIndex !== "acctTimes" && it.dataIndex !== "operate"))
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+ save = (record) => {
+ this.setState({ loading: true });
+ createPushRecords({ salaryAcctRecordIds: [record.id] }).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(111, "操作成功!"));
+ this.props.onCancel(this.props.onSuccess);
+ } else {
+ message.error(errormsg);
+ }
+ });
+ };
+
+ render() {
+ const { loading, conditions, dataSource, columns, 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.getSalaryAcctList());
+ },
+ onChange: current => {
+ this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getSalaryAcctList());
+ }
+ };
+ const itemRender = {
+ name: (field, textAreaProps, form, formParams) => {
+ return ( this.getSalaryAcctList(), 500)}/>);
+ },
+ startMonthStr: () => null,
+ endMonthStr: () => null
+ };
+ const childrenComponents = {
+ startMonthStr: () => {
+ const { startMonthStr, endMonthStr } = form.getFormParams();
+ const coms = [], { fieldMap } = form;
+ const dateRange = [startMonthStr, endMonthStr];
+ coms.push(
+ {fieldMap["startMonthStr"].label}} labelCol={{ span: 6 }}
+ wrapperCol={{ span: 14 }}>
+ {
+ const [v1, v2] = v;
+ form.updateFields({ startMonthStr: v1, endMonthStr: v2 });
+ this.getSalaryAcctList();
+ }}/>
+
+ );
+ return [{ com: coms, col: 2 }];
+ }
+ };
+ const scrollHeight = this.refs.recordRef ? this.refs.recordRef.state.height - 162 : 606;
+
+ return ( this.props.onCancel()}>{getLabel(111, "取消")}
+ ]}>
+
+
+ );
+ }
+}
+
+export default CreatePushRecordDialog;
diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js
new file mode 100644
index 00000000..08287119
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js
@@ -0,0 +1,88 @@
+/*
+ * 数据推送
+ * 推送记录
+ * @Author: 黎永顺
+ * @Date: 2025/4/1
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTable } from "ecCom";
+import * as API from "../../../../apis/datapush";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
+ selectedRowKeys: []
+ };
+ }
+
+ componentDidMount() {
+ this.getPushRecordList();
+ }
+
+ componentWillUnmount() {
+ this.setState({ selectedRowKeys: [] }, () => this.props.onChange("rowKey", []));
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.isQuery !== this.props.isQuery) this.setState({
+ pageInfo: { ...this.state.pageInfo, current: 1 }
+ }, () => this.getPushRecordList(nextProps));
+ }
+
+ getPushRecordList = (props) => {
+ const { pageInfo } = this.state, { query } = props || this.props;
+ const payload = { ...pageInfo, ...query };
+ this.setState({ loading: true });
+ API.getPushRecordList(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
+ columns: [...columns, {
+ title: getLabel(111, "操作"), dataIndex: "opts", width: 140, render: (__, record) => (
+ this.props.onChange("push", record), 300)}>{getLabel(111, "推送")}
+ this.props.onChange("withdraw", record), 300)}>{getLabel(111, "撤回")}
+ this.props.onChange("view", record)}>{getLabel(111, "查看详情")}
+ )
+ }]
+ });
+ }
+ });
+ };
+
+ render() {
+ const { columns, dataSource, loading, pageInfo, selectedRowKeys } = 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.getPushRecordList());
+ },
+ onChange: current => {
+ this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordList());
+ }
+ };
+ const rowSelection = {
+ selectedRowKeys,
+ onChange: v => this.setState({ selectedRowKeys: v }, () => this.props.onChange("rowKey", v))
+ };
+ return ();
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/pushDetailDialog.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/pushDetailDialog.js
new file mode 100644
index 00000000..554cfc70
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/pushDetailDialog.js
@@ -0,0 +1,77 @@
+/*
+ * 推送记录
+ * 查看详情
+ * @Author: 黎永顺
+ * @Date: 2025/4/2
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
+import { getPushRecordDetail } from "../../../../apis/datapush";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class PushDetailDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ query: { name: "" }, dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.getPushRecordDetail(nextProps);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
+ query: { name: "" }, pageInfo: { current: 1, pageSize: 10, total: 0 }
+ });
+ }
+
+ getPushRecordDetail = (props) => {
+ const { recordId } = props || this.props, { pageInfo, query } = this.state;
+ const payload = { ...query, ...pageInfo, recordId };
+ this.setState({ loading: true });
+ getPushRecordDetail(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
+ this.setState({ columns, dataSource, pageInfo: { current, pageSize, total } });
+ }
+ });
+ };
+
+ render() {
+ const { query, loading, dataSource, columns, 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.getPushRecordDetail());
+ },
+ onChange: current => {
+ this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordDetail());
+ }
+ };
+ return (} iconBgcolor="#F14A2D"
+ buttons={[ this.setState({
+ pageInfo: { ...pageInfo, current: 1 }
+ }, () => this.getPushRecordDetail())}
+ onChange={v => this.setState({ query: { ...query, name: v } })}/>]}/>
+ }
+ direction="right" top={0} width={800} height={100}
+ measureT="%" measureX="px" measureY="%"
+ content={
+
+
}
+ />);
+ }
+}
+
+export default PushDetailDialog;
diff --git a/pc4mobx/hrmSalary/pages/datapush/conditions.js b/pc4mobx/hrmSalary/pages/datapush/conditions.js
index 04401305..c4f12a09 100644
--- a/pc4mobx/hrmSalary/pages/datapush/conditions.js
+++ b/pc4mobx/hrmSalary/pages/datapush/conditions.js
@@ -145,3 +145,43 @@ export const PDConditions = [
defaultshow: true
}
];// 推送详细配置表单
+
+
+export const RQconditions = [
+ {
+ items: [
+ {
+ conditionType: "MONTHPICKER",
+ domkey: ["startMonthStr"],
+ fieldcol: 14,
+ label: "薪资所属月",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "MONTHPICKER",
+ domkey: ["endMonthStr"],
+ fieldcol: 14,
+ label: "薪资所属月",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["name"],
+ fieldcol: 14,
+ label: "薪资账套",
+ lanId: 111,
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];// 推送记录查询表单
diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js
index 1bbf5add..e3da4cb4 100644
--- a/pc4mobx/hrmSalary/pages/datapush/index.js
+++ b/pc4mobx/hrmSalary/pages/datapush/index.js
@@ -12,9 +12,13 @@ import { inject, observer } from "mobx-react";
import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
import * as API from "../../apis/datapush";
import DatapushList from "./components/datapushList";
+import PushRecord from "./components/pushRecord";
import DatapushDialog from "./components/DPDialog";
+import PushDetailDialog from "./components/pushRecord/pushDetailDialog";
import { Button, message, Modal } from "antd";
+import cs from "classnames";
import "./index.less";
+import CreatePushRecordDialog from "./components/pushRecord/createPushRecordDialog";
const getLabel = WeaLocaleProvider.getLabel;
@@ -24,8 +28,10 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- selectedKey: "datapush", isQuery: false, query: { name: "" },
- DPDialog: { visible: false, title: "", detail: {} } //数据推送弹框
+ selectedKey: "pushRecord", isQuery: false, query: { name: "" }, selectedRowKeys: [],
+ loading: { push: false, withdraw: false }, visible: false,
+ DPDialog: { visible: false, title: "", detail: {} }, //数据推送弹框
+ pushDetailDialog: { visible: false, recordId: "" } //数据推送记录查看推送详情弹框
};
}
@@ -53,16 +59,80 @@ class Index extends Component {
}
});
break;
+ case "view":
+ this.setState({ pushDetailDialog: { visible: true, recordId: detail.id } });
+ break;
+ case "rowKey":
+ this.setState({ selectedRowKeys: detail });
+ break;
+ case "addRecord":
+ this.setState({ visible: true });
+ break;
+ case "push":
+ case "batchpush":
+ if (type === "batchpush" && _.isEmpty(this.state.selectedRowKeys)) {
+ message.warning(getLabel(111, "请选择数据"));
+ return;
+ }
+ this.pushRecords(type === "push" ? [detail.id] : this.state.selectedRowKeys);
+ break;
+ case "withdraw":
+ case "batchwithdraw":
+ if (type === "batchwithdraw" && _.isEmpty(this.state.selectedRowKeys)) {
+ message.warning(getLabel(111, "请选择数据"));
+ return;
+ }
+ this.withdrawRecords(type === "withdraw" ? [detail.id] : this.state.selectedRowKeys);
+ break;
default:
break;
}
};
+ pushRecords = (ids) => {
+ this.setState({ loading: { ...this.state.loading, push: true } });
+ API.pushRecords({ ids }).then(({ status, errormsg }) => {
+ this.setState({ loading: { ...this.state.loading, push: false } });
+ if (status) {
+ this.handleAdvanceSearch();
+ message.success(getLabel(111, "推送成功!"));
+ } else {
+ message.error(errormsg);
+ }
+ });
+ };
+ withdrawRecords = (ids) => {
+ this.setState({ loading: { ...this.state.loading, withdraw: true } });
+ API.withdrawRecords({ ids }).then(({ status, errormsg }) => {
+ this.setState({ loading: { ...this.state.loading, withdraw: false } });
+ if (status) {
+ this.handleAdvanceSearch();
+ message.success(getLabel(111, "撤回成功!"));
+ } else {
+ message.error(errormsg);
+ }
+ });
+ };
render() {
- const { selectedKey, DPDialog, isQuery, query } = this.state;
+ const { selectedKey, DPDialog, isQuery, query, pushDetailDialog, loading, visible } = this.state;
const { taxAgentStore: { PageAndOptAuth } } = this.props;
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
const tabs = [
+ {
+ title: getLabel(111, "推送记录"), key: "pushRecord", showDropIcon: false, dropMenuDatas: [],
+ buttons: showOperateBtn ? [
+ ,
+ ,
+ ,
+ this.setState({ query: { ...query, name: v } })}/>
+ ] : [ this.setState({ query: { ...query, name: v } })}/>],
+ children:
+ },
{
title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [],
buttons: showOperateBtn ? [
@@ -77,9 +147,13 @@ class Index extends Component {
return (
} selectedKey={selectedKey}
- iconBgcolor="#F14A2D" tabDatas={tabs} className="datapush_wrapper" buttonSpace={10}
- buttons={_.find(tabs, o => selectedKey === o.key).buttons}
- onChange={selectedKey => this.setState({ selectedKey })}
+ iconBgcolor="#F14A2D" tabDatas={tabs}
+ className={cs("datapush_wrapper", { "reqZindex0": pushDetailDialog.visible })}
+ buttonSpace={10} buttons={_.find(tabs, o => selectedKey === o.key).buttons}
+ onChange={selectedKey => this.setState({
+ selectedKey, pushDetailDialog: { ...pushDetailDialog, visible: false },
+ DPDialog: { ...DPDialog, visible: false }
+ })}
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
>
@@ -87,6 +161,12 @@ class Index extends Component {
{/*数据推送框*/}
this.setState({ DPDialog: { ...DPDialog, visible: false } })}
onSearch={this.handleAdvanceSearch}/>
+ {/*推送记录查看详情*/}
+ this.setState({
+ pushDetailDialog: { ...pushDetailDialog, visible: false }
+ })}/>
+ this.setState({ visible: false }, () => callback && callback())}/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/datapush/index.less b/pc4mobx/hrmSalary/pages/datapush/index.less
index 57ea36c8..71919160 100644
--- a/pc4mobx/hrmSalary/pages/datapush/index.less
+++ b/pc4mobx/hrmSalary/pages/datapush/index.less
@@ -77,6 +77,42 @@
}
}
}
+
+ .pushDetailDialog {
+ .wea-slide-modal-content {
+ height: 100%;
+
+ .wea-new-table {
+ background: #FFF;
+ }
+
+ .pushDetail_content {
+ height: 100%;
+ background: #F6F6F6;
+ padding: 8px 16px;
+ }
+ }
+
+ .wea-slide-modal-title {
+ background: #FFF;
+ text-align: left;
+ height: 44px;
+ }
+
+ .wea-new-top {
+ background: #FFF;
+
+ .ant-col-10 {
+ padding-right: 50px !important;
+ }
+ }
+ }
+}
+
+.reqZindex0 {
+ .wea-new-top-req {
+ z-index: 0 !important;
+ }
}
.custom_item_treeselect {
@@ -132,3 +168,27 @@
}
}
+.record-dialog {
+ .wea-dialog-body {
+ background: #f6f6f6;
+ padding: 8px 16px;
+
+ .record-form {
+ background: #FFF;
+ margin-bottom: 8px;
+
+ .wea-search-group, .wea-content {
+ padding: 0;
+ }
+
+ .rangePickerBox {
+ display: flex;
+ align-items: center;
+ }
+ }
+
+ .wea-new-table {
+ background: #FFF;
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
index f5627a0c..e85383ca 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
@@ -17,7 +17,7 @@ class Index extends Component {
return (
- {getLabel(543549, "薪资所属月:")}
+ {getLabel(111, "税款所属期:")}
this.props.onChange({ dateRange: v })}/>
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
index 02fa85cc..831c33cb 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
@@ -8,7 +8,7 @@ import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu, message, Modal } from "antd";
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
-import { sysConfCodeRule } from "../../../../apis/ruleconfig";
+import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
@@ -35,18 +35,19 @@ class Index extends Component {
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
});
};
- getDeclareList = (props) => {
- const { pageInfo } = this.state;
- const { queryParams } = props;
+ getDeclareList = async (props) => {
+ const { data: sysData } = await sysinfo();
+ const { pageInfo } = this.state, { queryParams } = props;
const { dateRange, ...extra } = queryParams;
- const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
- const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
+ const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
+ const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
const payload = { ...pageInfo, ...params };
this.setState({ loading: true });
getDeclareList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
- const { columns, list: dataSource, pageNum, pageSize, total } = data;
+ let { columns, list: dataSource, pageNum, pageSize, total } = data;
+ sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth"));
this.setState({
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
columns: _.map(columns, o => {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
index 3680c269..724b344a 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
@@ -41,6 +41,10 @@
.baseSettingWrapper {
padding: 12px 12px 12px 20px;
+ .wea-form-item-wrapper {
+ display: inline-block !important;
+ }
+
.baseSettingLeft {
border: 1px solid #ebedf0;
padding: 0 !important;
@@ -194,6 +198,10 @@
}
}
}
+
+ .wea-new-table.wea-new-table-draggable table {
+ table-layout: fixed
+ }
}
.titleWrapper {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js
index e0440379..a192c791 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js
@@ -46,7 +46,7 @@ class LedgerSalaryItemBaseInfo extends Component {
};
handleDeleteEmplist = (item) => {
const { dataSource, onChangeSortableList } = this.props;
- onChangeSortableList(_.xorWith(dataSource, [item], _.isEqual));
+ onChangeSortableList(_.filter(dataSource, o => o.id !== item.id));
};
render() {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
index ff15f166..5e61b475 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
@@ -183,7 +183,7 @@ class LedgerSalaryItemNormal extends Component {
childItem.uuid === uuid).items}
+ dataSource={_.find(dataSource, childItem => childItem.uuid === uuid).items}
salarySobId={editId || saveSalarySobId}
selectedRowKeys={field.selectedRowKeys || []}
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/conditions.js b/pc4mobx/hrmSalary/pages/mobilePayroll/conditions.js
new file mode 100644
index 00000000..3462cb08
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/conditions.js
@@ -0,0 +1,87 @@
+export const secondaryVerifyConditions = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["authCode"],
+ fieldcol: 14,
+ label: "二次验证密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password"
+ },
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+export const loginCondition = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["password"],
+ fieldcol: 14,
+ label: "登录密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password"
+ },
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+export const secondarypwdCondition = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["secondaryPwd1"],
+ fieldcol: 14,
+ label: "密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password",
+ passwordStrength: true
+ },
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["secondaryPwd2"],
+ fieldcol: 14,
+ label: "确认密码",
+ labelcol: 10,
+ value: "",
+ otherParams: {
+ type: "password"
+ },
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["validatecode"],
+ fieldcol: 14,
+ label: "验证码",
+ labelcol: 10,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index 1b598371..47c46604 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -2,37 +2,31 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { getQueryString } from "../../util/url";
-import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
-import { Button, message, Modal } from "antd";
+import { WeaLocaleProvider } from "ecCom";
+import { message, Modal } from "antd";
import Authority from "../mySalary/authority";
import "../payroll/templatePreview/index.less";
import * as API from "../../apis/mySalaryBenefits";
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
-import PassSetDialog from "./passSetDialog";
import { ConfirmBtns } from "../mySalary/mySalaryView";
import Content from "../../components/pcTemplate/content";
import MobileTemplate from "../../components/mobileTemplate";
+import SecondaryVerify from "./secondaryVerify";
+import LoginVerify from "./loginVerify";
+import SecondarypwdVerify from "./secondarypwdVerify";
import "../mySalary/index.less";
const getLabel = WeaLocaleProvider.getLabel;
-@inject("mySalaryStore")
-@observer
+@inject("mySalaryStore") @observer
export default class MobilePayroll extends React.Component {
constructor(props) {
super(props);
this.state = {
- pwdSetVisible: false,
- visible: false,
- captchaVisible: false,
- authCode: "",
- notSetting: false,
- mySalaryBillData: {
- employeeInformation: {},
- salaryTemplate: []
- },
+ visible: false, captchaVisible: false, loginVisible: false, pwdSetVisible: false,
+ mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] },
salaryBillToken: {}
};
this.id = "";
@@ -43,15 +37,12 @@ export default class MobilePayroll extends React.Component {
this.id = getQueryString("id");
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
setMySalaryBill({});
- if (type !== "phone") {
- const { data, status } = await payrollCheckType();
- if (status && data === "PWD") {
- init(false, () => this.getMySalaryBill(this.id));
- } else {
- this.setState({ captchaVisible: true });
- }
+ const { data, status } = await payrollCheckType();
+ if (status && data === "PWD") {
+ type !== "phone" ? init(false, () => this.getMySalaryBill(this.id)) : await this.initMobile();
+ } else {
+ this.setState({ captchaVisible: true });
}
- type === "phone" && await this.initMobile();
}
initMobile = async () => {
@@ -60,12 +51,7 @@ export default class MobilePayroll extends React.Component {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
if (status && isNeedSecondAuth) {
- this.setState({ visible: true }, () => {
- API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
- .then(({ status, notSetting }) => {
- this.setState({ notSetting });
- });
- });
+ this.setState({ visible: true });
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
@@ -82,12 +68,7 @@ export default class MobilePayroll extends React.Component {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
if (status && isNeedSecondAuth) {
- this.setState({ visible: true }, () => {
- API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
- .then(({ status, notSetting }) => {
- this.setState({ notSetting });
- });
- });
+ this.setState({ visible: true });
} else {
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
@@ -96,33 +77,12 @@ export default class MobilePayroll extends React.Component {
});
}
};
- doSecondAuth = () => {
- const { salaryBillToken } = this.state;
- const { mySalaryStore: { setInitEmVerify } } = this.props;
- if (!this.state.authCode) {
- this.refs.weaError.showError();
- return;
- }
- API.doSecondAuth({
- authCode: this.state.authCode, mouldCode: "HRM", itemCode: "SALARY"
- }, salaryBillToken).then(({ status, checkStatus, checkMsg }) => {
- if (status && checkStatus === "1") {
- message.success(checkMsg);
- setInitEmVerify();
- this.setState({ visible: false });
- this.getMySalaryBill(getQueryString("id"));
- } else {
- message.error(checkMsg);
- }
- });
- };
getMySalaryBill = (salaryInfoId) => {
const { salaryBillToken } = this.state;
const { mySalaryStore: { getMySalaryBill } } = this.props;
const params = this.getUrlkey();
const payload = {
- salaryInfoId, header: salaryBillToken,
- ..._.pick(params, ["recipient"])
+ salaryInfoId, header: salaryBillToken, ..._.pick(params, ["recipient"])
};
getMySalaryBill(payload).then(result => {
this.setState({
@@ -132,10 +92,8 @@ export default class MobilePayroll extends React.Component {
};
getUrlkey = () => {
let url = window.location.href;
- let params = {},
- arr = url.split("?");
- if (arr.length <= 1)
- return params;
+ let params = {}, arr = url.split("?");
+ if (arr.length <= 1) return params;
arr = arr[1].split("&");
for (var i = 0, l = arr.length; i < l; i++) {
var a = arr[i].split("=");
@@ -144,14 +102,16 @@ export default class MobilePayroll extends React.Component {
return params;
};
confirmSalaryBill = () => {
- confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => {
- if (status) {
- message.success(getLabel(30700, "操作成功"));
- this.getMySalaryBill(getQueryString("id"));
- } else {
- message.error(errormsg || getLabel(30651, "操作失败"));
- }
- });
+ const { salaryBillToken } = this.state;
+ confirmSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.getMySalaryBill(getQueryString("id"));
+ } else {
+ message.error(errormsg || getLabel(30651, "操作失败"));
+ }
+ });
};
handleGoFeedback = () => {
Modal.confirm({
@@ -177,76 +137,67 @@ export default class MobilePayroll extends React.Component {
};
render() {
- const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
- const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
+ const { mySalaryStore: { setInitEmVerify } } = this.props, {
+ captchaVisible, visible, loginVisible, pwdSetVisible
+ } = this.state;
const type = getQueryString("type");
- if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return
-
this.setState({ visible: false }, () => clearLoading())}
- title="请输入二次验证密码" visible={visible} initLoadCss
- className="verifyWrapper"
- hasScroll buttons={[
-
- ]}
- >
-
- this.setState({ authCode })}/>
-
- {
- notSetting &&
-
- }
-
-
this.setState({ pwdSetVisible: false })}/>
- ;
- const {
- salaryTemplate, salaryGroups, employeeInformation,
- sendTime, confirmStatus, showAck, showFeedback
- } = toJS(this.props.mySalaryStore.mySalaryBill);
- const salaryProps = {
- theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
- background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
- itemTypeList: [employeeInformation, ...salaryGroups]
- };
- return (
-
- {
- type === "phone" ?
-
-
-
-
-
- :
-
-
-
-
-
-
-
- }
+ if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return
+ {visible && this.setState({ visible: false, loginVisible: true })}
+ onSuccess={() => {
+ setInitEmVerify();
+ this.getMySalaryBill(getQueryString("id"));
+ }}/>}
+ {loginVisible && this.setState({ loginVisible: false, pwdSetVisible: true })}/>}
+ {pwdSetVisible && this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
+ {/*发送验证码*/}
+ {
+ captchaVisible &&
this.setState({ captchaVisible: false })}
- onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
+ onConfirm={() => {
+ setInitEmVerify();
+ this.getMySalaryBill(getQueryString("id"));
+ }}
/>
-
- );
+ }
+ ;
+ const {
+ salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback
+ } = toJS(this.props.mySalaryStore.mySalaryBill);
+ const salaryProps = {
+ theme: salaryTemplate.theme,
+ tip: salaryTemplate.textContent,
+ sendTime,
+ background: salaryTemplate.background,
+ tipPosi: salaryTemplate.textContentPosition || "",
+ itemTypeList: [employeeInformation, ...salaryGroups]
+ };
+ return (
+ {type === "phone" ?
+
+
+
+ :
+
+
+
+
+
+ }
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.less b/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
index 923d3d82..9fd7d4d6 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.less
@@ -39,3 +39,132 @@
}
}
}
+
+.am-modal-mask {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ height: 100%;
+ z-index: 999;
+ background-color: rgba(0, 0, 0, .4);
+}
+
+.am-modal-transparent {
+ width: 80%;
+}
+
+.am-modal-transparent .am-modal-content {
+ border-radius: 7px;
+ padding-top: 15px;
+}
+
+.am-modal-content {
+ position: relative;
+ background-color: #fff;
+ border: 0;
+ background-clip: padding-box;
+ text-align: center;
+ height: 100%;
+ overflow: hidden;
+}
+
+.am-modal-header {
+ padding: 15px;
+}
+
+.am-modal-title {
+ margin: 0;
+ letter-spacing: -.1px;
+ color: #333;
+ font-size: 14px;
+ line-height: 20px;
+ text-align: center;
+ height: auto;
+ max-height: 150px;
+ overflow-y: auto;
+}
+
+.am-modal-body {
+ font-size: 14px;
+ color: #868686;
+ height: 100%;
+ line-height: 1.5;
+ overflow: auto;
+ padding: 0 15px 30px;
+
+ .wea-search-group, .wea-content, .wea-form-cell {
+ padding: 0;
+ }
+
+ .secondarypwd-form {
+ .wea-form-cell-wrapper {
+ & > div:last-child {
+ .ant-col-16 {
+ width: 37.5% !important;
+ }
+ }
+ }
+ }
+}
+
+.am-modal-wrap {
+ position: fixed;
+ overflow: auto;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ height: 100%;
+ z-index: 999;
+ -webkit-overflow-scrolling: touch;
+ outline: 0;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -webkit-transform: translateZ(1px);
+ transform: translateZ(1px);
+}
+
+.am-modal-button-group-h {
+ position: relative;
+ border-top: 1px solid #ddd;
+ display: flex;
+}
+
+.am-modal-button-group-h .am-modal-button {
+ -webkit-touch-callout: none;
+ flex: 1 1;
+ box-sizing: border-box;
+ text-align: center;
+ text-decoration: none;
+ outline: none;
+ color: #55b1f9;
+ height: 50px;
+ line-height: 50px;
+ display: block;
+ width: auto;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: 14px;
+}
+
+.am-modal-button-group-h .am-modal-button:first-child {
+ color: #333;
+}
+
+.am-modal-button-group-h .am-modal-button:last-child {
+ position: relative;
+ border-left: 1px solid #ddd;
+}
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
new file mode 100644
index 00000000..90d231ca
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/loginVerify.js
@@ -0,0 +1,59 @@
+/*
+ * 登录密码验证
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/17
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { WeaForm } from "comsMobx";
+import FormInfo from "../../components/FormInfo";
+import { loginCondition } from "./conditions";
+import MobileModal from "./mobileModal";
+import * as API from "../../apis/mySalaryBenefits";
+import { RSAEcrypt } from "../../util/RSAUtil";
+
+const form = new WeaForm();
+const getLabel = WeaLocaleProvider.getLabel;
+
+class LoginVerify extends Component {
+
+ componentDidMount() {
+ form.initFormFields(loginCondition);
+ }
+
+ componentWillUnmount() {
+ form.resetForm();
+ }
+
+ save = async () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ RSAEcrypt("1", { ...form.getFormParams() }, this.props.salaryBillToken)
+ .then(RSAParam => {
+ API.checkPassword({ ...RSAParam }).then(({ result }) => {
+ if (result) {
+ this.props.onSetPwdSet();
+ } else {
+ form.showError("password", getLabel(504343, "登录密码错误"));
+ }
+ });
+ });
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const itemRender = {};
+ return (
+
+ );
+ }
+}
+
+export default LoginVerify;
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/mobileModal.js b/pc4mobx/hrmSalary/pages/mobilePayroll/mobileModal.js
new file mode 100644
index 00000000..b6f388db
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/mobileModal.js
@@ -0,0 +1,65 @@
+/*
+ * 自定义移动端弹框组件
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/16
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { removeElementById } from "../../util";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class MobileModal extends Component {
+ componentDidMount() {
+ this.setMetaViewport();
+ }
+
+ setMetaViewport = () => {
+ // 检查是否已存在 viewport meta 标签
+ let viewportMeta = document.querySelector("meta[name=\"viewport\"]");
+ if (!viewportMeta) {
+ // 如果不存在,创建一个新的 meta 标签
+ viewportMeta = document.createElement("meta");
+ viewportMeta.setAttribute("name", "viewport");
+ document.head.appendChild(viewportMeta);
+ }
+ // 设置或更新 viewport 的 content 属性
+ const content = "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover";
+ viewportMeta.setAttribute("content", content);
+ };
+
+ render() {
+ return (
+
+
+
+
+
+
+
+
{this.props.children}
+
+
+
+
+
+
+ );
+ }
+}
+
+export default MobileModal;
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js
index 5cb571e6..159807e0 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js
@@ -1,6 +1,25 @@
import { WeaLocaleProvider } from "ecCom";
const { getLabel } = WeaLocaleProvider;
+export const captchaCondition = [
+ {
+ items: [
+ {
+ colSpan: 1,
+ conditionType: "INPUT",
+ domkey: ["mobileCode"],
+ fieldcol: 18,
+ label: getLabel(111, "验证码"),
+ labelcol: 6,
+ detailtype: 1,
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
export const loginCondition = [
{
items: [
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
new file mode 100644
index 00000000..b5310466
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js
@@ -0,0 +1,82 @@
+/*
+ * 二次验证密码
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/16
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { WeaForm, WeaSwitch } from "comsMobx";
+import { message } from "antd";
+import FormInfo from "../../components/FormInfo";
+import { secondaryVerifyConditions } from "./conditions";
+import * as API from "../../apis/mySalaryBenefits";
+import MobileModal from "./mobileModal";
+
+const form = new WeaForm();
+const getLabel = WeaLocaleProvider.getLabel;
+
+class SecondaryVerify extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { notSetting: false };
+ }
+
+ componentDidMount() {
+ API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.props.salaryBillToken)
+ .then(({ notSetting }) => {
+ this.setState({ notSetting });
+ });
+ form.initFormFields(secondaryVerifyConditions);
+ }
+
+ componentWillUnmount() {
+ this.setState({ notSetting: false }, () => form.resetForm());
+ }
+
+ doSecondAuth = () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ const { salaryBillToken } = this.props;
+ API.doSecondAuth({ mouldCode: "HRM", itemCode: "SALARY", ...form.getFormParams() }, salaryBillToken)
+ .then(({ status, checkStatus, checkMsg }) => {
+ if (status && checkStatus === "1") {
+ message.success(checkMsg);
+ this.props.onSuccess();
+ } else {
+ form.showError("authCode", checkMsg);
+ }
+ });
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const { notSetting } = this.state;
+ const itemRender = {
+ authCode: (field, textAreaProps, form, formParams) => {
+ return (
+
+ {
+ notSetting &&
+
+ }
+ );
+ }
+ };
+ return (
+
+ );
+ }
+}
+
+export default SecondaryVerify;
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
new file mode 100644
index 00000000..a8f84027
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdVerify.js
@@ -0,0 +1,91 @@
+/*
+ * 二次验证密码设置
+ *
+ * @Author: 黎永顺
+ * @Date: 2025/4/17
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { message } from "antd";
+import { WeaForm, WeaSwitch } from "comsMobx";
+import FormInfo from "../../components/FormInfo";
+import { secondarypwdCondition } from "./conditions";
+import * as API from "../../apis/mySalaryBenefits";
+import MobileModal from "./mobileModal";
+import { RSAEcrypt } from "../../util/RSAUtil";
+
+const form = new WeaForm();
+const getLabel = WeaLocaleProvider.getLabel;
+
+class SecondarypwdVerify extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ src: (window.ecologyContentPath || "") + "/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4",
+ num: 0
+ };
+ }
+
+ componentDidMount() {
+ form.initFormFields(secondarypwdCondition);
+ }
+
+ componentWillUnmount() {
+ form.resetForm();
+ }
+
+ save = async () => {
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ const { secondaryPwd1, secondaryPwd2, validatecode } = form.getFormParams();
+ if (secondaryPwd1 !== secondaryPwd2) {
+ form.showError("secondaryPwd2", getLabel(504376, "密码确认不正确!"));
+ return;
+ }
+ RSAEcrypt("1", { secondaryPwd1, secondaryPwd2 }).then(RSAParam => {
+ API.saveSecondaryPwd({ ...RSAParam, validatecode }, this.props.salaryBillToken)
+ .then(({ sign, message: msg }) => {
+ if (sign === "1") {
+ message.success(msg);
+ this.props.onSuccess();
+ } else {
+ form.showError("validatecode", msg);
+ this.setState({ num: this.state.num + 1 }, () => {
+ this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
+ });
+ }
+ });
+ });
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const itemRender = {
+ validatecode: (field, textAreaProps, form, formParams) => {
+ return (
+
+
{
+ this.setState({ num: this.state.num + 1 }, () => {
+ this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
+ });
+ }} alt=""/>
+ );
+ }
+ };
+ return (
+
+ );
+ }
+}
+
+export default SecondarypwdVerify;
diff --git a/pc4mobx/hrmSalary/pages/mySalary/authority.js b/pc4mobx/hrmSalary/pages/mySalary/authority.js
index 00a74712..ec098fc2 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/authority.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/authority.js
@@ -9,7 +9,6 @@ export default class Authority extends React.Component {
render() {
const { store } = this.props;
const { loading, hasRight } = store;
-
const style = {
position: "absolute",
top: "50%",
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index 5fa76f93..56e1f2f4 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -14,6 +14,8 @@ import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../a
import CaptchaModal from "../../components/captchaModal";
import "./index.less";
+const isIPhone = new RegExp("\\biPhone\\b|\\biPod\\b", "i").test(window.navigator.userAgent);
+const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
const { getLabel } = WeaLocaleProvider;
@inject("mySalaryStore")
@@ -123,7 +125,7 @@ export const ConfirmBtns = (props) => {
}
{
- props.showFeedback === "1" &&
+ ((props.showFeedback === "1" && !isIPhone) || (props.showFeedback === "1" && isIPhone && isEm)) &&
}
;
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js
index 552a7122..df034794 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js
@@ -32,10 +32,10 @@ class PayrollPartTable extends Component {
}
componentWillReceiveProps(nextProps, nextContext) {
- if (nextProps.visible !== this.props.visible) {
- nextProps.visible && this.sendRangeList(nextProps);
- this.setState({ selectedRowKeys: [] });
- }
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.sendRangeList(nextProps);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
+ selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
+ });
}
sendRangeList = (props) => {
@@ -52,9 +52,9 @@ class PayrollPartTable extends Component {
sendRangeList(payload).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
if (status) {
- const { pageNum: current, pageSize, total, columns, list: dataSource } = data;
+ const { pageNum: current, total, columns, list: dataSource } = data;
this.setState({
- pageInfo: { ...pageInfo, current, pageSize, total },
+ pageInfo: { ...pageInfo, current, total },
dataSource: _.map(dataSource, it => ({
...it,
includeObj: _.map(it.includeObj, child => child.targetName || child.targetTypeName).join(","),
@@ -125,8 +125,7 @@ class PayrollPartTable extends Component {
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
- }, () => {
- });
+ }, () => this.sendRangeList({ grantType, salarySendId }));
}
};
const rowSelection = {
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
index 7eae1948..9a7c033c 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
+++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
@@ -173,8 +173,8 @@
.ph-switch {
height: 100%;
- margin: 0 auto;
- text-align: center;
+ display: flex;
+ justify-content: center;
.active, .phs-btn:hover {
background-color: rgba(0, 0, 0, .15);
@@ -184,8 +184,9 @@
.phs-btn {
height: 50px;
min-width: 88px;
- line-height: 50px;
- display: inline-block;
+ display: flex;
+ justify-content: center;
+ align-items: center;
color: #fff;
padding: 0 15px;
cursor: pointer;
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
index 132a7dbb..6616f55f 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
@@ -407,7 +407,7 @@ export const salaryFilesConditions = [
domkey: ["position"],
fieldcol: 14,
label: "岗位",
- lanId: 6086,
+ lanId: 111,
labelcol: 10,
value: "",
viewAttr: 1
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
index 1ebc0216..37381a6f 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
@@ -53,6 +53,10 @@ class Index extends Component {
} = payrollTempForm.getFormParams(),
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
+ if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== "1") {
+ message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
+ return;
+ }
const payload = {
...toJS(tmplDataSource), ...extraFb, ...formData, ...extraBs,
ackFeedbackStatus: ackFeedbackStatus === "1",
diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js
index 70a5c202..d33be5f4 100644
--- a/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js
+++ b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js
@@ -59,7 +59,6 @@ class PersonalScopeModal extends Component {
...scopeSelectLinkageDatas[cur],
browserConditionParam: {
...scopeSelectLinkageDatas[cur].browserConditionParam,
- isSingle: true,
replaceDatas: !_.isEmpty(record) ? [{
id: String(record.targetId),
name: record.targetName
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less
index cf539484..0e752b3f 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.less
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less
@@ -187,6 +187,7 @@
border: 1px solid #e5e5e5 !important;
padding: 4px 8px !important;
min-height: 70px !important;
+ word-wrap: break-word;
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileImportDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileImportDialog/index.js
index 415f7e33..dfc036bf 100644
--- a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileImportDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileImportDialog/index.js
@@ -96,7 +96,9 @@ class Index extends Component {
this.setState({
- importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
+ importDialog: {
+ ...importDialog, importResult: {}, imageId: "", link: "/api/bs/hrmsalary/variableSalary/downloadTemplate"
+ }
})}
importParams={this.renderFormComponent()}
exportDataDom={
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index 11be8705..337096c1 100644
--- a/pc4mobx/hrmSalary/util/index.js
+++ b/pc4mobx/hrmSalary/util/index.js
@@ -152,3 +152,7 @@ export const getIframeParentHeight = (selector, total, extraHeight) => {
}
return height;
};
+export const removeElementById = (id) => {
+ const element = document.getElementById(id);
+ if (element) element.remove();
+};
diff --git a/pc4mobx/hrmSalary/util/request.js b/pc4mobx/hrmSalary/util/request.js
index 4fd7e4e4..ef487037 100644
--- a/pc4mobx/hrmSalary/util/request.js
+++ b/pc4mobx/hrmSalary/util/request.js
@@ -16,12 +16,12 @@ export const formHeaderPost = (url, method, params, header) => {
body: formdata
}).then(res => res.json());
};
-export const postFetch = (url, params) => {
+export const postFetch = (url, params, header = {}) => {
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
params.access_token = localStorage.access_token;
}
url = server + url + "?__random__=" + (new Date()).valueOf();
- return fetch(url, getFetchParams("POST", params)).then(res => res.json());
+ return fetch(url, getFetchParams("POST", params, header)).then(res => res.json());
};
export const headerRequestFetch = (url, method, params, header) => {
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {