Compare commits
63 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
8cac1cfedf | |
|
|
11ac14d440 | |
|
|
4a3c9311bf | |
|
|
372d9d53ee | |
|
|
9efeb109e9 | |
|
|
c00d3f446d | |
|
|
92c966310c | |
|
|
27f9da9aa9 | |
|
|
7f4e47b5bd | |
|
|
b0d60afc11 | |
|
|
40d84b30fd | |
|
|
efb5af1b10 | |
|
|
61ff174303 | |
|
|
915e946c3e | |
|
|
ff1da8b19b | |
|
|
9cda9aa414 | |
|
|
000e8acdaf | |
|
|
5ef2c5ecb4 | |
|
|
5da8661bbd | |
|
|
5f80e9e6b3 | |
|
|
2b39980ed0 | |
|
|
2321266533 | |
|
|
32162c9cba | |
|
|
3d8b242889 | |
|
|
9121309221 | |
|
|
2871043810 | |
|
|
f3e2d878d0 | |
|
|
8eadce0ce3 | |
|
|
0ec1cd1cb1 | |
|
|
2b8892f798 | |
|
|
c356c4f0db | |
|
|
b0e7cbfc41 | |
|
|
dc80b9c0b7 | |
|
|
2b639ad388 | |
|
|
693c436d4a | |
|
|
07c40750da | |
|
|
a4c08b937b | |
|
|
9e26192aa2 | |
|
|
2e832e3aa9 | |
|
|
d540698c57 | |
|
|
82322ade91 | |
|
|
abbf593c99 | |
|
|
0d766a1513 | |
|
|
40c7a4f7a0 | |
|
|
fad6c3a2b1 | |
|
|
04b3415353 | |
|
|
6201978987 | |
|
|
e539f7b040 | |
|
|
334a7660a9 | |
|
|
e9d301927f | |
|
|
dee1059ca7 | |
|
|
4ecde5921e | |
|
|
5c02dc876c | |
|
|
4ca0a4b756 | |
|
|
9a50947d8a | |
|
|
d652b2cdc6 | |
|
|
0b081877f4 | |
|
|
cafe21b3fe | |
|
|
51ac08d6fc | |
|
|
ae7785ff6e | |
|
|
cd0706fe23 | |
|
|
babbf88c15 | |
|
|
83607e1c0d |
|
|
@ -202,12 +202,21 @@ export const salaryBillSendSum = (params) => {
|
|||
return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params);
|
||||
};
|
||||
//工资单发放-发送短信验证码
|
||||
export const sendMobileCode = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params);
|
||||
export const sendMobileCode = (params, header = {}) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params, header);
|
||||
};
|
||||
//工资单发放-发送短信验证码
|
||||
export const checkMobileCode = (params, header = {}) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/checkMobileCode", params, header);
|
||||
};
|
||||
//工资单-验证方式
|
||||
export const payrollCheckType = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
||||
export const payrollCheckType = async header => {
|
||||
const res = await fetch(`/api/bs/hrmsalary/salaryBill/payrollCheckType`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: { "Content-Type": "application/json", ...header }
|
||||
});
|
||||
return await res.json();
|
||||
};
|
||||
//工资单-反馈验证
|
||||
export const feedBackSalaryBill = async params => {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class AssociativeSearchMult extends Component {
|
|||
}
|
||||
let options = data.map(d => <Option key={d.id} title={d.name}>{d.name}</Option>);
|
||||
!tags && selectedValues && selectedValues.map((v) => {
|
||||
v && options.unshift(<Option key={v} title={datas[v].name}>{datas[v].name}</Option>);
|
||||
v && datas[v] && options.unshift(<Option key={v} title={datas[v].name}>{datas[v].name}</Option>);
|
||||
});
|
||||
const select = <Select
|
||||
{...this.props}
|
||||
|
|
|
|||
|
|
@ -91,11 +91,11 @@ class CustomBrowserDialog extends Component {
|
|||
this.props.onCancel && this.props.onCancel();
|
||||
};
|
||||
getItemById = (id) => {
|
||||
const { listDatas } = this.state;
|
||||
const { listDatas } = this.state, dataSource = [...listDatas, ..._.values(this.props.datas)];
|
||||
if (this.selectedData[id]) return this.selectedData[id];
|
||||
if (!_.isEmpty(listDatas)) {
|
||||
for (let i = 0; i < listDatas.length; i++) {
|
||||
if (String(id) === String(listDatas[i].id)) return listDatas[i];
|
||||
if (!_.isEmpty(dataSource)) {
|
||||
for (let i = 0; i < dataSource.length; i++) {
|
||||
if (String(id) === String(dataSource[i].id)) return dataSource[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
* 自定义多选下拉框
|
||||
* 支持搜索
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/9/13
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaInput, WeaLocaleProvider, WeaNewScroll } from "ecCom";
|
||||
import classNames from "classnames";
|
||||
import { Dropdown } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
visible: false, value: props.value ? props.value.split(",") : [],
|
||||
keywords: ""
|
||||
};
|
||||
}
|
||||
|
||||
isAllChecked = () => {
|
||||
const { options } = this.props, { value, keywords } = this.state;
|
||||
let v = "0";
|
||||
if (_.uniq(value).length === options.filter(k => k.showname.indexOf(keywords) >= 0).length) v = "1";
|
||||
return v;
|
||||
};
|
||||
|
||||
isChecked = (v) => {
|
||||
const { value } = this.state;
|
||||
return value.indexOf(v) > -1 ? "1" : "0";
|
||||
};
|
||||
onAllChange = (v) => {
|
||||
const { options, onChange } = this.props, { keywords } = this.state;
|
||||
let values = [], shownames = [];
|
||||
if (v == 1) {
|
||||
options.filter(k => k.showname.indexOf(keywords) >= 0).forEach(o => {
|
||||
values.push(o.key);
|
||||
shownames.push(o.showname);
|
||||
});
|
||||
}
|
||||
this.setState({ value: values });
|
||||
onChange && onChange(values.join(","), shownames.join(","));
|
||||
};
|
||||
|
||||
onItemChange = (v, id) => {
|
||||
const { onChange, options } = this.props, { value } = this.state;
|
||||
let values = !_.isEmpty(value) ? value : [], shownames = [];
|
||||
if (v == "1") {
|
||||
values.push(id);
|
||||
} else {
|
||||
values = values.filter(val => val !== id);
|
||||
}
|
||||
values.forEach(val => {
|
||||
let target = options.filter((data) => data.key == val)[0];
|
||||
if (target) shownames.push(target.showname);
|
||||
});
|
||||
this.setState({ value: values });
|
||||
onChange && onChange(values.join(","), shownames.join(","));
|
||||
};
|
||||
|
||||
getList = () => {
|
||||
const { options } = this.props, { keywords } = this.state;
|
||||
let style = {};
|
||||
if (options.length > 5) style = { height: 200 };
|
||||
return <div className="wea-select-panel" style={style}>
|
||||
<WeaNewScroll className="wea-select-scroll" height="100%">
|
||||
<div className="wea-select-panel-item">
|
||||
<WeaInput value={keywords} onChange={keywords => this.setState({ keywords })}/>
|
||||
</div>
|
||||
<div className="wea-select-panel-item">
|
||||
<WeaCheckbox
|
||||
content={"全选"}
|
||||
value={this.isAllChecked()}
|
||||
onChange={this.onAllChange}
|
||||
>
|
||||
</WeaCheckbox>
|
||||
</div>
|
||||
{options && options.filter(k => k.showname.indexOf(keywords) >= 0).map(o => {
|
||||
return <div className="wea-select-panel-item">
|
||||
<WeaCheckbox
|
||||
content={o.showname}
|
||||
value={this.isChecked(o.key)}
|
||||
onChange={(v) => this.onItemChange(v, o.key)}
|
||||
>
|
||||
</WeaCheckbox>
|
||||
</div>;
|
||||
})}
|
||||
</WeaNewScroll>
|
||||
</div>;
|
||||
};
|
||||
|
||||
getShownames = () => {
|
||||
const { options } = this.props;
|
||||
let { value } = this.state;
|
||||
let shownames = [];
|
||||
value.forEach(val => {
|
||||
let target = options.filter((data) => data.key == val)[0];
|
||||
if (target) shownames.push(target.showname);
|
||||
});
|
||||
return shownames.join(",");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { visible } = this.state, { layout } = this.props;
|
||||
const clsname = classNames({
|
||||
"wea-associative-search-mult": true
|
||||
});
|
||||
return (<div className={`customMuiSelect wea-associative-search ${clsname}`} ref="customSelectMui">
|
||||
<Dropdown trigger={["click"]} overlay={this.getList()}
|
||||
onVisibleChange={visible => this.setState({ visible })} visible={visible}
|
||||
getPopupContainer={() => (layout || document.body)}>
|
||||
<div className="wea-select-input wdb cursor-pointer" ref="selectInput">
|
||||
<span className="wdb">{this.getShownames()}</span>
|
||||
{!this.state.visible ? <i className="icon-coms-down2 arrow"/> : <i className="icon-coms-up2 arrow"/>}
|
||||
</div>
|
||||
</Dropdown>
|
||||
</div>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
.customMuiSelect {
|
||||
border: none;
|
||||
padding: 0;
|
||||
|
||||
.wea-select-input {
|
||||
min-width: 100px;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
padding: 4px 17px 4px 4px;
|
||||
position: relative;
|
||||
min-height: 30px;
|
||||
border: 1px solid #d9d9d9;
|
||||
user-select: none;
|
||||
height: 30px;
|
||||
white-space: nowrap;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
|
||||
.wdb {
|
||||
word-break: break-all !important;
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover, &:focus {
|
||||
border-color: #57c5f7;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 8px;
|
||||
color: #979797;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.wea-select-panel {
|
||||
padding: 5px 0;
|
||||
max-height: 200px;
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
|
||||
.wea-select-panel-item {
|
||||
padding: 5px 10px;
|
||||
|
||||
&:hover {
|
||||
background-color: #e9f7ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,88 +6,122 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { sendMobileCode } from "../../apis/payroll";
|
||||
import { Button } from "antd";
|
||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||
import { checkMobileCode, sendMobileCode } from "../../apis/payroll";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import FormInfo from "../FormInfo";
|
||||
import { captchaCondition } from "../../pages/mobilePayroll/pwdCondtion";
|
||||
import MobileModal from "../../pages/mobilePayroll/mobileModal";
|
||||
import { Button, message } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
const form = new WeaForm();
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
captcha: "",
|
||||
time: 60
|
||||
};
|
||||
this.state = { captcha: "", time: 60, loading: false };
|
||||
this.timeRef = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
form.initFormFields(captchaCondition);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
clearInterval(this.timeRef);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
clearInterval(this.timeRef);
|
||||
this.setState({ captcha: "", time: 60 });
|
||||
}
|
||||
this.setState({ captcha: "", time: 60, loading: false });
|
||||
}
|
||||
|
||||
handleSendCaptcha = () => {
|
||||
sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
|
||||
this.setState({ loading: true });
|
||||
sendMobileCode({ id: this.props.id }, this.props.salaryBillToken).then(({ status }) => {
|
||||
if (status) {
|
||||
this.timeRef = setInterval(() => {
|
||||
const { time } = this.state;
|
||||
this.setState({ time: time - 1 }, () => {
|
||||
if (this.state.time === -1) {
|
||||
clearInterval(this.timeRef);
|
||||
this.setState({ time: 60 });
|
||||
this.setState({ time: 60, loading: false });
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
this.setState({ loading: false });
|
||||
}
|
||||
});
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleConfirm = () => {
|
||||
if (!this.state.captcha) {
|
||||
handleConfirm = async () => {
|
||||
const type = getQueryString("type"), f = await form.validateForm();
|
||||
if (!this.state.captcha && type !== "phone") {
|
||||
this.refs.weaError.showError();
|
||||
// return
|
||||
return;
|
||||
} else if (!f.isValid && type === "phone") {
|
||||
f.showErrors();
|
||||
return;
|
||||
}
|
||||
this.props.onCancel();
|
||||
this.props.onConfirm();
|
||||
checkMobileCode({ id: this.props.id, mobileCode: this.state.captcha }, this.props.salaryBillToken)
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
this.props.onCancel();
|
||||
this.props.onConfirm();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { captcha, time } = this.state;
|
||||
return (
|
||||
<WeaDialog
|
||||
initLoadCss {...this.props} style={{ width: 550 }}
|
||||
className="captchaWrapper" title={getLabel(111, "验证码验证")}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.handleConfirm}>{getLabel(826, "确定")}</Button>
|
||||
]}
|
||||
>
|
||||
<WeaSearchGroup needTigger={false} title="" showGroup>
|
||||
<WeaFormItem
|
||||
label={getLabel(111, "验证码")}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
>
|
||||
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(826, "验证码未填写")}>
|
||||
<div className="captchaInputBox">
|
||||
<WeaInput value={captcha} onChange={captcha => this.setState({ captcha })}/>
|
||||
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}>
|
||||
{
|
||||
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
|
||||
}
|
||||
</Button>
|
||||
</div>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
</WeaDialog>
|
||||
const { captcha, time, loading } = this.state, type = getQueryString("type");
|
||||
const itemRender = {
|
||||
mobileCode: (field, textAreaProps, form, formParams) => {
|
||||
return (<div className="captchaInputBox">
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
|
||||
onChange={() => this.setState({ captcha: form.getFormParams().mobileCode })}/>
|
||||
<Button type="primary" onClick={this.handleSendCaptcha} disabled={loading}>
|
||||
{
|
||||
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
|
||||
}
|
||||
</Button>
|
||||
</div>);
|
||||
}
|
||||
};
|
||||
return (<React.Fragment>
|
||||
{
|
||||
type === "phone" ? <MobileModal title={getLabel(111, "验证码验证")} onConfirm={this.handleConfirm}>
|
||||
<FormInfo center={false} itemRender={itemRender} form={form} formFields={captchaCondition}/>
|
||||
</MobileModal> :
|
||||
<WeaDialog
|
||||
initLoadCss {...this.props} style={{ width: 550 }}
|
||||
className="captchaWrapper" title={getLabel(111, "验证码验证")}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.handleConfirm}>{getLabel(826, "确定")}</Button>
|
||||
]}
|
||||
>
|
||||
<WeaSearchGroup needTigger={false} title="" showGroup>
|
||||
<WeaFormItem
|
||||
label={getLabel(111, "验证码")}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
>
|
||||
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(111, "验证码未填写")}>
|
||||
<div className="captchaInputBox">
|
||||
<WeaInput value={captcha} onChange={captcha => this.setState({ captcha })}/>
|
||||
<Button type="primary" onClick={this.handleSendCaptcha} disabled={loading}>
|
||||
{
|
||||
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
|
||||
}
|
||||
</Button>
|
||||
</div>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
</WeaDialog>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index;
|
||||
|
|
@ -5,25 +5,25 @@
|
|||
.wea-form-item-wrapper {
|
||||
.wea-error {
|
||||
width: 100%;
|
||||
|
||||
.captchaInputBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.wea-input-normal {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 8px 10px;
|
||||
border-radius: 0;
|
||||
min-width: 80px;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
line-height: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.captchaInputBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.wea-input-normal {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 8px 10px;
|
||||
border-radius: 0;
|
||||
min-width: 80px;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
line-height: 15px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class Index extends Component {
|
|||
if (o.dataIndex === "username") {
|
||||
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, "操作"),
|
||||
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({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
|
||||
columns: _.map(columns, (it, idx) => ({
|
||||
dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true,
|
||||
dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true, showSee: false,
|
||||
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : (it.width || it.oldWidth),
|
||||
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||
ellipsis: true
|
||||
|
|
|
|||
|
|
@ -125,17 +125,18 @@ class EditCalcTable extends Component {
|
|||
}, 500);
|
||||
});
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -341,4 +342,4 @@ const traverse = (arr, calcDetail) => {
|
|||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
@ -43,7 +43,7 @@ class EditSalaryCalcSlide extends Component {
|
|||
});
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { loading } = this.state, { viewAttr } = this.props;
|
||||
const { loading, itemsByGroup } = this.state, { viewAttr } = this.props;
|
||||
return <div className="titleDialog">
|
||||
<div className="titleCol titleLeftBox">
|
||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||
|
|
@ -52,7 +52,7 @@ class EditSalaryCalcSlide extends Component {
|
|||
<div className="titleCol titleRightBox">
|
||||
{
|
||||
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>;
|
||||
|
|
|
|||
|
|
@ -239,6 +239,8 @@
|
|||
position: relative;
|
||||
margin-top: 10px;
|
||||
transition: margin-top .3s;
|
||||
max-height: 80vh;
|
||||
overflow: auto;
|
||||
|
||||
.anchor-list-ink {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
* Date: 2023/3/7
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { viewAttendQuote } from "../../../../apis/attendance";
|
||||
import { Button, Spin } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -16,11 +16,31 @@ class AttendanceDataViewSlide extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
loading: { query: false }, keyword: "", dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "turn") {
|
||||
switch (id) {
|
||||
case "PAGEINFO":
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.viewAttendQuote());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
||||
|
|
@ -33,19 +53,29 @@ class AttendanceDataViewSlide extends Component {
|
|||
|
||||
viewAttendQuote = (extraPayload = {}, props) => {
|
||||
const { loading, pageInfo, keyword } = this.state;
|
||||
const { attendQuoteId } = props;
|
||||
const { attendQuoteId } = props || this.props;
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null }))
|
||||
});
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||
}, () => this.postMessageToChild({
|
||||
pageInfo: this.state.pageInfo, dataSource, showRowSelection: false, unitTableType: "attendanceView",
|
||||
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : false }))
|
||||
}));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
|
||||
"条": getLabel(18256, "条")
|
||||
};
|
||||
const childFrameObj = document.getElementById("attendanceViewTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
handleExportAttendQuote = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
|
|
@ -60,24 +90,7 @@ class AttendanceDataViewSlide extends Component {
|
|||
|
||||
render() {
|
||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.viewAttendQuote({}, this.props));
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.viewAttendQuote({}, this.props));
|
||||
}
|
||||
};
|
||||
const { loading, keyword } = this.state;
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||
<WeaInputSearch
|
||||
|
|
@ -100,9 +113,16 @@ class AttendanceDataViewSlide extends Component {
|
|||
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/>
|
||||
<div style={{ height: `calc(100% - 40px)` }}>
|
||||
<Spin spinning={loading.query}>
|
||||
<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>
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@
|
|||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,9 +73,14 @@ class CustomTreeSelect extends Component {
|
|||
const { itemName } = detail;
|
||||
return (
|
||||
<TreeSelect dropdownStyle={{ maxHeight: 320, overflow: "auto" }} defaultValue={itemName}
|
||||
dropdownMatchSelectWidth className="custom_item_treeselect"
|
||||
dropdownMatchSelectWidth className="custom_item_treeselect" showSearch
|
||||
loadData={(node) => this.getSourceItem(node.props.value)}
|
||||
onSelect={this.handleSelect}>
|
||||
onSelect={this.handleSelect}
|
||||
treeNodeFilterProp="title"
|
||||
filterTreeNode={(inputValue, treeNode) => {
|
||||
const title = treeNode.props.title.props ? treeNode.props.title.props.children[0].props.children : treeNode.props.title;
|
||||
return title.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0;
|
||||
}}>
|
||||
{
|
||||
_.map(sourceList, o => (
|
||||
<TreeNode title={o.value} key={o.key} value={o.key} isLeaf={o.isLeaf} selectable={false}>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu, message, Modal } from "antd";
|
||||
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -35,18 +35,19 @@ class Index extends Component {
|
|||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
||||
});
|
||||
};
|
||||
getDeclareList = (props) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { queryParams } = props;
|
||||
getDeclareList = async (props) => {
|
||||
const { data: sysData } = await sysinfo();
|
||||
const { pageInfo } = this.state, { queryParams } = props;
|
||||
const { dateRange, ...extra } = queryParams;
|
||||
const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
|
||||
const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
|
||||
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
|
||||
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
|
||||
const payload = { ...pageInfo, ...params };
|
||||
this.setState({ loading: true });
|
||||
getDeclareList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum, pageSize, total } = data;
|
||||
let { columns, list: dataSource, pageNum, pageSize, total } = data;
|
||||
sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth"));
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||
columns: _.map(columns, o => {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import React from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { sysinfo } from "../../apis/ruleconfig";
|
||||
import * as API from "../../apis/declare";
|
||||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
|
|
@ -14,15 +15,21 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
loading: false, dataSource: [], columns: [], declareInfo: {},
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getDetailList();
|
||||
this.getDeclareInfo();
|
||||
this.getSysinfo();
|
||||
}
|
||||
|
||||
getSysinfo = () => {
|
||||
sysinfo().then(({ status, data: sysinfo }) => {
|
||||
if (status) this.setState({ sysinfo });
|
||||
});
|
||||
};
|
||||
getDetailList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const payload = {
|
||||
|
|
@ -64,18 +71,19 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
window.open(url, "_self");
|
||||
};
|
||||
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>
|
||||
<span>{getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}</span>
|
||||
<span>{title}:{declareInfo.salaryMonth}</span>
|
||||
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
||||
</React.Fragment>);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, pageInfo, columns, dataSource } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const buttons = showOperateBtn ? [<Button type="primary"
|
||||
onClick={this.handleExport}>{getLabel(111, "导出全部")}</Button>] : [];
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const buttons = !!PageAndOptAuth.opts.length ? [<Button type="primary"
|
||||
onClick={this.handleExport}>{getLabel(111, "导出全部")}</Button>] : [];
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* pc端工资单查看启用二次验证弹框
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/15
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||
import { Button, message } from "antd";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import LoginVerifyPC from "./loginVerifyPC";
|
||||
import SecondarypwdVerifyPC from "./secondarypwdVerifyPC";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
class CheckSecondaryVerifyDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, conditions: [], notSetting: false, loginVerify: false, secondaryVerify: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm();
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) form.resetForm();
|
||||
}
|
||||
|
||||
initForm = () => {
|
||||
const { salaryBillToken } = this.props;
|
||||
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, salaryBillToken)
|
||||
.then(({ conditions, notSetting }) => {
|
||||
this.setState({ conditions: [{ title: "", items: conditions }], notSetting }, () => {
|
||||
form.initFormFields(this.state.conditions);
|
||||
});
|
||||
});
|
||||
};
|
||||
save = () => {
|
||||
const { salaryBillToken } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = { ...form.getFormParams() };
|
||||
API.doSecondAuth({ ...payload, mouldCode: "HRM", itemCode: "SALARY" }, salaryBillToken)
|
||||
.then(({ status, checkStatus, checkMsg }) => {
|
||||
if (status && checkStatus === "1") {
|
||||
message.success(checkMsg);
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(checkMsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
conditions, loading, notSetting, loginVerify, secondaryVerify
|
||||
} = this.state, { salaryBillToken } = this.props;
|
||||
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.setState({ loginVerify: true })}>{getLabel("30747", "设置")}</a>
|
||||
</div>
|
||||
}
|
||||
</React.Fragment>);
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 550, height: notSetting ? 80 + 26 : 80 }} initLoadCss
|
||||
title={getLabel(111, "身份验证")} buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "确认")}</Button>
|
||||
]}>
|
||||
<div className="form-dialog-layout">
|
||||
<FormInfo className="form-dialog-layout" center={false} itemRender={itemRender}
|
||||
form={form} formFields={conditions}/>
|
||||
</div>
|
||||
{/*登录密码验证弹框*/}
|
||||
<LoginVerifyPC salaryBillToken={salaryBillToken} visible={loginVerify}
|
||||
onCancel={() => this.setState({ loginVerify: false })}
|
||||
onSetPwdSet={() => this.setState({ secondaryVerify: true })}/>
|
||||
{/*二次密码设置*/}
|
||||
<SecondarypwdVerifyPC salaryBillToken={salaryBillToken} visible={secondaryVerify}
|
||||
onCancel={() => this.setState({ secondaryVerify: false })}
|
||||
onSuccess={this.initForm}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CheckSecondaryVerifyDialog;
|
||||
|
||||
|
|
@ -16,18 +16,22 @@ import MobileTemplate from "../../components/mobileTemplate";
|
|||
import SecondaryVerify from "./secondaryVerify";
|
||||
import LoginVerify from "./loginVerify";
|
||||
import SecondarypwdVerify from "./secondarypwdVerify";
|
||||
import CheckSecondaryVerifyDialog from "./checkSecondaryVerifyDialog";
|
||||
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 = {
|
||||
visible: false, captchaVisible: false, loginVisible: false, pwdSetVisible: false,
|
||||
mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] },
|
||||
salaryBillToken: {}
|
||||
salaryBillToken: {},
|
||||
// 统一二次验证
|
||||
checkSecVerify: false
|
||||
};
|
||||
this.id = "";
|
||||
}
|
||||
|
|
@ -37,17 +41,37 @@ export default class MobilePayroll extends React.Component {
|
|||
this.id = getQueryString("id");
|
||||
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
|
||||
setMySalaryBill({});
|
||||
if (type !== "phone") {
|
||||
const { data, status } = await payrollCheckType();
|
||||
if (status && data === "PWD") {
|
||||
init(false, () => this.getMySalaryBill(this.id));
|
||||
} else {
|
||||
this.setState({ captchaVisible: true });
|
||||
}
|
||||
}
|
||||
//统一调用token
|
||||
type !== "phone" && await this.initPC();
|
||||
type === "phone" && await this.initMobile();
|
||||
}
|
||||
|
||||
initPC = async () => {
|
||||
const { mySalaryStore: { setInitEmVerify } } = this.props;
|
||||
const params = this.getUrlkey();
|
||||
const { data } = await salaryBillGetToken({
|
||||
id: _.pick(params, ["id"]).id,
|
||||
recipient: _.pick(params, ["recipient"]).recipient,
|
||||
salaryCode: _.pick(params, ["salaryCode"]).salaryCode
|
||||
});
|
||||
this.setState({ salaryBillToken: data }, () => {
|
||||
payrollCheckType(this.state.salaryBillToken).then(({ data, status }) => {
|
||||
if (status && data === "PWD") {
|
||||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||
.then(({ status, isNeedSecondAuth }) => {
|
||||
if (status && isNeedSecondAuth) {
|
||||
this.setState({ checkSecVerify: true });
|
||||
} else {
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
setInitEmVerify();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({ captchaVisible: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
initMobile = async () => {
|
||||
const { mySalaryStore: { setInitEmVerify } } = this.props;
|
||||
if (window.em) {
|
||||
|
|
@ -68,15 +92,21 @@ export default class MobilePayroll extends React.Component {
|
|||
salaryCode: _.pick(params, ["salaryCode"]).salaryCode
|
||||
});
|
||||
this.setState({ salaryBillToken: data }, () => {
|
||||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||
.then(({ status, isNeedSecondAuth }) => {
|
||||
if (status && isNeedSecondAuth) {
|
||||
this.setState({ visible: true });
|
||||
} else {
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
setInitEmVerify();
|
||||
}
|
||||
});
|
||||
payrollCheckType(this.state.salaryBillToken).then(({ data, status }) => {
|
||||
if (status && data === "PWD") {
|
||||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||
.then(({ status, isNeedSecondAuth }) => {
|
||||
if (status && isNeedSecondAuth) {
|
||||
this.setState({ visible: true });
|
||||
} else {
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
setInitEmVerify();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({ captchaVisible: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -119,7 +149,7 @@ export default class MobilePayroll extends React.Component {
|
|||
handleGoFeedback = () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
||||
content: getLabel(111, "确认是否发起反馈流程?"),
|
||||
onOk: () => {
|
||||
const { salaryBillToken } = this.state;
|
||||
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
|
||||
|
|
@ -141,7 +171,7 @@ export default class MobilePayroll extends React.Component {
|
|||
|
||||
render() {
|
||||
const { mySalaryStore: { setInitEmVerify } } = this.props, {
|
||||
captchaVisible, visible, loginVisible, pwdSetVisible
|
||||
captchaVisible, visible, loginVisible, pwdSetVisible, checkSecVerify
|
||||
} = this.state;
|
||||
const type = getQueryString("type");
|
||||
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <React.Fragment>
|
||||
|
|
@ -155,12 +185,24 @@ export default class MobilePayroll extends React.Component {
|
|||
onSetPwdSet={() => this.setState({ loginVisible: false, pwdSetVisible: true })}/>}
|
||||
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
|
||||
{/*统一外部调用token*/}
|
||||
<CheckSecondaryVerifyDialog visible={checkSecVerify} salaryBillToken={this.state.salaryBillToken}
|
||||
onCancel={(callback) => this.setState({ checkSecVerify: false }, () => callback && callback())}
|
||||
onSuccess={() => {
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
setInitEmVerify();
|
||||
}}/>
|
||||
{/*发送验证码*/}
|
||||
<CaptchaModal
|
||||
visible={captchaVisible} id={getQueryString("id")}
|
||||
onCancel={() => this.setState({ captchaVisible: false })}
|
||||
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
||||
/>
|
||||
{
|
||||
captchaVisible && <CaptchaModal
|
||||
visible={captchaVisible} id={getQueryString("id")} salaryBillToken={this.state.salaryBillToken}
|
||||
onCancel={() => this.setState({ captchaVisible: false })}
|
||||
onConfirm={() => {
|
||||
setInitEmVerify();
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</React.Fragment>;
|
||||
const {
|
||||
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback
|
||||
|
|
@ -197,4 +239,4 @@ export default class MobilePayroll extends React.Component {
|
|||
</Authority>}
|
||||
</React.Fragment>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -168,3 +168,13 @@
|
|||
position: relative;
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.secondarypwd-form {
|
||||
.wea-form-cell-wrapper {
|
||||
& > div:last-child {
|
||||
.ant-col-16 {
|
||||
width: 37.5% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 二次验证
|
||||
* 登录密码验证
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/23
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import { Button } from "antd";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { loginCondition } from "./pwdCondtion";
|
||||
import { RSAEcrypt } from "../../util/RSAUtil";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
|
||||
const form = new WeaForm();
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class LoginVerifyPC extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { loading: false };
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
form.initFormFields(loginCondition);
|
||||
} else {
|
||||
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.onCancel();
|
||||
this.props.onSetPwdSet();
|
||||
} else {
|
||||
form.showError("password", getLabel(504343, "登录密码错误"));
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
style={{ width: 550, height: _.reduce(loginCondition, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 }}
|
||||
initLoadCss title={getLabel(111, "请先输入登录密码")} buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "下一步")}</Button>
|
||||
]}>
|
||||
<FormInfo className="form-dialog-layout" center={false} itemRender={{}} form={form}
|
||||
formFields={loginCondition}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LoginVerifyPC;
|
||||
|
|
@ -1,6 +1,25 @@
|
|||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
export const captchaCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["mobileCode"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(111, "验证码"),
|
||||
labelcol: 6,
|
||||
detailtype: 1,
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const loginCondition = [
|
||||
{
|
||||
items: [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* 二次验证密码设置
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/17
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { secondarypwdCondition } from "./conditions";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
import { RSAEcrypt } from "../../util/RSAUtil";
|
||||
|
||||
const form = new WeaForm();
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SecondarypwdVerifyPC 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.onCancel();
|
||||
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 (<WeaDialog
|
||||
{...this.props} style={{
|
||||
width: 550, height: _.reduce(secondarypwdCondition, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33
|
||||
}} initLoadCss title={getLabel(111, "二次验证密码设置")} buttons={[
|
||||
<Button type="primary" onClick={this.save}>{getLabel(111, "保存")}</Button>
|
||||
]}>
|
||||
<FormInfo className="form-dialog-layout secondarypwd-form" center={false} itemRender={itemRender} form={form}
|
||||
formFields={secondarypwdCondition}/>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default SecondarypwdVerifyPC;
|
||||
|
|
@ -14,6 +14,8 @@ import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../a
|
|||
import CaptchaModal from "../../components/captchaModal";
|
||||
import "./index.less";
|
||||
|
||||
const isPhone = /(iPhone|iPad|iPod|iOS|Android)/i.test(window.navigator.userAgent);
|
||||
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("mySalaryStore")
|
||||
|
|
@ -57,7 +59,7 @@ class MySalaryView extends Component {
|
|||
handleGoFeedback = () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(544271, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
||||
content: getLabel(544271, "确认是否发起反馈流程?"),
|
||||
onOk: () => {
|
||||
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
||||
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
||||
|
|
@ -82,7 +84,18 @@ class MySalaryView extends Component {
|
|||
const { captchaVisible, mySalaryStore } = this.state;
|
||||
const { params: { salaryInfoId } } = this.props;
|
||||
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 salaryProps = {
|
||||
|
|
@ -104,11 +117,6 @@ class MySalaryView extends Component {
|
|||
</Content>
|
||||
</div>
|
||||
</Authority>
|
||||
<CaptchaModal
|
||||
visible={captchaVisible} id={salaryInfoId}
|
||||
onCancel={() => this.setState({ captchaVisible: false })}
|
||||
onConfirm={() => mySalaryStore.setInitEmVerify()}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
@ -123,8 +131,8 @@ export const ConfirmBtns = (props) => {
|
|||
<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>
|
||||
}
|
||||
</div>;
|
||||
};
|
||||
};
|
||||
|
|
@ -31,6 +31,7 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
async componentDidMount() {
|
||||
this.setState({ store: { ...this.state.store, loading: true } });
|
||||
const { data: sysinfo } = await API.sysinfo();
|
||||
const { adjustShowStatus, salaryShowStatus } = sysinfo;
|
||||
let tabs = [
|
||||
|
|
@ -39,7 +40,7 @@ class Index extends Component {
|
|||
];
|
||||
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
|
||||
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;
|
||||
this.setState({
|
||||
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ class PayrollDetail extends Component {
|
|||
|
||||
render() {
|
||||
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const showOperateBtn = PageAndOptAuth.opts.length;
|
||||
const { salaryMonth, template } = salarySendDetailBaseInfo;
|
||||
const dropMenuDatas = [
|
||||
{
|
||||
|
|
@ -110,4 +111,4 @@ class PayrollDetail extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default PayrollDetail;
|
||||
export default PayrollDetail;
|
||||
|
|
@ -53,7 +53,7 @@ class Index extends Component {
|
|||
} = payrollTempForm.getFormParams(),
|
||||
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
|
||||
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
|
||||
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== 1) {
|
||||
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== "1") {
|
||||
message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
|
||||
getTaxAgentSelectList = async (props) => {
|
||||
const [salarySobList, empStatusList] = await Promise.all([
|
||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "QUERY_DATA" }),
|
||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "QUERY_DATA", isShare: props.isShare }),
|
||||
commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })
|
||||
]);
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA", isShare: props.isShare })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
const conditions = _.map(condition, item => {
|
||||
|
|
@ -448,7 +448,9 @@ export const MonthRangePicker = (props) => {
|
|||
<WeaDatePicker
|
||||
value={startDate} disabled={disabled}
|
||||
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"
|
||||
onChange={(val) => onChange([val, endDate])}
|
||||
|
|
@ -510,4 +512,4 @@ export const getSalaryMonthValue = (dateType) => {
|
|||
break;
|
||||
}
|
||||
return [start, end];
|
||||
};
|
||||
};
|
||||
|
|
@ -59,7 +59,6 @@ class PersonalScopeModal extends Component {
|
|||
...scopeSelectLinkageDatas[cur],
|
||||
browserConditionParam: {
|
||||
...scopeSelectLinkageDatas[cur].browserConditionParam,
|
||||
isSingle: true,
|
||||
replaceDatas: !_.isEmpty(record) ? [{
|
||||
id: String(record.targetId),
|
||||
name: record.targetName
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class SalaryItemForm extends Component {
|
|||
componentDidMount() {
|
||||
const { salaryItemFieldsList } = this.state;
|
||||
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({
|
||||
salaryItemFieldsList: _.map(salaryItemFieldsList, item => {
|
||||
const { key } = item;
|
||||
|
|
@ -87,6 +87,7 @@ class SalaryItemForm extends Component {
|
|||
case "defaultValue":
|
||||
return {
|
||||
...item,
|
||||
precision: pattern ? pattern : item.precision,
|
||||
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
||||
display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0,
|
||||
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ export const socialAccountConditions = [
|
|||
lanId: 537996,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
otherParams: {
|
||||
showSearch: true, optionFilterProp: "children"
|
||||
},
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class StandingBook extends Component {
|
|||
})} onOk={this.handleAccount}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="siAccount" filterConditions={filterConditions}
|
||||
<LogDialog visible={logDialogVisible} logFunction="siaccount" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{/*核算进度条*/}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class MakeupDifference extends Component {
|
|||
tmpUrl: "exportSiaccountWelfarebalanceimporttemplatetetemplate",
|
||||
cacheUrl: "cacheBalanceWelfareList",
|
||||
importUrl: "importBalanceInsuranceDetail",
|
||||
importparams: {}
|
||||
importparams: {}, ..._.pick(this.props, ["billMonth", "paymentOrganization"])
|
||||
},
|
||||
returnEditPersonSlide: {
|
||||
title: "", editId: "", visible: false
|
||||
|
|
@ -152,4 +152,4 @@ class MakeupDifference extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default MakeupDifference;
|
||||
export default MakeupDifference;
|
||||
|
|
@ -245,13 +245,19 @@ export default class NormalIndex extends Component {
|
|||
});
|
||||
};
|
||||
handleExport = () => {
|
||||
const { selectedKey } = this.props;
|
||||
const { selectedKey } = this.props, { formParams } = this.state;
|
||||
const { departmentIds, subCompanyIds } = formParams;
|
||||
const urlObj = {
|
||||
"1": "/api/bs/hrmsalary/welfare/common/export",
|
||||
"3": "/api/bs/hrmsalary/welfare/supplementary/export"
|
||||
};
|
||||
const extraParams = {
|
||||
...formParams,
|
||||
departmentIds: departmentIds.join(","),
|
||||
subCompanyIds: subCompanyIds.join(",")
|
||||
};
|
||||
const url = `${window.location
|
||||
.origin}${urlObj[selectedKey]}?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`;
|
||||
.origin}${urlObj[selectedKey]}?${convertToUrlString({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), ...extraParams })}`;
|
||||
window.open(url, "_blank");
|
||||
};
|
||||
handleEditNormalStandingBook = (record) => {
|
||||
|
|
@ -279,12 +285,12 @@ export default class NormalIndex extends Component {
|
|||
<Col span={12}><WeaFormItem label={getLabel(27511, "部门")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
isSingle={false} value={departmentIds.join(",")} type={57}
|
||||
onChange={v => this.setState({ formParams: { ...formParams, departmentIds: v.split(",") } })}/>
|
||||
onChange={v => this.setState({ formParams: { ...formParams, departmentIds: v ? v.split(",") : [] } })}/>
|
||||
</WeaFormItem></Col>
|
||||
<Col span={12}><WeaFormItem label={getLabel(33553, "分部")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
isSingle={false} value={subCompanyIds.join(",")} type={164}
|
||||
onChange={v => this.setState({ formParams: { ...formParams, subCompanyIds: v.split(",") } })}/>
|
||||
onChange={v => this.setState({ formParams: { ...formParams, subCompanyIds: v ? v.split(",") : [] } })}/>
|
||||
</WeaFormItem></Col>
|
||||
</Row>
|
||||
</WeaSearchGroup>;
|
||||
|
|
@ -402,4 +408,4 @@ export default class NormalIndex extends Component {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -88,7 +88,13 @@ class Regression extends Component {
|
|||
});
|
||||
break;
|
||||
case "export":
|
||||
const url = `/api/bs/hrmsalary/welfare/recession/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization", "creator"]))}`;
|
||||
const extraParams = {
|
||||
name,
|
||||
workcode,
|
||||
departmentIds: this.regTopRef.state.departmentIds,
|
||||
subCompanyIds: this.regTopRef.state.subCompanyIds
|
||||
};
|
||||
const url = `/api/bs/hrmsalary/welfare/recession/export?${convertToUrlString({ ..._.pick(this.props, ["billMonth", "paymentOrganization", "creator"]), ...extraParams })}`;
|
||||
window.open(url, "_blank");
|
||||
break;
|
||||
case "search":
|
||||
|
|
@ -152,4 +158,4 @@ class Regression extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Regression;
|
||||
export default Regression;
|
||||
|
|
@ -54,6 +54,12 @@ class WelfareAdvanceSearchPannel extends Component {
|
|||
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 };
|
||||
})
|
||||
|
|
|
|||
|
|
@ -113,7 +113,10 @@ class Index extends Component {
|
|||
return {
|
||||
...g, label: getLabel(g.lanId, g.label),
|
||||
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) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class Index extends Component {
|
|||
{/*基数调整记录*/}
|
||||
<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 })}/>
|
||||
{/* 导入*/}
|
||||
<WelfareArchivesImportDialog {...welfareImpDialog}
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ export const formHeaderPost = (url, method, params, header) => {
|
|||
body: formdata
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const postFetch = (url, params) => {
|
||||
export const postFetch = (url, params, header = {}) => {
|
||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||
params.access_token = localStorage.access_token;
|
||||
}
|
||||
url = server + url + "?__random__=" + (new Date()).valueOf();
|
||||
return fetch(url, getFetchParams("POST", params)).then(res => res.json());
|
||||
return fetch(url, getFetchParams("POST", params, header)).then(res => res.json());
|
||||
};
|
||||
export const headerRequestFetch = (url, method, params, header) => {
|
||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue