Merge branch 'release/2.14.4.2406.02-个税' into custom-昂立个税/薪资账套配置流程审批地址
This commit is contained in:
commit
4f6cc41791
|
|
@ -228,6 +228,10 @@ export const getColumnDesc = (params) => {
|
|||
export const updateLockStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", params);
|
||||
};
|
||||
// 更新薪资核算结果的锁定状态
|
||||
export const updateLockEmpStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/lockEmp", params);
|
||||
};
|
||||
// 导入薪资核算添加表头字段缓存
|
||||
export const cacheImportField = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", params);
|
||||
|
|
@ -250,3 +254,29 @@ export const customCacheExportField = (params) => {
|
|||
export const salaryacctBatchUpdate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/batchUpdate", params);
|
||||
};
|
||||
//薪资核算-自定义导出模板保存新建
|
||||
export const saveExportTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/saveExportTemplate", params);
|
||||
};
|
||||
//薪资核算-获取自定义导出模板列表
|
||||
export const getExportTemplateList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/exportTemplateList", params);
|
||||
};
|
||||
//薪资核算-删除自定义导出模板列表
|
||||
export const deleteExportTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/deleteExportTemplate", params);
|
||||
};
|
||||
//薪资核算-获取导出模板详细信息
|
||||
export const getExportTemplateForm = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/getExportTemplateForm", params);
|
||||
};
|
||||
//薪资核算-薪资项目改变否
|
||||
export const getCompareSobConfig = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/compareSobConfig", "GET", params);
|
||||
};
|
||||
//薪资核算-更新薪资账套
|
||||
export const updateSobConfig = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,13 @@ export const saveDeclare = params => {
|
|||
return postFetch("/api/bs/hrmsalary/taxdeclaration/save", params);
|
||||
};
|
||||
|
||||
//个税申报表-获取分类
|
||||
export const getTaxReports = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxReports", "get", params);
|
||||
};
|
||||
//个税申报表-个税申报表相关信息
|
||||
export const getDeclareInfo = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo", "get", params);
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationInfo", params);
|
||||
};
|
||||
|
||||
// 个税申报表详情列表
|
||||
|
|
@ -98,6 +102,10 @@ export const getEmployeeSave = (params) => {
|
|||
export const employeeDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/employeedeclare/delete", params);
|
||||
};
|
||||
//人员报送-作废
|
||||
export const employeeInvalid = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/employeedeclare/invalid", params);
|
||||
};
|
||||
|
||||
//人员报送-全部报送
|
||||
export const employeedeclareDeclare = (params) => {
|
||||
|
|
@ -106,7 +114,7 @@ export const employeedeclareDeclare = (params) => {
|
|||
|
||||
//个税在线对接-获取个税申报记录下的个税申报表TAB
|
||||
export const getTaxDeclarationTab = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationTab", "GET", params);
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/getTaxDeclarationTab", params);
|
||||
};
|
||||
|
||||
//个税在线对接-个税申报表是否已经生成
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ export const doSecondAuth = (params, headers) => {
|
|||
return formHeaderPost("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params, headers);
|
||||
// return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params);
|
||||
};
|
||||
export const getPasswordForm = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
|
||||
};
|
||||
export const checkPassword = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -240,3 +240,11 @@ export const salaryBillBaseSetPreviewWaterMark = (params) => {
|
|||
export const getSmsSalaryItemSet = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/template/getSmsSalaryItemSet", "GET", params);
|
||||
};
|
||||
// 工资单导出PDF-检查
|
||||
export const genPdfBeforeExport = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/genPdfBeforeExport", "GET", params);
|
||||
};
|
||||
//工资单预览
|
||||
export const salaryBillPreview = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/preview", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
export const logColumns = [
|
||||
{
|
||||
title: "操作时间",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "操作人",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "操作类型",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "模块",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "对象",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "修改详情",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "客户端IP",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
}
|
||||
]
|
||||
|
||||
export const testColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
]
|
||||
|
||||
export const dataSource = [];
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
//薪资核算-自定义导出-模板设置
|
||||
export const tempConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["templateName"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "导出模板名称"),
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: ""
|
||||
}
|
||||
];
|
||||
|
|
@ -36,7 +36,6 @@ class Index extends Component {
|
|||
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 }, () => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaTop title={getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" {...this.props}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -5,9 +5,11 @@
|
|||
* Date: 2023/9/5
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { postFetch } from "../../../util/request";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class ImpStep2 extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -41,9 +43,15 @@ class ImpStep2 extends Component {
|
|||
render() {
|
||||
const { dataSource, columns, loading } = this.state;
|
||||
const { scrollHeight } = this.props;
|
||||
const pagination = {
|
||||
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`,
|
||||
total: dataSource.length,
|
||||
showSizeChanger: true
|
||||
};
|
||||
return (
|
||||
<WeaTable
|
||||
dataSource={dataSource} columns={columns} loading={loading} scroll={{ x: 800, y: `${scrollHeight}px` }}
|
||||
pagination={pagination}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Index extends Component {
|
||||
render() {
|
||||
const { theme, background, tip, tipPosi, itemTypeList, title } = this.props;
|
||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "mobile");
|
||||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "mobile");
|
||||
return (
|
||||
<React.Fragment>
|
||||
{/*<div className="pbmc-head">{title || getLabel(111, "薪酬预览")}</div>*/}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Content extends Component {
|
||||
render() {
|
||||
const { theme, background, tip, tipPosi, itemTypeList, sendTime = new Date() } = this.props;
|
||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc");
|
||||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
||||
return (
|
||||
<div className="salary-preview-container">
|
||||
<div style={{ border: "10px solid #F3F9FF" }}>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const dealTemplate = (itemTypeList, type) => {
|
|||
const { items, groupName, groupId } = group;
|
||||
if (items.length !== 0) {
|
||||
items.forEach((item) => {
|
||||
item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : "100";
|
||||
item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : "";
|
||||
});
|
||||
if (items.length % 2 && type === "pc") items.push({});
|
||||
// 未分类不展示标题
|
||||
|
|
|
|||
|
|
@ -129,41 +129,23 @@ const DataAcquisition = (props) => props.children;
|
|||
// intelligentCalculateSalarySettings 智能算薪
|
||||
|
||||
const Routes = (
|
||||
<Route
|
||||
key="hrmSalary"
|
||||
path="hrmSalary"
|
||||
onEnter={getLocaleLabel}
|
||||
component={Home}>
|
||||
<Route key="hrmSalary" path="hrmSalary" onEnter={getLocaleLabel} component={Home}>
|
||||
<Route key="historicalPayroll" path="historicalPayroll" component={HistoricalPayroll}/>
|
||||
<Route key="salaryAdjustmentRecords" path="salaryAdjustmentRecords" component={SalaryAdjustmentRecords}/>
|
||||
<Route key="mySalaryMobile" path="mySalaryMobile" component={MySalaryMobile}/>
|
||||
<Route key="mySalary" path="mySalary" component={MySalary}/>
|
||||
<Route key="mySalaryView" path="mySalary/:salaryInfoId" component={MySalaryView}/>
|
||||
<Route
|
||||
key="socialSecurityBenefits"
|
||||
path="socialSecurityBenefits"
|
||||
component={SocialSecurityBenefits}>
|
||||
<Route key="socialSecurityBenefits" path="socialSecurityBenefits" component={SocialSecurityBenefits}>
|
||||
<Route key="programme" path="programme" component={Programme}/>
|
||||
<Route key="archives" path="archives" component={Archives}/>
|
||||
<Route key="standingBook" path="standingBook" component={StandingBook}/>
|
||||
<Route
|
||||
key="standingBookDetail"
|
||||
path="standingBookDetail"
|
||||
component={StandingBookDetail}
|
||||
/>
|
||||
<Route
|
||||
key="sbofflineComparison"
|
||||
path="sbofflineComparison"
|
||||
component={StandingBookOfflineComparison}
|
||||
/>
|
||||
<Route key="standingBookDetail" path="standingBookDetail" component={StandingBookDetail} />
|
||||
<Route key="sbofflineComparison" path="sbofflineComparison" component={StandingBookOfflineComparison} />
|
||||
</Route>
|
||||
<Route key="salaryItem" path="salaryItem" component={SalaryItem}/>
|
||||
<Route key="salaryFile" path="salaryFile" component={SalaryFiles}/>
|
||||
<Route key="adjustSalaryManage" path="adjustSalaryManage" component={AdjustSalaryManage}/>
|
||||
<Route
|
||||
key="dataAcquisition"
|
||||
path="dataAcquisition"
|
||||
component={DataAcquisition}>
|
||||
<Route key="dataAcquisition" path="dataAcquisition" component={DataAcquisition}>
|
||||
<Route key="cumDeduct" path="cumDeduct" component={CumDeduct}/>
|
||||
<Route key="otherDeduct" path="otherDeduct" component={OtherDeduct}/>
|
||||
<Route key="cumSituation" path="cumSituation" component={CumSituation}/>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class SalaryDetails extends Component {
|
|||
this.state = {
|
||||
loading: false, dataSource: [], columns: [], selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
|
||||
countResult: {}, showTotalCell: false
|
||||
showTotalCell: false, updateSum: true
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ class SalaryDetails extends Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }, updateSum: true
|
||||
}, () => this.getSalaryList(nextProps));
|
||||
}
|
||||
|
||||
|
|
@ -54,10 +54,13 @@ class SalaryDetails extends Component {
|
|||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getSalaryList(this.props));
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize },
|
||||
updateSum: false
|
||||
}, () => this.getSalaryList(this.props));
|
||||
} else if (id === "CHECKBOX") {
|
||||
const { selectedRowKeys: checkBox } = params;
|
||||
this.setState({ selectedRowKeys: checkBox });
|
||||
this.setState({ selectedRowKeys: checkBox, updateSum: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -82,14 +85,15 @@ class SalaryDetails extends Component {
|
|||
};
|
||||
this.setState({ loading: true });
|
||||
API.getSalaryList(payload).then(async ({ status, data }) => {
|
||||
const [{ data: sumData }, { data: confCode }] = await Promise.all([API.getSalaryListSum(payload), sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
|
||||
// API.getSalaryListSum(payload),
|
||||
const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { dataKey, pageInfo: pageparams } = data;
|
||||
const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload,
|
||||
countResult: sumData.sumRow, showTotalCell: confCode === "1"
|
||||
showTotalCell: confCode === "1"
|
||||
}, () => tableStore.getDatas(dataKey.datas));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
|
|
@ -101,16 +105,17 @@ class SalaryDetails extends Component {
|
|||
return;
|
||||
}
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportSalaryList({ ...payload, ids: selectedRowKeys });
|
||||
const promise = API.exportSalaryList({ ...payload, ids: key === "SELECTED" ? selectedRowKeys : [] });
|
||||
};
|
||||
getColumns = () => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
const { dataSource, pageInfo, selectedRowKeys, countResult, showTotalCell } = this.state;
|
||||
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state;
|
||||
const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
|
||||
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : "";
|
||||
if (!_.isEmpty(columns)) {
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
|
||||
sumRow: countResult,
|
||||
sumRowlistUrl, payload: { ...payload, updateSum },
|
||||
columns: _.map(columns, (it, idx) => ({
|
||||
...it,
|
||||
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ class Index extends Component {
|
|||
keyword: "",
|
||||
year: moment().format("YYYY"),
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
moment(new Date()).subtract(6, "months").format("YYYY-MM"),
|
||||
moment(new Date()).format("YYYY-MM")
|
||||
],
|
||||
showSearchAd: false,
|
||||
isQuery: false,
|
||||
|
|
@ -331,7 +331,7 @@ class Index extends Component {
|
|||
const tabs = [
|
||||
{ key: "statistics", title: getLabel(111, "统计表") },
|
||||
{ key: "detail", title: getLabel(111, "员工明细") },
|
||||
// { key: "salaryDetail", title: getLabel(111, "薪资明细") }
|
||||
{ key: "salaryDetail", title: getLabel(111, "薪资明细") }
|
||||
];
|
||||
return (
|
||||
<WeaReqTop
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Index extends Component {
|
|||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("taxDeclareRecordId"),
|
||||
taxAgentId: getQueryString("taxAgentId"),
|
||||
taxYearMonth: getQueryString("taxYearMonth") + "-01",
|
||||
taxYearMonth: getQueryString("taxYearMonth"),
|
||||
checkFeedback: 0
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ class SalaryCalcOcImport extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false, importResult: {}, imageId: "",
|
||||
link: "/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=",
|
||||
visible: false, title: "", nextloading: false, importResult: {}, imageId: "", link: "",
|
||||
previewUrl: "/api/bs/hrmsalary/salaryacct/comparisonresult/preview",
|
||||
extraPreview: { salaryAcctRecordId: "" }
|
||||
}
|
||||
|
|
@ -30,7 +29,7 @@ class SalaryCalcOcImport extends Component {
|
|||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog,
|
||||
link: `${importDialog.link}${nextProps.salaryAcctRecordId}`,
|
||||
link: `/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=${nextProps.salaryAcctRecordId}`,
|
||||
visible: nextProps.visible, importResult: {},
|
||||
title: nextProps.title, imageId: "",
|
||||
extraPreview: { salaryAcctRecordId: nextProps.salaryAcctRecordId }
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ export const calculateConditions = [
|
|||
lanId: 519146,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
otherParams: {
|
||||
showSearch: true, optionFilterProp: "children"
|
||||
},
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,10 +8,17 @@
|
|||
import React, { Component } from "react";
|
||||
import { Button, Col, message, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { customCacheExportField } from "../../../../../apis/calculate";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import ExpTempManagementDialog from "../expTempManagementDialog";
|
||||
import {
|
||||
customCacheExportField,
|
||||
getExportField,
|
||||
getExportTemplateForm,
|
||||
getExportTemplateList
|
||||
} from "../../../../../apis/calculate";
|
||||
import { convertToUrlString } from "../../../../../util/url";
|
||||
import "./index.less";
|
||||
import TempDialog from "../expFieldsSetDialog/tempDialog";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
|
|
@ -21,19 +28,44 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
itemsCheckeds: [],
|
||||
showOnlyChecked: false
|
||||
itemsCheckeds: [], showOnlyChecked: false, tempMangeDialog: { visible: false, salaryAcctRecordId: "" },
|
||||
tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
async componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
itemsCheckeds: !_.isEmpty(nextProps.checkItems) ? nextProps.checkItems : []
|
||||
}, () => this.getExportTemplateList(nextProps));
|
||||
} else {
|
||||
this.setState({
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getExportTemplateList = (props) => {
|
||||
const { salaryAcctRecordId } = props;
|
||||
getExportTemplateList({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { pageInfo: { list } } = data;
|
||||
this.setState({
|
||||
tempOptions: [
|
||||
...this.state.tempOptions, ..._.map(list, o => ({ key: String(o.id), showname: o.templateName }))
|
||||
]
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
customExportClick = () => {
|
||||
const { calculateStore: { ECSearchForm }, salaryAcctRecordId } = this.props;
|
||||
const { itemsCheckeds } = this.state;
|
||||
|
|
@ -67,10 +99,26 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleChangeExpTemp = async (id) => {
|
||||
switch (id) {
|
||||
case "system":
|
||||
const { salaryAcctRecordId } = this.props;
|
||||
const { data: { checkItems: checkeds } } = await getExportField({ salaryAcctRecordId });
|
||||
this.setState({ itemsCheckeds: checkeds });
|
||||
break;
|
||||
case "NULL":
|
||||
this.setState({ itemsCheckeds: [] });
|
||||
break;
|
||||
default:
|
||||
const { data: { checkItems } } = await getExportTemplateForm({ id });
|
||||
this.setState({ itemsCheckeds: _.map(checkItems, o => parseInt(o)) });
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showOnlyChecked, itemsCheckeds } = this.state;
|
||||
const { itemsByGroup } = this.props;
|
||||
const { showOnlyChecked, itemsCheckeds, tempMangeDialog, tempDialog, tempOptions } = this.state;
|
||||
const { itemsByGroup, salaryAcctRecordId } = this.props;
|
||||
let dataSource = _.map(itemsByGroup, item => {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -84,10 +132,15 @@ class Index extends Component {
|
|||
return { ...item, salaryItems: _.filter(item.salaryItems, it => !!it.checked) };
|
||||
});
|
||||
}
|
||||
const titleComp = <div className="setHeaderWrapper">
|
||||
<span>{getLabel(111, "选择字段")}</span>
|
||||
<WeaSelect options={tempOptions} style={{ width: 200 }}
|
||||
onChange={this.handleChangeExpTemp}/>
|
||||
</div>;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll initLoadCss className="customEpDialogLayout"
|
||||
scalable title={getLabel(111, "选择字段")}
|
||||
scalable title={titleComp}
|
||||
style={{
|
||||
width: 700,
|
||||
height: 606.6,
|
||||
|
|
@ -100,6 +153,21 @@ class Index extends Component {
|
|||
}}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.customExportClick}>{getLabel(17416, "导出")}</Button>,
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
tempDialog: { visible: true, salaryAcctRecordId, id: "", salaryItemIds: itemsCheckeds },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
})}>{getLabel(111, "存为模板")}</Button>,
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({
|
||||
tempMangeDialog: { visible: true, salaryAcctRecordId },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
})}>{getLabel(111, "模板管理")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
]}
|
||||
bottomLeft={<WeaCheckbox content={getLabel(543378, "只显示已选中字段")}
|
||||
|
|
@ -131,6 +199,15 @@ class Index extends Component {
|
|||
</WeaSearchGroup>;
|
||||
})
|
||||
}
|
||||
<ExpTempManagementDialog {...tempMangeDialog}
|
||||
onCancel={() => this.setState({
|
||||
tempMangeDialog: { ...tempMangeDialog, visible: false }
|
||||
}, () => this.getExportTemplateList(this.props))}
|
||||
/>
|
||||
{/*模板保存*/}
|
||||
<TempDialog {...tempDialog} onCancel={() => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false }
|
||||
}, () => this.getExportTemplateList(this.props))}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,15 @@
|
|||
.customEpDialogLayout {
|
||||
.text-elli {
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.setHeaderWrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
.wea-title {
|
||||
padding-left: 0 !important;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:自定义导出-导出字段设置
|
||||
* Description:
|
||||
* Date: 2024/3/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { Button, Col, message, Row } from "antd";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
import TempDialog from "./tempDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
itemsCheckeds: [], itemsByGroup: [],
|
||||
tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getExportField(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
itemsCheckeds: [], itemsByGroup: []
|
||||
});
|
||||
}
|
||||
|
||||
getExportField = (props) => {
|
||||
const { salaryAcctRecordId, checkItems } = props;
|
||||
API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { itemsByGroup } = data;
|
||||
this.setState({ itemsByGroup, itemsCheckeds: checkItems });
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSelectGroupAll = (groupId, checked) => {
|
||||
const { itemsCheckeds, itemsByGroup } = this.state;
|
||||
_.map(itemsByGroup, item => {
|
||||
if (item.salarySobItemGroupId === groupId) {
|
||||
if (!!Number(checked)) {
|
||||
this.setState({
|
||||
itemsCheckeds: [...itemsCheckeds, ..._.map(item.salaryItems, child => String(child.salaryItemId))]
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
itemsCheckeds: _.differenceWith(itemsCheckeds, _.map(item.salaryItems, child => String(child.salaryItemId)), _.isEqual)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
save = () => {
|
||||
const { itemsCheckeds } = this.state;
|
||||
const { salaryAcctRecordId, tempId: id, templateName } = this.props;
|
||||
if (!id) {
|
||||
this.setState({
|
||||
tempDialog: {
|
||||
visible: true, salaryAcctRecordId, id, salaryItemIds: itemsCheckeds
|
||||
}
|
||||
});
|
||||
} else {
|
||||
API.saveExportTemplate({ templateName, salaryAcctRecordId, id, salaryItemIds: itemsCheckeds })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { itemsCheckeds, itemsByGroup, tempDialog } = this.state;
|
||||
let dataSource = _.map(itemsByGroup, item => {
|
||||
return {
|
||||
...item, salaryItems: _.map(item.salaryItems, child => {
|
||||
return { ...child, checked: itemsCheckeds.includes(String(child.salaryItemId)) };
|
||||
})
|
||||
};
|
||||
});
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll scalable title={getLabel(111, "导出字段设置")}
|
||||
initLoadCss className="customEpDialogLayout"
|
||||
style={{
|
||||
width: 700, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "70%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}
|
||||
buttons={[<Button type="primary" onClick={this.save}>{getLabel(111, "保存")}</Button>]}
|
||||
>
|
||||
{
|
||||
_.map(dataSource, item => {
|
||||
const { salarySobItemGroupName, salaryItems, salarySobItemGroupId } = item;
|
||||
const value = _.every(salaryItems, it => !!it.checked) ? "1" : "0";
|
||||
return <WeaSearchGroup showGroup needTigger
|
||||
title={<WeaCheckbox content={salarySobItemGroupName} value={value}
|
||||
onChange={(val) => this.handleSelectGroupAll(salarySobItemGroupId, val)}
|
||||
/>}>
|
||||
<Row gutter={16}>
|
||||
{
|
||||
!_.isEmpty(salaryItems) ?
|
||||
_.map(salaryItems, it => {
|
||||
const { salaryItemId, salaryItemName, checked } = it;
|
||||
return <Col span={8} style={{ marginBottom: 16 }}>
|
||||
<WeaCheckbox content={salaryItemName} value={checked ? "1" : "0"}
|
||||
onChange={() => this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [String(salaryItemId)], _.isEqual) })}
|
||||
/>
|
||||
</Col>;
|
||||
}) : <Col span={24} style={{
|
||||
minHeight: 20,
|
||||
padding: "5%",
|
||||
textAlign: "center"
|
||||
}}>{getLabel(83553, "暂无数据")}</Col>
|
||||
}
|
||||
</Row>
|
||||
</WeaSearchGroup>;
|
||||
})
|
||||
}
|
||||
<TempDialog {...tempDialog} onCancel={(isRefresh) => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false }
|
||||
}, () => isRefresh && this.props.onCancel(true))}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 导出模板保存框
|
||||
* Description:
|
||||
* Date: 2024/3/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../../../util";
|
||||
import { tempConditions } from "../../../../../common/conditions";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("calculateStore")
|
||||
@observer
|
||||
class TempDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
nextProps.calculateStore.tempForm.initFormFields(tempConditions);
|
||||
} else {
|
||||
nextProps.calculateStore.initTempForm();
|
||||
}
|
||||
}
|
||||
|
||||
save = () => {
|
||||
const { calculateStore: { tempForm }, salaryAcctRecordId, id, salaryItemIds } = this.props;
|
||||
tempForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = tempForm.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
API.saveExportTemplate({ ...payload, salaryAcctRecordId, id, salaryItemIds })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
const { calculateStore: { tempForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 400, height: 80 }} initLoadCss title={getLabel(111, "存为模板")}
|
||||
buttons={[
|
||||
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(111, "保存")}</Button>
|
||||
]}
|
||||
>
|
||||
<div className="form-dialog-layout">{getSearchs(tempForm, tempConditions, 1, false)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TempDialog;
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 自定义导出-导出模板管理
|
||||
* Description:
|
||||
* Date: 2024/3/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTab, WeaTable } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import ExpFieldsSetDialog from "../expFieldsSetDialog";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, dataSource: [], columns: [], loading: false,
|
||||
fieldsSetDialog: { visible: false, salaryAcctRecordId: "", tempId: "", templateName: "", checkItems: [] },
|
||||
query: { templateName: "" }, selectedRowKeys: []
|
||||
};
|
||||
this.dialogRef = null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getExportTemplateList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ selectedRowKeys: [] });
|
||||
}
|
||||
|
||||
getExportTemplateList = (props) => {
|
||||
const { pageInfo, query } = this.state;
|
||||
const { salaryAcctRecordId } = props;
|
||||
const payload = { ...pageInfo, ...query, salaryAcctRecordId };
|
||||
this.setState({ loading: true });
|
||||
API.getExportTemplateList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: { columns, list: dataSource, pageNum: current, pageSize, total } } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: [...columns, {
|
||||
dataIndex: "operate", title: getLabel(111, "操作"), width: 120,
|
||||
render: (__, record) => (<React.Fragment>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.getExportTemplateForm(record)}>{getLabel(111, "编辑")}</a>
|
||||
<a href="javascript:void(0);" style={{ marginLeft: 10 }}
|
||||
onClick={() => this.deleteExportTemplate([record.id])}>{getLabel(111, "删除")}</a>
|
||||
</React.Fragment>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
getExportTemplateForm = (record) => {
|
||||
const { id, templateName } = record;
|
||||
const { fieldsSetDialog } = this.state;
|
||||
const { salaryAcctRecordId } = this.props;
|
||||
API.getExportTemplateForm({ id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { checkItems } = data;
|
||||
this.setState({
|
||||
fieldsSetDialog: {
|
||||
...fieldsSetDialog, tempId: id, templateName, visible: true, salaryAcctRecordId, checkItems
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
fieldsSetDialog: {
|
||||
...fieldsSetDialog, tempId: id, templateName, visible: true, salaryAcctRecordId, checkItems: []
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
deleteExportTemplate = (ids) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确定要删除吗?"),
|
||||
onOk: () => {
|
||||
API.deleteExportTemplate({ ids }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ selectedRowKeys: [] }, () => this.getExportTemplateList(this.props));
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fieldsSetDialog, query, pageInfo, selectedRowKeys, dataSource, columns } = this.state;
|
||||
const { salaryAcctRecordId } = this.props;
|
||||
const dialogBodyHeight = this.dialogRef ? this.dialogRef.state.height : 600;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.getExportTemplateList(this.props));
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getExportTemplateList(this.props));
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: selectedRowKeys => this.setState({ selectedRowKeys })
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll scalable title={getLabel(111, "导出模板管理")}
|
||||
ref={dom => this.dialogRef = dom} initLoadCss className="tempManageDialogLayout"
|
||||
style={{
|
||||
width: 700, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "70%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<WeaTab datas={[]} buttons={[
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({
|
||||
fieldsSetDialog: {
|
||||
...fieldsSetDialog, visible: true, tempId: "", templateName: "",
|
||||
salaryAcctRecordId, checkItems: []
|
||||
}
|
||||
})}/>,
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
|
||||
disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={() => this.deleteExportTemplate(selectedRowKeys)}/>,
|
||||
<WeaInputSearch value={query.templateName}
|
||||
onChange={val => this.setState({ query: { ...query, templateName: val } })}
|
||||
onSearch={() => this.setState({
|
||||
pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.getExportTemplateList(this.props))}/>
|
||||
]}/>
|
||||
<WeaTable dataSource={dataSource} columns={columns} pagination={pagination} rowSelection={rowSelection}
|
||||
scroll={{ y: `calc(${dialogBodyHeight}px - 148px)` }}/>
|
||||
<ExpFieldsSetDialog {...fieldsSetDialog}
|
||||
onCancel={(isRefresh) => this.setState({
|
||||
fieldsSetDialog: { ...fieldsSetDialog, visible: false, checkItems: [] }
|
||||
}, () => isRefresh && this.getExportTemplateList(this.props))}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import { acctResultList, updateLockEmpStatus, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import ProgressModal from "../../../../../components/progressModal";
|
||||
import BatchUpdateSalaryItemValDialog from "./batchUpdateSalaryItemValDialog";
|
||||
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
|
||||
|
|
@ -57,12 +57,15 @@ class EditCalcTable extends Component {
|
|||
this.props.onShowFormulaTd(dataIndex);
|
||||
break;
|
||||
case "LOCKING":
|
||||
const { salaryItemId, lockType: lockStatus } = params;
|
||||
if (lockStatus === "BATCHUPDATE") {
|
||||
const { salaryItemId, lockType } = params;
|
||||
if (lockType === "BATCHUPDATE") {
|
||||
this.batchUpdateSalaryItemVal(params);
|
||||
return;
|
||||
}
|
||||
this.updateLockStatus({ lockStatus, salaryItemId });
|
||||
this.updateLockStatus({ lockStatus: lockType, salaryItemId });
|
||||
break;
|
||||
case "LOCKEMP":
|
||||
this.updateEmpLockStatus({ ...params });
|
||||
break;
|
||||
case "EDIT":
|
||||
const { id: salaryCalcId } = params;
|
||||
|
|
@ -131,6 +134,52 @@ class EditCalcTable extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
updateEmpLockStatus = (payload) => {
|
||||
const { lockStatus } = payload;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: <div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(111, "确定要锁定该人员核算数据吗?") : getLabel(111, "确定要解锁该人员核算数据吗?")}
|
||||
</div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(111, "确定后,核算数据锁定,项目公式失效;点击核算将跳过该人员已核算的项目!") :
|
||||
getLabel(111, "确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!")}
|
||||
</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timerLock = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 1
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
updateLockEmpStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
batchUpdateSalaryItemVal = (payload) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
|
|
@ -180,7 +229,8 @@ class EditCalcTable extends Component {
|
|||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
||||
"批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图")
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图"), "锁定": getLabel(111, "锁定"),
|
||||
"解锁": getLabel(111, "解锁")
|
||||
};
|
||||
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { sysConfCodeRule } from "../../../../../apis/ruleconfig";
|
|||
import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
|
||||
import EditCalcTable from "./editCalcTable";
|
||||
import SalaryMonthTip from "../salaryMonthTip";
|
||||
import SalaryCalcLayout from "./salaryCalcLayout";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -25,10 +26,6 @@ class Index extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const promise = this.init();
|
||||
}
|
||||
|
||||
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
|
||||
onAdSearch = (bool = true) => {
|
||||
this.calcTableRef.wrappedInstance.queryCalcResultList();
|
||||
|
|
@ -56,7 +53,7 @@ class Index extends Component {
|
|||
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
|
||||
return (
|
||||
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
|
||||
<div className="salary-edit-calc-content">
|
||||
<div className="salary-flex-between weapp-salary-tb-tip">
|
||||
<div>
|
||||
|
|
@ -91,7 +88,7 @@ class Index extends Component {
|
|||
{...this.props} showTotalCell={showTotalCell}
|
||||
onShowFormulaTd={this.handleShowFormulaTa}/>
|
||||
</div>
|
||||
);
|
||||
</SalaryCalcLayout>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -207,3 +207,39 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infoConfirmDialog {
|
||||
.confirm-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.contract {
|
||||
text-align: center;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.confirm-container {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
margin-top: 8px;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loadingLayout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
padding: 30px 50px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资核算-layout
|
||||
* Description:
|
||||
* Date: 2024/4/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message, Spin } from "antd";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SalaryCalcLayout extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldInformationConfirm: { visible: false, data: {} }, userConfirmed: "0", show: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getCompareSobConfig();
|
||||
}
|
||||
|
||||
getCompareSobConfig = () => {
|
||||
const { fieldInformationConfirm } = this.state;
|
||||
const { routeParams: { salaryAcctRecordId: id } } = this.props;
|
||||
API.getCompareSobConfig({ id }).then(({ status, data }) => {
|
||||
if (status && data) {
|
||||
this.setState({
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: data }
|
||||
});
|
||||
} else {
|
||||
this.setState({ show: true }, () => this.props.init());
|
||||
}
|
||||
}).catch(() => this.setState({ show: true }, () => this.props.init()));
|
||||
};
|
||||
onOk = () => {
|
||||
const { fieldInformationConfirm } = this.state;
|
||||
const { routeParams: { salaryAcctRecordId: id } } = this.props;
|
||||
API.updateSobConfig({ id }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.setState({
|
||||
show: true,
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||
}, () => {
|
||||
this.props.init();
|
||||
this.props.onConfirm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fieldInformationConfirm, userConfirmed, show } = this.state;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.onOk}
|
||||
disabled={userConfirmed === "0"}>{getLabel(111, "是,更新账套设置")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({
|
||||
show: true,
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||
}, () => this.props.init())}>{getLabel(111, "否,忽略该提示")}</Button>
|
||||
];
|
||||
return (
|
||||
<React.Fragment>
|
||||
{
|
||||
show ? this.props.children : <div className="loadingLayout"><Spin/></div>
|
||||
}
|
||||
<WeaDialog
|
||||
title={getLabel(131329, "信息确认")} visible={fieldInformationConfirm.visible} initLoadCss hasScroll
|
||||
style={{ width: 380 }} className="infoConfirmDialog" buttons={buttons} onCancel={() =>
|
||||
this.setState({
|
||||
show: true,
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||
}, () => this.props.init())}>
|
||||
<div className="confirm-content">
|
||||
<div className="contract">
|
||||
{getLabel("111", "账套发生变更,是否需要更新账套设置?更新后核算将按照最新的账套进行核算,请谨慎操作。")}
|
||||
</div>
|
||||
<div className="confirm-container">
|
||||
<WeaCheckbox value={userConfirmed} content={getLabel("111", "已认真阅读,知晓风险")}
|
||||
onChange={v => this.setState({ userConfirmed: v })}/>
|
||||
</div>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryCalcLayout;
|
||||
|
|
@ -233,23 +233,17 @@ class Index extends Component {
|
|||
/>
|
||||
}
|
||||
{/* 薪资核算-自定义导出*/}
|
||||
<CustomCalcExportDialog
|
||||
{...customExpDialog}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
customExpDialog: { ...customExpDialog, visible: false }
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<CustomCalcExportDialog {...customExpDialog} onCancel={() => {
|
||||
this.setState({
|
||||
customExpDialog: { ...customExpDialog, visible: false }
|
||||
});
|
||||
}}/>
|
||||
{/* 薪资核算-导入*/}
|
||||
<SalaryEditCalcImport
|
||||
{...salaryImpDialog}
|
||||
onCancel={(isFresh) => {
|
||||
this.setState({
|
||||
salaryImpDialog: { ...salaryImpDialog, visible: false }
|
||||
}, () => isFresh && this.calc.onAdSearch(false));
|
||||
}}
|
||||
/>
|
||||
<SalaryEditCalcImport {...salaryImpDialog} onCancel={(isFresh) => {
|
||||
this.setState({
|
||||
salaryImpDialog: { ...salaryImpDialog, visible: false }
|
||||
}, () => isFresh && this.calc.onAdSearch(false));
|
||||
}}/>
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
</Layout>
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@
|
|||
|
||||
.ant-table-tbody {
|
||||
.ant-table-row-indent {
|
||||
display: none;
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
td {
|
||||
td:not(.ant-table-selection-column) {
|
||||
span {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ class AttendanceDataViewSlide extends Component {
|
|||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: o.dataIndex === "username" ? "left" : null }))
|
||||
// o.dataIndex === "username" ? "left" :
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
|
|
|
|||
|
|
@ -550,6 +550,17 @@ export const cumTaxPeriodCondition = [
|
|||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
multiple: true,
|
||||
fieldcol: 18,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}],
|
||||
title: "数据采集",
|
||||
defaultshow: true,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { cumTaxPeriodCondition } from "../columns";
|
||||
|
|
@ -14,6 +15,7 @@ import { onlineRequest } from "../../../../apis/cumDeduct";
|
|||
import { onlineActualAddUpAdvanceTax } from "../../../../apis/cumSituation";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
const APIFox = {
|
||||
online: onlineRequest,
|
||||
advance: onlineActualAddUpAdvanceTax
|
||||
|
|
@ -25,13 +27,23 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false
|
||||
loading: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { cumDeductStore: { cumTaxPeriodForm, changeCumTaxPeriodForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
conditions: _.map(cumTaxPeriodCondition, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return { ...o, lable: getLabel(o.lanId, o.label), options: toJS(nextProps.taxAgentOption) };
|
||||
}
|
||||
return { ...o, lable: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
}))
|
||||
});
|
||||
cumTaxPeriodForm.initFormFields(cumTaxPeriodCondition);
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
|
|
@ -43,18 +55,19 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
save = () => {
|
||||
const { cumDeductStore: { cumTaxPeriodForm }, type } = this.props;
|
||||
cumTaxPeriodForm.validateForm().then(f => {
|
||||
const { declareMonth } = cumTaxPeriodForm.getFormParams();
|
||||
const { declareMonth, taxAgentIds } = cumTaxPeriodForm.getFormParams();
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01" }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01", taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [] })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
|
|
@ -62,17 +75,17 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
const { loading, conditions } = this.state;
|
||||
const { cumDeductStore: { cumTaxPeriodForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog" initLoadCss
|
||||
{...this.props} className="paymentDialog mulSelectDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
buttons={[<Button type="primary" loading={loading} onClick={this.save}>{getLabel(33703, "确认")}</Button>]}
|
||||
bottomLeft={getLabel(111, "点击保存后,稍后请点击【获取结果下载】下载获取结果。获取的数据将覆盖列表原本数据(有则覆盖无则新增)。")}
|
||||
>
|
||||
<div className="paymentDialogContent">
|
||||
{getSearchs(cumTaxPeriodForm, cumTaxPeriodCondition, 1, false)}
|
||||
{getSearchs(cumTaxPeriodForm, conditions, 1, false)}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class Index extends Component {
|
|||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: "", type: ""
|
||||
visible: false, title: "", type: "", taxAgentOption: []
|
||||
},
|
||||
feedbackLoading: false,
|
||||
incomeTaxStatus: false,
|
||||
|
|
@ -97,17 +97,18 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
autoAddAll = () => {
|
||||
const { declareMonth } = this.state;
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
this.setState({ addAllLoading: true });
|
||||
autoAddAll({ yearMonth: declareMonth }).then(({ status, data, errormsg }) => {
|
||||
this.setState({ addAllLoading: false });
|
||||
if (status) {
|
||||
message.success(data || "操作成功");
|
||||
this.tableRef.getTableDate();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
}).catch(() => this.setState({ addAllLoading: false }));
|
||||
autoAddAll({ yearMonth: declareMonth, taxAgentIds: taxAgentId ? taxAgentId.split(",") : [] })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
this.setState({ addAllLoading: false });
|
||||
if (status) {
|
||||
message.success(data || "操作成功");
|
||||
this.tableRef.getTableDate();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
}).catch(() => this.setState({ addAllLoading: false }));
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -376,8 +377,8 @@ class Index extends Component {
|
|||
label: "个税扣缴义务人",
|
||||
value: taxAgentId,
|
||||
onChange: this.screenChange,
|
||||
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
|
||||
key: "taxAgentId"
|
||||
options: taxAgentOption,
|
||||
key: "taxAgentId", multiple: true
|
||||
})
|
||||
}
|
||||
];
|
||||
|
|
@ -400,6 +401,7 @@ class Index extends Component {
|
|||
*/
|
||||
getTopBtns = () => {
|
||||
const { addAllLoading, cumTaxPeriodDialog, feedbackLoading, incomeTaxStatus } = this.state;
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
|
|
@ -420,7 +422,7 @@ class Index extends Component {
|
|||
const incomeTaxBtns = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
cumTaxPeriodDialog: {
|
||||
...cumTaxPeriodDialog,
|
||||
...cumTaxPeriodDialog, taxAgentOption,
|
||||
visible: true, type: "online",
|
||||
title: getLabel(542240, "税款所属期")
|
||||
}
|
||||
|
|
@ -541,7 +543,7 @@ class Index extends Component {
|
|||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType, cumTaxPeriodDialog, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentIds: taxAgentId ? taxAgentId.split(",") : [] };
|
||||
return (
|
||||
<Layout title="累计专项附加扣除" btns={this.getTopBtns()} leftComp={this.getScreen()}
|
||||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
|
|
@ -590,10 +592,13 @@ export const DataCollectionDatePicker = (props) => {
|
|||
</WeaFormItem>;
|
||||
};
|
||||
export const DataCollectionSelect = (props) => {
|
||||
const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14, viewAttr = 2 } = props;
|
||||
const {
|
||||
value, label, onChange, options, key, labelCol = 10,
|
||||
wrapperCol = 14, viewAttr = 2, multiple = false
|
||||
} = props;
|
||||
return <WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
|
||||
<WeaSelect value={value} onChange={(val) => onChange({ key, value: val })} options={options}
|
||||
viewAttr={viewAttr}/>
|
||||
viewAttr={viewAttr} multiple={multiple}/>
|
||||
</WeaFormItem>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@
|
|||
.wea-helpful-tip {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.screenSituationWrapper {
|
||||
|
|
|
|||
|
|
@ -119,22 +119,6 @@ class Layout extends Component {
|
|||
importOpts={importOpts} importResult={importResult} templateLink={templateLink}
|
||||
previewUrl={previewUrl} onImportFile={onImportFile}
|
||||
/>
|
||||
{/*<ImportModal*/}
|
||||
{/* needimportSelected //下载模板需要带上导入所选项*/}
|
||||
{/* columns={columns}*/}
|
||||
{/* params={importOpts}*/}
|
||||
{/* step={step}*/}
|
||||
{/* setStep={onImportSetStep}*/}
|
||||
{/* importResult={importResult}*/}
|
||||
{/* onFinish={() => onCancel(true)}*/}
|
||||
{/* slideDataSource={slideDataSource}*/}
|
||||
{/* previewImport={onPreviewImport}*/}
|
||||
{/* importFile={onImportFile}*/}
|
||||
{/* templateLink={templateLink}*/}
|
||||
{/* renderFormComponent={() => importFormComponent}*/}
|
||||
{/* visiable={importVisiable}*/}
|
||||
{/* onCancel={onCancel}*/}
|
||||
{/*/>*/}
|
||||
{/* 新增-编辑-详情弹框 */}
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 报表查看-左侧tab标题
|
||||
* Description:
|
||||
* Date: 2023/4/20
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Menu } from "antd";
|
||||
import * as API from "../../../apis/declare";
|
||||
import { getQueryString } from "../../../util/url";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class LeftTab extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
reportName: "",
|
||||
selectedKeys: "",
|
||||
dataSource: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getTaxReports();
|
||||
}
|
||||
|
||||
getTaxReports = () => {
|
||||
const { onChangeTab, onCollapse } = this.props;
|
||||
API.getTaxReports({ id: getQueryString("id") }).then(({ status, data: dataSource }) => {
|
||||
if (status) this.setState({
|
||||
dataSource, selectedKeys: !_.isEmpty(dataSource) ? _.head(dataSource).id + "" : ""
|
||||
}, () => {
|
||||
!_.isEmpty(this.state.dataSource) && onChangeTab(_.head(this.state.dataSource).reportType);
|
||||
onCollapse(!_.isEmpty(this.state.dataSource) && this.state.dataSource.length > 1);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKeys, dataSource } = this.state;
|
||||
const { onChangeTab } = this.props;
|
||||
const reportTypeNameMap = {
|
||||
1: getLabel(111, "综合所得"),
|
||||
2: getLabel(111, "分类所得"),
|
||||
3: getLabel(111, "非居民所得"),
|
||||
4: getLabel(111, "限售股所得")
|
||||
};
|
||||
return (
|
||||
<div className="leftTabWrapper">
|
||||
<Menu mode="inline" selectedKeys={selectedKeys}
|
||||
onClick={({ key }) => {
|
||||
this.setState({ selectedKeys: key }, () => {
|
||||
onChangeTab(_.find(dataSource, o => String(o.id) === key).reportType, true);
|
||||
});
|
||||
}}
|
||||
>
|
||||
{
|
||||
_.map(dataSource, item => {
|
||||
const { reportType, id } = item;
|
||||
return <Menu.Item key={id + ""}>{reportTypeNameMap[reportType]}</Menu.Item>;
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LeftTab;
|
||||
|
|
@ -262,7 +262,8 @@ class PaymentBtn extends Component {
|
|||
const { taxAgentId, taxCycle: taxYearMonth } = this.props.declareInfo;
|
||||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("id"),
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01"
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01",
|
||||
reportType: this.props.reportType
|
||||
};
|
||||
taxPaymentVoucherCancel(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ class TaxDeclarationInfo extends Component {
|
|||
const { declareInfo, onOperate } = this.props;
|
||||
const { abnormalSize, declareFailSize } = declareInfo;
|
||||
const infoItem = [
|
||||
{ key: "taxCycle", label: getLabel(542240, "税款所属期") },
|
||||
{ key: "salaryMonth", label: getLabel(542604, "薪资所属月") },
|
||||
{ key: "taxAgentName", label: getLabel(537996, "个税扣缴义务人") },
|
||||
{ key: "declareTypeDesc", label: getLabel(111, "申报类型") },
|
||||
{ key: "declareStatusDesc", label: getLabel(111, "申报状态") },
|
||||
{ key: "taxCycle", label: getLabel(542240, "税款所属期") },
|
||||
{ key: "taxPaidAmount", label: getLabel(111, "已缴金额") }
|
||||
];
|
||||
let dropMenuDatas = [];
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { WeaLocaleProvider } from "ecCom";
|
|||
import { Modal } from "antd";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
export const confirmDialog = (type, callback) => {
|
||||
export const confirmDialog = (type, callback, reportType) => {
|
||||
let content = "";
|
||||
switch (type) {
|
||||
case "refresh":
|
||||
|
|
@ -15,7 +15,7 @@ export const confirmDialog = (type, callback) => {
|
|||
content = getLabel(111, "申报作废,只有申报成功,无需缴款/申报成功,未缴款的状态才能作废,当作废成功时,企业状态会变成未申报;当作废失败时,企业状态还是原来的未缴款或无需缴款的状态。");
|
||||
break;
|
||||
case "declare":
|
||||
content = getLabel(111, "解除劳动合同一次性补偿金、全年一次性奖金所得,不能单独申报,需要同正常工资薪金一起申报;解除劳动合同一次性补偿金、稿酬所得,由于税务规则需要,解除劳动合同一次性补偿金、稿酬所得必须填写免税附表。是否确认申报?");
|
||||
content = reportType === 1 ? getLabel(111, "解除劳动合同一次性补偿金、全年一次性奖金所得,不能单独申报,需要同正常工资薪金一起申报;解除劳动合同一次性补偿金、稿酬所得,由于税务规则需要,解除劳动合同一次性补偿金、稿酬所得必须填写免税附表。是否确认申报?") : getLabel(111, "确认申报?");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/8/18
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTab } from "ecCom";
|
||||
import { WeaLeftRightLayout, WeaLocaleProvider, WeaTab } from "ecCom";
|
||||
import { Button, message, Modal, Spin } from "antd";
|
||||
import TaxDeclarationInfo from "./components/taxDeclarationInfo";
|
||||
import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalarySettings";
|
||||
|
|
@ -25,13 +25,13 @@ import {
|
|||
taxdeclarationRefreshData,
|
||||
taxdeclaratioUpdateCancel,
|
||||
taxdeclaratioUpdateDeclare,
|
||||
taxPaymentVoucherStatusSync,
|
||||
taxPaymentWithheldVoucherGet
|
||||
taxPaymentVoucherStatusSync
|
||||
} from "../../apis/declare";
|
||||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
import IncomeTaxDeclarationPersonnelSlide from "./components/incomeTaxDeclarationPersonnelSlide";
|
||||
import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDialog";
|
||||
import TabEditDialog from "./components/tabEditDialog";
|
||||
import LeftTab from "./components/leftTab";
|
||||
import { confirmDialog } from "./confirm";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -60,7 +60,8 @@ class Index extends Component {
|
|||
visible: false, title: getLabel(1421, "新增"), taxDeclarationId: "", id: ""
|
||||
},
|
||||
intelCalcSalaryStatus: false, //智能算薪 总开关是否开启
|
||||
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 }
|
||||
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
reportType: "", showLeft: false
|
||||
};
|
||||
this.timer = null;
|
||||
this.taxDeclareRef = null;
|
||||
|
|
@ -75,7 +76,8 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
init = async (isInit = true) => {
|
||||
const [tabsResult, infoResult, calcResult] = await Promise.all([this.getTaxDeclarationTab(), this.getDeclareInfo(), this.apiflowBillingConfigStatus()]);
|
||||
const [tabsResult, infoResult, calcResult] = await Promise.all([
|
||||
this.getTaxDeclarationTab(), this.getDeclareInfo(), this.apiflowBillingConfigStatus()]);
|
||||
const { data: tabDataSource, status: tabStatus } = tabsResult;
|
||||
const { data: infoDataSource, status: infoStatus } = infoResult;
|
||||
const { data: calcSalaryStatus, status: calcStatus } = calcResult;
|
||||
|
|
@ -101,10 +103,12 @@ class Index extends Component {
|
|||
this.getDetailList();
|
||||
};
|
||||
getTaxDeclarationTab = () => {
|
||||
return getTaxDeclarationTab({ id: getQueryString("id") });
|
||||
const { reportType } = this.state;
|
||||
return getTaxDeclarationTab({ taxDeclareRecordId: getQueryString("id"), reportType });
|
||||
};
|
||||
getDeclareInfo = () => {
|
||||
return getDeclareInfo({ id: getQueryString("id") });
|
||||
const { reportType } = this.state;
|
||||
return getDeclareInfo({ taxDeclareRecordId: getQueryString("id"), reportType });
|
||||
};
|
||||
apiflowBillingConfigStatus = () => {
|
||||
return apiflowBillingConfigStatus();
|
||||
|
|
@ -183,7 +187,7 @@ class Index extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
handleOperateDeclare = (type) => {
|
||||
handleOperateDeclare = (type, params = {}) => {
|
||||
const loadingTxt = {
|
||||
refresh: getLabel(111, "刷新中..."), //刷新数据
|
||||
declare: getLabel(111, "申报中..."), //在线申报
|
||||
|
|
@ -207,7 +211,7 @@ class Index extends Component {
|
|||
cancelFeedback: getLabel(111, "作废反馈失败!")//作废反馈
|
||||
};
|
||||
this.setState({ loading: { ...this.state.loading, [type]: true } });
|
||||
APIFox[type]({ taxDeclareRecordId: getQueryString("id") })
|
||||
APIFox[type]({ taxDeclareRecordId: getQueryString("id"), ...params })
|
||||
.then(async ({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
message.destroy();
|
||||
|
|
@ -247,7 +251,8 @@ class Index extends Component {
|
|||
const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo;
|
||||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("id"),
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01"
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01",
|
||||
reportType: this.state.reportType
|
||||
};
|
||||
this.setState({ loading: { ...this.state.loading, refreshingPay: true } });
|
||||
taxPaymentVoucherStatusSync(payload).then(({ status, errormsg }) => {
|
||||
|
|
@ -264,17 +269,19 @@ class Index extends Component {
|
|||
const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo;
|
||||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("id"),
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01"
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01",
|
||||
reportType: this.state.reportType
|
||||
};
|
||||
this.setState({ loading: { ...this.state.loading, issuance: true } });
|
||||
taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, issuance: false } });
|
||||
if (status && !_.isEmpty(data.vouchers)) {
|
||||
window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/enterprisePayCertificationDetail?${convertToUrlString(payload)}`);
|
||||
} else {
|
||||
message.error(errormsg || "");
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...this.state.loading, issuance: false } }));
|
||||
window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/enterprisePayCertificationDetail?${convertToUrlString(payload)}`);
|
||||
// this.setState({ loading: { ...this.state.loading, issuance: true } });
|
||||
// taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {
|
||||
// this.setState({ loading: { ...this.state.loading, issuance: false } });
|
||||
// if (status && !_.isEmpty(data.vouchers)) {
|
||||
// window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/enterprisePayCertificationDetail?${convertToUrlString(payload)}`);
|
||||
// } else {
|
||||
// message.error(errormsg || "");
|
||||
// }
|
||||
// }).catch(() => this.setState({ loading: { ...this.state.loading, issuance: false } }));
|
||||
};
|
||||
export = () => {
|
||||
const [incomeCategory, taxDeclarationId] = this.state.selectedKey.split("%%");
|
||||
|
|
@ -294,9 +301,10 @@ class Index extends Component {
|
|||
}, () => callback && this.getDetailList());
|
||||
};
|
||||
exportGetDeclareTaxResultFeedback = () => {
|
||||
const { reportType } = this.state;
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "下载中..."), 0);
|
||||
exportGetDeclareTaxResultFeedback({ id: getQueryString("id") })
|
||||
exportGetDeclareTaxResultFeedback({ id: getQueryString("id"), reportType })
|
||||
.then(async () => {
|
||||
message.destroy();
|
||||
message.success(getLabel(111, "下载成功!"));
|
||||
|
|
@ -338,12 +346,13 @@ class Index extends Component {
|
|||
render() {
|
||||
const {
|
||||
tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide,
|
||||
editTabVisible
|
||||
editTabVisible, reportType, showLeft
|
||||
} = this.state;
|
||||
const [__, taxDeclarationId] = selectedKey.split("%%");
|
||||
let btns = [
|
||||
<Button type="primary" onClick={this.export}>{getLabel(17416, "导出")}</Button>,
|
||||
<Button type="ghost" onClick={() => confirmDialog("declare", () => this.handleOperateDeclare("declare"))}
|
||||
<Button type="ghost"
|
||||
onClick={() => confirmDialog("declare", () => this.handleOperateDeclare("declare", { reportType }), reportType)}
|
||||
loading={loading.declare}>{getLabel(111, "在线申报")}</Button>,
|
||||
<Button type="ghost" onClick={() => confirmDialog("refresh", () => this.handleOperateDeclare("refresh"))}
|
||||
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>
|
||||
|
|
@ -355,30 +364,30 @@ class Index extends Component {
|
|||
//申报状态:申报中
|
||||
declareInfo.declareStatus === "DECLARING" && (btns.splice(1, 2, <Button
|
||||
type="ghost" loading={loading.feedback}
|
||||
onClick={() => this.handleOperateDeclare("feedback")}>{getLabel(111, "申报反馈")}</Button>));
|
||||
onClick={() => this.handleOperateDeclare("feedback", { reportType })}>{getLabel(111, "申报反馈")}</Button>));
|
||||
//申报状态:缴款中
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_PAYING" && (btns.splice(1, 2));
|
||||
//申报状态:已缴款
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_PAID" && (btns.splice(1, 2,
|
||||
<Button type="ghost" loading={loading.correct}
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct"))}>{getLabel(111, "更正申报")}</Button>));
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>));
|
||||
//申报状态:申报成功,无需缴款
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_NO_PAY" &&
|
||||
(btns.splice(1, 2,
|
||||
<Button type="ghost" loading={loading.correct}
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct"))}>{getLabel(111, "更正申报")}</Button>,
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>,
|
||||
<Button type="ghost"
|
||||
loading={loading.cancel}
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel"))}>{getLabel(111, "作废申报")}</Button>
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>
|
||||
));
|
||||
//申报状态:申报成功,未缴款
|
||||
declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID" &&
|
||||
(btns.splice(1, 2,
|
||||
<Button type="ghost" loading={loading.correct}
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct"))}>{getLabel(111, "更正申报")}</Button>,
|
||||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>,
|
||||
<Button type="ghost"
|
||||
loading={loading.cancel}
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel"))}>{getLabel(111, "作废申报")}</Button>,
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>,
|
||||
<Button type="ghost"
|
||||
loading={loading.refreshingPay}
|
||||
onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>
|
||||
|
|
@ -404,7 +413,7 @@ class Index extends Component {
|
|||
}
|
||||
if (intelCalcSalaryStatus && (declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID")) {
|
||||
btns.push(
|
||||
<PaymentBtn declareInfo={declareInfo} updateDeclare={this.declare}/>,
|
||||
<PaymentBtn declareInfo={declareInfo} updateDeclare={this.declare} reportType={reportType}/>,
|
||||
<PaymentFeedbackBtn declareInfo={declareInfo} updateDeclare={this.declare}/>
|
||||
);
|
||||
}
|
||||
|
|
@ -413,41 +422,49 @@ class Index extends Component {
|
|||
onClick={this.getEnterprisePayCertificate}>{getLabel(111, "开具企业完税证明")}</Button>);
|
||||
}
|
||||
return (
|
||||
<div className="declareDetail-layout">
|
||||
<TaxDeclarationInfo declareInfo={declareInfo} onOperate={fun => this[fun]()}/>
|
||||
<div className="declareDetail-layout-content">
|
||||
<WeaTab
|
||||
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey} showAddBtn buttons={btns}
|
||||
type="editable-inline" onEdit={this.handleTabEdit} leftStyle={{ width: "calc(100% - 450px)" }}
|
||||
onChange={(v) => this.setState({ selectedKey: v }, () => this.getDetailList())}
|
||||
searchType={["base"]} searchsBasePlaceHolder={getLabel(26919, "请输入姓名")}
|
||||
onSearchChange={keyword => this.setState({ keyword })}
|
||||
onSearch={this.getDetailList}
|
||||
/>
|
||||
{/*个税申报表-新增编辑框*/}
|
||||
<IncomeTaxDeclarationPersonnelSlide
|
||||
{...taxDecPersonSlide}
|
||||
onClose={(callback) => this.handleTaxDescPerSlide({ visible: false, id: "", callback })}
|
||||
/>
|
||||
{/*个税申报表导入*/}
|
||||
<TaxDeclareDetailImportDialog ref={dom => this.taxDeclareRef = dom}
|
||||
onSuccess={this.declare}
|
||||
/>
|
||||
{/*个税申报表-新增tab弹框*/}
|
||||
<TabEditDialog visible={editTabVisible}
|
||||
onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
|
||||
</div>
|
||||
<div className="declareDetail-layout-table-content">
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/taxDeclareTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/taxDeclareTable"
|
||||
id="atdTable"
|
||||
<WeaLeftRightLayout
|
||||
showLeft={showLeft}
|
||||
leftWidth={210}
|
||||
leftCom={<LeftTab
|
||||
onChangeTab={(reportType, isInit = false) => this.setState({ reportType }, () => isInit && this.init())}
|
||||
onCollapse={showLeft => this.setState({ showLeft })}/>}
|
||||
onCollapse={showLeft => this.setState({ showLeft })}>
|
||||
<div className="declareDetail-layout">
|
||||
<TaxDeclarationInfo declareInfo={declareInfo} onOperate={fun => this[fun]()}/>
|
||||
<div className="declareDetail-layout-content">
|
||||
<WeaTab
|
||||
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey} showAddBtn buttons={btns}
|
||||
type="editable-inline" onEdit={this.handleTabEdit} leftStyle={{ width: "calc(100% - 450px)" }}
|
||||
onChange={(v) => this.setState({ selectedKey: v }, () => this.getDetailList())}
|
||||
searchType={["base"]} searchsBasePlaceHolder={getLabel(26919, "请输入姓名")}
|
||||
onSearchChange={keyword => this.setState({ keyword })}
|
||||
onSearch={this.getDetailList}
|
||||
/>
|
||||
</Spin>
|
||||
{/*个税申报表-新增编辑框*/}
|
||||
<IncomeTaxDeclarationPersonnelSlide
|
||||
{...taxDecPersonSlide}
|
||||
onClose={(callback) => this.handleTaxDescPerSlide({ visible: false, id: "", callback })}
|
||||
/>
|
||||
{/*个税申报表导入*/}
|
||||
<TaxDeclareDetailImportDialog ref={dom => this.taxDeclareRef = dom}
|
||||
onSuccess={this.declare}
|
||||
/>
|
||||
{/*个税申报表-新增tab弹框*/}
|
||||
<TabEditDialog visible={editTabVisible}
|
||||
onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
|
||||
</div>
|
||||
<div className="declareDetail-layout-table-content">
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/taxDeclareTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/taxDeclareTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</WeaLeftRightLayout>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,6 +232,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mulSelectDialog {
|
||||
.wea-form-item .wea-form-item-wrapper {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.wea-date-picker {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeTaxDecPerSlideWrapper {
|
||||
.wea-slide-modal-content {
|
||||
background: #f6f6f6;
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
* Date: 2023/8/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaSlideModal } from "ecCom";
|
||||
import { Button, Col, message, Modal, Row } from "antd";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
|
||||
import { Button, Col, message, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { declareConditions } from "../constants";
|
||||
import { getSearchs } from "../../../util";
|
||||
import { getQueryString } from "../../../util/url";
|
||||
import { employeedeclareGetForm, getEmployeeSave } from "../../../apis/declare";
|
||||
import { commonEnumList } from "../../../apis/archive";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("employeeDeclareStore")
|
||||
|
|
@ -30,10 +32,14 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareGetForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.employeeChangeInfo = {};
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.props.employeeDeclareStore.initDeclareForm()
|
||||
this.employeeChangeInfo = {};
|
||||
}
|
||||
}
|
||||
|
||||
employeedeclareGetForm = (props) => {
|
||||
employeedeclareGetForm = async (props) => {
|
||||
const { data: cardTypeEnum } = await commonEnumList({ enumClass: `com.engine.salary.enums.employeedeclare.CardTypeEnum` });
|
||||
employeedeclareGetForm(_.pick(props, ["id"])).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
|
|
@ -41,7 +47,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
return {
|
||||
...it,
|
||||
items: _.map(it.items, child => {
|
||||
if (child.domkey[0] === "employmentStatus") {
|
||||
if (getKey(child) === "employmentStatus") {
|
||||
return {
|
||||
...child,
|
||||
value: _.take(props.employmentStatusList)[0].enum,
|
||||
|
|
@ -50,7 +56,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
showname: getLabel(it.labelId, it.defaultLabel)
|
||||
}))
|
||||
};
|
||||
} else if (child.domkey[0] === "employmentType") {
|
||||
} else if (getKey(child) === "employmentType") {
|
||||
return {
|
||||
...child,
|
||||
value: _.take(props.employmentTypeList)[0].enum,
|
||||
|
|
@ -59,7 +65,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
showname: getLabel(it.labelId, it.defaultLabel)
|
||||
}))
|
||||
};
|
||||
} else if (child.domkey[0] === "gender") {
|
||||
} else if (getKey(child) === "gender") {
|
||||
return {
|
||||
...child,
|
||||
value: "MALE",
|
||||
|
|
@ -68,7 +74,11 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
{ key: "FEMALE", showname: getLabel(111, "女") }
|
||||
]
|
||||
};
|
||||
} else if (child.domkey[0] === "employeeType") {
|
||||
} else if (getKey(child) === "cardType") {
|
||||
return {
|
||||
...child, options: _.map(cardTypeEnum, o => ({ key: o.enum, showname: o.defaultLabel }))
|
||||
};
|
||||
} else if (getKey(child) === "employeeType") {
|
||||
return {
|
||||
...child,
|
||||
viewAttr: props.id ? 1 : 3,
|
||||
|
|
@ -77,7 +87,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
]
|
||||
};
|
||||
}
|
||||
if (child.conditionType === "SELECT" && child.domkey[0] !== "gender" && child.domkey[0] !== "employmentStatus" && child.domkey[0] !== "employmentType") {
|
||||
if (child.conditionType === "SELECT" && getKey(child) !== "gender" && getKey(child) !== "employmentStatus" && getKey(child) !== "employmentType" && getKey(child) !== "taxReasons") {
|
||||
return {
|
||||
...child,
|
||||
options: [
|
||||
|
|
@ -93,37 +103,37 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
employeeInfo: data.data
|
||||
}, () => {
|
||||
const { data: result, columns } = data;
|
||||
const { employeeDeclareStore: { declareForm } } = this.props;
|
||||
const { employeeDeclareStore: { declareForm }, id } = props;
|
||||
declareForm.initFormFields(this.state.eConditions);
|
||||
const filedKes = _.map(columns, it => it.dataIndex);
|
||||
_.map(filedKes, item => {
|
||||
if (item === "disability" || item === "lonelyOld" || item === "martyrDependents") {
|
||||
declareForm.updateFields({ [item]: result[item] || "OFF" });
|
||||
} else if (item === "deductExpenses") {
|
||||
declareForm.updateFields({ [item]: result[item] || "ON" });
|
||||
} else if (item === "gender") {
|
||||
declareForm.updateFields({ [item]: result[item] || "MALE" });
|
||||
} else if (item === "employmentStatus") {
|
||||
declareForm.updateFields({ [item]: result[item] || _.take(props.employmentStatusList)[0].enum });
|
||||
} else if (item === "employmentType") {
|
||||
declareForm.updateFields({ [item]: result[item] || _.take(props.employmentTypeList)[0].enum });
|
||||
} else if (item === "cardType") {
|
||||
declareForm.updateFields({ [item]: "居民身份证" });
|
||||
} else if (item === "employee") {
|
||||
const [employeeData] = result[item] || [];
|
||||
!_.isEmpty(employeeData) && declareForm.updateFields({
|
||||
employeeType: {
|
||||
value: [employeeData._entityType, [employeeData.id, employeeData.name, [{
|
||||
id: employeeData.id,
|
||||
lastname: employeeData.name
|
||||
}]]],
|
||||
valueSpan: ["employeeId"]
|
||||
}
|
||||
});
|
||||
} else {
|
||||
declareForm.updateFields({ [item]: result[item] || "" });
|
||||
}
|
||||
});
|
||||
if (id) {
|
||||
const filedKes = _.map(columns, it => it.dataIndex);
|
||||
_.map(filedKes, item => {
|
||||
if (item === "disability" || item === "lonelyOld" || item === "martyrDependents") {
|
||||
declareForm.updateFields({ [item]: result[item] || "OFF" });
|
||||
} else if (item === "deductExpenses") {
|
||||
declareForm.updateFields({ [item]: result[item] || "ON" });
|
||||
} else if (item === "gender") {
|
||||
declareForm.updateFields({ [item]: result[item] || "MALE" });
|
||||
} else if (item === "employmentStatus") {
|
||||
declareForm.updateFields({ [item]: result[item] || _.take(props.employmentStatusList)[0].enum });
|
||||
} else if (item === "employmentType") {
|
||||
declareForm.updateFields({ [item]: result[item] || _.take(props.employmentTypeList)[0].enum });
|
||||
} else if (item === "employee") {
|
||||
const [employeeData] = result[item] || [];
|
||||
!_.isEmpty(employeeData) && declareForm.updateFields({
|
||||
employeeType: {
|
||||
value: [employeeData._entityType, [employeeData.id, employeeData.name, [{
|
||||
id: employeeData.id,
|
||||
lastname: employeeData.name
|
||||
}]]],
|
||||
valueSpan: ["employeeId"]
|
||||
}
|
||||
});
|
||||
} else {
|
||||
declareForm.updateFields({ [item]: result[item] || "" });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -146,7 +156,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
return {
|
||||
...it,
|
||||
items: _.map(it.items, child => {
|
||||
if (child.domkey[0] === "dismissDate") {
|
||||
if (getKey(child) === "dismissDate") {
|
||||
return {
|
||||
...child,
|
||||
viewAttr: value === "ABNORMAL" ? 3 : 2
|
||||
|
|
@ -176,7 +186,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
return {
|
||||
...it,
|
||||
items: _.map(it.items, child => {
|
||||
if (child.domkey[0] === "employmentDate") {
|
||||
if (getKey(child) === "employmentDate") {
|
||||
return {
|
||||
...child,
|
||||
viewAttr: value !== "OTHER" ? 3 : 2
|
||||
|
|
@ -200,6 +210,39 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
});
|
||||
});
|
||||
break;
|
||||
case "cardType":
|
||||
this.setState({
|
||||
eConditions: _.map(eConditions, it => {
|
||||
return {
|
||||
...it,
|
||||
items: _.map(it.items, child => {
|
||||
if (
|
||||
getKey(child) === "entryDate" || getKey(child) === "departureDate" ||
|
||||
getKey(child) === "birthplace" || getKey(child) === "taxReasons"
|
||||
) {
|
||||
return {
|
||||
...child,
|
||||
viewAttr: value !== "RESIDENT_IDENTITY_CARDS" ? 3 : 2
|
||||
};
|
||||
}
|
||||
return { ...child };
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
declareForm.initFormFields(this.state.eConditions);
|
||||
const [employeeData] = this.state.employeeInfo["employee"] || this.employeeChangeInfo["employee"] || [];
|
||||
!_.isEmpty(employeeData) && declareForm.updateFields({
|
||||
employeeType: {
|
||||
value: [employeeData._entityType, [employeeData.id, employeeData.name, [{
|
||||
id: employeeData.id,
|
||||
lastname: employeeData.name
|
||||
}]]],
|
||||
valueSpan: ["employeeId"]
|
||||
}
|
||||
});
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -209,17 +252,39 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
const { employeeDeclareStore: { declareForm: form } } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { employmentType, employmentDate, employmentStatus, dismissDate, ...params } = form.getFormParams();
|
||||
const {
|
||||
employmentType, employmentDate, employmentStatus, dismissDate, cardType, entryDate, departureDate,
|
||||
birthplace, taxReasons, ...params
|
||||
} = form.getFormParams();
|
||||
if ((employmentType !== "OTHER" && !employmentDate) || (employmentStatus === "ABNORMAL" && !dismissDate)) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
form.showError("dismissDate", getLabel(111, "\"离职日期\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !entryDate && !departureDate && !birthplace && !taxReasons)) {
|
||||
form.showError("entryDate", getLabel(111, "\"首次入境时间\"未填写"));
|
||||
form.showError("departureDate", getLabel(111, "\"预计离境时间\"未填写"));
|
||||
form.showError("birthplace", getLabel(111, "\"出生地\"未填写"));
|
||||
form.showError("taxReasons", getLabel(111, "\"涉税事由\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !entryDate)) {
|
||||
form.showError("entryDate", getLabel(111, "\"首次入境时间\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !departureDate)) {
|
||||
form.showError("departureDate", getLabel(111, "\"预计离境时间\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !birthplace)) {
|
||||
form.showError("birthplace", getLabel(111, "\"出生地\"未填写"));
|
||||
return;
|
||||
}
|
||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !taxReasons)) {
|
||||
form.showError("taxReasons", getLabel(111, "\"涉税事由\"未填写"));
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
...form.getFormParams(), id: this.props.id,
|
||||
cardType: "RESIDENT_IDENTITY_CARDS", //暂时写死身份证类型
|
||||
taxAgentId: getQueryString("id"),
|
||||
taxCycle: this.props.taxCycle
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
export const submitStatus = [
|
||||
{
|
||||
key: "ALL",
|
||||
|
|
@ -243,18 +247,21 @@ export const declareConditions = [
|
|||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
conditionType: "SELECT",
|
||||
domkey: ["cardType"],
|
||||
fieldcol: 12,
|
||||
label: "证件类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "居民身份证",
|
||||
viewAttr: 1
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -281,6 +288,17 @@ export const declareConditions = [
|
|||
rules: "required",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["birthplace"],
|
||||
fieldcol: 12,
|
||||
label: "出生地",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "DATEPICKER",
|
||||
|
|
@ -354,6 +372,47 @@ export const declareConditions = [
|
|||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["entryDate"],
|
||||
fieldcol: 12,
|
||||
label: "首次入境时间",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["departureDate"],
|
||||
fieldcol: 12,
|
||||
label: "预计离境时间",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxReasons"],
|
||||
fieldcol: 12,
|
||||
label: "涉税事由",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
multiple: true,
|
||||
viewAttr: 2,
|
||||
options: [
|
||||
{ key: getLabel(111, "任职受雇"), showname: getLabel(111, "任职受雇") },
|
||||
{ key: getLabel(111, "提供临时劳务"), showname: getLabel(111, "提供临时劳务") },
|
||||
{ key: getLabel(111, "转让财产"), showname: getLabel(111, "转让财产") },
|
||||
{ key: getLabel(111, "从事投资和经营活动"), showname: getLabel(111, "从事投资和经营活动") },
|
||||
{ key: getLabel(111, "其他"), showname: getLabel(111, "其他") }
|
||||
]
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
|
|
@ -362,7 +421,7 @@ export const declareConditions = [
|
|||
label: "是否残疾",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
value: "OFF",
|
||||
viewAttr: 2,
|
||||
detailtype: 3,
|
||||
options: []
|
||||
|
|
@ -386,7 +445,7 @@ export const declareConditions = [
|
|||
label: "是否孤老",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
value: "OFF",
|
||||
viewAttr: 2,
|
||||
detailtype: 3,
|
||||
options: []
|
||||
|
|
@ -399,7 +458,7 @@ export const declareConditions = [
|
|||
label: "是否是烈属",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
value: "OFF",
|
||||
viewAttr: 2,
|
||||
detailtype: 3,
|
||||
options: []
|
||||
|
|
@ -423,7 +482,7 @@ export const declareConditions = [
|
|||
label: "是否扣除减除费用",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
value: "ON",
|
||||
viewAttr: 2,
|
||||
detailtype: 3,
|
||||
options: []
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import {
|
|||
employeedeclareList4Add,
|
||||
employeedeclareList4Update,
|
||||
employeedeclareRefresh,
|
||||
employeeDelete,
|
||||
employeeDelete, employeeInvalid,
|
||||
getDeclareFeedback
|
||||
} from "../../apis/declare";
|
||||
import { advanceConditions, submitStatus } from "./constants";
|
||||
|
|
@ -133,6 +133,8 @@ class Index extends Component {
|
|||
});
|
||||
} else if (id === "DELETE") {
|
||||
this.handleDeleteDeclare([params.id]);
|
||||
} else if (id === "VOID") {
|
||||
this.handleVoidDeclare(params.id);
|
||||
} else if (id === "ROWSELECT") {
|
||||
const { selectedRowKeys } = params;
|
||||
this.setState({ selectedRowKeys });
|
||||
|
|
@ -144,7 +146,7 @@ class Index extends Component {
|
|||
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
|
||||
"操作": getLabel(30585, "操作"), "删除": getLabel(535052, "删除"),
|
||||
"共": getLabel(83698, "共"), "条": getLabel(18256, "条"),
|
||||
"加载中": getLabel(83698, "加载中")
|
||||
"加载中": getLabel(83698, "加载中"), "作废": getLabel(111, "作废")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
|
|
@ -293,6 +295,29 @@ class Index extends Component {
|
|||
this.setState({ loading: { ...this.state.loading, feedback: false } });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:作废个税申报人员信息
|
||||
* Params:
|
||||
* Date: 2024/4/16
|
||||
*/
|
||||
handleVoidDeclare = (id) => {
|
||||
const { selectedRowKeys } = this.state;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认作废吗?"),
|
||||
onOk: () => {
|
||||
employeeInvalid({ id }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "作废成功!"));
|
||||
this.queryEmployeeList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(111, "作废失败!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 删除个税申报人员信息
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ class Index extends Component {
|
|||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("taxDeclareRecordId"),
|
||||
taxAgentId: getQueryString("taxAgentId"),
|
||||
taxYearMonth: getQueryString("taxYearMonth")
|
||||
taxYearMonth: getQueryString("taxYearMonth"),
|
||||
reportType: getQueryString("reportType")
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ledgerSlideContent {
|
||||
.ledgerSlideLayout {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
padding-right: 45px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
||||
right: 45px !important;
|
||||
}
|
||||
|
||||
.ledgerSlideContent {
|
||||
}
|
||||
}
|
||||
|
||||
.copyWrapper {
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
|||
const options = _.map(empFieldListOptions, o => ({
|
||||
...o, disabled: _.map(dataSource, g => g.fieldId).includes(o.key)
|
||||
}));
|
||||
if (_.isEmpty(dataSource) || _.isEmpty(options)) return null;
|
||||
return (
|
||||
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
|
||||
<div className="userInfoWrapper">
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import LedgerSalaryItemEditSlide from "./ledgerSalaryItemEditSlide";
|
|||
import { getSalaryItemForm } from "../../../apis/ledger";
|
||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import FormalFormModal from "../../salaryItem/formalFormModal";
|
||||
import { toDecimal_n } from "../../../util";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -113,7 +114,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
handleEditSalaryItem = async (record) => {
|
||||
const { salarySobId, dataSource } = this.props, { salaryItemId, id } = record;
|
||||
const {
|
||||
itemHide: hideDefault,
|
||||
itemHide: hideDefault, defaultValue,
|
||||
valueType, name, description,
|
||||
roundingMode, formulaId, dataType, useInEmployeeSalary,
|
||||
pattern, canEdit, formulaContent, originFormulaContent, originSqlContent
|
||||
|
|
@ -148,7 +149,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
...this.state.salaryItemPayload,
|
||||
visible: true,
|
||||
request: {
|
||||
canEdit, dataType, description,
|
||||
canEdit, dataType, description, defaultValue,
|
||||
formulaContent, formulaId, name,
|
||||
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
|
||||
valueType, roundingMode, pattern,
|
||||
|
|
@ -176,11 +177,12 @@ class LedgerSalaryItemTable extends Component {
|
|||
});
|
||||
const { salaryItemId } = record;
|
||||
const {
|
||||
hideDefault, roundingMode, pattern, valueType,
|
||||
originFormulaContent, originSqlContent, formulaId
|
||||
hideDefault, roundingMode, pattern, valueType, defaultValue,
|
||||
originFormulaContent, originSqlContent, formulaId, dataType
|
||||
} = request;
|
||||
this.handleChangeSalaryItem({
|
||||
itemHide: hideDefault.toString(),
|
||||
defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue,
|
||||
roundingMode, pattern, valueType,
|
||||
formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent,
|
||||
formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
.ledgerOuter {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
& > span:nth-child(2) {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ledgerWrapper {
|
||||
height: 100%;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ export default class MobilePayroll extends React.Component {
|
|||
async componentWillMount() {
|
||||
const type = getQueryString("type");
|
||||
this.id = getQueryString("id");
|
||||
const { mySalaryStore: { init } } = this.props;
|
||||
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
|
||||
setMySalaryBill({});
|
||||
if (type !== "phone") {
|
||||
const { data, status } = await payrollCheckType();
|
||||
if (status && data === "PWD") {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { WeaSwitch } from "comsMobx";
|
|||
import { condition, loginCondition } from "./pwdCondtion";
|
||||
import { Button, message } from "antd";
|
||||
import { RSAEcrypt } from "../../util/RSAUtil";
|
||||
import { checkPassword, saveSecondaryPwd } from "../../apis/mySalaryBenefits";
|
||||
import { checkPassword, getPasswordForm, saveSecondaryPwd } from "../../apis/mySalaryBenefits";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -72,7 +72,8 @@ class PassSetDialog extends Component {
|
|||
});
|
||||
return group;
|
||||
};
|
||||
saveSecondaryPassword = () => {
|
||||
saveSecondaryPassword = async () => {
|
||||
const { openRSA } = await getPasswordForm();
|
||||
const { isPassLoginPassword } = this.state;
|
||||
const { form } = this.props;
|
||||
const { secondaryPwd1, secondaryPwd2, validatecode, password } = form.getFormParams();
|
||||
|
|
@ -92,7 +93,7 @@ class PassSetDialog extends Component {
|
|||
}
|
||||
}
|
||||
const params = isPassLoginPassword ? { secondaryPwd1, secondaryPwd2 } : { password };
|
||||
RSAEcrypt("1", params).then(RSAParam => {
|
||||
RSAEcrypt(openRSA, params).then(RSAParam => {
|
||||
isPassLoginPassword ?
|
||||
saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => {
|
||||
if (sign === "1") {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,9 @@ class Index extends Component {
|
|||
<span>{getLabel(111, "发放时间")}</span>
|
||||
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
|
||||
</div>
|
||||
<a href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&type=phone`}
|
||||
target="_blank">
|
||||
<a
|
||||
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&recipient=${it.employeeId}&type=phone`}
|
||||
target="_blank">
|
||||
{`${getLabel(33564, "查看")}>`}
|
||||
</a>
|
||||
</li>;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
.payPreBox {
|
||||
.pay-preview-layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
*
|
||||
* 工资单预览
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/6/17
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { salaryBillPreview } from "../../../../apis/payroll";
|
||||
import Content from "../../../../components/pcTemplate/content";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class PayrollPreviewDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
salaryBillData: { salaryTemplate: {}, salaryGroups: [], employeeInformation: {} }
|
||||
};
|
||||
this.preRef = null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { salaryInfoId, recipient } = nextProps;
|
||||
salaryBillPreview({ salaryInfoId, recipient }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ salaryBillData: data });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const {
|
||||
salaryTemplate, salaryGroups, employeeInformation, sendTime
|
||||
} = this.state.salaryBillData;
|
||||
const salaryProps = {
|
||||
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
||||
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
|
||||
itemTypeList: [employeeInformation, ...salaryGroups]
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} ref={dom => this.preRef = dom} scalable hasScroll className="payPreBox" initLoadCss
|
||||
style={{
|
||||
width: 998, height: window.innerHeight - 40, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="pay-preview-layout">{!_.isEmpty(salaryGroups) && <Content {...salaryProps}/>}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PayrollPreviewDialog;
|
||||
|
|
@ -8,8 +8,9 @@ import { getQueryString } from "../../../util/url";
|
|||
import { getSearchs, renderLoading } from "../../../util";
|
||||
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||
import PayrollPartTable from "./payrollPartTable";
|
||||
import { getPayrollIssuanceProgressBar } from "../../../apis/payroll";
|
||||
import { genPdfBeforeExport, getPayrollIssuanceProgressBar } from "../../../apis/payroll";
|
||||
import ProgressModal from "../../../components/progressModal";
|
||||
import PayrollPreviewDialog from "./components/payrollPreviewDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { ButtonSelect } = WeaDropdown;
|
||||
|
|
@ -31,6 +32,10 @@ export default class PayrollGrant extends React.Component {
|
|||
title: "工资单发放",
|
||||
grantType: "",
|
||||
salarySendId: ""
|
||||
},
|
||||
payrollPreviewDialog: {
|
||||
visible: false, title: getLabel(111, "工资单预览"),
|
||||
salaryInfoId: "", recipient: ""
|
||||
}
|
||||
};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
|
|
@ -303,7 +308,7 @@ export default class PayrollGrant extends React.Component {
|
|||
};
|
||||
|
||||
getColumns = () => {
|
||||
const { selectedKey, showFeedbackColumn } = this.state;
|
||||
const { selectedKey, showFeedbackColumn, payrollPreviewDialog } = this.state;
|
||||
const { payrollStore } = this.props;
|
||||
const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore;
|
||||
return _.map([
|
||||
|
|
@ -323,12 +328,28 @@ export default class PayrollGrant extends React.Component {
|
|||
onClick={() => this.handleWithdraw({ ids: [record.id] })}>
|
||||
撤回
|
||||
</a>
|
||||
<a href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.setState({
|
||||
payrollPreviewDialog: {
|
||||
...payrollPreviewDialog,
|
||||
visible: true, salaryInfoId: record.id, recipient: record.employeeId
|
||||
}
|
||||
})}>
|
||||
{getLabel(111, "查看")}
|
||||
</a>
|
||||
{
|
||||
salarySendDetailBaseInfo.showPdfBtn &&
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
genPdfBeforeExport({ id: record.id, salarySendId: getQueryString("id") })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}}>
|
||||
{getLabel(111, "导出PDF")}
|
||||
</a>
|
||||
|
|
@ -343,7 +364,14 @@ export default class PayrollGrant extends React.Component {
|
|||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
genPdfBeforeExport({ id: record.id, salarySendId: getQueryString("id") })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}}>
|
||||
{getLabel(111, "导出PDF")}
|
||||
</a>
|
||||
|
|
@ -353,11 +381,21 @@ export default class PayrollGrant extends React.Component {
|
|||
}
|
||||
} else if (salarySendDetailBaseInfo.canSend) {
|
||||
return (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => this.handleGrant({ ids: [record.id] })}>
|
||||
发放
|
||||
</a>
|
||||
<React.Fragment>
|
||||
<a
|
||||
href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleGrant({ ids: [record.id] })}>
|
||||
发放
|
||||
</a>
|
||||
<a href="javascript:void(0);" onClick={() => this.setState({
|
||||
payrollPreviewDialog: {
|
||||
...payrollPreviewDialog,
|
||||
visible: true, salaryInfoId: record.id, recipient: record.employeeId
|
||||
}
|
||||
})}>
|
||||
{getLabel(111, "查看")}
|
||||
</a>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -398,10 +436,10 @@ export default class PayrollGrant extends React.Component {
|
|||
<Menu onClick={handleMenuClick}>
|
||||
<Menu.Item key="3">全部导出</Menu.Item>
|
||||
<Menu.Item key="4">导出选中</Menu.Item>
|
||||
{
|
||||
selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn &&
|
||||
<Menu.Item key="5">{getLabel(111, "导出PDF")}</Menu.Item>
|
||||
}
|
||||
{/*{*/}
|
||||
{/* selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn &&*/}
|
||||
{/* <Menu.Item key="5">{getLabel(111, "导出PDF")}</Menu.Item>*/}
|
||||
{/*}*/}
|
||||
</Menu>
|
||||
);
|
||||
let btnDom = [
|
||||
|
|
@ -524,9 +562,10 @@ export default class PayrollGrant extends React.Component {
|
|||
grantListCondition,
|
||||
setGrantListShowSearchAd,
|
||||
salaryGrantPageInfo,
|
||||
getInfoList
|
||||
getInfoList,
|
||||
loading
|
||||
} = payrollStore;
|
||||
const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams } = this.state;
|
||||
const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams, payrollPreviewDialog } = this.state;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange
|
||||
|
|
@ -555,35 +594,19 @@ export default class PayrollGrant extends React.Component {
|
|||
];
|
||||
return (
|
||||
<div className="payrollGrant_new">
|
||||
<WeaTop
|
||||
title="工资单发放" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
buttons={this.getSearchsAdQuick()}
|
||||
/>
|
||||
|
||||
<WeaTop title="工资单发放" icon={<i className="icon-coms-meeting"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon={true} buttons={this.getSearchsAdQuick()}/>
|
||||
<WeaTab
|
||||
datas={topTab}
|
||||
keyParam="viewcondition"
|
||||
selectedKey={selectedKey}
|
||||
onChange={v =>
|
||||
this.setState({ selectedKey: v }, () => {
|
||||
getInfoList({
|
||||
salarySendId: currentId,
|
||||
isGranted: v !== "0"
|
||||
});
|
||||
})
|
||||
}
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
searchsBasePlaceHolder="请输入姓名"
|
||||
showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
|
||||
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
|
||||
onSearchChange={v => grantListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||
searchsBaseValue={grantListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} searchType={["base", "advanced"]}
|
||||
onChange={v => this.setState({ selectedKey: v }, () => {
|
||||
getInfoList({ salarySendId: currentId, isGranted: v !== "0" });
|
||||
})}
|
||||
searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn}
|
||||
setShowSearchAd={bool => setGrantListShowSearchAd(bool)}
|
||||
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)}
|
||||
onSearch={() => this.handleSearch()}
|
||||
onSearchChange={v => grantListConditionForm.updateFields({ username: v })}
|
||||
searchsBaseValue={grantListConditionForm.getFormParams().username}
|
||||
/>
|
||||
<div className="titleBar">
|
||||
<div className="titleBarLeft">
|
||||
|
|
@ -612,7 +635,7 @@ export default class PayrollGrant extends React.Component {
|
|||
</div>
|
||||
<div className="tableWrapper">
|
||||
{
|
||||
!_.isEmpty(this.getColumns()) ?
|
||||
!loading ?
|
||||
<CustomPaginationTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
|
|
@ -652,6 +675,14 @@ export default class PayrollGrant extends React.Component {
|
|||
progress={this.state.progress}
|
||||
/>
|
||||
}
|
||||
{/*工资单预览*/}
|
||||
<PayrollPreviewDialog {...payrollPreviewDialog}
|
||||
onCancel={() => this.setState({
|
||||
payrollPreviewDialog: {
|
||||
...payrollPreviewDialog,
|
||||
visible: false
|
||||
}
|
||||
})}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,6 +290,7 @@ class SalaryItemSettings extends Component {
|
|||
render() {
|
||||
const { onChangeSalaryItem, salaryBillItemNameSet } = this.props;
|
||||
const { dataList, modalPayload, checkedValue } = this.state;
|
||||
if (_.isEmpty(dataList)) return null;
|
||||
return (
|
||||
<div className="salaryItemSettingWrapper">
|
||||
<WeaSortable
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSalaryFileList(this.props);
|
||||
this.getSalaryFileList(this.props, true);
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
window.addEventListener("resize", this.handleResize, false);
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ class Index extends Component {
|
|||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getSalaryFileList = (props) => {
|
||||
getSalaryFileList = (props, init = false) => {
|
||||
const { pageInfo } = this.state;
|
||||
const {
|
||||
payrollFilesStore: { salaryFileQueryForm, queryList }, selectedKey, onChangeTopTabCount
|
||||
|
|
@ -166,7 +166,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||
}, () => {
|
||||
onChangeTopTabCount(selectedKey, total);
|
||||
onChangeTopTabCount(selectedKey, total, init);
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ class Index extends Component {
|
|||
conditions: _.map(salaryFilesConditions, o => {
|
||||
if (o.salaryFile) {
|
||||
return {
|
||||
...o, items: _.map(adjustSalaryItems, g => {
|
||||
...o, title: getLabel(o.lanId, o.title), titleHelpful: getLabel(o.titleHelpfulLanId, o.titleHelpful),
|
||||
items: _.map(adjustSalaryItems, g => {
|
||||
const otherParams = g.dataType === "number" ? { precision: g.pattern } : {};
|
||||
return {
|
||||
colSpan: 3, fieldcol: 14, label: g.name, labelcol: 10, ...otherParams,
|
||||
|
|
@ -73,7 +74,7 @@ class Index extends Component {
|
|||
};
|
||||
}
|
||||
return {
|
||||
...o, items: _.map(o.items, g => {
|
||||
...o, title: getLabel(o.lanId, o.title), items: _.map(o.items, g => {
|
||||
if (getKey(g) === "payStartDate") {
|
||||
return {
|
||||
...g, label: getLabel(g.lanId, g.label),
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ export const tabCondition = [
|
|||
}
|
||||
];
|
||||
export const tabList = [
|
||||
{ viewcondition: "pending", title: getLabel(542689, "待定薪"), showcount: true, groupid: "PENDING" },
|
||||
{ viewcondition: "fixed", title: getLabel(544638, "发薪员工"), showcount: true, groupid: "FIXED" },
|
||||
{ viewcondition: "suspend", title: getLabel(542691, "待停薪"), showcount: true, groupid: "SUSPEND" },
|
||||
{ viewcondition: "stop", title: getLabel(544637, "停薪员工"), showcount: true, groupid: "STOP" },
|
||||
{ viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "EXT" }
|
||||
{ viewcondition: "pending", title: "待定薪", lanId: 542689, showcount: true, groupid: "PENDING" },
|
||||
{ viewcondition: "fixed", title: "发薪员工", lanId: 544638, showcount: true, groupid: "FIXED" },
|
||||
{ viewcondition: "suspend", title: "待停薪", lanId: 542691, showcount: true, groupid: "SUSPEND" },
|
||||
{ viewcondition: "stop", title: "停薪员工", lanId: 544637, showcount: true, groupid: "STOP" },
|
||||
{ viewcondition: "ext", title: "非系统人员", lanId: 542679, showcount: true, groupid: "EXT" }
|
||||
];
|
||||
export const renderReqBtns = (selectedKey, salaryImportTypes, onSalaryOpts, showOperateBtn) => {
|
||||
let reqBtns = [
|
||||
|
|
@ -367,7 +367,7 @@ export const salaryFileSearchConditions = [
|
|||
export const salaryFilesConditions = [
|
||||
{
|
||||
defaultshow: true, title: getLabel(1361, "基本信息"),
|
||||
col: 3,
|
||||
col: 3, lanId: 1361,
|
||||
items: [
|
||||
{
|
||||
colSpan: 3,
|
||||
|
|
@ -439,7 +439,7 @@ export const salaryFilesConditions = [
|
|||
},
|
||||
{
|
||||
defaultshow: true, title: getLabel(543329, "发薪设置"),
|
||||
col: 1,
|
||||
col: 1,lanId: 543329,
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -469,7 +469,8 @@ export const salaryFilesConditions = [
|
|||
{
|
||||
defaultshow: true, title: getLabel(538004, "薪资档案"),
|
||||
titleHelpful: getLabel(543330, "提示:显示已生效的最新数据"),
|
||||
col: 2, salaryFile: true,
|
||||
titleHelpfulLanId: 543330,
|
||||
col: 2, salaryFile: true,lanId: 538004,
|
||||
items: []
|
||||
}
|
||||
];
|
||||
|
|
@ -483,6 +484,6 @@ const HelpfulDiv = () => {
|
|||
<span>{getLabel(544746, "c.返聘人员使用调薪功能调整薪资档案值或使用调整个税扣缴;")}</span>
|
||||
</span>
|
||||
<span>{getLabel(545755, "2.调薪:档案中已存在的人员批量调整薪资项目值(包括返聘人员的情况);")}</span>
|
||||
<span>{getLabel(545756, "3.调整个税扣缴义务人:档案中已存在的人员批量调整个税扣缴义务人(包括返聘人员的情况);")}</span>
|
||||
{/*<span>{getLabel(545756, "3.调整个税扣缴义务人:档案中已存在的人员批量调整个税扣缴义务人(包括返聘人员的情况);")}</span>*/}
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -85,15 +85,21 @@ class SalaryFiles extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
queryInsuranceTabTotal = (active, total) => {
|
||||
API.queryTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
queryInsuranceTabTotal = (active, total, init) => {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
if (init) {
|
||||
API.queryTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, [key]: total }
|
||||
});
|
||||
}
|
||||
};
|
||||
handleReqBtnsCLick = (type, importType) => {
|
||||
const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
|
||||
|
|
@ -242,6 +248,7 @@ class SalaryFiles extends Component {
|
|||
salaryFileImpDialog, salaryImportTypes, logDialogVisible, filterConditions
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
|
||||
return (
|
||||
<div className="salary-files-wrapper">
|
||||
<WeaReqTop
|
||||
|
|
@ -251,7 +258,7 @@ class SalaryFiles extends Component {
|
|||
buttons={renderReqBtns(selectedKey, salaryImportTypes, this.handleReqBtnsCLick, showOperateBtn)}
|
||||
replaceTab={
|
||||
<WeaTab
|
||||
datas={!showExtEmpsWitch ? _.dropRight(tabList) : tabList} autoCalculateWidth
|
||||
datas={!showExtEmpsWitch ? _.dropRight(tabs) : tabs} autoCalculateWidth
|
||||
keyParam="viewcondition" selectedKey={selectedKey} counts={topTabCount} countParam="groupid"
|
||||
onChange={key => this.setState({ selectedKey: key })}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -403,8 +403,8 @@ export const mapBarOptions = (params) => ({
|
|||
},
|
||||
grid: {
|
||||
top: "10%",
|
||||
right: "0%",
|
||||
left: "5%",
|
||||
right: "2%",
|
||||
left: "2%",
|
||||
bottom: "10%",
|
||||
containLabel: true
|
||||
},
|
||||
|
|
@ -457,8 +457,9 @@ export const mapBarOptions = (params) => ({
|
|||
series: _.map(params.data, (item, index) => {
|
||||
return {
|
||||
name: item.name,
|
||||
barWidth: "32",
|
||||
barGap: "0%",
|
||||
barMaxWidth: 30,
|
||||
barMinWidth: 10,
|
||||
barGap: 0,
|
||||
data: _.map(item.data, (it) => it.replace(/,/g, "")),
|
||||
type: "bar",
|
||||
itemStyle: {
|
||||
|
|
@ -484,6 +485,10 @@ export const mapBarOptions = (params) => ({
|
|||
];
|
||||
}
|
||||
},
|
||||
textStyle: {
|
||||
textShadowColor: "transparent",
|
||||
color: "#fff"
|
||||
},
|
||||
rich: {
|
||||
a: {
|
||||
fontWeight: "bold",
|
||||
|
|
@ -501,8 +506,9 @@ export const mapBarOptions = (params) => ({
|
|||
}),
|
||||
dataZoom: [
|
||||
{
|
||||
type: "inside"
|
||||
|
||||
type: "inside",
|
||||
start: params.xAxis.length <= 7 ? 0 : 25,
|
||||
end: params.xAxis.length <= 7 ? 100 : 75,
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@
|
|||
.wea-select .wdb {
|
||||
word-break: break-all !important;
|
||||
word-wrap: break-word !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.wea-select .wea-select-input {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class PovitpivotChartModal extends Component {
|
|||
const childFrameObj = document.getElementById("commonTable");
|
||||
const { dataSource, showSum = false, pageInfo, columns } = payload;
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, showSum, pageInfo
|
||||
dataSource, showSum, pageInfo, columns: _.map(columns, o => ({ ...o, width: o.oldWidth, ellipsis: true }))
|
||||
}), "*");
|
||||
};
|
||||
getDataPerspective = (payload) => {
|
||||
|
|
|
|||
|
|
@ -98,11 +98,11 @@ class ReportContent extends Component {
|
|||
countResult,
|
||||
columns: _.map(columns, it => ({
|
||||
...it,
|
||||
dataIndex: it.column, width: 150,
|
||||
dataIndex: it.column, width: it.width ? it.width + "px" : 150,
|
||||
title: it.text, align: "center",
|
||||
children: !_.isNil(it.children) ? _.map(it.children, child => ({
|
||||
...child,
|
||||
dataIndex: child.column, width: 150,
|
||||
dataIndex: child.column, width: child.width ? child.width + "px" : 150,
|
||||
title: child.text, align: "center"
|
||||
})) : []
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ class RuleConfig extends Component {
|
|||
const optionsList = { matchRule, orderRule, ascOrDesc, rule };
|
||||
this.setState({
|
||||
sysinfo, conditions: _.map(conditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
...item,
|
||||
items: _.map(item.items, o => {
|
||||
if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") {
|
||||
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
|
||||
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
|
||||
|
|
@ -70,6 +71,8 @@ class RuleConfig extends Component {
|
|||
form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } });
|
||||
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
|
||||
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
|
||||
} else if (item === "OPEN_APPLICATION_ENCRYPT") {
|
||||
form.updateFields({ [item]: { value: _.isNil(sysinfo[item]) ? "1" : (sysinfo[item] || "") } });
|
||||
} else {
|
||||
form.updateFields({ [item]: { value: sysinfo[item] || "" } });
|
||||
}
|
||||
|
|
@ -297,13 +300,15 @@ class RuleConfig extends Component {
|
|||
|
||||
render() {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const { conditions, progressVisible, progress } = this.state;
|
||||
const { conditions, progressVisible, progress, sysinfo } = this.state;
|
||||
const ruleConditions = sysinfo.showEncryptOperationButton === "true" ? conditions :
|
||||
_.filter(conditions, o => o.title !== getLabel(543358, "加密规则"));
|
||||
return (
|
||||
<WeaTop
|
||||
title={<span>{getLabel(543355, "规则配置")}</span>} icon={<i className="icon-coms-Flow-setting"/>}
|
||||
iconBgcolor="#F14A2D" buttons={[]} className="ruleWrapper-layout"
|
||||
>
|
||||
<div className="ruleWrapper">{renderRuleForm(form, conditions, this.handleChange)}</div>
|
||||
<div className="ruleWrapper">{renderRuleForm(form, ruleConditions, this.handleChange)}</div>
|
||||
{/*加解密进度条*/}
|
||||
{
|
||||
progressVisible &&
|
||||
|
|
|
|||
|
|
@ -128,6 +128,14 @@ export const salaryItemFields = [
|
|||
viewAttr: 2,
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: "defaultValue",
|
||||
label: "默认值",
|
||||
type: "INPUT",
|
||||
viewAttr: 2,
|
||||
precision: 2,
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: "formulaContent",
|
||||
label: "公式",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderLoading } from "../../util";
|
||||
import { renderLoading, toDecimal_n } from "../../util";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import SystemSalaryItemModal from "./systemSalaryItemModal";
|
||||
import { columns } from "./columns";
|
||||
|
|
@ -314,16 +314,21 @@ export default class SalaryItem extends React.Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
saveItem(payload, continueFlag).then(() => {
|
||||
getTableDatas({ ...this.state.searchParams }).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
...this.state.searchParams,
|
||||
total: res.total
|
||||
}
|
||||
const { pattern, defaultValue, dataType, ...extra } = payload;
|
||||
saveItem({
|
||||
...extra, pattern, dataType,
|
||||
defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue
|
||||
}, continueFlag)
|
||||
.then(() => {
|
||||
getTableDatas({ ...this.state.searchParams }).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
...this.state.searchParams,
|
||||
total: res.total
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const renderCustomOperate = () => {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@
|
|||
.wea-select .wdb {
|
||||
word-break: break-all !important;
|
||||
word-wrap: break-word !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.wea-select .wea-select-input {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,16 @@ export const patternOptions = [
|
|||
key: "8",
|
||||
showname: "8",
|
||||
selected: false
|
||||
},
|
||||
{
|
||||
key: "9",
|
||||
showname: "9",
|
||||
selected: false
|
||||
},
|
||||
{
|
||||
key: "10",
|
||||
showname: "10",
|
||||
selected: false
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class SalaryItemForm extends Component {
|
|||
return {
|
||||
...item,
|
||||
label: getLabel(item.lanId, item.label),
|
||||
display: ((!isLedger && key === "width") || key === "sortedIndex")
|
||||
display: !isLedger
|
||||
};
|
||||
case "useInEmployeeSalary":
|
||||
return {
|
||||
|
|
@ -84,6 +84,13 @@ class SalaryItemForm extends Component {
|
|||
...item,
|
||||
viewAttr: (useInEmployeeSalary.toString() === "0" && ((isLedger && record.canEdit) || (editable && record.canEdit) || isAdd)) ? 2 : 1
|
||||
};
|
||||
case "defaultValue":
|
||||
return {
|
||||
...item,
|
||||
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
||||
display: valueType && valueType.toString() === "1",
|
||||
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
|
||||
};
|
||||
case "formulaContent":
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -111,6 +118,12 @@ class SalaryItemForm extends Component {
|
|||
return { ...item, display: v === "1", viewAttr: 3 };
|
||||
} else if (key === "dataType" && (item.key === "roundingMode" || item.key === "pattern")) {
|
||||
return { ...item, display: v === "number" };
|
||||
} else if (key === "dataType" && (item.key === "defaultValue")) {
|
||||
return { ...item, type: v === "number" ? "INPUTNUMBER" : "INPUT" };
|
||||
} else if (key === "valueType" && item.key === "defaultValue") {
|
||||
return { ...item, display: v === "1" };
|
||||
} else if (key === "pattern" && item.key === "defaultValue") {
|
||||
return { ...item, precision: parseInt(v) };
|
||||
} else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -122,11 +135,11 @@ class SalaryItemForm extends Component {
|
|||
return { ...item };
|
||||
})
|
||||
}, () => {
|
||||
// if (key === "valueType" && !this.props.isLedger) {
|
||||
// onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
|
||||
// } else {
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||
// }
|
||||
if (key === "dataType") {
|
||||
onChangeFieldsItem({ [key]: v, defaultValue: "" });
|
||||
} else {
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -137,7 +150,7 @@ class SalaryItemForm extends Component {
|
|||
<WeaSearchGroup showGroup needTigger={false}>
|
||||
{
|
||||
_.map(salaryItemFieldsList, item => {
|
||||
const { key, label, type, viewAttr, tip, options, display = true, multiple = false } = item;
|
||||
const { key, label, type, viewAttr, tip, options, display = true, multiple = false, precision = 0 } = item;
|
||||
const value = !_.isNil(request[key]) ? request[key].toString() : "";
|
||||
return <React.Fragment>
|
||||
{
|
||||
|
|
@ -170,9 +183,10 @@ class SalaryItemForm extends Component {
|
|||
(type === "INPUTNUMBER" && display) ?
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<React.Fragment>
|
||||
<WeaInputNumber value={value} viewAttr={viewAttr} precision={0}
|
||||
min={key === "width" ? 0 : -99999}
|
||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
||||
<WeaInputNumber
|
||||
value={key === "width" && value ? parseInt(value) : value}
|
||||
precision={precision} viewAttr={viewAttr}
|
||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
||||
{key === "width" && display &&
|
||||
<span style={{ paddingLeft: 10, position: "absolute", marginTop: 4 }}>px</span>}
|
||||
</React.Fragment>
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
.wea-select .wdb {
|
||||
word-break: break-all !important;
|
||||
word-wrap: break-word !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.wea-select .wea-select-input {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
type: "custom",
|
||||
key: "custom",
|
||||
render: (text, record, index, onEdit) => (
|
||||
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||
<WeaInputNumber precision={parseFloat(record.perValidNum || 2)}
|
||||
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||
onChange={v => onEdit({
|
||||
record: { ...record, [`${record.insuranceId}_per`]: v },
|
||||
index, key: "per", value: v
|
||||
|
|
@ -122,7 +123,8 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
type: "custom",
|
||||
key: "custom",
|
||||
render: (text, record, index, onEdit) => (
|
||||
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||
<WeaInputNumber precision={parseFloat(record.comValidNum || 2)}
|
||||
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||
onChange={v => onEdit({
|
||||
record: { ...record, [`${record.insuranceId}_com`]: v },
|
||||
index, key: "com", value: v
|
||||
|
|
@ -166,10 +168,10 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
let perJson = {}, comJson = {};
|
||||
_.forEach(list, o => {
|
||||
if (!_.isNil(o.per)) {
|
||||
perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, 2) });
|
||||
perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, o.perValidNum || 2) });
|
||||
}
|
||||
if (!_.isNil(o.com)) {
|
||||
comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, 2) });
|
||||
comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, o.comValidNum ||2) });
|
||||
}
|
||||
});
|
||||
return { [`${type}PerJson`]: JSON.stringify(perJson), [`${type}ComJson`]: JSON.stringify(comJson) };
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ class InputPaymentAmount extends Component {
|
|||
return (
|
||||
<WeaInputNumber
|
||||
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
||||
precision={parseFloat(record.perValidNum || 2)}
|
||||
onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
@ -31,7 +32,8 @@ class InputPaymentAmount extends Component {
|
|||
return (
|
||||
<WeaInputNumber
|
||||
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
||||
precision={parseFloat(record.comValidNum || 2)}
|
||||
onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,70 +24,19 @@ class RegEditDetial extends Component {
|
|||
key: "social",
|
||||
label: "社保",
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={2}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("social", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
columns: []
|
||||
},
|
||||
{
|
||||
key: "fund",
|
||||
label: "公积金",
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={2}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("fund", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
columns: []
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "企业年金及其他福利",
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
precision={2}
|
||||
disabled={_.isNil(text)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("other", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
columns: []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -113,27 +62,28 @@ class RegEditDetial extends Component {
|
|||
otherComJson: {}
|
||||
};
|
||||
_.forEach(socialData.dataSource, item => {
|
||||
console.log(item)
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(foundData.dataSource, item => {
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||
payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(otherData.dataSource, item => {
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||
payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(Object.keys(payload), item => {
|
||||
|
|
@ -214,11 +164,70 @@ class RegEditDetial extends Component {
|
|||
const social = this.combinedData(socialSecurity, result);
|
||||
const fund = this.combinedData(accumulationFund, result);
|
||||
const other = this.combinedData(otherBenefits, result);
|
||||
console.log(social)
|
||||
this.setState({
|
||||
listMap: [{ ...socialData, dataSource: social }, { ...foundData, dataSource: fund }, {
|
||||
...otherData,
|
||||
dataSource: other
|
||||
}]
|
||||
listMap: [
|
||||
{
|
||||
...socialData, dataSource: social, columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("social", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
},
|
||||
{
|
||||
...foundData, dataSource: fund, columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("fund", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
},
|
||||
{
|
||||
...otherData, dataSource: other, columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("other", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -230,9 +239,15 @@ class RegEditDetial extends Component {
|
|||
let obj = { benefits: item };
|
||||
_.forEach(data, it => {
|
||||
if (item === it.insuranceName && it.paymentScopeSign === "per") {
|
||||
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
|
||||
obj = _.assign(obj, {
|
||||
...it, personalPaymentAmount: it.insuranceValue,
|
||||
personalPaymentAmountValidNum: it.validNum
|
||||
});
|
||||
} else if (item === it.insuranceName && it.paymentScopeSign === "com") {
|
||||
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
|
||||
obj = _.assign(obj, {
|
||||
...it, companyPaymentAmount: it.insuranceValue,
|
||||
companyPaymentAmountValidNum: it.validNum
|
||||
});
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@ class SupplementarySlide extends Component {
|
|||
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
|
||||
valueCom = child[`${child.insuranceId}_com`];
|
||||
if (!child.perDisabled) {
|
||||
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) || "0" });
|
||||
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, parseFloat(child.perValidNum || 2)) || "0" });
|
||||
}
|
||||
if (!child.comDisabled) {
|
||||
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
|
||||
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, parseFloat(child.comValidNum || 2)) || "0" });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -444,7 +444,9 @@ export const convertData = (dataSource) => {
|
|||
[perKey]: "",
|
||||
[comKey]: "",
|
||||
perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
|
||||
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com")
|
||||
perValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "per")) ? _.filter(itemList, i => i.paymentScopeSign === "per")[0].validNum : 2,
|
||||
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com"),
|
||||
comValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "com")) ? _.filter(itemList, i => i.paymentScopeSign === "com")[0].validNum : 2,
|
||||
});
|
||||
});
|
||||
return endList.push(data);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
|
||||
import * as API from "../../../../../apis/welfareArchive";
|
||||
import { getTaxAgentSelectList } from "../../../../../apis/taxAgent";
|
||||
import { sysinfo } from "../../../../../apis/ruleconfig";
|
||||
|
|
@ -23,7 +23,7 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, conditions: [], formData: {}
|
||||
loading: false, conditions: [], formData: {}, errorDialog: { visible: false, errorMsg: "" }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ class Index extends Component {
|
|||
welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true
|
||||
};
|
||||
};
|
||||
save = async () => {
|
||||
save = async (changeData = false) => {
|
||||
const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items), getConditionDomkeys(this.props.socialBase.comItems || [])),
|
||||
fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items), getConditionDomkeys(this.props.fundBase.comItems || [])),
|
||||
otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items), getConditionDomkeys(this.props.otherBase.comItems || []));
|
||||
|
|
@ -198,13 +198,18 @@ class Index extends Component {
|
|||
}, {
|
||||
status: otherStatus,
|
||||
errormsg: otherErrorMsg = "!"
|
||||
}] = await Promise.all([API.save(socailPayload), API.save(fundPayload), API.save(otherPayload)]);
|
||||
}] = await Promise.all([
|
||||
API.save({ ...socailPayload, changeData }),
|
||||
API.save({ ...fundPayload, changeData }),
|
||||
API.save({ ...otherPayload, changeData })]);
|
||||
this.setState({ loading: false });
|
||||
if (socialStatus && fundStatus && otherStatus) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.props.onClose(true);
|
||||
} else {
|
||||
message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
|
||||
!changeData && this.setState({
|
||||
errorDialog: { visible: true, errorMsg: socialErrorMsg + fundErrorMsg + otherErrorMsg }
|
||||
});
|
||||
}
|
||||
};
|
||||
updateFormData = (baseData) => this.setState({ formData: { ...this.state.formData, ...baseData } });
|
||||
|
|
@ -246,18 +251,19 @@ class Index extends Component {
|
|||
};
|
||||
handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
|
||||
handleSameChange = (baseItems, value) => {
|
||||
if (!value) return;
|
||||
let newFormDatas = {}, hasCompromise = false;
|
||||
baseItems.forEach((formLabel) => {
|
||||
const { min, max } = formLabel;
|
||||
// const { min, max } = formLabel;
|
||||
newFormDatas[getKey(formLabel)] = toDecimal_n(value, 2) || "";
|
||||
if (min !== "0.000" && value !== "" && Number(value) < Number(min)) {
|
||||
hasCompromise = true;
|
||||
newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2);
|
||||
}
|
||||
if (max !== "0.000" && value !== "" && Number(value) > Number(max)) {
|
||||
hasCompromise = true;
|
||||
newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2);
|
||||
}
|
||||
// if (min !== "0.000" && value !== "" && Number(value) < Number(min)) {
|
||||
// hasCompromise = true;
|
||||
// newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2);
|
||||
// }
|
||||
// if (max !== "0.000" && value !== "" && Number(value) > Number(max)) {
|
||||
// hasCompromise = true;
|
||||
// newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2);
|
||||
// }
|
||||
});
|
||||
if (hasCompromise) {
|
||||
message.warning(getLabel("111", "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。"));
|
||||
|
|
@ -278,7 +284,7 @@ class Index extends Component {
|
|||
<div className="titleCol titleRightBox">
|
||||
{
|
||||
runStatuses !== "4,5" && showOperateBtn &&
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
<Button type="primary" onClick={() => this.save()} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
}
|
||||
</div>
|
||||
</div>;
|
||||
|
|
@ -300,7 +306,7 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { archivesStore: { welfareProfileForm }, showOperateBtn } = this.props;
|
||||
const { conditions, formData } = this.state;
|
||||
const { conditions, formData, errorDialog } = this.state;
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="salary-welfare-archive-edit-layout" {...this.props}
|
||||
|
|
@ -313,6 +319,24 @@ class Index extends Component {
|
|||
this.handleSameChange, formData, this.props, showOperateBtn
|
||||
)
|
||||
}
|
||||
<WeaDialog title={getLabel(111, "信息确认")} visible={errorDialog.visible}
|
||||
style={{ width: 480, height: 200 }} hasScroll
|
||||
buttons={[
|
||||
<Button type="primary" onClick={() => {
|
||||
this.setState({ errorDialog: { ...errorDialog, visible: false } }, () => {
|
||||
const promise = this.save(true);
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.props.onClose(true);
|
||||
});
|
||||
}}>{getLabel(111, "确认")}</Button>
|
||||
]}
|
||||
onCancel={() => this.setState({ errorDialog: { ...errorDialog, visible: false } })}
|
||||
bottomLeft={getLabel(111, "点击【确认】自动将不满足条件的基数值设置为对应的上限或下限值")}
|
||||
>
|
||||
<div style={{ padding: 16 }}>
|
||||
<div dangerouslySetInnerHTML={{ __html: (errorDialog.errorMsg).replace(/\n/g, "</br>") }}/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
</div>}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class Index extends Component {
|
|||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.getWelfareList(this.props);
|
||||
this.getWelfareList(this.props, true);
|
||||
} else if (type === "turn") {
|
||||
const { record: { baseInfo, employeeId, paymentOrganization } = {}, interfaceParams = {} } = params;
|
||||
const { runStatuses, showOperateBtn } = this.props;
|
||||
|
|
@ -154,7 +154,7 @@ class Index extends Component {
|
|||
getPaymentForm = async (props) => {
|
||||
return API.getPaymentForm({ ...props });
|
||||
};
|
||||
getWelfareList = (props) => {
|
||||
getWelfareList = (props, init = false) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;
|
||||
const params = { ...pageInfo, ...welfareForm.getFormParams() };
|
||||
|
|
@ -182,7 +182,7 @@ class Index extends Component {
|
|||
})
|
||||
}, () => {
|
||||
const { pageInfo, selectedRowKeys, columns, dataSource } = this.state;
|
||||
onChangeTopTabCount(runStatuses, total);
|
||||
onChangeTopTabCount(runStatuses, total, init);
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, runStatuses,
|
||||
columns, showOperateBtn
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ export const optTypeEnum = [
|
|||
}
|
||||
];
|
||||
export const tabList = [
|
||||
{ viewcondition: "1", title: getLabel(542711, "待增员"), showcount: true, groupid: "stayAdd" },
|
||||
{ viewcondition: "2,3", title: getLabel(542504, "在缴员工"), showcount: true, groupid: "paying" },
|
||||
{ viewcondition: "3", title: getLabel(542713, "待减员"), showcount: true, groupid: "stayDel" },
|
||||
{ viewcondition: "4,5", title: getLabel(542505, "停缴员工"), showcount: true, groupid: "stopPay" },
|
||||
{ viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "ext" }
|
||||
{ viewcondition: "1", title: "待增员", lanId: 542711, showcount: true, groupid: "stayAdd" },
|
||||
{ viewcondition: "2,3", title: "在缴员工", lanId: 542504, showcount: true, groupid: "paying" },
|
||||
{ viewcondition: "3", title: "待减员", lanId: 542713, showcount: true, groupid: "stayDel" },
|
||||
{ viewcondition: "4,5", title: "停缴员工", lanId: 542505, showcount: true, groupid: "stopPay" },
|
||||
{ viewcondition: "ext", title: "非系统人员", lanId: 542679, showcount: true, groupid: "ext" }
|
||||
];
|
||||
export const welfareTipList = [
|
||||
{
|
||||
|
|
@ -143,7 +143,7 @@ export const renderDropMenuDatas = (selectedKey, getLabel, showOperateBtn) => {
|
|||
key: "record",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(111, "基数调整记录")
|
||||
},{
|
||||
}, {
|
||||
key: "log",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
|
|
@ -815,8 +815,8 @@ const BenefitBaseComponent = (props) => {
|
|||
com: <WeaFormItem label={child.label} labelCol={{ span: 10 }} wrapperCol={{ span: 14 }}>
|
||||
<WeaInputNumber
|
||||
value={value[getKey(child)] || (child.min !== "0.000" ? child.min : 0)} precision={2}
|
||||
min={(child.min !== "0.000" && value.welBaseAutoAdjust) ? parseFloat(child.min) : -999999999999999}
|
||||
max={(child.max !== "0.000" && value.welBaseAutoAdjust) ? parseFloat(child.max) : 999999999999999}
|
||||
// min={(child.min !== "0.000" && value.welBaseAutoAdjust) ? parseFloat(child.min) : -999999999999999}
|
||||
// max={(child.max !== "0.000" && value.welBaseAutoAdjust) ? parseFloat(child.max) : 999999999999999}
|
||||
onChange={v => onChange(getKey(child), v)}
|
||||
viewAttr={(runStatuses === "4,5" || !showOperateBtn) ? 1 : 2}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -46,15 +46,21 @@ class Index extends Component {
|
|||
this.setState({ showExtEmpsWitch: extEmpsWitch === "1" });
|
||||
}
|
||||
|
||||
queryInsuranceTabTotal = (active, total) => {
|
||||
API.queryInsuranceTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
queryInsuranceTabTotal = (active, total, init) => {
|
||||
const key = _.find(tabList, o => o.viewcondition === active).groupid;
|
||||
if (init) {
|
||||
API.queryInsuranceTabTotal().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
topTabCount: { ...this.state.topTabCount, [key]: total }
|
||||
});
|
||||
}
|
||||
};
|
||||
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
|
|
@ -147,6 +153,7 @@ class Index extends Component {
|
|||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list;
|
||||
const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
|
||||
return (
|
||||
<div className="salary-welfare-archive">
|
||||
<WeaReqTop
|
||||
|
|
@ -156,7 +163,7 @@ class Index extends Component {
|
|||
buttons={renderReqBtns(selectedKey, getLabel, this.handleOpenAdvanceSearch, this.handleAdvanceSearch, this.onDropMenuClick, showOperateBtn)}
|
||||
replaceTab={
|
||||
<WeaTab
|
||||
datas={!showExtEmpsWitch ? _.dropRight(tabList) : tabList} autoCalculateWidth
|
||||
datas={!showExtEmpsWitch ? _.dropRight(tabs) : tabs} autoCalculateWidth
|
||||
keyParam="viewcondition" selectedKey={selectedKey} counts={topTabCount} countParam="groupid"
|
||||
onChange={key => this.setState({ selectedKey: key })}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -5,12 +5,13 @@
|
|||
* Date: 2024/2/2
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getSearchs } from "../../../../../util";
|
||||
import { searchConditons } from "../../config";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("programmeStore")
|
||||
|
|
@ -27,7 +28,20 @@ class WelfarePlanAdvanceSearchPannel extends Component {
|
|||
return (
|
||||
<React.Fragment>
|
||||
<div className="wea-advanced-searchsAd">
|
||||
{getSearchs(planSearchForm, searchConditons, 2, false)}
|
||||
{getSearchs(planSearchForm, _.map(searchConditons, item => ({
|
||||
...item, title: getLabel(item.lanId, item.title),
|
||||
items: _.map(item.items, o => {
|
||||
if (getKey(o) === "paymentTypeEnum") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) }))
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label)
|
||||
};
|
||||
})
|
||||
})), 2, false)}
|
||||
</div>
|
||||
<div className="wea-search-buttons">
|
||||
<div style={{ textAlign: "center" }}>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class Index extends Component {
|
|||
const { programmeStore: { planCopyForm }, conditions } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 480, height: 46 }} initLoadCss
|
||||
{...this.props} style={{ width: 480, height: 80 }} initLoadCss
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -48,15 +48,22 @@ class Index extends Component {
|
|||
this.setState({
|
||||
planDatas: schemeDetailList,
|
||||
conditions: _.map(planConditons, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
...item, title: getLabel(item.lanId, item.title),
|
||||
items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return {
|
||||
...o, hide: schemeBatch["sharedType"] === "0" || _.isNil(schemeBatch["sharedType"]),
|
||||
viewAttr: (schemeBatch["sharedType"] === "1" && showOperateBtn) ? 3 : showOperateBtn ? o.viewAttr : 1,
|
||||
options: _.map(result, k => ({ key: k.id, showname: k.content }))
|
||||
options: _.map(result, k => ({ key: k.id, showname: k.content })),
|
||||
label: getLabel(o.lanId, o.label)
|
||||
};
|
||||
} else if (getKey(o) === "paymentType" || getKey(o) === "sharedType") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) }))
|
||||
};
|
||||
}
|
||||
return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1 };
|
||||
return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1, label: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
|
|
|
|||
|
|
@ -246,7 +246,9 @@ class PlanSetTable extends Component {
|
|||
{ key: "5", showname: "5" },
|
||||
{ key: "6", showname: "6" },
|
||||
{ key: "7", showname: "7" },
|
||||
{ key: "8", showname: "8" }
|
||||
{ key: "8", showname: "8" },
|
||||
{ key: "9", showname: "9" },
|
||||
{ key: "10", showname: "10" }
|
||||
]} viewAttr={showOperateBtn ? 2 : 1}
|
||||
onChange={validNum => onEdit({
|
||||
record: { ...record, validNum },
|
||||
|
|
|
|||
|
|
@ -178,12 +178,18 @@ class Index extends Component {
|
|||
this.setState({
|
||||
copyDialog: {
|
||||
visible: true, copyId: id, copyName: `${schemeName}-${getLabel(77, "复制")}`,
|
||||
title: `${getLabel(77, "复制")}-${_.find(tabWelfarePlanList, o => o.key === selectedKey).title}`,
|
||||
title: `${getLabel(77, "复制")}-${
|
||||
getLabel(_.find(tabWelfarePlanList, o => o.key === selectedKey).lanId, _.find(tabWelfarePlanList, o => o.key === selectedKey).title)
|
||||
}`,
|
||||
conditions: welfarePlanCopyConditions[selectedKey]
|
||||
}
|
||||
}, () => {
|
||||
const { copyDialog: { conditions, copyName } } = this.state;
|
||||
planCopyForm.initFormFields(conditions);
|
||||
planCopyForm.initFormFields(_.map(conditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
return { ...o, label: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
})));
|
||||
planCopyForm.updateFields({ [`${selectedKey}_schemeName`]: { value: copyName } });
|
||||
});
|
||||
break;
|
||||
|
|
@ -311,7 +317,9 @@ class Index extends Component {
|
|||
</div>
|
||||
{
|
||||
selectedKey === "CUSTOM" &&
|
||||
<div className="adapt-right"><TipLabel tipList={welfarePlanCustomTipList}/></div>
|
||||
<div className="adapt-right">
|
||||
<TipLabel tipList={_.map(welfarePlanCustomTipList, o => getLabel(o.lanId, o.title))}/>
|
||||
</div>
|
||||
}
|
||||
{/*复制方案*/}
|
||||
<WelfarePlanCopyDialog {...copyDialog} selectedKey={selectedKey}
|
||||
|
|
|
|||
|
|
@ -7,15 +7,18 @@ const getKey = WeaTools.getKey;
|
|||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
export const tabWelfarePlanList = [
|
||||
{ key: "SOCIAL_SECURITY", title: getLabel(538967, "社保") },
|
||||
{ key: "ACCUMULATION_FUND", title: getLabel(538969, "公积金") },
|
||||
{ key: "OTHER", title: getLabel(542717, "企业年金及其他福利") },
|
||||
{ key: "CUSTOM", title: getLabel(543151, "自定义福利") }
|
||||
{ key: "SOCIAL_SECURITY", title: "社保", lanId: 538967 },
|
||||
{ key: "ACCUMULATION_FUND", title: "公积金", lanId: 538969 },
|
||||
{ key: "OTHER", title: "企业年金及其他福利", lanId: 542717 },
|
||||
{ key: "CUSTOM", title: "自定义福利", lanId: 543151 }
|
||||
];
|
||||
export const welfarePlanCustomTipList = [
|
||||
getLabel(544345, "1、可以为社保、公积金、企业年金及其他福利新增自定义的福利项,如:残疾保险等"),
|
||||
getLabel(544346, "2、新增自定义福利默认启用,社保福利方案中的自定义福利项均未开启缴纳,当前页面的自定义福利项才可以停用;停用后再新增方案时没有该福利项"),
|
||||
getLabel(544347, "3、自定义福利若要缴纳,需要在方案里填写缴纳相关数据")
|
||||
{ lanId: 544345, title: "1、可以为社保、公积金、企业年金及其他福利新增自定义的福利项,如:残疾保险等" },
|
||||
{
|
||||
lanId: 544346,
|
||||
title: "2、新增自定义福利默认启用,社保福利方案中的自定义福利项均未开启缴纳,当前页面的自定义福利项才可以停用;停用后再新增方案时没有该福利项"
|
||||
},
|
||||
{ lanId: 544347, title: "3、自定义福利若要缴纳,需要在方案里填写缴纳相关数据" }
|
||||
];
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -40,7 +43,7 @@ export const renderReqBtns = (selectedKey, onSalaryOpts, showOperateBtn, customQ
|
|||
reqBtns[reqBtns.length - 1] = <WeaSelect style={{ width: 220 }} onChange={v => onSalaryOpts("SEARCH", v)}
|
||||
value={customQuery}
|
||||
options={[
|
||||
{ key: "", showname: getLabel(111, "全部"), selected: true },
|
||||
{ key: "", showname: getLabel(332, "全部"), selected: true },
|
||||
{ key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") },
|
||||
{ key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") },
|
||||
{ key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") }
|
||||
|
|
@ -63,6 +66,7 @@ export const searchConditons = [
|
|||
fieldcol: 16,
|
||||
isQuickSearch: true,
|
||||
label: getLabel(33162, "方案名称"),
|
||||
lanId: 33162,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
|
|
@ -74,16 +78,18 @@ export const searchConditons = [
|
|||
fieldcol: 16,
|
||||
isQuickSearch: true,
|
||||
label: getLabel(543163, "缴纳类型"),
|
||||
lanId: 543163,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
options: [
|
||||
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
|
||||
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
|
||||
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇"), lanId: 19702 },
|
||||
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村"), lanId: 19703 }
|
||||
],
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(82743, "基础信息"),
|
||||
lanId: 82743,
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -96,6 +102,7 @@ export const welfarePlanCopyConditions = {
|
|||
domkey: ["SOCIAL_SECURITY_schemeName"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "社保名称"),
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
|
|
@ -115,6 +122,7 @@ export const welfarePlanCopyConditions = {
|
|||
domkey: ["ACCUMULATION_FUND_schemeName"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "公积金名称"),
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
|
|
@ -134,6 +142,7 @@ export const welfarePlanCopyConditions = {
|
|||
domkey: ["OTHER_schemeName"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "企业年金及其他福利名称"),
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
|
|
@ -154,10 +163,11 @@ export const planConditons = [
|
|||
domkey: ["paymentType"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(543163, "缴纳类型"),
|
||||
lanId: 543163,
|
||||
labelcol: 6,
|
||||
options: [
|
||||
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
|
||||
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
|
||||
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇"), lanId: 19702 },
|
||||
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村"), lanId: 19703 }
|
||||
],
|
||||
value: "SCHEME_TOWN",
|
||||
rules: "required|string",
|
||||
|
|
@ -168,6 +178,7 @@ export const planConditons = [
|
|||
domkey: ["schemeName"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(33162, "方案名称"),
|
||||
lanId: 33162,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
|
|
@ -178,10 +189,11 @@ export const planConditons = [
|
|||
domkey: ["sharedType"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(543164, "可见性"),
|
||||
lanId: 543164,
|
||||
labelcol: 6,
|
||||
options: [
|
||||
{ key: "0", showname: getLabel(111, "公共") },
|
||||
{ key: "1", showname: getLabel(111, "私有") }
|
||||
{ key: "0", showname: getLabel(111, "公共"), lanId: 111 },
|
||||
{ key: "1", showname: getLabel(111, "私有"), lanId: 111 }
|
||||
],
|
||||
value: "0",
|
||||
rules: "required|string",
|
||||
|
|
@ -192,6 +204,7 @@ export const planConditons = [
|
|||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(543165, "可见性范围"),
|
||||
lanId: 543165,
|
||||
labelcol: 6,
|
||||
multiple: true,
|
||||
options: [],
|
||||
|
|
@ -204,12 +217,14 @@ export const planConditons = [
|
|||
domkey: ["remarks"],
|
||||
fieldcol: 14,
|
||||
label: getLabel(536726, "备注"),
|
||||
lanId: 536726,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: getLabel(82743, "基础信息"),
|
||||
lanId: 82743,
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import WelfarePlanList from "./components/welfarePlanList";
|
|||
import LogDialog from "../../../components/logViewModal";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
import { tabList } from "../welfareArchive/config";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -64,12 +65,13 @@ class Index extends Component {
|
|||
render() {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { logDialogVisible, filterConditions, selectedKey, showSearchAd, isQuery, customQuery } = this.state;
|
||||
const tabs = _.map(tabWelfarePlanList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
|
||||
return (
|
||||
<div className="salary-welfare-plan-wrapper">
|
||||
<WeaReqTop
|
||||
title={getLabel(538000, "社保福利方案")} buttonSpace={10} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
|
||||
onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList} selectedKey={selectedKey}
|
||||
onDropMenuClick={this.onDropMenuClick} tabDatas={tabs} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey, showSearchAd: false, customQuery: "" })}
|
||||
buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn, customQuery)}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@
|
|||
.wea-select .wdb {
|
||||
word-break: break-all !important;
|
||||
word-wrap: break-word !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.wea-select .wea-select-input {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ export class calculateStore {
|
|||
@observable calculateForm = new WeaForm(); //薪资核算重构-核算form
|
||||
@observable batchUpdateForm = new WeaForm(); //批量更新薪资项目-批量更新form
|
||||
@action initBatchUpdateForm = () => this.batchUpdateForm = new WeaForm();
|
||||
@observable tempForm = new WeaForm(); //导出模板设置-模板form
|
||||
@action initTempForm = () => this.tempForm = new WeaForm();
|
||||
|
||||
@observable tableStore = new TableStore(); // new table
|
||||
@observable form = new WeaForm(); // nrew 一个form
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
module.exports = {
|
||||
};
|
||||
|
|
@ -6,6 +6,7 @@ const { TableStore } = WeaTableNew;
|
|||
export class EmployeeDeclareStore {
|
||||
@observable advanceForm = new WeaForm(); //人员信息报送详情页面,高级搜索form实例
|
||||
@observable declareForm = new WeaForm(); //人员信息报送详情页面,新增编辑报送信息form实例
|
||||
@action initDeclareForm = () => this.declareForm = new WeaForm();
|
||||
@observable tableStore = new TableStore();
|
||||
|
||||
@action("...")
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import { SpecialAddStore } from "./specialAdd";
|
|||
import { ExternalPersonManageStore } from "./externalPersonManage";
|
||||
import { EmployeeDeclareStore } from "./employeeDeclare";
|
||||
import { IntelligentStore } from "./intelligent";
|
||||
import CustomModule from "./custom-stores";
|
||||
|
||||
module.exports = {
|
||||
baseFormStore: new BaseFormStore(),
|
||||
|
|
@ -46,4 +47,5 @@ module.exports = {
|
|||
externalPersonManageStore: new ExternalPersonManageStore(),
|
||||
employeeDeclareStore: new EmployeeDeclareStore(),
|
||||
intelligentStore: new IntelligentStore(),
|
||||
...CustomModule
|
||||
};
|
||||
|
|
|
|||
|
|
@ -458,7 +458,9 @@ export class payrollStore {
|
|||
departmentIds: form.departmentIds ? form.departmentIds.split(",") : [],
|
||||
subCompanyIds: form.subCompanyIds ? form.subCompanyIds.split(",") : []
|
||||
};
|
||||
this.loading = true;
|
||||
API.getInfoList(params).then(res => {
|
||||
this.loading = false;
|
||||
if (res.status) {
|
||||
this.salaryGrantTableStore = res.data.columns;
|
||||
this.salaryGrantDataSource = res.data.list;
|
||||
|
|
@ -470,7 +472,7 @@ export class payrollStore {
|
|||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
});
|
||||
}).catch(() => this.loading = false);
|
||||
};
|
||||
|
||||
// 工资单-工资单发放详情列表
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ export class SalaryItemStore {
|
|||
dataType: "number",
|
||||
description: "",
|
||||
sharedType: "0",
|
||||
taxAgentIds: ""
|
||||
taxAgentIds: "",
|
||||
defaultValue: ""
|
||||
};
|
||||
|
||||
@observable tableDataSource = []; // 主列表
|
||||
|
|
@ -75,7 +76,8 @@ export class SalaryItemStore {
|
|||
dataType: "number",
|
||||
description: "",
|
||||
sharedType: "0",
|
||||
taxAgentIds: ""
|
||||
taxAgentIds: "",
|
||||
defaultValue: ""
|
||||
};
|
||||
|
||||
@action
|
||||
|
|
|
|||
|
|
@ -71,3 +71,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//公式编辑框样式
|
||||
.excel-codeBox {
|
||||
.cm-variable {
|
||||
}
|
||||
|
||||
.cm-string-2 {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue