From 1a9556318c96f7ade5dacc2a16f315bc6fd06300 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Wed, 5 Jun 2024 10:41:09 +0800
Subject: [PATCH] =?UTF-8?q?custom-=E6=98=82=E7=AB=8B=E4=B8=AA=E7=A8=8E/?=
=?UTF-8?q?=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97=E9=85=8D=E7=BD=AE=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E5=AE=A1=E6=89=B9=E5=9C=B0=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../salaryCalcPersonConfirm/index.js | 35 ++++----
.../angli/personalConfirm/index.js | 88 ++++++++++++++++++-
2 files changed, 102 insertions(+), 21 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js
index 52688cca..eb4deb00 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js
@@ -94,6 +94,7 @@ class Index extends Component {
,
];
+ 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) => (
- this.handleDeletePCitem([record.id])}>{getLabel(535052, "删除")}
- )
+ width: 120,
+ render: (_, record) => (
+ this.handleDeletePCitem([record.id])}>{getLabel(535052, "删除")}
+ )
}
- ]
- selectedKey === "adjust" && cols.pop()
+ ];
+ (selectedKey === "adjust" || this.props.calcDetail) && cols.pop();
return (
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/angli/personalConfirm/index.js b/pc4mobx/hrmSalary/pages/custom-pages/angli/personalConfirm/index.js
index e60d32b6..f0a5db2a 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/angli/personalConfirm/index.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/angli/personalConfirm/index.js
@@ -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 = [
+
,
+
this.calc.openAdvanceSearch()}
+ onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
+ ];
+ break;
+ case "diff":
+ reqBtns = [
+ ,
+ 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 = ;
+ break;
+ case "calc":
+ dom = this.calc = dom} calcDetail/>;
+ break;
+ case "diff":
+ 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 (
- } iconBgcolor="#F14A2D">
-
-
+ } iconBgcolor="#F14A2D"
+ onChange={key => this.setState({ selectedKey: key }, () => setOtherConditions([]))}
+ buttons={this.renderReqBtns()}
+ >
+ {this.renderContent()}
+
);
}
}