From 32cf147cc055a81493908fdc86058d5f62e9240b Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Wed, 16 Mar 2022 13:28:34 +0800
Subject: [PATCH] slide
---
.../components/slideModalTitle/index.js | 17 +++++-
.../components/slideModalTitle/index.less | 21 ++++++++
.../hrmSalary/components/stepSlide/index.js | 4 +-
pc4mobx/hrmSalary/pages/ledger/index.js | 54 +++++++++++++++++--
4 files changed, 88 insertions(+), 8 deletions(-)
diff --git a/pc4mobx/hrmSalary/components/slideModalTitle/index.js b/pc4mobx/hrmSalary/components/slideModalTitle/index.js
index f51f4e73..056df410 100644
--- a/pc4mobx/hrmSalary/components/slideModalTitle/index.js
+++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.js
@@ -14,10 +14,23 @@ export default class SlideModalTitle extends React.Component {
-
{this.props.btns}
{
this.state.editable &&
diff --git a/pc4mobx/hrmSalary/components/slideModalTitle/index.less b/pc4mobx/hrmSalary/components/slideModalTitle/index.less
index 3375f362..3f9e04af 100644
--- a/pc4mobx/hrmSalary/components/slideModalTitle/index.less
+++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.less
@@ -19,6 +19,25 @@
line-height: 52px;
font-size: 14px;
font-weight: 600;
+ .mainTitle {
+ line-height: 37px;
+ height: 22px;
+ }
+ .subTab {
+ line-height: 40px;
+ height: 22px;
+ font-weight: normal;
+ font-size: 12px;
+ .subItem {
+ margin-right: 20px;
+ cursor: pointer;
+ }
+ .subItemSelected {
+ border-bottom: 2px solid #2db7f5;
+ color: #2db7f5;
+ }
+ }
+
}
.tabItem {
height: 20px;
@@ -26,6 +45,8 @@
font-size: 12px;
}
}
+
+
.btnWrapper {
position: absolute;
right: 50px;
diff --git a/pc4mobx/hrmSalary/components/stepSlide/index.js b/pc4mobx/hrmSalary/components/stepSlide/index.js
index 0151b678..68c29f22 100644
--- a/pc4mobx/hrmSalary/components/stepSlide/index.js
+++ b/pc4mobx/hrmSalary/components/stepSlide/index.js
@@ -26,9 +26,9 @@ export default class StepSlide extends React.Component {
content={(
{this.props.content}
)}
- onClose={() => setSlideVisiable(false)}
+ onClose={() => this.props.onCancel()}
showMask={true}
- closeMaskOnClick={() => setSlideVisiable(false)} />
+ closeMaskOnClick={() => this.props.onCancel()} />
)
}
}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js
index 3dc48099..d2bb9c6c 100644
--- a/pc4mobx/hrmSalary/pages/ledger/index.js
+++ b/pc4mobx/hrmSalary/pages/ledger/index.js
@@ -4,7 +4,7 @@ import { toJS } from 'mobx';
import { Button, Table, DatePicker } from 'antd';
-import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaInputSearch } from 'ecCom';
+import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaInputSearch, WeaSlideModal } from 'ecCom';
import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
import CustomTab from '../../components/customTab';
@@ -17,6 +17,7 @@ import { columns, dataSource } from './columns';
import SalaryItemForm from './salaryItemForm';
import CalRulesForm from './calcRulesForm';
import ValidRulesForm from './validRulesForm';
+import SlideModalTitle from '../../components/slideModalTitle'
const { MonthPicker } = DatePicker;
@@ -29,7 +30,9 @@ export default class Ledger extends React.Component {
value: "",
selectedKey: "0",
stepSlideVisible: false,
+ editSlideVisible: false,
currentStep: 4,
+ selectedTab: 0,
columns: columns.map(item => {
if(item.dataIndex == "cz") {
item.render = () =>
@@ -46,13 +49,13 @@ export default class Ledger extends React.Component {
onEdit() {
this.setState({
- stepSlideVisible: true
+ editSlideVisible: true
})
}
render() {
const { baseTableStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = baseTableStore;
- const { currentStep } = this.state;
+ const { currentStep, selectedTab } = this.state;
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
}
@@ -125,7 +128,6 @@ export default class Ledger extends React.Component {
}}
/>
-
{
this.state.stepSlideVisible &&
}
+
+ {
+ this.state.editSlideVisible &&
+ {this.setState({selectedTab: item.key})}
+ }
+ />
+ }
+ content={
+ {
+ selectedTab == 0 &&
+ }
+ {
+ selectedTab == 1 &&
+ }
+ {
+ selectedTab == 2 &&
+ }
+ {
+ selectedTab == 3 &&
+ }
+ {
+ selectedTab == 4 &&
+ }
+
}
+ onClose={() => this.setState({editSlideVisible: false})}
+ showMask={true}
+
+ closeMaskOnClick={() => this.setState({editSlideVisible: false})} />
+
+ }