Merge branch 'release/2.15.1.2407.01-个税' into custom-艾志工业-合并个税
This commit is contained in:
commit
d9e52c1319
|
|
@ -254,7 +254,7 @@ export const employeedeclareExportTemplate = params => {
|
|||
};
|
||||
//个税申报表申报数据-下载申报内置算税结果
|
||||
export const exportGetDeclareTaxResultFeedback = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetCompanyIncomes", params);
|
||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetDeclareTaxResultFeedback", params);
|
||||
};
|
||||
//个税申报表申报数据-数据导入
|
||||
export const taxdeclarationImportData = (params) => {
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,3 +79,11 @@ export const 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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
{
|
||||
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>
|
||||
}
|
||||
|
||||
{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>
|
||||
{
|
||||
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>
|
||||
}
|
||||
|
||||
{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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
<span>{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}</span>
|
||||
<span style={{ color: "red" }}> {importResult.errorCount} </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>
|
||||
<span>{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}</span>
|
||||
<span
|
||||
style={{ color: "red" }}> {importResult.errorCount} </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>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 stores from "./stores";
|
||||
import "./style/index";
|
||||
|
|
@ -126,7 +127,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}/>
|
||||
|
|
@ -136,8 +137,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}/>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -104,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
|
||||
}))
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,6 +33,15 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
& > span:first-child {
|
||||
display: inline-block;
|
||||
min-width: 44px;
|
||||
}
|
||||
|
||||
& > span:last-child {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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 } }));
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* 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, message, Modal } from "antd";
|
||||
import PaymentDialog from "./paymentDialog";
|
||||
|
|
@ -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({
|
||||
|
|
@ -174,6 +176,7 @@ class PaymentBtn extends Component {
|
|||
} else {
|
||||
message.warning(errormsg);
|
||||
clearTimeout(this.timer);
|
||||
WeaLoadingGlobal.destroy();
|
||||
}
|
||||
}, 800);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
@ -413,9 +413,9 @@ const StatisticalScopePicker = (props) => {
|
|||
value={startDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
if (!current || !endDate) return false;
|
||||
const start = moment(startDate || endDate).subtract(11, "months").format("YYYY-MM");
|
||||
const end = moment(startDate).add(12, "months").format("YYYY-MM");
|
||||
return current.getTime() < new Date(start).getTime() || current.getTime() > new Date(endDate || end).getTime();
|
||||
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)}
|
||||
|
|
@ -426,10 +426,9 @@ const StatisticalScopePicker = (props) => {
|
|||
value={endDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
if (!current || !startDate) return false;
|
||||
const start = moment(endDate).subtract(12, "months").format("YYYY-MM");
|
||||
const end = moment(endDate || startDate).add(12, "months").format("YYYY-MM");
|
||||
|
||||
return current.getTime() > new Date(end).getTime() || current.getTime() < new Date(startDate || start).getTime();
|
||||
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}
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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: ""
|
||||
});
|
||||
}
|
||||
}}/>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//公式编辑框样式
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue