Merge branch 'develop' into feature/0612-工资单水印设置
This commit is contained in:
commit
0e973742fb
|
|
@ -1,4 +1,5 @@
|
|||
import { WeaTools } from 'ecCom';
|
||||
import { postFetch } from '../util/request';
|
||||
|
||||
//个税申报表-个税申报表列表
|
||||
export const getDeclareList = params => {
|
||||
|
|
@ -7,7 +8,7 @@ export const getDeclareList = params => {
|
|||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
|
@ -24,7 +25,7 @@ export const saveDeclare = params => {
|
|||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
|
@ -41,7 +42,7 @@ export const getDetailList = params => {
|
|||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
|
@ -52,13 +53,16 @@ export const exportSalaryArchive = (id = "") => {
|
|||
fetch('/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=' + id).then(res => res.blob().then(blob => {
|
||||
var filename=`个税申报表.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}))
|
||||
}
|
||||
|
||||
//个税申报表-撤回申报
|
||||
export const withDrawTaxDeclaration = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration', params);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -367,6 +367,14 @@ 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);
|
||||
};
|
||||
|
||||
// 工资单基础设置-获取设置列表
|
||||
export const getSalaryBillBaseSetForm = (id) => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 验证码弹框
|
||||
* Description:
|
||||
* Date: 2023/6/16
|
||||
*/
|
||||
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";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
captcha: "",
|
||||
time: 60
|
||||
};
|
||||
this.timeRef = null;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
clearInterval(this.timeRef);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
clearInterval(this.timeRef);
|
||||
this.setState({ captcha: "", time: 60 });
|
||||
}
|
||||
}
|
||||
|
||||
handleSendCaptcha = () => {
|
||||
sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
console.log(data);
|
||||
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);
|
||||
}
|
||||
});
|
||||
};
|
||||
handleConfirm = () => {
|
||||
if (!this.state.captcha) {
|
||||
this.refs.weaError.showError();
|
||||
// return
|
||||
}
|
||||
this.props.onCancel();
|
||||
this.props.onConfirm();
|
||||
};
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
.captchaWrapper {
|
||||
.wea-dialog-body {
|
||||
padding: 30px 20px;
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,19 @@
|
|||
import React from "react";
|
||||
import { WeaDatePicker, WeaDialog, WeaError, WeaFormItem, WeaHelpfulTip, WeaSelect } from "ecCom";
|
||||
import {
|
||||
WeaDatePicker,
|
||||
WeaDialog,
|
||||
WeaError,
|
||||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaLocaleProvider,
|
||||
WeaSelect,
|
||||
WeaTextarea
|
||||
} from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("declareStore", "taxAgentStore")
|
||||
@observer
|
||||
export default class GenerateModal extends React.Component {
|
||||
|
|
@ -12,6 +22,7 @@ export default class GenerateModal extends React.Component {
|
|||
this.state = {
|
||||
date: "",
|
||||
taxAgentId: "",
|
||||
description: "",
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
|
@ -19,7 +30,7 @@ export default class GenerateModal extends React.Component {
|
|||
// 生成申报表
|
||||
handleGenerate = () => {
|
||||
const { declareStore: { saveDeclare } } = this.props;
|
||||
const { date, taxAgentId } = this.state;
|
||||
const { date, taxAgentId, description } = this.state;
|
||||
if (_.isEmpty(date) && _.isEmpty(taxAgentId)) {
|
||||
this.refs.weaError.showError();
|
||||
this.refs.weaError1.showError();
|
||||
|
|
@ -36,7 +47,7 @@ export default class GenerateModal extends React.Component {
|
|||
return;
|
||||
}
|
||||
this.setState({ loading: true });
|
||||
saveDeclare({ salaryMonthStr: date, taxAgentId }).then(() => {
|
||||
saveDeclare({ salaryMonthStr: date, taxAgentId, description }).then(() => {
|
||||
this.setState({ loading: false });
|
||||
this.props.onGenerate();
|
||||
}).catch(() => {
|
||||
|
|
@ -116,13 +127,23 @@ export default class GenerateModal extends React.Component {
|
|||
}}
|
||||
/>
|
||||
<WeaHelpfulTip
|
||||
style={{ position: "absolute", bottom: "8px", right: 0 }}
|
||||
style={{ position: "absolute", bottom: 8, right: -35 }}
|
||||
width={200}
|
||||
title="提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
label={getLabel(536726, "备注")}
|
||||
style={{ marginBottom: 10 }}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}>
|
||||
<WeaTextarea
|
||||
value={this.state.description}
|
||||
onChange={(description) => this.setState({ description })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker } from "antd";
|
||||
import { WeaNewScroll, WeaTop } from "ecCom";
|
||||
import { Button, DatePicker, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import CustomTable from "../../components/customTable";
|
||||
import GenerateModal from "./generateModal";
|
||||
import { getDeclareList } from "../../apis/declare";
|
||||
import { getDeclareList, withDrawTaxDeclaration } from "../../apis/declare";
|
||||
import { sysConfCodeRule } from "../../apis/ruleconfig";
|
||||
import moment from "moment";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { MonthPicker } = DatePicker;
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -15,6 +17,7 @@ export default class Declare extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showWithDrawBtn: false,
|
||||
declarationModalVisible: false,
|
||||
startDate: moment(new Date()).startOf("year").format("YYYY-MM"),
|
||||
endDate: moment(new Date()).startOf("month").format("YYYY-MM"),
|
||||
|
|
@ -32,6 +35,7 @@ export default class Declare extends React.Component {
|
|||
componentWillMount() {
|
||||
const { taxAgentStore: { getTaxAgentSelectListAsAdmin } } = this.props;
|
||||
this.getDeclareList();
|
||||
this.sysConfCodeRule();
|
||||
getTaxAgentSelectListAsAdmin();
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +60,21 @@ export default class Declare extends React.Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
sysConfCodeRule = () => {
|
||||
sysConfCodeRule({ code: "WITHDRAW_TAX_DECLARATION" }).then(({ status, data }) => {
|
||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
||||
});
|
||||
};
|
||||
withDrawTaxDeclaration = (taxDeclarationId) => {
|
||||
withDrawTaxDeclaration({ taxDeclarationId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "撤回成功"));
|
||||
this.getDeclareList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(111, "撤回失败"));
|
||||
}
|
||||
});
|
||||
};
|
||||
// 日期区间改变事件
|
||||
handleRangePickerChange = (type, value) => {
|
||||
this.setState({
|
||||
|
|
@ -81,7 +99,7 @@ export default class Declare extends React.Component {
|
|||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { loading, columns, dataSource, pageInfo } = this.state;
|
||||
const { loading, columns, dataSource, pageInfo, showWithDrawBtn } = this.state;
|
||||
const renderRightOperation = () => {
|
||||
const { startDate, endDate } = this.state;
|
||||
return (
|
||||
|
|
@ -135,15 +153,32 @@ export default class Declare extends React.Component {
|
|||
dataIndex: "operate",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" +
|
||||
record.id
|
||||
);
|
||||
}}>
|
||||
查看
|
||||
</a>
|
||||
<React.Fragment>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" +
|
||||
record.id
|
||||
);
|
||||
}}>
|
||||
查看
|
||||
</a>
|
||||
{
|
||||
showWithDrawBtn &&
|
||||
<a
|
||||
href="javascript:void(0);" style={{ marginLeft: 10 }}
|
||||
onClick={() => {
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "确认撤回该条数据吗?"),
|
||||
onOk: () => this.withDrawTaxDeclaration(record.id)
|
||||
});
|
||||
}}
|
||||
>
|
||||
{getLabel(111, "撤回")}
|
||||
</a>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
.wea-select {
|
||||
.ant-select {
|
||||
width: 90% !important;
|
||||
width: 100% !important;
|
||||
|
||||
.ant-select-selection {
|
||||
border-radius: 0 !important;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
|||
import PhoneTemplate from "../payroll/templatePreview/phoneTemplate";
|
||||
import "../payroll/templatePreview/index.less";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
import { payrollCheckType } from "../../apis/payroll";
|
||||
import "./index.less";
|
||||
import CaptchaModal from "../../components/captchaModal";
|
||||
|
||||
@inject("mySalaryStore")
|
||||
@observer
|
||||
|
|
@ -17,6 +19,7 @@ export default class MobilePayroll extends React.Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
visible: false,
|
||||
captchaVisible: false,
|
||||
authCode: "",
|
||||
mySalaryBillData: {
|
||||
employeeInformation: {},
|
||||
|
|
@ -26,13 +29,20 @@ export default class MobilePayroll extends React.Component {
|
|||
this.id = "";
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
async componentWillMount() {
|
||||
const type = getQueryString("type");
|
||||
this.id = getQueryString("id");
|
||||
const { mySalaryStore: { init } } = this.props;
|
||||
type !== "phone" && init(false);
|
||||
type === "phone" && this.initMobile();
|
||||
this.getMySalaryBill(this.id);
|
||||
const { data, status } = await payrollCheckType();
|
||||
if (type !== "phone") {
|
||||
if (status && data === "PWD") {
|
||||
init(false);
|
||||
} else {
|
||||
this.setState({ captchaVisible: true });
|
||||
}
|
||||
}
|
||||
type === "phone" && this.initMobile();
|
||||
}
|
||||
|
||||
initMobile = () => {
|
||||
|
|
@ -96,7 +106,7 @@ export default class MobilePayroll extends React.Component {
|
|||
|
||||
render() {
|
||||
const { mySalaryStore: { clearLoading } } = this.props;
|
||||
const { mySalaryBillData, visible } = this.state;
|
||||
const { mySalaryBillData, visible, captchaVisible } = this.state;
|
||||
const type = getQueryString("type");
|
||||
const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {};
|
||||
const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : [];
|
||||
|
|
@ -148,6 +158,11 @@ export default class MobilePayroll extends React.Component {
|
|||
</div>
|
||||
</Authority>
|
||||
}
|
||||
<CaptchaModal
|
||||
visible={captchaVisible} id={getQueryString("id")}
|
||||
onCancel={() => this.setState({ captchaVisible: false })}
|
||||
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { renderNoright } from "../../util"; // 渲染form数据的方法:因
|
|||
import CustomTab from "../../components/customTab";
|
||||
import moment from "moment";
|
||||
import PayrollModal from "./payrollModal";
|
||||
import Authority from "./authority";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -29,9 +28,9 @@ export default class MySalary extends React.Component {
|
|||
this.historyPageInfo = { current: 1, pageSize: 10 };
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { mySalaryStore: { init } } = this.props;
|
||||
init();
|
||||
componentDidMount() {
|
||||
const { mySalaryStore: { mySalaryBillList } } = this.props;
|
||||
mySalaryBillList([moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")]);
|
||||
}
|
||||
|
||||
// 查看工资单
|
||||
|
|
@ -114,7 +113,6 @@ export default class MySalary extends React.Component {
|
|||
myBillPageInfo
|
||||
} = mySalaryStore;
|
||||
const { salaryBillVisible, salaryInfoId, salaryRange } = this.state;
|
||||
if (!hasRight && !loading) return renderNoright();
|
||||
|
||||
const topTab = [
|
||||
{
|
||||
|
|
@ -141,64 +139,62 @@ export default class MySalary extends React.Component {
|
|||
};
|
||||
return (
|
||||
<div className="mySalaryBenefitsWrapper">
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`} store={mySalaryStore}>
|
||||
<WeaTop
|
||||
title="我的薪资福利" // 文字
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={false} // 是否显示下拉按钮
|
||||
>
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={renderSearchOperationItem()}
|
||||
onChange={(v) => {
|
||||
this.handleTabChange(v);
|
||||
this.setState({ selectedKey: v });
|
||||
}}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
{
|
||||
this.state.selectedKey === "0" &&
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
dataSource={myBillDataSource ? myBillDataSource : []}
|
||||
total={myBillPageInfo.total}
|
||||
current={myBillPageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={(value) => {
|
||||
this.pageInfo.current = value;
|
||||
this.handlePageChange();
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handlePageChange();
|
||||
}}
|
||||
/>
|
||||
}
|
||||
{
|
||||
this.state.selectedKey === "2" &&
|
||||
<CustomPaginationTable
|
||||
columns={recordListColumns}
|
||||
dataSource={recordListDataSource}
|
||||
total={recordListPageInfo.total}
|
||||
current={recordListPageInfo.pageNum}
|
||||
pageSize={this.historyPageInfo.pageSize}
|
||||
onPageChange={(value) => {
|
||||
this.historyPageInfo.current = value;
|
||||
this.handleHistoryPageChange();
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.historyPageInfo = { current, pageSize };
|
||||
this.handleHistoryPageChange();
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
</WeaTop>
|
||||
</Authority>
|
||||
<WeaTop
|
||||
title="我的薪资福利" // 文字
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={false} // 是否显示下拉按钮
|
||||
>
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={renderSearchOperationItem()}
|
||||
onChange={(v) => {
|
||||
this.handleTabChange(v);
|
||||
this.setState({ selectedKey: v });
|
||||
}}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
{
|
||||
this.state.selectedKey === "0" &&
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
dataSource={myBillDataSource ? myBillDataSource : []}
|
||||
total={myBillPageInfo.total}
|
||||
current={myBillPageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={(value) => {
|
||||
this.pageInfo.current = value;
|
||||
this.handlePageChange();
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handlePageChange();
|
||||
}}
|
||||
/>
|
||||
}
|
||||
{
|
||||
this.state.selectedKey === "2" &&
|
||||
<CustomPaginationTable
|
||||
columns={recordListColumns}
|
||||
dataSource={recordListDataSource}
|
||||
total={recordListPageInfo.total}
|
||||
current={recordListPageInfo.pageNum}
|
||||
pageSize={this.historyPageInfo.pageSize}
|
||||
onPageChange={(value) => {
|
||||
this.historyPageInfo.current = value;
|
||||
this.handleHistoryPageChange();
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.historyPageInfo = { current, pageSize };
|
||||
this.handleHistoryPageChange();
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
</WeaTop>
|
||||
{
|
||||
salaryBillVisible && <PayrollModal
|
||||
visible={salaryBillVisible}
|
||||
|
|
|
|||
|
|
@ -7,31 +7,58 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import Authority from "./authority";
|
||||
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
||||
import { payrollCheckType } from "../../apis/payroll";
|
||||
import CaptchaModal from "../../components/captchaModal";
|
||||
import "../payroll/templatePreview/index.less";
|
||||
|
||||
@inject("mySalaryStore")
|
||||
@observer
|
||||
class MySalaryView extends Component {
|
||||
componentDidMount() {
|
||||
const { mySalaryStore: { getMySalaryBill }, params: { salaryInfoId } } = this.props;
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
captchaVisible: false
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { mySalaryStore: { getMySalaryBill, init }, params: { salaryInfoId } } = this.props;
|
||||
const { data, status } = await payrollCheckType();
|
||||
if (status && data === "PWD") {
|
||||
init(false);
|
||||
} else {
|
||||
this.setState({ captchaVisible: true });
|
||||
}
|
||||
getMySalaryBill(Number(salaryInfoId));
|
||||
}
|
||||
|
||||
render() {
|
||||
const { mySalaryStore: { mySalaryBill } } = this.props;
|
||||
const { captchaVisible } = this.state;
|
||||
const { mySalaryStore, params: { salaryInfoId } } = this.props;
|
||||
const { mySalaryBill } = mySalaryStore;
|
||||
const employeeInformation = mySalaryBill.employeeInformation && toJS(mySalaryBill.employeeInformation);
|
||||
const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups);
|
||||
return (
|
||||
<div>
|
||||
<div className="templatePreview">
|
||||
<ComputerTemplate
|
||||
isPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBill.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<React.Fragment>
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`} store={mySalaryStore}>
|
||||
<div style={{ height: "100%", overflow: "auto" }}>
|
||||
<div className="templatePreview">
|
||||
<ComputerTemplate
|
||||
isPreview isMsgPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBill.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Authority>
|
||||
<CaptchaModal
|
||||
visible={captchaVisible} id={salaryInfoId}
|
||||
onCancel={() => this.setState({ captchaVisible: false })}
|
||||
onConfirm={() => mySalaryStore.setInitEmVerify()}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class Index extends Component {
|
|||
});
|
||||
queryList(payload, searchItemsValue, url).then(({ data, status }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
if (status && selectedKey === _.lowerCase(data.listType)) {
|
||||
const { pageInfo: paganition } = data;
|
||||
const { list: dataSource, total, pageNum: current, pageSize } = paganition;
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore: { getTaxAgentSelectListAsAdmin } } = this.props;
|
||||
const { taxAgentStore: { fetchTaxAgentOption } } = this.props;
|
||||
this.reportGetForm();
|
||||
getTaxAgentSelectListAsAdmin();
|
||||
fetchTaxAgentOption();
|
||||
}
|
||||
|
||||
reportGetForm = () => {
|
||||
|
|
@ -98,7 +98,7 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { report, dimensionList, statisticalPayload } = this.state;
|
||||
const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentAdminOption } } = this.props;
|
||||
const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(111, "报表查看")}
|
||||
|
|
@ -137,7 +137,7 @@ class Index extends Component {
|
|||
title={getLabel(111, "统计数据范围及规则设置")}
|
||||
onClick={() => {
|
||||
if (this.reportRef.state.loading) {
|
||||
message.info(getLabel(111, "列表正在加载中,请稍后"))
|
||||
message.info(getLabel(111, "列表正在加载中,请稍后"));
|
||||
} else {
|
||||
this.setState({
|
||||
statisticalPayload: { visible: true, id: report.id, dimension: report.dimensionId }
|
||||
|
|
@ -150,7 +150,7 @@ class Index extends Component {
|
|||
{/*统计数据范围及规则设置弹框*/}
|
||||
<StatisticalMicroSettingsSlide
|
||||
{...statisticalPayload} form={settingForm}
|
||||
taxAgentAdminOption={taxAgentAdminOption}
|
||||
taxAgentAdminOption={taxAgentOption}
|
||||
onClose={(isRefresh) => this.setState({
|
||||
statisticalPayload: { visible: false, id: "", dimension: "" }
|
||||
}, () => isRefresh && this.reportRef.reportStatisticsReportGetData(report.id, report.dimensionId))}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
* Date: 2022-09-19 18:15:32
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaFormItem, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
|
||||
import { WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
|
||||
import { CheckBox } from "../appConfig";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { message, Modal } from "antd";
|
||||
import * as API from "../../apis/ruleconfig";
|
||||
import "./index.less";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -54,7 +56,7 @@ class Index extends Component {
|
|||
com: Select({
|
||||
label: "排序字段",
|
||||
onChange: this.handleChane,
|
||||
value: sysOrderRule.data.orderRule,
|
||||
value: sysOrderRule.data.orderRule || orderOptions[0].value,
|
||||
options: orderOptions
|
||||
})
|
||||
},
|
||||
|
|
@ -62,7 +64,7 @@ class Index extends Component {
|
|||
com: Select({
|
||||
label: "正序/倒序",
|
||||
onChange: this.handleChane,
|
||||
value: sysOrderRule.data.ascOrDesc,
|
||||
value: sysOrderRule.data.ascOrDesc || ascOptions[0].value,
|
||||
options: ascOptions
|
||||
})
|
||||
}
|
||||
|
|
@ -72,7 +74,7 @@ class Index extends Component {
|
|||
com: Select({
|
||||
label: "人员字段",
|
||||
onChange: this.handleChane,
|
||||
value: sysConfCodeRule.data,
|
||||
value: sysConfCodeRule.data || employeeOptions[0].value,
|
||||
options: employeeOptions
|
||||
})
|
||||
}
|
||||
|
|
@ -97,9 +99,9 @@ class Index extends Component {
|
|||
],
|
||||
saveParams: {
|
||||
...this.state.saveParams,
|
||||
orderRule: sysOrderRule.data.orderRule,
|
||||
ascOrDesc: sysOrderRule.data.ascOrDesc,
|
||||
rule: sysConfCodeRule.data,
|
||||
orderRule: sysOrderRule.data.orderRule || orderOptions[0].value,
|
||||
ascOrDesc: sysOrderRule.data.ascOrDesc || ascOptions[0].value,
|
||||
rule: sysConfCodeRule.data || employeeOptions[0].value,
|
||||
enctry: queryAppsetting.data.isOpenEncrypt,
|
||||
operateTaxDeclaration: queryAppsetting.data.isOpenTaxDeclaration
|
||||
}
|
||||
|
|
@ -136,119 +138,122 @@ class Index extends Component {
|
|||
handleSave = (type) => {
|
||||
const { saveParams } = this.state;
|
||||
if (type === "ORDER") {
|
||||
if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.setState({ loading: { ...this.state.loading, order: true } });
|
||||
API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, order: false } });
|
||||
if (status) {
|
||||
message.success("保存成功!");
|
||||
let sysSetting = this.getSysSetting();
|
||||
} else {
|
||||
message.error(errormsg || "保存失败!");
|
||||
}
|
||||
});
|
||||
|
||||
// if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) {
|
||||
// Modal.warning({
|
||||
// title: "信息确认",
|
||||
// content: "必要信息不完整,红色*为必填项!"
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// this.setState({ loading: { ...this.state.loading, order: true } });
|
||||
// API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => {
|
||||
// this.setState({ loading: { ...this.state.loading, order: false } });
|
||||
// if (status) {
|
||||
// message.success("保存成功!");
|
||||
// let sysSetting = this.getSysSetting();
|
||||
// } else {
|
||||
// message.error(errormsg || "保存失败!");
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
} else if (type === "EMPLOYEE") {
|
||||
if (_.isEmpty(saveParams.rule)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.setState({ loading: { ...this.state.loading, employee: true } });
|
||||
API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, employee: false } });
|
||||
if (status) {
|
||||
message.success("保存成功!");
|
||||
let sysSetting = this.getSysSetting();
|
||||
} else {
|
||||
message.error(errormsg || "保存失败!");
|
||||
}
|
||||
});
|
||||
// if (_.isEmpty(saveParams.rule)) {
|
||||
// Modal.warning({
|
||||
// title: "信息确认",
|
||||
// content: "必要信息不完整,红色*为必填项!"
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// this.setState({ loading: { ...this.state.loading, employee: true } });
|
||||
// API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => {
|
||||
// this.setState({ loading: { ...this.state.loading, employee: false } });
|
||||
// if (status) {
|
||||
// message.success("保存成功!");
|
||||
// let sysSetting = this.getSysSetting();
|
||||
// } else {
|
||||
// message.error(errormsg || "保存失败!");
|
||||
// }
|
||||
// });
|
||||
} else if (type === "ENCRYTION") {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!",
|
||||
onOk: () => {
|
||||
this.setState({ loading: { ...this.state.loading, encry: true } });
|
||||
API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, encry: false } });
|
||||
if (status) {
|
||||
const { isSuccess, progressId, msg } = data;
|
||||
if (!isSuccess) {
|
||||
message.error(errormsg || msg || "保存失败!");
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
progressVisible: true,
|
||||
progress: 0
|
||||
}, () => {
|
||||
let number = 1;
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
|
||||
const { progress_statue } = data;
|
||||
if (progress_statue === "success" && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.success("保存成功");
|
||||
} else if (progress_statue === "in_progress" && this.timer) {
|
||||
if (this.state.progress >= 90) {
|
||||
this.setState({
|
||||
progress: this.state.progress + (0.001 * this.state.progress)
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, () => number++);
|
||||
}
|
||||
} else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.error(errormsg || "保存失败!");
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
// Modal.confirm({
|
||||
// title: "信息确认",
|
||||
// content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!",
|
||||
// onOk: () => {
|
||||
// this.setState({ loading: { ...this.state.loading, encry: true } });
|
||||
// API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => {
|
||||
// this.setState({ loading: { ...this.state.loading, encry: false } });
|
||||
// if (status) {
|
||||
// const { isSuccess, progressId, msg } = data;
|
||||
// if (!isSuccess) {
|
||||
// message.error(errormsg || msg || "保存失败!");
|
||||
// return;
|
||||
// }
|
||||
// this.setState({
|
||||
// progressVisible: true,
|
||||
// progress: 0
|
||||
// }, () => {
|
||||
// let number = 1;
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.timer = setInterval(() => {
|
||||
// API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
|
||||
// const { progress_statue } = data;
|
||||
// if (progress_statue === "success" && this.timer) {
|
||||
// clearInterval(this.timer);
|
||||
// this.timer = null;
|
||||
// number = 1;
|
||||
// this.setState({
|
||||
// progress: 100
|
||||
// }, () => {
|
||||
// this.setState({
|
||||
// progressVisible: false
|
||||
// });
|
||||
// });
|
||||
// message.success("保存成功");
|
||||
// } else if (progress_statue === "in_progress" && this.timer) {
|
||||
// if (this.state.progress >= 90) {
|
||||
// this.setState({
|
||||
// progress: this.state.progress + (0.001 * this.state.progress)
|
||||
// });
|
||||
// } else {
|
||||
// this.setState({
|
||||
// progress: 10 * number
|
||||
// }, () => number++);
|
||||
// }
|
||||
// } else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
// clearInterval(this.timer);
|
||||
// this.timer = null;
|
||||
// number = 1;
|
||||
// this.setState({
|
||||
// progress: 100
|
||||
// }, () => {
|
||||
// this.setState({
|
||||
// progressVisible: false
|
||||
// });
|
||||
// });
|
||||
// message.error(errormsg || "保存失败!");
|
||||
// }
|
||||
// });
|
||||
// }, 1000);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// onCancel: () => {
|
||||
// }
|
||||
// });
|
||||
} else if (type === "DECLARATION") {
|
||||
this.setState({ loading: { ...this.state.loading, declare: true } });
|
||||
API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, declare: false } });
|
||||
if (status) {
|
||||
message.success("保存成功!");
|
||||
let sysSetting = this.getSysSetting();
|
||||
} else {
|
||||
message.error(errormsg || "保存失败!");
|
||||
}
|
||||
});
|
||||
// this.setState({ loading: { ...this.state.loading, declare: true } });
|
||||
// API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => {
|
||||
// this.setState({ loading: { ...this.state.loading, declare: false } });
|
||||
// if (status) {
|
||||
// message.success("保存成功!");
|
||||
// let sysSetting = this.getSysSetting();
|
||||
// } else {
|
||||
// message.error(errormsg || "保存失败!");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -257,22 +262,161 @@ class Index extends Component {
|
|||
if (type === "排序字段") {
|
||||
this.setState({
|
||||
saveParams: { ...this.state.saveParams, orderRule: selected }
|
||||
}, () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认要保存吗?"),
|
||||
onOk: () => {
|
||||
API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"]))
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
let sysSetting = this.getSysSetting();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (type === "正序/倒序") {
|
||||
this.setState({
|
||||
saveParams: { ...this.state.saveParams, ascOrDesc: selected }
|
||||
}, () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认要保存吗?"),
|
||||
onOk: () => {
|
||||
API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"]))
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
let sysSetting = this.getSysSetting();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (type === "人员字段") {
|
||||
this.setState({
|
||||
saveParams: { ...this.state.saveParams, rule: selected }
|
||||
}, () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认要保存吗?"),
|
||||
onOk: () => {
|
||||
API.saveMatchEmployeeModeRule(_.pick(this.state.saveParams, ["rule"])).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, employee: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
let sysSetting = this.getSysSetting();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (type === "加密设置") {
|
||||
this.setState({
|
||||
saveParams: { ...this.state.saveParams, enctry: selected }
|
||||
}, () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(543354, "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!"),
|
||||
onOk: () => {
|
||||
API.saveEncryptSetting({ isOpenEncrypt: this.state.saveParams.enctry })
|
||||
.then(({ data, status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, encry: false } });
|
||||
if (status) {
|
||||
const { isSuccess, progressId, msg } = data;
|
||||
if (!isSuccess) {
|
||||
message.error(errormsg || msg || getLabel(22620, "保存失败!"));
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
progressVisible: true,
|
||||
progress: 0
|
||||
}, () => {
|
||||
let number = 1;
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
|
||||
const { progress_statue } = data;
|
||||
if (progress_statue === "success" && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else if (progress_statue === "in_progress" && this.timer) {
|
||||
if (this.state.progress >= 90) {
|
||||
this.setState({
|
||||
progress: this.state.progress + (0.001 * this.state.progress)
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, () => number++);
|
||||
}
|
||||
} else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (type === "个税申报") {
|
||||
this.setState({
|
||||
saveParams: { ...this.state.saveParams, operateTaxDeclaration: selected }
|
||||
}, () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认要保存吗?"),
|
||||
onOk: () => {
|
||||
API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"]))
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
let sysSetting = this.getSysSetting();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -292,15 +436,17 @@ class Index extends Component {
|
|||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>排序规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("ORDER")} loading={loading.order}>保存</Button>
|
||||
<span></span>
|
||||
{/*<Button type="primary" onClick={() => this.handleSave("ORDER")} loading={loading.order}>保存</Button>*/}
|
||||
</div>
|
||||
} showGroup center items={items}/>
|
||||
<WeaSearchGroup
|
||||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>人员校验规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")}
|
||||
loading={loading.employee}>保存</Button>
|
||||
<span></span>
|
||||
{/*<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")}*/}
|
||||
{/* loading={loading.employee}>保存</Button>*/}
|
||||
</div>
|
||||
} showGroup center items={importItems}/>
|
||||
{
|
||||
|
|
@ -309,8 +455,9 @@ class Index extends Component {
|
|||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>加密规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("ENCRYTION")}
|
||||
loading={loading.encry}>保存</Button>
|
||||
<span></span>
|
||||
{/*<Button type="primary" onClick={() => this.handleSave("ENCRYTION")}*/}
|
||||
{/* loading={loading.encry}>保存</Button>*/}
|
||||
</div>
|
||||
} showGroup center items={enctryItems}/>
|
||||
}
|
||||
|
|
@ -318,8 +465,9 @@ class Index extends Component {
|
|||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>报税规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("DECLARATION")}
|
||||
loading={loading.declare}>保存</Button>
|
||||
<span></span>
|
||||
{/*<Button type="primary" onClick={() => this.handleSave("DECLARATION")}*/}
|
||||
{/* loading={loading.declare}>保存</Button>*/}
|
||||
</div>
|
||||
} showGroup center items={declareItems}/>
|
||||
{
|
||||
|
|
@ -354,7 +502,7 @@ export const Select = payload => {
|
|||
} = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaSelect options={multiple ? options : [{ key: "", showname: "" }, ...options]} viewAttr={viewAttr}
|
||||
<WeaSelect options={multiple ? options : [...options]} viewAttr={viewAttr}
|
||||
detailtype={detailtype}
|
||||
value={value}
|
||||
multiple={multiple}
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ export default class Programme extends React.Component {
|
|||
style={{ width: "150px" }}
|
||||
onChange={v => {
|
||||
setCustomSelectkey(v);
|
||||
this.customBenefitsTableRef.getCustomCategoryList({ curren: 1, welfareTypeEnum: v });
|
||||
this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v });
|
||||
}}
|
||||
/>}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ export class TaxAgentStore {
|
|||
this.setSalaryItemBtn((isOpenDevolution && (isChief || isAdminEnable)));
|
||||
//薪酬统计报表权限
|
||||
this.setStatisticsReportBtn(!isOpenDevolution ? true : !!(isAdminEnable || isChief));
|
||||
this.setPayrollPermission(isAdminEnable && isOpenDevolution);
|
||||
this.setPayrollPermission(isAdminEnable && isOpenDevolution || !isOpenDevolution);
|
||||
resolve({ status, data });
|
||||
} else {
|
||||
reject();
|
||||
|
|
|
|||
Loading…
Reference in New Issue