产品-工资单验证方式
This commit is contained in:
parent
a80c4a37d5
commit
e9546e5329
|
|
@ -367,6 +367,10 @@ export const getAvailableSalaryItemSet = (params) => {
|
|||
export const salaryBillSendSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params);
|
||||
};
|
||||
//工资单发放-发送短信验证码
|
||||
export const sendMobileCode = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params);
|
||||
};
|
||||
//工资单-验证方式
|
||||
export const payrollCheckType = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { sendMobileCode } from "../../apis/payroll";
|
||||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -35,15 +36,17 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
handleSendCaptcha = () => {
|
||||
this.timeRef = setInterval(() => {
|
||||
const { time } = this.state;
|
||||
this.setState({ time: time - 1 }, () => {
|
||||
if (this.state.time === -1) {
|
||||
clearInterval(this.timeRef);
|
||||
this.setState({ time: 60 });
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
sendMobileCode({ id: this.props.id }).then(({}) => {
|
||||
this.timeRef = setInterval(() => {
|
||||
const { time } = this.state;
|
||||
this.setState({ time: time - 1 }, () => {
|
||||
if (this.state.time === -1) {
|
||||
clearInterval(this.timeRef);
|
||||
this.setState({ time: 60 });
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@ import React from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { DatePicker } from "antd";
|
||||
import { WeaNewScroll, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
import moment from "moment";
|
||||
import PayrollModal from "./payrollModal";
|
||||
import Authority from "./authority";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import CaptchaModal from "../../components/captchaModal";
|
||||
import { payrollCheckType } from "../../apis/payroll";
|
||||
import "./index.less";
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
|
@ -24,19 +22,15 @@ export default class MySalary extends React.Component {
|
|||
selectedKey: "0",
|
||||
salaryBillVisible: false,
|
||||
salaryInfoId: "",
|
||||
salaryRange: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")],
|
||||
captchaVisible: false
|
||||
salaryRange: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")]
|
||||
};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
this.historyPageInfo = { current: 1, pageSize: 10 };
|
||||
}
|
||||
|
||||
async componentWillMount() {
|
||||
componentWillMount() {
|
||||
const { mySalaryStore: { init } } = this.props;
|
||||
const data = await payrollCheckType();
|
||||
console.log(data);
|
||||
this.setState({ captchaVisible: true });
|
||||
// init();
|
||||
init();
|
||||
}
|
||||
|
||||
// 查看工资单
|
||||
|
|
@ -119,7 +113,7 @@ export default class MySalary extends React.Component {
|
|||
recordListPageInfo,
|
||||
myBillPageInfo
|
||||
} = mySalaryStore;
|
||||
const { salaryBillVisible, salaryInfoId, salaryRange, captchaVisible } = this.state;
|
||||
const { salaryBillVisible, salaryInfoId, salaryRange } = this.state;
|
||||
if (!hasRight && !loading) return renderNoright();
|
||||
|
||||
const topTab = [
|
||||
|
|
@ -216,7 +210,6 @@ export default class MySalary extends React.Component {
|
|||
}}
|
||||
/>
|
||||
}
|
||||
<CaptchaModal visible={captchaVisible} onCancel={() => this.setState({ captchaVisible: false })}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue