custom-昂立个税/薪资账套配置流程审批地址

This commit is contained in:
黎永顺 2024-06-05 10:41:09 +08:00
parent db686198a7
commit 1a9556318c
2 changed files with 102 additions and 21 deletions

View File

@ -94,6 +94,7 @@ class Index extends Component {
</WeaBrowser>,
<Button type="primary" onClick={this.handleExport}>{getLabel(17416, "导出")}</Button>
];
this.props.calcDetail && tabBtns.splice(0, 2);
break;
case "add":
case "sub":
@ -245,31 +246,31 @@ class Index extends Component {
selectedRowKeys,
onChange: selectedRowKeys => this.setState({ selectedRowKeys })
};
const cols=[..._.map(columns, item => {
const cols = [..._.map(columns, item => {
let width = "";
const { dataIndex } = item;
switch (dataIndex) {
case "taxAgentName":
case "departmentName":
width = "15%";
break;
default:
width = "10%";
break;
}
case "taxAgentName":
case "departmentName":
width = "15%";
break;
default:
width = "10%";
break;
}
return { ...item, width };
}),
}),
{
dataIndex: "operate",
title: getLabel(30585, "操作"),
width: 120,
render: (_, record) => (
<a href="javascript:void(0);"
onClick={() => this.handleDeletePCitem([record.id])}>{getLabel(535052, "删除")}</a>
)
width: 120,
render: (_, record) => (
<a href="javascript:void(0);"
onClick={() => this.handleDeletePCitem([record.id])}>{getLabel(535052, "删除")}</a>
)
}
]
selectedKey === "adjust" && cols.pop()
];
(selectedKey === "adjust" || this.props.calcDetail) && cols.pop();
return (
<div className="person-confirm-layout">
<BaseInfo {...this.props}/>

View File

@ -8,18 +8,98 @@
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTop } from "ecCom";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
import { Button } from "antd";
import SalaryCalcPersonConfirm from "../../../calculate/doCalc/components/salaryCalcPersonConfirm";
import AdvanceInputBtn from "../../../calculate/doCalc/components/advanceInputBtn";
import { convertToUrlString } from "../../../../util/url";
import SalaryEditCalc from "../../../calculate/doCalc/components/salaryEditCalc";
import SalaryEditAccounting from "../salaryEditAccounting";
import { acctDifferList } from "../../../../apis/custom-apis/angli";
import "../index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = { selectedKey: "person" };
this.calc = null;
}
handleExportAll = () => {
const { selectedKey } = this.state;
const { calculateStore: { ECSearchForm }, routeParams: { salaryAcctRecordId } } = this.props;
const { consolidatedTaxation, ...extra } = ECSearchForm.getFormParams();
const payload = { ...extra, consolidatedTaxation: consolidatedTaxation === "0" ? "" : consolidatedTaxation };
const url = selectedKey === "diff" ?
`/api/bs/hrmsalary/salaryacct/acctresultDiffer/export?salaryAcctRecordId=${salaryAcctRecordId}&ids=&${convertToUrlString(payload)}` :
`/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${salaryAcctRecordId}&ids=&${convertToUrlString(payload)}`;
window.open(`${window.ecologyContentPath || ""}${url}`, "_blank");
};
renderReqBtns = () => {
const { selectedKey } = this.state;
let reqBtns = [];
switch (selectedKey) {
case "calc":
reqBtns = [
<Button onClick={this.handleExportAll} type="primary"> {getLabel(111, "导出全部")} </Button>,
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
];
break;
case "diff":
reqBtns = [
<Button onClick={this.handleExportAll}
type="primary">{getLabel(111, "导出全部")}</Button>,
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.wrappedInstance.acctRef.openAdvanceSearch()}
onAdvanceSearch={() => this.calc.wrappedInstance.acctRef.onAdSearch(false)}/>
];
break;
default:
break;
}
return reqBtns;
};
renderContent = () => {
const { selectedKey } = this.state;
let dom = null;
switch (selectedKey) {
case "person":
dom = <SalaryCalcPersonConfirm {...this.props} calcDetail/>;
break;
case "calc":
dom = <SalaryEditCalc {...this.props} ref={dom => this.calc = dom} calcDetail/>;
break;
case "diff":
dom = <SalaryEditAccounting {...this.props} api={acctDifferList} calcDetail notShowTotalCell
ref={dom => this.calc = dom}/>;
break;
default:
break;
}
return dom;
};
render() {
const tabs = [
{ key: "person", title: getLabel(543547, "人员确认") },
{ key: "calc", title: getLabel(538011, "薪资核算") },
{ key: "diff", title: getLabel(111, "差异对比") }
];
const { calculateStore: { setOtherConditions } } = this.props;
return (
<WeaTop title={getLabel(111, "人员确认")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D">
<div className="salary-calculate-angli-content"><SalaryCalcPersonConfirm {...this.props}/></div>
</WeaTop>
<WeaReqTop
title={getLabel(538011, "薪资核算")} tabDatas={tabs} selectedKey={this.state.selectedKey}
buttonSpace={10} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
onChange={key => this.setState({ selectedKey: key }, () => setOtherConditions([]))}
buttons={this.renderReqBtns()}
>
<div className="salary-calculate-angli-content">{this.renderContent()}</div>
</WeaReqTop>
);
}
}