Compare commits

...

22 Commits

Author SHA1 Message Date
lys 4d8351d627 Merge branch 'release/2.19.1.2501.01' into release/2.19.1.2501.01-个税
# Conflicts:
#	pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
2025-04-23 18:03:38 +08:00
lys 9a50947d8a release/2.19.1.2501.01 2025-04-23 17:34:46 +08:00
lys d652b2cdc6 release/2.19.1.2501.01 2025-04-23 16:13:49 +08:00
lys 51ac08d6fc release/2.19.1.2501.01 2025-04-22 09:35:04 +08:00
lys ae43a2aa7c release/2.19.1.2501.01 2025-04-18 16:21:49 +08:00
lys 82ffd93fd5 5release/2.19.1.2501.01 2025-04-18 15:10:05 +08:00
lys 34b2052926 feature/2.19.1.2501.01-PC端Token验证 2025-04-18 14:49:19 +08:00
lys d5bd7ae264 Merge branch 'release/2.19.1.2501.01' into feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 18:02:22 +08:00
lys 554cf4b6b3 feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 17:44:30 +08:00
lys 6b3e321846 feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 17:18:36 +08:00
lys b01d280644 feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 17:12:53 +08:00
lys 5ab71a3492 feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 15:56:32 +08:00
lys b3fff361ec feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 15:23:58 +08:00
lys aaf00ace3c feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 15:13:40 +08:00
lys 94c9a39f9f feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 14:23:31 +08:00
lys fab27c99ed feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-17 09:54:03 +08:00
lys 55ccd83916 feature/2.19.1.2501.01-移动端查看工资单密码设置 2025-04-16 16:22:51 +08:00
lys 854a49b018 release/2.19.1.2501.01 2025-04-16 15:51:28 +08:00
lys 51d9c58888 release/2.19.1.2501.01 2025-04-15 16:27:19 +08:00
lys 6dfb4e6650 release/2.19.1.2501.01 2025-04-15 16:13:15 +08:00
lys 38572729fd release/3.0.1.2504.01-合并业务线 2025-04-15 15:16:29 +08:00
lys 80307c7b91 release/2.19.1.2501.01 2025-04-14 16:38:41 +08:00
26 changed files with 762 additions and 176 deletions

View File

@ -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);

View File

@ -210,18 +210,26 @@ 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);
};
// 工资单基础设置-获取设置列表

View File

@ -67,7 +67,7 @@ export default class FormInfo extends Component {
}
}
coms != null && formItems.push({
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>),
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>), hide: field.hide,
col
});

View File

@ -10,7 +10,7 @@ class Content extends Component {
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
return (
<div className="salary-preview-container">
<div style={{ border: "10px solid #F3F9FF" }}>
<div style={{ border: "10px solid #F3F9FF", width: "100%" }}>
<div className="edition-center">
<div className="header">
<div className="header-title">{theme || ""}</div>

View File

@ -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 { getTaxAgentSelectList } from "../../apis/taxAgent";
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 getTaxAgentSelectList();
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.content })) };
}
return { ...o };
})
}))
}, () => form.initFormFields(this.state.conditions));
}
renderCalculateOpts = () => {
const { taxAgentStore: { showOperateBtn } } = this.props;
const { queryParams, isRefresh } = this.state;
const { queryParams, isRefresh, showAdvance } = this.state;
let calculateOpts = [
<Button type="primary" onClick={() => this.setState({
calcDaialog: {
@ -49,10 +71,11 @@ class Calculate extends Component {
title: getLabel(538780, "核算")
}
})}>{getLabel(538780, "核算")}</Button>,
<CalculateQuery queryParams={queryParams} onChange={v => this.setState({
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
queryParams: { ...queryParams, ...v }
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
onChange={v => this.setState({
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
queryParams: { ...queryParams, ...v }
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
];
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
};
@ -188,7 +211,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 (
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
@ -201,7 +226,18 @@ class Calculate extends Component {
]}
>
<div className="calculate-body">
<CalculateTablelist queryParams={queryParams} isRefresh={isRefresh} onCalcOpts={this.handleCalcOpts}/>
<div className={cs("advance-calc", { "show-advance-calc": showAdvance })}>
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
<div className="advance-calc-btns">
<Button type="primary"
onClick={() => this.setState({ isRefresh: !isRefresh })}>{getLabel(111, "搜索")}</Button>
<Button type="ghost" onClick={() => form.resetForm()}>{getLabel(111, "重置")}</Button>
<Button type="ghost"
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
</div>
</div>
<CalculateTablelist form={form} queryParams={queryParams} isRefresh={isRefresh}
onCalcOpts={this.handleCalcOpts}/>
<CalculateDialog {...calcDaialog}
onCancel={(bool, id) => this.setState({
calcDaialog: { ...calcDaialog, visible: false },

View File

@ -21,11 +21,14 @@ class Index extends Component {
<MonthRangePicker dateRange={dateRange} viewAttr={2}
onChange={v => this.props.onChange({ dateRange: v })}/>
</div>
<WeaInputSearch value={name}
placeholder={getLabel(543431, "请输入薪资账套名称")}
onChange={v => this.props.onChange({ name: v })}
onSearch={this.props.onSearch}
/>
<div className="advance-custom">
<WeaInputSearch value={name}
placeholder={getLabel(543431, "请输入薪资账套名称")}
onChange={v => this.props.onChange({ name: v })}
onSearch={this.props.onSearch}
/>
<a href="javascript:void(0);" onClick={this.props.onAdvance}>{getLabel(111, "高级搜索")}</a>
</div>
</div>
);
}

View File

@ -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 });

View File

@ -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
}
];

View File

@ -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 [

View File

@ -155,6 +155,10 @@
.esf-base-info-form, .wea-title, .wea-content {
padding: 0;
.ant-row {
height: 100%;
}
}
.esf-form-content {

View File

@ -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%;

View File

@ -17,7 +17,7 @@ class Index extends Component {
return (
<div className="salary-btn-flex">
<div className="mounth-range">
<span className="label">{getLabel(543549, "薪资所属月")}</span>
<span className="label">{getLabel(111, "税款所属期")}</span>
<MonthRangePicker dateRange={dateRange} viewAttr={2}
onChange={v => this.props.onChange({ dateRange: v })}/>
</div>

View File

@ -8,7 +8,7 @@ import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu, message, Modal, Tag } from "antd";
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
@ -36,9 +36,9 @@ class Index extends Component {
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" && showOperateBtn });
});
};
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 [fromSalaryMonth, endSalaryMonth] = dateRange || [];
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
@ -47,7 +47,8 @@ class Index extends Component {
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 => {

View File

@ -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
}
];

View File

@ -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 = "";
@ -60,12 +54,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 +71,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 +80,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 +95,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 +105,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 +140,61 @@ 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 <div>
<WeaDialog
onCancel={() => this.setState({ visible: false }, () => clearLoading())}
title="请输入二次验证密码" visible={visible} initLoadCss
className="verifyWrapper"
hasScroll buttons={[
<Button type="primary" size="small" onClick={this.doSecondAuth}>确定</Button>
]}
>
<WeaError tipPosition="bottom" ref="weaError" error="此项必填">
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
onChange={authCode => this.setState({ authCode })}/>
</WeaError>
{
notSetting &&
<div style={{ clear: "both", paddingTop: 10 }}>
{getLabel("514970", "您还未设置二次验证密码,点击")}
<a href="javascript:void(0);"
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
</div>
}
</WeaDialog>
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
</div>;
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <React.Fragment>
{visible && <SecondaryVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
onSetLogin={() => this.setState({ visible: false, loginVisible: true })}
onSuccess={() => {
setInitEmVerify();
this.getMySalaryBill(getQueryString("id"));
}}/>}
{loginVisible && <LoginVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
onSetPwdSet={() => this.setState({ loginVisible: false, pwdSetVisible: true })}/>}
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
{/*发送验证码*/}
<CaptchaModal
visible={captchaVisible} id={getQueryString("id")}
onCancel={() => this.setState({ captchaVisible: false })}
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
/>
</React.Fragment>;
const {
salaryTemplate, salaryGroups, employeeInformation,
sendTime, confirmStatus, showAck, showFeedback
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 || "",
theme: salaryTemplate.theme,
tip: salaryTemplate.textContent,
sendTime,
background: salaryTemplate.background,
tipPosi: salaryTemplate.textContentPosition || "",
itemTypeList: [employeeInformation, ...salaryGroups]
};
return (
<React.Fragment>
{
type === "phone" ?
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
<ConfirmBtns
showAck={showAck} showFeedback={showFeedback}
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
</MobileTemplate>
</Authority>
:
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<div className="weapp-salary-my-salary-view-payroll">
<Content {...salaryProps}>
<ConfirmBtns
showAck={showAck} showFeedback={showFeedback}
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
</Content>
</div>
</Authority>
}
<CaptchaModal
visible={captchaVisible} id={getQueryString("id")}
onCancel={() => this.setState({ captchaVisible: false })}
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
/>
</React.Fragment>
);
return (<React.Fragment>
{type === "phone" ? <Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
<ConfirmBtns
showAck={showAck} showFeedback={showFeedback}
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
</MobileTemplate>
</Authority> : <Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
store={this.props.mySalaryStore}>
<div className="weapp-salary-my-salary-view-payroll">
<Content {...salaryProps}>
<ConfirmBtns
showAck={showAck} showFeedback={showFeedback}
confirmSalaryBill={this.confirmSalaryBill}
goFeedback={this.handleGoFeedback}
/>
</Content>
</div>
</Authority>}
</React.Fragment>);
}
}

View File

@ -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;
}

View File

@ -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 (<MobileModal title={getLabel(111, "请先输入登录密码")} onConfirm={this.save}>
<FormInfo center={false} itemRender={itemRender} form={form} formFields={loginCondition}/>
</MobileModal>);
}
}
export default LoginVerify;

View File

@ -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 (
<div id="am-modal-container">
<div>
<div className="am-modal-mask"></div>
<div className="am-modal-wrap">
<div className="am-modal am-modal-transparent">
<div className="am-modal-content">
<div className="am-modal-header">
<div className="am-modal-title">{this.props.title}</div>
</div>
<div className="am-modal-body">{this.props.children}</div>
<div className="am-modal-footer">
<div className="am-modal-button-group-h">
<a href="javascript:void(0);" className="am-modal-button"
onClick={() => removeElementById("am-modal-container")}>{getLabel(111, "取消")}</a>
<a href="javascript:void(0);" className="am-modal-button"
onClick={this.props.onConfirm}>{getLabel(111, "确定")}</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
}
export default MobileModal;

View File

@ -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 (<React.Fragment>
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>
{
notSetting &&
<div style={{ clear: "both", paddingTop: 10 }}>
{getLabel(111, "您还未设置二次验证密码,点击")}
<a href="javascript:void(0);" onClick={this.props.onSetLogin}>{getLabel(111, "设置")}</a>
</div>
}
</React.Fragment>);
}
};
return (<MobileModal title={getLabel(111, "身份验证")} onConfirm={this.doSecondAuth}>
<FormInfo center={false} custLabelCol={9} itemRender={itemRender} form={form}
formFields={secondaryVerifyConditions}/>
</MobileModal>);
}
}
export default SecondaryVerify;

