Compare commits
43 Commits
cac96cbae6
...
bea6efa1c4
| Author | SHA1 | Date |
|---|---|---|
|
|
bea6efa1c4 | |
|
|
680c4a0506 | |
|
|
5e5e109b7e | |
|
|
efb5af1b10 | |
|
|
915e946c3e | |
|
|
ff1da8b19b | |
|
|
5ef2c5ecb4 | |
|
|
5f80e9e6b3 | |
|
|
2b39980ed0 | |
|
|
2321266533 | |
|
|
3d8b242889 | |
|
|
2871043810 | |
|
|
0ec1cd1cb1 | |
|
|
c356c4f0db | |
|
|
2b639ad388 | |
|
|
07c40750da | |
|
|
a4c08b937b | |
|
|
9e26192aa2 | |
|
|
d540698c57 | |
|
|
e539f7b040 | |
|
|
e9d301927f | |
|
|
dee1059ca7 | |
|
|
9a50947d8a | |
|
|
d652b2cdc6 | |
|
|
51ac08d6fc | |
|
|
ae43a2aa7c | |
|
|
82ffd93fd5 | |
|
|
34b2052926 | |
|
|
d5bd7ae264 | |
|
|
554cf4b6b3 | |
|
|
6b3e321846 | |
|
|
b01d280644 | |
|
|
5ab71a3492 | |
|
|
b3fff361ec | |
|
|
aaf00ace3c | |
|
|
94c9a39f9f | |
|
|
fab27c99ed | |
|
|
55ccd83916 | |
|
|
854a49b018 | |
|
|
51d9c58888 | |
|
|
6dfb4e6650 | |
|
|
38572729fd | |
|
|
80307c7b91 |
|
|
@ -45,11 +45,13 @@ export const doSecondAuth = (params, headers) => {
|
||||||
export const getPasswordForm = params => {
|
export const getPasswordForm = params => {
|
||||||
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
|
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
|
||||||
};
|
};
|
||||||
export const checkPassword = params => {
|
export const checkPassword = (params, headers) => {
|
||||||
return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
return formHeaderPost("/api/hrm/secondarypwd/checkPassword", "POST", params, headers);
|
||||||
|
// return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||||
};
|
};
|
||||||
export const saveSecondaryPwd = params => {
|
export const saveSecondaryPwd = (params, headers) => {
|
||||||
return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
|
return formHeaderPost("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params, headers);
|
||||||
|
// return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
|
||||||
};
|
};
|
||||||
export const salaryBillGetToken = params => {
|
export const salaryBillGetToken = params => {
|
||||||
return postFetch("/api/bs/hrmsalary/salaryBill/getToken", params);
|
return postFetch("/api/bs/hrmsalary/salaryBill/getToken", params);
|
||||||
|
|
|
||||||
|
|
@ -210,18 +210,26 @@ export const payrollCheckType = params => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
||||||
};
|
};
|
||||||
//工资单-反馈验证
|
//工资单-反馈验证
|
||||||
export const feedBackSalaryBill = params => {
|
export const feedBackSalaryBill = async params => {
|
||||||
const { header, ...payload } = 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",
|
method: "GET",
|
||||||
mode: "cors",
|
mode: "cors",
|
||||||
headers: { "Content-Type": "application/json", ...header }
|
headers: { "Content-Type": "application/json", ...header }
|
||||||
}).then(res => res.json());
|
});
|
||||||
|
return await res.json();
|
||||||
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
|
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
|
||||||
};
|
};
|
||||||
//工资单-确认
|
//工资单-确认
|
||||||
export const confirmSalaryBill = params => {
|
export const confirmSalaryBill = async params => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", 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);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 工资单基础设置-获取设置列表
|
// 工资单基础设置-获取设置列表
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ export default class FormInfo extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
coms != null && formItems.push({
|
coms != null && formItems.push({
|
||||||
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>),
|
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>), hide: field.hide,
|
||||||
col
|
col
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class Content extends Component {
|
||||||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
||||||
return (
|
return (
|
||||||
<div className="salary-preview-container">
|
<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="edition-center">
|
||||||
<div className="header">
|
<div className="header">
|
||||||
<div className="header-title">{theme || ""}</div>
|
<div className="header-title">{theme || ""}</div>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class Index extends Component {
|
||||||
if (o.dataIndex === "username") {
|
if (o.dataIndex === "username") {
|
||||||
return { ...o, width: 150, fixed: "left" };
|
return { ...o, width: 150, fixed: "left" };
|
||||||
}
|
}
|
||||||
return { ...o, width: 150 };
|
return { ...o, width: 150, render: (v) => (<span title={v}>{v}</span>) };
|
||||||
}), {
|
}), {
|
||||||
dataIndex: "options", title: getLabel(30585, "操作"),
|
dataIndex: "options", title: getLabel(30585, "操作"),
|
||||||
width: 120, render: (_, record) => (
|
width: 120, render: (_, record) => (
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,15 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wea-new-table {
|
||||||
|
.ant-table-tbody > tr > td,
|
||||||
|
.ant-table-thead > tr > th {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class SalaryDetails extends Component {
|
||||||
this.postMessageToChild({
|
this.postMessageToChild({
|
||||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
|
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
|
||||||
columns: _.map(columns, (it, idx) => ({
|
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),
|
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : (it.width || it.oldWidth),
|
||||||
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-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 { Button, message, Modal } from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import CalculateQuery from "./components/calculateQuery";
|
import CalculateQuery from "./components/calculateQuery";
|
||||||
|
|
@ -15,9 +16,15 @@ import CalculateDialog from "./components/calculateDialog";
|
||||||
import ProgressModal from "../../components/progressModal";
|
import ProgressModal from "../../components/progressModal";
|
||||||
import LogDialog from "../../components/logViewModal";
|
import LogDialog from "../../components/logViewModal";
|
||||||
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
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";
|
import "./index.less";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const form = new WeaForm();
|
||||||
|
|
||||||
@inject("calculateStore", "taxAgentStore")
|
@inject("calculateStore", "taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
|
|
@ -31,17 +38,32 @@ class Calculate extends Component {
|
||||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||||
moment(new Date()).endOf("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, "正在归档中请稍后") },
|
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||||
calcDaialog: { visible: false, title: "" }
|
calcDaialog: { visible: false, title: "" }, showAdvance: false
|
||||||
};
|
};
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
this.handleDebounce = 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 = () => {
|
renderCalculateOpts = () => {
|
||||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { queryParams, isRefresh } = this.state;
|
const { queryParams, isRefresh, showAdvance } = this.state;
|
||||||
let calculateOpts = [
|
let calculateOpts = [
|
||||||
<Button type="primary" onClick={() => this.setState({
|
<Button type="primary" onClick={() => this.setState({
|
||||||
calcDaialog: {
|
calcDaialog: {
|
||||||
|
|
@ -49,10 +71,11 @@ class Calculate extends Component {
|
||||||
title: getLabel(538780, "核算")
|
title: getLabel(538780, "核算")
|
||||||
}
|
}
|
||||||
})}>{getLabel(538780, "核算")}</Button>,
|
})}>{getLabel(538780, "核算")}</Button>,
|
||||||
<CalculateQuery queryParams={queryParams} onChange={v => this.setState({
|
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
onChange={v => this.setState({
|
||||||
queryParams: { ...queryParams, ...v }
|
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
queryParams: { ...queryParams, ...v }
|
||||||
|
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||||
];
|
];
|
||||||
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
||||||
};
|
};
|
||||||
|
|
@ -188,7 +211,9 @@ class Calculate extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state;
|
const {
|
||||||
|
queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance
|
||||||
|
} = this.state;
|
||||||
return (
|
return (
|
||||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
|
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
|
||||||
|
|
@ -201,7 +226,18 @@ class Calculate extends Component {
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<div className="calculate-body">
|
<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}
|
<CalculateDialog {...calcDaialog}
|
||||||
onCancel={(bool, id) => this.setState({
|
onCancel={(bool, id) => this.setState({
|
||||||
calcDaialog: { ...calcDaialog, visible: false },
|
calcDaialog: { ...calcDaialog, visible: false },
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,14 @@ class Index extends Component {
|
||||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||||
onChange={v => this.props.onChange({ dateRange: v })}/>
|
onChange={v => this.props.onChange({ dateRange: v })}/>
|
||||||
</div>
|
</div>
|
||||||
<WeaInputSearch value={name}
|
<div className="advance-custom">
|
||||||
placeholder={getLabel(543431, "请输入薪资账套名称")}
|
<WeaInputSearch value={name}
|
||||||
onChange={v => this.props.onChange({ name: v })}
|
placeholder={getLabel(543431, "请输入薪资账套名称")}
|
||||||
onSearch={this.props.onSearch}
|
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>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,14 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getSalaryAcctList = (props) => {
|
getSalaryAcctList = (props) => {
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state, { queryParams, form } = props;
|
||||||
const { queryParams } = props;
|
const { taxAgentIds } = form.getFormParams();
|
||||||
const { dateRange, ...extra } = queryParams;
|
const { dateRange, ...extra } = queryParams;
|
||||||
const [startMonthStr, endMonthStr] = dateRange || [];
|
const [startMonthStr, endMonthStr] = dateRange || [];
|
||||||
const params = { startMonthStr, endMonthStr, ...extra };
|
const params = { startMonthStr, endMonthStr, ...extra };
|
||||||
const payload = { ...pageInfo, ...params };
|
const payload = {
|
||||||
|
...pageInfo, ...params, taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : []
|
||||||
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
getSalaryAcctList(payload).then(({ status, data }) => {
|
getSalaryAcctList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
@ -125,17 +125,18 @@ class EditCalcTable extends Component {
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys })
|
||||||
if (status) {
|
.then(({ status, errormsg }) => {
|
||||||
clearInterval(this.timerLock);
|
if (status) {
|
||||||
this.setState({
|
clearInterval(this.timerLock);
|
||||||
progressVisible: false,
|
this.setState({
|
||||||
progress: 0
|
progressVisible: false,
|
||||||
}, () => this.queryCalcResultList());
|
progress: 0
|
||||||
} else {
|
}, () => this.queryCalcResultList());
|
||||||
message.error(errormsg);
|
} else {
|
||||||
}
|
message.error(errormsg);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -342,4 +343,4 @@ const traverse = (arr, calcDetail) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -43,7 +43,7 @@ class EditSalaryCalcSlide extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
renderTitle = () => {
|
renderTitle = () => {
|
||||||
const { loading } = this.state, { viewAttr } = this.props;
|
const { loading, itemsByGroup } = this.state, { viewAttr } = this.props;
|
||||||
return <div className="titleDialog">
|
return <div className="titleDialog">
|
||||||
<div className="titleCol titleLeftBox">
|
<div className="titleCol titleLeftBox">
|
||||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||||
|
|
@ -52,7 +52,7 @@ class EditSalaryCalcSlide extends Component {
|
||||||
<div className="titleCol titleRightBox">
|
<div className="titleCol titleRightBox">
|
||||||
{
|
{
|
||||||
viewAttr === 2 &&
|
viewAttr === 2 &&
|
||||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
<Button type="primary" disabled={_.isEmpty(itemsByGroup)} onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
@ -99,7 +99,8 @@ class EditSalaryCalcSlide extends Component {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const payload = {
|
const payload = {
|
||||||
salaryAcctEmpId, employeeInfos: baseInfo,
|
salaryAcctEmpId,
|
||||||
|
employeeInfos: _.map(baseInfo, o => ({ ...o, fieldValue: o.fieldValue.id || o.fieldValue })),
|
||||||
items: [
|
items: [
|
||||||
..._.reduce(itemsByGroup, (pre, cur) => {
|
..._.reduce(itemsByGroup, (pre, cur) => {
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,10 @@
|
||||||
|
|
||||||
.esf-base-info-form, .wea-title, .wea-content {
|
.esf-base-info-form, .wea-title, .wea-content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
|
.ant-row {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.esf-form-content {
|
.esf-form-content {
|
||||||
|
|
@ -241,6 +245,8 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
transition: margin-top .3s;
|
transition: margin-top .3s;
|
||||||
|
max-height: 80vh;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
.anchor-list-ink {
|
.anchor-list-ink {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
.wea-input-focus {
|
||||||
margin-top: -4px;
|
margin-top: -4px;
|
||||||
}
|
}
|
||||||
|
|
@ -72,6 +90,32 @@
|
||||||
overflow-y: hidden;
|
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 {
|
.calculate-body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
* Date: 2023/3/7
|
* Date: 2023/3/7
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTop } from "ecCom";
|
||||||
import { Button } from "antd";
|
|
||||||
import { viewAttendQuote } from "../../../../apis/attendance";
|
import { viewAttendQuote } from "../../../../apis/attendance";
|
||||||
|
import { Button, Spin } from "antd";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
@ -16,11 +16,31 @@ class AttendanceDataViewSlide extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
loading: { query: false }, keyword: "", dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
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) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
||||||
|
|
@ -33,19 +53,29 @@ class AttendanceDataViewSlide extends Component {
|
||||||
|
|
||||||
viewAttendQuote = (extraPayload = {}, props) => {
|
viewAttendQuote = (extraPayload = {}, props) => {
|
||||||
const { loading, pageInfo, keyword } = this.state;
|
const { loading, pageInfo, keyword } = this.state;
|
||||||
const { attendQuoteId } = props;
|
const { attendQuoteId } = props || this.props;
|
||||||
this.setState({ loading: { ...loading, query: true } });
|
this.setState({ loading: { ...loading, query: true } });
|
||||||
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
|
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
|
||||||
this.setState({ loading: { ...loading, query: false } });
|
this.setState({ loading: { ...loading, query: false } });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||||
this.setState({
|
this.setState({
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||||
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null }))
|
}, () => 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 } }));
|
}).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 = () => {
|
handleExportAttendQuote = () => {
|
||||||
if (!this.handleDebounce) {
|
if (!this.handleDebounce) {
|
||||||
this.handleDebounce = _.debounce(() => {
|
this.handleDebounce = _.debounce(() => {
|
||||||
|
|
@ -60,24 +90,7 @@ class AttendanceDataViewSlide extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||||
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
const { loading, 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 btns = [
|
const btns = [
|
||||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||||
<WeaInputSearch
|
<WeaInputSearch
|
||||||
|
|
@ -100,9 +113,16 @@ class AttendanceDataViewSlide extends Component {
|
||||||
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
<WeaTable
|
<div style={{ height: `calc(100% - 40px)` }}>
|
||||||
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
<Spin spinning={loading.query}>
|
||||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/>
|
<iframe
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/unitTable"
|
||||||
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
|
||||||
|
id="attendanceViewTable"
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,8 @@
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wea-new-table {
|
.ant-spin-nested-loading, .ant-spin-container {
|
||||||
background: #FFF;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class Index extends Component {
|
||||||
return (
|
return (
|
||||||
<div className="salary-btn-flex">
|
<div className="salary-btn-flex">
|
||||||
<div className="mounth-range">
|
<div className="mounth-range">
|
||||||
<span className="label">{getLabel(543549, "薪资所属月:")}</span>
|
<span className="label">{getLabel(111, "税款所属期:")}</span>
|
||||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||||
onChange={v => this.props.onChange({ dateRange: v })}/>
|
onChange={v => this.props.onChange({ dateRange: v })}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import { Dropdown, Menu, message, Modal } from "antd";
|
import { Dropdown, Menu, message, Modal } from "antd";
|
||||||
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -35,18 +35,19 @@ class Index extends Component {
|
||||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getDeclareList = (props) => {
|
getDeclareList = async (props) => {
|
||||||
const { pageInfo } = this.state;
|
const { data: sysData } = await sysinfo();
|
||||||
const { queryParams } = props;
|
const { pageInfo } = this.state, { queryParams } = props;
|
||||||
const { dateRange, ...extra } = queryParams;
|
const { dateRange, ...extra } = queryParams;
|
||||||
const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
|
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
|
||||||
const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
|
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
|
||||||
const payload = { ...pageInfo, ...params };
|
const payload = { ...pageInfo, ...params };
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
getDeclareList(payload).then(({ status, data }) => {
|
getDeclareList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
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({
|
this.setState({
|
||||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||||
columns: _.map(columns, o => {
|
columns: _.map(columns, o => {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
|
import { sysinfo } from "../../apis/ruleconfig";
|
||||||
import * as API from "../../apis/declare";
|
import * as API from "../../apis/declare";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
@ -14,15 +15,21 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: false, dataSource: [], columns: [], declareInfo: {},
|
loading: false, dataSource: [], columns: [], declareInfo: {},
|
||||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.getDetailList();
|
this.getDetailList();
|
||||||
this.getDeclareInfo();
|
this.getDeclareInfo();
|
||||||
|
this.getSysinfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSysinfo = () => {
|
||||||
|
sysinfo().then(({ status, data: sysinfo }) => {
|
||||||
|
if (status) this.setState({ sysinfo });
|
||||||
|
});
|
||||||
|
};
|
||||||
getDetailList = () => {
|
getDetailList = () => {
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state;
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -64,9 +71,10 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
window.open(url, "_self");
|
window.open(url, "_self");
|
||||||
};
|
};
|
||||||
renderTitle = () => {
|
renderTitle = () => {
|
||||||
const { declareInfo } = this.state;
|
const { declareInfo, sysinfo } = this.state;
|
||||||
|
const title = sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月");
|
||||||
return (<React.Fragment>
|
return (<React.Fragment>
|
||||||
<span>{getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}</span>
|
<span>{title}:{declareInfo.salaryMonth}</span>
|
||||||
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
||||||
</React.Fragment>);
|
</React.Fragment>);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
@ -2,37 +2,31 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from "mobx";
|
import { toJS } from "mobx";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
import { Button, message, Modal } from "antd";
|
import { message, Modal } from "antd";
|
||||||
import Authority from "../mySalary/authority";
|
import Authority from "../mySalary/authority";
|
||||||
import "../payroll/templatePreview/index.less";
|
import "../payroll/templatePreview/index.less";
|
||||||
import * as API from "../../apis/mySalaryBenefits";
|
import * as API from "../../apis/mySalaryBenefits";
|
||||||
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
|
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
|
||||||
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
||||||
import CaptchaModal from "../../components/captchaModal";
|
import CaptchaModal from "../../components/captchaModal";
|
||||||
import PassSetDialog from "./passSetDialog";
|
|
||||||
import { ConfirmBtns } from "../mySalary/mySalaryView";
|
import { ConfirmBtns } from "../mySalary/mySalaryView";
|
||||||
import Content from "../../components/pcTemplate/content";
|
import Content from "../../components/pcTemplate/content";
|
||||||
import MobileTemplate from "../../components/mobileTemplate";
|
import MobileTemplate from "../../components/mobileTemplate";
|
||||||
|
import SecondaryVerify from "./secondaryVerify";
|
||||||
|
import LoginVerify from "./loginVerify";
|
||||||
|
import SecondarypwdVerify from "./secondarypwdVerify";
|
||||||
import "../mySalary/index.less";
|
import "../mySalary/index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
@inject("mySalaryStore")
|
@inject("mySalaryStore") @observer
|
||||||
@observer
|
|
||||||
export default class MobilePayroll extends React.Component {
|
export default class MobilePayroll extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
pwdSetVisible: false,
|
visible: false, captchaVisible: false, loginVisible: false, pwdSetVisible: false,
|
||||||
visible: false,
|
mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] },
|
||||||
captchaVisible: false,
|
|
||||||
authCode: "",
|
|
||||||
notSetting: false,
|
|
||||||
mySalaryBillData: {
|
|
||||||
employeeInformation: {},
|
|
||||||
salaryTemplate: []
|
|
||||||
},
|
|
||||||
salaryBillToken: {}
|
salaryBillToken: {}
|
||||||
};
|
};
|
||||||
this.id = "";
|
this.id = "";
|
||||||
|
|
@ -60,12 +54,7 @@ export default class MobilePayroll extends React.Component {
|
||||||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||||
.then(({ status, isNeedSecondAuth }) => {
|
.then(({ status, isNeedSecondAuth }) => {
|
||||||
if (status && isNeedSecondAuth) {
|
if (status && isNeedSecondAuth) {
|
||||||
this.setState({ visible: true }, () => {
|
this.setState({ visible: true });
|
||||||
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
|
||||||
.then(({ status, notSetting }) => {
|
|
||||||
this.setState({ notSetting });
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.getMySalaryBill(getQueryString("id"));
|
this.getMySalaryBill(getQueryString("id"));
|
||||||
setInitEmVerify();
|
setInitEmVerify();
|
||||||
|
|
@ -82,12 +71,7 @@ export default class MobilePayroll extends React.Component {
|
||||||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||||
.then(({ status, isNeedSecondAuth }) => {
|
.then(({ status, isNeedSecondAuth }) => {
|
||||||
if (status && isNeedSecondAuth) {
|
if (status && isNeedSecondAuth) {
|
||||||
this.setState({ visible: true }, () => {
|
this.setState({ visible: true });
|
||||||
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
|
||||||
.then(({ status, notSetting }) => {
|
|
||||||
this.setState({ notSetting });
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.getMySalaryBill(getQueryString("id"));
|
this.getMySalaryBill(getQueryString("id"));
|
||||||
setInitEmVerify();
|
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) => {
|
getMySalaryBill = (salaryInfoId) => {
|
||||||
const { salaryBillToken } = this.state;
|
const { salaryBillToken } = this.state;
|
||||||
const { mySalaryStore: { getMySalaryBill } } = this.props;
|
const { mySalaryStore: { getMySalaryBill } } = this.props;
|
||||||
const params = this.getUrlkey();
|
const params = this.getUrlkey();
|
||||||
const payload = {
|
const payload = {
|
||||||
salaryInfoId, header: salaryBillToken,
|
salaryInfoId, header: salaryBillToken, ..._.pick(params, ["recipient"])
|
||||||
..._.pick(params, ["recipient"])
|
|
||||||
};
|
};
|
||||||
getMySalaryBill(payload).then(result => {
|
getMySalaryBill(payload).then(result => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
@ -132,10 +95,8 @@ export default class MobilePayroll extends React.Component {
|
||||||
};
|
};
|
||||||
getUrlkey = () => {
|
getUrlkey = () => {
|
||||||
let url = window.location.href;
|
let url = window.location.href;
|
||||||
let params = {},
|
let params = {}, arr = url.split("?");
|
||||||
arr = url.split("?");
|
if (arr.length <= 1) return params;
|
||||||
if (arr.length <= 1)
|
|
||||||
return params;
|
|
||||||
arr = arr[1].split("&");
|
arr = arr[1].split("&");
|
||||||
for (var i = 0, l = arr.length; i < l; i++) {
|
for (var i = 0, l = arr.length; i < l; i++) {
|
||||||
var a = arr[i].split("=");
|
var a = arr[i].split("=");
|
||||||
|
|
@ -144,19 +105,21 @@ export default class MobilePayroll extends React.Component {
|
||||||
return params;
|
return params;
|
||||||
};
|
};
|
||||||
confirmSalaryBill = () => {
|
confirmSalaryBill = () => {
|
||||||
confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => {
|
const { salaryBillToken } = this.state;
|
||||||
if (status) {
|
confirmSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
|
||||||
message.success(getLabel(30700, "操作成功"));
|
.then(({ status, errormsg }) => {
|
||||||
this.getMySalaryBill(getQueryString("id"));
|
if (status) {
|
||||||
} else {
|
message.success(getLabel(30700, "操作成功"));
|
||||||
message.error(errormsg || getLabel(30651, "操作失败"));
|
this.getMySalaryBill(getQueryString("id"));
|
||||||
}
|
} else {
|
||||||
});
|
message.error(errormsg || getLabel(30651, "操作失败"));
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
handleGoFeedback = () => {
|
handleGoFeedback = () => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: getLabel(131329, "信息确认"),
|
title: getLabel(131329, "信息确认"),
|
||||||
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
content: getLabel(111, "确认是否发起反馈流程?"),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const { salaryBillToken } = this.state;
|
const { salaryBillToken } = this.state;
|
||||||
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
|
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
|
||||||
|
|
@ -177,76 +140,61 @@ export default class MobilePayroll extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
|
const { mySalaryStore: { setInitEmVerify } } = this.props, {
|
||||||
const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
|
captchaVisible, visible, loginVisible, pwdSetVisible
|
||||||
|
} = this.state;
|
||||||
const type = getQueryString("type");
|
const type = getQueryString("type");
|
||||||
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <div>
|
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <React.Fragment>
|
||||||
<WeaDialog
|
{visible && <SecondaryVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||||
onCancel={() => this.setState({ visible: false }, () => clearLoading())}
|
onSetLogin={() => this.setState({ visible: false, loginVisible: true })}
|
||||||
title="请输入二次验证密码" visible={visible} initLoadCss
|
onSuccess={() => {
|
||||||
className="verifyWrapper"
|
setInitEmVerify();
|
||||||
hasScroll buttons={[
|
this.getMySalaryBill(getQueryString("id"));
|
||||||
<Button type="primary" size="small" onClick={this.doSecondAuth}>确定</Button>
|
}}/>}
|
||||||
]}
|
{loginVisible && <LoginVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||||
>
|
onSetPwdSet={() => this.setState({ loginVisible: false, pwdSetVisible: true })}/>}
|
||||||
<WeaError tipPosition="bottom" ref="weaError" error="此项必填">
|
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||||
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
|
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
|
||||||
onChange={authCode => this.setState({ authCode })}/>
|
{/*发送验证码*/}
|
||||||
</WeaError>
|
<CaptchaModal
|
||||||
{
|
visible={captchaVisible} id={getQueryString("id")}
|
||||||
notSetting &&
|
onCancel={() => this.setState({ captchaVisible: false })}
|
||||||
<div style={{ clear: "both", paddingTop: 10 }}>
|
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
||||||
{getLabel("514970", "您还未设置二次验证密码,点击")}
|
/>
|
||||||
<a href="javascript:void(0);"
|
</React.Fragment>;
|
||||||
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</WeaDialog>
|
|
||||||
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
|
|
||||||
</div>;
|
|
||||||
const {
|
const {
|
||||||
salaryTemplate, salaryGroups, employeeInformation,
|
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback
|
||||||
sendTime, confirmStatus, showAck, showFeedback
|
|
||||||
} = toJS(this.props.mySalaryStore.mySalaryBill);
|
} = toJS(this.props.mySalaryStore.mySalaryBill);
|
||||||
const salaryProps = {
|
const salaryProps = {
|
||||||
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
theme: salaryTemplate.theme,
|
||||||
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
|
tip: salaryTemplate.textContent,
|
||||||
|
sendTime,
|
||||||
|
background: salaryTemplate.background,
|
||||||
|
tipPosi: salaryTemplate.textContentPosition || "",
|
||||||
itemTypeList: [employeeInformation, ...salaryGroups]
|
itemTypeList: [employeeInformation, ...salaryGroups]
|
||||||
};
|
};
|
||||||
return (
|
return (<React.Fragment>
|
||||||
<React.Fragment>
|
{type === "phone" ? <Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||||
{
|
store={this.props.mySalaryStore}>
|
||||||
type === "phone" ?
|
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
|
||||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
<ConfirmBtns
|
||||||
store={this.props.mySalaryStore}>
|
showAck={showAck} showFeedback={showFeedback}
|
||||||
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
<ConfirmBtns
|
goFeedback={this.handleGoFeedback}
|
||||||
showAck={showAck} showFeedback={showFeedback}
|
/>
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
</MobileTemplate>
|
||||||
goFeedback={this.handleGoFeedback}
|
</Authority> : <Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||||
/>
|
store={this.props.mySalaryStore}>
|
||||||
</MobileTemplate>
|
<div className="weapp-salary-my-salary-view-payroll">
|
||||||
</Authority>
|
<Content {...salaryProps}>
|
||||||
:
|
<ConfirmBtns
|
||||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
showAck={showAck} showFeedback={showFeedback}
|
||||||
store={this.props.mySalaryStore}>
|
confirmSalaryBill={this.confirmSalaryBill}
|
||||||
<div className="weapp-salary-my-salary-view-payroll">
|
goFeedback={this.handleGoFeedback}
|
||||||
<Content {...salaryProps}>
|
/>
|
||||||
<ConfirmBtns
|
</Content>
|
||||||
showAck={showAck} showFeedback={showFeedback}
|
</div>
|
||||||
confirmSalaryBill={this.confirmSalaryBill}
|
</Authority>}
|
||||||
goFeedback={this.handleGoFeedback}
|
</React.Fragment>);
|
||||||
/>
|
|
||||||
</Content>
|
|
||||||
</div>
|
|
||||||
</Authority>
|
|
||||||
}
|
|
||||||
<CaptchaModal
|
|
||||||
visible={captchaVisible} id={getQueryString("id")}
|
|
||||||
onCancel={() => this.setState({ captchaVisible: false })}
|
|
||||||
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -9,7 +9,6 @@ export default class Authority extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { store } = this.props;
|
const { store } = this.props;
|
||||||
const { loading, hasRight } = store;
|
const { loading, hasRight } = store;
|
||||||
|
|
||||||
const style = {
|
const style = {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: "50%",
|
top: "50%",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,10 @@ import Content from "../../components/pcTemplate/content";
|
||||||
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
||||||
import CaptchaModal from "../../components/captchaModal";
|
import CaptchaModal from "../../components/captchaModal";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
import { getQueryString } from "../../util/url";
|
||||||
|
|
||||||
|
const isPhone = /(iPhone|iPad|iPod|iOS|Android)/i.test(window.navigator.userAgent);
|
||||||
|
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
@inject("mySalaryStore")
|
@inject("mySalaryStore")
|
||||||
|
|
@ -57,7 +60,7 @@ class MySalaryView extends Component {
|
||||||
handleGoFeedback = () => {
|
handleGoFeedback = () => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: getLabel(131329, "信息确认"),
|
title: getLabel(131329, "信息确认"),
|
||||||
content: getLabel(544271, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
content: getLabel(544271, "确认是否发起反馈流程?"),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
||||||
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
||||||
|
|
@ -82,7 +85,18 @@ class MySalaryView extends Component {
|
||||||
const { captchaVisible, mySalaryStore } = this.state;
|
const { captchaVisible, mySalaryStore } = this.state;
|
||||||
const { params: { salaryInfoId } } = this.props;
|
const { params: { salaryInfoId } } = this.props;
|
||||||
if (_.isEmpty(mySalaryStore)) {
|
if (_.isEmpty(mySalaryStore)) {
|
||||||
return <div></div>;
|
return <div>
|
||||||
|
<CaptchaModal
|
||||||
|
visible={captchaVisible} id={salaryInfoId}
|
||||||
|
onCancel={() => this.setState({ captchaVisible: false })}
|
||||||
|
onConfirm={() => {
|
||||||
|
this.props.mySalaryStore.setInitEmVerify();
|
||||||
|
this.props.mySalaryStore.getMySalaryBill(Number(salaryInfoId)).then(data => {
|
||||||
|
this.setState({ mySalaryStore: data });
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>;
|
||||||
}
|
}
|
||||||
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
|
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
|
||||||
const salaryProps = {
|
const salaryProps = {
|
||||||
|
|
@ -104,11 +118,6 @@ class MySalaryView extends Component {
|
||||||
</Content>
|
</Content>
|
||||||
</div>
|
</div>
|
||||||
</Authority>
|
</Authority>
|
||||||
<CaptchaModal
|
|
||||||
visible={captchaVisible} id={salaryInfoId}
|
|
||||||
onCancel={() => this.setState({ captchaVisible: false })}
|
|
||||||
onConfirm={() => mySalaryStore.setInitEmVerify()}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -123,8 +132,8 @@ export const ConfirmBtns = (props) => {
|
||||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
props.showFeedback === "1" &&
|
((props.showFeedback === "1" && !isPhone) || (props.showFeedback === "1" && isEm)) &&
|
||||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||||
}
|
}
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
@ -31,6 +31,7 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
this.setState({ store: { ...this.state.store, loading: true } });
|
||||||
const { data: sysinfo } = await API.sysinfo();
|
const { data: sysinfo } = await API.sysinfo();
|
||||||
const { adjustShowStatus, salaryShowStatus } = sysinfo;
|
const { adjustShowStatus, salaryShowStatus } = sysinfo;
|
||||||
let tabs = [
|
let tabs = [
|
||||||
|
|
@ -39,7 +40,7 @@ class Index extends Component {
|
||||||
];
|
];
|
||||||
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
|
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
|
||||||
adjustShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "2"));
|
adjustShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "2"));
|
||||||
this.setState({ sysinfo, tabs }, () => {
|
this.setState({ sysinfo, tabs, store: { ...this.state.store, loading: false } }, () => {
|
||||||
const { tabs, store } = this.state;
|
const { tabs, store } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",
|
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,10 @@ class PayrollPartTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.visible !== this.props.visible) {
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.sendRangeList(nextProps);
|
||||||
nextProps.visible && this.sendRangeList(nextProps);
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||||
this.setState({ selectedRowKeys: [] });
|
selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
sendRangeList = (props) => {
|
sendRangeList = (props) => {
|
||||||
|
|
@ -52,9 +52,9 @@ class PayrollPartTable extends Component {
|
||||||
sendRangeList(payload).then(({ status, data }) => {
|
sendRangeList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: { ...loading, query: false } });
|
this.setState({ loading: { ...loading, query: false } });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { pageNum: current, pageSize, total, columns, list: dataSource } = data;
|
const { pageNum: current, total, columns, list: dataSource } = data;
|
||||||
this.setState({
|
this.setState({
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
pageInfo: { ...pageInfo, current, total },
|
||||||
dataSource: _.map(dataSource, it => ({
|
dataSource: _.map(dataSource, it => ({
|
||||||
...it,
|
...it,
|
||||||
includeObj: _.map(it.includeObj, child => child.targetName || child.targetTypeName).join(","),
|
includeObj: _.map(it.includeObj, child => child.targetName || child.targetTypeName).join(","),
|
||||||
|
|
@ -125,8 +125,7 @@ class PayrollPartTable extends Component {
|
||||||
onChange: current => {
|
onChange: current => {
|
||||||
this.setState({
|
this.setState({
|
||||||
pageInfo: { ...pageInfo, current }
|
pageInfo: { ...pageInfo, current }
|
||||||
}, () => {
|
}, () => this.sendRangeList({ grantType, salarySendId }));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,8 @@
|
||||||
|
|
||||||
.ph-switch {
|
.ph-switch {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0 auto;
|
display: flex;
|
||||||
text-align: center;
|
justify-content: center;
|
||||||
|
|
||||||
.active, .phs-btn:hover {
|
.active, .phs-btn:hover {
|
||||||
background-color: rgba(0, 0, 0, .15);
|
background-color: rgba(0, 0, 0, .15);
|
||||||
|
|
@ -184,8 +184,9 @@
|
||||||
.phs-btn {
|
.phs-btn {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
min-width: 88px;
|
min-width: 88px;
|
||||||
line-height: 50px;
|
display: flex;
|
||||||
display: inline-block;
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ export const salaryFilesConditions = [
|
||||||
domkey: ["position"],
|
domkey: ["position"],
|
||||||
fieldcol: 14,
|
fieldcol: 14,
|
||||||
label: "岗位",
|
label: "岗位",
|
||||||
lanId: 6086,
|
lanId: 111,
|
||||||
labelcol: 10,
|
labelcol: 10,
|
||||||
value: "",
|
value: "",
|
||||||
viewAttr: 1
|
viewAttr: 1
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class Index extends Component {
|
||||||
} = payrollTempForm.getFormParams(),
|
} = payrollTempForm.getFormParams(),
|
||||||
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
|
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
|
||||||
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
|
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
|
||||||
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== 1) {
|
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== "1") {
|
||||||
message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
|
message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -445,7 +445,9 @@ export const MonthRangePicker = (props) => {
|
||||||
<WeaDatePicker
|
<WeaDatePicker
|
||||||
value={startDate} disabled={disabled}
|
value={startDate} disabled={disabled}
|
||||||
disabledDate={(current) => {
|
disabledDate={(current) => {
|
||||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
// 20251212前版本(问题时不能选到当月)
|
||||||
|
// return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||||
|
return current && endDate && moment(`${new Date(current.getTime()).getFullYear()}-${new Date(current.getTime()).getMonth() + 1}`).isAfter(moment(endDate));
|
||||||
}}
|
}}
|
||||||
format="YYYY-MM"
|
format="YYYY-MM"
|
||||||
onChange={(val) => onChange([val, endDate])}
|
onChange={(val) => onChange([val, endDate])}
|
||||||
|
|
@ -507,4 +509,4 @@ export const getSalaryMonthValue = (dateType) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return [start, end];
|
return [start, end];
|
||||||
};
|
};
|
||||||
|
|
@ -30,7 +30,7 @@ class SalaryItemForm extends Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { salaryItemFieldsList } = this.state;
|
const { salaryItemFieldsList } = this.state;
|
||||||
const { request, editable, record, isAdd = false, taxAgentAdminOption, isLedger = false } = this.props;
|
const { request, editable, record, isAdd = false, taxAgentAdminOption, isLedger = false } = this.props;
|
||||||
const { systemType = "", sharedType, valueType, useInEmployeeSalary, dataType } = request;
|
const { systemType = "", sharedType, valueType, useInEmployeeSalary, dataType, pattern } = request;
|
||||||
this.setState({
|
this.setState({
|
||||||
salaryItemFieldsList: _.map(salaryItemFieldsList, item => {
|
salaryItemFieldsList: _.map(salaryItemFieldsList, item => {
|
||||||
const { key } = item;
|
const { key } = item;
|
||||||
|
|
@ -87,6 +87,7 @@ class SalaryItemForm extends Component {
|
||||||
case "defaultValue":
|
case "defaultValue":
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
precision: pattern ? pattern : item.precision,
|
||||||
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
||||||
display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0,
|
display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0,
|
||||||
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
|
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@ export const socialAccountConditions = [
|
||||||
lanId: 537996,
|
lanId: 537996,
|
||||||
labelcol: 6,
|
labelcol: 6,
|
||||||
options: [],
|
options: [],
|
||||||
|
otherParams: {
|
||||||
|
showSearch: true, optionFilterProp: "children"
|
||||||
|
},
|
||||||
rules: "required|string",
|
rules: "required|string",
|
||||||
viewAttr: 3
|
viewAttr: 3
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ class StandingBook extends Component {
|
||||||
})} onOk={this.handleAccount}
|
})} onOk={this.handleAccount}
|
||||||
/>
|
/>
|
||||||
{/*操作日志*/}
|
{/*操作日志*/}
|
||||||
<LogDialog visible={logDialogVisible} logFunction="siAccount" filterConditions={filterConditions}
|
<LogDialog visible={logDialogVisible} logFunction="siaccount" filterConditions={filterConditions}
|
||||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||||
{/*核算进度条*/}
|
{/*核算进度条*/}
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,12 @@ class WelfareAdvanceSearchPannel extends Component {
|
||||||
viewAttr: 2
|
viewAttr: 2
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} else if (getKey(o) === "siSchemeId" || getKey(o) === "fundSchemeId" || getKey(o) === "otherSchemeId" || getKey(o) === "taxAgentId") {
|
||||||
|
return {
|
||||||
|
...o, otherParams: {
|
||||||
|
showSearch: true, optionFilterProp: "children"
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return { ...o };
|
return { ...o };
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,10 @@ class Index extends Component {
|
||||||
return {
|
return {
|
||||||
...g, label: getLabel(g.lanId, g.label),
|
...g, label: getLabel(g.lanId, g.label),
|
||||||
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : g.viewAttr,
|
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : g.viewAttr,
|
||||||
options: _.find(props[`${o.title}Items`], j => j.domkey[0] === key).options
|
options: _.find(props[`${o.title}Items`], j => j.domkey[0] === key).options,
|
||||||
|
otherParams: {
|
||||||
|
showSearch: true, optionFilterProp: "children"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} else if (getKey(g).indexOf("StartTime") !== -1) {
|
} else if (getKey(g).indexOf("StartTime") !== -1) {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ class Index extends Component {
|
||||||
{/*基数调整记录*/}
|
{/*基数调整记录*/}
|
||||||
<RecordDialog visible={recordDialogVisible} onCancel={() => this.setState({ recordDialogVisible: false })}/>
|
<RecordDialog visible={recordDialogVisible} onCancel={() => this.setState({ recordDialogVisible: false })}/>
|
||||||
{/*操作日志*/}
|
{/*操作日志*/}
|
||||||
<LogDialog visible={logDialogVisible} logFunction="siArchives" filterConditions={filterConditions}
|
<LogDialog visible={logDialogVisible} logFunction="siarchives" filterConditions={filterConditions}
|
||||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||||
{/* 导入*/}
|
{/* 导入*/}
|
||||||
<WelfareArchivesImportDialog {...welfareImpDialog}
|
<WelfareArchivesImportDialog {...welfareImpDialog}
|
||||||
|
|
|
||||||
|
|
@ -143,3 +143,7 @@ export const getIframeParentHeight = (selector, total, extraHeight) => {
|
||||||
}
|
}
|
||||||
return height;
|
return height;
|
||||||
};
|
};
|
||||||
|
export const removeElementById = (id) => {
|
||||||
|
const element = document.getElementById(id);
|
||||||
|
if (element) element.remove();
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue