From 9084c20717d20d3001bbcb249e1bc020909355df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 18 Sep 2023 19:34:16 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42309.01-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=94=B9=E9=80=A0=EF=BC=88=E9=A1=B5=E9=9D=A2=E7=BC=96?= =?UTF-8?q?=E8=BE=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/salaryEditCalcImport/index.js | 65 +++++++++++++++++++ .../hrmSalary/pages/calculate/doCalc/index.js | 18 ++++- 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js new file mode 100644 index 00000000..c2b370bf --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js @@ -0,0 +1,65 @@ +/* + * Author: 黎永顺 + * name: 薪资核算-导入 + * Description: + * Date: 2023/9/18 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Badge, Button } from "antd"; +import ImportDialog from "../../../../../components/importDialog"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + salaryItemIds: "", //选择的导入表单项 + importDialog: { + visible: false, title: "", nextloading: false, + link: "", importResult: {}, imageId: "" + } + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible) { + this.setState({ + importDialog: { + ...this.state.importDialog, + visible: nextProps.visible, title: nextProps.title + } + }); + } + } + + /* + * Author: 黎永顺 + * Description:表单选项 + * Params: + * Date: 2023/9/18 + */ + renderFormComponent = () => { + return + {getLabel(520897, "请选择表单字段")} + ; + }; + + render() { + const { importDialog } = this.state; + return ( + this.setState(({ + importDialog: { ...importDialog, importResult: {}, imageId: "" } + }))} + nextCallback={imageId => this.handleImport({ imageId })} + /> + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 4a7eb201..17a2daf6 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -15,6 +15,7 @@ import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm"; import SalaryEditCalc from "./components/salaryEditCalc"; import ProgressModal from "../../../components/progressModal"; import CustomCalcExportDialog from "./components/customCalcExportDialog"; +import SalaryEditCalcImport from "./components/salaryEditCalcImport"; import { convertToUrlString } from "../../../util/url"; import "./index.less"; @@ -28,6 +29,7 @@ class Index extends Component { this.state = { selectedKey: "person", progressVisible: false, progress: 0, customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] }, + salaryImpDialog: { visible: false, title: "" }, accountExceptInfo: "" //核算报错信息, }; @@ -115,6 +117,11 @@ class Index extends Component { } }); break; + case "import": + this.setState({ + salaryImpDialog: { ...this.state.salaryImpDialog, visible: true, title: getLabel(111, "薪资导入") } + }); + break; default: break; } @@ -173,7 +180,7 @@ class Index extends Component { { key: "person", title: getLabel(543547, "人员确认") }, { key: "calc", title: getLabel(538011, "薪资核算") } ]; - const { selectedKey, progressVisible, progress, customExpDialog } = this.state; + const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog } = this.state; return ( @@ -203,6 +210,15 @@ class Index extends Component { }); }} /> + {/* 薪资核算-导入*/} + { + this.setState({ + salaryImpDialog: { ...salaryImpDialog, visible: false } + }); + }} + />