Merge branch 'feature/2.9.42310.01-薪资项目拓扑图' into release/2.9.9.2312.01-个税

This commit is contained in:
黎永顺 2023-11-29 15:08:46 +08:00
commit 198c7c8b76
6 changed files with 89 additions and 4 deletions

View File

@ -54,6 +54,7 @@ import WatermarkPreview from "./pages/payroll/watermarkPreview";
import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSalarySettings";
import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
import TopologyMap from "./pages/topologyMap";
import stores from "./stores";
import "./style/index";
@ -190,6 +191,7 @@ const Routes = (
<Route key="intelligentCalculateSalarySettings" path="intelligentCalculateSalarySettings"
component={IntelligentCalculateSalarySettings}/>
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
</Route>
);

View File

@ -59,13 +59,23 @@ class EditCalcTable extends Component {
salaryCalcSlide: { visible: true, id: salaryCalcId }
});
break;
case "DIAGRAM":
const { salarySobId } = this.props;
const { salaryItemId: itemid, acctEmpId } = params;
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${itemid}?acctEmpId=${acctEmpId}`, "_blank");
break;
default:
break;
}
}
};
updateLockStatus = (payload) => {
const { lockStatus } = payload;
const { salarySobId } = this.props;
const { lockStatus, salaryItemId } = payload;
if (lockStatus === "DIAGRAM") {
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${salaryItemId}`, "_blank");
return;
}
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: <div>
@ -125,7 +135,7 @@ class EditCalcTable extends Component {
"当前状态未锁定,点击锁定": getLabel(111, "当前状态未锁定,点击锁定"),
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
"批量锁定": getLabel(111, "批量锁定")
"批量锁定": getLabel(111, "批量锁定"), "查看拓扑图": getLabel(111, "查看拓扑图")
};
const childFrameObj = document.getElementById("atdTable");
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");

View File

@ -81,7 +81,7 @@ class Index extends Component {
onAdSearch={this.onAdSearch}
/>
</div>
<EditCalcTable ref={dom => this.calcTableRef = dom}
<EditCalcTable ref={dom => this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
{...this.props} showTotalCell={showTotalCell}
onShowFormulaTd={this.handleShowFormulaTa}/>
</div>

View File

@ -246,7 +246,13 @@ class LedgerSalaryItemTable extends Component {
{
title: "名称",
dataIndex: "name",
key: "name"
key: "name",
render: (text, record) => {
const { salarySobId, salaryItemId } = record;
return <a
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${salaryItemId}`}
target="_blank">{text}</a>;
}
},
{
title: <span>

View File

@ -0,0 +1,22 @@
/*
* Author: 黎永顺
* name: 薪资档案拓扑图
* Description:
* Date: 2023/10/19
*/
import React, { Component } from "react";
class Index extends Component {
render() {
return (
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/salaryItemDiagram"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/salaryItemDiagram"
id="topologyDiagram"
/>
);
}
}
export default Index;

View File

@ -0,0 +1,45 @@
/*
* Author: 黎永顺
* name: 薪资项目拓扑图-查看
* Description:
* Date: 2023/10/26
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import SalaryItemDiagram from "../salaryItemDiagram";
import { getQueryString } from "../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
componentDidMount() {
window.addEventListener("message", this.handleReceive, false);
}
handleReceive = async ({ data }) => {
const { type } = data;
if (type === "initDiagram") this.postMessageToChild();
};
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
}
postMessageToChild = () => {
const i18n = { "公式": getLabel(18125, "公式") };
const { params: payload = {} } = this.props;
const acctEmpId = getQueryString("acctEmpId");
const childFrameObj = document.getElementById("topologyDiagram");
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n, acctEmpId }), "*");
};
render() {
return (
<div style={{ width: "100%", height: "100%" }}>
<SalaryItemDiagram/>
</div>
);
}
}
export default Index;