Compare commits
28 Commits
33a093229a
...
28c04380f9
| Author | SHA1 | Date |
|---|---|---|
|
|
28c04380f9 | |
|
|
397c2355d8 | |
|
|
1a4def411e | |
|
|
07c40750da | |
|
|
a4c08b937b | |
|
|
a558c30fc8 | |
|
|
9e26192aa2 | |
|
|
2e832e3aa9 | |
|
|
d540698c57 | |
|
|
ac43423f96 | |
|
|
82322ade91 | |
|
|
abbf593c99 | |
|
|
0d766a1513 | |
|
|
04b3415353 | |
|
|
6201978987 | |
|
|
e539f7b040 | |
|
|
334a7660a9 | |
|
|
e9d301927f | |
|
|
dee1059ca7 | |
|
|
4ecde5921e | |
|
|
5c02dc876c | |
|
|
3dd38b3245 | |
|
|
17bbeb3255 | |
|
|
4d8351d627 | |
|
|
4ca0a4b756 | |
|
|
9a50947d8a | |
|
|
9016fa3fe9 | |
|
|
d652b2cdc6 |
|
|
@ -202,8 +202,12 @@ export const salaryBillSendSum = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params);
|
return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params);
|
||||||
};
|
};
|
||||||
//工资单发放-发送短信验证码
|
//工资单发放-发送短信验证码
|
||||||
export const sendMobileCode = (params) => {
|
export const sendMobileCode = (params, header = {}) => {
|
||||||
return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params);
|
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 => {
|
export const payrollCheckType = params => {
|
||||||
|
|
|
||||||
|
|
@ -6,31 +6,32 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||||
import { sendMobileCode } from "../../apis/payroll";
|
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||||
import { Button } from "antd";
|
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";
|
import "./index.less";
|
||||||
|
|
||||||
|
const form = new WeaForm();
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = { captcha: "", time: 60 };
|
||||||
captcha: "",
|
|
||||||
time: 60
|
|
||||||
};
|
|
||||||
this.timeRef = null;
|
this.timeRef = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
form.initFormFields(captchaCondition);
|
||||||
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
clearInterval(this.timeRef);
|
clearInterval(this.timeRef);
|
||||||
}
|
this.setState({ captcha: "", time: 60 });
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
|
||||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
|
||||||
clearInterval(this.timeRef);
|
|
||||||
this.setState({ captcha: "", time: 60 });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSendCaptcha = () => {
|
handleSendCaptcha = () => {
|
||||||
|
|
@ -48,44 +49,73 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleConfirm = () => {
|
handleConfirm = async () => {
|
||||||
if (!this.state.captcha) {
|
const type = getQueryString("type"), f = await form.validateForm();
|
||||||
|
if (!this.state.captcha && type !== "phone") {
|
||||||
this.refs.weaError.showError();
|
this.refs.weaError.showError();
|
||||||
// return
|
return;
|
||||||
|
} else if (!f.isValid && type === "phone") {
|
||||||
|
f.showErrors();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.props.onCancel();
|
checkMobileCode({ id: this.props.id, mobileCode: this.state.captcha }).then(({ status, errormsg }) => {
|
||||||
this.props.onConfirm();
|
if (status) {
|
||||||
|
this.props.onCancel();
|
||||||
|
this.props.onConfirm();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { captcha, time } = this.state;
|
const { captcha, time } = this.state, type = getQueryString("type");
|
||||||
return (
|
const itemRender = {
|
||||||
<WeaDialog
|
mobileCode: (field, textAreaProps, form, formParams) => {
|
||||||
initLoadCss {...this.props} style={{ width: 550 }}
|
return (<div className="captchaInputBox">
|
||||||
className="captchaWrapper" title={getLabel(111, "验证码验证")}
|
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
|
||||||
buttons={[
|
onChange={() => this.setState({ captcha: form.getFormParams().mobileCode })}/>
|
||||||
<Button type="primary" onClick={this.handleConfirm}>{getLabel(826, "确定")}</Button>
|
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}>
|
||||||
]}
|
{
|
||||||
>
|
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
|
||||||
<WeaSearchGroup needTigger={false} title="" showGroup>
|
}
|
||||||
<WeaFormItem
|
</Button>
|
||||||
label={getLabel(111, "验证码")}
|
</div>);
|
||||||
labelCol={{ span: 8 }}
|
}
|
||||||
wrapperCol={{ span: 16 }}
|
};
|
||||||
>
|
return (<React.Fragment>
|
||||||
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(826, "验证码未填写")}>
|
{
|
||||||
<div className="captchaInputBox">
|
type === "phone" ? <MobileModal title={getLabel(111, "验证码验证")} onConfirm={this.handleConfirm}>
|
||||||
<WeaInput value={captcha} onChange={captcha => this.setState({ captcha })}/>
|
<FormInfo center={false} itemRender={itemRender} form={form} formFields={captchaCondition}/>
|
||||||
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}>
|
</MobileModal> :
|
||||||
{
|
<WeaDialog
|
||||||
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
|
initLoadCss {...this.props} style={{ width: 550 }}
|
||||||
}
|
className="captchaWrapper" title={getLabel(111, "验证码验证")}
|
||||||
</Button>
|
buttons={[
|
||||||
</div>
|
<Button type="primary" onClick={this.handleConfirm}>{getLabel(826, "确定")}</Button>
|
||||||
</WeaError>
|
]}
|
||||||
</WeaFormItem>
|
>
|
||||||
</WeaSearchGroup>
|
<WeaSearchGroup needTigger={false} title="" showGroup>
|
||||||
</WeaDialog>
|
<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={time !== 60}>
|
||||||
|
{
|
||||||
|
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
|
||||||
|
}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</WeaError>
|
||||||
|
</WeaFormItem>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
</WeaDialog>
|
||||||
|
}
|
||||||
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,25 +5,25 @@
|
||||||
.wea-form-item-wrapper {
|
.wea-form-item-wrapper {
|
||||||
.wea-error {
|
.wea-error {
|
||||||
width: 100%;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,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;
|
||||||
|
|
|
||||||
|
|
@ -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%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,14 @@ class CustomTreeSelect extends Component {
|
||||||
const { itemName } = detail;
|
const { itemName } = detail;
|
||||||
return (
|
return (
|
||||||
<TreeSelect dropdownStyle={{ maxHeight: 320, overflow: "auto" }} defaultValue={itemName}
|
<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)}
|
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 => (
|
_.map(sourceList, o => (
|
||||||
<TreeNode title={o.value} key={o.key} value={o.key} isLeaf={o.isLeaf} selectable={false}>
|
<TreeNode title={o.value} key={o.key} value={o.key} isLeaf={o.isLeaf} selectable={false}>
|
||||||
|
|
|
||||||
|
|
@ -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, Tag } from "antd";
|
import { Dropdown, Menu, message, Modal, Tag } from "antd";
|
||||||
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
|
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -36,9 +36,9 @@ class Index extends Component {
|
||||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" && showOperateBtn });
|
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" && showOperateBtn });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
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 [fromSalaryMonth, endSalaryMonth] = dateRange || [];
|
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
|
||||||
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
|
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
|
||||||
|
|
@ -47,7 +47,8 @@ class Index extends Component {
|
||||||
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 => {
|
||||||
|
|
|
||||||
|
|
@ -37,15 +37,12 @@ export default class MobilePayroll extends React.Component {
|
||||||
this.id = getQueryString("id");
|
this.id = getQueryString("id");
|
||||||
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
|
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
|
||||||
setMySalaryBill({});
|
setMySalaryBill({});
|
||||||
if (type !== "phone") {
|
const { data, status } = await payrollCheckType();
|
||||||
const { data, status } = await payrollCheckType();
|
if (status && data === "PWD") {
|
||||||
if (status && data === "PWD") {
|
type !== "phone" ? init(false, () => this.getMySalaryBill(this.id)) : await this.initMobile();
|
||||||
init(false, () => this.getMySalaryBill(this.id));
|
} else {
|
||||||
} else {
|
this.setState({ captchaVisible: true });
|
||||||
this.setState({ captchaVisible: true });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
type === "phone" && await this.initMobile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initMobile = async () => {
|
initMobile = async () => {
|
||||||
|
|
@ -119,7 +116,7 @@ export default class MobilePayroll extends React.Component {
|
||||||
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 })
|
||||||
|
|
@ -156,11 +153,17 @@ export default class MobilePayroll extends React.Component {
|
||||||
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||||
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
|
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
|
||||||
{/*发送验证码*/}
|
{/*发送验证码*/}
|
||||||
<CaptchaModal
|
{
|
||||||
visible={captchaVisible} id={getQueryString("id")}
|
captchaVisible &&
|
||||||
onCancel={() => this.setState({ captchaVisible: false })}
|
<CaptchaModal
|
||||||
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
visible={captchaVisible} id={getQueryString("id")}
|
||||||
/>
|
onCancel={() => this.setState({ captchaVisible: false })}
|
||||||
|
onConfirm={() => {
|
||||||
|
setInitEmVerify();
|
||||||
|
this.getMySalaryBill(getQueryString("id"));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</React.Fragment>;
|
</React.Fragment>;
|
||||||
const {
|
const {
|
||||||
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback
|
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,25 @@
|
||||||
import { WeaLocaleProvider } from "ecCom";
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
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 = [
|
export const loginCondition = [
|
||||||
{
|
{
|
||||||
items: [
|
items: [
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,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 }) => {
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ class PersonalScopeModal extends Component {
|
||||||
...scopeSelectLinkageDatas[cur],
|
...scopeSelectLinkageDatas[cur],
|
||||||
browserConditionParam: {
|
browserConditionParam: {
|
||||||
...scopeSelectLinkageDatas[cur].browserConditionParam,
|
...scopeSelectLinkageDatas[cur].browserConditionParam,
|
||||||
isSingle: true,
|
|
||||||
replaceDatas: !_.isEmpty(record) ? [{
|
replaceDatas: !_.isEmpty(record) ? [{
|
||||||
id: String(record.targetId),
|
id: String(record.targetId),
|
||||||
name: record.targetName
|
name: record.targetName
|
||||||
|
|
|
||||||
|
|
@ -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 })}/>
|
||||||
{/*核算进度条*/}
|
{/*核算进度条*/}
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,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}
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@ export const formHeaderPost = (url, method, params, header) => {
|
||||||
body: formdata
|
body: formdata
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
};
|
};
|
||||||
export const postFetch = (url, params) => {
|
export const postFetch = (url, params, header = {}) => {
|
||||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||||
params.access_token = localStorage.access_token;
|
params.access_token = localStorage.access_token;
|
||||||
}
|
}
|
||||||
url = server + url + "?__random__=" + (new Date()).valueOf();
|
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) => {
|
export const headerRequestFetch = (url, method, params, header) => {
|
||||||
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue