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 } + }); + }} + />