Merge branch 'release/2.15.1.2407.01-个税' into custom-昂立个税/薪资账套配置流程审批地址

# Conflicts:
#	pc4mobx/hrmSalary/index.js
This commit is contained in:
黎永顺 2024-09-05 16:19:28 +08:00
commit 151894186e
71 changed files with 2174 additions and 566 deletions

View File

@ -278,5 +278,23 @@ export const getCompareSobConfig = params => {
export const updateSobConfig = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params);
};
//薪资核算-计算个税
export const acctresultCalcTax = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTax", params);
};
//薪资核算-获取个税计算反馈
export const calcTaxFeedback = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTaxFeedback", params);
};
//薪资核算-人员异常
export const listPage4NotDeclare = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/listPage4NotDeclare", params);
};
// 核算结果--核算税后工资
export const afterTaxAccounting = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/afterTaxAccounting", params);
};
// 核算税后工资进度条
export const getAfterTaxAccountingProgress = (id) => {
return WeaTools.callApi("/api/bs/hrmsalary/progress/getRate?cacheKey=AFTER_TAX_ACCT_PROGRESS_" + id, "get", {});
};

View File

@ -37,7 +37,7 @@ export const getDetailChanges = params => {
};
//获取薪资账套全列表
export const getSalarysobListAll = params => {
return postFetch("/api/bs/hrmsalary/salarysob/listAll", params);
return postFetch("/api/bs/hrmsalary/salarysob/listAllByAuth", params);
};
//补算
export const supplementAcctRecord = (params) => {

View File

@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { postExportFetch, postFetch } from "../util/request";
// 薪资项目-获取列表
export const getItemList = params => {
@ -84,3 +84,19 @@ export const getSalarySobBySalaryItem = params => {
export const syncSalaryItemToSalarySobItem = params => {
return postFetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem", params);
};
// 导出薪资项目
export const exportSalaryitem = (params) => {
return postExportFetch("/api/bs/hrmsalary/salaryitem/export", params);
};
// 下载模板
export const downloadTemplate = (params) => {
return postExportFetch("/api/bs/hrmsalary/salaryitem/downloadTemplate", params);
};
// 导入薪资项目
export const importSalaryitem = (params) => {
return postFetch("/api/bs/hrmsalary/salaryitem/import", params);
};

View File

@ -25,6 +25,10 @@ export const deleteLedger = params => {
export const getLedgerBasicForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/basic/getForm", "get", params);
};
//薪资帐套基本信息工资类型接口
export const getIncomeCategoryList = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/incomeCategoryList", "get", params);
};
//保存薪资帐套基本信息
export const saveLedgerBasic = params => {
@ -143,6 +147,10 @@ export const getBackitemForm = params => {
export const taxreportruleGetForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxreportrule/getForm", "GET", params);
};
//薪资账套下的个税字段对应-个税字段对应
export const taxruleGetForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxrule/getForm", "GET", params);
};
//薪资账套下的个税申报-累计字段对应
export const addupruleGetForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/adduprule/getForm", "GET", params);
@ -151,6 +159,10 @@ export const addupruleGetForm = params => {
export const taxreportruleSave = params => {
return postFetch("/api/bs/hrmsalary/salarysob/taxreportrule/save", params);
};
//保存薪资账套下的个税字段对应规则
export const taxruleSave = params => {
return postFetch("/api/bs/hrmsalary/salarysob/taxrule/save", params);
};
//保存薪资账套下的累计字段对应关系
export const addupruleSave = params => {
return postFetch("/api/bs/hrmsalary/salarysob/adduprule/save", params);

View File

@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { postExportFetch, postFetch } from "../util/request";
import { convertToUrlString } from "../util/url";
//工资单-工资单发放列表
@ -248,3 +248,8 @@ export const genPdfBeforeExport = (params) => {
export const salaryBillPreview = (params) => {
return postFetch("/api/bs/hrmsalary/salaryBill/preview", params);
};
// 工资单查看详情导出-重构
export const exportDetailList_reconfig = (params) => {
return postExportFetch("/api/bs/hrmsalary/salaryBill/send/exportDetailList", params);
};

View File

@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { postExportFetch, postFetch } from "../util/request";
//通用字典表 {enumClass:""}
export const commonEnumList = (params) => {
@ -75,3 +75,15 @@ export const reportGetForm = params => {
export const saveSalarySendFeedback = (params) => {
return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
};
// 数据分析列表导出
export const exportDataReport = (params) => {
return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportData", params);
};
//迁入配置
export const uploadConfig = (params) => {
return postFetch("/api/bs/hrmsalary/sys/uploadConfig", params);
};
//迁入配置
export const downloadConfig = (params) => {
return postExportFetch("/api/bs/hrmsalary/sys/downloadConfig", params);
};

View File

@ -5,13 +5,24 @@
* Date: 2022/11/30
*/
import React, { Component } from "react";
import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
import {
WeaBrowser,
WeaDialog,
WeaFormItem,
WeaHelpfulTip,
WeaLocaleProvider,
WeaSearchGroup,
WeaSelect,
WeaTextarea
} from "ecCom";
import { Button, message, Modal } from "antd";
import { getTaxAgentRangeForm } from "../../apis/taxAgent";
import { commonEnumList } from "../../apis/ruleconfig";
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class PersonalScopeModal extends Component {
constructor(props) {
super(props);
@ -91,6 +102,11 @@ class PersonalScopeModal extends Component {
key: "POSITION",
showname: "岗位",
selected: false
},
{
key: "SQL",
showname: "SQL",
selected: false
}
];
this.setState({
@ -124,7 +140,9 @@ class PersonalScopeModal extends Component {
const payload = {
employeeStatus: status.split(","),
includeType,
targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })),
targetParams: targetType !== "SQL" ?
_.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) :
[{ targetType, targetId: "0", target: targetTypeIds }],
[saveKeyVal["key"]]: saveKeyVal["value"]
};
this.setState({ loading: true });
@ -156,6 +174,12 @@ class PersonalScopeModal extends Component {
case "POSITION":
browserType = { ...browserType, type: 278, title: "岗位选择" };
break;
case "SQL":
return <div style={{ display: "flex", alignItems: "center" }}>
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={targetTypeIds}
onChange={val => this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>
<WeaHelpfulTip style={{ marginLeft: 10 }} width={200} placement="topLeft" title={<SQLHelpTip/>}/>
</div>;
default:
break;
}
@ -259,3 +283,13 @@ class PersonalScopeModal extends Component {
}
export default PersonalScopeModal;
export const SQLHelpTip = () => {
return <div>
<p>{getLabel(111, "注意事项:")}</p>
<p>{getLabel(111, "1、sql需返回人员id")}</p>
<p>{getLabel(111, "2、sql结尾不需要 ; go /等符号")}</p>
<p>{getLabel(111, "使用例子:定义获取岗位是开发的人员")}</p>
<p>{getLabel(111, "select id from hrmresource where JOBTITLE = 17")}</p>
</div>;
};

View File

@ -33,7 +33,8 @@ class ImpStep1 extends Component {
multiple: false,
action: "/api/doc/upload/uploadFile",
fileList,
onChange: this.handleChange
onChange: this.handleChange,
...this.props.customDragger
};
return (
<div className="weapp-batch-impsteps-picker-content-imp-step1">
@ -45,7 +46,7 @@ class ImpStep1 extends Component {
{this.props.importParams}
</div>
}
<div className="title">{getLabel(543202, "导入Excel")}</div>
{_.isEmpty(this.props.customDragger) && <div className="title">{getLabel(543202, "导入Excel")}</div>}
<p className="draggerUploadWrapper">
<Dragger {...dragger}>
<div>
@ -56,36 +57,39 @@ class ImpStep1 extends Component {
</div>
</Dragger>
</p>
{
(_.isNil(this.props.customDragger) || this.props.customDragger.showOperateDesc) &&
<React.Fragment>
<div className="bottom-border">
<div>{getLabel(27577, "操作步骤")}</div>
<p>
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>&nbsp;&nbsp;
{
typeof this.props.link === "string" ?
<a href={this.props.link} className="weapp-salary-link"
target="_blank">{getLabel(543207, "点击这里下载模板")}</a> :
<a className="weapp-salary-link"
onClick={this.props.link}
>{getLabel(543207, "点击这里下载模板")}</a>
}
&nbsp;&nbsp;
{this.props.exportDataDom}
</p>
<p>{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")}`}</p>
<p>{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")}`}</p>
<p>
{`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}`}
</p>
</div>
<div className="bottom-border">
<div>{getLabel(27577, "操作步骤")}</div>
<p>
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>&nbsp;&nbsp;
{
typeof this.props.link === "string" ?
<a href={this.props.link} className="weapp-salary-link"
target="_blank">{getLabel(543207, "点击这里下载模板")}</a> :
<a className="weapp-salary-link"
onClick={this.props.link}
>{getLabel(543207, "点击这里下载模板")}</a>
}
&nbsp;&nbsp;
{this.props.exportDataDom}
</p>
<p>{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")}`}</p>
<p>{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")}`}</p>
<p>
{`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}`}
</p>
</div>
<div className="description">
<div>{getLabel(543223, "Excel文件说明")}</div>
<p>{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}</p>
<p>{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}</p>
<p><span>{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM`}</span></p>
</div>
<div className="description">
<div>{getLabel(543223, "Excel文件说明")}</div>
<p>{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}</p>
<p>{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}</p>
<p><span>{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM`}</span></p>
</div>
</React.Fragment>
}
</div>
);
}

View File

@ -7,6 +7,7 @@
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import successImg from "../../importModal/success.svg";
import MoveInResult from "./moveInResult";
const getLabel = WeaLocaleProvider.getLabel;
@ -16,32 +17,41 @@ class ImpStep3 extends Component {
return (
<div className="weapp-batch-impsteps-picker-content-imp-step3">
{
!_.isEmpty(importResult) ?
<div className="weapp-batch-impsteps-picker-spinText">
<p><img src={successImg} alt=""/></p>
<p>
<span>{getLabel(389249, "已导入")}</span>
<span style={{ color: "green" }}> {importResult.successCount}</span>&nbsp;&nbsp;
<span>{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}</span>
<span style={{ color: "red" }}> {importResult.errorCount}&nbsp;&nbsp;</span>{getLabel(30690, "")}
</p>
</div> :
<div className="weapp-batch-impsteps-picker-spinText">
<p>{getLabel(111, "导入失败")}</p>
</div>
}
{
(!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) &&
<WeaTable
columns={[
importResult.results ? <MoveInResult dataSource={importResult.results}/> :
<React.Fragment>
{
title: getLabel(25700, "错误信息"),
dataIndex: "message"
!_.isEmpty(importResult) ?
<div className="weapp-batch-impsteps-picker-spinText">
<p><img src={successImg} alt=""/></p>
{
importResult.successCount &&
<p>
<span>{getLabel(389249, "已导入")}</span>
<span style={{ color: "green" }}> {importResult.successCount}</span>&nbsp;&nbsp;
<span>{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}</span>
<span
style={{ color: "red" }}> {importResult.errorCount}&nbsp;&nbsp;</span>{getLabel(30690, "")}
</p>
}
</div> :
<div className="weapp-batch-impsteps-picker-spinText">
<p>{getLabel(111, "导入失败")}</p>
</div>
}
]}
dataSource={importResult.errorData || importResult.errorNotice} pagination={false}
scroll={{ y: `calc(100vh - 387px)` }}
/>
{
!_.isEmpty(importResult) && (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) &&
<WeaTable
columns={[
{
title: getLabel(25700, "错误信息"),
dataIndex: "message"
}
]}
dataSource={importResult.errorData || importResult.errorNotice} pagination={false}
scroll={{ y: `calc(100vh - 387px)` }}
/>
}
</React.Fragment>
}
</div>
);

View File

@ -0,0 +1,56 @@
/*
* 薪酬迁入结果展示
*
* @Author: 黎永顺
* @Date: 2024/8/16
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class MoveInResult extends Component {
downloadTxtfile = (value, type) => {
if (!value) return;
const element = document.createElement("a");
const file = new Blob([value], { type: "text/plain" });
element.href = URL.createObjectURL(file);
element.download = `导入${type}信息.txt`;
document.body.appendChild(element);
element.click();
};
render() {
const { dataSource } = this.props;
return (
<WeaTable
columns={[
{ title: getLabel(111, "导入信息"), dataIndex: "message" },
{
title: getLabel(111, "下载信息"), dataIndex: "download", width: 250,
render: (text, record) => (<React.Fragment>
<span
style={{ marginRight: 16, color: "#0BB746", cursor: "pointer", display: "inline-block", minWidth: 60 }}
onClick={() => this.downloadTxtfile(record.success.join("\n"), getLabel(111, "成功"))}>
<i className="iconfont icon-successful"/><span
style={{ marginLeft: 8 }}>{record.success.length}</span></span>
<span
style={{ marginRight: 16, color: "#E6960C", cursor: "pointer", display: "inline-block", minWidth: 60 }}
onClick={() => this.downloadTxtfile(record.warning.join("\n"), getLabel(111, "警告"))}><i
className="iconfont icon-warning"/><span style={{ marginLeft: 8 }}>{record.warning.length}</span></span>
<span style={{ color: "#CF3736", cursor: "pointer", display: "inline-block", minWidth: 60 }}
onClick={() => this.downloadTxtfile(record.error.join("\n"), getLabel(111, "错误"))}><i
className="iconfont icon-error"/><span style={{ marginLeft: 8 }}>{record.error.length}</span></span>
</React.Fragment>)
}
]}
dataSource={dataSource} pagination={false} bordered scroll={{ y: `calc(100vh - 333px)` }}
/>
);
}
}
export default MoveInResult;

View File

@ -36,13 +36,17 @@ class Index extends Component {
}
renderChildren = () => {
const { current } = this.state, { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props;
const { current } = this.state, {
importParams, link, excludeKey, importResult,
exportDataDom = null, customDragger
} = this.props;
const scrollHeight = this.importRef ? this.importRef.state.height - 232 : 606.6;
let CurrentDom = null;
switch (current) {
case 0:
CurrentDom = <ImpStep1 importParams={importParams} link={link} exportDataDom={exportDataDom}
ref={dom => this.step1Ref = dom}/>;
CurrentDom =
<ImpStep1 importParams={importParams} customDragger={customDragger} link={link} exportDataDom={exportDataDom}
ref={dom => this.step1Ref = dom}/>;
break;
case 1:
CurrentDom = <ImpStep2 {...this.props} scrollHeight={scrollHeight}/>;
@ -100,13 +104,16 @@ class Index extends Component {
}
const [file] = fileList;
const { response } = file;
this.setState({
current: this.state.current + 1,
fileid: response.data.fileid
}, () => {
!excludeKey && this.props.nextCallback && this.props.nextCallback(this.state.fileid);
excludeKey && this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
});
if (!excludeKey) {
this.setState({
current: this.state.current + 1,
fileid: response.data.fileid
}, () => {
this.props.nextCallback && this.props.nextCallback(this.state.fileid);
});
} else {
this.props.nextUplaodCallback && this.props.nextUplaodCallback(response.data.fileid);
}
} else {
this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
}

View File

@ -24,7 +24,7 @@ import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页
// import Payroll from "./pages/payroll";
import Payroll from "./pages/payrollRelease"; //重构的工资单发放页面
import PayrollGrant from "./pages/payroll/payrollGrant";
import PayrollDetail from "./pages/payroll/payrollDetail";
import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
// import Declare from "./pages/declare";
import DeclareDetail from "./pages/declareDetail";
import DeclareOnlineComparison from "./pages/declareOnlineComparison";
@ -61,6 +61,7 @@ import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
import TopologyMap from "./pages/topologyMap";
import SupplementaryCalc from "./pages/supplementaryCalc";
import Layout from "./layout";
//二开页面路由
import PersonalConfirm from "./pages/custom-pages/angli/personalConfirm";
import SalaryAccounting from "./pages/custom-pages/angli/salaryAccounting"
@ -129,7 +130,7 @@ 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={Layout}>
<Route key="historicalPayroll" path="historicalPayroll" component={HistoricalPayroll}/>
<Route key="salaryAdjustmentRecords" path="salaryAdjustmentRecords" component={SalaryAdjustmentRecords}/>
<Route key="mySalaryMobile" path="mySalaryMobile" component={MySalaryMobile}/>
@ -139,8 +140,8 @@ const Routes = (
<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}/>

View File

@ -0,0 +1,53 @@
/*
* 薪酬管理-
* layout组件
* @Author: 黎永顺
* @Date: 2024/8/15
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTools } from "ecCom";
import stores from "./stores";
const { ls } = WeaTools;
const { getLabel } = WeaLocaleProvider;
class Layout extends Component {
constructor(props) {
super(props);
this.state = {};
}
componentWillReceiveProps(nextProps, nextContext) {
if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
if (window.location.hash.indexOf("payroll") !== -1) {
window.localStorage.removeItem("template-basedata");
window.localStorage.removeItem("salary-showset");
}
}
}
componentDidMount() {
if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css";
const link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", src);
let header = document.getElementById("container");
header.appendChild(link);
top.$(".ant-message").remove();
window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
}
}
render() {
return (
<WeaLocaleProvider>{this.props.children}</WeaLocaleProvider>
);
}
}
export default Layout;

View File

@ -97,7 +97,7 @@ class Index extends Component {
effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "",
operateTime: operateTime1 ? `${operateTime1},${operateTime2}` : ""
};
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_target");
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_blank");
this.handleDebounce = null;
}, 500);
}

View File

@ -99,13 +99,17 @@ class SalaryDetails extends Component {
}).catch(() => this.setState({ loading: false }));
};
handleExportSalaryList = (key) => {
const { attendanceStore: { tableStore } } = this.props;
let { selectedRowKeys, payload } = this.state;
if (key === "SELECTED" && selectedRowKeys.length === 0) {
message.warning(getLabel(543345, "请选择需要导出的数据!"));
return;
}
WeaLoadingGlobal.start();
const promise = API.exportSalaryList({ ...payload, ids: key === "SELECTED" ? selectedRowKeys : [] });
const promise = API.exportSalaryList({
...payload, ids: key === "SELECTED" ? selectedRowKeys : [],
columns: _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"), o => o.dataIndex)
});
};
getColumns = () => {
const { attendanceStore: { tableStore } } = this.props;

View File

@ -5,7 +5,17 @@
* Date: 2022-09-27 18:17:02
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaTop } from "ecCom";
import {
WeaCheckbox,
WeaDatePicker,
WeaFormItem,
WeaInput,
WeaLoadingGlobal,
WeaLocaleProvider,
WeaSearchGroup,
WeaTop
} from "ecCom";
import MoveInDialog from "./moveInDialog";
import * as API from "../../apis/ruleconfig";
import { Button, message } from "antd";
import "./index.less";
@ -18,6 +28,7 @@ const Input = (props) => {
</WeaFormItem>
);
};
const getLabel = WeaLocaleProvider.getLabel;
class AppConfig extends Component {
constructor(props) {
@ -28,7 +39,8 @@ class AppConfig extends Component {
isLog: "0",
openFormulaForcedEditing: "0",
version: "",
loading: false
loading: false,
moveInDialog: { visible: false, title: getLabel(111, "数据迁入") }
};
}
@ -62,10 +74,29 @@ class AppConfig extends Component {
}
});
};
handleOperate = (type) => {
switch (type) {
case "import":
this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: true } });
break;
case "export":
WeaLoadingGlobal.start();
const promise = API.downloadConfig();
break;
default:
break;
}
};
render() {
const { openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version } = this.state;
const btns = [<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>];
const {
openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version, moveInDialog
} = this.state;
const btns = [
<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>,
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
<Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
];
const items = [
{
com: Input({
@ -115,6 +146,8 @@ class AppConfig extends Component {
buttons={btns}
/>
<WeaSearchGroup title="" showGroup center items={items}/>
<MoveInDialog {...moveInDialog}
onCancel={() => this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: false } })}/>
</div>
);
}

View File

@ -0,0 +1,73 @@
/*
* 数据迁入
*
* @Author: 黎永顺
* @Date: 2024/8/12
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import { message } from "antd";
import ImportDialog from "../../components/importDialog";
import * as API from "../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
class MoveInDialog extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
nextloading: false, importResult: {}, imageId: "",
customDragger: { showOperateDesc: false, accept: ".xml" }
}
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.setState({
importDialog: {
...this.state.importDialog,
importResult: {}, imageId: "",
customDragger: { showOperateDesc: false, accept: ".xml" }
}
});
}
}
handleImport = (payload) => {
const { importDialog } = this.state;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.uploadConfig({ ...payload }).then(({ data, status, errormsg }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
});
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...this.props} {...importDialog} excludeKey={1}
onResetImportResult={() => this.setState({
importDialog: {
...importDialog, importResult: {}, imageId: "", link: ""
}
})}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default MoveInDialog;

View File

@ -276,13 +276,21 @@ class Index extends Component {
<BaseInfo {...this.props}/>
<WeaTab
datas={tabDatas} keyParam="viewcondition" selectedKey={selectedKey}
onChange={v => this.setState({ selectedKey: v }, () => this.queryPCList())}
onChange={v => this.setState({
selectedKey: v,
pageInfo: { ...pageInfo, current: 1 }
}, () => this.queryPCList())}
onSearch={v => this.setState({
pageInfo: { ...pageInfo, current: 1 }
}, () => this.queryPCList())}
onAdSearch={v => this.setState({
pageInfo: { ...pageInfo, current: 1 }
}, () => this.queryPCList())}
buttons={this.renderTabBtns()} searchType={["base", "advanced"]} advanceHeight={220}
showSearchAd={showSearchAd} setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
searchsAd={getSearchs(PCSearchForm, searchConditions, 2, false)}
onSearchChange={(v) => PCSearchForm.updateFields({ employeeName: v })}
searchsBaseValue={PCSearchForm.getFormParams().employeeName}
onSearch={this.queryPCList} onAdSearch={this.queryPCList}
onAdReset={() => PCSearchForm.resetForm()} autoCalculateWidth
/>
<WeaTable

View File

@ -5,7 +5,7 @@
* Date: 2023/9/25
*/
import React, { Component } from "react";
import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { WeaBrowser, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import cs from "classnames";
import { Col, Row } from "antd";
import "./index.less";
@ -13,6 +13,48 @@ import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class EditSalaryBaseInfo extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (this.props.visible !== nextProps.visible && nextProps.visible && !_.isEmpty(nextProps.baseInfo)) {
nextProps.onChange(_.map(nextProps.baseInfo, it => {
const { fieldValue, canEdit, fieldValueObj } = it;
if (canEdit) {
const { id: value, name: valueSpan } = fieldValueObj || fieldValue;
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
}
return { ...it };
}));
}
}
renderBrowser = (item) => {
const { fieldType, fieldValue, fieldCode } = item;
const { id: value, name: valueSpan } = fieldValue;
let browserType = {};
switch (fieldType) {
case "subcompanyBrowser":
browserType = { ...browserType, type: 164, title: getLabel(111, "选择分部") };
break;
case "departmentBrowser":
browserType = { ...browserType, type: 4, title: getLabel(111, "选择部门") };
break;
case "jobtitleBrowser":
browserType = { ...browserType, type: 24, title: getLabel(111, "选择岗位") };
break;
case "jobcallBrowser":
browserType = { ...browserType, type: 260, title: getLabel(111, "选择职称") };
break;
default:
break;
}
return <WeaBrowser {...browserType} viewAttr={3} value={value} valueSpan={valueSpan} inputStyle={{ width: 200 }}
onChange={(value, valueSpan) => this.props.onChange(_.map(this.props.baseInfo, it => {
if (fieldCode === it.fieldCode) {
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
}
return { ...it };
}))}/>;
};
render() {
const { baseInfo } = this.props;
return (
@ -32,7 +74,7 @@ class EditSalaryBaseInfo extends Component {
<Row type="flex" className="esf-form-content">
{
_.map(baseInfo, (item, index) => {
const { fieldName, fieldValue } = item;
const { fieldName, fieldType, fieldValue, fieldValueObj } = item;
return (
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 24 : 12}>
<Row className={cs("esf-form-item", {
@ -43,7 +85,13 @@ class EditSalaryBaseInfo extends Component {
<span className="label" title={fieldName}>{fieldName}</span>
</Col>
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 21 : 18}>
<span className="value" title={fieldValue}>{fieldValue}</span>
<span className="value" title={fieldValue}>
{
fieldType.indexOf("Browser") !== -1 ?
this.renderBrowser({ ...item, fieldValue: fieldValueObj || fieldValue }) :
fieldValue
}
</span>
</Col>
</Row>
</Col>

View File

@ -271,6 +271,9 @@ class EditCalcTable extends Component {
}
}).catch(() => this.setState({ loading: false }));
};
handleQuery = () => {
this.setState({ pageInfo: { ...this.state.pageInfo, current: 1 } }, () => this.queryCalcResultList());
};
handleBatchEditing = () => {
};

View File

@ -5,7 +5,7 @@
* Date: 2023/9/25
*/
import React, { Component } from "react";
import { Button, message } from "antd";
import { Button, message, Modal } from "antd";
import { WeaLocaleProvider, WeaSlideModal, WeaTab } from "ecCom";
import EditSalaryBaseInfo from "./baseInfo";
import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
@ -87,9 +87,16 @@ class EditSalaryCalcSlide extends Component {
};
save = () => {
const { id: salaryAcctEmpId } = this.props;
const { issuedAndReissueItems, itemsByGroup } = this.state;
const { issuedAndReissueItems, itemsByGroup, baseInfo } = this.state;
if (_.every(baseInfo, it => !it.canEdit || (it.canEdit && !it.fieldValue))) {
Modal.warning({
title: getLabel(131329, "信息确认"),
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
});
return;
}
const payload = {
salaryAcctEmpId,
salaryAcctEmpId, employeeInfos: baseInfo,
items: [
..._.reduce(itemsByGroup, (pre, cur) => {
return [
@ -97,14 +104,14 @@ class EditSalaryCalcSlide extends Component {
..._.map(cur.salaryItems, it => {
return {
salaryItemId: it.salaryItemId,
resultValue: (it.dataType === "number" && !!it.resultValue) ? toDecimal_n(it.resultValue, it.pattern || 2) : it.resultValue
resultValue: (it.dataType === "number" && !!it.resultValue) ? toDecimal_n(it.resultValue, !_.isNil(it.pattern) ? it.pattern : 2) : it.resultValue
};
})
];
}, []),
...issuedAndReissueItems.map(item => ({
salaryItemId: item.salaryItemId,
resultValue: (item.dataType === "number" && !!item.resultValue) ? toDecimal_n(item.resultValue, item.pattern || 2) : item.resultValue
resultValue: (item.dataType === "number" && !!item.resultValue) ? toDecimal_n(item.resultValue, !_.isNil(item.pattern) ? item.pattern : 2) : item.resultValue
}))
]
};
@ -133,7 +140,8 @@ class EditSalaryCalcSlide extends Component {
top={0} width={60} height={100} measure={"%"}
direction={"right"} title={this.renderTitle()}
content={<div className="salary-calculate-esf-area">
<EditSalaryBaseInfo baseInfo={baseInfo}/>
<EditSalaryBaseInfo {...this.props} baseInfo={baseInfo}
onChange={baseInfo => this.setState({ baseInfo })}/>
<WeaTab keyParam="viewcondition" className="calc-esf-tab"
selectedKey={selectedKey} onChange={v => this.setState({ selectedKey: v })}
datas={!_.isEmpty(issuedAndReissueItems) ? topTab : topTab.slice(0, 1)}

View File

@ -12,6 +12,7 @@ import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
import EditCalcTable from "./editCalcTable";
import SalaryMonthTip from "../salaryMonthTip";
import SalaryCalcLayout from "./salaryCalcLayout";
import PersonAbnormalDialog from "./personAbnormalDialog";
import cs from "classnames";
import "./index.less";
@ -22,13 +23,14 @@ class Index extends Component {
super(props);
this.state = {
salarySobCycle: {}, showSearchAd: false,
columnDesc: {}, formulaTd: "", showTotalCell: false
columnDesc: {}, formulaTd: "", showTotalCell: false,
perAbnormalDialog: { visible: false, salaryAcctRecordId: "" }
};
}
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
onAdSearch = (bool = true) => {
this.calcTableRef.wrappedInstance.queryCalcResultList();
this.calcTableRef.wrappedInstance.handleQuery();
bool && this.openAdvanceSearch();
};
init = async () => {
@ -50,7 +52,7 @@ class Index extends Component {
};
render() {
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell, perAbnormalDialog } = this.state;
const { routeParams: { salaryAcctRecordId } } = this.props;
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
@ -65,7 +67,13 @@ class Index extends Component {
style={{ marginLeft: 10 }}
/>
</div>
<div></div>
<div>
<div className="abnormal-text"
onClick={() => this.setState({
perAbnormalDialog: { visible: true, salaryAcctRecordId }
})}>{getLabel(111, "未报送人员")}{salarySobCycle.abnormalEmployeeNum}
</div>
</div>
</div>
<div className="salary-flex-between formula-detail-area">
<div className="formula-detail">
@ -87,6 +95,10 @@ class Index extends Component {
<EditCalcTable ref={dom => this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
{...this.props} showTotalCell={showTotalCell}
onShowFormulaTd={this.handleShowFormulaTa}/>
<PersonAbnormalDialog {...perAbnormalDialog}
onCancel={() => this.setState({
perAbnormalDialog: { ...perAbnormalDialog, visible: false }
})}/>
</div>
</SalaryCalcLayout>);
}

View File

@ -14,6 +14,11 @@
padding-bottom: 0;
height: 46px;
margin-bottom: 0;
.abnormal-text {
color: #ef9502;
cursor: pointer;
}
}
.formula-detail-area {
@ -28,6 +33,15 @@
display: flex;
align-items: center;
width: 100%;
& > span:first-child {
display: inline-block;
min-width: 44px;
}
& > span:last-child {
flex: 1;
}
}
}

View File

@ -0,0 +1,84 @@
/*
* Author: 黎永顺
* name: 薪资核算-人员异常
* Description:
* Date: 2023/8/18
*/
import React, { Component } from "react";
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
import { listPage4NotDeclare } from "../../../../../apis/calculate";
const { getLabel } = WeaLocaleProvider;
class PersonAbnormalDialog extends Component {
constructor(props) {
super(props);
this.state = {
pageInfo: { current: 1, pageSize: 10, total: 0 },
loading: false, columns: [], dataSource: []
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.queryList(nextProps);
}
queryList = (props) => {
const { salaryAcctRecordId } = props, { pageInfo } = this.state;
const payload = { ...pageInfo, recordId: salaryAcctRecordId };
this.setState({ loading: true });
listPage4NotDeclare(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, columns
});
} else {
}
}).catch(() => this.setState({ loading: false }));
};
render() {
const { loading, columns, dataSource, pageInfo } = this.state;
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.queryList(this.props));
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.queryList(this.props));
}
};
return (
<WeaDialog
{...this.props}
scalable hasScroll className="declareResultDialog" initLoadCss
title={getLabel(111, "未报送人员")}
style={{
width: 1150, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "90%",
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
}}
>
<div className="declareResultDialogContent">
<WeaTable
columns={columns} dataSource={dataSource}
loading={loading} className="declareTable"
pagination={pagination}
/>
</div>
</WeaDialog>
);
}
}
export default PersonAbnormalDialog;

View File

@ -9,7 +9,7 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { inject, observer } from "mobx-react";
import Layout from "./layout";
import { acctresultAccounting, getCalculateProgress, getExportField } from "../../../apis/calculate";
import * as API from "../../../apis/calculate";
import AdvanceInputBtn from "./components/advanceInputBtn";
import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
import SalaryEditCalc from "./components/salaryEditCalc";
@ -29,7 +29,7 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
selectedKey: "person", progressVisible: false, progress: 0,
selectedKey: "person", progressVisible: false, progress: 0, loading: { calcTax: false, feedback: false },
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
accountExceptInfo: "" //核算报错信息,
@ -61,11 +61,11 @@ class Index extends Component {
this.setState({ progress: 0 });
let payload = { salaryAcctRecordId };
if (key === "calc_selected") payload = _.assign(payload, { ids: selectedRowKeys });
acctresultAccounting(payload).then(() => {
API.acctresultAccounting(payload).then(() => {
this.setState({ progressVisible: true });
if (this.timer) clearInterval(this.timer);
this.timer = setInterval(() => {
getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
API.getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
let progress = data.progress;
if (progress === 1 && this.timer) {
clearInterval(this.timer);
@ -105,7 +105,7 @@ class Index extends Component {
window.open(`${window.ecologyContentPath || ""}${url}`, "_blank");
break;
case "export_custom":
getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
if (status) {
const { checkItems, itemsByGroup } = data;
this.setState({
@ -133,8 +133,71 @@ class Index extends Component {
break;
}
};
acctresultCalcTax = () => {
const { routeParams: { salaryAcctRecordId } } = this.props;
this.setState({ loading: { ...this.state.loading, calcTax: true } });
API.acctresultCalcTax({ salaryAcctRecordId }).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, calcTax: false } });
if (status) {
message.success(getLabel(111, "操作成功!"));
this.calc.onAdSearch(false);
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ loading: { ...this.state.loading, calcTax: false } }));
};
calcTaxFeedback = () => {
const { routeParams: { salaryAcctRecordId } } = this.props;
this.setState({ loading: { ...this.state.loading, feedback: true } });
API.calcTaxFeedback({ salaryAcctRecordId }).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, feedback: false } });
if (status) {
this.calc.onAdSearch(false);
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: getLabel(111, "成功获取个税信息,是否继续计算税后工资?"),
onOk: () => this.afterTaxAccounting()
});
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ loading: { ...this.state.loading, feedback: false } }));
};
afterTaxAccounting = () => {
const { routeParams: { salaryAcctRecordId } } = this.props;
this.setState({ progress: 0 });
let payload = { salaryAcctRecordId };
API.afterTaxAccounting(payload).then(() => {
this.setState({ progressVisible: true });
if (this.timer) clearInterval(this.timer);
this.timer = setInterval(() => {
API.getAfterTaxAccountingProgress(salaryAcctRecordId).then(({ data }) => {
let progress = data.progress;
if (progress === 1 && this.timer) {
clearInterval(this.timer);
this.timer = null;
this.setState({
progressVisible: false,
accountExceptInfo: data.message
});
message.success(getLabel(111, "操作完成"));
this.calc.onAdSearch(false);
} else if (!data.status) {
clearInterval(this.timer);
this.timer = null;
this.setState({
progressVisible: false,
accountExceptInfo: data.message
});
message.error(data.message);
}
this.setState({ progress: Number(progress) * 100 });
});
}, 1000);
});
};
renderReqBtns = () => {
const { selectedKey, accountExceptInfo } = this.state;
const { selectedKey, accountExceptInfo, loading } = this.state;
let reqBtns = [];
switch (selectedKey) {
case "calc":
@ -155,6 +218,10 @@ class Index extends Component {
<Dropdown.Button onClick={() => this.doCacl("ALL")} overlay={menu} type="primary">
{getLabel(543545, "核算所有人")}
</Dropdown.Button>,
<Button type="ghost" onClick={this.acctresultCalcTax}
loading={loading.calcTax}>{getLabel(111, "在线算税")}</Button>,
<Button type="ghost" loading={loading.feedback}
onClick={this.calcTaxFeedback}>{getLabel(111, "获取算税结果")}</Button>,
<Dropdown overlay={moreMenu}><Button type="ghost">{getLabel(17499, "更多")}</Button></Dropdown>,
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>

View File

@ -40,7 +40,7 @@ class PayrollItemsTable extends Component {
const { canEdit, dataType, pattern } = record;
return dataType === "number" ? <WeaInputNumber
disabled={!canEdit}
precision={pattern || 2}
precision={!_.isNil(pattern) ? pattern : 0}
value={text || 0}
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
/> : <WeaInput

View File

@ -128,7 +128,7 @@ export const conditions = [
isQuickSearch: false,
label: "类型",
labelcol: 6,
valueList:[],
valueList: [],
options: [
{
key: "NUMBER",
@ -185,13 +185,14 @@ export const reFrenceConditions = [
{
colSpan: 1,
conditionType: "SELECT",
domkey: ["salarySobId"],
domkey: ["salarySobIds"],
fieldcol: 18,
isQuickSearch: false,
label: "薪资账套",
labelcol: 6,
valueList:[],
valueList: [],
options: [],
multiple: true,
rules: "required|string",
viewAttr: 3
},

View File

@ -27,6 +27,7 @@ class AttendanceDataViewSlide extends Component {
this.viewAttendQuote({}, nextProps);
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
document.querySelector(".attendanceRefWrapper").classList.remove("zIndex0-attendance");
this.setState({ pageInfo: { current: 1, pageSize: 10, total: 0 } });
}
}
@ -41,7 +42,7 @@ class AttendanceDataViewSlide extends Component {
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
// o.dataIndex === "username" ? "left" :
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
});
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));

View File

@ -55,7 +55,7 @@ class AttendanceRefrenceDataModal extends Component {
...item,
items: _.map(items, child => {
const { domkey } = child;
if (domkey[0] === "salarySobId") {
if (domkey[0] === "salarySobIds") {
return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
}
return { ...child };
@ -77,19 +77,23 @@ class AttendanceRefrenceDataModal extends Component {
refenceform.validateForm().then(f => {
if (f.isValid) {
const payload = refenceform.getFormParams();
const checkPayload = { salaryYearMonthStr: payload.salaryYearMonth, salarySobId: payload.salarySobId };
const checkPayload = {
salaryYearMonthStr: payload.salaryYearMonth,
salarySobIds: payload.salarySobIds.split(",")
};
this.setState({ loading: true });
checkOperation(checkPayload).then(({ status, errormsg: errormessage }) => {
if (status) {
syncAttendanceRefer(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("同步成功");
onCancel(true);
} else {
message.error(errormsg || "同步失败");
}
}).catch(() => this.setState({ loading: false }));
syncAttendanceRefer({ ...payload, salarySobIds: payload.salarySobIds.split(",") })
.then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("同步成功");
onCancel(true);
} else {
message.error(errormsg || "同步失败");
}
}).catch(() => this.setState({ loading: false }));
} else {
this.setState({ loading: false });
message.error(errormessage);
@ -212,9 +216,9 @@ class AttendanceRefrenceDataModal extends Component {
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
];
return (
<WeaDialog {...this.props} style={{ width: 480, height: 174 }} buttons={buttons} initLoadCss>
<WeaDialog {...this.props} style={{ width: 535, height: 174 }} buttons={buttons} initLoadCss>
<div className="form-dialog-layout">
{getSearchs(refenceform, condition, 1)}
{getSearchs(refenceform, condition, 1, false, null, "", "multiple_select")}
</div>
{/* 表头设置 */}
<SelectItemModal {...headerSetPayload}

View File

@ -530,7 +530,7 @@ class Index extends Component {
};
render() {
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
const { taxAgentStore: { showOperateBtn, taxAgentOption }, cumSituationStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
importPayload, year, exportPayloadType, cumTaxPeriodDialog, targetid
@ -549,7 +549,7 @@ class Index extends Component {
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
>
<SalaryCumDeductChooseTaxPeriodDialog
{...cumTaxPeriodDialog}
{...cumTaxPeriodDialog} taxAgentOption={taxAgentOption}
onCancel={() => this.setState({
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
})}

View File

@ -86,6 +86,18 @@ export const paymentBankConditions = [
value: "",
viewAttr: 1,
options: []
},
{
colSpan: 1,
conditionType: "SELECT",
domkey: ["paymentNumber"],
fieldcol: 12,
label: "缴款帐号",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 1,
options: []
}
],
defaultshow: true

View File

@ -5,9 +5,9 @@
* Date: 2023/8/22
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import { WeaLocaleProvider, WeaLoadingGlobal } from "ecCom";
import { inject, observer } from "mobx-react";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { Button, message, Modal } from "antd";
import PaymentDialog from "./paymentDialog";
import {
taxPaymentAgreemenPay,
@ -122,6 +122,7 @@ class PaymentBtn extends Component {
};
getBankAccountInfo = (payload) => {
let loop = () => {
WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") });
clearTimeout(this.timer);
this.timer = setTimeout(async () => {
let response = await taxPaymentgetAgreementFeedback(payload);
@ -129,6 +130,7 @@ class PaymentBtn extends Component {
if (status) {
const { finish, form } = data;
if (finish) {
WeaLoadingGlobal.destroy();
const { feedbacks, bankForm } = form;
const { paymentDialog } = this.state;
this.setState({
@ -155,6 +157,12 @@ class PaymentBtn extends Component {
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.khhhh }))
};
} else if (key === "paymentNumber") {
return {
...it,
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.jkzh }))
};
}
return { ...it };
})
@ -168,6 +176,7 @@ class PaymentBtn extends Component {
} else {
message.warning(errormsg);
clearTimeout(this.timer);
WeaLoadingGlobal.destroy();
}
}, 800);
};
@ -176,15 +185,16 @@ class PaymentBtn extends Component {
taxPaymentAgreemenPay = () => {
const { paymentDialog } = this.state;
const { taxAmount } = paymentDialog;
const { declareStore: { paymentForm } } = this.props;
const { declareStore: { paymentForm }, reportType } = this.props;
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
paymentForm.validateForm().then(f => {
if (f.isValid) {
const { protocolNumber } = paymentForm.getFormParams();
const { protocolNumber, paymentNumber } = paymentForm.getFormDatas();
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxYearMonth: taxYearMonth + "-01",
taxAgentId, taxAmount, protocolNumber
taxAgentId, taxAmount, protocolNumber: protocolNumber.value,
reportType, paymentNumber: paymentNumber.valueSpan
};
this.setState({
paymentDialog: {
@ -332,15 +342,16 @@ class PaymentBtn extends Component {
const { paymentDialog } = this.state;
return (
<React.Fragment>
<Dropdown.Button
onClick={this.handleTripartiteContributions}
overlay={
<Menu onClick={this.handleMenuChange}>
<Menu.Item key="bank_voucher_payment">{getLabel(111, "银行端凭证缴款")}</Menu.Item>
<Menu.Item key="destory_voucher">{getLabel(111, "作废缴款凭证")}</Menu.Item>
</Menu>
}
type="ghost">{getLabel(111, "三方缴款")}</Dropdown.Button>
<Button type="ghost" onClick={this.handleTripartiteContributions}>{getLabel(111, "三方缴款")}</Button>
{/*<Dropdown.Button*/}
{/* onClick={this.handleTripartiteContributions}*/}
{/* overlay={*/}
{/* <Menu onClick={this.handleMenuChange}>*/}
{/* <Menu.Item key="bank_voucher_payment">{getLabel(111, "银行端凭证缴款")}</Menu.Item>*/}
{/* <Menu.Item key="destory_voucher">{getLabel(111, "作废缴款凭证")}</Menu.Item>*/}
{/* </Menu>*/}
{/* }*/}
{/* type="ghost">{getLabel(111, "三方缴款")}</Dropdown.Button>*/}
<PaymentDialog
{...paymentDialog}
onCancel={this.handleCancel}

View File

@ -28,7 +28,8 @@ class PaymentDialog extends Component {
if (key === "protocolNumber") {
const { declareStore: { paymentForm } } = this.props;
paymentForm.updateFields({
count: val[key].value
count: val[key].value,
paymentNumber: val[key].value,
});
}
};

View File

@ -152,8 +152,8 @@ class PaymentFeedbackBtn extends Component {
return {
...it,
options: [
{ key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款") },
{ key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") }
{ key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款"), selected: true },
// { key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") }
]
};
})
@ -176,7 +176,9 @@ class PaymentFeedbackBtn extends Component {
const { paymentDialog, paymentFeedbackDialog } = this.state;
return (
<React.Fragment>
<Button type="ghost" onClick={this.handlePaymentFeedback}>{getLabel(111, "缴款反馈")}</Button>
{/*个税接口改造*/}
{/*<Button type="ghost" onClick={this.handlePaymentFeedback}>{getLabel(111, "缴款反馈")}</Button>*/}
<Button type="ghost" onClick={this.taxPaymentAgreementPayFeedback}>{getLabel(111, "缴款反馈")}</Button>
<PaymentDialog
{...paymentDialog}
onCancel={this.handleCancel}

View File

@ -315,7 +315,7 @@ class Index extends Component {
};
onlineComparison = () => {
const [__, taxDeclarationId] = this.state.selectedKey.split("%%");
window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail/${taxDeclarationId}`, "_target");
window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail/${taxDeclarationId}`, "_blank");
};
handleTabEdit = (tabKey, type) => {
if (type === "remove") {
@ -388,9 +388,9 @@ class Index extends Component {
<Button type="ghost"
loading={loading.cancel}
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>,
<Button type="ghost"
loading={loading.refreshingPay}
onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>
// <Button type="ghost"
// loading={loading.refreshingPay}
// onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>
));
if (!intelCalcSalaryStatus) {
if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) {

View File

@ -21,7 +21,8 @@ import {
employeedeclareList4Add,
employeedeclareList4Update,
employeedeclareRefresh,
employeeDelete, employeeInvalid,
employeeDelete,
employeeInvalid,
getDeclareFeedback
} from "../../apis/declare";
import { advanceConditions, submitStatus } from "./constants";
@ -146,7 +147,8 @@ class Index extends Component {
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
"操作": getLabel(30585, "操作"), "删除": getLabel(535052, "删除"),
"共": getLabel(83698, "共"), "条": getLabel(18256, "条"),
"加载中": getLabel(83698, "加载中"), "作废": getLabel(111, "作废")
"加载中": getLabel(83698, "加载中")
// "作废": getLabel(111, "作废")
};
const childFrameObj = document.getElementById("atdTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");

View File

@ -0,0 +1,148 @@
/*
*
* 个税字段对应
* @Author: 黎永顺
* @Date: 2024/6/17
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import LedgerFieldsItemPopver from "./ledgerFieldsItemPopver";
import { taxruleGetForm } from "../../../apis/ledger";
import LedgerFieldsTable from "./ledgerFieldsTable";
import uuidV4 from "uuid/v4";
const { getLabel } = WeaLocaleProvider;
class IncomeTaxFields extends Component {
constructor(props) {
super(props);
this.state = {
selectedKey: "", tabs: [],
incomeTaxFields: [], keywords: ""
};
}
componentDidMount() {
this.taxruleGetForm();
}
taxruleGetForm = () => {
const { editId, saveSalarySobId } = this.props;
taxruleGetForm({ id: editId || saveSalarySobId }).then(({ status, data }) => {
if (status && !_.isEmpty(data)) {
this.setState({
tabs: _.map(data, it => ({ viewcondition: it.incomeCategoryId, title: it.incomeCategoryName })),
selectedKey: _.take(data)[0].incomeCategoryId,
incomeTaxFields: _.map(data, it => ({
...it, taxReportRules: _.map(it.taxRules, o => ({
...o, canEdit: o.canEdit, id: uuidV4(), reportColumnDataIndex: o.taxIndex, reportColumnName: o.name,
salaryItem: [{ id: o.salaryItemId, name: o.salaryItemName }]
}))
}))
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
}
});
};
handleChangeSwitch = (visible, id) => {
const { incomeTaxFields, selectedKey } = this.state;
this.setState({
incomeTaxFields: _.map(incomeTaxFields, it => {
if (it.incomeCategoryId === selectedKey) {
return {
...it,
taxReportRules: _.map(it.taxReportRules, child => {
if (child.id === id) {
return { ...child, visible };
}
return { ...child, visible: false };
})
};
}
return { ...it };
})
}, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey));
};
handleChangeIncomeFieldsItem = (salaryItem, recordRuleId) => {
const { incomeTaxFields, selectedKey } = this.state;
this.setState({
incomeTaxFields: _.map(incomeTaxFields, it => {
if (it.incomeCategoryId === selectedKey) {
return {
...it,
taxReportRules: _.map(it.taxReportRules, child => {
if (child.id === recordRuleId) {
return { ...child, visible: false, salaryItem };
}
return { ...child, visible: false };
})
};
}
return { ...it };
})
}, () => {
this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey);
});
};
render() {
const { editId, saveSalarySobId } = this.props;
const { selectedKey, tabs, incomeTaxFields, keywords } = this.state;
const list = _.map(incomeTaxFields, it => {
if (it.incomeCategoryId === selectedKey) {
return {
...it,
taxReportRules: _.filter(it.taxReportRules, item => item.reportColumnName.indexOf(keywords) !== -1)
};
}
return { ...it };
});
const dataSource = _.takeWhile(list, it => it.incomeCategoryId === selectedKey);
return (
<WeaSearchGroup
className="incomeWrapper" showGroup needTigger={false}
title={
<div className="incomeTitleContail">
<WeaTab
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey}
searchType={["base"]} searchsBasePlaceHolder={getLabel(111, "请输入对象")}
onSearch={val => this.setState({ keywords: val })}
/>
</div>
}
>
<LedgerFieldsTable
columns={[
{
title: <span>
<span style={{ marginRight: 8 }}>{getLabel(111, "个税申报表字段")}</span>
{/*<WeaHelpfulTip*/}
{/* title={getLabel(111, "若【个税申报表字段】与【对应本账套薪资项目】对应则申报表内数据为当前账套核算数据若【个税申报表字段】未与【对应本账套薪资项目】对应则申报表内数据默认显示为0")}*/}
{/* placement="top" width={250}*/}
{/*/>*/}
</span>,
width: "50%",
dataIndex: "reportColumnName"
},
{
title: getLabel(111, "对应本账套薪资项目"),
width: "50%",
dataIndex: "salaryItem",
render: (_, record) => (
<LedgerFieldsItemPopver salarySobId={editId || saveSalarySobId} record={record}
onChangeSwitch={this.handleChangeSwitch}
onChange={this.handleChangeIncomeFieldsItem}
/>
)
}
]}
dataSource={dataSource}
/>
</WeaSearchGroup>
);
}
}
export default IncomeTaxFields;

View File

@ -5,11 +5,11 @@
* Date: 2022/12/9
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom";
import { Col, Row } from "antd";
import { inject, observer } from "mobx-react";
import { baseSettingFormItem } from "../config";
import { getLedgerBasicForm } from "../../../apis/ledger";
import { getIncomeCategoryList, getLedgerBasicForm } from "../../../apis/ledger";
import {
generateBasicInfo,
getAddMonthYearMonth,
@ -18,10 +18,12 @@ import {
getSubtractMonthYearMonth,
prefixAddZero
} from "../../../util/date";
import { commonEnumList } from "../../../apis/ruleconfig";
import moment from "moment";
import cs from "classnames";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class LedgerBaseSetting extends Component {
@ -128,10 +130,7 @@ class LedgerBaseSetting extends Component {
});
};
commonEenumList = () => {
const payload = {
enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum"
};
commonEnumList(payload).then(({ status, data }) => {
getIncomeCategoryList().then(({ status, data }) => {
if (status) {
const { baseForm } = this.state;
this.setState({
@ -139,7 +138,16 @@ class LedgerBaseSetting extends Component {
if (it.key === "taxableItems") {
return {
...it,
options: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
options: _.map(data, it => ({
key: it.value.toString(),
showname: <div className="reportTypeName-box">
<span>{it.defaultLabel}</span>
<span
className={cs("reportTypeName", { "danger": it.reportTypeName === getLabel(111, "非居民所得") })}>
{it.reportTypeName}
</span>
</div>
}))
};
}
return { ...it };

View File

@ -8,20 +8,23 @@ import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
import { Button, message, Modal } from "antd";
import SlideModalTitle from "../../../components/slideModalTitle";
import LedgerBaseSetting from "./ledgerBaseSetting";
import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel";
import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules";
import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem";
import LedgerSalaryItem from "./ledgerSalaryItem";
import IncomeTaxFields from "./incomeTaxFields";
import IncomeTaxFieldsCorresponding from "./incomeTaxFieldsCorresponding";
import CumulativeFields from "./cumulativeFields";
import WeaTopTitle from "../../../components/custom-title/weaTopTitle";
import WeaReqTitle from "../../../components/custom-title/weaReqTitle";
import {
addupruleSave,
saveAdjustmentRule,
saveLedgerBasic,
saveLedgerItem,
taxreportruleSave
taxreportruleSave,
taxruleSave
} from "../../../apis/ledger";
import "./index.less";
@ -39,6 +42,7 @@ class LedgerSlide extends Component {
baseSettingInfo: {},
adjustRules: [],
empFields: [], itemGroups: [],
taxruleFields: [], taxruleKeys: "", //个税字段对应
incomeTaxFields: [], incomeTaxKeys: "", //个税申报字段对应
addupruleFields: [], addupruleKeys: "", //累计字段对应
saveSalarySobId: "",
@ -101,7 +105,6 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
this.handleClose();
} else {
message.success(errormsg || "保存失败");
}
@ -125,7 +128,8 @@ class LedgerSlide extends Component {
return {
...item,
items: _.map(item.items, it => {
// delete it.formulaContent;
delete it.originFormulaContent;
delete it.originSqlContent;
// if (it.id && it.id.length > 4) delete it.id;
return { ...it };
})
@ -133,7 +137,8 @@ class LedgerSlide extends Component {
}),
items: _.map(_.find(itemGroups, it => it.name === "未分类").items, child => {
// if (child.id && child.id.length > 4) delete child.id;
// delete child.formulaContent;
delete child.originFormulaContent;
delete child.originSqlContent;
return { ...child };
}) || [],
salarySobId: salarySobId || saveSalarySobId
@ -148,6 +153,46 @@ class LedgerSlide extends Component {
}
}).catch(() => this.setState({ loading: false }));
};
/*
* Author: 黎永顺
* Description:个税字段对应-保存
* Params:
* Date: 2023/8/16
*/
taxRuleSave = () => {
const { editId } = this.props;
const { taxruleKeys, taxruleFields, saveSalarySobId, taxableItems } = this.state;
const payload = {
salarySobId: editId || saveSalarySobId,
incomeCategoryParams: _.map(taxruleFields, it => {
if (it.incomeCategoryId === taxruleKeys) {
return {
incomeCategory: it.incomeCategoryId,
taxRuleParams: _.map(it.taxReportRules, child => {
return {
taxIndex: child.reportColumnDataIndex,
salaryItemId: _.map(child.salaryItem, o => o.id).join(",")
};
})
};
}
return {
incomeCategory: it.incomeCategoryId,
taxRuleParams: []
};
})
};
this.setState({ loading: true });
taxruleSave(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(22619, "保存成功!"));
!editId && (taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") && this.handleClose();
} else {
message.error(errormsg || getLabel(22620, "保存失败!"));
}
}).catch(() => this.setState({ loading: false }));
};
/*
* Author: 黎永顺
* Description:个税申报字段对应-保存
@ -155,33 +200,29 @@ class LedgerSlide extends Component {
* Date: 2023/8/16
*/
taxreportruleSave = () => {
const { taxableItems, incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state;
const { editId } = this.props;
if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) {
this.saveLedgerAdjustRule();
} else {
const payload = {
salarySobId: editId || saveSalarySobId,
incomeCategoryParams: _.map(incomeTaxFields, it => {
if (it.incomeCategoryId === incomeTaxKeys) {
return {
incomeCategory: it.incomeCategoryId,
taxReportRuleParams: _.map(it.taxReportRules, child => {
return {
reportColumnDataIndex: child.reportColumnDataIndex,
salaryItemId: _.map(child.salaryItem, o => o.id).join(",")
};
})
};
}
const { incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state;
const payload = {
salarySobId: editId || saveSalarySobId,
incomeCategoryParams: _.map(incomeTaxFields, it => {
if (it.incomeCategoryId === incomeTaxKeys) {
return {
incomeCategory: it.incomeCategoryId,
taxReportRuleParams: []
taxReportRuleParams: _.map(it.taxReportRules, child => {
return {
reportColumnDataIndex: child.reportColumnDataIndex,
salaryItemId: _.map(child.salaryItem, o => o.id).join(",")
};
})
};
})
};
this.saveTaxreportrule(payload);
}
}
return {
incomeCategory: it.incomeCategoryId,
taxReportRuleParams: []
};
})
};
this.saveTaxreportrule(payload);
};
saveTaxreportrule = (payload) => {
this.setState({ loading: true });
@ -201,7 +242,10 @@ class LedgerSlide extends Component {
* Date: 2023/8/17
*/
addupruleSave = () => {
const { taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields, addupruleKeys, saveSalarySobId } = this.state;
const {
taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields,
addupruleKeys, saveSalarySobId
} = this.state;
const { editId } = this.props;
if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) {
const payload = {
@ -251,27 +295,21 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success(getLabel(22619, "保存成功!"));
!editId && this.handleClose();
} else {
message.error(errormsg || getLabel(22620, "保存失败!"));
}
}).catch(() => this.setState({ loading: false }));
}
};
handleChangeSlideTab = (current) => {
this.setState({ current: Number(current) });
};
handleClose = () => {
this.setState({ current: 0 }, () => this.props.onCancel());
};
handleClose = () => this.setState({ current: 0, baseSettingInfo: {} }, () => this.props.onCancel());
/*
* Author: 黎永顺
* Description: 基础信息字段切换
* Params:
* Date: 2022/12/9
*/
handleChangeSaveParams = (baseSettingInfo) => {
this.setState({ baseSettingInfo });
};
handleChangeSaveParams = (baseSettingInfo) => this.setState({ baseSettingInfo });
/*
* Author: 黎永顺
* Description: 薪资项目保存数据
@ -281,179 +319,138 @@ class LedgerSlide extends Component {
handleSaveSalaryItemParams = (empFields, itemGroups) => {
this.setState({ empFields, itemGroups });
};
renderChildren = () => {
const { editId } = this.props;
const { current, saveSalarySobId, taxableItems } = this.state;
let CurrentDom = null;
switch (current) {
case 0:
CurrentDom = <LedgerBaseSetting
{...this.props} onSaveParams={this.handleChangeSaveParams}
onTaxableItemsChange={(val) => this.setState({ taxableItems: val })}
/>;
break;
case 1:
CurrentDom = <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>;
break;
case 2:
CurrentDom = <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>;
break;
case 3:
CurrentDom = <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>;
break;
case 4:
CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
<IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}
onSetTaxreportrule={(incomeTaxFields, selectedKey) => this.setState({
incomeTaxFields,
incomeTaxKeys: selectedKey
})}/> :
<CumulativeFields {...this.props} saveSalarySobId={saveSalarySobId}
onSetAdduprule={(addupruleFields, selectedKey) => this.setState({
addupruleFields,
addupruleKeys: selectedKey
})}/>;
break;
case 5:
CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
<LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/> :
<IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}
onSetTaxreportrule={(incomeTaxFields, selectedKey) => this.setState({
incomeTaxFields,
incomeTaxKeys: selectedKey
})}/>;
break;
case 6:
CurrentDom =
<LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>;
break;
default:
CurrentDom = null;
break;
}
return CurrentDom;
};
renderCustomOperate = () => {
const { taxAgentStore: { showOperateBtn }, editId } = this.props;
const { current, loading, taxableItems } = this.state;
let CurrentDom = [];
//管理员操作权限
if (showOperateBtn) {
switch (current) {
case 0:
CurrentDom = [
<Button
type="primary"
loading={loading}
onClick={this.saveLedgerBasic}
>{editId ? "保存" : "保存并进入下一步"}</Button>
];
break;
case 1:
CurrentDom = !editId ? [
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
] : [];
break;
case 2:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button
type="primary"
loading={loading}
onClick={() => {
this.setState({ current: current + 1 }, () => {
this.saveLedgerItem();
});
}}
>保存并进入下一步</Button>
] : [
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>保存</Button>
];
break;
case 3:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
] : [];
break;
case 4:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button
type="primary"
loading={loading}
onClick={() => {
this.setState({ current: current + 1 }, () => this.addupruleSave());
}}
>保存并进入下一步</Button>
] : [
<Button type="primary" loading={loading} onClick={this.addupruleSave}>保存</Button>
];
break;
case 5:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button
type="primary"
loading={loading}
onClick={() => {
this.setState({ current: current + 1 }, () => this.taxreportruleSave());
}}
>
{
(!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
getLabel(555, "完成") :
getLabel(33199, "保存并进入下一步")
}
</Button>
] : [
<Button type="primary" loading={loading} onClick={this.taxreportruleSave}>保存</Button>
];
break;
case 6:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>完成</Button>
] : [
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>保存</Button>
];
break;
default:
break;
}
}
return CurrentDom;
};
render() {
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
const { current, taxableItems, saveSalarySobId, loading } = this.state;
let tabs = [
{ key: 0, title: getLabel(82751, "基础设置") },
{ key: 1, title: getLabel(543467, "关联人员") },
{ key: 2, title: getLabel(542362, "薪资项目") },
{ key: 3, title: getLabel(543468, "回算薪资项目") },
{ key: 4, title: getLabel(111, "累计字段对应") },
{ key: 5, title: getLabel(111, "个税申报字段对应") },
{ key: 6, title: getLabel(543469, "调薪计薪规则") }
{
key: 0, title: getLabel(82751, "基础设置"),
createBtns: [
<Button type="primary" loading={loading}
onClick={this.saveLedgerBasic}>{getLabel(111, "保存并进入下一步")}</Button>
],
editBtns: [
<Button type="primary" loading={loading} onClick={this.saveLedgerBasic}>{getLabel(111, "保存")}</Button>
],
children: <LedgerBaseSetting
{...this.props} onSaveParams={this.handleChangeSaveParams}
onTaxableItemsChange={(val) => this.setState({ taxableItems: val })}
/>
},
{
key: 1, title: getLabel(543467, "关联人员"),
createBtns: [
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="primary"
onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
],
editBtns: [],
children: <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>
},
{
key: 2, title: getLabel(542362, "薪资项目"),
createBtns: [
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading} onClick={() => {
this.setState({ current: current + 1 }, () => this.saveLedgerItem());
}}>{getLabel(111, "保存并进入下一步")}</Button>
],
editBtns: [
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>{getLabel(111, "保存")}</Button>
],
children: <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>
},
{
key: 3, title: getLabel(543468, "回算薪资项目"),
createBtns: [
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary"
onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
],
editBtns: [],
children: <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>
},
{
key: 4, title: getLabel(543469, "调薪计薪规则"),
createBtns: [
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading}
onClick={() => this.setState({ current: current + 1 }, () => this.saveLedgerAdjustRule())}>{getLabel(111, "保存并进入下一步")}</Button>
],
editBtns: [
<Button type="primary" loading={loading}
onClick={this.saveLedgerAdjustRule}>{getLabel(111, "保存")}</Button>
],
children: <LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>
},
{
key: 5, title: getLabel(111, "个税申报配置"),
createBtns: [
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading}
onClick={() => this.setState({ current: current + 1 }, () => this.taxreportruleSave())}>{getLabel(111, "保存并进入下一步")}</Button>
],
editBtns: [<Button type="primary" loading={loading}
onClick={this.taxreportruleSave}>{getLabel(111, "保存")}</Button>],
children: <IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}
onSetTaxreportrule={(incomeTaxFields, selectedKey) => this.setState({
incomeTaxFields,
incomeTaxKeys: selectedKey
})}/>
},
{
key: 6, title: getLabel(111, "同步个税配置"),
createBtns:
!(taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ?
[
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading}
onClick={() => this.setState({ current: current + 1 }, () => this.taxRuleSave())}>{getLabel(111, "保存并进入下一步")}</Button>
] : [
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading} onClick={this.taxRuleSave}>{getLabel(111, "完成")}</Button>
],
editBtns: [<Button type="primary" loading={loading}
onClick={this.taxRuleSave}>{getLabel(111, "保存")}</Button>],
children: <IncomeTaxFieldsCorresponding {...this.props} saveSalarySobId={saveSalarySobId}
onSetTaxreportrule={(taxruleFields, selectedKey) => this.setState({
taxruleFields, taxruleKeys: selectedKey
})}/>
},
{
key: 7, title: getLabel(111, "累计字段对应"),
createBtns: [
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading} onClick={this.addupruleSave}>{getLabel(111, "完成")}</Button>
],
editBtns: [<Button type="primary" loading={loading}
onClick={this.addupruleSave}>{getLabel(111, "保存")}</Button>],
children: <CumulativeFields {...this.props} saveSalarySobId={saveSalarySobId}
onSetAdduprule={(addupruleFields, selectedKey) => this.setState({
addupruleFields, addupruleKeys: selectedKey
})}/>
}
];
const { title, visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
const { current, taxableItems } = this.state;
(taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") && (tabs = _.filter(tabs, o => o.key !== 4));
(taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") &&
(tabs = _.map(_.filter(tabs, o => o.key !== 7), (k, j) => ({ ...k, key: j })));
return (
<WeaSlideModal
className="slideOuterWrapper"
className="ledgerSlideLayout slideOuterWrapper"
visible={visible}
top={0}
width={100}
@ -461,18 +458,10 @@ class LedgerSlide extends Component {
direction="right"
measure="%"
title={
<SlideModalTitle
subtitle={title}
tabs={editId ? tabs : []}
loading={false}
showOperateBtn={showOperateBtn}
editable={false}
onSave={() => {
}}
selectedTab={current}
customOperate={this.renderCustomOperate()}
subItemChange={this.handleChangeSlideTab}
/>
!editId ? <WeaTopTitle buttons={_.find(tabs, o => current === o.key).createBtns}/> :
<WeaReqTitle buttons={showOperateBtn ? _.find(tabs, o => current === o.key).editBtns : []}
tabDatas={tabs} selectedKey={String(current)}
onChange={cur => this.setState({ current: parseInt(cur) })}/>
}
content={
<div className="ledgerSlideContent">
@ -487,9 +476,7 @@ class LedgerSlide extends Component {
}
</WeaSteps>
}
{
this.renderChildren()
}
{_.find(tabs, o => current === o.key).children}
</div>
}
onClose={this.handleClose}

View File

@ -0,0 +1,27 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { Button } from "antd";
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
class Index extends Component {
render() {
const { payrollStore: { detailListConditionForm } } = this.props;
return (
<div className="advance-search">
<WeaInputSearch value={detailListConditionForm.getFormParams().username}
onChange={v => detailListConditionForm.updateFields({ username: v })}
onSearch={this.props.onAdvanceSearch}
/>
<Button type="ghost" className="wea-advanced-search text-elli"
onClick={this.props.onOpenAdvanceSearch}>{getLabel(111, "高级搜索")}</Button>
</div>
);
}
}
export default Index;

View File

@ -0,0 +1,28 @@
.advance-search {
display: flex;
align-items: center;
position: relative;
top: -2.5px;
.wea-advanced-search {
top: 2px;
left: -1px;
height: 28px;
line-height: 1;
border-radius: 0;
position: relative;
color: #474747;
padding: 4px 15px;
}
.wea-advanced-search:hover {
border: 1px solid #dadada;
color: #474747;
}
.text-elli {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}

View File

@ -0,0 +1,145 @@
/*
*
* 查看工资单详情-列表
* @Author: 黎永顺
* @Date: 2024/7/15
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaLocaleProvider } from "ecCom";
import { Spin } from "antd";
import { WeaTableNew } from "comsMobx";
import * as API from "../../../../../apis/payroll";
import { getQueryString } from "../../../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
const WeaTableComx = WeaTableNew.WeaTable;
@inject("payrollStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, dataSource: [], visible: false, updateSum: true, payload: {},
pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
window.addEventListener("message", this.handleReceive, false);
}
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.isQuery !== this.props.isQuery) this.setState({ updateSum: true }, () => this.getPayrollDetailList());
}
handleReceive = async ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
this.getPayrollDetailList();
} else if (type === "turn") {
switch (id) {
case "PAGEINFO":
const { pageNum: current, size: pageSize } = params;
this.setState({
pageInfo: { ...this.state.pageInfo, current, pageSize },
updateSum: false
}, () => this.getPayrollDetailList());
break;
default:
break;
}
}
};
getPayrollDetailList = () => {
const { pageInfo } = this.state;
const salarySendId = getQueryString("id");
const { payrollStore: { detailListConditionForm: form, salaryTableStore } } = this.props;
const payload = {
salarySendId, ...pageInfo, ...form.getFormParams(),
departmentIds: form.getFormParams().departmentIds ? form.getFormParams().departmentIds.split(",") : [],
subCompanyIds: form.getFormParams().subCompanyIds ? form.getFormParams().subCompanyIds.split(",") : []
};
this.setState({ loading: true });
API.getPayrollDetailList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { dataKey, pageInfo: pageResult, datas: dataSource } = data;
const { datas } = dataKey;
const { pageNum: current, pageSize, total } = pageResult;
salaryTableStore.getDatas(datas);
this.setState({ payload, dataSource, pageInfo: { ...pageInfo, current, pageSize, total } });
}
});
};
getColumns = () => {
const { payrollStore: { salaryTableStore }, showTotalCell } = this.props;
const { dataSource, pageInfo, selectedRowKeys, payload, updateSum } = this.state;
const columns = _.filter(toJS(salaryTableStore.columns), (item) => item.display === "true");
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/salaryBill/send/sum" : "";
if (!_.isEmpty(columns)) {
this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true,
tableScrollHeight: pageInfo.total === 0 ? 90 : 156,
sumRowlistUrl, payload: { ...payload, updateSum },
columns: _.map(columns, (it, idx) => ({
...it, width: it.oldWidth, fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
ellipsis: true
}))
});
}
return [];
};
postMessageToChild = (payload) => {
const i18n = {
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
"总计": getLabel(523, "总计")
};
const childFrameObj = document.getElementById("atdTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
handleSetCustomCols = () => {
const { payrollStore: { salaryTableStore } } = this.props;
this.setState({ updateSum: true }, () => {
salaryTableStore.setColSetVisible(true);
salaryTableStore.tableColSet(true);
});
};
render() {
const { payrollStore: { salaryTableStore } } = this.props;
const { loading, pageInfo } = this.state;
const { pageSize, total } = pageInfo;
const columnNum = total > 10 ? pageSize + 1 : total + 1;
return (
<div style={{
height: `calc((39px * ${columnNum}) + 126.84px)`,
maxHeight: "678px",
minHeight: !total ? "270px" : "inherit"
}}>
<Spin spinning={loading}>
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/calcTable"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
id="atdTable"
/>
</Spin>
<WeaTableComx style={{ display: "none" }} needScroll={true} columns={this.getColumns()}
comsWeaTableStore={salaryTableStore}/>
</div>
);
}
}
export default Index;

View File

@ -0,0 +1,37 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider } from "ecCom";
import { getSearchs } from "../../../../../util";
import { Button } from "antd";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
class Index extends Component {
render() {
const { payrollStore: { detailListConditionForm }, conditions } = this.props;
return (
<React.Fragment>
<div className="wea-advanced-searchsAd">
{getSearchs(detailListConditionForm, conditions, 2, false)}
</div>
<div className="wea-search-buttons">
<div style={{ textAlign: "center" }}>
<span style={{ marginLeft: 15 }}>
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
</span>
<span style={{ marginLeft: 15 }}>
<Button type="ghost" onClick={() => detailListConditionForm.resetForm()}>{getLabel(2022, "重置")}</Button>
</span>
<span style={{ marginLeft: 15 }}>
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
</span>
</div>
</div>
</React.Fragment>
);
}
}
export default Index;

View File

@ -0,0 +1,37 @@
/*
*
* 薪资所属月-提示框
* @Author: 黎永顺
* @Date: 2024/7/15
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class SalaryMonthHelpfulTip extends Component {
render() {
const { salarySendDetailBaseInfo = {} } = this.props;
const { salarySobCycle: { salaryCycle, taxCycle, attendCycle, socialSecurityCycle } } = salarySendDetailBaseInfo;
const { fromDate, endDate } = salaryCycle;
const { fromDate: aFromDate, endDate: aEndDate } = attendCycle;
return (
<WeaHelpfulTip width={200} placement="topLeft"
title={<div>
<div>{getLabel(111, "薪资周期")}</div>
<div><span>{fromDate}</span><span>{getLabel(111, "")}</span><span>{endDate}</span></div>
<div>{getLabel(111, "税款所属期")}</div>
<div>{taxCycle}</div>
<div>{getLabel(111, "考勤取值周期")}</div>
<div><span>{aFromDate}</span><span>{getLabel(111, "")}</span><span>{aEndDate}</span></div>
<div>{getLabel(111, "福利台账月份")}</div>
<div>{`${getLabel(111, "引用")}${socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}</div>
</div>}/>
);
}
}
export default SalaryMonthHelpfulTip;

View File

@ -31,3 +31,75 @@
}
}
}
//查看工资单详情-重构
.salary-payroll-details-layout {
.ant-spin-nested-loading, .ant-spin-container {
height: 100%;
}
.salary-payroll-details {
padding: 0 16px 16px;
.salary-tb-tip {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
}
.salary-payroll-template-name {
vertical-align: middle;
margin-left: 40px;
}
.label {
margin-right: 10px;
}
}
.searchAdvanced-condition-hide {
display: none;
}
.searchAdvanced-condition-container {
background: #FFF;
margin-bottom: 10px;
border: 1px solid #e5e5e5;
.wea-search-buttons {
border-top: 1px solid #dadada;
padding: 15px 0;
}
.wea-advanced-searchsAd {
height: 246px;
overflow: hidden auto;
.formItem-delete {
position: absolute;
top: 0;
right: -40px;
}
.searchAdvanced-commonSelect {
border-top: 1px solid #ebebeb;
margin: 0 25px;
padding: 10px 0;
}
.custom-advance-largeSpacing {
padding-left: 26px;
.link {
border: none;
border-radius: 0;
padding: 12px 10px 12px 26px;
color: #2db7f5
}
}
}
}
}

View File

@ -0,0 +1,113 @@
/*
*
* 查看工资单详情-重构页面
* @Author: 黎永顺
* @Date: 2024/7/15
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaLoadingGlobal, WeaLocaleProvider, WeaTop } from "ecCom";
import { Button } from "antd";
import AdvanceInputBtn from "./components/advanceInputBtn";
import SalaryMonthHelpfulTip from "./components/salaryMonthHelpfulTip";
import SalaryDetailSearchPannel from "./components/salaryDetailSearchPannel";
import SalaryDetailList from "./components/salaryDetailList";
import { getQueryString } from "../../../util/url";
import { removePropertyCondition } from "../../../util/response";
import { sysConfCodeRule } from "../../../apis/ruleconfig";
import * as API from "../../../apis/payroll";
import cs from "classnames";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore", "payrollStore")
@observer
class PayrollDetail extends Component {
constructor(props) {
super(props);
this.state = {
salarySendDetailBaseInfo: {}, showSearchAd: false, isQuery: false, conditions: [],
showTotalCell: false
};
this.listRef = null;
}
async componentDidMount() {
const id = getQueryString("id");
const { payrollStore: { detailListConditionForm } } = this.props;
const [{ data: salarySendDetailBaseInfo }, { data }, { data: confCode }] = await Promise.all([
API.getPayrollInfo({ id }), API.getPayrollDetailSa(),
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })
]);
this.setState({
salarySendDetailBaseInfo, showTotalCell: confCode === "1",
conditions: removePropertyCondition(data.condition)
}, () => detailListConditionForm.initFormFields(this.state.conditions));
}
handleExportAll = () => {
const { payrollStore: { salaryTableStore } } = this.props;
const columns = _.filter(toJS(salaryTableStore.columns), (item) => item.display === "true");
WeaLoadingGlobal.start();
const salarySendId = getQueryString("id");
const promise = API.exportDetailList_reconfig({ salarySendId, columns: _.map(columns, it => it.dataIndex) });
};
render() {
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
const { salaryMonth, template } = salarySendDetailBaseInfo;
const dropMenuDatas = [
{
key: "BTN_COLUMN",
icon: <i className="icon-coms-Custom"/>,
content: getLabel(111, "显示列定制"),
onClick: () => this.listRef.wrappedInstance.handleSetCustomCols()
}
];
const btns = [
<Button type="primary" onClick={this.handleExportAll}>{getLabel(111, "导出全部")}</Button>,
<AdvanceInputBtn onOpenAdvanceSearch={() => this.setState({ showSearchAd: true })}
onAdvanceSearch={() => this.setState({ isQuery: !isQuery })}/>
];
!showOperateBtn && btns.shift();
return (
<WeaTop
title={getLabel(111, "查看工资单详情")} icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D" showDropIcon={true} dropMenuDatas={dropMenuDatas}
buttons={btns} className="salary-payroll-details-layout"
>
<div className="salary-payroll-details">
<div className="salary-tb-tip">
<div>
<span><span
className="label">{getLabel(111, "薪资所属月")}</span><span>{salaryMonth}</span></span> &nbsp;&nbsp;
{
!_.isEmpty(salarySendDetailBaseInfo) &&
<SalaryMonthHelpfulTip salarySendDetailBaseInfo={salarySendDetailBaseInfo}/>
}
<span
className="salary-payroll-template-name"><span
className="label">{getLabel(111, "工资单模板")}</span><span>{template}</span></span>
</div>
</div>
<div
className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
<SalaryDetailSearchPannel onCancel={() => this.setState({ showSearchAd: false })}
onAdSearch={() => this.setState({ isQuery: !isQuery })}
conditions={conditions}/>
</div>
{/*列表*/}
<SalaryDetailList isQuery={isQuery} showTotalCell={showTotalCell} ref={dom => this.listRef = dom}/>
</div>
</WeaTop>
);
}
}
export default PayrollDetail;

View File

@ -1,62 +0,0 @@
import React from 'react'
import { payrollGrantDetailColumns, dataSource} from '../columns'
export default class PayrollGrantDeatail extends React.Component {
render() {
const handleMenuClick = () => {
}
const menu = (
<Menu onClick={handleMenuClick}>
<Menu.Item key="1">导出选中</Menu.Item>
</Menu>
);
const renderRightOperation = () => {
return (
<div style={{display: "inline-block"}}>
<Dropdown.Button style={{marginRight: "10px"}} overlay={menu}>导出全部</Dropdown.Button>
<WeaInputSearch />
</div>
)
}
return (
<div>
<CustomTab
searchOperationItem={
renderRightOperation()
}
/>
<div className="titleBar">
<div className="titleBarLeft">
<span>薪资所属月2021-11</span>
<WeaHelpfulTip
style={{marginLeft: '10px', marginRight: "10px"}}
width={200}
title="薪资周期\n
2021-11-01至2021-11-30\n
税款所属期\n
2021-12\n
考勤取值周期\n
2021-11-01至2021-11-30\n
福利台账月份\n
引用2021-11的福利台账数据"
placement="topLeft"
/>
<span>工资单模板上海泛微工资单1</span>
</div>
<div className="titleBarRight">
<span>已发放111/<span style={{color: "red"}}>1111</span></span>
<span style={{marginLeft: "10px"}}>未确认111</span>
</div>
</div>
<div>
<Table dataSource={dataSource} columns={payrollGrantDetailColumns} />
</div>
</div>
)
}
}

View File

@ -41,7 +41,7 @@ class salaryFileAdvanceSearchPannel extends Component {
...child,
options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel }))
};
} else if (getKey(child) === "taxAgentId") {
} else if (getKey(child) === "taxAgentIds") {
return {
...child,
options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))

View File

@ -324,10 +324,11 @@ export const salaryFileSearchConditions = [
},
{
conditionType: "SELECT",
domkey: ["taxAgentId"],
domkey: ["taxAgentIds"],
fieldcol: 16,
label: getLabel(537996, "个税扣缴义务人"),
labelcol: 8,
multiple: true,
options: [],
viewAttr: 2
},

View File

@ -36,8 +36,8 @@ class PovitpivotChartModal extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { id, dimensionId, dimensionValue, isShare } = nextProps;
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare });
const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = nextProps;
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth });
} else {
this.setState({
dataSource: [],
@ -64,11 +64,11 @@ class PovitpivotChartModal extends Component {
});
} else if (type === "turn") {
if (id === "PAGEINFO") {
const { id, dimensionId, dimensionValue, isShare } = this.props;
const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = this.props;
const { pageNum: current, size: pageSize } = params;
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
this.getDataPerspective({
id, dimensionId, dimensionValue, isShare
id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth
}));
}
}

View File

@ -5,8 +5,8 @@
* Date: 2023/4/21
*/
import React, { Component } from "react";
import { Spin } from "antd";
import { WeaEchart } from "ecCom";
import { message, Spin } from "antd";
import { WeaEchart, WeaLocaleProvider } from "ecCom";
import RightOptions from "./rightOptions";
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition";
@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal";
import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide";
import "../index.less";
const getLabel = WeaLocaleProvider.getLabel;
class ReportContent extends Component {
constructor(props) {
super(props);
@ -27,13 +29,14 @@ class ReportContent extends Component {
chartsType: "0",
chartsInfo: {},
povitView: {
visible: false, id: "", isShare: false,
dimensionId: "", dimensionValue: ""
visible: false, id: "", isShare: false, dimensionId: "", dimensionValue: "", salaryStartMonth: "",
salaryEndMonth: ""
},
rangSet: {
visible: false, reportId: "",
rangeVal: {}
}
},
pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
@ -56,9 +59,9 @@ class ReportContent extends Component {
handleReceive = ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
const { columns, countResult, dataSource } = this.state;
const { columns, countResult, dataSource, pageInfo } = this.state;
this.postMessageToChild({
columns, countResult, dataSource,
columns, countResult, dataSource, pageInfo,
showSum: !_.isEmpty(countResult)
});
} else if (type === "turn") {
@ -66,36 +69,49 @@ class ReportContent extends Component {
if (id === "PIVOTCHART") {
const { record } = params;
const { dimension: dimensionValue } = record;
const { id: pivotId, dimensionId, isShare } = this.props.report;
const {
id: pivotId, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start
} = this.props.report;
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
this.setState({
povitView: {
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
visible: true, id: pivotId, dimensionId, dimensionValue, isShare,
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
}
});
} else if (id === "PAGEINFO_REPORT") {
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report));
}
}
};
postMessageToChild = (payload) => {
const i18n = {
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
"总计": getLabel(523, "总计")
};
const childFrameObj = document.getElementById("atdTable");
const { dataSource, columns, showSum, countResult } = payload;
const { dataSource, columns, showSum, countResult, pageInfo } = payload;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
dataSource, columns, showSum, countResult
dataSource, columns, showSum, countResult, i18n, pageInfo
}), "*");
};
reportStatisticsReportGetData = (params) => {
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
const { pageInfo } = this.state;
const { id, dimension, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
const payload = {
id, dimensionId, isShare,
id, dimensionId, isShare, ...pageInfo,
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
};
this.setState({ loading: true });
reportStatisticsReportGetData(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status && id.toString() === data.reportId.toString()) {
const { countResult, columns, pageInfo: { list } } = data;
const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data;
this.setState({
countResult,
countResult, dataSource: list || [],
pageInfo: dimension === getLabel(111, "人员") ? { ...pageInfo, current: pageNum, pageSize, total } : null,
columns: _.map(columns, it => ({
...it,
dataIndex: it.column, width: it.width ? it.width + "px" : 150,
@ -105,12 +121,11 @@ class ReportContent extends Component {
dataIndex: child.column, width: child.width ? child.width + "px" : 150,
title: child.text, align: "center"
})) : []
})),
dataSource: list || []
}))
}, () => {
this.postMessageToChild({
columns: this.state.columns, countResult: this.state.countResult,
dataSource: this.state.dataSource,
dataSource: this.state.dataSource, pageInfo: this.state.pageInfo,
showSum: !_.isEmpty(this.state.countResult)
});
});
@ -195,6 +210,11 @@ class ReportContent extends Component {
}).catch(() => this.setState({ loading: false }));
};
handleChangeChartOpts = (chartsType, viewType) => {
const { loading } = this.state;
if (loading) {
message.info(getLabel(111, "列表正在加载中,请稍后"));
return;
}
this.setState({ chartsInfo: {} });
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
const { report: { id: reportId } } = this.props;
@ -267,7 +287,7 @@ class ReportContent extends Component {
onCancel={() => this.setState({
povitView: {
visible: false, id: "", dimensionId: "", dimensionValue: "",
isShare: false
isShare: false, salaryStartMonth: "", salaryEndMonth: ""
}
})}
/>

View File

@ -71,7 +71,7 @@ class StatisticalMicroSettingsSlide extends Component {
getTaxAgentSelectList = async (props) => {
const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]);
getTaxAgentSelectList(true).then(({ status, data }) => {
getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
if (status) {
const conditions = _.map(condition, item => {
return {
@ -412,7 +412,10 @@ const StatisticalScopePicker = (props) => {
<WeaDatePicker
value={startDate} disabled={disabled}
disabledDate={(current) => {
return current && endDate && current.getTime() > new Date(endDate).getTime();
if (!current || !endDate) return false;
const tooEarly = moment(current.getTime()).isBefore(moment(endDate).subtract(12, "month"));
const tooLate = moment(current.getTime()).isAfter(moment(endDate));
return !!tooEarly || !!tooLate;
}}
format="YYYY-MM"
onChange={(val) => onChange([val, endDate], timeType)}
@ -422,7 +425,10 @@ const StatisticalScopePicker = (props) => {
<WeaDatePicker
value={endDate} disabled={disabled}
disabledDate={(current) => {
return current && startDate && current.getTime() < new Date(startDate).getTime();
if (!current || !startDate) return false;
const tooEarly = moment(current.getTime()).isAfter(moment(startDate).add(12, "month"));
const tooLate = moment(current.getTime()).isBefore(moment(startDate));
return !!tooEarly || !!tooLate;
}}
format="YYYY-MM"
viewAttr={viewAttr}

View File

@ -6,13 +6,12 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
import { WeaLeftRightLayout, WeaLoadingGlobal, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
import { message, Modal } from "antd";
import LeftTab from "./components/leftTab";
import ReportContent from "./components/reportContent";
import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide";
import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
import { convertToUrlString } from "../../util/url";
import { exportDataReport, reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
import TopBtns from "./components/topBtns";
import "./index.less";
@ -92,6 +91,10 @@ class Index extends Component {
* Date: 2023/4/24
*/
exportData = () => {
if (this.reportRef.state.loading) {
message.info(getLabel(111, "列表正在加载中,请稍后"));
return;
}
const { report } = this.state;
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report;
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
@ -99,7 +102,8 @@ class Index extends Component {
id, dimensionId, isShare,
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
};
window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?${convertToUrlString(payload)}`, "_blank");
WeaLoadingGlobal.start();
const promise = exportDataReport(payload);
};
render() {

View File

@ -1,7 +1,9 @@
import React from "react";
import { WeaFormItem, WeaSearchGroup } from "ecCom";
import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaSwitch } from "comsMobx";
const getKey = WeaTools.getKey;
export const renderRuleForm = (form, condition, onChange) => {
const { isFormInit } = form;
const formParams = form.getFormParams();
@ -15,7 +17,11 @@ export const renderRuleForm = (form, condition, onChange) => {
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom">
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={onChange}/>
<WeaSwitch
fieldConfig={fields} form={form} formParams={formParams}
onChange={v => getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)}
onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })}
/>
</WeaFormItem>),
colSpan: 1,
hide: fields.hide

View File

@ -25,6 +25,7 @@ class RuleConfig extends Component {
super(props);
this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 };
this.timer = null;
this.handleDebounce = null;
}
componentDidMount() {
@ -116,16 +117,22 @@ class RuleConfig extends Component {
case "taxAgentShowStatus":
case "salaryShowStatus":
case "adjustShowStatus":
const confTitle = {
welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
extEmpsWitch: getLabel(544097, "开启非系统人员"),
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
salaryShowStatus: getLabel(111, "显示工资单页签"),
adjustShowStatus: getLabel(111, "显示调薪记录页签")
};
this.unifiedSettings(key, confTitle[key]);
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
extEmpsWitch: getLabel(544097, "开启非系统人员"),
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
salaryShowStatus: getLabel(111, "显示工资单页签"),
adjustShowStatus: getLabel(111, "显示调薪记录页签")
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;
}, 500);
}
this.handleDebounce();
break;
default:
break;

View File

@ -6,6 +6,7 @@
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu } from "antd";
import * as API from "../../../apis/taxAgent";
import "./index.less";
@ -114,6 +115,17 @@ class TaxAgentTable extends Component {
<a href="javaScript:void(0);" style={{ marginLeft: 10 }}
onClick={() => onOperate("delete", record.id)}>{getLabel(535052, "删除")}</a>
}
<Dropdown
overlay={
<Menu>
<Menu.Item>
<a href="javascript:void(0)" style={{ marginLeft: 10 }}
onClick={() => onOperate("log", record.id)}>{getLabel(545781, "操作日志")}</a>
</Menu.Item>
</Menu>
}>
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
</Dropdown>
</div>
}
]}

View File

@ -37,7 +37,7 @@
.ant-col-10 {
span:nth-child(2) {
margin-top: -6px;
//margin-top: -6px;
}
}
}

View File

@ -7,6 +7,7 @@ import ComHint from "./components/comHint";
import TaxAgentTable from "./components/taxAgentTable";
import TaxAgentSlide from "./components/taxAgentSlide";
import * as API from "../../apis/taxAgent";
import LogDialog from "../../components/logViewModal";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -24,7 +25,9 @@ class TaxAgent extends Component {
taxAgentSlideProps: {
isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"),
taxAgentId: "", current: 0, salaryOn: true
}
},
logDialogVisible: false,
filterConditions: "[]"
};
this.taxAgentTableRef = null;
}
@ -165,6 +168,12 @@ class TaxAgent extends Component {
}
});
break;
case "log":
this.setState({
logDialogVisible: true,
filterConditions: itemId ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${itemId}\"}]` : "[]"
});
break;
default:
break;
}
@ -173,7 +182,7 @@ class TaxAgent extends Component {
render() {
const {
searchValue, decentralization, taxAgentSlideProps,
permission, syncLoading
permission, syncLoading, logDialogVisible, filterConditions
} = this.state;
const btns = [
<Button type="primary" onClick={this.taxAgentRangeSync}
@ -202,6 +211,13 @@ class TaxAgent extends Component {
icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D"
buttons={btns}
showDropIcon onDropMenuClick={key => this.handleOperate(key)}
dropMenuDatas={[
{
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
content: getLabel(545781, "操作日志")
}
]}
>
<div className="comContent">
{
@ -226,6 +242,9 @@ class TaxAgent extends Component {
onOk={() => this.taxAgentTableRef.getTaxAgentList()}
onCancel={(isUpdate = false) => this.handelResetSlide(isUpdate)}
/>
{/*操作日志*/}
<LogDialog visible={logDialogVisible} logFunction="taxagent" filterConditions={filterConditions}
onCancel={() => this.setState({ logDialogVisible: false })}/>
</WeaTop>
</div>
);

View File

@ -16,7 +16,7 @@ import {
} from "../../apis/archive";
import { inject, observer } from "mobx-react";
import { adjCondition } from "./columns";
import { getDomkes, getSearchs } from "../../util";
import { getDomkes, getSearchs, toDecimal_n } from "../../util";
import moment from "moment";
const { getLabel } = WeaLocaleProvider;
@ -149,7 +149,10 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component {
let payload = {
...adjForm.getFormParams(), salaryArchiveId,
effectiveTime: moment(new Date(adjForm.getFormParams().effectiveTime)).format("YYYY-MM-DD"),
salaryArchiveItems: _.map(list, o => ({ salaryItemId: o.salaryItem, adjustValue: o.adjustAfter }))
salaryArchiveItems: _.map(list, o => ({
salaryItemId: o.salaryItem,
adjustValue: o.dataType === "number" ? toDecimal_n(o.adjustAfter, o.pattern) : o.adjustAfter
}))
};
if (salaryArchiveItemId) {
payload = { ...payload, canOperator, salaryArchiveItemId };

View File

@ -1,9 +1,8 @@
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 { WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
import { renderLoading, toDecimal_n } from "../../util";
import CustomTab from "../../components/customTab";
import SystemSalaryItemModal from "./systemSalaryItemModal";
import { columns } from "./columns";
import SlideModalTitle from "../../components/slideModalTitle";
@ -12,6 +11,8 @@ import CustomPaginationTable from "../../components/customPaginationTable";
import SyncToSalaryAccountSetDialog from "./syncToSalaryAccountSetDialog";
import "../socialSecurityBenefits/programme/index.less";
import LogDialog from "../../components/logViewModal";
import SalaryItemImportDialog from "./salaryItemImport";
import * as API from "../../apis/item";
const { getLabel } = WeaLocaleProvider;
@inject("salaryItemStore", "taxAgentStore", "salaryFileStore")
@ -29,7 +30,8 @@ export default class SalaryItem extends React.Component {
searchParams: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: [],
syncSalarySetDialog: { visible: false, title: "", id: "" },
logDialogVisible: false, filterConditions: "[]"
logDialogVisible: false, filterConditions: "[]",
salaryItemImpDialog: { visible: false, title: getLabel(24023, "数据导入") }
};
columns.map(item => {
if (item.dataIndex == "refere") {
@ -213,6 +215,19 @@ export default class SalaryItem extends React.Component {
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
});
break;
case "export":
WeaLoadingGlobal.start();
const { selectedRowKeys } = this.state;
const promise = API.exportSalaryitem({ ids: selectedRowKeys });
WeaLoadingGlobal.destroy();
break;
case "import":
this.setState({
salaryItemImpDialog: {
...this.state.salaryItemImpDialog, visible: true
}
});
break;
default:
break;
}
@ -220,12 +235,10 @@ export default class SalaryItem extends React.Component {
render() {
const {
salaryItemStore,
salaryFileStore,
taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
salaryItemStore, salaryFileStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
} = this.props;
const { userStatusList } = salaryFileStore;
const { selectedRowKeys, logDialogVisible, filterConditions } = this.state;
const { selectedRowKeys, logDialogVisible, filterConditions, salaryItemImpDialog } = this.state;
const { loading, deleteItemRequest, getTableDatas } = salaryItemStore;
const {
tableDataSource,
@ -257,51 +270,36 @@ export default class SalaryItem extends React.Component {
</Menu>
);
const renderRightOperation = () => {
return (<div style={{ display: "inline-block" }}>
{
(showOperateBtn || showSalaryItemBtn) &&
<Dropdown.Button overlay={menu} type="primary" onClick={() => handleMenuClick({ key: "1" })}
style={{ marginRight: "10px" }}>{getLabel(111, "新增自定义薪资项")}</Dropdown.Button>
const buttons = [
<Dropdown.Button overlay={menu} type="primary"
onClick={() => handleMenuClick({ key: "1" })}>{getLabel(111, "新增自定义薪资项")}</Dropdown.Button>,
<Button type="primary" onClick={() => {
if (!selectedRowKeys.length) {
message.info("未选中任何数据!");
return;
}
{
(showOperateBtn || showSalaryItemBtn) &&
<Button
type="primary"
style={{ marginRight: "10px" }}
onClick={() => {
if (!selectedRowKeys.length) {
message.info("未选中任何数据!");
return;
}
Modal.confirm({
title: "信息确认",
content: `确定要将所选的薪资项(共${selectedRowKeys.length}条数据)删除吗?`,
onOk: () => {
deleteItemRequest(selectedRowKeys).then(() => {
getTableDatas({ ...this.state.searchParams }).then(res => {
this.setState({
selectedRowKeys: [],
searchParams: {
...this.state.searchParams,
total: res.total
}
});
});
});
}
Modal.confirm({
title: "信息确认",
content: `确定要将所选的薪资项(共${selectedRowKeys.length}条数据)删除吗?`,
onOk: () => {
deleteItemRequest(selectedRowKeys).then(() => {
getTableDatas({ ...this.state.searchParams }).then(res => {
this.setState({
selectedRowKeys: [],
searchParams: {
...this.state.searchParams,
total: res.total
}
});
});
}}>{getLabel(32136, "批量删除")}</Button>
}
<WeaInputSearch value={this.state.searchValue} placeholder={"请输入名称"} onChange={(value) => {
this.setState({ searchValue: value });
}} onSearch={(value) => {
this.handleSearch(value);
}}/>
</div>);
};
});
}
});
}}>{getLabel(32136, "批量删除")}</Button>,
<WeaInputSearch value={this.state.searchValue} placeholder={getLabel(111, "请输入名称")}
onChange={value => this.setState({ searchValue: value })}
onSearch={value => this.handleSearch(value)}/>
];
// 新建和修改保存的回调
const handleSlideSave = (continueFlag) => {
const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props;
@ -367,23 +365,31 @@ export default class SalaryItem extends React.Component {
};
const rowSelection = {
selectedRowKeys,
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }),
getCheckboxProps: record => ({
disabled: !record.canDelete // Column configuration not to be checked
})
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
// getCheckboxProps: record => ({
// disabled: !record.canDelete // Column configuration not to be checked
// })
};
return (
<div className="mySalaryBenefitsWrapper">
<WeaTop title="薪资项目管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
showDropIcon onDropMenuClick={this.onDropMenuClick}
dropMenuDatas={[
{
key: "import",
icon: <i className="icon-coms02-Template-import1"/>,
content: getLabel(111, "导入")
},
{
key: "export",
icon: <i className="iconfont icon-daochu"/>,
content: getLabel(111, "导出")
},
{
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
content: getLabel(545781, "操作日志")
}
]}
>
<CustomTab searchOperationItem={renderRightOperation()}/>
]} buttons={(showOperateBtn || showSalaryItemBtn) ? buttons : buttons.slice(-1)}>
<div className="tableWrapper">
<WeaNewScroll height="100%">
<CustomPaginationTable
@ -425,6 +431,13 @@ export default class SalaryItem extends React.Component {
{/*操作日志*/}
<LogDialog visible={logDialogVisible} logFunction="salaryitem" filterConditions={filterConditions}
onCancel={() => this.setState({ logDialogVisible: false })}/>
{/* 导入*/}
<SalaryItemImportDialog {...salaryItemImpDialog}
onCancel={callback => {
this.setState({
salaryItemImpDialog: { ...salaryItemImpDialog, visible: false }
}, () => callback && this.handleSearch(this.state.searchValue));
}}/>
{
systemItemVisible &&
<SystemSalaryItemModal

View File

@ -88,7 +88,7 @@ class SalaryItemForm extends Component {
return {
...item,
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
display: valueType && valueType.toString() === "1",
display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0,
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
};
case "formulaContent":

View File

@ -0,0 +1,87 @@
/*
* 薪资项目导入
*
* @Author: 黎永顺
* @Date: 2024/8/7
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
import ImportDialog from "../../../components/importDialog";
import * as API from "../../../apis/item";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
nextloading: false, link: null, importResult: {}, imageId: "",
previewUrl: "/api/bs/hrmsalary/salaryitem/preview", hasData: false
}
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
this.setState({ importDialog: { ...this.state.importDialog, link: this.handleExportTemp } });
} else {
this.setState({
importDialog: {
nextloading: false, link: null, importResult: {}, imageId: "",
previewUrl: "/api/bs/hrmsalary/salaryitem/preview", hasData: false
}
});
}
}
handleExportTemp = () => {
const { importDialog } = this.state;
const { hasData } = importDialog;
WeaLoadingGlobal.start();
const promise = API.downloadTemplate({ hasData });
WeaLoadingGlobal.destroy();
};
handleImport = (payload) => {
const { importDialog } = this.state, { isExtEmp } = this.props;
const { extraPreview } = importDialog;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.importSalaryitem({ ...payload, ...extraPreview, isExtEmp }).then(({ data, status }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
});
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...this.props} {...importDialog}
onResetImportResult={() => this.setState({
importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
})}
exportDataDom={
<WeaCheckbox
value={importDialog.hasData ? "1" : "0"}
content={getLabel(543208, "导出现有数据")}
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
onChange={val => {
this.setState({ importDialog: { ...importDialog, hasData: val === "1" } });
}}
/>
}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default Index;

View File

@ -0,0 +1,76 @@
/*
* 方案信息确认
* 保存并自动修改基数仅保存方案设置
* @Author: 黎永顺
* @Date: 2024/8/19
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
import { Alert, Button } from "antd";
const getLabel = WeaLocaleProvider.getLabel;
const WeaTransferList = WeaTransfer.list;
class BaseValidateDialog extends Component {
constructor(props) {
super(props);
this.state = { dataSource: [] };
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
this.setState({
dataSource: _.filter(_.map(nextProps.baseChangeInfo.split("\n"), (g, gi) => ({
id: gi + 1, name: g
})), k => !!k.name)
});
}
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
dataSource: []
});
}
render() {
const { dataSource } = this.state, { onCancel } = this.props;
const scrollHeight = this.baseChangeRef ? this.baseChangeRef.state.height - 118 : 606.6;
const buttons = [
<Button type="primary" onClick={() => onCancel({
validate: false, changeData: true
})}>{getLabel(111, "保存并自动修改基数")}</Button>,
<Button type="ghost" onClick={() => onCancel({
validate: false, changeData: false
})}>{getLabel(111, "仅保存方案设置")}</Button>
];
return (
<WeaDialog
{...this.props} hasScroll className="baseChangeDialog" initLoadCss ref={dom => this.baseChangeRef = dom}
title={getLabel(131329, "信息确认")} buttons={buttons}
style={{
width: 750, height: 606.6, minHeight: 200, minWidth: 380,
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
}}
>
<div className="baseChangeContent">
<Alert
message={getLabel(111, "是否需要将社保档案中不满足上下限的基数值,自动设置为对应的上限或下限值?")}
description={getLabel(111, "以下员工的社保福利档案基数大于上限值,或小于下限值:")}
type="warning"/>
{
!_.isEmpty(dataSource) ? <WeaTransferList
data={dataSource} renderItem={(it) => (<div className="detailBox">
<div className="order">{it.id}</div>
<div className="content" title={it.name}>{it.name}</div>
</div>)}
height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]}
/> : <div className="empty">{getLabel(111, "")}</div>
}
</div>
</WeaDialog>
);
}
}
export default BaseValidateDialog;

View File

@ -12,6 +12,7 @@ import { Button, message, Modal } from "antd";
import * as API from "../../../../../apis/welfareScheme";
import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
import { getConditionDomkeys, getSearchs } from "../../../../../util";
import BaseValidateDialog from "./baseValidateDialog";
import { planConditons } from "../../config";
import cs from "classnames";
@ -24,7 +25,10 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, conditions: [], selectedKey: "2", planDatas: []
loading: false, conditions: [], selectedKey: "2", planDatas: [],
baseValidateDialog: {
visible: false, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
}
};
}
@ -86,21 +90,37 @@ class Index extends Component {
if (planForm.getFormParams().sharedType === "1" && _.isEmpty(planForm.getFormParams().taxAgentIds)) {
planForm.showError("taxAgentIds", getLabel(111, "\"可见范围\"未填写"));
} else {
const { planDatas } = this.state;
const payload = {
const { planDatas, baseValidateDialog } = this.state;
const { validatePayload } = baseValidateDialog;
let payload = {
insuranceScheme: {
...planForm.getFormParams(), welfareType: welfareTypeEnum, id,
paymentArea: planForm.getFormParams().paymentType
},
insuranceSchemeDetailList: planDatas
};
id && (payload = { ...payload, ...validatePayload });
this.setState({ loading: true });
API[id ? "updateScheme" : "createScheme"](payload).then(({ status, errormsg }) => {
API[id ? "updateScheme" : "createScheme"](payload).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功!"));
setHasBeenModify(false);
this.props.onClose(true);
if (id && Object.prototype.toString.call(data) === "[object String]" && data.indexOf("\n") !== -1) {
this.setState({
baseValidateDialog: {
visible: true, baseChangeInfo: data,
validatePayload: { ...baseValidateDialog.validatePayload, validate: false }
}
});
} else {
message.success(getLabel(30700, "操作成功!"));
setHasBeenModify(false);
this.props.onClose(true);
this.setState({
baseValidateDialog: {
...baseValidateDialog, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
}
});
}
} else {
message.error(errormsg);
}
@ -194,7 +214,7 @@ class Index extends Component {
render() {
const { conditions, planDatas, selectedKey } = this.state;
const { conditions, planDatas, selectedKey, baseValidateDialog } = this.state;
const { programmeStore: { planForm }, showOperateBtn } = this.props;
return (
<WeaSlideModal
@ -207,6 +227,14 @@ class Index extends Component {
<PlanSetTable dataSource={planDatas} selectedKey={selectedKey} showOperateBtn={showOperateBtn}
onPlanSet={this.handleSetPlanDatas}/>
</WeaSearchGroup>
{/* */}
<BaseValidateDialog {...baseValidateDialog}
onCancel={(validatePayload = {}) => this.setState({
baseValidateDialog: {
visible: false, baseChangeInfo: [],
validatePayload: { validate: true, changeData: false, ...validatePayload }
}
}, () => !_.isEmpty(validatePayload) && this.save())}/>
</div>}
/>
);

View File

@ -13,7 +13,6 @@ 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;

View File

@ -269,3 +269,91 @@
}
}
//方案基数变化
.baseChangeDialog {
.wea-dialog-body {
overflow-y: hidden;
}
.baseChangeContent {
background: #F6F6F6;
padding: 16px;
width: 100%;
height: 100%;
.empty {
width: 100%;
display: flex;
height: 100%;
justify-content: center;
align-items: center;
background: #ffff;
}
.wea-search-group {
padding: 0;
margin-bottom: 10px;
background: #FFF;
.wea-form-cell {
padding: 0;
.wea-form-item {
padding: 10px;
}
}
}
.logTable {
background: #FFFFFF;
}
.wea-transfer-list-wrapper {
border: none;
.ant-tree-switcher {
display: none;
}
.transfer-tree {
background: #FFF;
border: 1px solid #dadada;
padding: 0;
& > li:not(:last-child) {
.detailBox .content {
border-bottom: 1px solid #dadada;
}
}
& > li {
margin: 0 !important;
.detailBox {
display: flex;
align-items: center;
.order {
width: 35px;
color: #999;
text-align: center;
}
.content {
position: relative;
flex: 1;
min-height: 40px;
line-height: 40px;
color: #000;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
}
}

View File

@ -1,8 +1,19 @@
import React from "react";
import { Button, Col, Row } from "antd";
import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom";
import {
WeaBrowser,
WeaCheckbox,
WeaDialog,
WeaError,
WeaHelpfulTip,
WeaLocaleProvider,
WeaSelect,
WeaTextarea
} from "ecCom";
import { SQLHelpTip } from "../../components/PersonalScopeModal";
import "../ledger/index.less";
const { getLabel } = WeaLocaleProvider;
export default class AddTaxAgentModal extends React.Component {
constructor(props) {
super(props);
@ -24,7 +35,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({
checkAll: "1"
});
}else{
} else {
this.setState({
checkAll: "0"
});
@ -38,10 +49,10 @@ export default class AddTaxAgentModal extends React.Component {
const { checkboxValue, ids, selectedKey } = this.state;
const payload = {
employeeStatus: checkboxValue.split(","),
targetParams: _.map(ids.split(","), (it) => ({
targetType: selectedKey,
targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({
targetType: selectedKey, target: "",
targetId: it
}))
})) : [{ targetType: selectedKey, targetId: "0", target: ids }]
};
if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) {
this.refs.weaError.showError();
@ -64,7 +75,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({
selectedKey: "EMPLOYEE",
checkboxValue: "",
checkAll: '0',
checkAll: "0",
ids: ""
});
};
@ -182,6 +193,18 @@ export default class AddTaxAgentModal extends React.Component {
/>
</WeaError>
)}
{this.state.selectedKey === "SQL" && (
<WeaError tipPosition="bottom"
style={{ width: "100%" }}
ref="weaError"
error={getLabel(111, "请输入SQL")}>
<div style={{ display: "flex", alignItems: "center" }}>
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={this.state.ids}
onChange={ids => this.setState({ ids })}/>
<WeaHelpfulTip style={{ marginLeft: 10 }} width={280} placement="topLeft" title={<SQLHelpTip/>}/>
</div>
</WeaError>
)}
</div>
</Col>
</Row>
@ -197,13 +220,13 @@ export default class AddTaxAgentModal extends React.Component {
if (checkAll === "1") {
const checked = _.map(employeeStatus, it => it.id);
this.setState({
checkAll: '1',
checkAll: "1",
checkboxValue: checked.join(",")
});
} else {
this.setState({
checkAll: '0',
checkboxValue: ''
checkAll: "0",
checkboxValue: ""
});
}
}}/>

View File

@ -69,6 +69,7 @@ export class payrollStore {
@observable salarySendDetailDataSource = []; // 详情列表DataSource
@observable salarySendDetailTableStore = new TableStore(); // 详情列表store
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
@observable salaryTableStore = new TableStore();//薪资查看详情页表格Store
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
@observable detailListCondition = []; // 详情页搜索条件
@observable salarySendDetailPageInfo = {};

View File

@ -26,11 +26,12 @@ export class PayrollFilesStore {
@action("薪资档案-列表查询")
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
return new Promise((resolve, reject) => {
const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue;
const { departmentIds, positionIds, subcompanyIds, statuses, taxAgentIds, ...extra } = searchItemsValue;
API.queryList({
departmentIds: departmentIds ? departmentIds.split(",") : [],
positionIds: positionIds ? positionIds.split(",") : [],
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
statuses: statuses ? statuses.split(",") : [],
...payload, ...extra, url
}).then(res => {

View File

@ -70,6 +70,40 @@
}
}
}
.multiple_select {
.wea-select-input .arrow {
position: absolute;
right: 4px;
top: 8px;
color: #666;
}
.wdb {
word-break: break-all !important;
word-wrap: break-word !important;
}
.wea-select-input {
height: 30px;
white-space: nowrap;
min-width: 100px;
max-width: 345px;
width: 100%;
display: inline-block;
padding: 4px 17px 4px 4px;
position: relative;
min-height: 30px;
border: 1px solid #d9d9d9;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
}
}
}
//公式编辑框样式
@ -83,3 +117,27 @@
}
//薪资账套-工资类型下拉选项样式自定义
.reportTypeName-box {
display: flex;
align-items: center;
justify-content: space-between;
.reportTypeName {
display: flex;
padding: 0 8px;
align-items: center;
color: #ffcd50;
border: 1px solid #ffde8a;
background-color: #fff5db;
border-radius: 2px;
height: 24px;
}
.danger {
color: #ff666a !important;
border: 1px solid #ffc1c3 !important;
background-color: #ffdfe0 !important;
}
}

View File

@ -26,7 +26,7 @@ export const getConditionFields = (condition) => {
};
// 渲染form表单: 一般对form的渲染都统一使用该方法
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title, classnames = "") => {
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
@ -41,7 +41,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
tipPosition="bottom" // 错误提示的显示位置: top/bottom
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""}
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames}
>
<WeaSwitch
fieldConfig={fields}