Compare commits
12 Commits
0b081877f4
...
40c7a4f7a0
| Author | SHA1 | Date |
|---|---|---|
|
|
40c7a4f7a0 | |
|
|
fad6c3a2b1 | |
|
|
04b3415353 | |
|
|
e539f7b040 | |
|
|
e9d301927f | |
|
|
dee1059ca7 | |
|
|
9a50947d8a | |
|
|
d652b2cdc6 | |
|
|
51ac08d6fc | |
|
|
ae43a2aa7c | |
|
|
82ffd93fd5 | |
|
|
34b2052926 |
|
|
@ -202,8 +202,12 @@ 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 = async header => {
|
||||
|
|
|
|||
|
|
@ -6,35 +6,36 @@
|
|||
*/
|
||||
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 };
|
||||
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 });
|
||||
}
|
||||
|
||||
handleSendCaptcha = () => {
|
||||
sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
|
||||
sendMobileCode({ id: this.props.id }, this.props.salaryBillToken).then(({ status }) => {
|
||||
if (status) {
|
||||
this.timeRef = setInterval(() => {
|
||||
const { time } = this.state;
|
||||
|
|
@ -48,44 +49,74 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
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 } = 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={time !== 60}>
|
||||
{
|
||||
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={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-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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Content extends Component {
|
|||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
||||
return (
|
||||
<div className="salary-preview-container">
|
||||
<div style={{ border: "10px solid #F3F9FF" }}>
|
||||
<div style={{ border: "10px solid #F3F9FF", width: "100%" }}>
|
||||
<div className="edition-center">
|
||||
<div className="header">
|
||||
<div className="header-title">{theme || ""}</div>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import moment from "moment";
|
||||
import CalculateQuery from "./components/calculateQuery";
|
||||
|
|
@ -15,9 +16,15 @@ import CalculateDialog from "./components/calculateDialog";
|
|||
import ProgressModal from "../../components/progressModal";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { queryConditions } from "./config";
|
||||
import { getTaxAgentSelectList } from "../../apis/taxAgent";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -31,17 +38,32 @@ class Calculate extends Component {
|
|||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}, isRefresh: false, logDialogVisible: false,
|
||||
}, isRefresh: false, logDialogVisible: false, conditions: [],
|
||||
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||
calcDaialog: { visible: false, title: "" }
|
||||
calcDaialog: { visible: false, title: "" }, showAdvance: false
|
||||
};
|
||||
this.timer = null;
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data } = await getTaxAgentSelectList();
|
||||
this.setState({
|
||||
conditions: _.map(queryConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return { ...o, options: _.map(data, k => ({ key: k.id, showname: k.content })) };
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, () => form.initFormFields(this.state.conditions));
|
||||
}
|
||||
|
||||
renderCalculateOpts = () => {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { queryParams, isRefresh } = this.state;
|
||||
const { queryParams, isRefresh, showAdvance } = this.state;
|
||||
let calculateOpts = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
calcDaialog: {
|
||||
|
|
@ -49,10 +71,11 @@ class Calculate extends Component {
|
|||
title: getLabel(538780, "核算")
|
||||
}
|
||||
})}>{getLabel(538780, "核算")}</Button>,
|
||||
<CalculateQuery queryParams={queryParams} onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
queryParams: { ...queryParams, ...v }
|
||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||
onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
queryParams: { ...queryParams, ...v }
|
||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||
];
|
||||
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
||||
};
|
||||
|
|
@ -188,7 +211,9 @@ class Calculate extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance
|
||||
} = this.state;
|
||||
return (
|
||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
|
||||
|
|
@ -201,7 +226,18 @@ class Calculate extends Component {
|
|||
]}
|
||||
>
|
||||
<div className="calculate-body">
|
||||
<CalculateTablelist queryParams={queryParams} isRefresh={isRefresh} onCalcOpts={this.handleCalcOpts}/>
|
||||
<div className={cs("advance-calc", { "show-advance-calc": showAdvance })}>
|
||||
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
|
||||
<div className="advance-calc-btns">
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ isRefresh: !isRefresh })}>{getLabel(111, "搜索")}</Button>
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>{getLabel(111, "重置")}</Button>
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<CalculateTablelist form={form} queryParams={queryParams} isRefresh={isRefresh}
|
||||
onCalcOpts={this.handleCalcOpts}/>
|
||||
<CalculateDialog {...calcDaialog}
|
||||
onCancel={(bool, id) => this.setState({
|
||||
calcDaialog: { ...calcDaialog, visible: false },
|
||||
|
|
|
|||
|
|
@ -21,11 +21,14 @@ class Index extends Component {
|
|||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.props.onChange({ dateRange: v })}/>
|
||||
</div>
|
||||
<WeaInputSearch value={name}
|
||||
placeholder={getLabel(543431, "请输入薪资账套名称")}
|
||||
onChange={v => this.props.onChange({ name: v })}
|
||||
onSearch={this.props.onSearch}
|
||||
/>
|
||||
<div className="advance-custom">
|
||||
<WeaInputSearch value={name}
|
||||
placeholder={getLabel(543431, "请输入薪资账套名称")}
|
||||
onChange={v => this.props.onChange({ name: v })}
|
||||
onSearch={this.props.onSearch}
|
||||
/>
|
||||
<a href="javascript:void(0);" onClick={this.props.onAdvance}>{getLabel(111, "高级搜索")}</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,12 +29,14 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
getSalaryAcctList = (props) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { queryParams } = props;
|
||||
const { pageInfo } = this.state, { queryParams, form } = props;
|
||||
const { taxAgentIds } = form.getFormParams();
|
||||
const { dateRange, ...extra } = queryParams;
|
||||
const [startMonthStr, endMonthStr] = dateRange || [];
|
||||
const params = { startMonthStr, endMonthStr, ...extra };
|
||||
const payload = { ...pageInfo, ...params };
|
||||
const payload = {
|
||||
...pageInfo, ...params, taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
getSalaryAcctList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
export const queryConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 14,
|
||||
label: "个税扣缴义务人",
|
||||
lanI: 111,
|
||||
multiple: true,
|
||||
options: [],
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -62,6 +62,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
.advance-custom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > a {
|
||||
border-radius: 0;
|
||||
height: 28px;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-left: none
|
||||
}
|
||||
}
|
||||
|
||||
.wea-input-focus {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
|
@ -72,6 +90,32 @@
|
|||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.advance-calc {
|
||||
display: none;
|
||||
background: #FFF;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.advance-calc-btns {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 15px 0;
|
||||
border-top: 1px solid #dadada;
|
||||
|
||||
button {
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.show-advance-calc {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.calculate-body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -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%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -92,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 });
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -187,11 +193,16 @@ export default class MobilePayroll extends React.Component {
|
|||
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
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../a
|
|||
import CaptchaModal from "../../components/captchaModal";
|
||||
import "./index.less";
|
||||
|
||||
const isIPhone = new RegExp("\\biPhone\\b|\\biPod\\b", "i").test(window.navigator.userAgent);
|
||||
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("mySalaryStore")
|
||||
|
|
@ -123,7 +125,7 @@ export const ConfirmBtns = (props) => {
|
|||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||
}
|
||||
{
|
||||
props.showFeedback === "1" &&
|
||||
((props.showFeedback === "1" && !isIPhone) || (props.showFeedback === "1" && isIPhone && isEm)) &&
|
||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||
}
|
||||
</div>;
|
||||
|
|
|
|||
|
|
@ -173,8 +173,8 @@
|
|||
|
||||
.ph-switch {
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.active, .phs-btn:hover {
|
||||
background-color: rgba(0, 0, 0, .15);
|
||||
|
|
@ -184,8 +184,9 @@
|
|||
.phs-btn {
|
||||
height: 50px;
|
||||
min-width: 88px;
|
||||
line-height: 50px;
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
padding: 0 15px;
|
||||
cursor: pointer;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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