View File

@ -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 (<React.Fragment>
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>
<img
style={{ height: 30, cursor: "pointer", position: "absolute", left: "118%" }}
src={this.state.src}
onClick={() => {
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=""/>
</React.Fragment>);
}
};
return (<MobileModal title={getLabel(111, "二次验证密码设置")} onConfirm={this.save}>
<FormInfo className="secondarypwd-form" center={false} itemRender={itemRender} form={form}
formFields={secondarypwdCondition}/>
</MobileModal>);
}
}
export default SecondarypwdVerify;

View File

@ -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%",

View File

@ -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) => {
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
}
{
props.showFeedback === "1" &&
((props.showFeedback === "1" && !isIPhone) || (props.showFeedback === "1" && isIPhone && isEm)) &&
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
}
</div>;

View File

@ -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 = {

View File

@ -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;

View File

@ -407,7 +407,7 @@ export const salaryFilesConditions = [
domkey: ["position"],
fieldcol: 14,
label: "岗位",
lanId: 6086,
lanId: 111,
labelcol: 10,
value: "",
viewAttr: 1

View File

@ -159,3 +159,7 @@ export const getIframeParentHeight = (selector, total, extraHeight) => {
}
return height;
};
export const removeElementById = (id) => {
const element = document.getElementById(id);
if (element) element.remove();
};