From f72c1670f0fbc5bdc43a186d59225c65aff28d4a Mon Sep 17 00:00:00 2001 From: MustangDeng <670124965@qq.com> Date: Thu, 10 Mar 2022 13:51:13 +0800 Subject: [PATCH] slide topLabelBar --- .../components/slideModalTitle/index.js | 1 + .../cumDeduct/editSlideContent.js | 88 +++++++++++-------- .../cumDeduct/editSlideContent.less | 21 +++++ .../pages/dataAcquisition/cumDeduct/index.js | 19 +++- 4 files changed, 87 insertions(+), 42 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.less diff --git a/pc4mobx/hrmSalary/components/slideModalTitle/index.js b/pc4mobx/hrmSalary/components/slideModalTitle/index.js index dbf7d256..ba47f290 100644 --- a/pc4mobx/hrmSalary/components/slideModalTitle/index.js +++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.js @@ -17,6 +17,7 @@ export default class SlideModalTitle extends React.Component {
{this.props.subtitle}
+ {this.props.btns} { this.state.editable && } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js index c37af167..3228e479 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js @@ -1,8 +1,12 @@ import React from 'react'; -import { Row, Col, Table } from "antd" +import { Row, Col, Table, DatePicker } from "antd" import { inject, observer } from 'mobx-react'; -import { WeaInput, WeaTextarea, WeaSearchGroup } from "ecCom"; +import { WeaInput, WeaTextarea, WeaSearchGroup, WeaSelect } from "ecCom"; import { slideColumns} from './columns'; +import "./editSlideContent.less" + +const { MonthPicker } = DatePicker; + let emptyItem = { incomeLowerLimit: "0.00", @@ -15,14 +19,23 @@ let emptyItem = { taxDeduction: "0.00" } -@inject('taxRateStore') +@inject('cumDeductStore', "taxAgentStore") @observer export default class EditSlideContent extends React.Component { + constructor(props) { + super(props); + this.state = { + taxAgentId: "" + } + } + componentWillMount() { // 初始化渲染页面 this.state = { editable: this.props.editable === undefined ? "true": this.props.editable } + const { taxAgentStore: { fetchTaxAgentOption } } = this.props; + fetchTaxAgentOption(); } addItem() { @@ -37,47 +50,46 @@ export default class EditSlideContent extends React.Component { dataSource.push(item); setDataSource(dataSource) } - render() { - const { taxRateStore: {dataSource, nameValue, remarkValue, setNameValue, setRemarkValue, setDataSource}} = this.props; - return ( -
- - - -
名称:
- - - { - setNameValue(value) - }} - viewAttr={this.props.editable ? 2: 1} - /> - -
- - -
备注:
+ + render() { + const { taxAgentStore: {taxAgentOption}} = this.props; + const { taxAgentId} = this.state; + return ( +
+ + + 姓名 - - { - setRemarkValue(value) + + 申报月份 +
+
+ +
+ + 至 + +
+ +
+
+ + + 个税扣缴义务人 + { + this.setState({taxAgentId: v}) + getTableDatas({ taxAgentId: v }) }} - viewAttr={this.props.editable ? 2: 1} />
- - - - -
+
) } } \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.less new file mode 100644 index 00000000..b688e4ea --- /dev/null +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.less @@ -0,0 +1,21 @@ +.cumDeductSlide { + .topLabelBar { + padding: 10px 20px; + height: 40px; + line-height: 40px; + } + .formLabel { + margin-right: 10px; + } + .weaRangePickerWrapper { + display: inline-block; + .monthPickerWrapper { + width: 100px; + display: inline-block; + } + .betweenLable { + margin-left: 10px; + margin-right: 10px; + } + } +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index abd0c29d..c8ebb561 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -88,7 +88,8 @@ export default class CumDeduct extends React.Component { } onEdit = (record) => { - alert(JSON.stringify(record)) + const { cumDeductStore: { slideVisiable, setSlideVisiable } } = this.props; + setSlideVisiable(true) } // 增加编辑功能,重写columns绑定事件 @@ -115,7 +116,7 @@ export default class CumDeduct extends React.Component { const { cumDeductStore, taxAgentStore } = this.props; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = cumDeductStore; const { taxAgentOption, step } = taxAgentStore - const { slideVisiable } = cumDeductStore + const { slideVisiable, setSlideVisiable } = cumDeductStore if (!hasRight && !loading) { // 无权限处理 return renderNoright(); @@ -176,6 +177,13 @@ export default class CumDeduct extends React.Component { ] + const renderBtns = () => { + return ( + + 导出全部 + + ) + } return ( @@ -227,10 +235,13 @@ export default class CumDeduct extends React.Component { subtitle={"累计专项附加扣除记录"} subTabs={[{title: "基础设置"}]} onSave={() => {this.state.currentOperate == "add" ? doSave() : doUpdate()}} - editable={this.state.editable} + editable={false} + btns={ + renderBtns() + } /> } - content={(
content
)} + content={()} onClose={() => setSlideVisiable(false)} showMask={true} closeMaskOnClick={() => setSlideVisiable(false)} />