custom/五院杭州中心
This commit is contained in:
parent
6eed8d6810
commit
2a47ec2cc6
|
|
@ -5,4 +5,5 @@
|
|||
position: relative;
|
||||
z-index: 0;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
display: flex;
|
||||
}
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: -2.5px;
|
||||
top: -1.5px!important;
|
||||
|
||||
.wea-advanced-search {
|
||||
top: 2px!important;
|
||||
top: 1px!important;
|
||||
left: -1px;
|
||||
height: 28px;
|
||||
line-height: 1;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,39 @@
|
|||
}
|
||||
}
|
||||
|
||||
.flatten-advance-layout {
|
||||
padding: 0;
|
||||
|
||||
.wea-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #FFF;
|
||||
line-height: inherit;
|
||||
padding: 0 10px 0 0;
|
||||
}
|
||||
|
||||
.flatten-advance-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.flatten-advance-form {
|
||||
flex: 1;
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0 10px;
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.docalc-baseinfo-layout {
|
||||
padding: 0;
|
||||
|
||||
|
|
@ -56,4 +89,4 @@
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* 杭州五院二开
|
||||
* 部门汇总表
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/10/20
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Spin } from "antd";
|
||||
import { postFetch } from "../../../../../util/request";
|
||||
import { traverse } from "../salaryEditCalc/editCalcTable";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showTotalCell: false, loading: false, dataSource: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") this.getAcctresultDepartmentList();
|
||||
};
|
||||
getAcctresultDepartmentList = () => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
this.setState({ loading: true });
|
||||
const payload = { salaryAcctRecordId };
|
||||
postFetch("/api/bs/hrmsalary/salaryacct/acctresult/department/list", payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && !_.isEmpty(data)) {
|
||||
const { columns, list: dataSource } = data;
|
||||
this.setState({ dataSource }, () => {
|
||||
this.postMessageToChild({
|
||||
dataSource, showTotalCell: false, sumRowlistUrl: "", calcDetail: true, tableScrollHeight: 120,
|
||||
columns: _.every(traverse(columns, true), (it, idx) => !it.fixed) ? _.map(traverse(columns, true), (it, idx) => ({
|
||||
...it, fixed: idx < 2 ? "left" : false
|
||||
})) : traverse(columns, true)
|
||||
});
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计")
|
||||
};
|
||||
const childFrameObj = document.getElementById("deptTable");
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
|
||||
return (<div className="salary-edit-calc-content">
|
||||
<div style={{ height: `calc((39px * ${dataSource.length}) + 188.53px)`, minHeight: "287px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
||||
id="deptTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
</div>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -137,6 +137,26 @@ export const editCalcSearchConditions = [
|
|||
label: "合并计税",
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["hireDate"],
|
||||
fieldcol: 12,
|
||||
label: "入职日期",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["zzrq"],
|
||||
fieldcol: 12,
|
||||
label: "转正日期",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
|
|
@ -173,4 +193,4 @@ export const batchUpdateConditions = [
|
|||
defaultshow: true,
|
||||
title: ""
|
||||
}
|
||||
];
|
||||
];
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
.salary-edit-calc-content {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
|
|
@ -365,4 +366,4 @@
|
|||
border-radius: 4px;
|
||||
padding: 30px 50px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,9 +5,10 @@
|
|||
* Date: 2023/9/13
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaReqTop, WeaTools } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaReqTop, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import Layout from "./layout";
|
||||
import {
|
||||
acctresultAccounting,
|
||||
|
|
@ -20,13 +21,17 @@ import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
|
|||
import SalaryEditCalc from "./components/salaryEditCalc";
|
||||
import SalaryApproval from "./components/salaryApproval";
|
||||
import SalaryDiffence from "./components/salaryDiffence";
|
||||
import SalaryDeptSummary from "./components/salaryDeptSummary";
|
||||
import ProgressModal from "../../../components/progressModal";
|
||||
import CustomCalcExportDialog from "./components/customCalcExportDialog";
|
||||
import SalaryEditCalcImport from "./components/salaryEditCalcImport";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import FormInfo from "../../../components/FormInfo";
|
||||
import { editCalcSearchConditions } from "./components/salaryEditCalc/condition";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("calculateStore")
|
||||
@observer
|
||||
|
|
@ -42,8 +47,8 @@ class Index extends Component {
|
|||
|
||||
};
|
||||
this.calc = null;
|
||||
this.calcApproval = null;
|
||||
this.calcDiffence = null;
|
||||
this.approval = null;
|
||||
this.diffence = null;
|
||||
this.timer = null;
|
||||
}
|
||||
|
||||
|
|
@ -182,9 +187,9 @@ class Index extends Component {
|
|||
<Dropdown.Button onClick={() => this.doCacl("ALL")} overlay={menu} type="primary">
|
||||
{getLabel(543545, "核算所有人")}
|
||||
</Dropdown.Button>,
|
||||
<Dropdown overlay={moreMenu}><Button type="ghost">{getLabel(17499, "更多")}</Button></Dropdown>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
|
||||
<Dropdown overlay={moreMenu}><Button type="ghost">{getLabel(17499, "更多")}</Button></Dropdown>
|
||||
// <AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
||||
// onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
|
||||
];
|
||||
!canEdit && reqBtns.splice(0, 1);
|
||||
accountExceptInfo && reqBtns.unshift(<i className="iconfont icon-jinggao"
|
||||
|
|
@ -195,17 +200,17 @@ class Index extends Component {
|
|||
isOpenApproval && (reqBtns = [
|
||||
<Button type="primary" onClick={() => {
|
||||
window.open(`${approvalWorkflowUrl}&salaryAcctRecordId=${salaryAcctRecordId}`, "_blank");
|
||||
}}>{getLabel(111, "发起审批")}</Button>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calcApproval.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.calcApproval.onAdSearch(false)}/>
|
||||
}}>{getLabel(111, "发起审批")}</Button>
|
||||
// <AdvanceInputBtn onOpenAdvanceSearch={() => this.approval.openAdvanceSearch()}
|
||||
// onAdvanceSearch={() => this.approval.onAdSearch(false)}/>
|
||||
]);
|
||||
break;
|
||||
case "diffence":
|
||||
isOpenApproval && (reqBtns = [
|
||||
<Button type="primary"
|
||||
onClick={() => this.calcDiffence && this.calcDiffence.exportDifferenctList()}>{getLabel(111, "导出")}</Button>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calcDiffence.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.calcDiffence.onAdSearch(false)}/>
|
||||
onClick={() => this.diffence && this.diffence.exportDifferenctList()}>{getLabel(111, "导出")}</Button>
|
||||
// <AdvanceInputBtn onOpenAdvanceSearch={() => this.diffence.openAdvanceSearch()}
|
||||
// onAdvanceSearch={() => this.diffence.onAdSearch(false)}/>
|
||||
]);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -233,10 +238,13 @@ class Index extends Component {
|
|||
dom = <SalaryEditCalc {...this.props} calcDetail={!canEdit} ref={dom => this.calc = dom}/>;
|
||||
break;
|
||||
case "approval":
|
||||
dom = <SalaryApproval {...this.props} ref={dom => this.calcApproval = dom}/>;
|
||||
dom = <SalaryApproval {...this.props} ref={dom => this.approval = dom}/>;
|
||||
break;
|
||||
case "deptSummary":
|
||||
dom = <SalaryDeptSummary {...this.props}/>;
|
||||
break;
|
||||
case "diffence":
|
||||
dom = <SalaryDiffence {...this.props} ref={dom => this.calcDiffence = dom}/>;
|
||||
dom = <SalaryDiffence {...this.props} ref={dom => this.diffence = dom}/>;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -249,10 +257,58 @@ class Index extends Component {
|
|||
{ key: "person", title: getLabel(543547, "人员确认") },
|
||||
{ key: "calc", title: getLabel(538011, "薪资核算") },
|
||||
{ key: "approval", title: getLabel(111, "工资申请表流程审批") },
|
||||
{ key: "deptSummary", title: getLabel(111, "部门汇总表") },
|
||||
{ key: "diffence", title: getLabel(111, "差异对比表") }
|
||||
];
|
||||
const { calculateStore: { setOtherConditions, ECSearchForm } } = this.props;
|
||||
const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog } = this.state;
|
||||
const itemRender = {
|
||||
statuses: (field, textAreaProps, form, formParams) => {
|
||||
return form.isFormInit ? (
|
||||
<WeaSwitch
|
||||
fieldConfig={{ ...field, options: _.find(ECSearchForm.fieldArr, o => getKey(o) === "statuses").options }}
|
||||
form={form} formParams={formParams} onChange={v => {
|
||||
this[selectedKey].onAdSearch(false);
|
||||
}}/>) : null;
|
||||
},
|
||||
hireDate: (field, textAreaProps, form, formParams) => {
|
||||
return form.isFormInit ? (
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams} onChange={v => {
|
||||
this[selectedKey].onAdSearch(false);
|
||||
}}/>) : null;
|
||||
},
|
||||
zzrq: (field, textAreaProps, form, formParams) => {
|
||||
return form.isFormInit ? (
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams} onChange={v => {
|
||||
this[selectedKey].onAdSearch(false);
|
||||
}}/>) : null;
|
||||
},
|
||||
departmentIds: (field, textAreaProps, form, formParams) => {
|
||||
return form.isFormInit ? (
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams} onChange={v => {
|
||||
this[selectedKey].onAdSearch(false);
|
||||
}}/>) : null;
|
||||
},
|
||||
workcode: (field, textAreaProps, form, formParams) => {
|
||||
return form.isFormInit ? (
|
||||
<WeaSwitch
|
||||
fieldConfig={{
|
||||
...field, ...textAreaProps,
|
||||
otherParams: { onEnter: () => this[selectedKey].onAdSearch(false) }
|
||||
}}
|
||||
form={form} formParams={formParams}/>) : null;
|
||||
},
|
||||
employeeName: (field, textAreaProps, form, formParams) => {
|
||||
return form.isFormInit ? (
|
||||
<WeaSwitch fieldConfig={{
|
||||
...field, ...textAreaProps,
|
||||
otherParams: { onEnter: () => this[selectedKey].onAdSearch(false) }
|
||||
}} form={form} formParams={formParams}/>) : null;
|
||||
},
|
||||
subcompanyIds: () => null,
|
||||
positionIds: () => null,
|
||||
consolidatedTaxation: () => null
|
||||
};
|
||||
return (
|
||||
<Layout {...this.props} init={this.init}>
|
||||
<div className="salary-calculate-do-calc">
|
||||
|
|
@ -263,7 +319,20 @@ class Index extends Component {
|
|||
ECSearchForm.resetForm();
|
||||
setOtherConditions([]);
|
||||
})} buttons={this.renderReqBtns()}>
|
||||
<div className="salary-calculate-do-calc-content">{this.renderContent()}</div>
|
||||
<div className="salary-calculate-do-calc-content">
|
||||
{
|
||||
["calc", "approval", "diffence"].includes(selectedKey) &&
|
||||
<WeaSearchGroup className="flatten-advance-layout" needTigger={false} showGroup={false}
|
||||
title={<div className="flatten-advance-title">
|
||||
<FormInfo center={false} itemRender={itemRender} form={ECSearchForm}
|
||||
formFields={editCalcSearchConditions} colCount={6}
|
||||
className="flatten-advance-form"/>
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this[selectedKey].openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this[selectedKey].onAdSearch(false)}/>
|
||||
</div>}/>
|
||||
}
|
||||
{this.renderContent()}
|
||||
</div>
|
||||
{
|
||||
progressVisible &&
|
||||
<ProgressModal
|
||||
|
|
@ -293,4 +362,4 @@ class Index extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index;
|
||||
|
|
@ -23,5 +23,7 @@
|
|||
.salary-calculate-do-calc-content {
|
||||
padding: 8px 16px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue